require_once G5_SHOP_PATH . '/yc/list.php'; return; } $sql = " select * from {$g5['g5_shop_category_table']} where ca_id = '{$ca_id}' and ca_use = '1' "; $ca = sql_fetch($sql); if (!$ca['ca_id']) { alert('등록된 분류가 없습니다.'); } // 테마체크 $at = apms_ca_thema($ca_id, $ca); if (!defined('THEMA_PATH')) { include_once G5_LIB_PATH . '/apms.thema.lib.php'; } // 본인인증, 성인인증체크 if (!$is_admin) { $msg = shop_member_cert_check($ca_id, 'list'); if ($msg) { alert($msg, G5_SHOP_URL); } } // 네비게이션 $nav = array(); $len = strlen($ca_id) / 2; $n = 0; for ($i = 1; $i <= $len; $i++) { $code = substr($ca_id, 0, $i * 2); $row = sql_fetch(" select ca_name from {$g5['g5_shop_category_table']} where ca_id = '{$code}' "); $row2 = sql_fetch(" select count(*) as cnt from {$g5['g5_shop_item_table']} where (ca_id like '{$code}%' or ca_id2 like '{$code}%' or ca_id3 like '{$code}%') and it_use = '1' "); $nav[$n]['ca_id'] = $code; $nav[$n]['on'] = $ca_id === $code ? true : false; // 현재 분류와 일치체크
<?php include_once './_common.php'; $it_id = $_GET['it_id']; $io_id = $_GET['opt']; // 상품정보 $sql = " select * from {$g5['g5_shop_item_table']} where it_id = '{$it_id}' "; $it = sql_fetch($sql); if (!$it['it_id']) { alert('자료가 존재하지 않습니다.', G5_SHOP_URL); } // 본인인증, 성인인증체크 if (!$is_admin) { $msg = shop_member_cert_check($it_id, 'item'); if ($msg) { alert($msg, G5_SHOP_URL); } } if (is_soldout($it['it_id'])) { alert('재고가 부족하여 구매할 수 없습니다.', G5_SHOP_URL); } // 상품옵션체크 $sql = " select count(*) as cnt from {$g5['g5_shop_item_option_table']} where it_id = '{$it_id}' and io_type = '0' and io_use = '1' "; $cnt = sql_fetch($sql); if ($io_id && !$cnt['cnt'] || !$io_id && $cnt['cnt']) { alert('옵션정보가 변경됐습니다.\\n상세페이지에서 다시 주문해 주십시오.', G5_SHOP_URL . '/item.php?it_id=' . $it_id); } // 최소구매수량이 있으면 상세페이지에서 다시 주문토록 안내 if ($it['it_buy_min_qty'] > 1) { alert(get_text($it['it_name']) . ' 은 최소 ' . number_format($it['it_buy_min_qty']) . ' 이상 구매하셔야 합니다.\\n상세페이지에서 다시 주문해 주십시오.', G5_SHOP_URL . '/item.php?it_id=' . $it_id); }