From 0f4f83be99b9b132206239d663ad72e8404d624c Mon Sep 17 00:00:00 2001 From: chicpro Date: Thu, 2 May 2013 09:50:28 +0900 Subject: [PATCH] =?UTF-8?q?=EC=83=81=ED=92=88=EC=9D=B4=20=EC=A1=B4?= =?UTF-8?q?=EC=9E=AC=ED=95=A0=20=EB=95=8C=EB=A7=8C=20=EC=98=A4=EB=8A=98=20?= =?UTF-8?q?=EB=B3=B8=20=EC=83=81=ED=92=88=20=EC=A0=80=EC=9E=A5=EB=90=98?= =?UTF-8?q?=EB=8F=84=EB=A1=9D=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- shop/item.php | 44 ++++++++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/shop/item.php b/shop/item.php index 7807eda45..1a85bc9e6 100644 --- a/shop/item.php +++ b/shop/item.php @@ -13,6 +13,28 @@ $rand = rand(4, 6); $norobot_key = substr($token, 0, $rand); set_session('ss_norobot_key', $norobot_key); +// 분류사용, 상품사용하는 상품의 정보를 얻음 +$sql = " select a.*, + b.ca_name, + b.ca_use + from {$g4['shop_item_table']} a, + {$g4['shop_category_table']} b + where a.it_id = '$it_id' + and a.ca_id = b.ca_id "; +$it = sql_fetch($sql); +if (!$it['it_id']) + alert("자료가 없습니다."); +if (!($it['ca_use'] && $it['it_use'])) { + if (!$is_admin) + alert("판매가능한 상품이 아닙니다."); +} + +// 분류 테이블에서 분류 상단, 하단 코드를 얻음 +$sql = " select ca_include_head, ca_include_tail + from {$g4['shop_category_table']} + where ca_id = '{$it['ca_id']}' "; +$ca = sql_fetch($sql); + // 오늘 본 상품 저장 시작 // tv 는 today view 약자 $saved = false; @@ -39,28 +61,6 @@ if ($_COOKIE['ck_it_id'] != $it_id) { set_cookie("ck_it_id", $it_id, time() + 3600); // 1시간동안 저장 } -// 분류사용, 상품사용하는 상품의 정보를 얻음 -$sql = " select a.*, - b.ca_name, - b.ca_use - from {$g4['shop_item_table']} a, - {$g4['shop_category_table']} b - where a.it_id = '$it_id' - and a.ca_id = b.ca_id "; -$it = sql_fetch($sql); -if (!$it['it_id']) - alert("자료가 없습니다."); -if (!($it['ca_use'] && $it['it_use'])) { - if (!$is_admin) - alert("판매가능한 상품이 아닙니다."); -} - -// 분류 테이블에서 분류 상단, 하단 코드를 얻음 -$sql = " select ca_include_head, ca_include_tail - from {$g4['shop_category_table']} - where ca_id = '{$it['ca_id']}' "; -$ca = sql_fetch($sql); - $g4['title'] = $it['it_name'].' 상세보기 > '.$it['ca_name']; // 분류 상단 코드가 있으면 출력하고 없으면 기본 상단 코드 출력