쇼핑몰: #118 상품 목록 표준화 및 스타일 완료
This commit is contained in:
@ -1,5 +1,5 @@
|
||||
<?php
|
||||
$str = "";
|
||||
$str = '';
|
||||
$exists = false;
|
||||
|
||||
$ca_id_len = strlen($ca_id);
|
||||
@ -8,7 +8,7 @@ $len4 = $ca_id_len + 4;
|
||||
|
||||
// 최하위 분류의 경우 상단에 동일한 레벨의 분류를 출력해주는 코드
|
||||
if (!$exists) {
|
||||
$str = "";
|
||||
$str = '';
|
||||
|
||||
$tmp_ca_id = substr($ca_id, 0, strlen($ca_id)-2);
|
||||
$tmp_ca_id_len = strlen($tmp_ca_id);
|
||||
@ -22,8 +22,6 @@ if (!$exists) {
|
||||
and length(ca_id) = $len4 ";
|
||||
$row = sql_fetch($sql);
|
||||
$cnt = $row['cnt'];
|
||||
if (!$cnt)
|
||||
$str .= "<tr><td width=11 background='".G4_SHOP_URL."/img/ca_bg02.gif'></td><td>";
|
||||
|
||||
$sql = " select ca_id, ca_name from {$g4['shop_category_table']}
|
||||
where ca_id like '$tmp_ca_id%'
|
||||
@ -31,13 +29,13 @@ if (!$exists) {
|
||||
and length(ca_id) = $len2 order by ca_id ";
|
||||
$result = sql_query($sql);
|
||||
while ($row=sql_fetch_array($result)) {
|
||||
$style = "";
|
||||
if ($ca_id == $row['ca_id'])
|
||||
$style = " class='accent' ";
|
||||
$sct_ct_here = '';
|
||||
if ($ca_id == $row['ca_id']) // 활성 분류 표시
|
||||
$sct_ct_here = 'sct_ct_here';
|
||||
|
||||
$str .= '<li>';
|
||||
if ($cnt) {
|
||||
$str .= "<tr><td width=11 background='".G4_SHOP_URL."/img/ca_bg02.gif'></td>";
|
||||
$str .= "<td><table width=100% border=0><tr><td width=120><b>· <a href='./list.php?ca_id={$row['ca_id']}'><span $style>$row[ca_name]</span></a></b></td>";
|
||||
$str .= '<a href="./list.php?ca_id='.$row['ca_id'].'" class="sct_ct_parent '.$sct_ct_here.'">'.$row['ca_name'].'</a>';
|
||||
$sql2 = " select ca_id, ca_name from {$g4['shop_category_table']}
|
||||
where ca_id like '{$row['ca_id']}%'
|
||||
and ca_use = '1'
|
||||
@ -45,42 +43,25 @@ if (!$exists) {
|
||||
$result2 = sql_query($sql2);
|
||||
$k=0;
|
||||
while ($row2=sql_fetch_array($result2)) {
|
||||
if (!$k)
|
||||
$str .= "<td width=20 align=center>|</td><td class=lh>";
|
||||
$str .= "<a href='./list.php?ca_id={$row2['ca_id']}'>{$row2['ca_name']}</a> ";
|
||||
$str .= '<a href="./list.php?ca_id='.$row2['ca_id'].'">'.$row2['ca_name'].'</a>';
|
||||
$k++;
|
||||
}
|
||||
//if (!$k) $str .= "<td></td><td>";
|
||||
$str .= "</td></tr></table></td><td width=11 background='".G4_SHOP_URL."/img/ca_bg03.gif'></td>";
|
||||
} else {
|
||||
$str .= "<a href='./list.php?ca_id={$row['ca_id']}'><span $style>{$row['ca_name']}</span></a> ";
|
||||
$str .= '<a href="./list.php?ca_id='.$row['ca_id'].'" class="sct_ct_parent '.$sct_ct_here.'">'.$row['ca_name'].'</a>';
|
||||
}
|
||||
$str .= '</li>';
|
||||
$exists = true;
|
||||
}
|
||||
|
||||
if (!$cnt)
|
||||
$str .= "</td><td width=11 background='".G4_SHOP_URL."/img/ca_bg03.gif'></td></tr>";
|
||||
}
|
||||
|
||||
|
||||
if ($exists) {
|
||||
echo "
|
||||
<br>
|
||||
<table width=98% cellpadding=0 cellspacing=0 align=center border=0>
|
||||
<colgroup width=11>
|
||||
<colgroup width=''>
|
||||
<colgroup width=11>
|
||||
<tr>
|
||||
<td width=11><img src='".G4_SHOP_URL."/img/ca_box01.gif'></td>
|
||||
<td background='".G4_SHOP_URL."/img/ca_bg01.gif'></td>
|
||||
<td width=11><img src='".G4_SHOP_URL."/img/ca_box02.gif'></td>
|
||||
</tr>
|
||||
$str
|
||||
<tr>
|
||||
<td width=11><img src='".G4_SHOP_URL."/img/ca_box03.gif'></td>
|
||||
<td background='".G4_SHOP_URL."/img/ca_bg04.gif'></td>
|
||||
<td width=11><img src='".G4_SHOP_URL."/img/ca_box04.gif'></td>
|
||||
</tr>
|
||||
</table><br>";
|
||||
}
|
||||
?>
|
||||
?>
|
||||
|
||||
<div id="sct_ct_2" class="sct_ct">
|
||||
<ul>
|
||||
<?php echo $str; ?>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<?php } ?>
|
||||
Reference in New Issue
Block a user