기타 추적되지 않는 파일들..

This commit is contained in:
2025-07-02 14:16:37 +09:00
parent 2d7bbdca89
commit b6080d2e47
74 changed files with 14184 additions and 2028 deletions

View File

@ -37,10 +37,13 @@ if($is_kakaopay_use) {
<tr>
<th scope="col">상품명</th>
<th scope="col">총수량</th>
<th scope="col">판매가</th>
<th scope="col">상품금액</th>
<th scope="col">소계</th>
<th scope="col">포인트</th>
<th scope="col">배송비</th>
<?php if ((!isset($rb_item_res['res_is'])) || $rb_item_res['res_is'] != 1) { ?>
<th scope="col">배송비</th>
<?php } ?>
</tr>
</thead>
<tbody>
@ -83,13 +86,30 @@ if($is_kakaopay_use) {
for ($i=0; $row=sql_fetch_array($result); $i++)
{
// 합계금액 계산
$sql = " select SUM(IF(io_type = 1, (io_price * ct_qty), ((ct_price + io_price) * ct_qty))) as price,
SUM(ct_point * ct_qty) as point,
SUM(ct_qty) as qty
from {$g5['g5_shop_cart_table']}
where it_id = '{$row['it_id']}'
and od_id = '$s_cart_id' ";
// 예약 관련
if (isset($rb_item_res['res_is']) && $rb_item_res['res_is'] == 1) {
$resv = sql_fetch("SELECT * FROM {$g5['g5_shop_cart_table']} WHERE ct_id = '{$row['ct_id']}' ");
}
// 합계금액 계산 (예약상품일 경우 합계방식 변경)
$price_calc = "((ct_price + io_price) * ct_qty)";
if (isset($rb_item_res['res_is']) && $rb_item_res['res_is'] == 1 && isset($resv['ct_types']) && $resv['ct_types'] == 1) {
$price_calc = "((ct_price + io_price) * ct_qty * ct_date_d +
(COALESCE(ct_user_pri1, 0) * COALESCE(ct_user_qty1, 0)) +
(COALESCE(ct_user_pri2, 0) * COALESCE(ct_user_qty2, 0)) +
(COALESCE(ct_user_pri3, 0) * COALESCE(ct_user_qty3, 0)))";
}
$sql = "SELECT SUM(IF(io_type = 1, (io_price * ct_qty), $price_calc)) AS price,
SUM(ct_point * ct_qty) AS point,
SUM(ct_qty) AS qty
FROM {$g5['g5_shop_cart_table']}
WHERE it_id = '{$row['it_id']}'
AND od_id = '$s_cart_id'";
$sum = sql_fetch($sql);
if (!$goods)
@ -112,7 +132,7 @@ if($is_kakaopay_use) {
$good_info .= "good_amtx=".$row['ct_price'].chr(31);
}
$image = get_it_image($row['it_id'], 80, 80);
$image = rb_it_image($row['it_id'], 80, 80);
$it_name = '<b>' . stripslashes($row['it_name']) . '</b>';
$it_options = print_item_options($row['it_id'], $s_cart_id);
@ -184,6 +204,12 @@ if($is_kakaopay_use) {
if($sendcost == 0)
$ct_send_cost = '무료';
}
if(isset($rb_item_res['res_is']) && $rb_item_res['res_is'] == 1) {
if(isset($resv['ct_types']) && $resv['ct_types'] == 1) {
$ct_send_cost = '-';
}
}
?>
<tr>
@ -201,14 +227,24 @@ if($is_kakaopay_use) {
<?php } ?>
<?php echo $it_name; ?>
<?php echo $cp_button; ?>
<?php
//예약정보 로드
if(isset($rb_item_res['res_is']) && $rb_item_res['res_is'] == 1) {
if(isset($resv['ct_types']) && $resv['ct_types'] == 1) {
include (G5_PATH.'/rb/rb.mod/reservation/info.inc.php');
}
}
?>
</div>
</td>
<td class="td_num"><?php echo number_format($sum['qty']); ?></td>
<td class="td_numbig text_right"><?php echo number_format($row['ct_price']); ?></td>
<td class="td_numbig text_right"><span class="total_price"><?php echo number_format($sell_price); ?></span></td>
<td class="td_numbig text_right"><?php echo number_format($point); ?></td>
<?php if ((!isset($rb_item_res['res_is'])) || $rb_item_res['res_is'] != 1) { ?>
<td class="td_dvr"><?php echo $ct_send_cost; ?></td>
<?php } ?>
</tr>
<?php
@ -258,7 +294,7 @@ if($is_kakaopay_use) {
<!-- 주문하시는 분 입력 시작 { -->
<section id="sod_frm_orderer">
<h2>주문하시는 분</h2>
<h2>주문자 정보</h2>
<div class="tbl_frm01 tbl_wrap">
<table>
@ -279,12 +315,12 @@ if($is_kakaopay_use) {
<?php } ?>
<tr>
<th scope="row"><label for="od_tel">전화번호<strong class="sound_only"> 필수</strong></label></th>
<td><input type="text" name="od_tel" value="<?php echo get_text($member['mb_tel']); ?>" id="od_tel" required class="frm_input required" maxlength="20"></td>
<th scope="row"><label for="od_tel">일반전화</label></th>
<td><input type="text" name="od_tel" value="<?php echo get_text($member['mb_tel']); ?>" id="od_tel" class="frm_input" maxlength="20"></td>
</tr>
<tr>
<th scope="row"><label for="od_hp">핸드폰</label></th>
<td><input type="text" name="od_hp" value="<?php echo get_text($member['mb_hp']); ?>" id="od_hp" class="frm_input" maxlength="20"></td>
<th scope="row"><label for="od_hp">휴대전화</label></th>
<td><input type="text" name="od_hp" value="<?php echo get_text($member['mb_hp']); ?>" id="od_hp" class="frm_input required" maxlength="20" required></td>
</tr>
<tr>
<th scope="row">주소</th>
@ -320,7 +356,7 @@ if($is_kakaopay_use) {
}
?>
</select> -->
<input type="text" name="od_hope_date" value="" id="od_hope_date" required class="frm_input required" size="11" maxlength="10" readonly="readonly"> 이후로 배송 바랍니다.
<input type="text" name="od_hope_date" value="" id="od_hope_date" required class="frm_input required datepicker" size="11" maxlength="10" readonly="readonly"> 이후로 배송 바랍니다.
</td>
</tr>
<?php } ?>
@ -332,7 +368,8 @@ if($is_kakaopay_use) {
<!-- 받으시는 분 입력 시작 { -->
<section id="sod_frm_taker">
<h2>받으시는 분</h2>
<br><br>
<h2>사용자(수령자) 정보</h2>
<div class="tbl_frm01 tbl_wrap">
<table>
@ -356,7 +393,7 @@ if($is_kakaopay_use) {
if(isset($row['ad_id']) && $row['ad_id']) {
$val1 = $row['ad_name'].$sep.$row['ad_tel'].$sep.$row['ad_hp'].$sep.$row['ad_zip1'].$sep.$row['ad_zip2'].$sep.$row['ad_addr1'].$sep.$row['ad_addr2'].$sep.$row['ad_addr3'].$sep.$row['ad_jibeon'].$sep.$row['ad_subject'];
$addr_list .= '<input type="radio" name="ad_sel_addr" value="'.get_text($val1).'" id="ad_sel_addr_def">'.PHP_EOL;
$addr_list .= '<label for="ad_sel_addr_def">기본배송지</label>'.PHP_EOL;
$addr_list .= '<label for="ad_sel_addr_def">기본</label>'.PHP_EOL;
}
// 최근배송지
@ -369,14 +406,14 @@ if($is_kakaopay_use) {
$result = sql_query($sql);
for($i=0; $row=sql_fetch_array($result); $i++) {
$val1 = $row['ad_name'].$sep.$row['ad_tel'].$sep.$row['ad_hp'].$sep.$row['ad_zip1'].$sep.$row['ad_zip2'].$sep.$row['ad_addr1'].$sep.$row['ad_addr2'].$sep.$row['ad_addr3'].$sep.$row['ad_jibeon'].$sep.$row['ad_subject'];
$val2 = '<label for="ad_sel_addr_'.($i+1).'">최근배송지('.($row['ad_subject'] ? get_text($row['ad_subject']) : get_text($row['ad_name'])).')</label>';
$val2 = '<label for="ad_sel_addr_'.($i+1).'">최근</label>';
$addr_list .= '<input type="radio" name="ad_sel_addr" value="'.get_text($val1).'" id="ad_sel_addr_'.($i+1).'"> '.PHP_EOL.$val2.PHP_EOL;
}
$addr_list .= '<input type="radio" name="ad_sel_addr" value="new" id="od_sel_addr_new">'.PHP_EOL;
$addr_list .= '<label for="od_sel_addr_new">신규배송지</label>'.PHP_EOL;
$addr_list .= '<label for="od_sel_addr_new">신규</label>'.PHP_EOL;
$addr_list .='<a href="'.G5_SHOP_URL.'/orderaddress.php" id="order_address" class="btn_frmline">배송지목록</a>';
$addr_list .='<a href="'.G5_SHOP_URL.'/orderaddress.php" id="order_address" class="btn_frmline">주소지목록</a>';
} else {
// 주문자와 동일
$addr_list .= '<input type="checkbox" name="ad_sel_addr" value="same" id="ad_sel_addr_same">'.PHP_EOL;
@ -384,7 +421,7 @@ if($is_kakaopay_use) {
}
?>
<tr>
<th scope="row">배송지선택</th>
<th scope="row">주소</th>
<td>
<div class="order_choice_place">
<?php echo $addr_list; ?>
@ -393,11 +430,11 @@ if($is_kakaopay_use) {
</tr>
<?php if($is_member) { ?>
<tr>
<th scope="row"><label for="ad_subject">배송지명</label></th>
<th scope="row"><label for="ad_subject">주소명</label></th>
<td>
<input type="text" name="ad_subject" id="ad_subject" class="frm_input" maxlength="20">
<input type="checkbox" name="ad_default" id="ad_default" value="1">
<label for="ad_default">기본배송지로 설정</label>
<label for="ad_default">기본주소로 설정</label>
</td>
</tr>
<?php } ?>
@ -406,12 +443,12 @@ if($is_kakaopay_use) {
<td><input type="text" name="od_b_name" id="od_b_name" required class="frm_input required" maxlength="20"></td>
</tr>
<tr>
<th scope="row"><label for="od_b_tel">전화번호<strong class="sound_only"> 필수</strong></label></th>
<td><input type="text" name="od_b_tel" id="od_b_tel" required class="frm_input required" maxlength="20"></td>
<th scope="row"><label for="od_b_tel">일반전화<strong class="sound_only"> 필수</strong></label></th>
<td><input type="text" name="od_b_tel" id="od_b_tel" class="frm_input" maxlength="20"></td>
</tr>
<tr>
<th scope="row"><label for="od_b_hp">핸드폰</label></th>
<td><input type="text" name="od_b_hp" id="od_b_hp" class="frm_input" maxlength="20"></td>
<th scope="row"><label for="od_b_hp">휴대전화</label></th>
<td><input type="text" name="od_b_hp" id="od_b_hp" class="frm_input required" required maxlength="20"></td>
</tr>
<tr>
<th scope="row">주소</th>
@ -438,24 +475,59 @@ if($is_kakaopay_use) {
</div>
</section>
<!-- } 받으시는 분 입력 끝 -->
<?php
if (isset($rb_item_res['res_is']) && $rb_item_res['res_is'] == 1) {
$resv = sql_fetch("SELECT ct_user_qty1 FROM {$g5['g5_shop_cart_table']} WHERE od_id = '$s_cart_id' AND ct_select = '1' LIMIT 1");
$ct_user_qty1 = (int)$resv['ct_user_qty1'];
if(isset($ct_user_qty1) && $ct_user_qty1 > 0) {
?>
<section id="sod_frm_taker">
<br><br>
<h2>추가사용자 정보</h2>
<div class="tbl_frm01 tbl_wrap">
<table>
<tbody>
<?php for($i = 1; $i <= $ct_user_qty1; $i++) { ?>
<tr>
<th scope="row"><label for="od_b_name">사용자 <?php echo $i; ?><strong class="sound_only"> 필수</strong></label></th>
<td>
<input type="text" name="od_names[]" required class="frm_input required" required placeholder="이름" style="width:25%;">
<input type="text" name="od_hps[]" class="frm_input required" required placeholder="연락처" style="width:50%;">
</td>
</tr>
<?php } ?>
</tbody>
</table>
</div>
</section>
<?php } ?>
<?php } ?>
</div>
<div class="sod_right">
<!-- 주문상품 합계 시작 { -->
<div id="sod_bsk_tot">
<ul>
<li class="sod_bsk_sell">
<span>주문</span>
<li class="sod_bsk_sell" <?php if (isset($rb_item_res['res_is']) && $rb_item_res['res_is'] == 1) { ?>style="width:50%"<?php } ?>>
<span>금액</span>
<strong><?php echo number_format($tot_sell_price); ?></strong>원
</li>
<li class="sod_bsk_coupon">
<li class="sod_bsk_coupon" <?php if (isset($rb_item_res['res_is']) && $rb_item_res['res_is'] == 1) { ?>style="width:50%"<?php } ?>>
<span>쿠폰할인</span>
<strong id="ct_tot_coupon">0</strong>원
</li>
<?php if ((!isset($rb_item_res['res_is'])) || $rb_item_res['res_is'] != 1) { ?>
<li class="sod_bsk_dvr">
<span>배송비</span>
<strong><?php echo number_format($send_cost); ?></strong>원
</li>
<?php } ?>
<li class="sod_bsk_point">
<span>포인트</span>
<strong><?php echo number_format($tot_point); ?></strong>점
@ -522,7 +594,7 @@ if($is_kakaopay_use) {
<?php if($oc_cnt > 0) { ?>
<tr>
<th scope="row">주문할인</th>
<td>
<td class="sod_frm_flex">
<strong id="od_cp_price">0</strong>원
<input type="hidden" name="od_cp_id" value="">
<button type="button" id="od_coupon_btn" class="btn_frmline">쿠폰적용</button>
@ -532,18 +604,19 @@ if($is_kakaopay_use) {
<?php if($sc_cnt > 0) { ?>
<tr>
<th scope="row">배송비할인</th>
<td>
<td class="sod_frm_flex">
<strong id="sc_cp_price">0</strong>원
<input type="hidden" name="sc_cp_id" value="">
<button type="button" id="sc_coupon_btn" class="btn_frmline">쿠폰적용</button>
</td>
</tr>
<?php } ?>
<?php if ((!isset($rb_item_res['res_is'])) || $rb_item_res['res_is'] != 1) { ?>
<tr>
<th>추가배송비</th>
<td><strong id="od_send_cost2">0</strong>원<br>(지역에 따라 추가되는 도선료 등의 배송비입니다.)</td>
<td><strong id="od_send_cost2">0</strong>원</td>
</tr>
<?php } ?>
</tbody>
</table>
</div>
@ -882,7 +955,7 @@ $(function() {
$("#cp_frm").remove();
$cp_btn_el.focus();
});
$(document).on("click", ".cp_cancel", function() {
coupon_cancel($(this).closest("tr"));
calculate_total_price();
@ -890,6 +963,7 @@ $(function() {
$(this).closest("tr").find(".cp_btn").text("적용").focus();
$(this).remove();
});
$("#od_coupon_btn").click(function() {
if( $("#od_coupon_frm").parent(".od_coupon_wrap").length ){
@ -948,7 +1022,7 @@ $(function() {
$("#od_coupon_frm").remove();
$("#od_coupon_btn").text("변경").focus();
if(!$("#od_coupon_cancel").length)
$("#od_coupon_btn").after("<button type=\"button\" id=\"od_coupon_cancel\" class=\"cp_cancel\">취소</button>");
$("#od_coupon_btn").after("<button type=\"button\" id=\"od_coupon_cancel\" class=\"cp_cancel cp_cancel1\">취소</button>");
});
$(document).on("click", "#od_coupon_close", function() {
@ -1013,7 +1087,7 @@ $(function() {
$("#sc_coupon_frm").remove();
$("#sc_coupon_btn").text("변경").focus();
if(!$("#sc_coupon_cancel").length)
$("#sc_coupon_btn").after("<button type=\"button\" id=\"sc_coupon_cancel\" class=\"cp_cancel\">취소</button>");
$("#sc_coupon_btn").after("<button type=\"button\" id=\"sc_coupon_cancel\" class=\"cp_cancel1\">취소</button>");
});
$(document).on("click", "#sc_coupon_close", function() {
@ -1249,8 +1323,45 @@ function calculate_tax()
$("input[name=comm_free_mny]").val(comm_free_mny);
}
<?php if (isset($rb_item_res['res_is']) && $rb_item_res['res_is'] == 1) { ?>
function make_additional_user_data() {
var names = [];
var hps = [];
$("input[name='od_names[]']").each(function() {
names.push($(this).val().trim());
});
$("input[name='od_hps[]']").each(function() {
hps.push($(this).val().trim());
});
// 기존 숨은 필드 제거
$("input[name='od_names_final'], input[name='od_hps_final']").remove();
// 숨은 필드로 추가
$("<input>", {
type: "hidden",
name: "od_names_final",
value: names.join('|')
}).appendTo("#forderform");
$("<input>", {
type: "hidden",
name: "od_hps_final",
value: hps.join('|')
}).appendTo("#forderform");
}
<?php } ?>
function forderform_check(f)
{
<?php if (isset($rb_item_res['res_is']) && $rb_item_res['res_is'] == 1) { ?>
make_additional_user_data();
<?php } ?>
// 재고체크
var stock_msg = order_stock_check();
if(stock_msg != "") {
@ -1269,7 +1380,7 @@ function forderform_check(f)
if( (f.od_pwd.value.length<3) || (f.od_pwd.value.search(/([^A-Za-z0-9]+)/)!=-1) )
error_field(f.od_pwd, "회원이 아니신 경우 주문서 조회시 필요한 비밀번호를 3자리 이상 입력해 주십시오.");
}
check_field(f.od_tel, "주문하시는 분 전화번호를 입력하십시오.");
check_field(f.od_hp, "주문하시는 분 휴대전화 번호를 입력하십시오.");
check_field(f.od_addr1, "주소검색을 이용하여 주문하시는 분 주소를 입력하십시오.");
//check_field(f.od_addr2, " 주문하시는 분의 상세주소를 입력하십시오.");
check_field(f.od_zip, "");
@ -1286,7 +1397,7 @@ function forderform_check(f)
}
check_field(f.od_b_name, "받으시는 분 이름을 입력하십시오.");
check_field(f.od_b_tel, "받으시는 분 전화번호를 입력하십시오.");
check_field(f.od_b_hp, "받으시는 분 휴대전화 번호를 입력하십시오.");
check_field(f.od_b_addr1, "주소검색을 이용하여 받으시는 분 주소를 입력하십시오.");
//check_field(f.od_b_addr2, "받으시는 분의 상세주소를 입력하십시오.");
check_field(f.od_b_zip, "");