eyekiss님 소스 올렸습니다.
본문
테스트모드
홈 메뉴5개가 메뉴설정부분
컴퓨터부분부터가 영카트 상품분류 부분입니다.
이부분이 다 파란색으로 뜨네요 active가 클릭한 부분에 먹어야하는데 ...
컴퓨터만 색이 active 되야함
변수가 문제 같아보입니다.
질문방에는 파일첨부가 안 돼나 보군요 ~!
<div class="navbar navbar-inverse" role="banner">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a href="<?=G5_URL ?>/index.php" class="navbar-brand">
<h1><img src="<?=G5_THEME_URL ?>/images/logo.png" alt="<?php echo $config['cf_title']; ?> 메인"></h1>
</a>
</div>
<!--div id="logo">
<a class="navbar-brand" href="<?php echo G5_URL; ?>/">
<h1><img src="<?php echo G5_THEME_IMG_URL ?>/logo.png" alt="<?php echo $config['cf_title']; ?> 메인"></h1>
</a>
</div-->
<?php include_once(G5_THEME_MSHOP_PATH.'/category.php'); // 분류 ?>
<div class="navbar navbar-inverse" role="banner">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a href="<?=G5_URL ?>/index.php" class="navbar-brand">
<h1><img src="<?=G5_THEME_URL ?>/images/logo.png" alt="<?php echo $config['cf_title']; ?> 메인"></h1>
</a>
</div>
<!--div id="logo">
<a class="navbar-brand" href="<?php echo G5_URL; ?>/">
<h1><img src="<?php echo G5_THEME_IMG_URL ?>/logo.png" alt="<?php echo $config['cf_title']; ?> 메인"></h1>
</a>
</div-->
<?php include_once(G5_THEME_MSHOP_PATH.'/category.php'); // 분류 ?>
<!--div id="category-full" -->
<div class="collapse navbar-collapse">
<!-- 메뉴 설정 -->
<ul class="nav navbar-nav navbar-right">
<?php
$sql = " select *
from {$g5['menu_table']}
where me_use = '1'
and length(me_code) = '2'
order by me_order, me_id ";
$result = sql_query($sql, false);
$gnb_zindex = 999; // gnb_1dli z-index 값 설정용
for ($i=0; $row=sql_fetch_array($result); $i++) {
?>
<?php
$active = '';
if($bo_table) {
if(strpos($row['me_link'], 'bo_table='.$bo_table) !== false) {
$active = ' active';
}
} else if(strpos($row['me_link'], $_SERVER['PHP_SELF']) !== false) {
$active = ' active';
}
//if(!$mnum) $mnum = 0;
//$active = $i==$mnum? ' active' : '';
// if ($i != 0 && $i != 4 && $i != 5)
echo "<li class='dropdown{$active}'>".PHP_EOL;
// else
// echo "<li class=''>".PHP_EOL;
?>
<!--li class="dropdown active"-->
<a href="<?php echo $row['me_link']; ?>" target="_<?php echo $row['me_target']; ?>" class="">
<?php echo $row['me_name'] ?>
<?php
if ($i != 0 && $i != 4 && $i != 5) {
echo "<i class='fa fa-angle-down'></i>".PHP_EOL;
}
?>
</a>
<!--ul role="menu" class="sub-menu"-->
<?php
if($i != 0 && $i != 4 && $i != 5)
echo '<ul role="menu" class="sub-menu">'.PHP_EOL;
else
echo '<ul>'.PHP_EOL;
?>
<?php
$sql2 = " select *
from {$g5['menu_table']}
where me_use = '1'
and length(me_code) = '4'
and substring(me_code, 1, 2) = '{$row['me_code']}'
order by me_order, me_id ";
$result2 = sql_query($sql2);
for ($k=0; $row2=sql_fetch_array($result2); $k++) {
if($k == 0)
echo '<ul class="cate-ul-2" style="margin:0; padding:0;">'.PHP_EOL;
?>
<!--li class="cate-li-2" style=""-->
<?php
$active_2 = "";
if($bo_table) {
if(strpos($row2['me_link'], 'bo_table='.$bo_table) !== false) {
$active_2 = ' active';
}
} else if(strpos($row2['me_link'], $_SERVER['PHP_SELF']) !== false) {
$active_2 = ' active';
}
if($k !=0 && $k !=2 && $k !=3)
echo "<li class='drop{$active_2}'>".PHP_EOL;
else
echo "<li class='$active_2'>".PHP_EOL;
?>
<a href="<?php echo $row2['me_link']; ?>" target="_<?php echo $row2['me_target']; ?>" class="">
<?php echo $row2['me_name'] ?>
</a>
</li>
<?php
}
if($k > 0)
echo '</ul>'.PHP_EOL;
?>
</ul>
</li>
<?php
}
if ($i == 0) { ?>
<li id="gnb_empty">메뉴 준비 중입니다.<?php if ($is_admin) { ?> <br><a href="<?php echo G5_ADMIN_URL; ?>/menu_list.php">관리자모드 > 환경설정 > 메뉴설정</a>에서 설정하실 수 있습니다.<?php } ?></li>
<?php } ?>
<!--/ul-->
<!-- 메뉴 설정 end -->
<?php if ($is_admin) { ?>
<!--// 상품분류메뉴 //-->
<?php
$mshop_ca_href = G5_SHOP_URL.'/list.php?ca_id=';
$mshop_ca_res1 = sql_query(get_mshop_category('', 2));
for($i=0; $mshop_ca_row1=sql_fetch_array($mshop_ca_res1); $i++) {
if($i == 0)
// echo '<ul class="nav navbar-nav navbar-right">'.PHP_EOL;
?>
<?php
$active = '';
if($bo_table) {
if(strpos($mshop_ca_href.$mshop_ca_row1['ca_id'], 'bo_table='.$bo_table) !== false) {
$active = ' active';
}
} else if(strpos($mshop_ca_href.$mshop_ca_row1['ca_id'], $_SERVER['PHP_SELF']) !== false) {
$active = ' active';
}
//if(!$mnum) $mnum = 0;
// $active = $i==$mnum? ' active' : '';
//if($i !=0 && $i !=3 && $i !=4) {
echo "<li class='dropdown{$active}'>".PHP_EOL;
//} else {
// echo "<li class='$active'>".PHP_EOL;
//}
?>
<a href="<?php echo $mshop_ca_href.$mshop_ca_row1['ca_id']; ?>"><?php echo get_text($mshop_ca_row1['ca_name']); ?>
<?php
if ($i != 0 && $i != 4 && $i != 5) {
echo "<i class='fa fa-angle-down'></i>".PHP_EOL;
}
?>
</a>
<!--add role menu -->
<?php
if($i != 0 && $i != 4 && $i != 5)
echo '<ul>'.PHP_EOL;
else
echo '<ul role="menu" class="sub-menu">'.PHP_EOL;
?>
<?php
$mshop_ca_res2 = sql_query(get_mshop_category($mshop_ca_row1['ca_id'], 4));
for($j=0; $mshop_ca_row2=sql_fetch_array($mshop_ca_res2); $j++) {
if($j == 0)
echo '<ul class="cate-ul-2" style="margin:0;padding:0;">'.PHP_EOL;
?>
<li class="cate-li-2">
<a href="<?php echo $mshop_ca_href.$mshop_ca_row2['ca_id']; ?>">
<?php echo get_text($mshop_ca_row2['ca_name']); ?>
</a>
<?php
$mshop_ca_res3 = sql_query(get_mshop_category($mshop_ca_row2['ca_id'], 6));
for($k=0; $mshop_ca_row3=sql_fetch_array($mshop_ca_res3); $k++) {
if($k == 0)
echo '<ul class="cate-ul-3">'.PHP_EOL;
?>
<li class="cate-li-3">
<a href="<?php echo $mshop_ca_href.$mshop_ca_row3['ca_id']; ?>"><?php echo get_text($mshop_ca_row3['ca_name']); ?></a>
<?php
$mshop_ca_res4 = sql_query(get_mshop_category($mshop_ca_row3['ca_id'], 8));
for($m=0; $mshop_ca_row4=sql_fetch_array($mshop_ca_res4); $m++) {
if($m == 0)
echo '<ul class="cate-ul-4">'.PHP_EOL;
?>
<li class="cate-li-4">
<a href="<?php echo $mshop_ca_href.$mshop_ca_row4['ca_id']; ?>"><?php echo get_text($mshop_ca_row4['ca_name']); ?></a>
<?php
$mshop_ca_res5 = sql_query(get_mshop_category($mshop_ca_row4['ca_id'], 10));
for($n=0; $mshop_ca_row5=sql_fetch_array($mshop_ca_res5); $n++) {
if($n == 0)
echo '<ul class="cate-ul-5">'.PHP_EOL;
?>
<li class="cate-li-5">
<a href="<?php echo $mshop_ca_href.$mshop_ca_row5['ca_id']; ?>"><?php echo get_text($mshop_ca_row5['ca_name']); ?></a>
</li>
<?php
}
if($n > 0)
echo '</ul>'.PHP_EOL;
?>
</li>
<?php
}
if($m > 0)
echo '</ul>'.PHP_EOL;
?>
</li>
<?php
}
if($k > 0)
echo '</ul>'.PHP_EOL;
?>
</li>
<?php
}
if($j > 0)
echo '</ul>'.PHP_EOL;
?>
</ul>
<!--add role menu end -->
</li>
<?php
}
if($i > 0)
echo '</ul>'.PHP_EOL;
else
echo '<p>등록된 분류가 없습니다.</p>'.PHP_EOL;
?>
<!--// 상품분류메뉴 end //-->
<?php } ?>
</div>
답변 1
제 말을 잘 이해하지 못하신것 같은데..
원본 소스 말구요..
위에 이미지로 올리신 보여지는 부분을 브라우저에서 소스보기 해서..
그 보여지는 html 소스를 올리라는 겁니다.
그래야 증상 파악이 되는거라..^^;;
답변을 작성하시기 전에 로그인 해주세요.