상단메뉴를 두가지로 만들고 싶습니다.
페이지 정보
본문
상단메뉴를 다르게 나타내고 싶은데요.
예를 들자면 A,B,C,D 메뉴와 A1,B1,C1,D1 메뉴를 나눠서 보여주고 싶은데 도저히 잘 모르겠어요..
topmenu.skin 에서 어디를 수정해야 할지
현재 영어페이지에서 보여지는 메뉴와 중국어에서 보여지는 메뉴 두가지 버전을 할려고 하는데
모두 나타나는 거라서...잘 모르겠습니다.ㅠㅠ 뭐를 바꿔야 할지 부탁드립니다.
아래 소스도 함께 올려드립니다.
<?php
$sql = " select gr_id, gr_subject, zngr_topmenu_use, zngr_topmenu_num, zngr_topmenu_target, zngr_topmenu_link, zngr_topmenu_board, zngr_outurl from $g4[group_table] where zngr_topmenu_use = '1' order by zngr_topmenu_num, gr_id";
$result = sql_query($sql);
for ($i=0; $row=sql_fetch_array($result); $i++){
$gsubject = ($row['gr_id'] == $gr_id)?"<span style='text-decoration:underline;color:#fff000;'>" .$row['gr_subject']."</span>":"<span style='text-decoration:none;color:#ffffff;'>" .$row['gr_subject']."</span>";
if($row['zngr_topmenu_link'] && $row['zngr_outurl']){
$glink = $row['zngr_topmenu_link'];
}elseif($row['zngr_topmenu_link']){
$glink = $g4['path'].'/'.$row['zngr_topmenu_link'];
}else{
$glink = $g4['bbs_path'].'/'.'group.php?gr_id=' .$row['gr_id'];
//$glink = $g4['bbs_path'].'/'.'new_board.php?gr_id=' .$row['gr_id'];
}
echo "<ul class='select'><li>";
?>
<a href='<?php echo $glink;?>' <? if($row['zngr_topmenu_target']=="1") { echo "target = '_blank'"; }?>><?php echo $gsubject;?></a>
<?
$sql1 = " select count(zngr_topmenu_use) as cnt from $g4[group_table] where zngr_topmenu_use = '1' ";
$row1 = sql_fetch($sql1);
$line_count = $row1[cnt];
if($i < ($line_count-1)) {
echo "<img src='$topmenu_skin_path/img/top_menuline.png' style='position:relative;padding:5px 5px 0 5px;vertical-align:middle;' alt='' />";
} else {
echo "<img src='$topmenu_skin_path/img/top_menuline1.gif' style='position:relative;vertical-align:middle;' alt='' />";
}
if($row['zngr_topmenu_board'] == "1") {
$sql3 = " select count(bo_table) as cnt from $g4[board_table] where (gr_id = '$row[gr_id]') and znbo_leftmenu = '1' order by bo_order_search, bo_table ";
$row3 = sql_fetch($sql3);
if($row3[cnt] > 0) {
//board
$sqlb = " select bo_subject, bo_table, znbo_leftmenu, znbo_leftmenulink, znbo_leftmenutarget, znbo_outurl, bo_new from $g4[board_table] where (gr_id = '$row[gr_id]') and znbo_leftmenu = '1' order by bo_order_search, bo_table";
$resultb = sql_query($sqlb);
echo "<div class='select_sub'><ul class='sub'>";
for ($j=0; $rowb=sql_fetch_array($resultb); $j++) {
$icl = "<img src='$topmenu_skin_path/img/top_icon.gif' border='0' style='vertical-align:middle;' alt='' />";
$icl2 = "<img src='$topmenu_skin_path/img/top_icon.gif' border='0' style='vertical-align:middle;' alt='' />";
$bsubject = ($rowb['bo_table'] == $bo_table)?"<span>".$rowb['bo_subject']."</span>":"<span style='font-weight:normal;'>".$rowb['bo_subject']."</span>";
//board link
//$blink = (!empty($rowb['znbo_leftmenulink']))?$rowb['znbo_leftmenulink']:$g4['bbs_path'].'/'.'board.php?bo_table=' .$rowb['bo_table'];
if($rowb['znbo_leftmenulink'] && $rowb['znbo_outurl']){
$blink = $rowb['znbo_leftmenulink'];//zngr_topmenu_link
}elseif($rowb['znbo_leftmenulink']){
$blink = $g4['path'].'/'.$rowb['znbo_leftmenulink'];//zngr_topmenu_link
}else{
$blink = $g4['bbs_path'].'/'.'board.php?bo_table=' .$rowb['bo_table'];
}
echo "<li>";
?>
<a href='<?php echo $blink;?>' <? if($rowb['znbo_outurl']=="1") { echo "target = '_blank'"; }?>><?php echo $bsubject;?><?//php echo $new;?></a>
<?
echo "</li>";
}
echo "</ul></div>\n"; //board end
}
}
?>
예를 들자면 A,B,C,D 메뉴와 A1,B1,C1,D1 메뉴를 나눠서 보여주고 싶은데 도저히 잘 모르겠어요..
topmenu.skin 에서 어디를 수정해야 할지
현재 영어페이지에서 보여지는 메뉴와 중국어에서 보여지는 메뉴 두가지 버전을 할려고 하는데
모두 나타나는 거라서...잘 모르겠습니다.ㅠㅠ 뭐를 바꿔야 할지 부탁드립니다.
아래 소스도 함께 올려드립니다.
<?php
$sql = " select gr_id, gr_subject, zngr_topmenu_use, zngr_topmenu_num, zngr_topmenu_target, zngr_topmenu_link, zngr_topmenu_board, zngr_outurl from $g4[group_table] where zngr_topmenu_use = '1' order by zngr_topmenu_num, gr_id";
$result = sql_query($sql);
for ($i=0; $row=sql_fetch_array($result); $i++){
$gsubject = ($row['gr_id'] == $gr_id)?"<span style='text-decoration:underline;color:#fff000;'>" .$row['gr_subject']."</span>":"<span style='text-decoration:none;color:#ffffff;'>" .$row['gr_subject']."</span>";
if($row['zngr_topmenu_link'] && $row['zngr_outurl']){
$glink = $row['zngr_topmenu_link'];
}elseif($row['zngr_topmenu_link']){
$glink = $g4['path'].'/'.$row['zngr_topmenu_link'];
}else{
$glink = $g4['bbs_path'].'/'.'group.php?gr_id=' .$row['gr_id'];
//$glink = $g4['bbs_path'].'/'.'new_board.php?gr_id=' .$row['gr_id'];
}
echo "<ul class='select'><li>";
?>
<a href='<?php echo $glink;?>' <? if($row['zngr_topmenu_target']=="1") { echo "target = '_blank'"; }?>><?php echo $gsubject;?></a>
<?
$sql1 = " select count(zngr_topmenu_use) as cnt from $g4[group_table] where zngr_topmenu_use = '1' ";
$row1 = sql_fetch($sql1);
$line_count = $row1[cnt];
if($i < ($line_count-1)) {
echo "<img src='$topmenu_skin_path/img/top_menuline.png' style='position:relative;padding:5px 5px 0 5px;vertical-align:middle;' alt='' />";
} else {
echo "<img src='$topmenu_skin_path/img/top_menuline1.gif' style='position:relative;vertical-align:middle;' alt='' />";
}
if($row['zngr_topmenu_board'] == "1") {
$sql3 = " select count(bo_table) as cnt from $g4[board_table] where (gr_id = '$row[gr_id]') and znbo_leftmenu = '1' order by bo_order_search, bo_table ";
$row3 = sql_fetch($sql3);
if($row3[cnt] > 0) {
//board
$sqlb = " select bo_subject, bo_table, znbo_leftmenu, znbo_leftmenulink, znbo_leftmenutarget, znbo_outurl, bo_new from $g4[board_table] where (gr_id = '$row[gr_id]') and znbo_leftmenu = '1' order by bo_order_search, bo_table";
$resultb = sql_query($sqlb);
echo "<div class='select_sub'><ul class='sub'>";
for ($j=0; $rowb=sql_fetch_array($resultb); $j++) {
$icl = "<img src='$topmenu_skin_path/img/top_icon.gif' border='0' style='vertical-align:middle;' alt='' />";
$icl2 = "<img src='$topmenu_skin_path/img/top_icon.gif' border='0' style='vertical-align:middle;' alt='' />";
$bsubject = ($rowb['bo_table'] == $bo_table)?"<span>".$rowb['bo_subject']."</span>":"<span style='font-weight:normal;'>".$rowb['bo_subject']."</span>";
//board link
//$blink = (!empty($rowb['znbo_leftmenulink']))?$rowb['znbo_leftmenulink']:$g4['bbs_path'].'/'.'board.php?bo_table=' .$rowb['bo_table'];
if($rowb['znbo_leftmenulink'] && $rowb['znbo_outurl']){
$blink = $rowb['znbo_leftmenulink'];//zngr_topmenu_link
}elseif($rowb['znbo_leftmenulink']){
$blink = $g4['path'].'/'.$rowb['znbo_leftmenulink'];//zngr_topmenu_link
}else{
$blink = $g4['bbs_path'].'/'.'board.php?bo_table=' .$rowb['bo_table'];
}
echo "<li>";
?>
<a href='<?php echo $blink;?>' <? if($rowb['znbo_outurl']=="1") { echo "target = '_blank'"; }?>><?php echo $bsubject;?><?//php echo $new;?></a>
<?
echo "</li>";
}
echo "</ul></div>\n"; //board end
}
}
?>
추천0