#173 에 따른 카테고리 팝업페이지 추가

This commit is contained in:
chicpro
2013-05-09 15:16:02 +09:00
parent e758ddfc01
commit 7b51dbdb30
3 changed files with 72 additions and 0 deletions

58
mobile/shop/category.php Normal file
View File

@ -0,0 +1,58 @@
<?php
include_once('./_common.php');
$g4['title'] = '카테고리';
include_once(G4_PATH.'/head.sub.php');
$ca = $_GET['ca'];
if($ca) {
$ca_len = strlen($ca) + 2;
$sql_where = " where ca_id like '$ca%' and length(ca_id) = $ca_len ";
} else {
$sql_where = " where length(ca_id) = '2' ";
}
$sql = " select ca_id, ca_name from {$g4['shop_category_table']}
$sql_where
and ca_use = '1'
order by ca_id ";
$result = sql_query($hsql);
?>
<?php
for($i=0; $row=sql_fetch_array($result); $i++) {
if($i == 0)
echo '<ul>';
$ca_href = G4_SHOP_URL.'/category.php?ca='.$row['ca_id'];
$list_href = G4_SHOP_URL.'/list.php?ca_id='.$row['ca_id'];
?>
<li>
<span><a href="<?php echo $ca_href; ?>"><?php echo $row['ca_name']; ?></a></span>
<span><a href="<?php echo $list_href; ?>" class="ca_list_view">상품보기</a></span>
</li>
<?php
}
if($i > 0)
echo '</ul>';
if($i ==0) {
echo '<p>분류가 존재하지 않습니다.</p>';
}
?>
<script>
$(function() {
$(".ca_list_view").click(function() {
window.opener.location = $(this).attr("href");
window.close();
return false;
});
});
</script>
<?php
include_once(G4_PATH.'/tail.sub.php');
?>

View File

@ -1,6 +1,11 @@
<?php
include_once('./_common.php');
if (G4_IS_MOBILE) {
include_once(G4_MSHOP_PATH.'/cart.php');
return;
}
$g4['title'] = '장바구니';
include_once('./_head.php');
?>

9
shop/category.php Normal file
View File

@ -0,0 +1,9 @@
<?php
include_once('./_common.php');
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>θ<EFBFBD> ī<>װ<EFBFBD><D7B0><EFBFBD> <20><><EFBFBD>ýÿ<C3BD><C3BF><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
if (G4_IS_MOBILE) {
include_once(G4_MSHOP_PATH.'/category.php');
return;
}
?>