쇼핑몰: gnb 하위분류 있는 경우에만 화살표 표시
This commit is contained in:
@ -11,17 +11,17 @@ if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
|
||||
$hsql = " select ca_id, ca_name from {$g5['g5_shop_category_table']} where length(ca_id) = '2' and ca_use = '1' order by ca_id ";
|
||||
$hresult = sql_query($hsql);
|
||||
$gnb_zindex = 999; // gnb_1dli z-index 값 설정용
|
||||
$count = count($hresult);
|
||||
for ($i=0; $row=sql_fetch_array($hresult); $i++)
|
||||
{
|
||||
$gnb_zindex -= 1; // html 구조에서 앞선 gnb_1dli 에 더 높은 z-index 값 부여
|
||||
?>
|
||||
<li class="gnb_1dli" style="z-index:<?php echo $gnb_zindex; ?>">
|
||||
<a href="<?php echo G5_SHOP_URL.'/list.php?ca_id='.$row['ca_id']; ?>" class="gnb_1da"><?php echo $row['ca_name']; ?></a>
|
||||
<?php
|
||||
// 2단계 분류 판매 가능한 것만
|
||||
$sql2 = " select ca_id, ca_name from {$g5['g5_shop_category_table']} where LENGTH(ca_id) = '4' and SUBSTRING(ca_id,1,2) = '{$row['ca_id']}' and ca_use = '1' order by ca_id ";
|
||||
$result2 = sql_query($sql2);
|
||||
$count = mysql_num_rows($result2);
|
||||
?>
|
||||
<li class="gnb_1dli" style="z-index:<?php echo $gnb_zindex; ?>">
|
||||
<a href="<?php echo G5_SHOP_URL.'/list.php?ca_id='.$row['ca_id']; ?>" class="gnb_1da<?php if ($count) echo ' gnb_1dam'; ?>"><?php echo $row['ca_name']; ?></a>
|
||||
<?php
|
||||
for ($j=0; $row2=sql_fetch_array($result2); $j++)
|
||||
{
|
||||
if ($j==0) echo '<ul class="gnb_2dul" style="z-index:'.$gnb_zindex.'">';
|
||||
|
||||
|
Before Width: | Height: | Size: 65 B After Width: | Height: | Size: 65 B |
|
Before Width: | Height: | Size: 65 B After Width: | Height: | Size: 65 B |
@ -6,8 +6,10 @@
|
||||
#gnb h2 {position:absolute;font-size:0;line-height:0;overflow:hidden}
|
||||
.gnb_1dli {position:relative}
|
||||
.gnb_1dli_on {color:#fff;text-decoration:none}
|
||||
.gnb_1da {display:block;padding:7px 10px;border-bottom:1px solid #f4f4f4;background:url('../shop/img/gnb_bg00.gif') #fff center right no-repeat;font-weight:bold;text-decoration:none}
|
||||
.gnb_1dli_on .gnb_1da {background:url('../shop/img/gnb_bg01.gif') #626870 center right no-repeat;color:#fff;text-decoration:none}
|
||||
.gnb_1da {display:block;padding:7px 10px;border-bottom:1px solid #f4f4f4;background-color:#fff;font-weight:bold;text-decoration:none}
|
||||
.gnb_1dam {background:url('img/gnb_bg00.gif') #fff center right no-repeat}
|
||||
.gnb_1dli_on .gnb_1da {background-color:#626870;color:#fff;text-decoration:none}
|
||||
.gnb_1dli_on .gnb_1dam {background:url('img/gnb_bg01.gif') #626870 center right no-repeat;color:#fff;text-decoration:none}
|
||||
.gnb_2dul {display:none;z-index:1000;position:absolute;border:1px solid #787f89}
|
||||
.gnb_1dli_over .gnb_2dul, .gnb_1dli_over2 .gnb_2dul {display:block;top:-1px;left:127px;width:130px;background:#fff}
|
||||
.gnb_2da {display:none}
|
||||
|
||||
Reference in New Issue
Block a user