Merge branch 'master' into order
This commit is contained in:
@ -126,7 +126,7 @@ include_once('./_head.php');
|
||||
echo '<tr><td colspan="7" class="empty_table">장바구니에 담긴 상품이 없습니다.</td></tr>';
|
||||
} else {
|
||||
// 배송비 계산
|
||||
$send_cost = get_sendcost($tot_sell_price, $s_cart_id, 0);
|
||||
$send_cost = get_sendcost($s_cart_id, 0);
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
|
||||
@ -197,6 +197,10 @@ else // 장바구니에 담기
|
||||
continue;
|
||||
}
|
||||
|
||||
// 배송비결제
|
||||
if($it['it_sc_type'] > 1 && $it['it_sc_method'] == 1)
|
||||
$ct_send_cost = 1;
|
||||
|
||||
$sql .= $comma."( '$tmp_cart_id', '{$member['mb_id']}', '{$it['it_id']}', '{$it['it_name']}', '쇼핑', '{$it['it_price']}', '$point', '0', '0', '$io_value', '$ct_qty', '{$it['it_notax']}', '$io_id', '$io_type', '$io_price', '".G5_TIME_YMDHIS."', '$REMOTE_ADDR', '$ct_send_cost', '$sw_direct', '$ct_select' )";
|
||||
$comma = ' , ';
|
||||
$ct_count++;
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -293,7 +293,7 @@ function get_intall_file()
|
||||
alert('장바구니가 비어 있습니다.', G5_SHOP_URL.'/cart.php');
|
||||
} else {
|
||||
// 배송비 계산
|
||||
$send_cost = get_sendcost($tot_sell_price, $s_cart_id);
|
||||
$send_cost = get_sendcost($s_cart_id);
|
||||
}
|
||||
|
||||
// 복합과세처리
|
||||
|
||||
@ -182,7 +182,7 @@ if ((int)($row['od_price'] - $tot_cp_price) !== $i_price) {
|
||||
}
|
||||
|
||||
// 배송비가 상이함
|
||||
$send_cost = get_sendcost($row['od_price'], $tmp_cart_id);
|
||||
$send_cost = get_sendcost($tmp_cart_id);
|
||||
|
||||
$tot_sc_cp_price = 0;
|
||||
if($is_member && $send_cost > 0) {
|
||||
|
||||
@ -25,7 +25,6 @@ $sql = " select *,
|
||||
(od_cart_coupon + od_coupon + od_send_coupon) as couponprice
|
||||
from {$g5['g5_shop_order_table']}
|
||||
where mb_id = '{$member['mb_id']}'
|
||||
group by od_id
|
||||
order by od_id desc
|
||||
$limit ";
|
||||
$result = sql_query($sql);
|
||||
|
||||
Reference in New Issue
Block a user