스킨화 작업 2차
This commit is contained in:
@ -1,13 +0,0 @@
|
||||
<?php
|
||||
include_once('./_common.php');
|
||||
include_once(G5_PATH.'/head.sub.php');
|
||||
?>
|
||||
|
||||
<script>
|
||||
alert("<?php echo $msg; ?>");
|
||||
document.location=g5_bbs_url+"/login.php?url=<?php echo $url; ?>";
|
||||
</script>
|
||||
|
||||
<?php
|
||||
include_once(G5_PATH.'/tail.sub.php');
|
||||
?>
|
||||
@ -1,8 +1,3 @@
|
||||
<?php
|
||||
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
|
||||
?>
|
||||
|
||||
<script>
|
||||
$.fn.listType = function(type)
|
||||
{
|
||||
var $el = this.find("li.sct_li");
|
||||
@ -55,15 +50,15 @@ $.fn.listType = function(type)
|
||||
$("button.sct_lst_list span").addClass("sct_lst_on").html("<b class=\"sound_only\"> 선택됨</b>");
|
||||
}
|
||||
|
||||
set_cookie("ck_itemlist<?php echo $ca_id; ?>_type", type, 1, g5_cookie_domain);
|
||||
}
|
||||
|
||||
// 리스트 타입 쿠키가 있을 경우 바로 적용
|
||||
if(itemlist_type = get_cookie("ck_itemlist<?php echo $ca_id; ?>_type")) {
|
||||
$("ul.sct").listType(itemlist_type);
|
||||
set_cookie("ck_itemlist"+itemlist_ca_id+"_type", type, 1, g5_cookie_domain);
|
||||
}
|
||||
|
||||
$(function() {
|
||||
// 리스트 타입 쿠키가 있을 경우 바로 적용
|
||||
if(itemlist_type = get_cookie("ck_itemlist"+itemlist_ca_id+"_type")) {
|
||||
$("ul.sct").listType(itemlist_type);
|
||||
}
|
||||
|
||||
$("button.sct_lst_view").on("click", function() {
|
||||
if($(this).hasClass("sct_lst_gallery")) {
|
||||
$("ul.sct").listType("gallery");
|
||||
@ -71,5 +66,4 @@ $(function() {
|
||||
$("ul.sct").listType("list");
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
});
|
||||
@ -1,17 +1,8 @@
|
||||
<?php
|
||||
include_once('./_common.php');
|
||||
include_once(G5_LIB_PATH.'/iteminfo.lib.php');
|
||||
include_once(G5_GCAPTCHA_PATH.'/gcaptcha.lib.php');
|
||||
|
||||
$captcha_html = captcha_html();
|
||||
|
||||
// 불법접속을 할 수 없도록 세션에 아무값이나 저장하여 hidden 으로 넘겨서 다음 페이지에서 비교함
|
||||
$token = md5(uniqid(rand(), true));
|
||||
set_session("ss_token", $token);
|
||||
|
||||
$rand = rand(4, 6);
|
||||
$norobot_key = substr($token, 0, $rand);
|
||||
set_session('ss_norobot_key', $norobot_key);
|
||||
$it_id = escape_trim($_GET['it_id']);
|
||||
|
||||
// 분류사용, 상품사용하는 상품의 정보를 얻음
|
||||
$sql = " select a.*,
|
||||
@ -30,26 +21,26 @@ if (!($it['ca_use'] && $it['it_use'])) {
|
||||
}
|
||||
|
||||
// 분류 테이블에서 분류 상단, 하단 코드를 얻음
|
||||
$sql = " select ca_include_head, ca_include_tail, ca_hp_cert_use, ca_adult_cert_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_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('본인확인으로 성인인증된 회원만 이용할 수 있습니다.');
|
||||
}
|
||||
}
|
||||
|
||||
@ -86,70 +77,15 @@ include_once(G5_MSHOP_PATH.'/_head.php');
|
||||
// 분류 위치
|
||||
// HOME > 1단계 > 2단계 ... > 6단계 분류
|
||||
$ca_id = $it['ca_id'];
|
||||
include G5_MSHOP_PATH.'/navigation1.inc.php';
|
||||
include G5_MSHOP_SKIN_PATH.'/navigation.skin.php';
|
||||
|
||||
if ($is_admin)
|
||||
echo '<div class="sit_admin"><a href="'.G5_ADMIN_URL.'/shop_admin/itemform.php?w=u&it_id='.$it_id.'" class="btn_admin">상품 관리</a></div>';
|
||||
|
||||
// 상단 HTML
|
||||
echo '<div id="sit_hhtml">'.stripslashes($it['it_mobile_head_html']).'</div>';
|
||||
|
||||
// 이전 상품보기
|
||||
$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 = '<a href="'.G5_SHOP_URL.'/item.php?it_id='.$row['it_id'].'">';
|
||||
$prev_href = '</a>';
|
||||
} 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 = '<a href="'.G5_SHOP_URL.'/item.php?it_id='.$row['it_id'].'">';
|
||||
$next_href2 = '</a>';
|
||||
} 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'];
|
||||
?>
|
||||
|
||||
<script src="<?php echo G5_JS_URL; ?>/md5.js"></script>
|
||||
<script src="<?php echo G5_JS_URL; ?>/shop.js"></script>
|
||||
|
||||
<?php
|
||||
@ -161,594 +97,17 @@ else
|
||||
|
||||
<div id="sit">
|
||||
|
||||
<form name="fitem" action="<?php echo $action_url; ?>" method="post">
|
||||
<input type="hidden" name="it_id[]" value="<?php echo $it['it_id']; ?>">
|
||||
<input type="hidden" name="sw_direct">
|
||||
<input type="hidden" name="url">
|
||||
<?php
|
||||
// 상품 구입폼
|
||||
include_once(G5_MSHOP_SKIN_PATH.'/item.form.skin.php');
|
||||
?>
|
||||
|
||||
<div id="sit_ov_wrap">
|
||||
<div id="sit_pvi">
|
||||
<button type="button" id="sit_pvi_prev" class="sit_pvi_btn">이전</button>
|
||||
<button type="button" id="sit_pvi_next" class="sit_pvi_btn">다음</button>
|
||||
<?php
|
||||
// 이미지(중) 썸네일
|
||||
$thumb_count = 0;
|
||||
for ($i=1; $i<=10; $i++)
|
||||
{
|
||||
if(!$it['it_img'.$i])
|
||||
continue;
|
||||
<?php
|
||||
// 상품 상세정보
|
||||
include_once(G5_MSHOP_SKIN_PATH.'/item.info.skin.php');
|
||||
?>
|
||||
|
||||
if($thumb_count == 0) echo '<ul id="sit_pvi_slide">';
|
||||
$thumb = get_it_thumbnail($it['it_img'.$i], 280, 280);
|
||||
|
||||
if(!$thumb)
|
||||
continue;
|
||||
|
||||
echo '<li>';
|
||||
echo '<a href="'.G5_SHOP_URL.'/largeimage.php?it_id='.$it['it_id'].'&no='.$i.'" class="popup_item_image slide_img" target="_blank">'.$thumb.'</a>';
|
||||
echo '</li>';
|
||||
|
||||
$thumb_count++;
|
||||
}
|
||||
if ($thumb_count > 0) echo '</ul>';
|
||||
?>
|
||||
<script>
|
||||
$(function() {
|
||||
var time = 500;
|
||||
var idx = idx2 = 0;
|
||||
var slide_width = $("#sit_pvi_slide").width();
|
||||
var slide_count = $("#sit_pvi_slide li").size();
|
||||
$("#sit_pvi_slide li:first").css("display", "block");
|
||||
if(slide_count > 1)
|
||||
$(".sit_pvi_btn").css("display", "inline");
|
||||
|
||||
$("#sit_pvi_prev").click(function() {
|
||||
if(slide_count > 1) {
|
||||
idx2 = (idx - 1) % slide_count;
|
||||
if(idx2 < 0)
|
||||
idx2 = slide_count - 1;
|
||||
$("#sit_pvi_slide li:hidden").css("left", "-"+slide_width+"px");
|
||||
$("#sit_pvi_slide li:eq("+idx+")").filter(":not(:animated)").animate({ left: "+="+slide_width+"px" }, time, function() {
|
||||
$(this).css("display", "none").css("left", "-"+slide_width+"px");
|
||||
});
|
||||
$("#sit_pvi_slide li:eq("+idx2+")").css("display", "block").filter(":not(:animated)").animate({ left: "+="+slide_width+"px" }, time,
|
||||
function() {
|
||||
idx = idx2;
|
||||
}
|
||||
);
|
||||
}
|
||||
});
|
||||
|
||||
$("#sit_pvi_next").click(function() {
|
||||
if(slide_count > 1) {
|
||||
idx2 = (idx + 1) % slide_count;
|
||||
$("#sit_pvi_slide li:hidden").css("left", slide_width+"px");
|
||||
$("#sit_pvi_slide li:eq("+idx+")").filter(":not(:animated)").animate({ left: "-="+slide_width+"px" }, time, function() {
|
||||
$(this).css("display", "none").css("left", slide_width+"px");
|
||||
});
|
||||
$("#sit_pvi_slide li:eq("+idx2+")").css("display", "block").filter(":not(:animated)").animate({ left: "-="+slide_width+"px" }, time,
|
||||
function() {
|
||||
idx = idx2;
|
||||
}
|
||||
);
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
|
||||
<section id="sit_ov">
|
||||
<h2>상품간략정보 및 구매기능</h2>
|
||||
<strong id="sit_title"><?php echo stripslashes($it['it_name']); ?></strong><br>
|
||||
<span id="sit_desc"><?php echo $it['it_basic']; ?></span>
|
||||
<?php if ($score = get_star_image($it['it_id'])) { ?>
|
||||
<div id="sit_star_sns">
|
||||
<?php
|
||||
$sns_title = get_text($it['it_name']).' | '.get_text($config['cf_title']);
|
||||
$sns_url = G5_SHOP_URL.'/item.php?it_id='.$it['it_id'];
|
||||
?>
|
||||
고객선호도 <span>별<?php echo $score?>개</span>
|
||||
<img src="<?php echo G5_SHOP_URL; ?>/img/s_star<?php echo $score?>.png" alt="" class="sit_star">
|
||||
<?php echo get_sns_share_link('facebook', $sns_url, $sns_title, G5_SHOP_URL.'/img/sns_fb2.png'); ?>
|
||||
<?php echo get_sns_share_link('twitter', $sns_url, $sns_title, G5_SHOP_URL.'/img/sns_twt2.png'); ?>
|
||||
<?php echo get_sns_share_link('googleplus', $sns_url, $sns_title, G5_SHOP_URL.'/img/sns_goo2.png'); ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<table class="sit_ov_tbl">
|
||||
<colgroup>
|
||||
<col class="grid_3">
|
||||
<col>
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<?php if ($it['it_maker']) { ?>
|
||||
<tr>
|
||||
<th scope="row">제조사</th>
|
||||
<td><?php echo $it['it_maker']; ?></td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
|
||||
<?php if ($it['it_origin']) { ?>
|
||||
<tr>
|
||||
<th scope="row">원산지</th>
|
||||
<td><?php echo $it['it_origin']; ?></td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
|
||||
<?php if ($it['it_brand']) { ?>
|
||||
<tr>
|
||||
<th scope="row">브랜드</th>
|
||||
<td><?php echo $it['it_brand']; ?></td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
|
||||
<?php if ($it['it_model']) { ?>
|
||||
<tr>
|
||||
<th scope="row">모델</th>
|
||||
<td><?php echo $it['it_model']; ?></td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
|
||||
<?php if ($it['it_tel_inq']) { // 전화문의일 경우 ?>
|
||||
|
||||
<tr>
|
||||
<th scope="row">판매가격</th>
|
||||
<td>전화문의</td>
|
||||
</tr>
|
||||
|
||||
<?php } else { // 전화문의가 아닐 경우?>
|
||||
<?php if ($it['it_cust_price']) { // 1.00.03?>
|
||||
<tr>
|
||||
<th scope="row">시중가격</th>
|
||||
<td><?php echo display_price($it['it_cust_price']); ?></td>
|
||||
</tr>
|
||||
<?php } // 전화문의 끝?>
|
||||
|
||||
<tr>
|
||||
<th scope="row">판매가격</th>
|
||||
<td>
|
||||
<?php echo number_format(get_price($it)); ?> 원
|
||||
<input type="hidden" id="it_price" value="<?php echo get_price($it); ?>">
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<?php
|
||||
/* 재고 표시하는 경우 주석 해제
|
||||
<tr>
|
||||
<th scope="row">재고수량</th>
|
||||
<td><?php echo number_format(get_it_stock_qty($it_id)); ?> 개</td>
|
||||
</tr>
|
||||
*/
|
||||
?>
|
||||
|
||||
<?php if ($config['cf_use_point']) { // 포인트 사용한다면 ?>
|
||||
<tr>
|
||||
<th scope="row"><label for="disp_point">포인트</label></th>
|
||||
<td>
|
||||
<?php
|
||||
$it_point = get_item_point($it);
|
||||
echo number_format($it_point);
|
||||
?> 점
|
||||
</td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
<?php if($default['de_send_cost_case'] == '개별' && $it['it_sc_type'] != 0) { ?>
|
||||
<tr>
|
||||
<th><label for="ct_send_cost">배송비결제</label></th>
|
||||
<td>
|
||||
<?php
|
||||
if($it['it_sc_method'] == 2) {
|
||||
?>
|
||||
<select name="ct_send_cost" id="ct_send_cost">
|
||||
<option value="0">주문시 결제</option>
|
||||
<option value="1">수령후 지불</option>
|
||||
</select>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<?php
|
||||
$option_1 = get_item_options($it['it_id'], $it['it_option_subject']);
|
||||
if($option_1) {
|
||||
?>
|
||||
<section>
|
||||
<h3>선택옵션</h3>
|
||||
<table class="sit_ov_tbl">
|
||||
<colgroup>
|
||||
<col class="grid_3">
|
||||
<col>
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<?php // 선택옵션
|
||||
echo $option_1;
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</section>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
||||
<?php
|
||||
$option_2 = get_item_supply($it['it_id'], $it['it_supply_subject']);
|
||||
if($option_2) {
|
||||
?>
|
||||
<section>
|
||||
<h3>추가옵션</h3>
|
||||
<table class="sit_ov_tbl">
|
||||
<colgroup>
|
||||
<col class="grid_3">
|
||||
<col>
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<?php // 추가옵션
|
||||
echo $option_2;
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</section>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
||||
<?php } // 전화문의가 아닐 경우 끝?>
|
||||
|
||||
<div id="sit_sel_option">
|
||||
<?php if(!$option_1 && !$option_2) { ?>
|
||||
<ul id="sit_opt_added">
|
||||
<li class="sit_opt_list">
|
||||
<input type="hidden" name="io_type[<?php echo $it_id; ?>][]" value="0">
|
||||
<input type="hidden" name="io_id[<?php echo $it_id; ?>][]" value="">
|
||||
<input type="hidden" name="io_value[<?php echo $it_id; ?>][]" value="<?php echo $it['it_name']; ?>">
|
||||
<input type="hidden" class="io_price" value="0">
|
||||
<input type="hidden" class="io_stock" value="<?php echo $it['it_stock_qty']; ?>">
|
||||
<span class="sit_opt_subj"><?php echo $it['it_name']; ?></span>
|
||||
<span class="sit_opt_prc">(+0원)</span>
|
||||
<div>
|
||||
<input type="text" name="ct_qty[<?php echo $it_id; ?>][]" value="1" class="frm_input" size="5">
|
||||
<button type="button" class="sit_qty_plus btn_frmline">증가</button>
|
||||
<button type="button" class="sit_qty_minus btn_frmline">감소</button>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
<script>
|
||||
$(function() {
|
||||
price_calculate();
|
||||
});
|
||||
</script>
|
||||
<?php } ?>
|
||||
</div>
|
||||
|
||||
<div id="sit_tot_price"></div>
|
||||
|
||||
<ul id="sit_ov_btn">
|
||||
<?php if (!$it['it_tel_inq']) { ?>
|
||||
<li><a href="javascript:fitemcheck(document.fitem, 'direct_buy');" id="sit_btn_buy">바로구매</a></li>
|
||||
<li><a href="javascript:fitemcheck(document.fitem, 'cart_update');" id="sit_btn_cart">장바구니</a></li>
|
||||
<?php } ?>
|
||||
|
||||
<li><a href="javascript:item_wish(document.fitem, '<?php echo $it['it_id']; ?>');" id="sit_btn_wish">위시리스트</a></li>
|
||||
<li><a href="javascript:popup_item_recommend('<?php echo $it['it_id']; ?>');" id="sit_btn_rec">추천하기</a></li>
|
||||
</ul>
|
||||
|
||||
<script>
|
||||
// 상품보관
|
||||
function item_wish(f, it_id)
|
||||
{
|
||||
f.url.value = "<?php echo G5_SHOP_URL; ?>/wishupdate.php?it_id="+it_id;
|
||||
f.action = "<?php echo G5_SHOP_URL; ?>/wishupdate.php";
|
||||
f.submit();
|
||||
}
|
||||
|
||||
// 추천메일
|
||||
function popup_item_recommend(it_id)
|
||||
{
|
||||
if (!g5_is_member)
|
||||
{
|
||||
if (confirm("회원만 추천하실 수 있습니다."))
|
||||
document.location.href = "<?php echo G5_BBS_URL; ?>/login.php?url=<?php echo urlencode(G5_SHOP_URL."/item.php?it_id=$it_id"); ?>";
|
||||
}
|
||||
else
|
||||
{
|
||||
url = "<?php echo G5_SHOP_URL; ?>/itemrecommend.php?it_id=" + it_id;
|
||||
opt = "scrollbars=yes,width=616,height=420,top=10,left=10";
|
||||
popup_window(url, "itemrecommend", opt);
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
<aside id="sit_siblings">
|
||||
<h2>다른 상품 보기</h2>
|
||||
<?php
|
||||
if ($prev_href || $next_href) {
|
||||
echo $prev_href.$prev_title.$prev_href2;
|
||||
echo $next_href.$next_title.$next_href2;
|
||||
} else {
|
||||
echo '<span class="sound_only">이 분류에 등록된 다른 상품이 없습니다.</span>';
|
||||
}
|
||||
?>
|
||||
</aside>
|
||||
|
||||
<script>
|
||||
function click_item(id)
|
||||
{
|
||||
<?php
|
||||
echo "var str = 'item_explan,item_use,item_qa";
|
||||
if ($default['de_baesong_content']) echo ",item_baesong";
|
||||
if ($default['de_change_content']) echo ",item_change";
|
||||
echo ",item_relation';";
|
||||
?>
|
||||
|
||||
var s = str.split(',');
|
||||
|
||||
for (i=0; i<s.length; i++)
|
||||
{
|
||||
if (id=='*')
|
||||
document.getElementById(s[i]).style.display = 'block';
|
||||
else
|
||||
document.getElementById(s[i]).style.display = 'none';
|
||||
}
|
||||
|
||||
if (id!='*')
|
||||
document.getElementById(id).style.display = 'block';
|
||||
}
|
||||
</script>
|
||||
|
||||
<section id="sit_inf">
|
||||
<h2>상품 정보</h2>
|
||||
<?php echo pg_anchor('inf'); ?>
|
||||
|
||||
<?php if ($it['it_basic']) { // 상품 기본설명 ?>
|
||||
<div id="sit_inf_basic">
|
||||
<?php echo $it['it_basic']; ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<?php if ($it['it_explan'] || $it['it_mobile_explan']) { // 상품 상세설명 ?>
|
||||
<div id="sit_inf_explan">
|
||||
<?php echo ($it['it_mobile_explan'] ? conv_content($it['it_mobile_explan'], 1) : conv_content($it['it_explan'], 1)); ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<h3>상품 정보 고시</h3>
|
||||
<?php
|
||||
if ($it['it_info_value']) {
|
||||
$info_data = unserialize($it['it_info_value']);
|
||||
$gubun = $it['it_info_gubun'];
|
||||
$info_array = $item_info[$gubun]['article'];
|
||||
?>
|
||||
<!-- 상품정보고시 -->
|
||||
<table id="sit_inf_open">
|
||||
<colgroup>
|
||||
<col class="grid_4">
|
||||
<col>
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<?php
|
||||
foreach($info_data as $key=>$val) {
|
||||
$ii_title = $info_array[$key][0];
|
||||
$ii_value = $val;
|
||||
?>
|
||||
<tr valign="top">
|
||||
<th scope="row"><?php echo $ii_title; ?></th>
|
||||
<td><?php echo $ii_value; ?></th>
|
||||
</tr>
|
||||
<?php } //foreach?>
|
||||
</tbody>
|
||||
</table>
|
||||
<!-- 상품정보고시 end -->
|
||||
<?php } //if?>
|
||||
|
||||
</section>
|
||||
<!-- 상품설명 end -->
|
||||
|
||||
<section id="sit_use">
|
||||
<h2>사용후기</h2>
|
||||
<?php echo pg_anchor('use'); ?>
|
||||
|
||||
<div id="itemuse"></div>
|
||||
<script>
|
||||
$(function(){
|
||||
$("#itemuse").load("./itemuse.php", {it_id:"<?php echo $it_id; ?>"});
|
||||
});
|
||||
</script>
|
||||
</section>
|
||||
|
||||
<section id="sit_qa">
|
||||
<h2>상품문의</h2>
|
||||
<?php echo pg_anchor('qa'); ?>
|
||||
|
||||
<div id="itemqa"></div>
|
||||
<script>
|
||||
$(function(){
|
||||
$("#itemqa").load("./itemqa.php", {it_id:"<?php echo $it_id; ?>"});
|
||||
});
|
||||
</script>
|
||||
</section>
|
||||
|
||||
|
||||
<?php if ($default['de_baesong_content']) { // 배송정보 내용이 있다면 ?>
|
||||
<section id="sit_dvr">
|
||||
<h2>배송정보</h2>
|
||||
<?php echo pg_anchor('dvr'); ?>
|
||||
|
||||
<?php echo conv_content($default['de_baesong_content'], 1); ?>
|
||||
</section>
|
||||
<?php } ?>
|
||||
|
||||
|
||||
<?php if ($default['de_change_content']) { // 교환/반품 내용이 있다면 ?>
|
||||
<section id="sit_ex">
|
||||
<h2>교환/반품</h2>
|
||||
<?php echo pg_anchor('ex'); ?>
|
||||
|
||||
<?php echo conv_content($default['de_change_content'], 1); ?>
|
||||
</section>
|
||||
<?php } ?>
|
||||
|
||||
<section id="sit_rel">
|
||||
<h2>관련상품</h2>
|
||||
<?php echo pg_anchor('rel'); ?>
|
||||
|
||||
<div class="sct_wrap">
|
||||
<?php
|
||||
$sql = " select b.* from {$g5['g5_shop_item_relation_table']} a left join {$g5['g5_shop_item_table']} b on (a.it_id2=b.it_id) where a.it_id = '{$it['it_id']}' and b.it_use='1' ";
|
||||
|
||||
$list = new item_list("list.10.skin.php", $default['de_rel_list_mod'], 1, $default['de_rel_img_width'], $default['de_rel_img_height']);
|
||||
$list->set_mobile(true);
|
||||
$list->set_query($sql);
|
||||
echo $list->run();
|
||||
?>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<script>
|
||||
$(function(){
|
||||
// 상품이미지 크게보기
|
||||
$(".popup_item_image").click(function() {
|
||||
var url = $(this).attr("href");
|
||||
var top = 10;
|
||||
var left = 10;
|
||||
var opt = 'scrollbars=yes,top='+top+',left='+left;
|
||||
popup_window(url, "largeimage", opt);
|
||||
|
||||
return false;
|
||||
});
|
||||
});
|
||||
|
||||
// 바로구매 또는 장바구니 담기
|
||||
function fitemcheck(f, act)
|
||||
{
|
||||
// 판매가격이 0 보다 작다면
|
||||
if (document.getElementById("it_price").value < 0)
|
||||
{
|
||||
alert("전화로 문의해 주시면 감사하겠습니다.");
|
||||
return;
|
||||
}
|
||||
|
||||
if($(".sit_opt_list").size() < 1)
|
||||
{
|
||||
alert("상품의 선택옵션을 선택해 주십시오.");
|
||||
return;
|
||||
}
|
||||
|
||||
if (act == "direct_buy") {
|
||||
f.sw_direct.value = 1;
|
||||
} else {
|
||||
f.sw_direct.value = 0;
|
||||
}
|
||||
|
||||
var val, result = true;
|
||||
$("input[name^=ct_qty]").each(function() {
|
||||
val = $(this).val();
|
||||
|
||||
if(val.length < 1) {
|
||||
alert("수량을 입력해 주십시오.");
|
||||
result = false;
|
||||
return false;
|
||||
}
|
||||
|
||||
if(val.replace(/[0-9]/g, "").length > 0) {
|
||||
alert("수량은 숫자로 입력해 주십시오.");
|
||||
result = false;
|
||||
return false;
|
||||
}
|
||||
|
||||
if(parseInt(val.replace(/[^0-9]/g, "")) < 1) {
|
||||
alert("수량은 1이상 입력해 주십시오.");
|
||||
result = false;
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
if(!result)
|
||||
return;
|
||||
|
||||
f.submit();
|
||||
}
|
||||
|
||||
function addition_write(element_id)
|
||||
{
|
||||
if (element_id.style.display == 'none') { // 안보이면 보이게 하고
|
||||
element_id.style.display = 'block';
|
||||
} else { // 보이면 안보이게 하고
|
||||
element_id.style.display = 'none';
|
||||
}
|
||||
}
|
||||
|
||||
var save_use_id = null;
|
||||
function use_menu(id)
|
||||
{
|
||||
if (save_use_id != null)
|
||||
document.getElementById(save_use_id).style.display = "none";
|
||||
menu(id);
|
||||
save_use_id = id;
|
||||
}
|
||||
|
||||
var save_qa_id = null;
|
||||
function qa_menu(id)
|
||||
{
|
||||
if (save_qa_id != null)
|
||||
document.getElementById(save_qa_id).style.display = "none";
|
||||
menu(id);
|
||||
save_qa_id = id;
|
||||
}
|
||||
</script>
|
||||
|
||||
<!--[if lte IE 6]>
|
||||
<script>
|
||||
// 이미지 등비율 리사이징
|
||||
$(window).load(function() {
|
||||
view_image_resize();
|
||||
});
|
||||
|
||||
function view_image_resize()
|
||||
{
|
||||
var $img = $("#sit_inf_explan img");
|
||||
var img_wrap = $("#sit_inf_explan").width();
|
||||
var win_width = $(window).width() - 35;
|
||||
var res_width = 0;
|
||||
|
||||
if(img_wrap < win_width)
|
||||
res_width = img_wrap;
|
||||
else
|
||||
res_width = win_width;
|
||||
|
||||
$img.each(function() {
|
||||
var img_width = $(this).width();
|
||||
var img_height = $(this).height();
|
||||
var this_width = $(this).data("width");
|
||||
var this_height = $(this).data("height");
|
||||
|
||||
if(this_width == undefined) {
|
||||
$(this).data("width", img_width); // 원래 이미지 사이즈
|
||||
$(this).data("height", img_height);
|
||||
this_width = img_width;
|
||||
this_height = img_height;
|
||||
}
|
||||
|
||||
if(this_width > res_width) {
|
||||
$(this).width(res_width);
|
||||
var res_height = Math.round(res_width * $(this).data("height") / $(this).data("width"));
|
||||
$(this).height(res_height);
|
||||
} else {
|
||||
$(this).width(this_width);
|
||||
$(this).height(this_height);
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
<![endif]-->
|
||||
|
||||
</div><!-- #sit 끝 -->
|
||||
</div>
|
||||
|
||||
<?php
|
||||
// 하단 HTML
|
||||
|
||||
@ -2,145 +2,11 @@
|
||||
include_once('./_common.php');
|
||||
include_once(G5_LIB_PATH.'/thumbnail.lib.php');
|
||||
|
||||
//$it_id = $_REQUEST['it_id'];
|
||||
$itemqa_skin = G5_MSHOP_SKIN_PATH.'/itemqa.skin.php';
|
||||
|
||||
$itemqa_list = "./itemqalist.php";
|
||||
$itemqa_form = "./itemqaform.php?it_id=".$it_id;
|
||||
$itemqa_formupdate = "./itemqaformupdate.php?it_id=".$it_id;
|
||||
|
||||
$thumbnail_width = 500;
|
||||
?>
|
||||
|
||||
<!-- 상품문의 목록 시작 { -->
|
||||
<section id="sit_qa_list">
|
||||
<h3>등록된 상품문의</h3>
|
||||
|
||||
<?php
|
||||
$sql_common = " from `{$g5['g5_shop_item_qa_table']}` where it_id = '{$it_id}' ";
|
||||
|
||||
// 테이블의 전체 레코드수만 얻음
|
||||
$sql = " select COUNT(*) as cnt " . $sql_common;
|
||||
$row = sql_fetch($sql);
|
||||
$total_count = $row['cnt'];
|
||||
|
||||
$rows = 5;
|
||||
$total_page = ceil($total_count / $rows); // 전체 페이지 계산
|
||||
if ($page == "") $page = 1; // 페이지가 없으면 첫 페이지 (1 페이지)
|
||||
$from_record = ($page - 1) * $rows; // 시작 레코드 구함
|
||||
|
||||
$sql = "select * $sql_common order by iq_id desc limit $from_record, $rows ";
|
||||
$result = sql_query($sql);
|
||||
|
||||
for ($i=0; $row=sql_fetch_array($result); $i++)
|
||||
{
|
||||
$iq_num = $total_count - ($page - 1) * $rows - $i;
|
||||
$iq_star = get_star($row['iq_score']);
|
||||
$iq_name = get_text($row['iq_name']);
|
||||
$iq_subject = conv_subject($row['iq_subject'],50,"…");
|
||||
$iq_question = get_view_thumbnail($row['iq_question'], $thumbnail_width);
|
||||
$iq_time = substr($row['iq_time'], 2, 8);
|
||||
|
||||
$hash = md5($row['iq_id'].$row['iq_time'].$row['iq_ip']);
|
||||
|
||||
// http://stackoverflow.com/questions/6967081/show-hide-multiple-divs-with-jquery?answertab=votes#tab-top
|
||||
|
||||
$iq_stats = '';
|
||||
$iq_style = '';
|
||||
$iq_answer = '';
|
||||
if ($row['iq_answer'])
|
||||
{
|
||||
$iq_answer = get_view_thumbnail($row['iq_answer'], $thumbnail_width);
|
||||
$iq_stats = '답변완료';
|
||||
$iq_style = 'sit_qaa_done';
|
||||
$is_answer = true;
|
||||
} else {
|
||||
$iq_stats = '답변전';
|
||||
$iq_style = 'sit_qaa_yet';
|
||||
$iq_answer = '답변이 등록되지 않았습니다.';
|
||||
$is_answer = false;
|
||||
}
|
||||
|
||||
if ($i == 0) echo '<ol id="sit_qa_ol">';
|
||||
?>
|
||||
|
||||
<li class="sit_qa_li">
|
||||
<button type="button" class="sit_qa_li_title" onclick="javascript:qa_menu('sit_qa_con_<?php echo $i; ?>')"><b><?php echo $iq_num; ?>.</b> <?php echo $iq_subject; ?></button>
|
||||
<dl class="sit_qa_dl">
|
||||
<dt>작성자</dt>
|
||||
<dd><?php echo $iq_name; ?></dd>
|
||||
<dt>작성일</dt>
|
||||
<dd><?php echo $iq_time; ?></dd>
|
||||
<dt>상태</dt>
|
||||
<dd class="<?php echo $iq_style; ?>"><?php echo $iq_stats; ?></dd>
|
||||
</dl>
|
||||
|
||||
<div id="sit_qa_con_<?php echo $i; ?>" class="sit_qa_con">
|
||||
<div class="sit_qa_p">
|
||||
<div class="sit_qa_qaq">
|
||||
<strong>문의내용</strong><br>
|
||||
<?php echo $iq_question; // 상품 문의 내용 ?>
|
||||
</div>
|
||||
<div class="sit_qa_qaa">
|
||||
<strong>답변</strong><br>
|
||||
<?php echo $iq_answer; ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php if ($is_admin || ($row['mb_id'] == $member['mb_id'] && !$is_answer)) { ?>
|
||||
<div class="sit_qa_cmd">
|
||||
<a href="<?php echo $itemqa_form."&iq_id={$row['iq_id']}&w=u"; ?>" class="itemqa_form btn01" onclick="return false;">수정</a>
|
||||
<a href="<?php echo $itemqa_formupdate."&iq_id={$row['iq_id']}&w=d&hash={$hash}"; ?>" class="itemqa_delete btn01">삭제</a>
|
||||
<!-- <button type="button" onclick="javascript:itemqa_update(<?php echo $i; ?>);" class="btn01">수정</button>
|
||||
<button type="button" onclick="javascript:itemqa_delete(fitemqa_password<?php echo $i; ?>, <?php echo $i; ?>);" class="btn01">삭제</button> -->
|
||||
</div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
<?php }
|
||||
|
||||
if ($i >= 0) echo '</ol>';
|
||||
|
||||
if (!$i) echo '<p class="sit_empty">상품문의가 없습니다.</p>';
|
||||
?>
|
||||
</section>
|
||||
|
||||
<?php
|
||||
echo itemqa_page($config['cf_mobile_pages'], $page, $total_page, "./itemqa.php?it_id=$it_id&page=", "");
|
||||
?>
|
||||
|
||||
<div id="sit_qa_wbtn">
|
||||
<!-- <a href="javascript:itemqawin('it_id=<?php echo $it_id; ?>');">상품문의 쓰기<span class="sound_only"> 새 창</span></a> -->
|
||||
<a href="<?php echo $itemqa_form; ?>" class="btn02 itemqa_form">상품문의 쓰기<span class="sound_only"> 새 창</span></a>
|
||||
<a href="<?php echo $itemqa_list; ?>" id="itemqa_list" class="btn01">더보기</a>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
$(function(){
|
||||
$(".itemqa_form").click(function(){
|
||||
window.open(this.href, "itemqa_form", "width=800,height=500,scrollbars=1");
|
||||
return false;
|
||||
});
|
||||
|
||||
$(".itemqa_delete").click(function(){
|
||||
return confirm("정말 삭제 하시겠습니까?\n\n삭제후에는 되돌릴수 없습니다.");
|
||||
});
|
||||
|
||||
$(".qa_href").click(function(){
|
||||
var $content = $("#qa_div"+$(this).attr("target"));
|
||||
$(".qa_div").each(function(index, value){
|
||||
if ($(this).get(0) == $content.get(0)) { // 객체의 비교시 .get(0) 를 사용한다.
|
||||
$(this).is(":hidden") ? $(this).show() : $(this).hide();
|
||||
} else {
|
||||
$(this).hide();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$(".qa_page").click(function(){
|
||||
$("#itemqa").load($(this).attr("href"));
|
||||
return false;
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<!-- } 상품문의 목록 끝 -->
|
||||
if(!file_exists($itemqa_skin)) {
|
||||
echo str_replace(G5_PATH.'/', '', $itemqa_skin).' 스킨 파일이 존재하지 않습니다.';
|
||||
} else {
|
||||
include_once($itemqa_skin);
|
||||
}
|
||||
?>
|
||||
@ -2,15 +2,8 @@
|
||||
include_once('./_common.php');
|
||||
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']));
|
||||
alert_close("상품문의는 회원만 작성 가능합니다.");
|
||||
}
|
||||
|
||||
if ($w == "u")
|
||||
@ -28,56 +21,14 @@ if ($w == "u")
|
||||
}
|
||||
|
||||
include_once(G5_PATH.'/head.sub.php');
|
||||
?>
|
||||
|
||||
<!-- 상품문의 쓰기 시작 { -->
|
||||
<div id="sit_qa_write" class="new_win">
|
||||
<h1 class="new_win_title">상품문의 쓰기</h1>
|
||||
$itemqaform_skin = G5_MSHOP_SKIN_PATH.'/itemqaform.skin.php';
|
||||
|
||||
<form name="fitemqa" method="post" action="./itemqaformupdate.php" onsubmit="return fitemqa_submit(this);" autocomplete="off">
|
||||
<input type="hidden" name="w" value="<?php echo $w; ?>">
|
||||
<input type="hidden" name="it_id" value="<?php echo $it_id; ?>">
|
||||
<input type="hidden" name="iq_id" value="<?php echo $iq_id; ?>">
|
||||
|
||||
<table class="frm_tbl">
|
||||
<colgroup>
|
||||
<col class="grid_2">
|
||||
<col>
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th scope="row"><label for="iq_subject">제목</label></th>
|
||||
<td><input type="text" name="iq_subject" value="<?php echo get_text($qa['iq_subject']); ?>" id="iq_subject" required class="frm_input" minlength="2" maxlength="250"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="iq_question">질문</label></th>
|
||||
<td><?php echo editor_html('iq_question', $qa['iq_question']); ?></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<div class="btn_win">
|
||||
<input type="submit" value="작성완료" class="btn_submit">
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
function fitemqa_submit(f)
|
||||
{
|
||||
<?php echo get_editor_js('iq_question'); ?>
|
||||
|
||||
if (iq_question_editor_data.length > <?php echo $iq_question_max_length; ?>) {
|
||||
alert("내용은 <?php echo $iq_question_max_length; ?> 글자 이내에서 작성해 주세요. (한글은 영문 3자)\n\n현재 : "+iq_question_editor_data.length+" 글자");
|
||||
CKEDITOR.instances.iq_question.focus();
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
if(!file_exists($itemqaform_skin)) {
|
||||
echo str_replace(G5_PATH.'/', '', $itemqaform_skin).' 스킨 파일이 존재하지 않습니다.';
|
||||
} else {
|
||||
include_once($itemqaform_skin);
|
||||
}
|
||||
</script>
|
||||
<!-- } 상품문의 쓰기 끝 -->
|
||||
|
||||
<?php
|
||||
include_once(G5_PATH.'/tail.sub.php');
|
||||
?>
|
||||
@ -1,76 +0,0 @@
|
||||
<?php
|
||||
include_once('./_common.php');
|
||||
|
||||
if (!$is_member) {
|
||||
alert_close("상품문의는 회원만 작성이 가능합니다.");
|
||||
}
|
||||
|
||||
$iq_id = escape_trim($_POST['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']);
|
||||
|
||||
if ($w == "" || $w == "u") {
|
||||
$iq_name = $member['mb_name'];
|
||||
$iq_password = $member['mb_password'];
|
||||
|
||||
if (!$iq_subject) alert("제목을 입력하여 주십시오.");
|
||||
if (!$iq_question) alert("질문을 입력하여 주십시오.");
|
||||
}
|
||||
|
||||
$url = "./item.php?it_id=$it_id&_=".get_token()."#sit_qa";
|
||||
|
||||
if ($w == "")
|
||||
{
|
||||
$sql = "insert {$g5['g5_shop_item_qa_table']}
|
||||
set it_id = '$it_id',
|
||||
mb_id = '{$member['mb_id']}',
|
||||
iq_name = '$iq_name',
|
||||
iq_password = '$iq_password',
|
||||
iq_subject = '$iq_subject',
|
||||
iq_question = '$iq_question',
|
||||
iq_time = '".G5_TIME_YMDHIS."',
|
||||
iq_ip = '$REMOTE_ADDR' ";
|
||||
sql_query($sql);
|
||||
|
||||
alert_opener("상품문의가 등록 되었습니다.", $url);
|
||||
}
|
||||
else if ($w == "u")
|
||||
{
|
||||
if (!$is_amdin)
|
||||
{
|
||||
$sql = " select count(*) as cnt from {$g5['g5_shop_item_qa_table']} where mb_id = '{$member['mb_id']}' and iq_id = '$iq_id' ";
|
||||
$row = sql_fetch($sql);
|
||||
if (!$row['cnt'])
|
||||
alert("자신의 상품문의만 수정하실 수 있습니다.");
|
||||
}
|
||||
|
||||
$sql = " update {$g5['g5_shop_item_qa_table']}
|
||||
set iq_subject = '$iq_subject',
|
||||
iq_question = '$iq_question'
|
||||
where iq_id = '$iq_id' ";
|
||||
sql_query($sql);
|
||||
|
||||
alert_opener("상품문의가 수정 되었습니다.", $url);
|
||||
}
|
||||
else if ($w == "d")
|
||||
{
|
||||
if (!$is_admin)
|
||||
{
|
||||
$sql = " select iq_answer from {$g5['g5_shop_item_qa_table']} where mb_id = '{$member['mb_id']}' and iq_id = '$iq_id' ";
|
||||
$row = sql_fetch($sql);
|
||||
if (!$row)
|
||||
alert("자신의 상품문의만 삭제하실 수 있습니다.");
|
||||
|
||||
if ($row['iq_answer'])
|
||||
alert("답변이 있는 상품문의는 삭제하실 수 없습니다.");
|
||||
}
|
||||
|
||||
//$sql = " delete from {$g5['g5_shop_item_qa_table']} where mb_id = '{$member['mb_id']}' and iq_id = '$iq_id' ";
|
||||
$sql = " delete from {$g5['g5_shop_item_qa_table']} where iq_id = '$iq_id' and md5(concat(iq_id,iq_time,iq_ip)) = '{$hash}' ";
|
||||
sql_query($sql);
|
||||
|
||||
alert("상품문의가 삭제 되었습니다.", $url);
|
||||
}
|
||||
?>
|
||||
@ -48,127 +48,21 @@ $rows = $config['cf_page_rows'];
|
||||
$total_page = ceil($total_count / $rows); // 전체 페이지 계산
|
||||
if ($page == "") { $page = 1; } // 페이지가 없으면 첫 페이지 (1 페이지)
|
||||
$from_record = ($page - 1) * $rows; // 시작 열을 구함
|
||||
?>
|
||||
|
||||
<!-- 전체 상품 문의 목록 시작 { -->
|
||||
<form method="get" action="<?php echo $_SERVER['PHP_SELF']; ?>">
|
||||
<div id="sqa_sch">
|
||||
<a href="<?php echo $_SERVER['PHP_SELF']; ?>">전체보기</a>
|
||||
<label for="sfl" class="sound_only">검색항목</label>
|
||||
<select name="sfl" required id="sfl">
|
||||
<option value="">선택</option>
|
||||
<option value="b.it_name" <?php echo get_selected($sfl, "b.it_name", true); ?>>상품명</option>
|
||||
<option value="a.it_id" <?php echo get_selected($sfl, "a.it_id"); ?>>상품코드</option>
|
||||
<option value="a.iq_subject" <?php echo get_selected($sfl, "a.is_subject"); ?>>문의제목</option>
|
||||
<option value="a.iq_question"<?php echo get_selected($sfl, "a.iq_question"); ?>>문의내용</option>
|
||||
<option value="a.iq_name" <?php echo get_selected($sfl, "a.it_id"); ?>>작성자명</option>
|
||||
<option value="a.mb_id" <?php echo get_selected($sfl, "a.mb_id"); ?>>작성자아이디</option>
|
||||
</select>
|
||||
$sql = " select a.*, b.it_name
|
||||
$sql_common
|
||||
$sql_search
|
||||
$sql_order
|
||||
limit $from_record, $rows ";
|
||||
$result = sql_query($sql);
|
||||
|
||||
<label for="stx" class="sound_only">검색어<strong class="sound_only"> 필수</strong></label>
|
||||
<input type="text" name="stx" value="<?php echo $stx; ?>" id="stx" required class="frm_input">
|
||||
<input type="submit" value="검색" class="btn_submit">
|
||||
</div>
|
||||
</form>
|
||||
$itemqalist_skin = G5_MSHOP_SKIN_PATH.'/itemqalist.skin.php';
|
||||
|
||||
<div id="sqa">
|
||||
if(!file_exists($itemqalist_skin)) {
|
||||
echo str_replace(G5_PATH.'/', '', $itemqalist_skin).' 스킨 파일이 존재하지 않습니다.';
|
||||
} else {
|
||||
include_once($itemqalist_skin);
|
||||
}
|
||||
|
||||
<!-- <p><?php echo $config['cf_title']; ?> 전체 상품문의 목록입니다.</p> -->
|
||||
|
||||
<?php
|
||||
$sql = " select a.*, b.it_name
|
||||
$sql_common
|
||||
$sql_search
|
||||
$sql_order
|
||||
limit $from_record, $rows ";
|
||||
$result = sql_query($sql);
|
||||
for ($i=0; $row=sql_fetch_array($result); $i++)
|
||||
{
|
||||
$num = $total_count - ($page - 1) * $rows - $i;
|
||||
$star = get_star($row['is_score']);
|
||||
|
||||
$small_image = $row['it_id'];
|
||||
|
||||
$it_href = G5_SHOP_URL.'/item.php?it_id='.$row['it_id'];
|
||||
|
||||
$iq_question = get_view_thumbnail($row['iq_question'], 500);
|
||||
|
||||
if ($row['iq_answer'])
|
||||
{
|
||||
$iq_answer = get_view_thumbnail($row['iq_answer'], 500);
|
||||
$iq_stats = '답변완료';
|
||||
$iq_style = 'sit_qaa_done';
|
||||
$is_answer = true;
|
||||
} else {
|
||||
$iq_stats = '답변전';
|
||||
$iq_style = 'sit_qaa_yet';
|
||||
$iq_answer = '답변이 등록되지 않았습니다.';
|
||||
$is_answer = false;
|
||||
}
|
||||
|
||||
if ($i == 0) echo '<ol>';
|
||||
?>
|
||||
<li>
|
||||
|
||||
<div class="sqa_img">
|
||||
<a href="<?php echo $it_href; ?>">
|
||||
<?php echo get_it_image($small_image, 70, 70); ?>
|
||||
<span><?php echo $row['it_name']; ?></span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<section class="sqa_section">
|
||||
<h2><?php echo $row['iq_subject']; ?></h2>
|
||||
|
||||
<dl class="sqa_dl">
|
||||
<dt>작성자</dt>
|
||||
<dd><?php echo $row['iq_name']; ?></dd>
|
||||
<dt>작성일</dt>
|
||||
<dd><?php echo substr($row['iq_time'],0,10); ?></dd>
|
||||
<dt>상태</dt>
|
||||
<dd class="<?php echo $iq_style; ?>"><?php echo $iq_stats; ?></dd>
|
||||
</dl>
|
||||
|
||||
<div id="sqa_con_<?php echo $i; ?>" class="sqa_con" style="display:none;">
|
||||
<div class="sit_qa_qaq">
|
||||
<strong>문의내용</strong><br>
|
||||
<?php echo $iq_question; // 상품 문의 내용 ?>
|
||||
</div>
|
||||
<div class="sit_qa_qaa">
|
||||
<strong>답변</strong><br>
|
||||
<?php echo $iq_answer; ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="sqa_con_btn"><button class="sqa_con_<?php echo $i; ?>">보기</button></div>
|
||||
</section>
|
||||
|
||||
</li>
|
||||
<?php }
|
||||
if ($i > 0) echo '</ol>';
|
||||
if ($i == 0) echo '<p id="sps_empty">자료가 없습니다.</p>';
|
||||
?>
|
||||
</div>
|
||||
|
||||
<?php echo get_paging($config['cf_write_pages'], $page, $total_page, "{$_SERVER['PHP_SELF']}?$qstr&page="); ?>
|
||||
|
||||
<script>
|
||||
$(function(){
|
||||
// 사용후기 더보기
|
||||
$(".sqa_con_btn button").click(function(){
|
||||
var sqa_con_no = $(this).attr("class");
|
||||
$("#"+sqa_con_no).is(":hidden") ? $("#"+sqa_con_no).show() : $("#"+sqa_con_no).hide();
|
||||
});
|
||||
|
||||
$(".sqa_con_btn button").toggle(function(){
|
||||
$(this).text("닫기");
|
||||
}, function(){
|
||||
$(this).text("보기");
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<!-- } 전체 상품 사용후기 목록 끝 -->
|
||||
|
||||
<?php
|
||||
include_once(G5_MSHOP_PATH.'/_tail.php');
|
||||
?>
|
||||
|
||||
@ -2,132 +2,11 @@
|
||||
include_once('./_common.php');
|
||||
include_once(G5_LIB_PATH.'/thumbnail.lib.php');
|
||||
|
||||
//$it_id = $_REQUEST['it_id'];
|
||||
$itemuse_skin = G5_SHOP_SKIN_PATH.'/itemuse.skin.php';
|
||||
|
||||
$itemuse_list = "./itemuselist.php";
|
||||
$itemuse_form = "./itemuseform.php?it_id=".$it_id;
|
||||
$itemuse_formupdate = "./itemuseformupdate.php?it_id=".$it_id;
|
||||
?>
|
||||
|
||||
<!-- 상품 사용후기 시작 { -->
|
||||
<section id="sit_use_list">
|
||||
<h3>등록된 사용후기</h3>
|
||||
|
||||
<?php
|
||||
/*
|
||||
여분필드 용도
|
||||
wr_1 : 상품코드
|
||||
wr_2 : 상품명
|
||||
wr_3 : 평점 1~5
|
||||
wr_4 : 관리자확인
|
||||
*/
|
||||
//$sql_common = " from `{$g5['write_prefix']}itemuse` where wr_is_comment = 0 and wr_1 = '{$it['it_id']}' and wr_4 = '1' ";
|
||||
$sql_common = " from `{$g5['g5_shop_item_use_table']}` where it_id = '{$it_id}' and is_confirm = '1' ";
|
||||
|
||||
// 테이블의 전체 레코드수만 얻음
|
||||
$sql = " select COUNT(*) as cnt " . $sql_common;
|
||||
$row = sql_fetch($sql);
|
||||
$total_count = $row['cnt'];
|
||||
|
||||
$rows = 5;
|
||||
$total_page = ceil($total_count / $rows); // 전체 페이지 계산
|
||||
if ($page == "") $page = 1; // 페이지가 없으면 첫 페이지 (1 페이지)
|
||||
$from_record = ($page - 1) * $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++)
|
||||
{
|
||||
$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'];
|
||||
|
||||
$hash = md5($row['is_id'].$row['is_time'].$row['is_ip']);
|
||||
|
||||
// http://stackoverflow.com/questions/6967081/show-hide-multiple-divs-with-jquery?answertab=votes#tab-top
|
||||
|
||||
if ($i == 0) echo '<ol id="sit_use_ol">';
|
||||
?>
|
||||
|
||||
<li class="sit_use_li">
|
||||
<button type="button" class="sit_use_li_title" onclick="javascript:qa_menu('sit_use_con_<?php echo $i; ?>')"><b><?php echo $is_num; ?>.</b> <?php echo $is_subject; ?></button>
|
||||
<dl class="sit_use_dl">
|
||||
<dt>작성자</dt>
|
||||
<dd><?php echo $is_name; ?></dd>
|
||||
<dt>작성일</dt>
|
||||
<dd><?php echo $is_time; ?></dd>
|
||||
<dt>선호도<dt>
|
||||
<dd class="sit_use_star"><img src="<?php echo G5_SHOP_URL; ?>/img/s_star<?php echo $is_star; ?>.png" alt="별<?php echo $is_star; ?>개"></dd>
|
||||
</dl>
|
||||
|
||||
<div id="sit_use_con_<?php echo $i; ?>" class="sit_use_con">
|
||||
<div class="sit_use_p">
|
||||
<?php echo $is_content; // 사용후기 내용 ?>
|
||||
</div>
|
||||
|
||||
<?php if ($is_admin || $row['mb_id'] == $member['mb_id']) { ?>
|
||||
<div class="sit_use_cmd">
|
||||
<a href="<?php echo $itemuse_form."&is_id={$row['is_id']}&w=u"; ?>" class="itemuse_form btn01" onclick="return false;">수정</a>
|
||||
<a href="<?php echo $itemuse_formupdate."&is_id={$row['is_id']}&w=d&hash={$hash}"; ?>" class="itemuse_delete btn01">삭제</a>
|
||||
</div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
<?php }
|
||||
|
||||
if ($i >= 0) echo '</ol>';
|
||||
|
||||
if (!$i) echo '<p class="sit_empty">사용후기가 없습니다.</p>';
|
||||
?>
|
||||
</section>
|
||||
|
||||
<?php
|
||||
echo itemuse_page($config['cf_mobile_pages'], $page, $total_page, "./itemuse.php?it_id=$it_id&page=", "");
|
||||
?>
|
||||
|
||||
<div id="sit_use_wbtn">
|
||||
<a href="<?php echo $itemuse_form; ?>" class="btn02 itemuse_form" onclick="return false;">사용후기 쓰기<span class="sound_only"> 새 창</span></a>
|
||||
<a href="<?php echo $itemuse_list; ?>" class="btn01 itemuse_list">더보기</a>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
$(function(){
|
||||
$(".itemuse_form").click(function(){
|
||||
window.open(this.href, "itemuse_form", "width=800,height=500,scrollbars=1");
|
||||
return false;
|
||||
});
|
||||
|
||||
$(".itemuse_delete").click(function(){
|
||||
if (confirm("정말 삭제 하시겠습니까?\n\n삭제후에는 되돌릴수 없습니다.")) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
$(".use_href").click(function(){
|
||||
var $content = $("#use_div"+$(this).attr("target"));
|
||||
$(".use_div").each(function(index, value){
|
||||
if ($(this).get(0) == $content.get(0)) { // 객체의 비교시 .get(0) 를 사용한다.
|
||||
$(this).is(":hidden") ? $(this).show() : $(this).hide();
|
||||
} else {
|
||||
$(this).hide();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$(".pg_page").click(function(){
|
||||
//alert($(this).attr("href"));
|
||||
$(top.document).find('#itemuse').load($(this).attr("href"));
|
||||
return false;
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<!-- } 상품 사용후기 끝 -->
|
||||
if(!file_exists($itemuse_skin)) {
|
||||
echo str_replace(G5_PATH.'/', '', $itemuse_skin).' 스킨 파일이 존재하지 않습니다.';
|
||||
} else {
|
||||
include_once($itemuse_skin);
|
||||
}
|
||||
?>
|
||||
@ -2,13 +2,6 @@
|
||||
include_once('./_common.php');
|
||||
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("사용후기는 회원만 작성 가능합니다.");
|
||||
}
|
||||
@ -30,104 +23,14 @@ if ($w == "") {
|
||||
}
|
||||
|
||||
include_once(G5_PATH.'/head.sub.php');
|
||||
?>
|
||||
|
||||
<!-- 사용후기 쓰기 시작 { -->
|
||||
<div id="sit_use_write" class="new_win">
|
||||
<h1 class="new_win_title">사용후기 쓰기</h1>
|
||||
$itemuseform_skin = G5_MSHOP_SKIN_PATH.'/itemuseform.skin.php';
|
||||
|
||||
<form name="fitemuse" method="post" action="./itemuseformupdate.php" onsubmit="return fitemuse_submit(this);" autocomplete="off">
|
||||
<input type="hidden" name="w" value="<?php echo $w; ?>">
|
||||
<input type="hidden" name="it_id" value="<?php echo $it_id; ?>">
|
||||
<input type="hidden" name="is_id" value="<?php echo $is_id; ?>">
|
||||
|
||||
<table class="frm_tbl">
|
||||
<colgroup>
|
||||
<col class="grid_2">
|
||||
<col>
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th scope="row"><label for="is_subject">제목</label></th>
|
||||
<td><input type="text" name="is_subject" value="<?php echo get_text($use['is_subject']); ?>" id="is_subject" required class="frm_input" minlength="2" maxlength="250"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="" style="width:200px;">내용</label></th>
|
||||
<td><?php echo editor_html('is_content', $use['is_content']); ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">평가</th>
|
||||
<td>
|
||||
<ul id="sit_use_write_star">
|
||||
<li>
|
||||
<input type="radio" name="is_score" value="10" id="is_score10" <?php echo ($is_score==10)?'checked="checked"':''; ?>>
|
||||
<label for="is_score10">매우만족</label>
|
||||
<img src="<?php echo G5_URL; ?>/img/shop/s_star5.png">
|
||||
</li>
|
||||
<li>
|
||||
<input type="radio" name="is_score" value="8" id="is_score8" <?php echo ($is_score==8)?'checked="checked"':''; ?>>
|
||||
<label for="is_score8">만족</label>
|
||||
<img src="<?php echo G5_URL; ?>/img/shop/s_star4.png">
|
||||
</li>
|
||||
<li>
|
||||
<input type="radio" name="is_score" value="6" id="is_score6" <?php echo ($is_score==6)?'checked="checked"':''; ?>>
|
||||
<label for="is_score6">보통</label>
|
||||
<img src="<?php echo G5_URL; ?>/img/shop/s_star3.png">
|
||||
</li>
|
||||
<li>
|
||||
<input type="radio" name="is_score" value="4" id="is_score4" <?php echo ($is_score==4)?'checked="checked"':''; ?>>
|
||||
<label for="is_score4">불만</label>
|
||||
<img src="<?php echo G5_URL; ?>/img/shop/s_star2.png">
|
||||
</li>
|
||||
<li>
|
||||
<input type="radio" name="is_score" value="2" id="is_score2" <?php echo ($is_score==2)?'checked="checked"':''; ?>>
|
||||
<label for="is_score2">매우불만</label>
|
||||
<img src="<?php echo G5_URL; ?>/img/shop/s_star1.png">
|
||||
</li>
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<div class="btn_win">
|
||||
<input type="submit" value="작성완료" class="btn_submit">
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
function fitemuse_submit(f)
|
||||
{
|
||||
/*
|
||||
if (document.getElementById('tx_is_content')) {
|
||||
var len = ed_is_content.inputLength();
|
||||
if (len == 0) {
|
||||
alert('내용을 입력하십시오.');
|
||||
ed_is_content.returnFalse();
|
||||
return false;
|
||||
} else if (len > 1000) {
|
||||
alert('내용은 1000글자 까지만 입력해 주세요.');
|
||||
ed_is_content.returnFalse();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
<?php echo get_editor_js('is_content'); ?>
|
||||
|
||||
if (is_content_editor_data.length > <?php echo $is_content_max_length; ?>) {
|
||||
alert("내용은 <?php echo $is_content_max_length; ?> 글자 이내에서 작성해 주세요. (한글은 영문 3자)\n\n현재 : "+is_content_editor_data.length+" 글자");
|
||||
CKEDITOR.instances.is_content.focus();
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
if(!file_exists($itemuseform_skin)) {
|
||||
echo str_replace(G5_PATH.'/', '', $itemuseform_skin).' 스킨 파일이 존재하지 않습니다.';
|
||||
} else {
|
||||
include_once($itemuseform_skin);
|
||||
}
|
||||
</script>
|
||||
<!-- } 사용후기 쓰기 끝 -->
|
||||
|
||||
<?php
|
||||
include_once(G5_PATH.'/tail.sub.php');
|
||||
?>
|
||||
@ -1,85 +0,0 @@
|
||||
<?php
|
||||
include_once('./_common.php');
|
||||
|
||||
if (!$is_member) {
|
||||
alert_close("사용후기는 회원만 작성이 가능합니다.");
|
||||
}
|
||||
|
||||
$is_subject = trim($_REQUEST['is_subject']);
|
||||
$is_content = trim($_REQUEST['is_content']);
|
||||
|
||||
if ($w == "" || $w == "u") {
|
||||
$is_name = $member['mb_name'];
|
||||
$is_password = $member['mb_password'];
|
||||
|
||||
if (!$is_subject) alert("제목을 입력하여 주십시오.");
|
||||
if (!$is_content) alert("내용을 입력하여 주십시오.");
|
||||
}
|
||||
|
||||
$url = "./item.php?it_id=$it_id&_=".get_token()."#sit_use";
|
||||
|
||||
if ($w == "")
|
||||
{
|
||||
/*
|
||||
$sql = " select max(is_id) as max_is_id from {$g5['g5_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 {$g5['g5_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 {$g5['g5_shop_item_use_table']}
|
||||
set it_id = '$it_id',
|
||||
mb_id = '{$member['mb_id']}',
|
||||
is_score = '$is_score',
|
||||
is_name = '$is_name',
|
||||
is_password = '$is_password',
|
||||
is_subject = '$is_subject',
|
||||
is_content = '$is_content',
|
||||
is_time = '".G5_TIME_YMDHIS."',
|
||||
is_ip = '{$_SERVER['REMOTE_ADDR']}' ";
|
||||
if (!$default['de_item_use_use'])
|
||||
$sql .= ", is_confirm = '1' ";
|
||||
sql_query($sql);
|
||||
|
||||
if ($default['de_item_use_use']) {
|
||||
alert_opener("평가하신 글은 관리자가 확인한 후에 출력됩니다.", $url);
|
||||
} else {
|
||||
alert_opener("사용후기가 등록 되었습니다.", $url);
|
||||
}
|
||||
}
|
||||
else if ($w == "u")
|
||||
{
|
||||
$sql = " select is_password from {$g5['g5_shop_item_use_table']} where is_id = '$is_id' ";
|
||||
$row = sql_fetch($sql);
|
||||
if ($row['is_password'] != $is_password)
|
||||
alert("패스워드가 틀리므로 수정하실 수 없습니다.");
|
||||
|
||||
$sql = " update {$g5['g5_shop_item_use_table']}
|
||||
set is_subject = '$is_subject',
|
||||
is_content = '$is_content',
|
||||
is_score = '$is_score'
|
||||
where is_id = '$is_id' ";
|
||||
sql_query($sql);
|
||||
|
||||
alert_opener("사용후기가 수정 되었습니다.", $url);
|
||||
}
|
||||
else if ($w == "d")
|
||||
{
|
||||
if (!$is_admin)
|
||||
{
|
||||
$sql = " select count(*) as cnt from {$g5['g5_shop_item_use_table']} where mb_id = '{$member['mb_id']}' and is_id = '$is_id' ";
|
||||
$row = sql_fetch($sql);
|
||||
if (!$row['cnt'])
|
||||
alert("자신의 사용후기만 삭제하실 수 있습니다.");
|
||||
}
|
||||
|
||||
$sql = " delete from {$g5['g5_shop_item_use_table']} where is_id = '$is_id' and md5(concat(is_id,is_time,is_ip)) = '{$hash}' ";
|
||||
sql_query($sql);
|
||||
|
||||
alert("사용후기를 삭제 하였습니다.", $url);
|
||||
}
|
||||
?>
|
||||
@ -48,107 +48,21 @@ $rows = $config['cf_page_rows'];
|
||||
$total_page = ceil($total_count / $rows); // 전체 페이지 계산
|
||||
if ($page == "") { $page = 1; } // 페이지가 없으면 첫 페이지 (1 페이지)
|
||||
$from_record = ($page - 1) * $rows; // 시작 열을 구함
|
||||
?>
|
||||
|
||||
<!-- 전체 상품 사용후기 목록 시작 { -->
|
||||
<form method="get" action="<?php echo $_SERVER['PHP_SELF']; ?>">
|
||||
<div id="sps_sch">
|
||||
<a href="<?php echo $_SERVER['PHP_SELF']; ?>">전체보기</a>
|
||||
<label for="sfl" class="sound_only">검색항목</label>
|
||||
<select name="sfl" id="sfl" required>
|
||||
<option value="">선택</option>
|
||||
<option value="b.it_name" <?php echo get_selected($sfl, "b.it_name"); ?>>상품명</option>
|
||||
<option value="a.it_id" <?php echo get_selected($sfl, "a.it_id"); ?>>상품코드</option>
|
||||
<option value="a.is_subject"<?php echo get_selected($sfl, "a.is_subject"); ?>>후기제목</option>
|
||||
<option value="a.is_content"<?php echo get_selected($sfl, "a.is_content"); ?>>후기내용</option>
|
||||
<option value="a.is_name" <?php echo get_selected($sfl, "a.is_name"); ?>>작성자명</option>
|
||||
<option value="a.mb_id" <?php echo get_selected($sfl, "a.mb_id"); ?>>작성자아이디</option>
|
||||
</select>
|
||||
$sql = " select *
|
||||
$sql_common
|
||||
$sql_search
|
||||
$sql_order
|
||||
limit $from_record, $rows ";
|
||||
$result = sql_query($sql);
|
||||
|
||||
<label for="stx" class="sound_only">검색어<strong class="sound_only"> 필수</strong></label>
|
||||
<input type="text" name="stx" value="<?php echo $stx; ?>" id="stx" required class="frm_input">
|
||||
<input type="submit" value="검색" class="btn_submit">
|
||||
</div>
|
||||
</form>
|
||||
$itemuselist_skin = G5_MSHOP_SKIN_PATH.'/itemuselist.skin.php';
|
||||
|
||||
<div id="sps">
|
||||
if(!file_exists($itemuselist_skin)) {
|
||||
echo str_replace(G5_PATH.'/', '', $itemuselist_skin).' 스킨 파일이 존재하지 않습니다.';
|
||||
} else {
|
||||
include_once($itemuselist_skin);
|
||||
}
|
||||
|
||||
<!-- <p><?php echo $config['cf_title']; ?> 전체 사용후기 목록입니다.</p> -->
|
||||
|
||||
<?php
|
||||
$sql = " select *
|
||||
$sql_common
|
||||
$sql_search
|
||||
$sql_order
|
||||
limit $from_record, $rows ";
|
||||
$result = sql_query($sql);
|
||||
for ($i=0; $row=sql_fetch_array($result); $i++)
|
||||
{
|
||||
$num = $total_count - ($page - 1) * $rows - $i;
|
||||
$star = get_star($row['is_score']);
|
||||
|
||||
$is_content = get_view_thumbnail($row['is_content'], 500);
|
||||
$small_image = $row['it_id'];
|
||||
|
||||
$row2 = sql_fetch(" select it_name from {$g5['g5_shop_item_table']} where it_id = '{$row['it_id']}' ");
|
||||
$it_href = G5_SHOP_URL."/item.php?it_id={$row['it_id']}";
|
||||
|
||||
if ($i == 0) echo '<ol>';
|
||||
?>
|
||||
<li>
|
||||
|
||||
<div class="sps_img">
|
||||
<a href="<?php echo $it_href; ?>">
|
||||
<?php echo get_it_image($small_image, 70, 70); ?>
|
||||
<span><?php echo $row2['it_name']; ?></span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<section class="sps_section">
|
||||
<h2><?php echo $row['is_subject']; ?></h2>
|
||||
|
||||
<dl class="sps_dl">
|
||||
<dt>작성자</dt>
|
||||
<dd><?php echo $row['is_name']; ?></dd>
|
||||
<dt>작성일</dt>
|
||||
<dd><?php echo substr($row['is_time'],0,10); ?></dd>
|
||||
<dt>평가점수</dt>
|
||||
<dd><img src="<?php echo G5_URL; ?>/img/shop/s_star<?php echo $star; ?>.png" alt="별<?php echo $star; ?>개"></dd>
|
||||
</dl>
|
||||
|
||||
<div id="sps_con_<?php echo $i; ?>" style="display:none;">
|
||||
<?php echo $is_content; // 사용후기 내용 ?>
|
||||
</div>
|
||||
|
||||
<div class="sps_con_btn"><button class="sps_con_<?php echo $i; ?>">보기</button></div>
|
||||
</section>
|
||||
|
||||
</li>
|
||||
<?php }
|
||||
if ($i > 0) echo '</ol>';
|
||||
if ($i == 0) echo '<p id="sps_empty">자료가 없습니다.</p>';
|
||||
?>
|
||||
</div>
|
||||
|
||||
<?php echo get_paging($config['cf_write_pages'], $page, $total_page, "{$_SERVER['PHP_SELF']}?$qstr&page="); ?>
|
||||
|
||||
<script>
|
||||
$(function(){
|
||||
// 사용후기 더보기
|
||||
$(".sps_con_btn button").click(function(){
|
||||
var sps_con_no = $(this).attr("class");
|
||||
$("#"+sps_con_no).is(":hidden") ? $("#"+sps_con_no).show() : $("#"+sps_con_no).hide();
|
||||
});
|
||||
|
||||
$(".sps_con_btn button").toggle(function(){
|
||||
$(this).text("닫기");
|
||||
}, function(){
|
||||
$(this).text("보기");
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<!-- } 전체 상품 사용후기 목록 끝 -->
|
||||
|
||||
<?php
|
||||
include_once(G5_MSHOP_PATH.'/_tail.php');
|
||||
?>
|
||||
|
||||
@ -11,19 +11,19 @@ if (!$ca['ca_id'])
|
||||
|
||||
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('본인확인으로 성인인증된 회원만 이용할 수 있습니다.');
|
||||
}
|
||||
}
|
||||
|
||||
@ -38,11 +38,16 @@ if ($is_admin)
|
||||
echo '<div class="sct_admin"><a href="'.G5_ADMIN_URL.'/shop_admin/categoryform.php?w=u&ca_id='.$ca_id.'" class="btn_admin">분류 관리</a></div>';
|
||||
?>
|
||||
|
||||
<script>
|
||||
var itemlist_ca_id = "<?php echo $ca_id; ?>";
|
||||
</script>
|
||||
<script src="<?php echo G5_JS_URL; ?>/shop.list.js"></script>
|
||||
|
||||
<div id="sct">
|
||||
|
||||
<?php
|
||||
$nav_ca_id = $ca_id;
|
||||
include G5_MSHOP_PATH.'/navigation1.inc.php';
|
||||
include G5_MSHOP_SKIN_PATH.'/navigation.skin.php';
|
||||
|
||||
// 상단 HTML
|
||||
echo '<div id="sct_hhtml">'.stripslashes($ca['ca_mobile_head_html']).'</div>';
|
||||
@ -56,10 +61,10 @@ if ($is_admin)
|
||||
// 리스트 유형별로 출력
|
||||
$list_file = G5_MSHOP_SKIN_PATH.'/'.$ca['ca_mobile_skin'];
|
||||
if (file_exists($list_file)) {
|
||||
include G5_MSHOP_PATH.'/list.sort.php';
|
||||
include G5_MSHOP_SKIN_PATH.'/list.sort.skin.php';
|
||||
|
||||
// 상품 보기 타입 변경 버튼
|
||||
include G5_SHOP_PATH.'/list.sub.php';
|
||||
include G5_MSHOP_SKIN_PATH.'/list.sub.skin.php';
|
||||
|
||||
// 총몇개
|
||||
$items = $ca['ca_mobile_list_mod'];
|
||||
@ -103,9 +108,6 @@ if ($is_admin)
|
||||
?>
|
||||
|
||||
<?php
|
||||
// 상품 보기 타입 변경 처리 스크립트
|
||||
include G5_SHOP_PATH.'/list.sub2.php';
|
||||
|
||||
$qstr1 .= 'ca_id='.$ca_id;
|
||||
if($skin)
|
||||
$qstr1 .= '&skin='.$skin;
|
||||
|
||||
@ -1,33 +0,0 @@
|
||||
<?php
|
||||
$str = '';
|
||||
$exists = false;
|
||||
|
||||
$ca_id_len = strlen($ca_id);
|
||||
$len2 = $ca_id_len + 2;
|
||||
$len4 = $ca_id_len + 4;
|
||||
|
||||
$sql = " select ca_id, ca_name from {$g5['g5_shop_category_table']}
|
||||
where ca_id like '$ca_id%'
|
||||
and length(ca_id) = $len2
|
||||
and ca_use = '1'
|
||||
order by ca_id ";
|
||||
$result = sql_query($sql);
|
||||
while ($row=sql_fetch_array($result)) {
|
||||
|
||||
$row2 = sql_fetch(" select count(*) as cnt from {$g5['g5_shop_item_table']} where (ca_id like '{$row['ca_id']}%' or ca_id2 like '{$row['ca_id']}%' or ca_id3 like '{$row['ca_id']}%') and it_use = '1' ");
|
||||
|
||||
$str .= '<li><a href="./list.php?ca_id='.$row['ca_id'].'">'.$row['ca_name'].' ('.$row2['cnt'].')</a></li>';
|
||||
$exists = true;
|
||||
}
|
||||
|
||||
if ($exists) {
|
||||
?>
|
||||
|
||||
<aside id="sct_ct_1" class="sct_ct">
|
||||
<h2>현재 상품 분류와 관련된 분류</h2>
|
||||
<ul>
|
||||
<?php echo $str; ?>
|
||||
</ul>
|
||||
</aside>
|
||||
|
||||
<?php } ?>
|
||||
@ -1,68 +0,0 @@
|
||||
<?php
|
||||
$str = '';
|
||||
$exists = false;
|
||||
|
||||
$ca_id_len = strlen($ca_id);
|
||||
$len2 = $ca_id_len + 2;
|
||||
$len4 = $ca_id_len + 4;
|
||||
|
||||
// 최하위 분류의 경우 상단에 동일한 레벨의 분류를 출력해주는 코드
|
||||
if (!$exists) {
|
||||
$str = '';
|
||||
|
||||
$tmp_ca_id = substr($ca_id, 0, strlen($ca_id)-2);
|
||||
$tmp_ca_id_len = strlen($tmp_ca_id);
|
||||
$len2 = $tmp_ca_id_len + 2;
|
||||
$len4 = $tmp_ca_id_len + 4;
|
||||
|
||||
// 차차기 분류의 건수를 얻음
|
||||
$sql = " select count(*) as cnt from {$g5['g5_shop_category_table']}
|
||||
where ca_id like '$tmp_ca_id%'
|
||||
and ca_use = '1'
|
||||
and length(ca_id) = $len4 ";
|
||||
$row = sql_fetch($sql);
|
||||
$cnt = $row['cnt'];
|
||||
|
||||
$sql = " select ca_id, ca_name from {$g5['g5_shop_category_table']}
|
||||
where ca_id like '$tmp_ca_id%'
|
||||
and ca_use = '1'
|
||||
and length(ca_id) = $len2 order by ca_id ";
|
||||
$result = sql_query($sql);
|
||||
while ($row=sql_fetch_array($result)) {
|
||||
$sct_ct_here = '';
|
||||
if ($ca_id == $row['ca_id']) // 활성 분류 표시
|
||||
$sct_ct_here = 'sct_ct_here';
|
||||
|
||||
$str .= '<li>';
|
||||
if ($cnt) {
|
||||
$str .= '<a href="./list.php?ca_id='.$row['ca_id'].'" class="sct_ct_parent '.$sct_ct_here.'">'.$row['ca_name'].'</a>';
|
||||
$sql2 = " select ca_id, ca_name from {$g5['g5_shop_category_table']}
|
||||
where ca_id like '{$row['ca_id']}%'
|
||||
and ca_use = '1'
|
||||
and length(ca_id) = $len4 order by ca_id ";
|
||||
$result2 = sql_query($sql2);
|
||||
$k=0;
|
||||
while ($row2=sql_fetch_array($result2)) {
|
||||
$str .= '<a href="./list.php?ca_id='.$row2['ca_id'].'">'.$row2['ca_name'].'</a>';
|
||||
$k++;
|
||||
}
|
||||
} else {
|
||||
$str .= '<a href="./list.php?ca_id='.$row['ca_id'].'" class="sct_ct_parent '.$sct_ct_here.'">'.$row['ca_name'].'</a>';
|
||||
}
|
||||
$str .= '</li>';
|
||||
$exists = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if ($exists) {
|
||||
?>
|
||||
|
||||
<aside id="sct_ct_2" class="sct_ct">
|
||||
<h2>현재 상품 분류와 관련된 분류</h2>
|
||||
<ul>
|
||||
<?php echo $str; ?>
|
||||
</ul>
|
||||
</aside>
|
||||
|
||||
<?php } ?>
|
||||
@ -1,32 +0,0 @@
|
||||
<?php
|
||||
$str = '';
|
||||
$exists = false;
|
||||
|
||||
$depth2_ca_id = substr($ca_id, 0, 2);
|
||||
|
||||
$sql = " select ca_id, ca_name from {$g5['g5_shop_category_table']}
|
||||
where ca_id like '${depth2_ca_id}%'
|
||||
and length(ca_id) = 4
|
||||
and ca_use = '1'
|
||||
order by ca_id ";
|
||||
$result = sql_query($sql);
|
||||
while ($row=sql_fetch_array($result)) {
|
||||
if (preg_match("/^{$row['ca_id']}/", $ca_id))
|
||||
$sct_ct_here = 'sct_ct_here';
|
||||
else
|
||||
$sct_ct_here = '';
|
||||
$str .= '<li><a href="./list.php?ca_id='.$row['ca_id'].'" class="'.$sct_ct_here.'">'.$row['ca_name'].'</a></li>';
|
||||
$exists = true;
|
||||
}
|
||||
|
||||
if ($exists) {
|
||||
?>
|
||||
|
||||
<aside id="sct_ct_3" class="sct_ct">
|
||||
<h2>현재 상품 분류와 관련된 분류</h2>
|
||||
<ul>
|
||||
<?php echo $str; ?>
|
||||
</ul>
|
||||
</aside>
|
||||
|
||||
<?php } ?>
|
||||
@ -29,7 +29,7 @@ if ($sort != '')
|
||||
$error = '<img src="'.G5_SHOP_URL.'/img/no_item.gif">';
|
||||
|
||||
if (!$skin)
|
||||
$skin = "list.10.skin.php";
|
||||
$skin = 'list.10.skin.php';
|
||||
|
||||
// 리스트 유형별로 출력
|
||||
$list_file = G5_SHOP_SKIN_PATH.'/'.$skin;
|
||||
@ -43,7 +43,7 @@ if (file_exists($list_file)) {
|
||||
|
||||
$list = new item_list();
|
||||
$list->set_type($type);
|
||||
$list->set_list_skin('list.10.skin.php');
|
||||
$list->set_list_skin($skin);
|
||||
$list->set_list_mod($list_mod);
|
||||
$list->set_list_row($list_row);
|
||||
$list->set_img_size($img_width, $img_height);
|
||||
|
||||
BIN
mobile/skin/shop/basic/img/sns_fb.png
Normal file
BIN
mobile/skin/shop/basic/img/sns_fb.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 535 B |
BIN
mobile/skin/shop/basic/img/sns_fb2.png
Normal file
BIN
mobile/skin/shop/basic/img/sns_fb2.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 512 B |
BIN
mobile/skin/shop/basic/img/sns_goo.png
Normal file
BIN
mobile/skin/shop/basic/img/sns_goo.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 715 B |
BIN
mobile/skin/shop/basic/img/sns_goo2.png
Normal file
BIN
mobile/skin/shop/basic/img/sns_goo2.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 686 B |
BIN
mobile/skin/shop/basic/img/sns_twt.png
Normal file
BIN
mobile/skin/shop/basic/img/sns_twt.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 538 B |
BIN
mobile/skin/shop/basic/img/sns_twt2.png
Normal file
BIN
mobile/skin/shop/basic/img/sns_twt2.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 585 B |
434
mobile/skin/shop/basic/item.form.skin.php
Normal file
434
mobile/skin/shop/basic/item.form.skin.php
Normal file
@ -0,0 +1,434 @@
|
||||
<?php
|
||||
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
|
||||
|
||||
// 이전 상품보기
|
||||
$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 = '<a href="'.G5_SHOP_URL.'/item.php?it_id='.$row['it_id'].'">';
|
||||
$prev_href = '</a>';
|
||||
} 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 = '<a href="'.G5_SHOP_URL.'/item.php?it_id='.$row['it_id'].'">';
|
||||
$next_href2 = '</a>';
|
||||
} else {
|
||||
$next_title = '';
|
||||
$next_href = '';
|
||||
$next_href2 = '';
|
||||
}
|
||||
?>
|
||||
|
||||
<link rel="stylesheet" href="<?php echo G5_MSHOP_SKIN_URL; ?>/style.css">
|
||||
|
||||
<form name="fitem" action="<?php echo $action_url; ?>" method="post" onsubmit="return fitem_submit(this);">
|
||||
<input type="hidden" name="it_id[]" value="<?php echo $it['it_id']; ?>">
|
||||
<input type="hidden" name="sw_direct">
|
||||
<input type="hidden" name="url">
|
||||
|
||||
<div id="sit_ov_wrap">
|
||||
<div id="sit_pvi">
|
||||
<button type="button" id="sit_pvi_prev" class="sit_pvi_btn">이전</button>
|
||||
<button type="button" id="sit_pvi_next" class="sit_pvi_btn">다음</button>
|
||||
<?php
|
||||
// 이미지(중) 썸네일
|
||||
$thumb_count = 0;
|
||||
for ($i=1; $i<=10; $i++)
|
||||
{
|
||||
if(!$it['it_img'.$i])
|
||||
continue;
|
||||
|
||||
if($thumb_count == 0) echo '<ul id="sit_pvi_slide">';
|
||||
$thumb = get_it_thumbnail($it['it_img'.$i], 280, 280);
|
||||
|
||||
if(!$thumb)
|
||||
continue;
|
||||
|
||||
echo '<li>';
|
||||
echo '<a href="'.G5_SHOP_URL.'/largeimage.php?it_id='.$it['it_id'].'&no='.$i.'" class="popup_item_image slide_img" target="_blank">'.$thumb.'</a>';
|
||||
echo '</li>';
|
||||
|
||||
$thumb_count++;
|
||||
}
|
||||
if ($thumb_count > 0) echo '</ul>';
|
||||
?>
|
||||
<script>
|
||||
$(function() {
|
||||
var time = 500;
|
||||
var idx = idx2 = 0;
|
||||
var slide_width = $("#sit_pvi_slide").width();
|
||||
var slide_count = $("#sit_pvi_slide li").size();
|
||||
$("#sit_pvi_slide li:first").css("display", "block");
|
||||
if(slide_count > 1)
|
||||
$(".sit_pvi_btn").css("display", "inline");
|
||||
|
||||
$("#sit_pvi_prev").click(function() {
|
||||
if(slide_count > 1) {
|
||||
idx2 = (idx - 1) % slide_count;
|
||||
if(idx2 < 0)
|
||||
idx2 = slide_count - 1;
|
||||
$("#sit_pvi_slide li:hidden").css("left", "-"+slide_width+"px");
|
||||
$("#sit_pvi_slide li:eq("+idx+")").filter(":not(:animated)").animate({ left: "+="+slide_width+"px" }, time, function() {
|
||||
$(this).css("display", "none").css("left", "-"+slide_width+"px");
|
||||
});
|
||||
$("#sit_pvi_slide li:eq("+idx2+")").css("display", "block").filter(":not(:animated)").animate({ left: "+="+slide_width+"px" }, time,
|
||||
function() {
|
||||
idx = idx2;
|
||||
}
|
||||
);
|
||||
}
|
||||
});
|
||||
|
||||
$("#sit_pvi_next").click(function() {
|
||||
if(slide_count > 1) {
|
||||
idx2 = (idx + 1) % slide_count;
|
||||
$("#sit_pvi_slide li:hidden").css("left", slide_width+"px");
|
||||
$("#sit_pvi_slide li:eq("+idx+")").filter(":not(:animated)").animate({ left: "-="+slide_width+"px" }, time, function() {
|
||||
$(this).css("display", "none").css("left", slide_width+"px");
|
||||
});
|
||||
$("#sit_pvi_slide li:eq("+idx2+")").css("display", "block").filter(":not(:animated)").animate({ left: "-="+slide_width+"px" }, time,
|
||||
function() {
|
||||
idx = idx2;
|
||||
}
|
||||
);
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
|
||||
<section id="sit_ov">
|
||||
<h2>상품간략정보 및 구매기능</h2>
|
||||
<strong id="sit_title"><?php echo stripslashes($it['it_name']); ?></strong><br>
|
||||
<span id="sit_desc"><?php echo $it['it_basic']; ?></span>
|
||||
<?php if ($score = get_star_image($it['it_id'])) { ?>
|
||||
<div id="sit_star_sns">
|
||||
<?php
|
||||
$sns_title = get_text($it['it_name']).' | '.get_text($config['cf_title']);
|
||||
$sns_url = G5_SHOP_URL.'/item.php?it_id='.$it['it_id'];
|
||||
?>
|
||||
고객선호도 <span>별<?php echo $score?>개</span>
|
||||
<img src="<?php echo G5_SHOP_URL; ?>/img/s_star<?php echo $score?>.png" alt="" class="sit_star">
|
||||
<?php echo get_sns_share_link('facebook', $sns_url, $sns_title, G5_MSHOP_SKIN_URL.'/img/sns_fb2.png'); ?>
|
||||
<?php echo get_sns_share_link('twitter', $sns_url, $sns_title, G5_MSHOP_SKIN_URL.'/img/sns_twt2.png'); ?>
|
||||
<?php echo get_sns_share_link('googleplus', $sns_url, $sns_title, G5_MSHOP_SKIN_URL.'/img/sns_goo2.png'); ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<table class="sit_ov_tbl">
|
||||
<colgroup>
|
||||
<col class="grid_3">
|
||||
<col>
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<?php if ($it['it_maker']) { ?>
|
||||
<tr>
|
||||
<th scope="row">제조사</th>
|
||||
<td><?php echo $it['it_maker']; ?></td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
|
||||
<?php if ($it['it_origin']) { ?>
|
||||
<tr>
|
||||
<th scope="row">원산지</th>
|
||||
<td><?php echo $it['it_origin']; ?></td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
|
||||
<?php if ($it['it_brand']) { ?>
|
||||
<tr>
|
||||
<th scope="row">브랜드</th>
|
||||
<td><?php echo $it['it_brand']; ?></td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
|
||||
<?php if ($it['it_model']) { ?>
|
||||
<tr>
|
||||
<th scope="row">모델</th>
|
||||
<td><?php echo $it['it_model']; ?></td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
|
||||
<?php if ($it['it_tel_inq']) { // 전화문의일 경우 ?>
|
||||
|
||||
<tr>
|
||||
<th scope="row">판매가격</th>
|
||||
<td>전화문의</td>
|
||||
</tr>
|
||||
|
||||
<?php } else { // 전화문의가 아닐 경우?>
|
||||
<?php if ($it['it_cust_price']) { // 1.00.03?>
|
||||
<tr>
|
||||
<th scope="row">시중가격</th>
|
||||
<td><?php echo display_price($it['it_cust_price']); ?></td>
|
||||
</tr>
|
||||
<?php } // 전화문의 끝?>
|
||||
|
||||
<tr>
|
||||
<th scope="row">판매가격</th>
|
||||
<td>
|
||||
<?php echo number_format(get_price($it)); ?> 원
|
||||
<input type="hidden" id="it_price" value="<?php echo get_price($it); ?>">
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<?php
|
||||
/* 재고 표시하는 경우 주석 해제
|
||||
<tr>
|
||||
<th scope="row">재고수량</th>
|
||||
<td><?php echo number_format(get_it_stock_qty($it_id)); ?> 개</td>
|
||||
</tr>
|
||||
*/
|
||||
?>
|
||||
|
||||
<?php if ($config['cf_use_point']) { // 포인트 사용한다면 ?>
|
||||
<tr>
|
||||
<th scope="row"><label for="disp_point">포인트</label></th>
|
||||
<td>
|
||||
<?php
|
||||
$it_point = get_item_point($it);
|
||||
echo number_format($it_point);
|
||||
?> 점
|
||||
</td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
<?php if($default['de_send_cost_case'] == '개별' && $it['it_sc_type'] != 0) { ?>
|
||||
<tr>
|
||||
<th><label for="ct_send_cost">배송비결제</label></th>
|
||||
<td>
|
||||
<?php
|
||||
if($it['it_sc_method'] == 2) {
|
||||
?>
|
||||
<select name="ct_send_cost" id="ct_send_cost">
|
||||
<option value="0">주문시 결제</option>
|
||||
<option value="1">수령후 지불</option>
|
||||
</select>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<?php
|
||||
$option_1 = get_item_options($it['it_id'], $it['it_option_subject']);
|
||||
if($option_1) {
|
||||
?>
|
||||
<section>
|
||||
<h3>선택옵션</h3>
|
||||
<table class="sit_ov_tbl">
|
||||
<colgroup>
|
||||
<col class="grid_3">
|
||||
<col>
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<?php // 선택옵션
|
||||
echo $option_1;
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</section>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
||||
<?php
|
||||
$option_2 = get_item_supply($it['it_id'], $it['it_supply_subject']);
|
||||
if($option_2) {
|
||||
?>
|
||||
<section>
|
||||
<h3>추가옵션</h3>
|
||||
<table class="sit_ov_tbl">
|
||||
<colgroup>
|
||||
<col class="grid_3">
|
||||
<col>
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<?php // 추가옵션
|
||||
echo $option_2;
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</section>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
||||
<?php } // 전화문의가 아닐 경우 끝?>
|
||||
|
||||
<div id="sit_sel_option">
|
||||
<?php if(!$option_1 && !$option_2) { ?>
|
||||
<ul id="sit_opt_added">
|
||||
<li class="sit_opt_list">
|
||||
<input type="hidden" name="io_type[<?php echo $it_id; ?>][]" value="0">
|
||||
<input type="hidden" name="io_id[<?php echo $it_id; ?>][]" value="">
|
||||
<input type="hidden" name="io_value[<?php echo $it_id; ?>][]" value="<?php echo $it['it_name']; ?>">
|
||||
<input type="hidden" class="io_price" value="0">
|
||||
<input type="hidden" class="io_stock" value="<?php echo $it['it_stock_qty']; ?>">
|
||||
<span class="sit_opt_subj"><?php echo $it['it_name']; ?></span>
|
||||
<span class="sit_opt_prc">(+0원)</span>
|
||||
<div>
|
||||
<input type="text" name="ct_qty[<?php echo $it_id; ?>][]" value="1" class="frm_input" size="5">
|
||||
<button type="button" class="sit_qty_plus btn_frmline">증가</button>
|
||||
<button type="button" class="sit_qty_minus btn_frmline">감소</button>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
<script>
|
||||
$(function() {
|
||||
price_calculate();
|
||||
});
|
||||
</script>
|
||||
<?php } ?>
|
||||
</div>
|
||||
|
||||
<div id="sit_tot_price"></div>
|
||||
|
||||
<?php if ($it['it_use']) { ?>
|
||||
<ul id="sit_ov_btn">
|
||||
<?php if (!$it['it_tel_inq']) { ?>
|
||||
<li><input type="submit" onclick="document.pressed=this.value;" value="바로구매" id="sit_btn_buy"></li>
|
||||
<li><input type="submit" onclick="document.pressed=this.value;" value="장바구니" id="sit_btn_cart"></li>
|
||||
<?php } ?>
|
||||
|
||||
<li><a href="javascript:item_wish(document.fitem, '<?php echo $it['it_id']; ?>');" id="sit_btn_wish">위시리스트</a></li>
|
||||
<li><a href="javascript:popup_item_recommend('<?php echo $it['it_id']; ?>');" id="sit_btn_rec">추천하기</a></li>
|
||||
</ul>
|
||||
<?php } ?>
|
||||
|
||||
<script>
|
||||
// 상품보관
|
||||
function item_wish(f, it_id)
|
||||
{
|
||||
f.url.value = "<?php echo G5_SHOP_URL; ?>/wishupdate.php?it_id="+it_id;
|
||||
f.action = "<?php echo G5_SHOP_URL; ?>/wishupdate.php";
|
||||
f.submit();
|
||||
}
|
||||
|
||||
// 추천메일
|
||||
function popup_item_recommend(it_id)
|
||||
{
|
||||
if (!g5_is_member)
|
||||
{
|
||||
if (confirm("회원만 추천하실 수 있습니다."))
|
||||
document.location.href = "<?php echo G5_BBS_URL; ?>/login.php?url=<?php echo urlencode(G5_SHOP_URL."/item.php?it_id=$it_id"); ?>";
|
||||
}
|
||||
else
|
||||
{
|
||||
url = "<?php echo G5_SHOP_URL; ?>/itemrecommend.php?it_id=" + it_id;
|
||||
opt = "scrollbars=yes,width=616,height=420,top=10,left=10";
|
||||
popup_window(url, "itemrecommend", opt);
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
<aside id="sit_siblings">
|
||||
<h2>다른 상품 보기</h2>
|
||||
<?php
|
||||
if ($prev_href || $next_href) {
|
||||
echo $prev_href.$prev_title.$prev_href2;
|
||||
echo $next_href.$next_title.$next_href2;
|
||||
} else {
|
||||
echo '<span class="sound_only">이 분류에 등록된 다른 상품이 없습니다.</span>';
|
||||
}
|
||||
?>
|
||||
</aside>
|
||||
|
||||
<script>
|
||||
function click_item(id)
|
||||
{
|
||||
<?php
|
||||
echo "var str = 'item_explan,item_use,item_qa";
|
||||
if ($default['de_baesong_content']) echo ",item_baesong";
|
||||
if ($default['de_change_content']) echo ",item_change";
|
||||
echo ",item_relation';";
|
||||
?>
|
||||
|
||||
var s = str.split(',');
|
||||
|
||||
for (i=0; i<s.length; i++)
|
||||
{
|
||||
if (id=='*')
|
||||
document.getElementById(s[i]).style.display = 'block';
|
||||
else
|
||||
document.getElementById(s[i]).style.display = 'none';
|
||||
}
|
||||
|
||||
if (id!='*')
|
||||
document.getElementById(id).style.display = 'block';
|
||||
}
|
||||
|
||||
// 바로구매, 장바구니 폼 전송
|
||||
function fitem_submit(f)
|
||||
{
|
||||
if (document.pressed == "장바구니") {
|
||||
f.sw_direct.value = 0;
|
||||
} else { // 바로구매
|
||||
f.sw_direct.value = 1;
|
||||
}
|
||||
|
||||
// 판매가격이 0 보다 작다면
|
||||
if (document.getElementById("it_price").value < 0) {
|
||||
alert("전화로 문의해 주시면 감사하겠습니다.");
|
||||
return false;
|
||||
}
|
||||
|
||||
if($(".sit_opt_list").size() < 1) {
|
||||
alert("상품의 선택옵션을 선택해 주십시오.");
|
||||
return false;
|
||||
}
|
||||
|
||||
var val, result = true;
|
||||
$("input[name^=ct_qty]").each(function() {
|
||||
val = $(this).val();
|
||||
|
||||
if(val.length < 1) {
|
||||
alert("수량을 입력해 주십시오.");
|
||||
result = false;
|
||||
return false;
|
||||
}
|
||||
|
||||
if(val.replace(/[0-9]/g, "").length > 0) {
|
||||
alert("수량은 숫자로 입력해 주십시오.");
|
||||
result = false;
|
||||
return false;
|
||||
}
|
||||
|
||||
if(parseInt(val.replace(/[^0-9]/g, "")) < 1) {
|
||||
alert("수량은 1이상 입력해 주십시오.");
|
||||
result = false;
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
if(!result) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
</script>
|
||||
216
mobile/skin/shop/basic/item.info.skin.php
Normal file
216
mobile/skin/shop/basic/item.info.skin.php
Normal file
@ -0,0 +1,216 @@
|
||||
<?php
|
||||
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
|
||||
|
||||
// 관리자가 확인한 사용후기의 갯수를 얻음
|
||||
$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'];
|
||||
|
||||
if(!function_exists('pg_anchor')) {
|
||||
function pg_anchor($anc_id) {
|
||||
global $default;
|
||||
global $item_use_count, $item_qa_count, $item_relation_count;
|
||||
?>
|
||||
<ul class="sanchor">
|
||||
<li><a href="#sit_inf" <?php if ($anc_id == 'inf') echo 'class="sanchor_on"'; ?>>상품정보</a></li>
|
||||
<li><a href="#sit_use" <?php if ($anc_id == 'use') echo 'class="sanchor_on"'; ?>>사용후기 <span class="item_use_count"><?php echo $item_use_count; ?></span></a></li>
|
||||
<li><a href="#sit_qa" <?php if ($anc_id == 'qa') echo 'class="sanchor_on"'; ?>>상품문의 <span class="item_qa_count"><?php echo $item_qa_count; ?></span></a></li>
|
||||
<?php if ($default['de_baesong_content']) { ?><li><a href="#sit_dvr" <?php if ($anc_id == 'dvr') echo 'class="sanchor_on"'; ?>>배송정보</a></li><?php } ?>
|
||||
<?php if ($default['de_change_content']) { ?><li><a href="#sit_ex" <?php if ($anc_id == 'ex') echo 'class="sanchor_on"'; ?>>교환정보</a></li><?php } ?>
|
||||
<li><a href="#sit_rel" <?php if ($anc_id == 'rel') echo 'class="sanchor_on"'; ?>>관련상품 <span class="item_relation_count"><?php echo $item_relation_count; ?></span></a></li>
|
||||
</ul>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
<link rel="stylesheet" href="<?php echo G5_MSHOP_SKIN_URL; ?>/style.css">
|
||||
|
||||
<section id="sit_inf">
|
||||
<h2>상품 정보</h2>
|
||||
<?php echo pg_anchor('inf'); ?>
|
||||
|
||||
<?php if ($it['it_basic']) { // 상품 기본설명 ?>
|
||||
<div id="sit_inf_basic">
|
||||
<?php echo $it['it_basic']; ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<?php if ($it['it_explan'] || $it['it_mobile_explan']) { // 상품 상세설명 ?>
|
||||
<div id="sit_inf_explan">
|
||||
<?php echo ($it['it_mobile_explan'] ? conv_content($it['it_mobile_explan'], 1) : conv_content($it['it_explan'], 1)); ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<h3>상품 정보 고시</h3>
|
||||
<?php
|
||||
if ($it['it_info_value']) {
|
||||
$info_data = unserialize($it['it_info_value']);
|
||||
$gubun = $it['it_info_gubun'];
|
||||
$info_array = $item_info[$gubun]['article'];
|
||||
?>
|
||||
<!-- 상품정보고시 -->
|
||||
<table id="sit_inf_open">
|
||||
<colgroup>
|
||||
<col class="grid_4">
|
||||
<col>
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<?php
|
||||
foreach($info_data as $key=>$val) {
|
||||
$ii_title = $info_array[$key][0];
|
||||
$ii_value = $val;
|
||||
?>
|
||||
<tr valign="top">
|
||||
<th scope="row"><?php echo $ii_title; ?></th>
|
||||
<td><?php echo $ii_value; ?></th>
|
||||
</tr>
|
||||
<?php } //foreach?>
|
||||
</tbody>
|
||||
</table>
|
||||
<!-- 상품정보고시 end -->
|
||||
<?php } //if?>
|
||||
|
||||
</section>
|
||||
<!-- 상품설명 end -->
|
||||
|
||||
<section id="sit_use">
|
||||
<h2>사용후기</h2>
|
||||
<?php echo pg_anchor('use'); ?>
|
||||
|
||||
<div id="itemuse"><?php include_once('./itemuse.php'); ?></div>
|
||||
</section>
|
||||
|
||||
<section id="sit_qa">
|
||||
<h2>상품문의</h2>
|
||||
<?php echo pg_anchor('qa'); ?>
|
||||
|
||||
<div id="itemqa"><?php include_once('./itemqa.php'); ?></div>
|
||||
</section>
|
||||
|
||||
|
||||
<?php if ($default['de_baesong_content']) { // 배송정보 내용이 있다면 ?>
|
||||
<section id="sit_dvr">
|
||||
<h2>배송정보</h2>
|
||||
<?php echo pg_anchor('dvr'); ?>
|
||||
|
||||
<?php echo conv_content($default['de_baesong_content'], 1); ?>
|
||||
</section>
|
||||
<?php } ?>
|
||||
|
||||
|
||||
<?php if ($default['de_change_content']) { // 교환/반품 내용이 있다면 ?>
|
||||
<section id="sit_ex">
|
||||
<h2>교환/반품</h2>
|
||||
<?php echo pg_anchor('ex'); ?>
|
||||
|
||||
<?php echo conv_content($default['de_change_content'], 1); ?>
|
||||
</section>
|
||||
<?php } ?>
|
||||
|
||||
<section id="sit_rel">
|
||||
<h2>관련상품</h2>
|
||||
<?php echo pg_anchor('rel'); ?>
|
||||
|
||||
<div class="sct_wrap">
|
||||
<?php
|
||||
$sql = " select b.* from {$g5['g5_shop_item_relation_table']} a left join {$g5['g5_shop_item_table']} b on (a.it_id2=b.it_id) where a.it_id = '{$it['it_id']}' and b.it_use='1' ";
|
||||
|
||||
$list = new item_list("item.relation.skin.php", $default['de_rel_list_mod'], 1, $default['de_rel_img_width'], $default['de_rel_img_height']);
|
||||
$list->set_mobile(true);
|
||||
$list->set_query($sql);
|
||||
echo $list->run();
|
||||
?>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<script>
|
||||
$(function(){
|
||||
// 상품이미지 크게보기
|
||||
$(".popup_item_image").click(function() {
|
||||
var url = $(this).attr("href");
|
||||
var top = 10;
|
||||
var left = 10;
|
||||
var opt = 'scrollbars=yes,top='+top+',left='+left;
|
||||
popup_window(url, "largeimage", opt);
|
||||
|
||||
return false;
|
||||
});
|
||||
});
|
||||
|
||||
var save_use_id = null;
|
||||
function use_menu(id)
|
||||
{
|
||||
if (save_use_id != null)
|
||||
document.getElementById(save_use_id).style.display = "none";
|
||||
menu(id);
|
||||
save_use_id = id;
|
||||
}
|
||||
|
||||
var save_qa_id = null;
|
||||
function qa_menu(id)
|
||||
{
|
||||
if (save_qa_id != null)
|
||||
document.getElementById(save_qa_id).style.display = "none";
|
||||
menu(id);
|
||||
save_qa_id = id;
|
||||
}
|
||||
</script>
|
||||
|
||||
<!--[if lte IE 6]>
|
||||
<script>
|
||||
// 이미지 등비율 리사이징
|
||||
$(window).load(function() {
|
||||
view_image_resize();
|
||||
});
|
||||
|
||||
function view_image_resize()
|
||||
{
|
||||
var $img = $("#sit_inf_explan img");
|
||||
var img_wrap = $("#sit_inf_explan").width();
|
||||
var win_width = $(window).width() - 35;
|
||||
var res_width = 0;
|
||||
|
||||
if(img_wrap < win_width)
|
||||
res_width = img_wrap;
|
||||
else
|
||||
res_width = win_width;
|
||||
|
||||
$img.each(function() {
|
||||
var img_width = $(this).width();
|
||||
var img_height = $(this).height();
|
||||
var this_width = $(this).data("width");
|
||||
var this_height = $(this).data("height");
|
||||
|
||||
if(this_width == undefined) {
|
||||
$(this).data("width", img_width); // 원래 이미지 사이즈
|
||||
$(this).data("height", img_height);
|
||||
this_width = img_width;
|
||||
this_height = img_height;
|
||||
}
|
||||
|
||||
if(this_width > res_width) {
|
||||
$(this).width(res_width);
|
||||
var res_height = Math.round(res_width * $(this).data("height") / $(this).data("width"));
|
||||
$(this).height(res_height);
|
||||
} else {
|
||||
$(this).width(this_width);
|
||||
$(this).height(this_height);
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
<![endif]-->
|
||||
79
mobile/skin/shop/basic/item.relation.skin.php
Normal file
79
mobile/skin/shop/basic/item.relation.skin.php
Normal file
@ -0,0 +1,79 @@
|
||||
<?php
|
||||
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
|
||||
?>
|
||||
|
||||
<link rel="stylesheet" href="<?php echo G5_MSHOP_SKIN_URL; ?>/style.css">
|
||||
|
||||
<!-- 상품진열 10 시작 { -->
|
||||
<?php
|
||||
for ($i=1; $row=sql_fetch_array($result); $i++) {
|
||||
if ($this->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 "<ul class=\"{$this->css}\">\n";
|
||||
} else {
|
||||
echo "<ul class=\"sct sct_10\">\n";
|
||||
}
|
||||
}
|
||||
|
||||
echo "<li class=\"sct_li {$sct_last}\">\n";
|
||||
|
||||
if ($this->href) {
|
||||
echo "<a href=\"{$this->href}{$row['it_id']}\" class=\"sct_a\">\n";
|
||||
}
|
||||
|
||||
if ($this->view_it_img) {
|
||||
echo "<span class=\"sct_img\">".get_it_image($row['it_id'], $this->img_width, $this->img_height)."</span>\n";
|
||||
}
|
||||
|
||||
if ($this->view_it_id) {
|
||||
echo "<b>".stripslashes($row['it_id'])."</b>\n";
|
||||
}
|
||||
|
||||
if ($this->view_it_name) {
|
||||
$it_name = $row['it_name'];
|
||||
if ($this->is_mobile && $row['it_mobile_name']) {
|
||||
$it_name = $row['it_mobile_name'];
|
||||
}
|
||||
echo "<b>".stripslashes($it_name)."</b>\n";
|
||||
}
|
||||
|
||||
if ($this->view_it_cust_price) {
|
||||
echo "<span class=\"sct_cost\">".display_price($row['it_cust_price'])."</span>\n";
|
||||
}
|
||||
|
||||
if ($this->view_it_price) {
|
||||
echo "<span class=\"sct_cost\">".display_price(get_price($row), $row['it_tel_inq'])."</span>\n";
|
||||
}
|
||||
|
||||
if ($this->view_it_icon) {
|
||||
echo "<span class=\"sct_icon\">".item_icon($row)."</span>\n";
|
||||
}
|
||||
|
||||
if ($this->view_sns) {
|
||||
echo "<div class=\"sct_sns\">";
|
||||
echo get_sns_share_link('facebook', $sns_url, $sns_title, G5_MSHOP_SKIN_URL.'/img/sns_fb.png');
|
||||
echo get_sns_share_link('twitter', $sns_url, $sns_title, G5_MSHOP_SKIN_URL.'/img/sns_twt.png');
|
||||
echo get_sns_share_link('googleplus', $sns_url, $sns_title, G5_MSHOP_SKIN_URL.'/img/sns_goo.png');
|
||||
echo "</div>\n";
|
||||
}
|
||||
|
||||
if ($this->href) {
|
||||
echo "</a>\n";
|
||||
}
|
||||
|
||||
echo "</li>\n";
|
||||
}
|
||||
|
||||
if ($i > 1) echo "</ul>\n";
|
||||
|
||||
if($i == 1) echo "<p class=\"sct_noitem\">등록된 상품이 없습니다.</p>\n";
|
||||
?>
|
||||
<!-- } 상품진열 10 끝 -->
|
||||
144
mobile/skin/shop/basic/itemqa.skin.php
Normal file
144
mobile/skin/shop/basic/itemqa.skin.php
Normal file
@ -0,0 +1,144 @@
|
||||
<?php
|
||||
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
|
||||
|
||||
$itemqa_list = "./itemqalist.php";
|
||||
$itemqa_form = "./itemqaform.php?it_id=".$it_id;
|
||||
$itemqa_formupdate = "./itemqaformupdate.php?it_id=".$it_id;
|
||||
|
||||
$thumbnail_width = 500;
|
||||
|
||||
$sql_common = " from `{$g5['g5_shop_item_qa_table']}` where it_id = '{$it_id}' ";
|
||||
|
||||
// 테이블의 전체 레코드수만 얻음
|
||||
$sql = " select COUNT(*) as cnt " . $sql_common;
|
||||
$row = sql_fetch($sql);
|
||||
$total_count = $row['cnt'];
|
||||
|
||||
$rows = 5;
|
||||
$total_page = ceil($total_count / $rows); // 전체 페이지 계산
|
||||
if ($page == "") $page = 1; // 페이지가 없으면 첫 페이지 (1 페이지)
|
||||
$from_record = ($page - 1) * $rows; // 시작 레코드 구함
|
||||
|
||||
$sql = "select * $sql_common order by iq_id desc limit $from_record, $rows ";
|
||||
$result = sql_query($sql);
|
||||
?>
|
||||
|
||||
<link rel="stylesheet" href="<?php echo G5_MSHOP_SKIN_URL; ?>/style.css">
|
||||
|
||||
<!-- 상품문의 목록 시작 { -->
|
||||
<section id="sit_qa_list">
|
||||
<h3>등록된 상품문의</h3>
|
||||
|
||||
<?php
|
||||
for ($i=0; $row=sql_fetch_array($result); $i++)
|
||||
{
|
||||
$iq_num = $total_count - ($page - 1) * $rows - $i;
|
||||
$iq_star = get_star($row['iq_score']);
|
||||
$iq_name = get_text($row['iq_name']);
|
||||
$iq_subject = conv_subject($row['iq_subject'],50,"…");
|
||||
$iq_question = get_view_thumbnail($row['iq_question'], $thumbnail_width);
|
||||
$iq_time = substr($row['iq_time'], 2, 8);
|
||||
|
||||
$hash = md5($row['iq_id'].$row['iq_time'].$row['iq_ip']);
|
||||
|
||||
// http://stackoverflow.com/questions/6967081/show-hide-multiple-divs-with-jquery?answertab=votes#tab-top
|
||||
|
||||
$iq_stats = '';
|
||||
$iq_style = '';
|
||||
$iq_answer = '';
|
||||
if ($row['iq_answer'])
|
||||
{
|
||||
$iq_answer = get_view_thumbnail($row['iq_answer'], $thumbnail_width);
|
||||
$iq_stats = '답변완료';
|
||||
$iq_style = 'sit_qaa_done';
|
||||
$is_answer = true;
|
||||
} else {
|
||||
$iq_stats = '답변전';
|
||||
$iq_style = 'sit_qaa_yet';
|
||||
$iq_answer = '답변이 등록되지 않았습니다.';
|
||||
$is_answer = false;
|
||||
}
|
||||
|
||||
if ($i == 0) echo '<ol id="sit_qa_ol">';
|
||||
?>
|
||||
|
||||
<li class="sit_qa_li">
|
||||
<button type="button" class="sit_qa_li_title"><b><?php echo $iq_num; ?>.</b> <?php echo $iq_subject; ?></button>
|
||||
<dl class="sit_qa_dl">
|
||||
<dt>작성자</dt>
|
||||
<dd><?php echo $iq_name; ?></dd>
|
||||
<dt>작성일</dt>
|
||||
<dd><?php echo $iq_time; ?></dd>
|
||||
<dt>상태</dt>
|
||||
<dd class="<?php echo $iq_style; ?>"><?php echo $iq_stats; ?></dd>
|
||||
</dl>
|
||||
|
||||
<div id="sit_qa_con_<?php echo $i; ?>" class="sit_qa_con">
|
||||
<div class="sit_qa_p">
|
||||
<div class="sit_qa_qaq">
|
||||
<strong>문의내용</strong><br>
|
||||
<?php echo $iq_question; // 상품 문의 내용 ?>
|
||||
</div>
|
||||
<div class="sit_qa_qaa">
|
||||
<strong>답변</strong><br>
|
||||
<?php echo $iq_answer; ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php if ($is_admin || ($row['mb_id'] == $member['mb_id'] && !$is_answer)) { ?>
|
||||
<div class="sit_qa_cmd">
|
||||
<a href="<?php echo $itemqa_form."&iq_id={$row['iq_id']}&w=u"; ?>" class="itemqa_form btn01" onclick="return false;">수정</a>
|
||||
<a href="<?php echo $itemqa_formupdate."&iq_id={$row['iq_id']}&w=d&hash={$hash}"; ?>" class="itemqa_delete btn01">삭제</a>
|
||||
<!-- <button type="button" onclick="javascript:itemqa_update(<?php echo $i; ?>);" class="btn01">수정</button>
|
||||
<button type="button" onclick="javascript:itemqa_delete(fitemqa_password<?php echo $i; ?>, <?php echo $i; ?>);" class="btn01">삭제</button> -->
|
||||
</div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
<?php }
|
||||
|
||||
if ($i >= 0) echo '</ol>';
|
||||
|
||||
if (!$i) echo '<p class="sit_empty">상품문의가 없습니다.</p>';
|
||||
?>
|
||||
</section>
|
||||
|
||||
<?php
|
||||
echo itemqa_page($config['cf_mobile_pages'], $page, $total_page, "./itemqa.php?it_id=$it_id&page=", "");
|
||||
?>
|
||||
|
||||
<div id="sit_qa_wbtn">
|
||||
<!-- <a href="javascript:itemqawin('it_id=<?php echo $it_id; ?>');">상품문의 쓰기<span class="sound_only"> 새 창</span></a> -->
|
||||
<a href="<?php echo $itemqa_form; ?>" class="btn02 itemqa_form">상품문의 쓰기<span class="sound_only"> 새 창</span></a>
|
||||
<a href="<?php echo $itemqa_list; ?>" id="itemqa_list" class="btn01">더보기</a>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
$(function(){
|
||||
$(".itemqa_form").click(function(){
|
||||
window.open(this.href, "itemqa_form", "width=800,height=500,scrollbars=1");
|
||||
return false;
|
||||
});
|
||||
|
||||
$(".itemqa_delete").click(function(){
|
||||
return confirm("정말 삭제 하시겠습니까?\n\n삭제후에는 되돌릴수 없습니다.");
|
||||
});
|
||||
|
||||
$(".sit_qa_li_title").click(function(){
|
||||
var $con = $(this).siblings(".sit_qa_con");
|
||||
if($con.is(":visible")) {
|
||||
$con.slideUp();
|
||||
} else {
|
||||
$(".sit_qa_con:visible").hide();
|
||||
$con.slideDown();
|
||||
}
|
||||
});
|
||||
|
||||
$(".qa_page").click(function(){
|
||||
$("#itemqa").load($(this).attr("href"));
|
||||
return false;
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<!-- } 상품문의 목록 끝 -->
|
||||
60
mobile/skin/shop/basic/itemqaform.skin.php
Normal file
60
mobile/skin/shop/basic/itemqaform.skin.php
Normal file
@ -0,0 +1,60 @@
|
||||
<?php
|
||||
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
|
||||
|
||||
// 상품문의의 내용에 쓸수 있는 최대 글자수 (한글은 영문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']);
|
||||
?>
|
||||
|
||||
<link rel="stylesheet" href="<?php echo G5_MSHOP_SKIN_URL; ?>/style.css">
|
||||
|
||||
<!-- 상품문의 쓰기 시작 { -->
|
||||
<div id="sit_qa_write" class="new_win">
|
||||
<h1 class="new_win_title">상품문의 쓰기</h1>
|
||||
|
||||
<form name="fitemqa" method="post" action="./itemqaformupdate.php" onsubmit="return fitemqa_submit(this);" autocomplete="off">
|
||||
<input type="hidden" name="w" value="<?php echo $w; ?>">
|
||||
<input type="hidden" name="it_id" value="<?php echo $it_id; ?>">
|
||||
<input type="hidden" name="iq_id" value="<?php echo $iq_id; ?>">
|
||||
|
||||
<table class="frm_tbl">
|
||||
<colgroup>
|
||||
<col class="grid_2">
|
||||
<col>
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th scope="row"><label for="iq_subject">제목</label></th>
|
||||
<td><input type="text" name="iq_subject" value="<?php echo get_text($qa['iq_subject']); ?>" id="iq_subject" required class="frm_input" minlength="2" maxlength="250"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="iq_question">질문</label></th>
|
||||
<td><?php echo editor_html('iq_question', $qa['iq_question']); ?></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<div class="btn_win">
|
||||
<input type="submit" value="작성완료" class="btn_submit">
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
function fitemqa_submit(f)
|
||||
{
|
||||
<?php echo get_editor_js('iq_question'); ?>
|
||||
|
||||
if (iq_question_editor_data.length > <?php echo $iq_question_max_length; ?>) {
|
||||
alert("내용은 <?php echo $iq_question_max_length; ?> 글자 이내에서 작성해 주세요. (한글은 영문 3자)\n\n현재 : "+iq_question_editor_data.length+" 글자");
|
||||
CKEDITOR.instances.iq_question.focus();
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
</script>
|
||||
<!-- } 상품문의 쓰기 끝 -->
|
||||
120
mobile/skin/shop/basic/itemqalist.skin.php
Normal file
120
mobile/skin/shop/basic/itemqalist.skin.php
Normal file
@ -0,0 +1,120 @@
|
||||
<?php
|
||||
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
|
||||
?>
|
||||
|
||||
<link rel="stylesheet" href="<?php echo G5_MSHOP_SKIN_URL; ?>/style.css">
|
||||
|
||||
<!-- 전체 상품 문의 목록 시작 { -->
|
||||
<form method="get" action="<?php echo $_SERVER['PHP_SELF']; ?>">
|
||||
<div id="sqa_sch">
|
||||
<a href="<?php echo $_SERVER['PHP_SELF']; ?>">전체보기</a>
|
||||
<label for="sfl" class="sound_only">검색항목</label>
|
||||
<select name="sfl" required id="sfl">
|
||||
<option value="">선택</option>
|
||||
<option value="b.it_name" <?php echo get_selected($sfl, "b.it_name", true); ?>>상품명</option>
|
||||
<option value="a.it_id" <?php echo get_selected($sfl, "a.it_id"); ?>>상품코드</option>
|
||||
<option value="a.iq_subject" <?php echo get_selected($sfl, "a.is_subject"); ?>>문의제목</option>
|
||||
<option value="a.iq_question"<?php echo get_selected($sfl, "a.iq_question"); ?>>문의내용</option>
|
||||
<option value="a.iq_name" <?php echo get_selected($sfl, "a.it_id"); ?>>작성자명</option>
|
||||
<option value="a.mb_id" <?php echo get_selected($sfl, "a.mb_id"); ?>>작성자아이디</option>
|
||||
</select>
|
||||
|
||||
<label for="stx" class="sound_only">검색어<strong class="sound_only"> 필수</strong></label>
|
||||
<input type="text" name="stx" value="<?php echo $stx; ?>" id="stx" required class="required frm_input">
|
||||
<input type="submit" value="검색" class="btn_submit">
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<div id="sqa">
|
||||
|
||||
<!-- <p><?php echo $config['cf_title']; ?> 전체 상품문의 목록입니다.</p> -->
|
||||
|
||||
<?php
|
||||
for ($i=0; $row=sql_fetch_array($result); $i++)
|
||||
{
|
||||
$num = $total_count - ($page - 1) * $rows - $i;
|
||||
$star = get_star($row['is_score']);
|
||||
|
||||
$small_image = $row['it_id'];
|
||||
|
||||
$it_href = G5_SHOP_URL.'/item.php?it_id='.$row['it_id'];
|
||||
|
||||
$iq_question = get_view_thumbnail($row['iq_question'], 500);
|
||||
|
||||
if ($row['iq_answer'])
|
||||
{
|
||||
$iq_answer = get_view_thumbnail($row['iq_answer'], 500);
|
||||
$iq_stats = '답변완료';
|
||||
$iq_style = 'sit_qaa_done';
|
||||
$is_answer = true;
|
||||
} else {
|
||||
$iq_stats = '답변전';
|
||||
$iq_style = 'sit_qaa_yet';
|
||||
$iq_answer = '답변이 등록되지 않았습니다.';
|
||||
$is_answer = false;
|
||||
}
|
||||
|
||||
if ($i == 0) echo '<ol>';
|
||||
?>
|
||||
<li>
|
||||
|
||||
<div class="sqa_img">
|
||||
<a href="<?php echo $it_href; ?>">
|
||||
<?php echo get_it_image($small_image, 70, 70); ?>
|
||||
<span><?php echo $row['it_name']; ?></span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<section class="sqa_section">
|
||||
<h2><?php echo $row['iq_subject']; ?></h2>
|
||||
|
||||
<dl class="sqa_dl">
|
||||
<dt>작성자</dt>
|
||||
<dd><?php echo $row['iq_name']; ?></dd>
|
||||
<dt>작성일</dt>
|
||||
<dd><?php echo substr($row['iq_time'],0,10); ?></dd>
|
||||
<dt>상태</dt>
|
||||
<dd class="<?php echo $iq_style; ?>"><?php echo $iq_stats; ?></dd>
|
||||
</dl>
|
||||
|
||||
<div id="sqa_con_<?php echo $i; ?>" class="sqa_con" style="display:none;">
|
||||
<div class="sit_qa_qaq">
|
||||
<strong>문의내용</strong><br>
|
||||
<?php echo $iq_question; // 상품 문의 내용 ?>
|
||||
</div>
|
||||
<div class="sit_qa_qaa">
|
||||
<strong>답변</strong><br>
|
||||
<?php echo $iq_answer; ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="sqa_con_btn"><button class="sqa_con_<?php echo $i; ?>">보기</button></div>
|
||||
</section>
|
||||
|
||||
</li>
|
||||
<?php }
|
||||
if ($i > 0) echo '</ol>';
|
||||
if ($i == 0) echo '<p id="sps_empty">자료가 없습니다.</p>';
|
||||
?>
|
||||
</div>
|
||||
|
||||
<?php echo get_paging($config['cf_mobile_pages'], $page, $total_page, "{$_SERVER['PHP_SELF']}?$qstr&page="); ?>
|
||||
|
||||
<script>
|
||||
$(function(){
|
||||
// 상품문의 더보기
|
||||
$(".sqa_con_btn button").click(function(){
|
||||
var $con = $(this).parent().prev();
|
||||
if($con.is(":visible")) {
|
||||
$con.slideUp();
|
||||
$(this).text("보기");
|
||||
} else {
|
||||
$(".sqa_con_btn button").text("보기");
|
||||
$("div[id^=sqa_con]:visible").hide();
|
||||
$con.slideDown();
|
||||
$(this).text("닫기");
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<!-- } 전체 상품 사용후기 목록 끝 -->
|
||||
122
mobile/skin/shop/basic/itemuse.skin.php
Normal file
122
mobile/skin/shop/basic/itemuse.skin.php
Normal file
@ -0,0 +1,122 @@
|
||||
<?php
|
||||
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
|
||||
|
||||
$itemuse_list = "./itemuselist.php";
|
||||
$itemuse_form = "./itemuseform.php?it_id=".$it_id;
|
||||
$itemuse_formupdate = "./itemuseformupdate.php?it_id=".$it_id;
|
||||
|
||||
$sql_common = " from `{$g5['g5_shop_item_use_table']}` where it_id = '{$it_id}' and is_confirm = '1' ";
|
||||
|
||||
// 테이블의 전체 레코드수만 얻음
|
||||
$sql = " select COUNT(*) as cnt " . $sql_common;
|
||||
$row = sql_fetch($sql);
|
||||
$total_count = $row['cnt'];
|
||||
|
||||
$rows = 5;
|
||||
$total_page = ceil($total_count / $rows); // 전체 페이지 계산
|
||||
if ($page == "") $page = 1; // 페이지가 없으면 첫 페이지 (1 페이지)
|
||||
$from_record = ($page - 1) * $rows; // 시작 레코드 구함
|
||||
|
||||
$sql = "select * $sql_common order by is_id desc limit $from_record, $rows ";
|
||||
$result = sql_query($sql);
|
||||
?>
|
||||
|
||||
<link rel="stylesheet" href="<?php echo G5_MSHOP_SKIN_URL; ?>/style.css">
|
||||
|
||||
<!-- 상품 사용후기 시작 { -->
|
||||
<section id="sit_use_list">
|
||||
<h3>등록된 사용후기</h3>
|
||||
|
||||
<?php
|
||||
for ($i=0; $row=sql_fetch_array($result); $i++)
|
||||
{
|
||||
$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'];
|
||||
|
||||
$hash = md5($row['is_id'].$row['is_time'].$row['is_ip']);
|
||||
|
||||
// http://stackoverflow.com/questions/6967081/show-hide-multiple-divs-with-jquery?answertab=votes#tab-top
|
||||
|
||||
if ($i == 0) echo '<ol id="sit_use_ol">';
|
||||
?>
|
||||
|
||||
<li class="sit_use_li">
|
||||
<button type="button" class="sit_use_li_title" onclick="javascript:qa_menu('sit_use_con_<?php echo $i; ?>')"><b><?php echo $is_num; ?>.</b> <?php echo $is_subject; ?></button>
|
||||
<dl class="sit_use_dl">
|
||||
<dt>작성자</dt>
|
||||
<dd><?php echo $is_name; ?></dd>
|
||||
<dt>작성일</dt>
|
||||
<dd><?php echo $is_time; ?></dd>
|
||||
<dt>선호도<dt>
|
||||
<dd class="sit_use_star"><img src="<?php echo G5_SHOP_URL; ?>/img/s_star<?php echo $is_star; ?>.png" alt="별<?php echo $is_star; ?>개"></dd>
|
||||
</dl>
|
||||
|
||||
<div id="sit_use_con_<?php echo $i; ?>" class="sit_use_con">
|
||||
<div class="sit_use_p">
|
||||
<?php echo $is_content; // 사용후기 내용 ?>
|
||||
</div>
|
||||
|
||||
<?php if ($is_admin || $row['mb_id'] == $member['mb_id']) { ?>
|
||||
<div class="sit_use_cmd">
|
||||
<a href="<?php echo $itemuse_form."&is_id={$row['is_id']}&w=u"; ?>" class="itemuse_form btn01" onclick="return false;">수정</a>
|
||||
<a href="<?php echo $itemuse_formupdate."&is_id={$row['is_id']}&w=d&hash={$hash}"; ?>" class="itemuse_delete btn01">삭제</a>
|
||||
</div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
<?php }
|
||||
|
||||
if ($i >= 0) echo '</ol>';
|
||||
|
||||
if (!$i) echo '<p class="sit_empty">사용후기가 없습니다.</p>';
|
||||
?>
|
||||
</section>
|
||||
|
||||
<?php
|
||||
echo itemuse_page($config['cf_mobile_pages'], $page, $total_page, "./itemuse.php?it_id=$it_id&page=", "");
|
||||
?>
|
||||
|
||||
<div id="sit_use_wbtn">
|
||||
<a href="<?php echo $itemuse_form; ?>" class="btn02 itemuse_form" onclick="return false;">사용후기 쓰기<span class="sound_only"> 새 창</span></a>
|
||||
<a href="<?php echo $itemuse_list; ?>" class="btn01 itemuse_list">더보기</a>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
$(function(){
|
||||
$(".itemuse_form").click(function(){
|
||||
window.open(this.href, "itemuse_form", "width=800,height=500,scrollbars=1");
|
||||
return false;
|
||||
});
|
||||
|
||||
$(".itemuse_delete").click(function(){
|
||||
if (confirm("정말 삭제 하시겠습니까?\n\n삭제후에는 되돌릴수 없습니다.")) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
$(".sit_use_li_title").click(function(){
|
||||
var $con = $(this).siblings(".sit_use_con");
|
||||
if($con.is(":visible")) {
|
||||
$con.slideUp();
|
||||
} else {
|
||||
$(".sit_use_con:visible").hide();
|
||||
$con.slideDown();
|
||||
}
|
||||
});
|
||||
|
||||
$(".pg_page").click(function(){
|
||||
$("#itemuse").load($(this).attr("href"));
|
||||
return false;
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<!-- } 상품 사용후기 끝 -->
|
||||
108
mobile/skin/shop/basic/itemuseform.skin.php
Normal file
108
mobile/skin/shop/basic/itemuseform.skin.php
Normal file
@ -0,0 +1,108 @@
|
||||
<?php
|
||||
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
|
||||
|
||||
// 사용후기의 내용에 쓸수 있는 최대 글자수 (한글은 영문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']);
|
||||
?>
|
||||
|
||||
<link rel="stylesheet" href="<?php echo G5_MSHOP_SKIN_URL; ?>/style.css">
|
||||
|
||||
<!-- 사용후기 쓰기 시작 { -->
|
||||
<div id="sit_use_write" class="new_win">
|
||||
<h1 class="new_win_title">사용후기 쓰기</h1>
|
||||
|
||||
<form name="fitemuse" method="post" action="./itemuseformupdate.php" onsubmit="return fitemuse_submit(this);" autocomplete="off">
|
||||
<input type="hidden" name="w" value="<?php echo $w; ?>">
|
||||
<input type="hidden" name="it_id" value="<?php echo $it_id; ?>">
|
||||
<input type="hidden" name="is_id" value="<?php echo $is_id; ?>">
|
||||
|
||||
<table class="frm_tbl">
|
||||
<colgroup>
|
||||
<col class="grid_2">
|
||||
<col>
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th scope="row"><label for="is_subject">제목</label></th>
|
||||
<td><input type="text" name="is_subject" value="<?php echo get_text($use['is_subject']); ?>" id="is_subject" required class="frm_input" minlength="2" maxlength="250"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="" style="width:200px;">내용</label></th>
|
||||
<td><?php echo editor_html('is_content', $use['is_content']); ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">평가</th>
|
||||
<td>
|
||||
<ul id="sit_use_write_star">
|
||||
<li>
|
||||
<input type="radio" name="is_score" value="10" id="is_score10" <?php echo ($is_score==10)?'checked="checked"':''; ?>>
|
||||
<label for="is_score10">매우만족</label>
|
||||
<img src="<?php echo G5_SHOP_URL; ?>/img/s_star5.png">
|
||||
</li>
|
||||
<li>
|
||||
<input type="radio" name="is_score" value="8" id="is_score8" <?php echo ($is_score==8)?'checked="checked"':''; ?>>
|
||||
<label for="is_score8">만족</label>
|
||||
<img src="<?php echo G5_SHOP_URL; ?>/img/s_star4.png">
|
||||
</li>
|
||||
<li>
|
||||
<input type="radio" name="is_score" value="6" id="is_score6" <?php echo ($is_score==6)?'checked="checked"':''; ?>>
|
||||
<label for="is_score6">보통</label>
|
||||
<img src="<?php echo G5_SHOP_URL; ?>/img/s_star3.png">
|
||||
</li>
|
||||
<li>
|
||||
<input type="radio" name="is_score" value="4" id="is_score4" <?php echo ($is_score==4)?'checked="checked"':''; ?>>
|
||||
<label for="is_score4">불만</label>
|
||||
<img src="<?php echo G5_SHOP_URL; ?>/img/s_star2.png">
|
||||
</li>
|
||||
<li>
|
||||
<input type="radio" name="is_score" value="2" id="is_score2" <?php echo ($is_score==2)?'checked="checked"':''; ?>>
|
||||
<label for="is_score2">매우불만</label>
|
||||
<img src="<?php echo G5_SHOP_URL; ?>/img/s_star1.png">
|
||||
</li>
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<div class="btn_win">
|
||||
<input type="submit" value="작성완료" class="btn_submit">
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
function fitemuse_submit(f)
|
||||
{
|
||||
/*
|
||||
if (document.getElementById('tx_is_content')) {
|
||||
var len = ed_is_content.inputLength();
|
||||
if (len == 0) {
|
||||
alert('내용을 입력하십시오.');
|
||||
ed_is_content.returnFalse();
|
||||
return false;
|
||||
} else if (len > 1000) {
|
||||
alert('내용은 1000글자 까지만 입력해 주세요.');
|
||||
ed_is_content.returnFalse();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
<?php echo get_editor_js('is_content'); ?>
|
||||
|
||||
if (is_content_editor_data.length > <?php echo $is_content_max_length; ?>) {
|
||||
alert("내용은 <?php echo $is_content_max_length; ?> 글자 이내에서 작성해 주세요. (한글은 영문 3자)\n\n현재 : "+is_content_editor_data.length+" 글자");
|
||||
CKEDITOR.instances.is_content.focus();
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
</script>
|
||||
<!-- } 사용후기 쓰기 끝 -->
|
||||
100
mobile/skin/shop/basic/itemuselist.skin.php
Normal file
100
mobile/skin/shop/basic/itemuselist.skin.php
Normal file
@ -0,0 +1,100 @@
|
||||
<?php
|
||||
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
|
||||
?>
|
||||
|
||||
<link rel="stylesheet" href="<?php echo G5_MSHOP_SKIN_URL; ?>/style.css">
|
||||
|
||||
<!-- 전체 상품 사용후기 목록 시작 { -->
|
||||
<form method="get" action="<?php echo $_SERVER['PHP_SELF']; ?>">
|
||||
<div id="sps_sch">
|
||||
<a href="<?php echo $_SERVER['PHP_SELF']; ?>">전체보기</a>
|
||||
<label for="sfl" class="sound_only">검색항목</label>
|
||||
<select name="sfl" id="sfl" required>
|
||||
<option value="">선택</option>
|
||||
<option value="b.it_name" <?php echo get_selected($sfl, "b.it_name"); ?>>상품명</option>
|
||||
<option value="a.it_id" <?php echo get_selected($sfl, "a.it_id"); ?>>상품코드</option>
|
||||
<option value="a.is_subject"<?php echo get_selected($sfl, "a.is_subject"); ?>>후기제목</option>
|
||||
<option value="a.is_content"<?php echo get_selected($sfl, "a.is_content"); ?>>후기내용</option>
|
||||
<option value="a.is_name" <?php echo get_selected($sfl, "a.is_name"); ?>>작성자명</option>
|
||||
<option value="a.mb_id" <?php echo get_selected($sfl, "a.mb_id"); ?>>작성자아이디</option>
|
||||
</select>
|
||||
|
||||
<label for="stx" class="sound_only">검색어<strong class="sound_only"> 필수</strong></label>
|
||||
<input type="text" name="stx" value="<?php echo $stx; ?>" id="stx" required class="required frm_input">
|
||||
<input type="submit" value="검색" class="btn_submit">
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<div id="sps">
|
||||
|
||||
<!-- <p><?php echo $config['cf_title']; ?> 전체 사용후기 목록입니다.</p> -->
|
||||
|
||||
<?php
|
||||
for ($i=0; $row=sql_fetch_array($result); $i++)
|
||||
{
|
||||
$num = $total_count - ($page - 1) * $rows - $i;
|
||||
$star = get_star($row['is_score']);
|
||||
|
||||
$is_content = get_view_thumbnail($row['is_content'], 500);
|
||||
$small_image = $row['it_id'];
|
||||
|
||||
$row2 = sql_fetch(" select it_name from {$g5['g5_shop_item_table']} where it_id = '{$row['it_id']}' ");
|
||||
$it_href = G5_SHOP_URL."/item.php?it_id={$row['it_id']}";
|
||||
|
||||
if ($i == 0) echo '<ol>';
|
||||
?>
|
||||
<li>
|
||||
|
||||
<div class="sps_img">
|
||||
<a href="<?php echo $it_href; ?>">
|
||||
<?php echo get_it_image($small_image, 70, 70); ?>
|
||||
<span><?php echo $row2['it_name']; ?></span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<section class="sps_section">
|
||||
<h2><?php echo $row['is_subject']; ?></h2>
|
||||
|
||||
<dl class="sps_dl">
|
||||
<dt>작성자</dt>
|
||||
<dd><?php echo $row['is_name']; ?></dd>
|
||||
<dt>작성일</dt>
|
||||
<dd><?php echo substr($row['is_time'],0,10); ?></dd>
|
||||
<dt>평가점수</dt>
|
||||
<dd><img src="<?php echo G5_SHOP_URL; ?>/img/s_star<?php echo $star; ?>.png" alt="별<?php echo $star; ?>개"></dd>
|
||||
</dl>
|
||||
|
||||
<div id="sps_con_<?php echo $i; ?>" style="display:none;">
|
||||
<?php echo $is_content; // 사용후기 내용 ?>
|
||||
</div>
|
||||
|
||||
<div class="sps_con_btn"><button class="sps_con_<?php echo $i; ?>">보기</button></div>
|
||||
</section>
|
||||
|
||||
</li>
|
||||
<?php }
|
||||
if ($i > 0) echo '</ol>';
|
||||
if ($i == 0) echo '<p id="sps_empty">자료가 없습니다.</p>';
|
||||
?>
|
||||
</div>
|
||||
|
||||
<?php echo get_paging($config['cf_mobile_pages'], $page, $total_page, "{$_SERVER['PHP_SELF']}?$qstr&page="); ?>
|
||||
|
||||
<script>
|
||||
$(function(){
|
||||
// 사용후기 더보기
|
||||
$(".sps_con_btn button").click(function(){
|
||||
var $con = $(this).parent().prev();
|
||||
if($con.is(":visible")) {
|
||||
$con.slideUp();
|
||||
$(this).text("보기");
|
||||
} else {
|
||||
$(".sps_con_btn button").text("보기");
|
||||
$("div[id^=sps_con]:visible").hide();
|
||||
$con.slideDown();
|
||||
$(this).text("닫기");
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<!-- } 전체 상품 사용후기 목록 끝 -->
|
||||
@ -59,9 +59,9 @@ for ($i=1; $row=sql_fetch_array($result); $i++) {
|
||||
|
||||
if ($this->view_sns) {
|
||||
echo "<div class=\"sct_sns\">";
|
||||
echo get_sns_share_link('facebook', $sns_url, $sns_title, G5_SHOP_URL.'/img/sns_fb.png');
|
||||
echo get_sns_share_link('twitter', $sns_url, $sns_title, G5_SHOP_URL.'/img/sns_twt.png');
|
||||
echo get_sns_share_link('googleplus', $sns_url, $sns_title, G5_SHOP_URL.'/img/sns_goo.png');
|
||||
echo get_sns_share_link('facebook', $sns_url, $sns_title, G5_MSHOP_SKIN_URL.'/img/sns_fb.png');
|
||||
echo get_sns_share_link('twitter', $sns_url, $sns_title, G5_MSHOP_SKIN_URL.'/img/sns_twt.png');
|
||||
echo get_sns_share_link('googleplus', $sns_url, $sns_title, G5_MSHOP_SKIN_URL.'/img/sns_goo.png');
|
||||
echo "</div>\n";
|
||||
}
|
||||
|
||||
|
||||
26
mobile/skin/shop/basic/list.sort.skin.php
Normal file
26
mobile/skin/shop/basic/list.sort.skin.php
Normal file
@ -0,0 +1,26 @@
|
||||
<?php
|
||||
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
|
||||
|
||||
$sct_sort_href = $_SERVER['PHP_SELF'].'?';
|
||||
if($ca_id)
|
||||
$sct_sort_href .= 'ca_id='.$ca_id;
|
||||
else if($ev_id)
|
||||
$sct_sort_href .= 'ev_id='.$ev_id;
|
||||
if($skin)
|
||||
$sct_sort_href .= '&skin='.$skin;
|
||||
$sct_sort_href .= '&sort=';
|
||||
?>
|
||||
|
||||
<link rel="stylesheet" href="<?php echo G5_MSHOP_SKIN_URL; ?>/style.css">
|
||||
|
||||
<!-- 상품 정렬 선택 시작 { -->
|
||||
<section id="sct_sort">
|
||||
<h2>상품 정렬</h2>
|
||||
|
||||
<ul>
|
||||
<li><a href="<?php echo $sct_sort_href; ?>it_price&sortodr=asc" class="btn01">낮은가격순</a></li>
|
||||
<li><a href="<?php echo $sct_sort_href; ?>it_price&sortodr=desc" class="btn01">높은가격순</a></li>
|
||||
<li><a href="<?php echo $sct_sort_href; ?>it_name&sortodr=asc" class="btn01">상품명순</a></li>
|
||||
</ul>
|
||||
</section>
|
||||
<!-- } 상품 정렬 선택 끝 -->
|
||||
10
mobile/skin/shop/basic/list.sub.skin.php
Normal file
10
mobile/skin/shop/basic/list.sub.skin.php
Normal file
@ -0,0 +1,10 @@
|
||||
<?php
|
||||
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
|
||||
?>
|
||||
|
||||
<link rel="stylesheet" href="<?php echo G5_MSHOP_SKIN_URL; ?>/style.css">
|
||||
|
||||
<ul id="sct_lst">
|
||||
<li><button type="button" class="sct_lst_view sct_lst_list">리스트뷰<span></span></button></li>
|
||||
<li><button type="button" class="sct_lst_view sct_lst_gallery">갤러리뷰<span></span></button></li>
|
||||
</ul>
|
||||
@ -59,9 +59,9 @@ for ($i=1; $row=sql_fetch_array($result); $i++) {
|
||||
|
||||
if ($this->view_sns) {
|
||||
echo "<div class=\"sct_sns\">";
|
||||
echo get_sns_share_link('facebook', $sns_url, $sns_title, G5_SHOP_URL.'/img/sns_fb.png');
|
||||
echo get_sns_share_link('twitter', $sns_url, $sns_title, G5_SHOP_URL.'/img/sns_twt.png');
|
||||
echo get_sns_share_link('googleplus', $sns_url, $sns_title, G5_SHOP_URL.'/img/sns_goo.png');
|
||||
echo get_sns_share_link('facebook', $sns_url, $sns_title, G5_MSHOP_SKIN_URL.'/img/sns_fb.png');
|
||||
echo get_sns_share_link('twitter', $sns_url, $sns_title, G5_MSHOP_SKIN_URL.'/img/sns_twt.png');
|
||||
echo get_sns_share_link('googleplus', $sns_url, $sns_title, G5_MSHOP_SKIN_URL.'/img/sns_goo.png');
|
||||
echo "</div>\n";
|
||||
}
|
||||
|
||||
|
||||
@ -1,35 +1,37 @@
|
||||
<?php
|
||||
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
|
||||
|
||||
if ($ca_id)
|
||||
{
|
||||
$str = $bar = "";
|
||||
$len = strlen($ca_id) / 2;
|
||||
for ($i=1; $i<=$len; $i++)
|
||||
{
|
||||
$code = substr($ca_id,0,$i*2);
|
||||
|
||||
$sql = " select ca_name from {$g5['g5_shop_category_table']} where ca_id = '$code' ";
|
||||
$row = sql_fetch($sql);
|
||||
|
||||
$sct_here = '';
|
||||
if ($ca_id == $code) // 현재 분류와 일치하면
|
||||
$sct_here = 'sct_here';
|
||||
|
||||
if ($i != $len) // 현재 위치의 마지막 단계가 아니라면
|
||||
$sct_bg = 'sct_bg';
|
||||
else $sct_bg = '';
|
||||
|
||||
$str .= $bar.'<a href="./list.php?ca_id='.$code.'" class="'.$sct_here.' '.$sct_bg.'">'.$row['ca_name'].'</a>';
|
||||
}
|
||||
}
|
||||
else
|
||||
$str = $g5['title'];
|
||||
|
||||
//if ($it_id) $str .= " > $it[it_name]";
|
||||
?>
|
||||
|
||||
<div id="sct_location">
|
||||
<a href='<?php echo G5_SHOP_URL; ?>/' class="sct_bg">Home</a>
|
||||
<?php echo $str; ?>
|
||||
</div>
|
||||
<?php
|
||||
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
|
||||
|
||||
if ($ca_id)
|
||||
{
|
||||
$str = $bar = "";
|
||||
$len = strlen($ca_id) / 2;
|
||||
for ($i=1; $i<=$len; $i++)
|
||||
{
|
||||
$code = substr($ca_id,0,$i*2);
|
||||
|
||||
$sql = " select ca_name from {$g5['g5_shop_category_table']} where ca_id = '$code' ";
|
||||
$row = sql_fetch($sql);
|
||||
|
||||
$sct_here = '';
|
||||
if ($ca_id == $code) // 현재 분류와 일치하면
|
||||
$sct_here = 'sct_here';
|
||||
|
||||
if ($i != $len) // 현재 위치의 마지막 단계가 아니라면
|
||||
$sct_bg = 'sct_bg';
|
||||
else $sct_bg = '';
|
||||
|
||||
$str .= $bar.'<a href="./list.php?ca_id='.$code.'" class="'.$sct_here.' '.$sct_bg.'">'.$row['ca_name'].'</a>';
|
||||
}
|
||||
}
|
||||
else
|
||||
$str = $g5['title'];
|
||||
|
||||
//if ($it_id) $str .= " > $it[it_name]";
|
||||
?>
|
||||
|
||||
<link rel="stylesheet" href="<?php echo G5_MSHOP_SKIN_URL; ?>/style.css">
|
||||
|
||||
<div id="sct_location">
|
||||
<a href='<?php echo G5_SHOP_URL; ?>/' class="sct_bg">Home</a>
|
||||
<?php echo $str; ?>
|
||||
</div>
|
||||
@ -15,4 +15,42 @@ if(!file_exists($itemqa_skin)) {
|
||||
} else {
|
||||
include_once($itemqa_skin);
|
||||
}
|
||||
|
||||
// 현재페이지, 총페이지수, 한페이지에 보여줄 행, URL
|
||||
function itemqa_page($write_pages, $cur_page, $total_page, $url, $add="")
|
||||
{
|
||||
$url = preg_replace('#&page=[0-9]*(&page=)$#', '$1', $url);
|
||||
|
||||
$str = '';
|
||||
if ($cur_page > 1) {
|
||||
$str .= '<a href="'.$url.'1'.$add.'" class="qa_page qa_start">처음</a>'.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 .= '<a href="'.$url.($start_page-1).$add.'" class="qa_page pg_prev">이전</a>'.PHP_EOL;
|
||||
|
||||
if ($total_page > 1) {
|
||||
for ($k=$start_page;$k<=$end_page;$k++) {
|
||||
if ($cur_page != $k)
|
||||
$str .= '<a href="'.$url.$k.$add.'" class="qa_page">'.$k.'</a><span class="sound_only">페이지</span>'.PHP_EOL;
|
||||
else
|
||||
$str .= '<span class="sound_only">열린</span><strong class="pg_current">'.$k.'</strong><span class="sound_only">페이지</span>'.PHP_EOL;
|
||||
}
|
||||
}
|
||||
|
||||
if ($total_page > $end_page) $str .= '<a href="'.$url.($end_page+1).$add.'" class="qa_page pg_next">다음</a>'.PHP_EOL;
|
||||
|
||||
if ($cur_page < $total_page) {
|
||||
$str .= '<a href="'.$url.$total_page.$add.'" class="qa_page pg_end">맨끝</a>'.PHP_EOL;
|
||||
}
|
||||
|
||||
if ($str)
|
||||
return "<nav class=\"pg_wrap\"><span class=\"pg\">{$str}</span></nav>";
|
||||
else
|
||||
return "";
|
||||
}
|
||||
?>
|
||||
@ -9,7 +9,7 @@ if (G5_IS_MOBILE) {
|
||||
include_once(G5_EDITOR_LIB);
|
||||
|
||||
if (!$is_member) {
|
||||
alert_login("상품문의는 회원만 작성 가능합니다.", urlencode($_SERVER['REQUEST_URI']));
|
||||
alert_close("상품문의는 회원만 작성 가능합니다.");
|
||||
}
|
||||
|
||||
if ($w == "u")
|
||||
|
||||
@ -54,128 +54,21 @@ $rows = $config['cf_page_rows'];
|
||||
$total_page = ceil($total_count / $rows); // 전체 페이지 계산
|
||||
if ($page == "") { $page = 1; } // 페이지가 없으면 첫 페이지 (1 페이지)
|
||||
$from_record = ($page - 1) * $rows; // 시작 열을 구함
|
||||
?>
|
||||
|
||||
<!-- 전체 상품 문의 목록 시작 { -->
|
||||
$sql = " select a.*, b.it_name
|
||||
$sql_common
|
||||
$sql_search
|
||||
$sql_order
|
||||
limit $from_record, $rows ";
|
||||
$result = sql_query($sql);
|
||||
|
||||
<form method="get" action="<?php echo $_SERVER['PHP_SELF']; ?>">
|
||||
<div id="sqa_sch">
|
||||
<a href="<?php echo $_SERVER['PHP_SELF']; ?>">전체보기</a>
|
||||
<label for="sfl" class="sound_only">검색항목</label>
|
||||
<select name="sfl" required id="sfl">
|
||||
<option value="">선택</option>
|
||||
<option value="b.it_name" <?php echo get_selected($sfl, "b.it_name", true); ?>>상품명</option>
|
||||
<option value="a.it_id" <?php echo get_selected($sfl, "a.it_id"); ?>>상품코드</option>
|
||||
<option value="a.iq_subject" <?php echo get_selected($sfl, "a.is_subject"); ?>>문의제목</option>
|
||||
<option value="a.iq_question"<?php echo get_selected($sfl, "a.iq_question"); ?>>문의내용</option>
|
||||
<option value="a.iq_name" <?php echo get_selected($sfl, "a.it_id"); ?>>작성자명</option>
|
||||
<option value="a.mb_id" <?php echo get_selected($sfl, "a.mb_id"); ?>>작성자아이디</option>
|
||||
</select>
|
||||
$itemqalist_skin = G5_SHOP_SKIN_PATH.'/itemqalist.skin.php';
|
||||
|
||||
<label for="stx" class="sound_only">검색어<strong class="sound_only"> 필수</strong></label>
|
||||
<input type="text" name="stx" value="<?php echo $stx; ?>" id="stx" required class="frm_input">
|
||||
<input type="submit" value="검색" class="btn_submit">
|
||||
</div>
|
||||
</form>
|
||||
if(!file_exists($itemqalist_skin)) {
|
||||
echo str_replace(G5_PATH.'/', '', $itemqalist_skin).' 스킨 파일이 존재하지 않습니다.';
|
||||
} else {
|
||||
include_once($itemqalist_skin);
|
||||
}
|
||||
|
||||
<div id="sqa">
|
||||
|
||||
<!-- <p><?php echo $config['cf_title']; ?> 전체 상품문의 목록입니다.</p> -->
|
||||
|
||||
<?php
|
||||
$sql = " select a.*, b.it_name
|
||||
$sql_common
|
||||
$sql_search
|
||||
$sql_order
|
||||
limit $from_record, $rows ";
|
||||
$result = sql_query($sql);
|
||||
for ($i=0; $row=sql_fetch_array($result); $i++)
|
||||
{
|
||||
$num = $total_count - ($page - 1) * $rows - $i;
|
||||
$star = get_star($row['is_score']);
|
||||
|
||||
$small_image = $row['it_id'];
|
||||
|
||||
$it_href = G5_SHOP_URL.'/item.php?it_id='.$row['it_id'];
|
||||
|
||||
$iq_question = get_view_thumbnail($row['iq_question'], 500);
|
||||
|
||||
if ($row['iq_answer'])
|
||||
{
|
||||
$iq_answer = get_view_thumbnail($row['iq_answer'], 500);
|
||||
$iq_stats = '답변완료';
|
||||
$iq_style = 'sit_qaa_done';
|
||||
$is_answer = true;
|
||||
} else {
|
||||
$iq_stats = '답변전';
|
||||
$iq_style = 'sit_qaa_yet';
|
||||
$iq_answer = '답변이 등록되지 않았습니다.';
|
||||
$is_answer = false;
|
||||
}
|
||||
|
||||
if ($i == 0) echo '<ol>';
|
||||
?>
|
||||
<li>
|
||||
|
||||
<div class="sqa_img">
|
||||
<a href="<?php echo $it_href; ?>">
|
||||
<?php echo get_it_image($small_image, 70, 70); ?>
|
||||
<span><?php echo $row['it_name']; ?></span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<section class="sqa_section">
|
||||
<h2><?php echo $row['iq_subject']; ?></h2>
|
||||
|
||||
<dl class="sqa_dl">
|
||||
<dt>작성자</dt>
|
||||
<dd><?php echo $row['iq_name']; ?></dd>
|
||||
<dt>작성일</dt>
|
||||
<dd><?php echo substr($row['iq_time'],0,10); ?></dd>
|
||||
<dt>상태</dt>
|
||||
<dd class="<?php echo $iq_style; ?>"><?php echo $iq_stats; ?></dd>
|
||||
</dl>
|
||||
|
||||
<div id="sqa_con_<?php echo $i; ?>" class="sqa_con" style="display:none;">
|
||||
<div class="sit_qa_qaq">
|
||||
<strong>문의내용</strong><br>
|
||||
<?php echo $iq_question; // 상품 문의 내용 ?>
|
||||
</div>
|
||||
<div class="sit_qa_qaa">
|
||||
<strong>답변</strong><br>
|
||||
<?php echo $iq_answer; ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="sqa_con_btn"><button class="sqa_con_<?php echo $i; ?>">보기</button></div>
|
||||
</section>
|
||||
|
||||
</li>
|
||||
<?php }
|
||||
if ($i > 0) echo '</ol>';
|
||||
if ($i == 0) echo '<p id="sqa_empty">자료가 없습니다.</p>';
|
||||
?>
|
||||
</div>
|
||||
|
||||
<?php echo get_paging($config['cf_write_pages'], $page, $total_page, "{$_SERVER['PHP_SELF']}?$qstr&page="); ?>
|
||||
|
||||
<script>
|
||||
$(function(){
|
||||
// 사용후기 더보기
|
||||
$(".sqa_con_btn button").click(function(){
|
||||
var sqa_con_no = $(this).attr("class");
|
||||
$("#"+sqa_con_no).is(":hidden") ? $("#"+sqa_con_no).show() : $("#"+sqa_con_no).hide();
|
||||
});
|
||||
|
||||
$(".sqa_con_btn button").toggle(function(){
|
||||
$(this).text("닫기");
|
||||
}, function(){
|
||||
$(this).text("보기");
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<!-- } 전체 상품 사용후기 목록 끝 -->
|
||||
|
||||
<?php
|
||||
include_once('./_tail.php');
|
||||
?>
|
||||
|
||||
@ -15,4 +15,42 @@ if(!file_exists($itemuse_skin)) {
|
||||
} else {
|
||||
include_once($itemuse_skin);
|
||||
}
|
||||
|
||||
// 현재페이지, 총페이지수, 한페이지에 보여줄 행, URL
|
||||
function itemuse_page($write_pages, $cur_page, $total_page, $url, $add="")
|
||||
{
|
||||
$url = preg_replace('#&page=[0-9]*(&page=)$#', '$1', $url);
|
||||
|
||||
$str = '';
|
||||
if ($cur_page > 1) {
|
||||
$str .= '<a href="'.$url.'1'.$add.'" class="pg_page pg_start">처음</a>'.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 .= '<a href="'.$url.($start_page-1).$add.'" class="pg_page pg_prev">이전</a>'.PHP_EOL;
|
||||
|
||||
if ($total_page > 1) {
|
||||
for ($k=$start_page;$k<=$end_page;$k++) {
|
||||
if ($cur_page != $k)
|
||||
$str .= '<a href="'.$url.$k.$add.'" class="pg_page">'.$k.'</a><span class="sound_only">페이지</span>'.PHP_EOL;
|
||||
else
|
||||
$str .= '<span class="sound_only">열린</span><strong class="pg_current">'.$k.'</strong><span class="sound_only">페이지</span>'.PHP_EOL;
|
||||
}
|
||||
}
|
||||
|
||||
if ($total_page > $end_page) $str .= '<a href="'.$url.($end_page+1).$add.'" class="pg_page pg_next">다음</a>'.PHP_EOL;
|
||||
|
||||
if ($cur_page < $total_page) {
|
||||
$str .= '<a href="'.$url.$total_page.$add.'" class="pg_page pg_end">맨끝</a>'.PHP_EOL;
|
||||
}
|
||||
|
||||
if ($str)
|
||||
return "<nav class=\"pg_wrap\"><span class=\"pg\">{$str}</span></nav>";
|
||||
else
|
||||
return "";
|
||||
}
|
||||
?>
|
||||
@ -54,106 +54,21 @@ $rows = $config['cf_page_rows'];
|
||||
$total_page = ceil($total_count / $rows); // 전체 페이지 계산
|
||||
if ($page == "") { $page = 1; } // 페이지가 없으면 첫 페이지 (1 페이지)
|
||||
$from_record = ($page - 1) * $rows; // 시작 열을 구함
|
||||
?>
|
||||
|
||||
<!-- 전체 상품 사용후기 목록 시작 { -->
|
||||
<form method="get" action="<?php echo $_SERVER['PHP_SELF']; ?>">
|
||||
<div id="sps_sch">
|
||||
<a href="<?php echo $_SERVER['PHP_SELF']; ?>">전체보기</a>
|
||||
<label for="sfl" class="sound_only">검색항목</label>
|
||||
<select name="sfl" required id="sfl">
|
||||
<option value="">선택</option>
|
||||
<option value="b.it_name" <?php echo get_selected($sfl, "b.it_name"); ?>>상품명</option>
|
||||
<option value="a.it_id" <?php echo get_selected($sfl, "a.it_id"); ?>>상품코드</option>
|
||||
<option value="a.is_subject"<?php echo get_selected($sfl, "a.is_subject"); ?>>후기제목</option>
|
||||
<option value="a.is_content"<?php echo get_selected($sfl, "a.is_content"); ?>>후기내용</option>
|
||||
<option value="a.is_name" <?php echo get_selected($sfl, "a.is_name"); ?>>작성자명</option>
|
||||
<option value="a.mb_id" <?php echo get_selected($sfl, "a.mb_id"); ?>>작성자아이디</option>
|
||||
</select>
|
||||
<label for="stx" class="sound_only">검색어<strong class="sound_only"> 필수</strong></label>
|
||||
<input type="text" name="stx" value="<?php echo $stx; ?>" id="stx" required class="frm_input">
|
||||
<input type="submit" value="검색" class="btn_submit">
|
||||
</div>
|
||||
</form>
|
||||
$sql = " select *
|
||||
$sql_common
|
||||
$sql_search
|
||||
$sql_order
|
||||
limit $from_record, $rows ";
|
||||
$result = sql_query($sql);
|
||||
|
||||
<div id="sps">
|
||||
$itemuselist_skin = G5_SHOP_SKIN_PATH.'/itemuselist.skin.php';
|
||||
|
||||
<!-- <p><?php echo $config['cf_title']; ?> 전체 사용후기 목록입니다.</p> -->
|
||||
if(!file_exists($itemuselist_skin)) {
|
||||
echo str_replace(G5_PATH.'/', '', $itemuselist_skin).' 스킨 파일이 존재하지 않습니다.';
|
||||
} else {
|
||||
include_once($itemuselist_skin);
|
||||
}
|
||||
|
||||
<?php
|
||||
$sql = " select *
|
||||
$sql_common
|
||||
$sql_search
|
||||
$sql_order
|
||||
limit $from_record, $rows ";
|
||||
$result = sql_query($sql);
|
||||
for ($i=0; $row=sql_fetch_array($result); $i++)
|
||||
{
|
||||
$num = $total_count - ($page - 1) * $rows - $i;
|
||||
$star = get_star($row['is_score']);
|
||||
|
||||
$is_content = get_view_thumbnail($row['is_content'], 500);
|
||||
$small_image = $row['it_id'];
|
||||
|
||||
$row2 = sql_fetch(" select it_name from {$g5['g5_shop_item_table']} where it_id = '{$row['it_id']}' ");
|
||||
$it_href = G5_SHOP_URL."/item.php?it_id={$row['it_id']}";
|
||||
|
||||
if ($i == 0) echo '<ol>';
|
||||
?>
|
||||
<li>
|
||||
|
||||
<div class="sps_img">
|
||||
<a href="<?php echo $it_href; ?>">
|
||||
<?php echo get_it_image($small_image, 70, 70); ?>
|
||||
<span><?php echo $row2['it_name']; ?></span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<section class="sps_section">
|
||||
<h2><?php echo $row['is_subject']; ?></h2>
|
||||
|
||||
<dl class="sps_dl">
|
||||
<dt>작성자</dt>
|
||||
<dd><?php echo $row['is_name']; ?></dd>
|
||||
<dt>작성일</dt>
|
||||
<dd><?php echo substr($row['is_time'],0,10); ?></dd>
|
||||
<dt>평가점수</dt>
|
||||
<dd><img src="<?php echo G5_URL; ?>/shop/img/s_star<?php echo $star; ?>.png" alt="별<?php echo $star; ?>개"></dd>
|
||||
</dl>
|
||||
|
||||
<div id="sps_con_<?php echo $i; ?>" style="display:none;">
|
||||
<?php echo $is_content; // 사용후기 내용 ?>
|
||||
</div>
|
||||
|
||||
<div class="sps_con_btn"><button class="sps_con_<?php echo $i; ?>">보기</button></div>
|
||||
</section>
|
||||
|
||||
</li>
|
||||
<?php }
|
||||
if ($i > 0) echo '</ol>';
|
||||
if ($i == 0) echo '<p id="sps_empty">자료가 없습니다.</p>';
|
||||
?>
|
||||
</div>
|
||||
|
||||
<?php echo get_paging($config['cf_write_pages'], $page, $total_page, "{$_SERVER['PHP_SELF']}?$qstr&page="); ?>
|
||||
|
||||
<script>
|
||||
$(function(){
|
||||
// 사용후기 더보기
|
||||
$(".sps_con_btn button").click(function(){
|
||||
var sps_con_no = $(this).attr("class");
|
||||
$("#"+sps_con_no).is(":hidden") ? $("#"+sps_con_no).show() : $("#"+sps_con_no).hide();
|
||||
});
|
||||
|
||||
$(".sps_con_btn button").toggle(function(){
|
||||
$(this).text("닫기");
|
||||
}, function(){
|
||||
$(this).text("보기");
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<!-- } 전체 상품 사용후기 목록 끝 -->
|
||||
|
||||
<?php
|
||||
include_once('./_tail.php');
|
||||
?>
|
||||
|
||||
@ -46,6 +46,11 @@ if ($is_admin)
|
||||
echo '<div class="sct_admin"><a href="'.G5_ADMIN_URL.'/shop_admin/categoryform.php?w=u&ca_id='.$ca_id.'" class="btn_admin">분류 관리</a></div>';
|
||||
?>
|
||||
|
||||
<script>
|
||||
var itemlist_ca_id = "<?php echo $ca_id; ?>";
|
||||
</script>
|
||||
<script src="<?php echo G5_JS_URL; ?>/shop.list.js"></script>
|
||||
|
||||
<!-- 상품 목록 시작 { -->
|
||||
<div id="sct">
|
||||
|
||||
@ -116,9 +121,6 @@ if ($is_admin)
|
||||
?>
|
||||
|
||||
<?php
|
||||
// 상품 보기 타입 변경 처리 스크립트
|
||||
include G5_SHOP_SKIN_PATH.'/list.sub2.skin.php';
|
||||
|
||||
$qstr1 .= 'ca_id='.$ca_id;
|
||||
if($skin)
|
||||
$qstr1 .= '&skin='.$skin;
|
||||
|
||||
@ -317,17 +317,17 @@ $sns_share_links .= get_sns_share_link('googleplus', $sns_url, $sns_title, G5_SH
|
||||
<!-- 총 구매액 -->
|
||||
<div id="sit_tot_price"></div>
|
||||
|
||||
<?php if ($it['it_use']) { ?>
|
||||
<ul id="sit_ov_btn">
|
||||
<?php if ($it['it_use']) { ?>
|
||||
<?php if (!$it['it_tel_inq']) { ?>
|
||||
<li><input type="submit" onclick="document.pressed=this.value;" value="바로구매" id="sit_btn_buy"></li>
|
||||
<li><input type="submit" onclick="document.pressed=this.value;" value="장바구니" id="sit_btn_cart"></li>
|
||||
<?php } ?>
|
||||
|
||||
<li><a href="javascript:item_wish(document.fitem, '<?php echo $it['it_id']; ?>');" id="sit_btn_wish">위시리스트</a></li>
|
||||
<li><a href="javascript:popup_item_recommend('<?php echo $it['it_id']; ?>');" id="sit_btn_rec">추천하기</a></li>
|
||||
<?php if (!$it['it_tel_inq']) { ?>
|
||||
<li><input type="submit" onclick="document.pressed=this.value;" value="바로구매" id="sit_btn_buy"></li>
|
||||
<li><input type="submit" onclick="document.pressed=this.value;" value="장바구니" id="sit_btn_cart"></li>
|
||||
<?php } ?>
|
||||
|
||||
<li><a href="javascript:item_wish(document.fitem, '<?php echo $it['it_id']; ?>');" id="sit_btn_wish">위시리스트</a></li>
|
||||
<li><a href="javascript:popup_item_recommend('<?php echo $it['it_id']; ?>');" id="sit_btn_rec">추천하기</a></li>
|
||||
</ul>
|
||||
<?php } ?>
|
||||
|
||||
<script>
|
||||
// 상품보관
|
||||
|
||||
@ -105,44 +105,6 @@ $result = sql_query($sql);
|
||||
</section>
|
||||
|
||||
<?php
|
||||
// 현재페이지, 총페이지수, 한페이지에 보여줄 행, URL
|
||||
function itemqa_page($write_pages, $cur_page, $total_page, $url, $add="")
|
||||
{
|
||||
$url = preg_replace('#&page=[0-9]*(&page=)$#', '$1', $url);
|
||||
|
||||
$str = '';
|
||||
if ($cur_page > 1) {
|
||||
$str .= '<a href="'.$url.'1'.$add.'" class="qa_page qa_start">처음</a>'.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 .= '<a href="'.$url.($start_page-1).$add.'" class="qa_page pg_prev">이전</a>'.PHP_EOL;
|
||||
|
||||
if ($total_page > 1) {
|
||||
for ($k=$start_page;$k<=$end_page;$k++) {
|
||||
if ($cur_page != $k)
|
||||
$str .= '<a href="'.$url.$k.$add.'" class="qa_page">'.$k.'</a><span class="sound_only">페이지</span>'.PHP_EOL;
|
||||
else
|
||||
$str .= '<span class="sound_only">열린</span><strong class="pg_current">'.$k.'</strong><span class="sound_only">페이지</span>'.PHP_EOL;
|
||||
}
|
||||
}
|
||||
|
||||
if ($total_page > $end_page) $str .= '<a href="'.$url.($end_page+1).$add.'" class="qa_page pg_next">다음</a>'.PHP_EOL;
|
||||
|
||||
if ($cur_page < $total_page) {
|
||||
$str .= '<a href="'.$url.$total_page.$add.'" class="qa_page pg_end">맨끝</a>'.PHP_EOL;
|
||||
}
|
||||
|
||||
if ($str)
|
||||
return "<nav class=\"pg_wrap\"><span class=\"pg\">{$str}</span></nav>";
|
||||
else
|
||||
return "";
|
||||
}
|
||||
|
||||
echo itemqa_page($config['cf_write_pages'], $page, $total_page, "./itemqa.php?it_id=$it_id&page=", "");
|
||||
?>
|
||||
|
||||
|
||||
121
skin/shop/basic/itemqalist.skin.php
Normal file
121
skin/shop/basic/itemqalist.skin.php
Normal file
@ -0,0 +1,121 @@
|
||||
<?php
|
||||
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
|
||||
?>
|
||||
|
||||
<link rel="stylesheet" href="<?php echo G5_SHOP_SKIN_URL; ?>/style.css">
|
||||
|
||||
<!-- 전체 상품 문의 목록 시작 { -->
|
||||
|
||||
<form method="get" action="<?php echo $_SERVER['PHP_SELF']; ?>">
|
||||
<div id="sqa_sch">
|
||||
<a href="<?php echo $_SERVER['PHP_SELF']; ?>">전체보기</a>
|
||||
<label for="sfl" class="sound_only">검색항목</label>
|
||||
<select name="sfl" required id="sfl">
|
||||
<option value="">선택</option>
|
||||
<option value="b.it_name" <?php echo get_selected($sfl, "b.it_name", true); ?>>상품명</option>
|
||||
<option value="a.it_id" <?php echo get_selected($sfl, "a.it_id"); ?>>상품코드</option>
|
||||
<option value="a.iq_subject" <?php echo get_selected($sfl, "a.is_subject"); ?>>문의제목</option>
|
||||
<option value="a.iq_question"<?php echo get_selected($sfl, "a.iq_question"); ?>>문의내용</option>
|
||||
<option value="a.iq_name" <?php echo get_selected($sfl, "a.it_id"); ?>>작성자명</option>
|
||||
<option value="a.mb_id" <?php echo get_selected($sfl, "a.mb_id"); ?>>작성자아이디</option>
|
||||
</select>
|
||||
|
||||
<label for="stx" class="sound_only">검색어<strong class="sound_only"> 필수</strong></label>
|
||||
<input type="text" name="stx" value="<?php echo $stx; ?>" id="stx" required class="required frm_input">
|
||||
<input type="submit" value="검색" class="btn_submit">
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<div id="sqa">
|
||||
|
||||
<!-- <p><?php echo $config['cf_title']; ?> 전체 상품문의 목록입니다.</p> -->
|
||||
|
||||
<?php
|
||||
for ($i=0; $row=sql_fetch_array($result); $i++)
|
||||
{
|
||||
$num = $total_count - ($page - 1) * $rows - $i;
|
||||
$star = get_star($row['is_score']);
|
||||
|
||||
$small_image = $row['it_id'];
|
||||
|
||||
$it_href = G5_SHOP_URL.'/item.php?it_id='.$row['it_id'];
|
||||
|
||||
$iq_question = get_view_thumbnail($row['iq_question'], 500);
|
||||
|
||||
if ($row['iq_answer'])
|
||||
{
|
||||
$iq_answer = get_view_thumbnail($row['iq_answer'], 500);
|
||||
$iq_stats = '답변완료';
|
||||
$iq_style = 'sit_qaa_done';
|
||||
$is_answer = true;
|
||||
} else {
|
||||
$iq_stats = '답변전';
|
||||
$iq_style = 'sit_qaa_yet';
|
||||
$iq_answer = '답변이 등록되지 않았습니다.';
|
||||
$is_answer = false;
|
||||
}
|
||||
|
||||
if ($i == 0) echo '<ol>';
|
||||
?>
|
||||
<li>
|
||||
|
||||
<div class="sqa_img">
|
||||
<a href="<?php echo $it_href; ?>">
|
||||
<?php echo get_it_image($small_image, 70, 70); ?>
|
||||
<span><?php echo $row['it_name']; ?></span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<section class="sqa_section">
|
||||
<h2><?php echo $row['iq_subject']; ?></h2>
|
||||
|
||||
<dl class="sqa_dl">
|
||||
<dt>작성자</dt>
|
||||
<dd><?php echo $row['iq_name']; ?></dd>
|
||||
<dt>작성일</dt>
|
||||
<dd><?php echo substr($row['iq_time'],0,10); ?></dd>
|
||||
<dt>상태</dt>
|
||||
<dd class="<?php echo $iq_style; ?>"><?php echo $iq_stats; ?></dd>
|
||||
</dl>
|
||||
|
||||
<div id="sqa_con_<?php echo $i; ?>" class="sqa_con" style="display:none;">
|
||||
<div class="sit_qa_qaq">
|
||||
<strong>문의내용</strong><br>
|
||||
<?php echo $iq_question; // 상품 문의 내용 ?>
|
||||
</div>
|
||||
<div class="sit_qa_qaa">
|
||||
<strong>답변</strong><br>
|
||||
<?php echo $iq_answer; ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="sqa_con_btn"><button class="sqa_con_<?php echo $i; ?>">보기</button></div>
|
||||
</section>
|
||||
|
||||
</li>
|
||||
<?php }
|
||||
if ($i > 0) echo '</ol>';
|
||||
if ($i == 0) echo '<p id="sqa_empty">자료가 없습니다.</p>';
|
||||
?>
|
||||
</div>
|
||||
|
||||
<?php echo get_paging($config['cf_write_pages'], $page, $total_page, "{$_SERVER['PHP_SELF']}?$qstr&page="); ?>
|
||||
|
||||
<script>
|
||||
$(function(){
|
||||
// 상품문의 더보기
|
||||
$(".sqa_con_btn button").click(function(){
|
||||
var $con = $(this).parent().prev();
|
||||
if($con.is(":visible")) {
|
||||
$con.slideUp();
|
||||
$(this).text("보기");
|
||||
} else {
|
||||
$(".sqa_con_btn button").text("보기");
|
||||
$("div[id^=sqa_con]:visible").hide();
|
||||
$con.slideDown();
|
||||
$(this).text("닫기");
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<!-- } 전체 상품 사용후기 목록 끝 -->
|
||||
@ -79,44 +79,6 @@ $result = sql_query($sql);
|
||||
</section>
|
||||
|
||||
<?php
|
||||
// 현재페이지, 총페이지수, 한페이지에 보여줄 행, URL
|
||||
function itemuse_page($write_pages, $cur_page, $total_page, $url, $add="")
|
||||
{
|
||||
$url = preg_replace('#&page=[0-9]*(&page=)$#', '$1', $url);
|
||||
|
||||
$str = '';
|
||||
if ($cur_page > 1) {
|
||||
$str .= '<a href="'.$url.'1'.$add.'" class="pg_page pg_start">처음</a>'.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 .= '<a href="'.$url.($start_page-1).$add.'" class="pg_page pg_prev">이전</a>'.PHP_EOL;
|
||||
|
||||
if ($total_page > 1) {
|
||||
for ($k=$start_page;$k<=$end_page;$k++) {
|
||||
if ($cur_page != $k)
|
||||
$str .= '<a href="'.$url.$k.$add.'" class="pg_page">'.$k.'</a><span class="sound_only">페이지</span>'.PHP_EOL;
|
||||
else
|
||||
$str .= '<span class="sound_only">열린</span><strong class="pg_current">'.$k.'</strong><span class="sound_only">페이지</span>'.PHP_EOL;
|
||||
}
|
||||
}
|
||||
|
||||
if ($total_page > $end_page) $str .= '<a href="'.$url.($end_page+1).$add.'" class="pg_page pg_next">다음</a>'.PHP_EOL;
|
||||
|
||||
if ($cur_page < $total_page) {
|
||||
$str .= '<a href="'.$url.$total_page.$add.'" class="pg_page pg_end">맨끝</a>'.PHP_EOL;
|
||||
}
|
||||
|
||||
if ($str)
|
||||
return "<nav class=\"pg_wrap\"><span class=\"pg\">{$str}</span></nav>";
|
||||
else
|
||||
return "";
|
||||
}
|
||||
|
||||
echo itemuse_page($config['cf_write_pages'], $page, $total_page, "./itemuse.php?it_id=$it_id&page=", "");
|
||||
?>
|
||||
|
||||
|
||||
99
skin/shop/basic/itemuselist.skin.php
Normal file
99
skin/shop/basic/itemuselist.skin.php
Normal file
@ -0,0 +1,99 @@
|
||||
<?php
|
||||
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
|
||||
?>
|
||||
|
||||
<link rel="stylesheet" href="<?php echo G5_SHOP_SKIN_URL; ?>/style.css">
|
||||
|
||||
<!-- 전체 상품 사용후기 목록 시작 { -->
|
||||
<form method="get" action="<?php echo $_SERVER['PHP_SELF']; ?>">
|
||||
<div id="sps_sch">
|
||||
<a href="<?php echo $_SERVER['PHP_SELF']; ?>">전체보기</a>
|
||||
<label for="sfl" class="sound_only">검색항목</label>
|
||||
<select name="sfl" required id="sfl">
|
||||
<option value="">선택</option>
|
||||
<option value="b.it_name" <?php echo get_selected($sfl, "b.it_name"); ?>>상품명</option>
|
||||
<option value="a.it_id" <?php echo get_selected($sfl, "a.it_id"); ?>>상품코드</option>
|
||||
<option value="a.is_subject"<?php echo get_selected($sfl, "a.is_subject"); ?>>후기제목</option>
|
||||
<option value="a.is_content"<?php echo get_selected($sfl, "a.is_content"); ?>>후기내용</option>
|
||||
<option value="a.is_name" <?php echo get_selected($sfl, "a.is_name"); ?>>작성자명</option>
|
||||
<option value="a.mb_id" <?php echo get_selected($sfl, "a.mb_id"); ?>>작성자아이디</option>
|
||||
</select>
|
||||
<label for="stx" class="sound_only">검색어<strong class="sound_only"> 필수</strong></label>
|
||||
<input type="text" name="stx" value="<?php echo $stx; ?>" id="stx" required class="required frm_input">
|
||||
<input type="submit" value="검색" class="btn_submit">
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<div id="sps">
|
||||
|
||||
<!-- <p><?php echo $config['cf_title']; ?> 전체 사용후기 목록입니다.</p> -->
|
||||
|
||||
<?php
|
||||
for ($i=0; $row=sql_fetch_array($result); $i++)
|
||||
{
|
||||
$num = $total_count - ($page - 1) * $rows - $i;
|
||||
$star = get_star($row['is_score']);
|
||||
|
||||
$is_content = get_view_thumbnail($row['is_content'], 500);
|
||||
$small_image = $row['it_id'];
|
||||
|
||||
$row2 = sql_fetch(" select it_name from {$g5['g5_shop_item_table']} where it_id = '{$row['it_id']}' ");
|
||||
$it_href = G5_SHOP_URL."/item.php?it_id={$row['it_id']}";
|
||||
|
||||
if ($i == 0) echo '<ol>';
|
||||
?>
|
||||
<li>
|
||||
|
||||
<div class="sps_img">
|
||||
<a href="<?php echo $it_href; ?>">
|
||||
<?php echo get_it_image($small_image, 70, 70); ?>
|
||||
<span><?php echo $row2['it_name']; ?></span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<section class="sps_section">
|
||||
<h2><?php echo $row['is_subject']; ?></h2>
|
||||
|
||||
<dl class="sps_dl">
|
||||
<dt>작성자</dt>
|
||||
<dd><?php echo $row['is_name']; ?></dd>
|
||||
<dt>작성일</dt>
|
||||
<dd><?php echo substr($row['is_time'],0,10); ?></dd>
|
||||
<dt>평가점수</dt>
|
||||
<dd><img src="<?php echo G5_URL; ?>/shop/img/s_star<?php echo $star; ?>.png" alt="별<?php echo $star; ?>개"></dd>
|
||||
</dl>
|
||||
|
||||
<div id="sps_con_<?php echo $i; ?>" style="display:none;">
|
||||
<?php echo $is_content; // 사용후기 내용 ?>
|
||||
</div>
|
||||
|
||||
<div class="sps_con_btn"><button class="sps_con_<?php echo $i; ?>">보기</button></div>
|
||||
</section>
|
||||
|
||||
</li>
|
||||
<?php }
|
||||
if ($i > 0) echo '</ol>';
|
||||
if ($i == 0) echo '<p id="sps_empty">자료가 없습니다.</p>';
|
||||
?>
|
||||
</div>
|
||||
|
||||
<?php echo get_paging($config['cf_write_pages'], $page, $total_page, "{$_SERVER['PHP_SELF']}?$qstr&page="); ?>
|
||||
|
||||
<script>
|
||||
$(function(){
|
||||
// 사용후기 더보기
|
||||
$(".sps_con_btn button").click(function(){
|
||||
var $con = $(this).parent().prev();
|
||||
if($con.is(":visible")) {
|
||||
$con.slideUp();
|
||||
$(this).text("보기");
|
||||
} else {
|
||||
$(".sps_con_btn button").text("보기");
|
||||
$("div[id^=sps_con]:visible").hide();
|
||||
$con.slideDown();
|
||||
$(this).text("닫기");
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<!-- } 전체 상품 사용후기 목록 끝 -->
|
||||
Reference in New Issue
Block a user