쇼핑몰: #97 상품분류 표준화 및 스타일 작업 중2
This commit is contained in:
@ -86,52 +86,33 @@ a:active {color:#000;text-decoration:underline}
|
||||
#hd_aside a {display:inline-block;padding:0 15px;height:38px;font-weight:bold;text-decoration:none;line-height:3.4em !important;line-height:3em}
|
||||
|
||||
/* gnb js off */
|
||||
#gnb {z-index:10;margin:-1px 0 0;border-bottom:1px solid #c3c7c5;background:#f0f4f8}
|
||||
#gnb h2 {position:absolute;margin:0;padding:0;font-size:0;line-height:0;overflow:hidden}
|
||||
#gnb_ul {margin:0 auto;padding:0;width:980px;zoom:1}
|
||||
#gnb_ul:after {display:block;visibility:hidden;clear:both;content:""}
|
||||
.gnb_1depth {z-index:10;clear:both;zoom:1}
|
||||
.gnb_1depth:after {display:block;visibility:hidden;clear:both;content:""}
|
||||
.gnb_1depth a {display:block;float:left;width:80px;height:35px;font-weight:bold;line-height:2.95em;text-decoration:none}
|
||||
.gnb_1depth a:focus,
|
||||
.gnb_1depth a:hover {text-decoration:none}
|
||||
.gnb_1depth ul {float:left;width:auto}
|
||||
.gnb_2depth {float:left}
|
||||
.gnb_2depth a {font-weight:normal}
|
||||
/* gnb js on */
|
||||
.gnb_js {}
|
||||
.gnb_js #gnb_ul {zoom:1}
|
||||
.gnb_js #gnb_ul:after {display:block;visibility:hidden;clear:both;content:""}
|
||||
.gnb_js .gnb_1depth {clear:none;position:relative;float:left}
|
||||
.gnb_js .gnb_1depth a {text-align:center}
|
||||
.gnb_js .gnb_1depth_air a {float:none;background:#f7f7f2;color:#000}
|
||||
.gnb_js .gnb_1depth_on a {float:none;border-color:#e0e5e9;background:#fff;color:#000}
|
||||
.gnb_js .gnb_sub_ul {position:absolute;top:35px;width:1px;height:1px;overflow:hidden}
|
||||
.gnb_js .gnb_2depth a {display:inline-block;float:none !important;padding:0 10px;width:161px;text-align:left}
|
||||
.gnb_1depth_over .gnb_sub_ul {left:-1px;width:181px;height:auto;border:1px solid #c3c7c5;border-top:0;background:#fff}
|
||||
.gnb_1depth_over2 .gnb_sub_ul {right:-1px;width:181px;height:auto;border:1px solid #c3c7c5;border-top:0;background:#fff}
|
||||
|
||||
.gnb_empty {width:100%;height:35px;text-align:center;line-height:2.95em}
|
||||
#gnb {margin:0 0 5px;padding:0 0 10px;border:1px solid #d5d5d5;background:#faf9f5}
|
||||
#gnb h2 {position:absolute;font-size:0;line-height:0;overflow:hidden}
|
||||
#gnb ul {margin:0;padding:10px 0 0;border:0;background:#fff;list-style:none}
|
||||
#gnb ul ul {display:none}
|
||||
#gnb .gnb_1d_a {display:block;padding:0 10px;height:33px;border-bottom:1px solid #f4f4f4;background:url('../img/shop/gnb_bg.gif') top right repeat-x;font-weight:bold;text-decoration:none;line-height:2.9em}
|
||||
|
||||
/* 중간 레이아웃 */
|
||||
#wrapper {z-index:5;margin:30px auto;width:980px;zoom:1}
|
||||
#wrapper:after {display:block;visibility:hidden;clear:both;content:""}
|
||||
#wrapper_title {margin-bottom:20px;font-size:1.2em}
|
||||
|
||||
#stod {float:right}
|
||||
|
||||
#aside {float:left;margin:0 10px 0 0;width:150px}
|
||||
|
||||
#sev {margin:0 0 5px;padding:0 0 10px;border:1px solid #ecc9d6;background:#fff8fb}
|
||||
#sev h2 {position:absolute;font-size:0;line-height:0;overflow:hidden}
|
||||
#sev ul {margin:0;padding:10px 0 0;border:0;background:#fff;list-style:none}
|
||||
#sev .sev_img {display:block;border-bottom:1px solid #faedf2}
|
||||
#sev .sev_text {display:block;padding:7px 10px 5px;border-bottom:1px solid #faedf2;text-decoration:none}
|
||||
#sev .sev_text {display:block;padding:7px 10px 6px;border-bottom:1px solid #faedf2;text-decoration:none}
|
||||
#sev strong {}
|
||||
#sev_empty {padding:15px 0;text-align:center}
|
||||
|
||||
#scomm {margin:0 0 5px;padding:0 0 10px;border:1px solid #d5d5d5;background:#faf9f5}
|
||||
#scomm h2 {position:absolute;font-size:0;line-height:0;overflow:hidden}
|
||||
#scomm ul {margin:0;padding:10px 0 0;border:0;background:#fff;list-style:none}
|
||||
#scomm a {display:block;padding:7px 10px 5px;border-bottom:1px solid #f4f4f4;text-decoration:none}
|
||||
#scomm a {display:block;padding:7px 10px 6px;border-bottom:1px solid #f4f4f4;text-decoration:none}
|
||||
#scomm_empty {padding:15px 0;text-align:center}
|
||||
|
||||
#container {z-index:4;position:relative;float:left;width:740px;min-height:500px;height:auto !important;height:500px;background:#fff;zoom:1}
|
||||
|
||||
@ -8,83 +8,39 @@ $menu = ""; // 메뉴 레이어 임시저장 변수 (처음엔 아무값도 없
|
||||
$sub_menu_left = 100; // 2단계 메뉴 왼쪽 좌표 (1단계 좌표에서 부터)
|
||||
?>
|
||||
|
||||
<?php
|
||||
// 1단계 분류 판매가능한것만
|
||||
$hsql = " select ca_id, ca_name from {$g4['shop_category_table']}
|
||||
where length(ca_id) = '2'
|
||||
and ca_use = '1'
|
||||
order by ca_id ";
|
||||
$hresult = sql_query($hsql);
|
||||
$hnum = @mysql_num_rows($hresult);
|
||||
for ($i=0; $row=sql_fetch_array($hresult); $i++)
|
||||
{
|
||||
// 2단계 분류
|
||||
$menubody = "";
|
||||
$onmouseover = "";
|
||||
$onmouseout = "";
|
||||
$sql2 = " select ca_id, ca_name from {$g4['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);
|
||||
$hnum2 = @mysql_num_rows($result2);
|
||||
for ($j=0; $row2=sql_fetch_array($result2); $j++)
|
||||
{
|
||||
$menubody .= "<div><a href='".G4_SHOP_URL."/list.php?ca_id={$row2['ca_id']}'>{$row2['ca_name']}</a></div>";
|
||||
}
|
||||
|
||||
if ($menubody)
|
||||
{
|
||||
$onmouseover = " layer_view('lmenu{$i}', 'lmenu_layer{$i}', 'view', $sub_menu_left, -22); ";
|
||||
$onmouseout = " layer_view('lmenu{$i}', 'lmenu_layer{$i}', 'hide'); ";
|
||||
}
|
||||
|
||||
$category_link = "<a href='".G4_SHOP_URL."/list.php?ca_id={$row['ca_id']}'>";
|
||||
echo "<tr id='lmenu{$i}' onmouseover=\"$onmouseover\" onmouseout=\"$onmouseout\">";
|
||||
echo "<td height='22'> · $category_link{$row['ca_name']}</a>\n";
|
||||
|
||||
if ($menubody)
|
||||
{
|
||||
echo '<div id="lmenu_layer'.$i.'" style="width:180px; display:none; position:absolute; z-index:999;">';
|
||||
echo '<div>'.$menubody.'</div>';
|
||||
echo '</div>';
|
||||
}
|
||||
|
||||
echo "</td></tr>\n";
|
||||
}
|
||||
|
||||
if ($i==0)
|
||||
echo "<tr><td height=50 align=center>등록된 자료가 없습니다.</td></tr>\n";
|
||||
?>
|
||||
|
||||
<?=$menu?>
|
||||
|
||||
<script>
|
||||
var save_layer = null;
|
||||
function layer_view(link_id, menu_id, opt, x, y)
|
||||
{
|
||||
var link = document.getElementById(link_id);
|
||||
var menu = document.getElementById(menu_id);
|
||||
|
||||
//for (i in link) { document.write(i + '<br/>'); } return;
|
||||
|
||||
if (save_layer != null)
|
||||
save_layer.style.display = "none";
|
||||
|
||||
if (opt == 'hide')
|
||||
{
|
||||
menu.style.display = 'none';
|
||||
}
|
||||
else
|
||||
{
|
||||
x = parseInt(x);
|
||||
y = parseInt(y);
|
||||
menu.style.left = get_left_pos(link) + x + 'px';
|
||||
menu.style.top = get_top_pos(link) + link.offsetHeight + y + 'px';
|
||||
menu.style.display = 'block';
|
||||
}
|
||||
|
||||
save_layer = menu;
|
||||
}
|
||||
</script>
|
||||
<nav id="gnb">
|
||||
<h2>쇼핑몰 카테고리</h2>
|
||||
<ul>
|
||||
<?php
|
||||
// 1단계 분류 판매 가능한 것만
|
||||
$hsql = " select ca_id, ca_name from {$g4['shop_category_table']}
|
||||
where length(ca_id) = '2'
|
||||
and ca_use = '1'
|
||||
order by ca_id ";
|
||||
$hresult = sql_query($hsql);
|
||||
$hnum = @mysql_num_rows($hresult);
|
||||
for ($i=0; $row=sql_fetch_array($hresult); $i++)
|
||||
{
|
||||
?>
|
||||
<li class="gnb_1d_li">
|
||||
<a href="<?php echo G4_SHOP_URL.'/list.php?ca_id='.$row['ca_id']; ?>" class="gnb_1d_a"><?php echo $row['ca_name']; ?></a>
|
||||
<ul>
|
||||
<?
|
||||
// 2단계 분류 판매 가능한 것만
|
||||
$sql2 = " select ca_id, ca_name from {$g4['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);
|
||||
$hnum2 = @mysql_num_rows($result2);
|
||||
for ($j=0; $row2=sql_fetch_array($result2); $j++)
|
||||
{
|
||||
?>
|
||||
<li class="gnb_2d_li"><a href="<?php echo G4_SHOP_URL; ?>/list.php?ca_id=<?php echo $row2['ca_id']; ?>" class="gnb_2d_a"><?php echo $row2['ca_name']; ?></a></li>
|
||||
<? } ?>
|
||||
</ul>
|
||||
</li>
|
||||
<? } ?>
|
||||
</ul>
|
||||
</nav>
|
||||
|
||||
Reference in New Issue
Block a user