From 1ce92faa6fa43baf826af37d4a1520e3e6936720 Mon Sep 17 00:00:00 2001 From: chicpro Date: Thu, 28 Nov 2013 16:15:01 +0900 Subject: [PATCH 1/8] =?UTF-8?q?=EC=87=BC=ED=95=91=EB=AA=B0=20=EC=84=A4?= =?UTF-8?q?=EC=B9=98=EC=8B=9C=20dbconfig=20=ED=8C=8C=EC=9D=BC=EC=97=90=20?= =?UTF-8?q?=EA=B3=B5=EB=B0=B1=20=EC=83=9D=EA=B8=B0=EC=A7=80=20=EC=95=8A?= =?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 --- install/install_db.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/install_db.php b/install/install_db.php index ac63769dc..7bce38140 100644 --- a/install/install_db.php +++ b/install/install_db.php @@ -473,7 +473,7 @@ fwrite($f, "\$g5['qa_content_table'] = G5_TABLE_PREFIX.'qa_content'; // 1:1문 fwrite($f, "?>"); if($g5_shop_install) { - fwrite($f, "\n\n Date: Thu, 28 Nov 2013 16:20:28 +0900 Subject: [PATCH 2/8] =?UTF-8?q?dbconfig=20=ED=8C=8C=EC=9D=BC=20=EC=83=9D?= =?UTF-8?q?=EC=84=B1=20=EC=BD=94=EB=93=9C=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- install/install_db.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/install/install_db.php b/install/install_db.php index 7bce38140..1543be4e0 100644 --- a/install/install_db.php +++ b/install/install_db.php @@ -470,10 +470,9 @@ fwrite($f, "\$g5['autosave_table'] = G5_TABLE_PREFIX.'autosave'; // 게시글 fwrite($f, "\$g5['cert_history_table'] = G5_TABLE_PREFIX.'cert_history'; // 인증내역 테이블\n"); fwrite($f, "\$g5['qa_config_table'] = G5_TABLE_PREFIX.'qa_config'; // 1:1문의 설정테이블\n"); fwrite($f, "\$g5['qa_content_table'] = G5_TABLE_PREFIX.'qa_content'; // 1:1문의 테이블\n"); -fwrite($f, "?>"); if($g5_shop_install) { - fwrite($f, "\n"); } +fwrite($f, "?>"); + fclose($f); @chmod($file, G5_FILE_PERMISSION); ?> From 603262c47ac5763f27b93bd03fe3cbea47ba8bfe Mon Sep 17 00:00:00 2001 From: chicpro Date: Thu, 28 Nov 2013 16:27:13 +0900 Subject: [PATCH 3/8] =?UTF-8?q?dbconfig=20=ED=8C=8C=EC=9D=BC=20=EC=83=9D?= =?UTF-8?q?=EC=84=B1=20=EC=BD=94=EB=93=9C=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- install/install_db.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/install_db.php b/install/install_db.php index 1543be4e0..4eec743aa 100644 --- a/install/install_db.php +++ b/install/install_db.php @@ -472,7 +472,7 @@ fwrite($f, "\$g5['qa_config_table'] = G5_TABLE_PREFIX.'qa_config'; // 1:1문의 fwrite($f, "\$g5['qa_content_table'] = G5_TABLE_PREFIX.'qa_content'; // 1:1문의 테이블\n"); if($g5_shop_install) { - fwrite($f, "\n\n"); + fwrite($f, "\n"); fwrite($f, "define('G5_USE_SHOP', true);\n\n"); fwrite($f, "define('G5_SHOP_TABLE_PREFIX', '{$g5_shop_prefix}');\n\n"); fwrite($f, "\$g5['g5_shop_default_table'] = G5_SHOP_TABLE_PREFIX.'default'; // 쇼핑몰설정 테이블\n"); From 627ccfdb9c10dc1c3abb897845f035f9b1ae5b84 Mon Sep 17 00:00:00 2001 From: whitedot Date: Thu, 28 Nov 2013 16:51:16 +0900 Subject: [PATCH 4/8] =?UTF-8?q?=EA=B3=B5=ED=86=B5:=20empty=5Flist=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- css/default.css | 6 ++++-- css/mobile.css | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/css/default.css b/css/default.css index 230785f6a..a4de4d937 100644 --- a/css/default.css +++ b/css/default.css @@ -174,7 +174,6 @@ a.btn_admin:focus, a.btn_admin:hover {text-decoration:none} .tbl_head01 tbody th {border-top:1px solid #e9e9e9;border-bottom:1px solid #e9e9e9} .tbl_head01 td {padding:8px 5px;border-top:1px solid #e9e9e9;border-bottom:1px solid #e9e9e9;line-height:1.5em;word-break:break-all} .tbl_head01 a {} -.tbl_head01 .empty_table {padding:50px 0;text-align:center} .tbl_head02 {margin:0 0 10px} .tbl_head02 caption {padding:0;font-size:0;line-height:0;overflow:hidden} @@ -185,7 +184,6 @@ a.btn_admin:focus, a.btn_admin:hover {text-decoration:none} .tbl_head02 tbody th {border-top:1px solid #e9e9e9;border-bottom:1px solid #e9e9e9} .tbl_head02 td {padding:5px 3px;border-top:1px solid #e9e9e9;border-bottom:1px solid #e9e9e9;line-height:1.4em;word-break:break-all} .tbl_head02 a {} -.tbl_head02 .empty_table {padding:50px 0;text-align:center} /* 폼 테이블 */ .tbl_frm01 {margin:0 0 20px} @@ -205,6 +203,10 @@ a.btn_admin:focus, a.btn_admin:hover {text-decoration:none} fieldset .frm_input {padding:2px 2px 3px;border:1px solid #b8c9c2;background:#f7f7f7;color:#000;vertical-align:middle} +/* 자료 없는 목록 */ +.empty_table {padding:50px 0 !important;text-align:center} +.empty_list {padding:20px 0 !important;text-align:center} + /* 필수입력 */ .required, textarea.required {background:url('../img/wrest.gif') #f7f7f7 top right no-repeat !important} diff --git a/css/mobile.css b/css/mobile.css index 644366453..021c869a5 100644 --- a/css/mobile.css +++ b/css/mobile.css @@ -144,7 +144,6 @@ a.btn_admin:focus, a.btn_admin:hover {text-decoration:none} .tbl_head01 tfoot td {border-color:#666;background:#484848;color:#fff;font-weight:bold;text-align:center} .tbl_head01 tbody th {border-top:1px solid #e9e9e9;border-bottom:1px solid #e9e9e9} .tbl_head01 td {padding:5px;border-top:1px solid #e9e9e9;border-bottom:1px solid #e9e9e9;line-height:1.5em;word-break:break-all} -.tbl_head01 .empty_table {padding:10px 0;text-align:center} .tbl_head02 {} .tbl_head02 caption {padding:0 0 10px;color:#777;text-align:left} @@ -155,7 +154,6 @@ a.btn_admin:focus, a.btn_admin:hover {text-decoration:none} .tbl_head02 tfoot td {border-color:#666;background:#484848;color:#fff;font-weight:bold;text-align:center} .tbl_head02 tbody th {border-top:1px solid #e9e9e9;border-bottom:1px solid #e9e9e9} .tbl_head02 td {padding:5px 3px;border-top:1px solid #e9e9e9;border-bottom:1px solid #e9e9e9;line-height:1.4em;word-break:break-all} -.tbl_head02 .empty_table {padding:10px 0;text-align:center} /* 폼 테이블 */ .tbl_frm01 {} @@ -168,6 +166,10 @@ a.btn_admin:focus, a.btn_admin:hover {text-decoration:none} .tbl_frm01 .frm_file {display:block;margin-bottom:5px;width:100%} .tbl_frm01 .frm_info {display:block;padding:5px 0 0;color:#666;line-height:1.3em} +/* 자료 없는 목록 */ +.empty_table {padding:20px 0 !important;text-align:center} +.empty_list {padding:20px 0 !important;text-align:center} + /* 필수입력 */ .required, textarea.required {background:url('../img/wrest.gif') #f7f7f7 top right no-repeat !important} From 34519530340cb652501f35844a13dfbf90dee430 Mon Sep 17 00:00:00 2001 From: chicpro Date: Thu, 28 Nov 2013 17:39:44 +0900 Subject: [PATCH 5/8] =?UTF-8?q?=EB=B3=B8=EC=9D=B8=20=EC=84=B1=EC=9D=B8?= =?UTF-8?q?=EC=9D=B8=EC=A6=9D=20=EC=B2=B4=ED=81=AC=20=ED=95=A8=EC=88=98=20?= =?UTF-8?q?shop=5Fmember=5Fcert=5Fcheck=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/shop.lib.php | 72 ++++++++++++++++++++++++++++++++++++++++++++ mobile/shop/item.php | 19 +++--------- mobile/shop/list.php | 19 +++--------- shop/item.php | 19 +++--------- shop/itembuy.php | 7 +++++ shop/list.php | 19 +++--------- 6 files changed, 95 insertions(+), 60 deletions(-) diff --git a/lib/shop.lib.php b/lib/shop.lib.php index 9d9d1baaf..f63adb941 100644 --- a/lib/shop.lib.php +++ b/lib/shop.lib.php @@ -1916,6 +1916,78 @@ function check_itemuse_write($close=true) } +// 구매 본인인증 체크 +function shop_member_cert_check($id, $type='list') +{ + global $g5, $member; + + $msg = ''; + + switch($type) + { + case 'item': + $sql = " select ca_id, ca_id2, ca_id3 from {$g5['g5_shop_item_table']} where it_id = '$id' "; + $it = sql_fetch($sql); + + $seq = ''; + for($i=0; $i<3; $i++) { + $ca_id = $it['ca_id'.$seq]; + $sql = " select ca_cert_use, ca_adult_use from {$g5['g5_shop_category_table']} where ca_id = '$ca_id' "; + $row = sql_fetch($sql); + + // 본인확인체크 + if($row['ca_cert_use'] && !$member['mb_certify']) { + if($member['mb_id']) + $msg = '회원정보 수정에서 본인확인 후 이용해 주십시오.'; + else + $msg = '본인확인된 로그인 회원만 이용할 수 있습니다.'; + + break; + } + + // 성인인증체크 + if($row['ca_adult_use'] && !$member['mb_adult']) { + if($member['mb_id']) + $msg = '본인확인으로 성인인증된 회원만 이용할 수 있습니다.\\n회원정보 수정에서 본인확인을 해주십시오.'; + else + $msg = '본인확인으로 성인인증된 회원만 이용할 수 있습니다.'; + + break; + } + + if($i == 0) + $seq = 1; + $seq++; + } + + break; + default: + $sql = " select * from {$g5['g5_shop_category_table']} where ca_id = '$id' "; + $ca = sql_fetch($sql); + + // 본인확인체크 + if($ca['ca_cert_use'] && !$member['mb_certify']) { + if($member['mb_id']) + $msg = '회원정보 수정에서 본인확인 후 이용해 주십시오.'; + else + $msg = '본인확인된 로그인 회원만 이용할 수 있습니다.'; + } + + // 성인인증체크 + if($ca['ca_adult_use'] && !$member['mb_adult']) { + if($member['mb_id']) + $msg = '본인확인으로 성인인증된 회원만 이용할 수 있습니다.\\n회원정보 수정에서 본인확인을 해주십시오.'; + else + $msg = '본인확인으로 성인인증된 회원만 이용할 수 있습니다.'; + } + + break; + } + + return $msg; +} + + // 사용후기의 확인된 건수를 상품테이블에 저장합니다. function update_use_cnt($it_id) { diff --git a/mobile/shop/item.php b/mobile/shop/item.php index 4984b64b8..c9b074fba 100644 --- a/mobile/shop/item.php +++ b/mobile/shop/item.php @@ -26,22 +26,11 @@ $sql = " select ca_include_head, ca_include_tail, ca_cert_use, ca_adult_use where ca_id = '{$it['ca_id']}' "; $ca = sql_fetch($sql); +// 본인인증, 성인인증체크 if(!$is_admin) { - // 본인확인체크 - if($ca['ca_cert_use'] && !$member['mb_certify']) { - if($is_member) - alert('회원정보 수정에서 본인확인 후 이용해 주십시오.'); - else - alert('본인확인된 로그인 회원만 이용할 수 있습니다.'); - } - - // 성인인증체크 - if($ca['ca_adult_use'] && !$member['mb_adult']) { - if($is_member) - alert('본인확인으로 성인인증된 회원만 이용할 수 있습니다.\\n회원정보 수정에서 본인확인을 해주십시오.'); - else - alert('본인확인으로 성인인증된 회원만 이용할 수 있습니다.'); - } + $msg = shop_member_cert_check($it_id, 'item'); + if($msg) + alert($msg); } // 오늘 본 상품 저장 시작 diff --git a/mobile/shop/list.php b/mobile/shop/list.php index 3b667f146..238254103 100644 --- a/mobile/shop/list.php +++ b/mobile/shop/list.php @@ -9,22 +9,11 @@ $ca = sql_fetch($sql); if (!$ca['ca_id']) alert('등록된 분류가 없습니다.'); +// 본인인증, 성인인증체크 if(!$is_admin) { - // 본인확인체크 - if($ca['ca_cert_use'] && !$member['mb_certify']) { - if($is_member) - alert('회원정보 수정에서 본인확인 후 이용해 주십시오.'); - else - alert('본인확인된 로그인 회원만 이용할 수 있습니다.'); - } - - // 성인인증체크 - if($ca['ca_adult_use'] && !$member['mb_adult']) { - if($is_member) - alert('본인확인으로 성인인증된 회원만 이용할 수 있습니다.\\n회원정보 수정에서 본인확인을 해주십시오.'); - else - alert('본인확인으로 성인인증된 회원만 이용할 수 있습니다.'); - } + $msg = shop_member_cert_check($ca_id); + if($msg) + alert($msg); } $g5['title'] = $ca['ca_name'].' 상품리스트'; diff --git a/shop/item.php b/shop/item.php index 68004c7ea..cfad0f1d7 100644 --- a/shop/item.php +++ b/shop/item.php @@ -24,22 +24,11 @@ if (!($it['ca_use'] && $it['it_use'])) { $sql = " select ca_include_head, ca_include_tail, ca_cert_use, ca_adult_use from {$g5['g5_shop_category_table']} where ca_id = '{$it['ca_id']}' "; $ca = sql_fetch($sql); +// 본인인증, 성인인증체크 if(!$is_admin) { - // 본인확인체크 - if($ca['ca_cert_use'] && !$member['mb_certify']) { - if($is_member) - alert('회원정보 수정에서 본인확인 후 이용해 주십시오.'); - else - alert('본인확인된 로그인 회원만 이용할 수 있습니다.'); - } - - // 성인인증체크 - if($ca['ca_adult_use'] && !$member['mb_adult']) { - if($is_member) - alert('본인확인으로 성인인증된 회원만 이용할 수 있습니다.\\n회원정보 수정에서 본인확인을 해주십시오.'); - else - alert('본인확인으로 성인인증된 회원만 이용할 수 있습니다.'); - } + $msg = shop_member_cert_check($it_id, 'item'); + if($msg) + alert($msg); } // 오늘 본 상품 저장 시작 diff --git a/shop/itembuy.php b/shop/itembuy.php index b15a05998..bb79ac24e 100644 --- a/shop/itembuy.php +++ b/shop/itembuy.php @@ -11,6 +11,13 @@ $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); diff --git a/shop/list.php b/shop/list.php index c6583d259..6f539f5a6 100644 --- a/shop/list.php +++ b/shop/list.php @@ -11,22 +11,11 @@ $ca = sql_fetch($sql); if (!$ca['ca_id']) alert('등록된 분류가 없습니다.'); +// 본인인증, 성인인증체크 if(!$is_admin) { - // 본인확인체크 - if($ca['ca_cert_use'] && !$member['mb_certify']) { - if($is_member) - alert('회원정보 수정에서 본인확인 후 이용해 주십시오.'); - else - alert('본인확인된 로그인 회원만 이용할 수 있습니다.'); - } - - // 성인인증체크 - if($ca['ca_adult_use'] && !$member['mb_adult']) { - if($is_member) - alert('본인확인으로 성인인증된 회원만 이용할 수 있습니다.\\n회원정보 수정에서 본인확인을 해주십시오.'); - else - alert('본인확인으로 성인인증된 회원만 이용할 수 있습니다.'); - } + $msg = shop_member_cert_check($ca_id); + if($msg) + alert($msg); } $g5['title'] = $ca['ca_name'].' 상품리스트'; From 09bd08edb65b03b4cebf49998a5da24646393afe Mon Sep 17 00:00:00 2001 From: chicpro Date: Thu, 28 Nov 2013 18:07:21 +0900 Subject: [PATCH 6/8] =?UTF-8?q?=EB=AA=A8=EB=B0=94=EC=9D=BC=EC=97=90?= =?UTF-8?q?=EC=84=9C=20=EC=9D=B8=EC=A6=9D=20=EC=B2=B4=ED=81=AC=20=ED=9B=84?= =?UTF-8?q?=20=EC=9D=B4=EB=8F=99=20url=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/shop.lib.php | 6 ++++-- mobile/shop/list.php | 9 +++------ shop/list.php | 2 +- 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/lib/shop.lib.php b/lib/shop.lib.php index f63adb941..0814a59b8 100644 --- a/lib/shop.lib.php +++ b/lib/shop.lib.php @@ -1917,7 +1917,7 @@ function check_itemuse_write($close=true) // 구매 본인인증 체크 -function shop_member_cert_check($id, $type='list') +function shop_member_cert_check($id, $type) { global $g5, $member; @@ -1961,7 +1961,7 @@ function shop_member_cert_check($id, $type='list') } break; - default: + case 'list': $sql = " select * from {$g5['g5_shop_category_table']} where ca_id = '$id' "; $ca = sql_fetch($sql); @@ -1981,6 +1981,8 @@ function shop_member_cert_check($id, $type='list') $msg = '본인확인으로 성인인증된 회원만 이용할 수 있습니다.'; } + break; + default: break; } diff --git a/mobile/shop/list.php b/mobile/shop/list.php index 238254103..e16617b4f 100644 --- a/mobile/shop/list.php +++ b/mobile/shop/list.php @@ -7,13 +7,13 @@ $sql = " select * and ca_use = '1' "; $ca = sql_fetch($sql); if (!$ca['ca_id']) - alert('등록된 분류가 없습니다.'); + alert('등록된 분류가 없습니다.', G5_SHOP_URL); // 본인인증, 성인인증체크 if(!$is_admin) { - $msg = shop_member_cert_check($ca_id); + $msg = shop_member_cert_check($ca_id, 'list'); if($msg) - alert($msg); + alert($msg, G5_SHOP_URL); } $g5['title'] = $ca['ca_name'].' 상품리스트'; @@ -22,9 +22,6 @@ include_once(G5_MSHOP_PATH.'/_head.php'); // 스킨을 지정했다면 지정한 스킨을 사용함 (스킨의 다양화) //if ($skin) $ca[ca_skin] = $skin; - -if ($is_admin) - echo ''; ?>