From fde6ec18c71282b8e261cf126c727bc459f36a91 Mon Sep 17 00:00:00 2001 From: chicpro Date: Fri, 14 Jun 2013 14:04:14 +0900 Subject: [PATCH 1/5] =?UTF-8?q?=EC=BF=A0=ED=8F=B0=EB=A6=AC=EC=8A=A4?= =?UTF-8?q?=ED=8A=B8=EC=97=90=20=ED=8E=98=EC=9D=B4=EC=A7=95=20=EC=B6=94?= =?UTF-8?q?=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- adm/shop_admin/couponlist.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/adm/shop_admin/couponlist.php b/adm/shop_admin/couponlist.php index ca0a62378..834dc2585 100644 --- a/adm/shop_admin/couponlist.php +++ b/adm/shop_admin/couponlist.php @@ -178,6 +178,8 @@ $colspan = 8; + + + + \ No newline at end of file diff --git a/adm/shop_admin/sendcostupdate.php b/adm/shop_admin/sendcostupdate.php new file mode 100644 index 000000000..37f381dd6 --- /dev/null +++ b/adm/shop_admin/sendcostupdate.php @@ -0,0 +1,45 @@ + \ No newline at end of file diff --git a/adm/shop_admin/sendcostzipcode.php b/adm/shop_admin/sendcostzipcode.php new file mode 100644 index 000000000..0f61c69e0 --- /dev/null +++ b/adm/shop_admin/sendcostzipcode.php @@ -0,0 +1,117 @@ +'.$value.' '.PHP_EOL; + } + } +} + +$g4['title'] = "우편번호 찾기"; +include_once(G4_PATH.'/head.sub.php'); +?> + + +
+
+ + + + + + + + + + + +
우편번호 찾기
주소지의 시/군을 입력하세요.
+ + + +
+
+ + +

검색결과

+

+ +

검색된 결과가 없습니다.

+ +
+ + + + \ No newline at end of file diff --git a/extend/shop.extend2.php b/extend/shop.extend2.php index cb3310c15..283581073 100644 --- a/extend/shop.extend2.php +++ b/extend/shop.extend2.php @@ -312,4 +312,20 @@ if(!$result) { ADD `od_receipt_amount` INT(11) NOT NULL DEFAULT '0' AFTER `od_temp_point`, ADD `od_receipt_time` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00' AFTER `od_bank_account` ", false); } + +// 추가배송비 테이블 +$sql = " select sc_id from {$g4['shop_sendcost_table']} limit 1 "; +$result = sql_query($sql, false); +if(!$result) { + sql_query(" CREATE TABLE IF NOT EXISTS `{$g4['shop_sendcost_table']}` ( + `sc_id` INT(11) NOT NULL AUTO_INCREMENT, + `sc_name` VARCHAR(255) NOT NULL DEFAULT '', + `sc_zip1` VARCHAR(10) NOT NULL DEFAULT '', + `sc_zip2` VARCHAR(10) NOT NULL DEFAULT '', + `sc_amount` INT(11) NOT NULL DEFAULT '0', + PRIMARY KEY (`sc_id`), + KEY `sc_zip1` (`sc_zip1`), + KEY `sc_zip2` (`sc_zip2`) + )", true); +} ?> \ No newline at end of file diff --git a/install/install_db.php b/install/install_db.php index 3e05de7b8..4ee642499 100644 --- a/install/install_db.php +++ b/install/install_db.php @@ -494,6 +494,7 @@ if($shop_install) { fwrite($f, "\$g4['shop_wish_table'] = SHOP_TABLE_PREFIX.'wish'; // 보관함(위시리스트) 테이블\n"); fwrite($f, "\$g4['shop_mileage_table'] = SHOP_TABLE_PREFIX.'mileage'; // 마일리지 테이블\n"); fwrite($f, "\$g4['shop_coupon_table'] = SHOP_TABLE_PREFIX.'coupon'; // 쿠폰정보 테이블\n"); + fwrite($f, "\$g4['shop_sendcost_table'] = SHOP_TABLE_PREFIX.'sendcost'; // 추가배송비 테이블\n"); fwrite($f, "?>"); } diff --git a/install/shop.sql b/install/shop.sql index d348aae01..2271aa7ae 100644 --- a/install/shop.sql +++ b/install/shop.sql @@ -652,6 +652,26 @@ CREATE TABLE IF NOT EXISTS `shop_mileage` ( KEY `mb_id` (`mb_id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; +-- -------------------------------------------------------- + +-- +-- Table structure for table `shop_sendcost` +-- + +DROP TABLE IF EXISTS `shop_sendcost`; +CREATE TABLE IF NOT EXISTS `shop_sendcost` ( + `sc_id` INT(11) NOT NULL AUTO_INCREMENT, + `sc_name` VARCHAR(255) NOT NULL DEFAULT '', + `sc_zip1` VARCHAR(10) NOT NULL DEFAULT '', + `sc_zip2` VARCHAR(10) NOT NULL DEFAULT '', + `sc_amount` INT(11) NOT NULL DEFAULT '0', + PRIMARY KEY (`sc_id`), + KEY `sc_zip1` (`sc_zip1`), + KEY `sc_zip2` (`sc_zip2`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +-- -------------------------------------------------------- + -- -- Table structure for table `shop_wish` -- From 7dbff272b43ac66b6c5151214e67e54138edfb7c Mon Sep 17 00:00:00 2001 From: gnuboard Date: Fri, 14 Jun 2013 16:56:34 +0900 Subject: [PATCH 5/5] =?UTF-8?q?=EC=82=AC=EC=9A=A9=ED=9B=84=EA=B8=B0=20?= =?UTF-8?q?=EA=B4=80=EB=A0=A8=EB=90=9C=20=EC=BD=94=EB=93=9C=20=EB=B3=80?= =?UTF-8?q?=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- adm/admin.head.php | 2 +- adm/admin.menu400.shop_1of2.php | 2 +- adm/shop_admin/configform.php | 8 +- adm/shop_admin/configformupdate.php | 2 +- adm/shop_admin/index.php | 6 +- adm/shop_admin/itemdelete.inc.php | 2 +- adm/shop_admin/itemform.php | 2 +- adm/shop_admin/itemuseform.php | 96 ++++++++++++ adm/shop_admin/itemuseformupdate.php | 29 ++++ adm/shop_admin/itemuselist.php | 221 +++++++++++++++++++++++++++ adm/shop_admin/itemuselistupdate.php | 39 +++++ css/admin.css | 4 +- extend/shop.extend2.php | 2 +- install/install_db.php | 4 +- install/shop.sql | 8 +- lib/shop.lib.php | 2 +- mobile/shop/itemuse.inc.php | 2 +- shop/item.php | 23 ++- shop/itemuse.php | 58 +++---- shop/itemuseform.php | 107 +++++++++++++ shop/itemuseformupdate.php | 67 ++++++++ shop/itemuselist.php | 76 +++++++-- shop/itemuseupdate.php | 20 +-- 23 files changed, 700 insertions(+), 82 deletions(-) create mode 100644 adm/shop_admin/itemuseform.php create mode 100644 adm/shop_admin/itemuseformupdate.php create mode 100644 adm/shop_admin/itemuselist.php create mode 100644 adm/shop_admin/itemuselistupdate.php create mode 100644 shop/itemuseform.php create mode 100644 shop/itemuseformupdate.php diff --git a/adm/admin.head.php b/adm/admin.head.php index fb3b2096e..e2d25a1e9 100644 --- a/adm/admin.head.php +++ b/adm/admin.head.php @@ -136,7 +136,7 @@ function imageview(id, w, h)
  • - + 사용후기 diff --git a/adm/admin.menu400.shop_1of2.php b/adm/admin.menu400.shop_1of2.php index 007291aa1..e665564de 100644 --- a/adm/admin.menu400.shop_1of2.php +++ b/adm/admin.menu400.shop_1of2.php @@ -10,7 +10,7 @@ $menu['menu400'] = array ( array('400200', '분류관리', G4_ADMIN_URL.'/shop_admin/categorylist.php', 'scf_cate'), array('400300', '상품관리', G4_ADMIN_URL.'/shop_admin/itemlist.php', 'scf_item'), array('400660', '상품문의', G4_ADMIN_URL.'/shop_admin/itemqalist.php', 'scf_item_qna'), - array('400650', '사용후기', G4_ADMIN_URL.'/shop_admin/itempslist.php', 'scf_ps'), + array('400650', '사용후기', G4_ADMIN_URL.'/shop_admin/itemuselist.php', 'scf_ps'), array('400620', '상품재고관리', G4_ADMIN_URL.'/shop_admin/itemstocklist.php', 'scf_item_stock'), array('400610', '상품유형관리', G4_ADMIN_URL.'/shop_admin/itemtypelist.php', 'scf_item_type'), array('400500', '상품옵션재고관리', G4_ADMIN_URL.'/shop_admin/optionstocklist.php', 'scf_item_option'), diff --git a/adm/shop_admin/configform.php b/adm/shop_admin/configform.php index be2879968..8ff303a84 100644 --- a/adm/shop_admin/configform.php +++ b/adm/shop_admin/configform.php @@ -754,12 +754,12 @@ $pg_anchor = '
      - + - + + diff --git a/adm/shop_admin/configformupdate.php b/adm/shop_admin/configformupdate.php index 1c6b05bc8..ba9084755 100644 --- a/adm/shop_admin/configformupdate.php +++ b/adm/shop_admin/configformupdate.php @@ -133,7 +133,7 @@ $sql = " update {$g4['shop_default_table']} de_sms_use4 = '$de_sms_use4', de_sms_use5 = '$de_sms_use5', de_sms_hp = '$de_sms_hp', - de_item_ps_use = '$de_item_ps_use', + de_item_use_use = '$de_item_use_use', de_code_dup_use = '$de_code_dup_use', de_cart_keep_term = '$de_cart_keep_term', de_guest_cart_use = '$de_guest_cart_use', diff --git a/adm/shop_admin/index.php b/adm/shop_admin/index.php index f320b3f12..162d341f5 100644 --- a/adm/shop_admin/index.php +++ b/adm/shop_admin/index.php @@ -160,7 +160,7 @@ $pg_anchor = '
        - <?php cut_str($row['is_subject'],40); ?> 수정 + <?php cut_str($row['is_subject'],40); ?> 수정 diff --git a/adm/shop_admin/itemdelete.inc.php b/adm/shop_admin/itemdelete.inc.php index 965372c49..514d103e2 100644 --- a/adm/shop_admin/itemdelete.inc.php +++ b/adm/shop_admin/itemdelete.inc.php @@ -49,7 +49,7 @@ if (!function_exists("itemdelete")) { sql_query($sql); // 사용후기삭제 - $sql = " delete from {$g4['shop_item_ps_table']} where it_id = '$it_id' "; + $sql = " delete from {$g4['shop_item_use_table']} where it_id = '$it_id' "; sql_query($sql); // 상품문의삭제 diff --git a/adm/shop_admin/itemform.php b/adm/shop_admin/itemform.php index 2e99c633a..8047a0476 100644 --- a/adm/shop_admin/itemform.php +++ b/adm/shop_admin/itemform.php @@ -201,7 +201,7 @@ $pg_anchor ='
          상품확인 - 사용후기 + 사용후기 상품문의 diff --git a/adm/shop_admin/itemuseform.php b/adm/shop_admin/itemuseform.php new file mode 100644 index 000000000..cea759926 --- /dev/null +++ b/adm/shop_admin/itemuseform.php @@ -0,0 +1,96 @@ + + +
          + + + + + + + +
          +

          사용후기 수정

          + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
          상품명
          이름
          점수
          '>
          내용
          확인 + > + + > + +
          +
          + +
          + + 목록 +
          +
          + + + + diff --git a/adm/shop_admin/itemuseformupdate.php b/adm/shop_admin/itemuseformupdate.php new file mode 100644 index 000000000..10e68a548 --- /dev/null +++ b/adm/shop_admin/itemuseformupdate.php @@ -0,0 +1,29 @@ + diff --git a/adm/shop_admin/itemuselist.php b/adm/shop_admin/itemuselist.php new file mode 100644 index 000000000..9233f7d89 --- /dev/null +++ b/adm/shop_admin/itemuselist.php @@ -0,0 +1,221 @@ +전체목록'; +?> + +
          + + + +
          + 사용후기 검색 + + + + 전체 후기내역 건 + + + + + + + + + + + + + + +
          + +
          + +
          +

          사용후기 목록

          + +
            +
          • 상품명
          • +
          • 이름
          • +
          • 제목
          • +
          • 점수
          • +
          • 확인
          • +
          + +
          + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + '; + } + ?> + +
          + + + 상품명이름제목점수확인관리
          + + + + + + + value="1"> + 수정 +
          자료가 없습니다.
          + +
          + + +
          +
          + +
          + + + + + + diff --git a/adm/shop_admin/itemuselistupdate.php b/adm/shop_admin/itemuselistupdate.php new file mode 100644 index 000000000..c7c22e1d2 --- /dev/null +++ b/adm/shop_admin/itemuselistupdate.php @@ -0,0 +1,39 @@ + diff --git a/css/admin.css b/css/admin.css index 96047cdc7..d82001138 100644 --- a/css/admin.css +++ b/css/admin.css @@ -232,8 +232,8 @@ strong.sodr_nonpay {display:block;padding:5px 0;text-align:right} .sit_qa_answer {width:30px;text-align:center} /* 사용후기 */ -.sit_ps_subject {width:290px} -.sit_ps_confirm {width:30px;text-align:center} +.sit_use_subject {width:290px} +.sit_use_confirm {width:30px;text-align:center} /* 상품옵션재고관리 */ .sit_stock_qty_alert {color:#ff1133;font-weight:bold} diff --git a/extend/shop.extend2.php b/extend/shop.extend2.php index cb3310c15..63dc64402 100644 --- a/extend/shop.extend2.php +++ b/extend/shop.extend2.php @@ -142,7 +142,7 @@ if(intval(preg_replace("/[^0-9]/", "", $row['Type'])) != 20) { sql_query(" ALTER TABLE `{$g4['shop_item_table']}` MODIFY COLUMN it_id VARCHAR(20) NOT NULL DEFAULT '' ", false); sql_query(" ALTER TABLE `{$g4['shop_cart_table']}` MODIFY COLUMN it_id VARCHAR(20) NOT NULL DEFAULT '' ", false); sql_query(" ALTER TABLE `{$g4['shop_item_qa_table']}` MODIFY COLUMN it_id VARCHAR(20) NOT NULL DEFAULT '' ", false); - sql_query(" ALTER TABLE `{$g4['shop_item_ps_table']}` MODIFY COLUMN it_id VARCHAR(20) NOT NULL DEFAULT '' ", false); + sql_query(" ALTER TABLE `{$g4['shop_item_use_table']}` MODIFY COLUMN it_id VARCHAR(20) NOT NULL DEFAULT '' ", false); sql_query(" ALTER TABLE `{$g4['shop_item_relation_table']}` MODIFY COLUMN it_id VARCHAR(20) NOT NULL DEFAULT '' ", false); sql_query(" ALTER TABLE `{$g4['shop_item_relation_table']}` MODIFY COLUMN it_id2 VARCHAR(20) NOT NULL DEFAULT '' ", false); sql_query(" ALTER TABLE `{$g4['shop_event_item_table']}` MODIFY COLUMN it_id VARCHAR(20) NOT NULL DEFAULT '' ", false); diff --git a/install/install_db.php b/install/install_db.php index 3e05de7b8..55b04cf26 100644 --- a/install/install_db.php +++ b/install/install_db.php @@ -284,7 +284,7 @@ if($shop_install) { de_simg_height = '$simg_height', de_mimg_width = '$mimg_width', de_mimg_height = '$mimg_height', - de_item_ps_use = '1', + de_item_use_use = '1', de_level_sell = '1', de_code_dup_use = '1', de_sms_cont1 = '{이름}님의 회원가입을 축하드립니다.\nID:{회원아이디}\n{회사명}', @@ -485,7 +485,7 @@ if($shop_install) { fwrite($f, "\$g4['shop_faq_master_table'] = SHOP_TABLE_PREFIX.'faq_master'; // 자주하시는 질문 마스터 테이블\n"); fwrite($f, "\$g4['shop_item_table'] = SHOP_TABLE_PREFIX.'item'; // 상품 테이블\n"); fwrite($f, "\$g4['shop_item_option_table'] = SHOP_TABLE_PREFIX.'item_option'; // 상품옵션 테이블\n"); - fwrite($f, "\$g4['shop_item_ps_table'] = SHOP_TABLE_PREFIX.'item_ps'; // 상품 사용후기 테이블\n"); + fwrite($f, "\$g4['shop_item_use_table'] = SHOP_TABLE_PREFIX.'item_use'; // 상품 사용후기 테이블\n"); fwrite($f, "\$g4['shop_item_qa_table'] = SHOP_TABLE_PREFIX.'item_qa'; // 상품 질문답변 테이블\n"); fwrite($f, "\$g4['shop_item_relation_table'] = SHOP_TABLE_PREFIX.'item_relation'; // 관련 상품 테이블\n"); fwrite($f, "\$g4['shop_new_win_table'] = SHOP_TABLE_PREFIX.'new_win'; // 새창 테이블\n"); diff --git a/install/shop.sql b/install/shop.sql index d348aae01..69354054f 100644 --- a/install/shop.sql +++ b/install/shop.sql @@ -280,7 +280,7 @@ CREATE TABLE IF NOT EXISTS `shop_default` ( `de_sms_hp` varchar(255) NOT NULL DEFAULT '', `de_kcp_mid` varchar(255) NOT NULL DEFAULT '', `de_iche_use` tinyint(4) NOT NULL DEFAULT '0', - `de_item_ps_use` tinyint(4) NOT NULL DEFAULT '0', + `de_item_use_use` tinyint(4) NOT NULL DEFAULT '0', `de_code_dup_use` tinyint(4) NOT NULL DEFAULT '0', `de_cart_keep_term` int(11) NOT NULL DEFAULT '0', `de_guest_cart_use` tinyint(4) NOT NULL DEFAULT '0', @@ -475,11 +475,11 @@ CREATE TABLE IF NOT EXISTS `shop_item_option` ( -- -------------------------------------------------------- -- --- Table structure for table `shop_item_ps` +-- Table structure for table `shop_item_use` -- -DROP TABLE IF EXISTS `shop_item_ps`; -CREATE TABLE IF NOT EXISTS `shop_item_ps` ( +DROP TABLE IF EXISTS `shop_item_use`; +CREATE TABLE IF NOT EXISTS `shop_item_use` ( `is_id` int(11) NOT NULL AUTO_INCREMENT, `it_id` varchar(20) NOT NULL DEFAULT '0', `mb_id` varchar(20) NOT NULL DEFAULT '', diff --git a/lib/shop.lib.php b/lib/shop.lib.php index ef0a18ede..18c8211c7 100644 --- a/lib/shop.lib.php +++ b/lib/shop.lib.php @@ -448,7 +448,7 @@ function get_star_image($it_id) { global $g4; - $sql = "select (SUM(is_score) / COUNT(*)) as score from {$g4['shop_item_ps_table']} where it_id = '$it_id' "; + $sql = "select (SUM(is_score) / COUNT(*)) as score from {$g4['shop_item_use_table']} where it_id = '$it_id' "; $row = sql_fetch($sql); return (int)get_star($row['score']); diff --git a/mobile/shop/itemuse.inc.php b/mobile/shop/itemuse.inc.php index b3bf0ce40..ee3ef4c50 100644 --- a/mobile/shop/itemuse.inc.php +++ b/mobile/shop/itemuse.inc.php @@ -14,7 +14,7 @@ include_once(G4_LIB_PATH.'/thumb.lib.php'); @@ -659,9 +670,9 @@ else return false; }); - $(".item_use_count").text(""); - $(".item_qa_count").text(""); - $(".item_relation_count").text(""); + //$(".item_use_count").text(""); + //$(".item_qa_count").text(""); + //$(".item_relation_count").text(""); }); // 바로구매 또는 장바구니 담기 diff --git a/shop/itemuse.php b/shop/itemuse.php index e47595cfc..ce7fa8bc8 100644 --- a/shop/itemuse.php +++ b/shop/itemuse.php @@ -4,8 +4,8 @@ include_once(G4_LIB_PATH.'/thumbnail.lib.php'); $it_id = $_REQUEST['it_id']; -$itemuse_write = G4_BBS_URL.'/write.php?bo_table=itemuse&wr_1='.$it_id; -$itemuse_board = G4_BBS_URL.'/board.php?bo_table=itemuse&wr_1='.$it_id; +$itemuse_form = "./itemuseform.php?it_id=".$it_id; +$itemuse_list = "./itemuselist.php"; include_once(G4_PATH.'/head.sub.php'); ?> @@ -30,7 +30,7 @@ include_once(G4_PATH.'/head.sub.php'); wr_4 : 관리자확인 */ //$sql_common = " from `{$g4['write_prefix']}itemuse` where wr_is_comment = 0 and wr_1 = '{$it['it_id']}' and wr_4 = '1' "; -$sql_common = " from `{$g4['write_prefix']}itemuse` where wr_is_comment = 0 and wr_1 = '{$it_id}' "; +$sql_common = " from `{$g4['shop_item_use_table']}` where it_id = '{$it_id}' and is_confirm = '1' "; // 테이블의 전체 레코드수만 얻음 $sql = " select COUNT(*) as cnt " . $sql_common; @@ -42,34 +42,34 @@ $total_page = ceil($total_count / $rows); // 전체 페이지 계산 if ($page == "") $page = 1; // 페이지가 없으면 첫 페이지 (1 페이지) $from_record = ($page - 1) * $rows; // 시작 레코드 구함 -$sql = "select * $sql_common order by wr_num limit $from_record, $rows "; +$sql = "select * $sql_common order by is_id desc limit $from_record, $rows "; $result = sql_query($sql); for ($i=0; $row=sql_fetch_array($result); $i++) { - $use_num = $total_count - ($page - 1) * $rows - $i; - $use_star = get_star($row['wr_3']); - $use_name = get_text($row['wr_name']); - $use_subject = conv_subject($row['wr_subject'],50,"…"); - //$use_content = ($row['wr_content']); - $use_content = get_view_thumbnail($row['wr_content'], 300); - $use_time = substr($row['wr_datetime'], 2, 8); - $use_href = G4_BBS_URL.'/board.php?bo_table=itemuse&wr_id='.$row['wr_id']; + $is_num = $total_count - ($page - 1) * $rows - $i; + $is_star = get_star($row['is_score']); + $is_name = get_text($row['is_name']); + $is_subject = conv_subject($row['is_subject'],50,"…"); + //$is_content = ($row['wr_content']); + $is_content = get_view_thumbnail($row['is_content'], 300); + $is_time = substr($row['is_time'], 2, 8); + $is_href = './itemuselist.php?bo_table=itemuse&wr_id='.$row['wr_id']; // http://stackoverflow.com/questions/6967081/show-hide-multiple-divs-with-jquery?answertab=votes#tab-top ?> - + - + - - - 별<?php echo $use_star; ?>개 + + + 별<?php echo $is_star; ?>개 - 사용후기 쓰기 새 창 - 더보기 + 사용후기 쓰기 새 창 + 더보기 + + \ No newline at end of file diff --git a/shop/itemuseformupdate.php b/shop/itemuseformupdate.php new file mode 100644 index 000000000..b5f71ecf4 --- /dev/null +++ b/shop/itemuseformupdate.php @@ -0,0 +1,67 @@ + \ No newline at end of file diff --git a/shop/itemuselist.php b/shop/itemuselist.php index 402d229eb..ff44347ce 100644 --- a/shop/itemuselist.php +++ b/shop/itemuselist.php @@ -2,11 +2,42 @@ include_once('./_common.php'); include_once(G4_LIB_PATH.'/thumb.lib.php'); +$sfl = escape_trim($_REQUEST['sfl']); +$stx = escape_trim($_REQUEST['stx']); + $g4['title'] = '사용후기'; include_once('./_head.php'); -$sql_common = " from {$g4['shop_item_ps_table']} where is_confirm = '1' "; -$sql_order = " order by is_time desc "; +$sql_common = " from `{$g4['shop_item_use_table']}` a join `{$g4['shop_item_table']}` b on (a.it_id=b.it_id) "; +$sql_search = " where a.is_confirm = '1' "; + +if ($stx) { + $sql_search .= " and ( "; + switch ($sfl) { + case "a.it_id" : + $sql_search .= " ($sfl like '$stx%') "; + break; + case "a.is_name" : + case "a.mb_id" : + $sql_search .= " ($sfl = '$stx') "; + break; + default : + $sql_search .= " ($sfl like '%$stx%') "; + break; + } + $sql_search .= " ) "; +} + +if (!$sst) { + $sst = "a.is_id"; + $sod = "desc"; +} +$sql_order = " order by $sst $sod "; + +/* +$sql_common = " from {$g4['shop_item_use_table']} where is_confirm = '1' "; +$sql_order = " order by is_id desc "; +*/ $sql = " select count(*) as cnt $sql_common @@ -21,9 +52,25 @@ if ($page == "") { $page = 1; } // 페이지가 없으면 첫 페이지 (1 페 $from_record = ($page - 1) * $rows; // 시작 열을 구함 ?> +전체보기 + +
          + + + +
          +
          -

          전체 사용후기 목록입니다.

          + run($row['is_content']); + $is_content = get_view_thumbnail($row['is_content'], 500); $is_time = substr($row['is_time'], 2, 14); $small_image = $row['it_id']; @@ -68,11 +114,11 @@ $from_record = ($page - 1) * $rows; // 시작 열을 구함
          별<?php echo $star; ?>개
          -

          +

          -
          +
          @@ -89,15 +135,15 @@ $from_record = ($page - 1) * $rows; // 시작 열을 구함 diff --git a/shop/itemuseupdate.php b/shop/itemuseupdate.php index cafe963cf..b75839253 100644 --- a/shop/itemuseupdate.php +++ b/shop/itemuseupdate.php @@ -45,18 +45,18 @@ $url = "./item.php?it_id=$it_id"; if ($w == '') { - $sql = " select max(is_id) as max_is_id from {$g4['shop_item_ps_table']} "; + $sql = " select max(is_id) as max_is_id from {$g4['shop_item_use_table']} "; $row = sql_fetch($sql); $max_is_id = $row['max_is_id']; - $sql = " select max(is_id) as max_is_id from {$g4['shop_item_ps_table']} + $sql = " select max(is_id) as max_is_id from {$g4['shop_item_use_table']} where it_id = '$it_id' and mb_id = '{$member['mb_id']}' "; $row = sql_fetch($sql); if ($row['max_is_id'] && $row['max_is_id'] == $max_is_id) alert("같은 상품에 대하여 계속해서 평가하실 수 없습니다."); - $sql = "insert {$g4['shop_item_ps_table']} + $sql = "insert {$g4['shop_item_use_table']} set it_id = '$it_id', mb_id = '{$member['mb_id']}', is_score = '$is_score', @@ -66,23 +66,23 @@ if ($w == '') is_content = '$is_content', is_time = '".G4_TIME_YMDHIS."', is_ip = '{$_SERVER['REMOTE_ADDR']}' "; - if (!$default['de_item_ps_use']) + if (!$default['de_item_use_use']) $sql .= ", is_confirm = '1' "; sql_query($sql); - if ($default['de_item_ps_use']) + if ($default['de_item_use_use']) alert("평가하신 글은 관리자가 확인한 후에 표시됩니다.", $url); else goto_url($url); } else if ($w == 'u') { - $sql = " select is_password from {$g4['shop_item_ps_table']} where is_id = '$is_id' "; + $sql = " select is_password from {$g4['shop_item_use_table']} where is_id = '$is_id' "; $row = sql_fetch($sql); if ($row['is_password'] != $is_password) alert("패스워드가 틀리므로 수정하실 수 없습니다."); - $sql = " update {$g4['shop_item_ps_table']} + $sql = " update {$g4['shop_item_use_table']} set is_subject = '$is_subject', is_content = '$is_content', is_score = '$is_score' @@ -95,7 +95,7 @@ else if ($w == 'd') { if ($is_member) { - $sql = " select count(*) as cnt from {$g4['shop_item_ps_table']} where mb_id = '{$member['mb_id']}' and is_id = '$is_id' "; + $sql = " select count(*) as cnt from {$g4['shop_item_use_table']} where mb_id = '{$member['mb_id']}' and is_id = '$is_id' "; $row = sql_fetch($sql); if (!$row['cnt']) alert("자신의 사용후기만 삭제하실 수 있습니다."); @@ -104,13 +104,13 @@ else if ($w == 'd') { $is_password = sql_password($is_password); - $sql = " select is_password from {$g4['shop_item_ps_table']} where is_id = '$is_id' "; + $sql = " select is_password from {$g4['shop_item_use_table']} where is_id = '$is_id' "; $row = sql_fetch($sql); if ($row['is_password'] != $is_password) alert("패스워드가 틀리므로 삭제하실 수 없습니다."); } - $sql = " delete from {$g4['shop_item_ps_table']} where mb_id = '{$member['mb_id']}' and is_id = '$is_id' "; + $sql = " delete from {$g4['shop_item_use_table']} where mb_id = '{$member['mb_id']}' and is_id = '$is_id' "; sql_query($sql); goto_url($url);