diff --git a/shop/item.php b/shop/item.php index 5aac395e2..c28970606 100644 --- a/shop/item.php +++ b/shop/item.php @@ -21,24 +21,24 @@ if (!($it['ca_use'] && $it['it_use'])) { } // 분류 테이블에서 분류 상단, 하단 코드를 얻음 -$sql = " select ca_include_head, ca_include_tail, ca_hp_cert_use, ca_adult_cert_use from {$g5['g5_shop_category_table']} where ca_id = '{$it['ca_id']}' "; +$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_hp_cert_use'] && !$member['mb_hp_certify']) { + if($ca['ca_cert_use'] && !$member['mb_certify']) { if($is_member) - alert('회원정보 수정에서 휴대폰 본인확인 후 이용해 주십시오.'); + alert('회원정보 수정에서 본인확인 후 이용해 주십시오.'); else - alert('휴대폰 본인확인된 로그인 회원만 이용할 수 있습니다.'); + alert('본인확인된 로그인 회원만 이용할 수 있습니다.'); } // 성인인증체크 - if($ca['ca_adult_cert_use'] && !$member['mb_adult']) { + if($ca['ca_adult_use'] && !$member['mb_adult']) { if($is_member) - alert('휴대폰 본인확인으로 성인인증된 회원만 이용할 수 있습니다.\\n회원정보 수정에서 휴대폰 본인확인을 해주십시오.'); + alert('본인확인으로 성인인증된 회원만 이용할 수 있습니다.\\n회원정보 수정에서 본인확인을 해주십시오.'); else - alert('휴대폰 본인확인으로 성인인증된 회원만 이용할 수 있습니다.'); + alert('본인확인으로 성인인증된 회원만 이용할 수 있습니다.'); } } @@ -79,10 +79,10 @@ else // 분류 위치 // HOME > 1단계 > 2단계 ... > 6단계 분류 $ca_id = $it['ca_id']; -include G5_SHOP_PATH.'/navigation.inc.php'; +include G5_SHOP_SKIN_PATH.'/navigation.skin.php'; // 이 분류에 속한 하위분류 출력 -include G5_SHOP_PATH.'/listcategory.inc.php'; +include G5_SHOP_SKIN_PATH.'/listcategory.skin.php'; if ($is_admin) { echo '
상품 관리
'; @@ -94,73 +94,6 @@ if ($is_admin) { // 상단 HTML echo '
'.stripslashes($it['it_head_html']).'
'; -// 이전 상품보기 -$sql = " select it_id, it_name from {$g5['g5_shop_item_table']} where it_id > '$it_id' and SUBSTRING(ca_id,1,4) = '".substr($it['ca_id'],0,4)."' and it_use = '1' order by it_id asc limit 1 "; -$row = sql_fetch($sql); -if ($row['it_id']) { - $prev_title = '이전상품 '.$row['it_name'].''; - $prev_href = ''; - $prev_href2 = ''.PHP_EOL; -} else { - $prev_title = ''; - $prev_href = ''; - $prev_href2 = ''; -} - -// 다음 상품보기 -$sql = " select it_id, it_name from {$g5['g5_shop_item_table']} where it_id < '$it_id' and SUBSTRING(ca_id,1,4) = '".substr($it['ca_id'],0,4)."' and it_use = '1' order by it_id desc limit 1 "; -$row = sql_fetch($sql); -if ($row['it_id']) { - $next_title = '다음 상품 '.$row['it_name'].''; - $next_href = ''; - $next_href2 = ''.PHP_EOL; -} else { - $next_title = ''; - $next_href = ''; - $next_href2 = ''; -} - -// 관리자가 확인한 사용후기의 갯수를 얻음 -$sql = " select count(*) as cnt from `{$g5['g5_shop_item_use_table']}` where it_id = '{$it_id}' and is_confirm = '1' "; -$row = sql_fetch($sql); -$item_use_count = $row['cnt']; - -// 상품문의의 갯수를 얻음 -$sql = " select count(*) as cnt from `{$g5['g5_shop_item_qa_table']}` where it_id = '{$it_id}' "; -$row = sql_fetch($sql); -$item_qa_count = $row['cnt']; - -// 관련상품의 갯수를 얻음 -$sql = " select count(*) as cnt from {$g5['g5_shop_item_relation_table']} a left join {$g5['g5_shop_item_table']} b on (a.it_id2=b.it_id and b.it_use='1') where a.it_id = '{$it['it_id']}' "; -$row = sql_fetch($sql); -$item_relation_count = $row['cnt']; - -// 상품 선택옵션 갯수 -$sql = " select count(*) as cnt from {$g5['g5_shop_item_option_table']} where it_id = '{$it['it_id']}' and io_type = '0' and io_use = '1' "; -$row = sql_fetch($sql); -$opt_count = $row['cnt']; - -// 상품 추가옵션 갯수 -$sql = " select count(*) as cnt from {$g5['g5_shop_item_option_table']} where it_id = '{$it['it_id']}' and io_type = '1' and io_use = '1' "; -$row = sql_fetch($sql); -$spl_count = $row['cnt']; - -// 고객선호도 별점수 -$star_score = get_star_image($it['it_id']); - -// 선택 옵션 -$option_1 = get_item_options($it['it_id'], $it['it_option_subject']); - -// 추가 옵션 -$option_2 = get_item_supply($it['it_id'], $it['it_supply_subject']); - -// 소셜 관련 -$sns_title = get_text($it['it_name']).' | '.get_text($config['cf_title']); -$sns_url = G5_SHOP_URL.'/item.php?it_id='.$it['it_id']; -$sns_share_links .= get_sns_share_link('facebook', $sns_url, $sns_title, G5_SHOP_URL.'/img/sns_fb2.png').' '; -$sns_share_links .= get_sns_share_link('twitter', $sns_url, $sns_title, G5_SHOP_URL.'/img/sns_twt2.png').' '; -$sns_share_links .= get_sns_share_link('googleplus', $sns_url, $sns_title, G5_SHOP_URL.'/img/sns_goo2.png'); - // 보안서버경로 if (G5_HTTPS_DOMAIN) $action_url = G5_HTTPS_DOMAIN.'/'.G5_SHOP_DIR.'/cartupdate.php'; @@ -172,13 +105,15 @@ else
- - - + - - - +
@@ -186,7 +121,6 @@ else // 하단 HTML echo stripslashes($it['it_tail_html']); ?> - - - -
-

등록된 상품문의

- - '; - ?> - -
  • - -
    -
    작성자
    -
    -
    작성일
    -
    -
    상태
    -
    -
    - - -
  • - - = 0) echo ''; - - if (!$i) echo '

    상품문의가 없습니다.

    '; - ?> -
    - - 1) { - $str .= '처음'.PHP_EOL; - } - - $start_page = ( ( (int)( ($cur_page - 1 ) / $write_pages ) ) * $write_pages ) + 1; - $end_page = $start_page + $write_pages - 1; - - if ($end_page >= $total_page) $end_page = $total_page; - - if ($start_page > 1) $str .= '이전'.PHP_EOL; - - if ($total_page > 1) { - for ($k=$start_page;$k<=$end_page;$k++) { - if ($cur_page != $k) - $str .= ''.$k.'페이지'.PHP_EOL; - else - $str .= '열린'.$k.'페이지'.PHP_EOL; - } - } - - if ($total_page > $end_page) $str .= '다음'.PHP_EOL; - - if ($cur_page < $total_page) { - $str .= '맨끝'.PHP_EOL; - } - - if ($str) - return ""; - else - return ""; +if(!file_exists($itemqa_skin)) { + echo str_replace(G5_PATH.'/', '', $itemqa_skin).' 스킨 파일이 존재하지 않습니다.'; +} else { + include_once($itemqa_skin); } - -echo itemqa_page($config['cf_write_pages'], $page, $total_page, "./itemqa.php?it_id=$it_id&page=", ""); -?> - -
    - - 상품문의 쓰기 새 창 - 더보기 -
    - - - \ No newline at end of file +?> \ No newline at end of file diff --git a/shop/itemqaform.php b/shop/itemqaform.php index 59de78dca..6d73180a6 100644 --- a/shop/itemqaform.php +++ b/shop/itemqaform.php @@ -8,13 +8,6 @@ if (G5_IS_MOBILE) { include_once(G5_EDITOR_LIB); -// 상품문의의 내용에 쓸수 있는 최대 글자수 (한글은 영문3자) -$iq_question_max_length = 10000; - -$w = escape_trim($_REQUEST['w']); -$it_id = escape_trim($_REQUEST['it_id']); -$iq_id = escape_trim($_REQUEST['iq_id']); - if (!$is_member) { alert_login("상품문의는 회원만 작성 가능합니다.", urlencode($_SERVER['REQUEST_URI'])); } @@ -34,56 +27,14 @@ if ($w == "u") } include_once(G5_PATH.'/head.sub.php'); -?> - -
    -

    상품문의 쓰기

    +$itemqaform_skin = G5_SHOP_SKIN_PATH.'/itemqaform.skin.php'; -
    - - - - - - - - - - - - - - - - - - - -
    - -
    - -
    -
    -
    - - - - \ No newline at end of file diff --git a/shop/itemqaformupdate.php b/shop/itemqaformupdate.php index 9226538e1..d6ea5c898 100644 --- a/shop/itemqaformupdate.php +++ b/shop/itemqaformupdate.php @@ -5,11 +5,11 @@ if (!$is_member) { alert_close("상품문의는 회원만 작성이 가능합니다."); } -$iq_id = escape_trim($_POST['iq_id']); +$iq_id = escape_trim($_REQUEST['iq_id']); $iq_subject = escape_trim($_POST['iq_subject']); $iq_question = escape_trim(stripslashes($_POST['iq_question'])); $iq_answer = escape_trim(stripslashes($_POST['iq_answer'])); -$hash = escape_trim($_POST['hash']); +$hash = escape_trim($_REQUEST['hash']); if ($w == "" || $w == "u") { $iq_name = $member['mb_name']; @@ -19,7 +19,7 @@ if ($w == "" || $w == "u") { if (!$iq_question) alert("질문을 입력하여 주십시오."); } -$url = "./item.php?it_id=$it_id&_=".get_token()."#sit_qa"; +$url = "./item.php?it_id=$it_id&_=".get_token()."#sit_qa"; if ($w == "") { diff --git a/shop/itemuse.php b/shop/itemuse.php index 42b25376c..27183adec 100644 --- a/shop/itemuse.php +++ b/shop/itemuse.php @@ -8,158 +8,11 @@ if (G5_IS_MOBILE) { include_once(G5_LIB_PATH.'/thumbnail.lib.php'); -$itemuse_list = "./itemuselist.php"; -$itemuse_form = "./itemuseform.php?it_id=".$it_id; -$itemuse_formupdate = "./itemuseformupdate.php?it_id=".$it_id; -?> +$itemuse_skin = G5_SHOP_SKIN_PATH.'/itemuse.skin.php'; - -
    -

    등록된 사용후기

    - - '; - ?> - -
  • - -
    -
    작성자
    -
    -
    작성일
    -
    -
    선호도
    -
    별<?php echo $is_star; ?>개
    -
    - - -
  • - - = 0) echo ''; - - if (!$i) echo '

    사용후기가 없습니다.

    '; - ?> -
    - - 1) { - $str .= '처음'.PHP_EOL; - } - - $start_page = ( ( (int)( ($cur_page - 1 ) / $write_pages ) ) * $write_pages ) + 1; - $end_page = $start_page + $write_pages - 1; - - if ($end_page >= $total_page) $end_page = $total_page; - - if ($start_page > 1) $str .= '이전'.PHP_EOL; - - if ($total_page > 1) { - for ($k=$start_page;$k<=$end_page;$k++) { - if ($cur_page != $k) - $str .= ''.$k.'페이지'.PHP_EOL; - else - $str .= '열린'.$k.'페이지'.PHP_EOL; - } - } - - if ($total_page > $end_page) $str .= '다음'.PHP_EOL; - - if ($cur_page < $total_page) { - $str .= '맨끝'.PHP_EOL; - } - - if ($str) - return ""; - else - return ""; +if(!file_exists($itemuse_skin)) { + echo str_replace(G5_PATH.'/', '', $itemuse_skin).' 스킨 파일이 존재하지 않습니다.'; +} else { + include_once($itemuse_skin); } - -echo itemuse_page($config['cf_write_pages'], $page, $total_page, "./itemuse.php?it_id=$it_id&page=", ""); -?> - -
    - 사용후기 쓰기 새 창 - 더보기 -
    - - - \ No newline at end of file +?> \ No newline at end of file diff --git a/shop/itemuseform.php b/shop/itemuseform.php index ef9429f91..911aed38f 100644 --- a/shop/itemuseform.php +++ b/shop/itemuseform.php @@ -8,13 +8,6 @@ if (G5_IS_MOBILE) { include_once(G5_EDITOR_LIB); -// 사용후기의 내용에 쓸수 있는 최대 글자수 (한글은 영문3자) -$is_content_max_length = 10000; - -$w = escape_trim($_REQUEST['w']); -$it_id = escape_trim($_REQUEST['it_id']); -$is_id = escape_trim($_REQUEST['is_id']); - if (!$is_member) { alert_close("사용후기는 회원만 작성 가능합니다."); } @@ -36,89 +29,14 @@ if ($w == "") { } include_once(G5_PATH.'/head.sub.php'); -?> - -
    -

    사용후기 쓰기

    +$itemuseform_skin = G5_SHOP_SKIN_PATH.'/itemuseform.skin.php'; -
    - - - - - - - - - - - - - - - - - - - - - - - -
    평가 -
      -
    • - > - - -
    • -
    • - > - - -
    • -
    • - > - - -
    • -
    • - > - - -
    • -
    • - > - - -
    • -
    -
    - -
    - -
    - -
    -
    - - - - \ No newline at end of file diff --git a/shop/itemuseformupdate.php b/shop/itemuseformupdate.php index a52d7c152..f5012cb33 100644 --- a/shop/itemuseformupdate.php +++ b/shop/itemuseformupdate.php @@ -16,7 +16,7 @@ if ($w == "" || $w == "u") { if (!$is_content) alert("내용을 입력하여 주십시오."); } -$url = "./item.php?it_id=$it_id&_=".get_token()."#sit_use"; +$url = "./item.php?it_id=$it_id&_=".get_token()."#sit_use"; if ($w == "") { diff --git a/shop/list.php b/shop/list.php index a3398756d..a0fc9289e 100644 --- a/shop/list.php +++ b/shop/list.php @@ -51,12 +51,12 @@ if ($is_admin) '.stripslashes($ca['ca_head_html']).''; - include G5_SHOP_PATH.'/listcategory3.inc.php'; + include G5_SHOP_SKIN_PATH.'/listcategory3.skin.php'; // 상품 출력순서가 있다면 if ($sort != "") @@ -69,10 +69,10 @@ if ($is_admin) if (file_exists($list_file)) { echo '
    '; - include G5_SHOP_PATH.'/list.sort.php'; + include G5_SHOP_SKIN_PATH.'/list.sort.skin.php'; // 상품 보기 타입 변경 버튼 - include G5_SHOP_PATH.'/list.sub.php'; + include G5_SHOP_SKIN_PATH.'/list.sub.skin.php'; echo '
    '; // 총몇개 = 한줄에 몇개 * 몇줄 @@ -117,7 +117,7 @@ if ($is_admin) '$it_id' and SUBSTRING(ca_id,1,4) = '".substr($it['ca_id'],0,4)."' and it_use = '1' order by it_id asc limit 1 "; +$row = sql_fetch($sql); +if ($row['it_id']) { + $prev_title = '이전상품 '.$row['it_name'].''; + $prev_href = ''; + $prev_href2 = ''.PHP_EOL; +} else { + $prev_title = ''; + $prev_href = ''; + $prev_href2 = ''; +} + +// 다음 상품보기 +$sql = " select it_id, it_name from {$g5['g5_shop_item_table']} where it_id < '$it_id' and SUBSTRING(ca_id,1,4) = '".substr($it['ca_id'],0,4)."' and it_use = '1' order by it_id desc limit 1 "; +$row = sql_fetch($sql); +if ($row['it_id']) { + $next_title = '다음 상품 '.$row['it_name'].''; + $next_href = ''; + $next_href2 = ''.PHP_EOL; +} else { + $next_title = ''; + $next_href = ''; + $next_href2 = ''; +} + +// 상품 선택옵션 갯수 +$sql = " select count(*) as cnt from {$g5['g5_shop_item_option_table']} where it_id = '{$it['it_id']}' and io_type = '0' and io_use = '1' "; +$row = sql_fetch($sql); +$opt_count = $row['cnt']; + +// 상품 추가옵션 갯수 +$sql = " select count(*) as cnt from {$g5['g5_shop_item_option_table']} where it_id = '{$it['it_id']}' and io_type = '1' and io_use = '1' "; +$row = sql_fetch($sql); +$spl_count = $row['cnt']; + +// 고객선호도 별점수 +$star_score = get_star_image($it['it_id']); + +// 선택 옵션 +$option_1 = get_item_options($it['it_id'], $it['it_option_subject']); + +// 추가 옵션 +$option_2 = get_item_supply($it['it_id'], $it['it_supply_subject']); + +// 소셜 관련 +$sns_title = get_text($it['it_name']).' | '.get_text($config['cf_title']); +$sns_url = G5_SHOP_URL.'/item.php?it_id='.$it['it_id']; +$sns_share_links .= get_sns_share_link('facebook', $sns_url, $sns_title, G5_SHOP_URL.'/img/sns_fb2.png').' '; +$sns_share_links .= get_sns_share_link('twitter', $sns_url, $sns_title, G5_SHOP_URL.'/img/sns_twt2.png').' '; +$sns_share_links .= get_sns_share_link('googleplus', $sns_url, $sns_title, G5_SHOP_URL.'/img/sns_goo2.png'); ?> + +
    @@ -386,50 +440,4 @@ function fitem_submit(f) return true; } - - - - + \ No newline at end of file diff --git a/skin/shop/basic/item.info.skin.php b/skin/shop/basic/item.info.skin.php index 4f3619870..61735ca98 100644 --- a/skin/shop/basic/item.info.skin.php +++ b/skin/shop/basic/item.info.skin.php @@ -1,19 +1,38 @@ - - + + + +
    @@ -71,12 +90,7 @@ function pg_anchor($anc_id) {

    사용후기

    -
    - +
    @@ -85,12 +99,7 @@ function pg_anchor($anc_id) {

    상품문의

    -
    - +
    @@ -126,10 +135,55 @@ function pg_anchor($anc_id) { set_query($sql); echo $list->run(); ?> + + \ No newline at end of file diff --git a/skin/shop/basic/item.relation.skin.php b/skin/shop/basic/item.relation.skin.php new file mode 100644 index 000000000..3f9a881a3 --- /dev/null +++ b/skin/shop/basic/item.relation.skin.php @@ -0,0 +1,75 @@ + + + + + +list_mod >= 2) { // 1줄 이미지 : 2개 이상 + if ($i%$this->list_mod == 0) $sct_last = ' sct_last'; // 줄 마지막 + else if ($i%$this->list_mod == 1) $sct_last = ' sct_clear'; // 줄 첫번째 + else $sct_last = ''; + } else { // 1줄 이미지 : 1개 + $sct_last = ' sct_clear'; + } + + if ($i == 1) { + if ($this->css) { + echo "