110 lines
3.4 KiB
PHP
110 lines
3.4 KiB
PHP
<?php
|
|
include_once('./_common.php');
|
|
|
|
$sql = " select *
|
|
from {$g4['shop_category_table']}
|
|
where ca_id = '$ca_id'
|
|
and ca_use = '1' ";
|
|
$ca = sql_fetch($sql);
|
|
if (!$ca['ca_id'])
|
|
alert('등록된 분류가 없습니다.');
|
|
|
|
if(!$is_admin) {
|
|
// 본인확인체크
|
|
if($ca['ca_hp_cert_use'] && !$member['mb_hp_certify']) {
|
|
if($is_member)
|
|
alert('회원정보 수정에서 휴대폰 본인확인 후 이용해 주십시오.');
|
|
else
|
|
alert('휴대폰 본인확인된 로그인 회원만 이용할 수 있습니다.');
|
|
}
|
|
|
|
// 성인인증체크
|
|
if($ca['ca_adult_cert_use'] && !$member['mb_adult']) {
|
|
if($is_member)
|
|
alert('휴대폰 본인확인으로 성인인증된 회원만 이용할 수 있습니다.\\n회원정보 수정에서 휴대폰 본인확인을 해주십시오.');
|
|
else
|
|
alert('휴대폰 본인확인으로 성인인증된 회원만 이용할 수 있습니다.');
|
|
}
|
|
}
|
|
|
|
$g4['title'] = $ca['ca_name'].' 상품리스트';
|
|
|
|
include_once(G4_MSHOP_PATH.'/_head.php');
|
|
|
|
// 스킨을 지정했다면 지정한 스킨을 사용함 (스킨의 다양화)
|
|
//if ($skin) $ca[ca_skin] = $skin;
|
|
|
|
if ($is_admin)
|
|
echo '<div class="sct_admin"><a href="'.G4_ADMIN_URL.'/shop_admin/categoryform.php?w=u&ca_id='.$ca_id.'" class="btn_admin">분류 관리</a></div>';
|
|
?>
|
|
|
|
<div id="sct">
|
|
|
|
<?php
|
|
$nav_ca_id = $ca_id;
|
|
include G4_MSHOP_PATH.'/navigation1.inc.php';
|
|
|
|
// 상단 HTML
|
|
echo '<div id="sct_hhtml">'.stripslashes($ca['ca_mobile_head_html']).'</div>';
|
|
|
|
// 상품 출력순서가 있다면
|
|
if ($sort != "")
|
|
$order_by = $sort.' '.$sortodr.' , it_order, it_id desc';
|
|
|
|
$error = '<p class="sct_noitem">등록된 상품이 없습니다.</p>';
|
|
|
|
// 리스트 유형별로 출력
|
|
$list_file = G4_MSHOP_SKIN_PATH.'/'.$ca['ca_mobile_skin'];
|
|
if (file_exists($list_file)) {
|
|
// 총몇개
|
|
$items = $ca['ca_mobile_list_mod'];
|
|
// 페이지가 없으면 첫 페이지 (1 페이지)
|
|
if ($page == "") $page = 1;
|
|
// 시작 레코드 구함
|
|
$from_record = ($page - 1) * $items;
|
|
|
|
$list = new item_list($ca['ca_mobile_skin'], $ca['ca_mobile_list_mod'], 1, $ca['ca_mobile_img_width'], $ca['ca_mobile_img_height']);
|
|
$list->set_category($ca['ca_id']);
|
|
$list->set_is_page(true);
|
|
$list->set_mobile(true);
|
|
$list->set_order_by($order_by);
|
|
$list->set_from_record($from_record);
|
|
echo $list->run();
|
|
|
|
// where 된 전체 상품수
|
|
$total_count = $list->total_count;
|
|
// 전체 페이지 계산
|
|
$total_page = ceil($total_count / $items);
|
|
}
|
|
else
|
|
{
|
|
$i = 0;
|
|
$error = '<p class="sct_nofile">'.$ca['ca_mobile_skin'].' 파일을 찾을 수 없습니다.<br>관리자에게 알려주시면 감사하겠습니다.</p>';
|
|
}
|
|
|
|
if ($i==0)
|
|
{
|
|
echo '<div>'.$error.'</div>';
|
|
}
|
|
?>
|
|
|
|
<?php
|
|
// 하단 HTML
|
|
echo '<div id="sct_thtml">'.stripslashes($ca['ca_mobile_tail_html']).'</div>';
|
|
?>
|
|
</div>
|
|
|
|
<?php
|
|
$qstr1 .= 'ca_id='.$ca_id;
|
|
if($skin)
|
|
$qstr1 .= '&skin='.$skin;
|
|
$qstr1 .='&ev_id='.$ev_id.'&sort='.$sort.'&sortodr='.$sortodr;
|
|
echo get_paging($config['cf_mobile_pages'], $page, $total_page, $_SERVER['PHP_SELF'].'?'.$qstr1.'&page=');
|
|
?>
|
|
|
|
<?php
|
|
include_once(G4_MSHOP_PATH.'/_tail.php');
|
|
|
|
echo "\n<!-- {$ca['ca_mobile_skin']} -->\n";
|
|
?>
|