쇼핑몰: #118 상품 목록 표준화 및 스타일 완료

This commit is contained in:
whitedot
2013-05-02 21:02:45 +09:00
parent b111507268
commit 5565b0d968
5 changed files with 58 additions and 102 deletions

View File

@ -1,5 +1,5 @@
<?php
$str = "";
$str = '';
$exists = false;
$depth2_ca_id = substr($ca_id, 0, 2);
@ -10,36 +10,22 @@ $sql = " select ca_id, ca_name from {$g4['shop_category_table']}
and ca_use = '1'
order by ca_id ";
$result = sql_query($sql);
$str .= "<tr><td width=11 background='".G4_SHOP_PATH."/img/ca_bg02.gif'></td>";
$str .= "<td><table width=100% border=0><tr><td>";
while ($row=sql_fetch_array($result)) {
if (preg_match("/^{$row['ca_id']}/", $ca_id))
$span = "<span style='font-weight:bold;'>";
$sct_ct_here = 'sct_ct_here';
else
$span = "<span>";
$str .= "<a href='./list.php?ca_id={$row['ca_id']}'>{$span}{$row['ca_name']}</span></a> &nbsp; ";
$sct_ct_here = '';
$str .= '<li><a href="./list.php?ca_id='.$row['ca_id'].'" class="'.$sct_ct_here.'">'.$row['ca_name'].'</a></li>';
$exists = true;
}
$str .= "</td></tr></table></td><td width=11 background='".G4_SHOP_URL."/img/ca_bg03.gif'></td>";
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_3" class="sct_ct">
<ul>
<?php echo $str; ?>
</ul>
</div>
<?php } ?>