진짜 왕초보의 입장에서 바라보는 피에치피.... 정보
진짜 왕초보의 입장에서 바라보는 피에치피....본문
얼마전 관리자 님께서 이 사이트의 head.php를 공개 해 주셨으나 .. 어딜봐도 주석이 없기에 저 같은 초보자가 처음부터 적용하기는 참으로 애로사항이 있었습니다...
그래도 불여우도 지원된다는 이 메뉴나 html메뉴의 홈피보다 php로 무장한 홈피가 한결 나을 것 같아서 우선 적용을 해보면서 지워 써를 반복하면서 홈피 리뉴얼 하면서 나름데로 주석을 달았습니다...
게시판 상단엔 ==> ../_head.php 를 적용시키고
게시판 하단엔 ==> ../_tail.php 를 적용시키고
공개된 head.php 내맘데로 수정후
마찬가지로 tail.php도 수정한후...
index.php 를 불러다가 필요한 부분만 수정후 다른 이름으로 만들어 가면서 필요한 페이지를 만들면 이쁜 아이콘만 있으면 하루만에도 홈페이지를 만들수 있을것 같네요.....
다음은 관리자님이 공개해주신 head.php를 초보의 입장에서 주석을 달아 보았으며 약간의 추가도 나름데로 해 보았네요....=========
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
include_once("$g4[path]/head.sub.php");
include_once("$g4[path]/lib/outlogin.lib.php");
include_once("$g4[path]/lib/poll.lib.php");
include_once("$g4[path]/lib/visit.lib.php");
include_once("$g4[path]/lib/connect.lib.php");
include_once("$g4[path]/lib/popular.lib.php");
function top_box($content)
{
global $g4;
return "
<table width=100% cellpadding=0 cellspacing=0>
<tr>
<td background='$g4[path]/img/top_box_tl.gif' width=5 height=5></td>
<td background='$g4[path]/img/top_box_tc.gif' width='' height=5></td>
<td background='$g4[path]/img/top_box_tr.gif' width=5 height=5></td>
</tr>
<tr>
<td background='$g4[path]/img/top_box_l.gif' width=5></td>
<td style='padding:10px; line-height:150%;'>$content</td>
<td background='$g4[path]/img/top_box_r.gif' width=5></td>
</tr>
<tr>
<td background='$g4[path]/img/top_box_bl.gif' width=5 height=5></td>
<td background='$g4[path]/img/top_box_bc.gif' width='' height=5></td>
<td background='$g4[path]/img/top_box_br.gif' width=5 height=5></td>
</tr>
</table>";
}
function print_menu1($key, $no)
{
global $menu;
$str = "<table id='menu_{$key}' cellpadding=0 cellspacing=0 style='position:absolute; display:none;' onpropertychange=\"selectBoxHidden('menu_{$key}')\">";
$str .= "<tr><td class=bg_line1></td></tr>";
$str .= print_menu2($key, $no);
$str .= "<tr><td class=bg_line1></td></tr>";
$str .= "</table>\n";
return $str;
}
function print_menu2($key, $no)
{
global $menu;
for($i=1; $i<count($menu[$key]); $i++)
{
if ($menu[$key][$i][0] == "-")
$str .= "<tr><td class=bg_line{$no}></td></tr>";
else
{
$target = "";
if ($menu[$key][$i][2])
$target = " target=_blank ";
$span1 = $span2 = "";
if ($menu[$key][$i][3])
{
$span1 = "<span style='{$menu[$key][$i][3]}'>";
$span2 = "</span>";
}
$str .= "<tr><td class=bg_menu{$no}><a href='{$menu[$key][$i][0]}' $target>{$span1}{$menu[$key][$i][1]}{$span2}</a></td></tr>";
}
}
return $str;
}
switch(true)
{
case preg_match("/^(information)$/", $bo_table) : //인포메이션이란 게시판을 클릭하면
$menu1 = "information"; //메뉴1의 값이 인포메이션이 됩니다..
break;
case preg_match("/^(hardware)$/", $bo_table) : //상기 동문
$menu1 = "hardware"; //마찬가지
break;
case preg_match("/^(software)$/", $bo_table) :
$menu1 = "software";
break;
case preg_match("/^(frontier)/", $bo_table) :
$menu1 = "frontier";
break;
case preg_match("/(community.php)$/", $_SERVER[PHP_SELF]) : //커뮤니티점피에치피란 파일이 실행되거나
case preg_match("/^(community|notice|gallery)$/", $bo_table) : //커뮤니티나 노티스나 겔러리란 게시판이 실행되거나
case preg_match("/(today.php)$/", $_SERVER[PHP_SELF]) : //투데이점피에치피란 파일이 실행되면
$menu1 = "community"; //메뉴1의 값이 커뮤니티가 됩니다..
break;
case preg_match("/(new.php)$/", $_SERVER[PHP_SELF]) : //이하동문
$menu1 = "new";
break;
default : //이것두 저것두 아니면
$menu1 = ""; //메뉴1이 공백입니다...
}
unset($menu);
$menu["information"] = array (
array("$g4[path]/bbs/board.php?bo_table=information", "정보채널", 0), //이부분이 링크와 메뉴에 쓰이는 부분이더군요.... 링크된것이 실행되며 왼쪽과 마우스온시 표시되는 메뉴를 만들게 되는것 같더군요..
);
$menu["hardware"] = array (
array("$g4[path]/bbs/board.php?bo_table=hardware", "하드웨어", 0), //상기와 마찬가지겠죠
);
$menu["software"] = array(
array("$g4[path]/bbs/board.php?bo_table=software", "소프트웨어", 0),
);
$menu["frontier"] = array (
array("$g4[path]/bbs/board.php?bo_table=frontier", "프론티어", 0),
);
$menu["community"] = array (
array("$g4[path]/community.php", "커뮤니티", 0), //이부분은 파일을 만들어 메뉴도 만들어 봤습니다...
array("$g4[bbs_path]/board.php?bo_table=community", "정보공유", 0, "font-weight:bold"), //폰트도 바꿔보고
array("$g4[bbs_path]/board.php?bo_table=notice", "공지사항", 0, "font-weight:bold"),
array("$g4[bbs_path]/board.php?bo_table=gallery", "사진감상", 0,),
array("-", "", 0), //가로줄도 만들어 보고
array("$g4[path]/today.php", "출석부", 0)
);
?>
<script language="JavaScript">
var save_layer = null;
function layer_view(link_id, menu_id, opt, x, y)
{
var link = document.getElementById(link_id);
var menu = document.getElementById(menu_id);
//for (i in link) { document.write(i + '<br/>'); } return;
if (save_layer != null)
{
save_layer.style.display = "none";
selectBoxVisible();
}
if (link_id == '')
return;
if (opt == 'hide')
{
menu.style.display = 'none';
selectBoxVisible();
}
else
{
x = parseInt(x);
y = parseInt(y);
menu.style.left = get_left_pos(link) + x;
menu.style.top = get_top_pos(link) + link.offsetHeight + y;
menu.style.display = 'block';
}
save_layer = menu;
}
function preload() {
if (!document.images) return;
var ar = new Array();
var arguments = preload.arguments;
for (var i = 0; i < arguments.length; i++) {
ar[i] = new Image();
ar[i].src = arguments[i];
}
//alert(arguments.length);
}
document.onload = preload('<?=$g4[path]?>/img/bg_arrow.gif', '<?=$g4[path]?>/img/menu_arrow.gif', '<?=$g4[path]?>/img/bg_submenu.gif', '<?=$g4[path]?>/img/menu_line.gif');
</script>
<script language="javascript" src="<?=$g4[path]?>/js/sideview.js"></script>
<style>
.bg_menu1 { height:22px;
border-left-width:1px; border-left-style:solid; border-left-color:#9DADE5;
border-right-width:1px; border-right-style:solid; border-right-color:#9DADE5;
padding-left:15px;
padding-right:15px;
background-color:#F6FAFF; }
.bg_line1 { height:1px; background-color:#9DADE5; }
.bg_title { background-image:url('<?=$g4[path]?>/img/lm_category.gif');
width:179px;
height:48px;
padding-left:25px;
padding-top:4px; }
.bg_menu2 { height:22px;
padding-left:25px; }
.bg_line2 { background-image:url('<?=$g4[path]?>/img/dot.gif'); height:3px; }
</style>
<table width='900' cellpadding=0 cellspacing=0 align=center border=0>
<!-- 상단 테이블 -->
<tr onmouseover="layer_view('','','','','')">
<!-- 로고 -->
<td rowspan=2 height=60><? echo (date("Y년 m월 d일 H시i분")); ?></td>
<!-- 로고 -->
<!-- 상단 메뉴 -->
<td align=right valign=bottom width=830>
<?
$curr = sql_fetch(" select sum(IF(mb_id<>'',1,0)) as mb_cnt, count(*) as total_cnt from $g4[login_table] where mb_id <> '$config[cf_admin]' ");
?>
<span class=small>
<a href="<?=$g4[bbs_path]?>/current_connect.php">현재접속자(<?=($curr[total_cnt]>=50?($curr[total_cnt]>=100?"<font color=#ff8800><b>$curr[total_cnt]</b></font>":"<b>$curr[total_cnt]</b>"):$curr[total_cnt]);?>)</a> :
<a href="<?=$g4[bbs_path]?>/new.php">최근게시물</a> :
<a href="<?=$g4[path]?>/club/">클럽가기</a> :
<a href='<?=$g4[path]?>/'>(개발중)</a>
</span>
</td>
<!-- 상단 메뉴 -->
</tr>
<tr onmouseover="layer_view('','','','','')">
<form name="fsearchbox" method="get" action="javascript:fsearchbox_submit(document.fsearchbox);" style="margin:0px;">
<input type="hidden" name="sfl" value="wr_subject||wr_content">
<input type="hidden" name="sop" value="and">
<td align=right>
<? if ($is_admin=="super") { echo "<input class=ed style='height:17px;' type=text id='runtime'>"; } ?>
<input type=text size=15 class=ed name=stx style='height:17px;'> <input type=image src='<?=$g4[path]?>/img/search.gif' border=0 align=absmiddle width=28 height=16>
<script language="JavaScript">
function fsearchbox_submit(f)
{
if (f.stx.value == '')
{
alert("검색어를 입력하세요.");
f.stx.select();
f.stx.focus();
return;
}
// 검색에 많은 부하가 걸리는 경우 이 주석을 제거하세요.
var cnt = 0;
for (var i=0; i<f.stx.value.length; i++)
{
if (f.stx.value.charAt(i) == ' ')
cnt++;
}
if (cnt > 1)
{
alert("빠른 검색을 위하여 검색어에 공백은 한개만 입력할 수 있습니다.");
f.stx.select();
f.stx.focus();
return;
}
f.action = "<?=$g4[bbs_path]?>/search.php";
f.submit();
}
</script>
</td>
</form>
<!-- 전체 검색 end -->
</tr>
<tr>
<!-- 탑 메뉴 -->
<td colspan=2 height=35 style='padding-left:4px;'>
<?
$on_off_information = ($menu1 == "information") ? "on" : "off";
$on_off_hardware = ($menu1 == "hardware") ? "on" : "off";
$on_off_software = ($menu1 == "software") ? "on" : "off";
$on_off_frontier = ($menu1 == "frontier") ? "on" : "off";
$on_off_community = ($menu1 == "community") ? "on" : "off";
?>
<table width=900 cellpadding=0 cellspacing=0>
<tr>
<?
function disp_top_menu($id, $x=0, $y=2)
{
global $menu, $menu1, $g4;
if ($menu1 == $id)
$on_off = "on";
else
$on_off = "off";
return "<a href='{$menu[$id][0][0]}'><img src='$g4[path]/img/menu_{$on_off}_{$id}.gif' border=0 width=90 height=72 id='id_{$id}' onmouseover=\"layer_view('id_{$id}', 'menu_{$id}', 'view', {$x}, {$y});\"></a>"; //메뉴그림의 확장자나 크기나 이름이나 경로를 바꾸려면 이곳을 수정해야 될것 같네요..
}
?>
<td width=60></td>
<td width=90><?=disp_top_menu("information")?></td> <!-- 메뉴그림 표시 !! 꼭 메뉴그림의 파일명을 menu_on_인포메이션.gif 이나 menu_off_인포메이션.gif 으로 하셔야 된다는 것은 다들 하시죠 -->
<td width=60></td>
<td width=90><?=disp_top_menu("hardware")?></td>
<td width=60></td>
<td width=90><?=disp_top_menu("software")?></td>
<td width=60></td>
<td width=90><?=disp_top_menu("frontier")?></td>
<td width=60></td>
<td width=90><?=disp_top_menu("community")?></td>
<td width=60></td>
<!-- 로고 -->
<td rowspan=2><a href='<?=$g4[path]?>/' target=_top><img src='<?=$g4[path]?>/img/logo.gif' border=0></a></td>
<!-- 로고 -->
</tr>
<tr><td colspan=5 height=5></td></tr>
</table>
<?=print_menu1('information', 1);?>
<?=print_menu1('hardware', 1);?>
<?=print_menu1('software', 1);?>
<?=print_menu1('frontier', 1);?>
<?=print_menu1('community', 1);?>
</td>
</tr>
<!-- 상단 테이블 -->
</table>
<table width='900' cellpadding=0 cellspacing=0 align=center onmouseover="layer_view('','','','','')">
<!-- 메인 테이블 -->
<tr>
<td valign=top width=180>
<!-- 왼쪽 메뉴 -->
<table cellpadding=0 cellspacing=0>
<tr><td align=center height=30></td></tr>
</table>
<table cellpadding=0 cellspacing=0>
<tr><td align=center><?=outlogin("basic")?></td></tr>
</table>
<div style="clear:both; padding:0 0 10 0;"></div>
<?
switch($menu1) //저의 홈피는 주로 게시판 위주고 되었기 때문에 메뉴가 별로 필요없을 것 같고 해서 왼쪽 모양이 별로 일것 같아서 나름데로 추가 하여 메뉴별로 왼쪽 모습을 바꿔보려고 구상만 해 놓고 아직 무엇을 바꿔야 할지 고민중 입니다... 요부분은 관리자님의 소스에는 없는 부분이나 비교하면서 보시면 이해가능...
{
case "information" : //메뉴1이 인포메이션이면 아래를 실행하라
echo "<table width=180 cellpadding=0 cellspacing=0 background='{$g4[path]}/img/ca_bg.gif'>";
echo "<tr><td class=bg_title><a href='{$menu[$menu1][0][0]}'><font color=white><b>{$menu[$menu1][0][1]}</b></font></a></td></tr>";
echo print_menu2($menu1, 2);
echo "<tr><td><img src='{$g4[path]}/img/ca_bottom.gif'></td></tr>";
echo "</table>\n";
break;
case "hardware" : //메뉴1이 하드웨어면 아래를 실행하라
echo "<table width=180 cellpadding=0 cellspacing=0 background='{$g4[path]}/img/ca_bg.gif'>";
echo "<tr><td class=bg_title><a href='{$menu[$menu1][0][0]}'><font color=white><b>{$menu[$menu1][0][1]}</b></font></a></td></tr>";
echo print_menu2($menu1, 2);
echo "<tr><td><img src='{$g4[path]}/img/ca_bottom.gif'></td></tr>";
echo "</table>\n";
break;
case "software" :
echo "<table width=180 cellpadding=0 cellspacing=0 background='{$g4[path]}/img/ca_bg.gif'>";
echo "<tr><td class=bg_title><a href='{$menu[$menu1][0][0]}'><font color=white><b>{$menu[$menu1][0][1]}</b></font></a></td></tr>";
echo print_menu2($menu1, 2);
echo "<tr><td><img src='{$g4[path]}/img/ca_bottom.gif'></td></tr>";
echo "</table>\n";
break;
case "frontier" :
break;
case "community" :
echo "<table width=180 cellpadding=0 cellspacing=0 background='{$g4[path]}/img/ca_bg.gif'>";
echo "<tr><td class=bg_title><a href='{$menu[$menu1][0][0]}'><font color=white><b>{$menu[$menu1][0][1]}</b></font></a></td></tr>";
echo print_menu2($menu1, 2);
echo "<tr><td><img src='{$g4[path]}/img/ca_bottom.gif'></td></tr>";
echo "</table>\n";
break;
case "new" :
break;
case "" : //이것두 저것두 아닌 메뉴가 공백이면 아래를 실행하라... 주로 초기홈에서 실행되겠네요..
echo "
<table width=180 align=center cellpadding=0 cellspacing=0>
<tr><td width=180></td></tr>
<tr><td height=5></td></tr>
<tr><td></td></tr>
<tr><td></td></tr>
<tr><td></td></tr>
<tr><td></td></tr>
<tr><td></td></tr>";
echo "</table>";
}
?>
<!-- 왼쪽 메뉴 end -->
</td>
<td width=10></td>
<td valign=top width=800>
<table cellpadding=0 cellspacing=0>
<tr><td align=center height=15></td></tr>
</table>
<!-- 메인 -->
==============================
글쎄 이런글이 얼마나 도움이 될수 있을지는 모르겠으나 저같은 아주 왕 초보도 그누를 쉽게 접근을 할수 있으면 좋을것 같다는 바람입니다....처음에 접근하기가 힘들었습니다...
그누를 설치후 처음으로 실행되는 그 페이지를 바라보면 초보들은 눈앞이 캄캄해 집니다...^^
그래도 불여우도 지원된다는 이 메뉴나 html메뉴의 홈피보다 php로 무장한 홈피가 한결 나을 것 같아서 우선 적용을 해보면서 지워 써를 반복하면서 홈피 리뉴얼 하면서 나름데로 주석을 달았습니다...
게시판 상단엔 ==> ../_head.php 를 적용시키고
게시판 하단엔 ==> ../_tail.php 를 적용시키고
공개된 head.php 내맘데로 수정후
마찬가지로 tail.php도 수정한후...
index.php 를 불러다가 필요한 부분만 수정후 다른 이름으로 만들어 가면서 필요한 페이지를 만들면 이쁜 아이콘만 있으면 하루만에도 홈페이지를 만들수 있을것 같네요.....
다음은 관리자님이 공개해주신 head.php를 초보의 입장에서 주석을 달아 보았으며 약간의 추가도 나름데로 해 보았네요....=========
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
include_once("$g4[path]/head.sub.php");
include_once("$g4[path]/lib/outlogin.lib.php");
include_once("$g4[path]/lib/poll.lib.php");
include_once("$g4[path]/lib/visit.lib.php");
include_once("$g4[path]/lib/connect.lib.php");
include_once("$g4[path]/lib/popular.lib.php");
function top_box($content)
{
global $g4;
return "
<table width=100% cellpadding=0 cellspacing=0>
<tr>
<td background='$g4[path]/img/top_box_tl.gif' width=5 height=5></td>
<td background='$g4[path]/img/top_box_tc.gif' width='' height=5></td>
<td background='$g4[path]/img/top_box_tr.gif' width=5 height=5></td>
</tr>
<tr>
<td background='$g4[path]/img/top_box_l.gif' width=5></td>
<td style='padding:10px; line-height:150%;'>$content</td>
<td background='$g4[path]/img/top_box_r.gif' width=5></td>
</tr>
<tr>
<td background='$g4[path]/img/top_box_bl.gif' width=5 height=5></td>
<td background='$g4[path]/img/top_box_bc.gif' width='' height=5></td>
<td background='$g4[path]/img/top_box_br.gif' width=5 height=5></td>
</tr>
</table>";
}
function print_menu1($key, $no)
{
global $menu;
$str = "<table id='menu_{$key}' cellpadding=0 cellspacing=0 style='position:absolute; display:none;' onpropertychange=\"selectBoxHidden('menu_{$key}')\">";
$str .= "<tr><td class=bg_line1></td></tr>";
$str .= print_menu2($key, $no);
$str .= "<tr><td class=bg_line1></td></tr>";
$str .= "</table>\n";
return $str;
}
function print_menu2($key, $no)
{
global $menu;
for($i=1; $i<count($menu[$key]); $i++)
{
if ($menu[$key][$i][0] == "-")
$str .= "<tr><td class=bg_line{$no}></td></tr>";
else
{
$target = "";
if ($menu[$key][$i][2])
$target = " target=_blank ";
$span1 = $span2 = "";
if ($menu[$key][$i][3])
{
$span1 = "<span style='{$menu[$key][$i][3]}'>";
$span2 = "</span>";
}
$str .= "<tr><td class=bg_menu{$no}><a href='{$menu[$key][$i][0]}' $target>{$span1}{$menu[$key][$i][1]}{$span2}</a></td></tr>";
}
}
return $str;
}
switch(true)
{
case preg_match("/^(information)$/", $bo_table) : //인포메이션이란 게시판을 클릭하면
$menu1 = "information"; //메뉴1의 값이 인포메이션이 됩니다..
break;
case preg_match("/^(hardware)$/", $bo_table) : //상기 동문
$menu1 = "hardware"; //마찬가지
break;
case preg_match("/^(software)$/", $bo_table) :
$menu1 = "software";
break;
case preg_match("/^(frontier)/", $bo_table) :
$menu1 = "frontier";
break;
case preg_match("/(community.php)$/", $_SERVER[PHP_SELF]) : //커뮤니티점피에치피란 파일이 실행되거나
case preg_match("/^(community|notice|gallery)$/", $bo_table) : //커뮤니티나 노티스나 겔러리란 게시판이 실행되거나
case preg_match("/(today.php)$/", $_SERVER[PHP_SELF]) : //투데이점피에치피란 파일이 실행되면
$menu1 = "community"; //메뉴1의 값이 커뮤니티가 됩니다..
break;
case preg_match("/(new.php)$/", $_SERVER[PHP_SELF]) : //이하동문
$menu1 = "new";
break;
default : //이것두 저것두 아니면
$menu1 = ""; //메뉴1이 공백입니다...
}
unset($menu);
$menu["information"] = array (
array("$g4[path]/bbs/board.php?bo_table=information", "정보채널", 0), //이부분이 링크와 메뉴에 쓰이는 부분이더군요.... 링크된것이 실행되며 왼쪽과 마우스온시 표시되는 메뉴를 만들게 되는것 같더군요..
);
$menu["hardware"] = array (
array("$g4[path]/bbs/board.php?bo_table=hardware", "하드웨어", 0), //상기와 마찬가지겠죠
);
$menu["software"] = array(
array("$g4[path]/bbs/board.php?bo_table=software", "소프트웨어", 0),
);
$menu["frontier"] = array (
array("$g4[path]/bbs/board.php?bo_table=frontier", "프론티어", 0),
);
$menu["community"] = array (
array("$g4[path]/community.php", "커뮤니티", 0), //이부분은 파일을 만들어 메뉴도 만들어 봤습니다...
array("$g4[bbs_path]/board.php?bo_table=community", "정보공유", 0, "font-weight:bold"), //폰트도 바꿔보고
array("$g4[bbs_path]/board.php?bo_table=notice", "공지사항", 0, "font-weight:bold"),
array("$g4[bbs_path]/board.php?bo_table=gallery", "사진감상", 0,),
array("-", "", 0), //가로줄도 만들어 보고
array("$g4[path]/today.php", "출석부", 0)
);
?>
<script language="JavaScript">
var save_layer = null;
function layer_view(link_id, menu_id, opt, x, y)
{
var link = document.getElementById(link_id);
var menu = document.getElementById(menu_id);
//for (i in link) { document.write(i + '<br/>'); } return;
if (save_layer != null)
{
save_layer.style.display = "none";
selectBoxVisible();
}
if (link_id == '')
return;
if (opt == 'hide')
{
menu.style.display = 'none';
selectBoxVisible();
}
else
{
x = parseInt(x);
y = parseInt(y);
menu.style.left = get_left_pos(link) + x;
menu.style.top = get_top_pos(link) + link.offsetHeight + y;
menu.style.display = 'block';
}
save_layer = menu;
}
function preload() {
if (!document.images) return;
var ar = new Array();
var arguments = preload.arguments;
for (var i = 0; i < arguments.length; i++) {
ar[i] = new Image();
ar[i].src = arguments[i];
}
//alert(arguments.length);
}
document.onload = preload('<?=$g4[path]?>/img/bg_arrow.gif', '<?=$g4[path]?>/img/menu_arrow.gif', '<?=$g4[path]?>/img/bg_submenu.gif', '<?=$g4[path]?>/img/menu_line.gif');
</script>
<script language="javascript" src="<?=$g4[path]?>/js/sideview.js"></script>
<style>
.bg_menu1 { height:22px;
border-left-width:1px; border-left-style:solid; border-left-color:#9DADE5;
border-right-width:1px; border-right-style:solid; border-right-color:#9DADE5;
padding-left:15px;
padding-right:15px;
background-color:#F6FAFF; }
.bg_line1 { height:1px; background-color:#9DADE5; }
.bg_title { background-image:url('<?=$g4[path]?>/img/lm_category.gif');
width:179px;
height:48px;
padding-left:25px;
padding-top:4px; }
.bg_menu2 { height:22px;
padding-left:25px; }
.bg_line2 { background-image:url('<?=$g4[path]?>/img/dot.gif'); height:3px; }
</style>
<table width='900' cellpadding=0 cellspacing=0 align=center border=0>
<!-- 상단 테이블 -->
<tr onmouseover="layer_view('','','','','')">
<!-- 로고 -->
<td rowspan=2 height=60><? echo (date("Y년 m월 d일 H시i분")); ?></td>
<!-- 로고 -->
<!-- 상단 메뉴 -->
<td align=right valign=bottom width=830>
<?
$curr = sql_fetch(" select sum(IF(mb_id<>'',1,0)) as mb_cnt, count(*) as total_cnt from $g4[login_table] where mb_id <> '$config[cf_admin]' ");
?>
<span class=small>
<a href="<?=$g4[bbs_path]?>/current_connect.php">현재접속자(<?=($curr[total_cnt]>=50?($curr[total_cnt]>=100?"<font color=#ff8800><b>$curr[total_cnt]</b></font>":"<b>$curr[total_cnt]</b>"):$curr[total_cnt]);?>)</a> :
<a href="<?=$g4[bbs_path]?>/new.php">최근게시물</a> :
<a href="<?=$g4[path]?>/club/">클럽가기</a> :
<a href='<?=$g4[path]?>/'>(개발중)</a>
</span>
</td>
<!-- 상단 메뉴 -->
</tr>
<tr onmouseover="layer_view('','','','','')">
<form name="fsearchbox" method="get" action="javascript:fsearchbox_submit(document.fsearchbox);" style="margin:0px;">
<input type="hidden" name="sfl" value="wr_subject||wr_content">
<input type="hidden" name="sop" value="and">
<td align=right>
<? if ($is_admin=="super") { echo "<input class=ed style='height:17px;' type=text id='runtime'>"; } ?>
<input type=text size=15 class=ed name=stx style='height:17px;'> <input type=image src='<?=$g4[path]?>/img/search.gif' border=0 align=absmiddle width=28 height=16>
<script language="JavaScript">
function fsearchbox_submit(f)
{
if (f.stx.value == '')
{
alert("검색어를 입력하세요.");
f.stx.select();
f.stx.focus();
return;
}
// 검색에 많은 부하가 걸리는 경우 이 주석을 제거하세요.
var cnt = 0;
for (var i=0; i<f.stx.value.length; i++)
{
if (f.stx.value.charAt(i) == ' ')
cnt++;
}
if (cnt > 1)
{
alert("빠른 검색을 위하여 검색어에 공백은 한개만 입력할 수 있습니다.");
f.stx.select();
f.stx.focus();
return;
}
f.action = "<?=$g4[bbs_path]?>/search.php";
f.submit();
}
</script>
</td>
</form>
<!-- 전체 검색 end -->
</tr>
<tr>
<!-- 탑 메뉴 -->
<td colspan=2 height=35 style='padding-left:4px;'>
<?
$on_off_information = ($menu1 == "information") ? "on" : "off";
$on_off_hardware = ($menu1 == "hardware") ? "on" : "off";
$on_off_software = ($menu1 == "software") ? "on" : "off";
$on_off_frontier = ($menu1 == "frontier") ? "on" : "off";
$on_off_community = ($menu1 == "community") ? "on" : "off";
?>
<table width=900 cellpadding=0 cellspacing=0>
<tr>
<?
function disp_top_menu($id, $x=0, $y=2)
{
global $menu, $menu1, $g4;
if ($menu1 == $id)
$on_off = "on";
else
$on_off = "off";
return "<a href='{$menu[$id][0][0]}'><img src='$g4[path]/img/menu_{$on_off}_{$id}.gif' border=0 width=90 height=72 id='id_{$id}' onmouseover=\"layer_view('id_{$id}', 'menu_{$id}', 'view', {$x}, {$y});\"></a>"; //메뉴그림의 확장자나 크기나 이름이나 경로를 바꾸려면 이곳을 수정해야 될것 같네요..
}
?>
<td width=60></td>
<td width=90><?=disp_top_menu("information")?></td> <!-- 메뉴그림 표시 !! 꼭 메뉴그림의 파일명을 menu_on_인포메이션.gif 이나 menu_off_인포메이션.gif 으로 하셔야 된다는 것은 다들 하시죠 -->
<td width=60></td>
<td width=90><?=disp_top_menu("hardware")?></td>
<td width=60></td>
<td width=90><?=disp_top_menu("software")?></td>
<td width=60></td>
<td width=90><?=disp_top_menu("frontier")?></td>
<td width=60></td>
<td width=90><?=disp_top_menu("community")?></td>
<td width=60></td>
<!-- 로고 -->
<td rowspan=2><a href='<?=$g4[path]?>/' target=_top><img src='<?=$g4[path]?>/img/logo.gif' border=0></a></td>
<!-- 로고 -->
</tr>
<tr><td colspan=5 height=5></td></tr>
</table>
<?=print_menu1('information', 1);?>
<?=print_menu1('hardware', 1);?>
<?=print_menu1('software', 1);?>
<?=print_menu1('frontier', 1);?>
<?=print_menu1('community', 1);?>
</td>
</tr>
<!-- 상단 테이블 -->
</table>
<table width='900' cellpadding=0 cellspacing=0 align=center onmouseover="layer_view('','','','','')">
<!-- 메인 테이블 -->
<tr>
<td valign=top width=180>
<!-- 왼쪽 메뉴 -->
<table cellpadding=0 cellspacing=0>
<tr><td align=center height=30></td></tr>
</table>
<table cellpadding=0 cellspacing=0>
<tr><td align=center><?=outlogin("basic")?></td></tr>
</table>
<div style="clear:both; padding:0 0 10 0;"></div>
<?
switch($menu1) //저의 홈피는 주로 게시판 위주고 되었기 때문에 메뉴가 별로 필요없을 것 같고 해서 왼쪽 모양이 별로 일것 같아서 나름데로 추가 하여 메뉴별로 왼쪽 모습을 바꿔보려고 구상만 해 놓고 아직 무엇을 바꿔야 할지 고민중 입니다... 요부분은 관리자님의 소스에는 없는 부분이나 비교하면서 보시면 이해가능...
{
case "information" : //메뉴1이 인포메이션이면 아래를 실행하라
echo "<table width=180 cellpadding=0 cellspacing=0 background='{$g4[path]}/img/ca_bg.gif'>";
echo "<tr><td class=bg_title><a href='{$menu[$menu1][0][0]}'><font color=white><b>{$menu[$menu1][0][1]}</b></font></a></td></tr>";
echo print_menu2($menu1, 2);
echo "<tr><td><img src='{$g4[path]}/img/ca_bottom.gif'></td></tr>";
echo "</table>\n";
break;
case "hardware" : //메뉴1이 하드웨어면 아래를 실행하라
echo "<table width=180 cellpadding=0 cellspacing=0 background='{$g4[path]}/img/ca_bg.gif'>";
echo "<tr><td class=bg_title><a href='{$menu[$menu1][0][0]}'><font color=white><b>{$menu[$menu1][0][1]}</b></font></a></td></tr>";
echo print_menu2($menu1, 2);
echo "<tr><td><img src='{$g4[path]}/img/ca_bottom.gif'></td></tr>";
echo "</table>\n";
break;
case "software" :
echo "<table width=180 cellpadding=0 cellspacing=0 background='{$g4[path]}/img/ca_bg.gif'>";
echo "<tr><td class=bg_title><a href='{$menu[$menu1][0][0]}'><font color=white><b>{$menu[$menu1][0][1]}</b></font></a></td></tr>";
echo print_menu2($menu1, 2);
echo "<tr><td><img src='{$g4[path]}/img/ca_bottom.gif'></td></tr>";
echo "</table>\n";
break;
case "frontier" :
break;
case "community" :
echo "<table width=180 cellpadding=0 cellspacing=0 background='{$g4[path]}/img/ca_bg.gif'>";
echo "<tr><td class=bg_title><a href='{$menu[$menu1][0][0]}'><font color=white><b>{$menu[$menu1][0][1]}</b></font></a></td></tr>";
echo print_menu2($menu1, 2);
echo "<tr><td><img src='{$g4[path]}/img/ca_bottom.gif'></td></tr>";
echo "</table>\n";
break;
case "new" :
break;
case "" : //이것두 저것두 아닌 메뉴가 공백이면 아래를 실행하라... 주로 초기홈에서 실행되겠네요..
echo "
<table width=180 align=center cellpadding=0 cellspacing=0>
<tr><td width=180></td></tr>
<tr><td height=5></td></tr>
<tr><td></td></tr>
<tr><td></td></tr>
<tr><td></td></tr>
<tr><td></td></tr>
<tr><td></td></tr>";
echo "</table>";
}
?>
<!-- 왼쪽 메뉴 end -->
</td>
<td width=10></td>
<td valign=top width=800>
<table cellpadding=0 cellspacing=0>
<tr><td align=center height=15></td></tr>
</table>
<!-- 메인 -->
==============================
글쎄 이런글이 얼마나 도움이 될수 있을지는 모르겠으나 저같은 아주 왕 초보도 그누를 쉽게 접근을 할수 있으면 좋을것 같다는 바람입니다....처음에 접근하기가 힘들었습니다...
그누를 설치후 처음으로 실행되는 그 페이지를 바라보면 초보들은 눈앞이 캄캄해 집니다...^^
추천
1
1
댓글 8개
감사합니다.
수고 하셨습니다.
수고 하셨습니다.
저두 초보인데요 다시 잘 쓸께요 (맨날 얻어만 가네)
정말 대단한 작업을 하셨네요..
저 같은 왕초보에겐 큰 도움이 되겠습니다..
수고 많으셨어요..
ps) '나름데로' --> '나름대로' 입니다. ^^ㅋ
저 같은 왕초보에겐 큰 도움이 되겠습니다..
수고 많으셨어요..
ps) '나름데로' --> '나름대로' 입니다. ^^ㅋ
메뉴그림 파일명 땜에 고심하고 있었는데... 넘 감사합니다.
"menu_on_...."^^
"menu_on_...."^^
그누를 설치후 처음으로 실행되는 그 페이지를 바라보면 초보들은 눈앞이 캄캄해 집니다...^^
이말 완전동감..ㅎㅎㅎ
이말 완전동감..ㅎㅎㅎ
많은 도움이 될듯 합니다
정말 수고가 많으셨습니다
감사드립니다.
정말 수고가 많으셨습니다
감사드립니다.
^^
1