merge 충돌 처리

This commit is contained in:
whitedot
2013-06-13 11:31:56 +09:00
parent c0d2b4ca7d
commit 80c20cc73f
36 changed files with 399 additions and 398 deletions

View File

@ -64,9 +64,6 @@ include_once('./_head.php');
$tot_sell_amount = 0;
$tot_cancel_amount = 0;
$goods = $goods_it_id = "";
$goods_count = -1;
// $s_uq_id 로 현재 장바구니 자료 쿼리
$sql = " select a.ct_id,
a.it_id,
@ -88,7 +85,7 @@ include_once('./_head.php');
$sql .= " order by a.ct_id ";
$result = sql_query($sql);
$good_info = '';
$it_send_cost = 0;
for ($i=0; $row=mysql_fetch_array($result); $i++)
{
@ -116,6 +113,11 @@ include_once('./_head.php');
$it_name .= '<div class="sod_bsk_itopt">'.$it_options.'</div>';
}
// 개별배송비 계산
if($default['de_send_cost_case'] == '개별') {
$it_send_cost += get_item_sendcost($row['it_id'], $sum['price'], $sum['qty']);
}
$point = $sum['point'];
$sell_amount = $sum['price'];
?>
@ -153,26 +155,26 @@ include_once('./_head.php');
// 배송비 계산
if ($default['de_send_cost_case'] == '없음')
$send_cost = 0;
else {
else if($default['de_send_cost_case'] == '상한') {
// 배송비 상한 : 여러단계의 배송비 적용 가능
$send_cost_limit = explode(";", $default['de_send_cost_limit']);
$send_cost_list = explode(";", $default['de_send_cost_list']);
$send_cost = 0;
for ($k=0; $k<count($send_cost_limit); $k++) {
// 총판매금액이 배송비 상한가 보다 작다면
if ($tot_sell_amount < $send_cost_limit[$k]) {
$send_cost = $send_cost_list[$k];
if ($tot_sell_amount < preg_replace('/[^0-9]/', '', $send_cost_limit[$k])) {
$send_cost = preg_replace('/[^0-9]/', '', $send_cost_list[$k]);
break;
}
}
} else { // 개별배송
$send_cost = $it_send_cost;
}
}
?>
</tbody>
</table>
<?php if ($goods_count) $goods .= ' 외 '.$goods_count.'건'; ?>
<?php
// 배송비가 0 보다 크다면 (있다면)
if ($send_cost > 0)

View File

@ -57,7 +57,7 @@ if (file_exists($himg)) // 상단 이미지
echo '<div id="socc_himg" class="socc_img"><img src="'.G4_DATA_URL.'/content/'.$co_id.'_h" alt=""></div>';
?>
<article id="socc" class="socc_<?=$co_id?>">
<article id="socc" class="socc_<?php echo $co_id; ?>">
<header>
<h1><?php echo $g4['title']; ?></h1>
</header>

View File

@ -582,10 +582,12 @@ else
<h2>이용후기</h2>
<?php echo pg_anchor('use'); ?>
<?php
$use_page_rows = 10; // 페이지당 목록수
include_once('./itemuse.inc.php');
?>
<div id="itemuse"></div>
<script>
$(function(){
$("#itemuse").load("./itemuse.php", {it_id:<?php echo $it_id; ?>});
});
</script>
</section>
<section id="sit_qa">

View File

@ -1,96 +0,0 @@
<?php
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
$itemuse_write = G4_BBS_URL.'/write.php?bo_table=itemuse&amp;wr_1='.$it_id;
$itemuse_board = G4_BBS_URL.'/board.php?bo_table=itemuse&amp;wr_1='.$it_id;
include_once(G4_LIB_PATH.'/thumb.lib.php');
?>
<a href="<?php echo $itemuse_board; ?>">더보기</a>
<table id="sit_ps_tbl">
<thead>
<tr>
<th>번호</th>
<th>제목</th>
<th>작성자</th>
<th>작성일</th>
<th>평점</th>
</tr>
</thead>
<?php
/*
여분필드 용도
wr_1 : 상품코드
wr_2 : 상품명
wr_3 : 평점 1~5
wr_4 : 관리자확인
*/
//$sql_common = " from `{$g4['write_prefix']}itemuse` where wr_is_comment = 0 and wr_1 = '{$it['it_id']}' and wr_4 = '1' ";
$sql_common = " from `{$g4['write_prefix']}itemuse` where wr_is_comment = 0 and wr_1 = '{$it['it_id']}' ";
// 테이블의 전체 레코드수만 얻음
$sql = " select COUNT(*) as cnt " . $sql_common;
$row = sql_fetch($sql);
$use_total_count = $row['cnt'];
$use_total_page = ceil($use_total_count / $use_page_rows); // 전체 페이지 계산
if ($use_page == "") $use_page = 1; // 페이지가 없으면 첫 페이지 (1 페이지)
$use_from_record = ($use_page - 1) * $use_page_rows; // 시작 레코드 구함
$sql = "select * $sql_common order by wr_num limit $use_from_record, $use_page_rows ";
$result = sql_query($sql);
for ($i=0; $row=sql_fetch_array($result); $i++)
{
$use_num = $use_total_count - ($use_page - 1) * $use_page_rows - $i;
$use_star = get_star($row['wr_3']);
$use_name = get_text($row['wr_name']);
$use_subject = conv_subject($row['wr_subject'],50,"…");
$use_content = $row['wr_content'];
$use_time = substr($row['wr_datetime'], 2, 8);
$use_href = G4_BBS_URL.'/board.php?bo_table=itemuse&amp;wr_id='.$row['wr_id'];
// http://stackoverflow.com/questions/6967081/show-hide-multiple-divs-with-jquery?answertab=votes#tab-top
?>
<tr>
<td><?php echo $use_num; ?><span class="sound_only">번</span></td>
<td>
<a href="<?php echo $use_href; ?>" class="use_href" onclick="return false;" target="<?php echo $i; ?>"><?php echo $use_subject; ?></a>
<div id="use_div<?php echo $i; ?>" class="use_div" style="display:none;">
<?php echo $use_content; ?>
</div>
</td>
<td><?php echo $use_name; ?></td>
<td><?php echo $use_time; ?></td>
<td><img src="<?php echo G4_URL; ?>/img/shop/s_star<?php echo $use_star; ?>.png" alt="별<?php echo $use_star; ?>개"></td>
</tr>
<?php
}
if (!$i) {
echo '<tr><td class="empty_class">등록된 사용후기가 없습니다.</td></tr>';
}
?>
</table>
<?php
if ($use_pages) {
$use_pages = get_paging(10, $use_page, $use_total_page, "./item.php?it_id=$it_id&amp;$qstr&amp;use_page=", "#use");
}
?>
<!-- <a href="javascript:itemusewin('it_id=<?php echo $it_id; ?>');">사용후기 쓰기<span class="sound_only"> 새 창</span></a> -->
<a href="<?php echo $itemuse_write; ?>" onclick="window.open(this.href); return false;">사용후기 쓰기<span class="sound_only"> 새 창</span></a>
<script>
$(function(){
$(".use_href").click(function(){
$(".use_div").hide();
$("#use_div"+$(this).attr("target")).show();
});
});
</script>

View File

@ -48,7 +48,7 @@ if ($is_admin)
<div id="sct">
<?
<?php
$nav_ca_id = $ca_id;
include G4_SHOP_PATH.'/navigation1.inc.php';

View File

@ -30,6 +30,6 @@ else
?>
<div id="sct_location">
<a href='<?=$g4[path]?>/' class="sct_bg">Home</a>
<?=$str?>
<a href='<?php echo G4_SHOP_URL; ?>/' class="sct_bg">Home</a>
<?php echo $str; ?>
</div>

View File

@ -65,8 +65,5 @@ $count = mysql_num_rows($result);
?>
<div class="btn_confirm">
<button type="button" id="od_coupon_close" class="btn_submit">닫기</button>
<?php if($count > 0) { ?>
<button type="button" id="od_coupon_cancel" class="btn_cancel">쿠폰적용취소</button>
<?php } ?>
</div>
</div>

View File

@ -270,31 +270,35 @@ setTimeout("init_pay_button();",300);
<?php if ($goods_count) $goods .= ' 외 '.$goods_count.'건'; ?>
<?php
// 배송비가 0 보다 크다면 (있다면)
if ($send_cost > 0)
{
?>
<div id="sod_bsk_sell" class="sod_bsk_tot">
<span>주문</span>
<strong><?php echo number_format($tot_sell_amount); ?> 원</strong>
</div>
<div id="sod_bsk_coupon" class="sod_bsk_tot">
<span>쿠폰</span>
<strong id="ct_tot_coupon">0 원</strong>
</div>
<div id="sod_bsk_dvr" class="sod_bsk_tot">
<span>배송비</span>
<strong><?php echo number_format($send_cost); ?> 원</strong>
</div>
<?php } ?>
<?php
// 총계 = 주문상품금액합계 + 배송비
$tot_amount = $tot_sell_amount + $send_cost;
if ($tot_amount > 0) {
?>
<div id="sod_bsk_cnt" class="sod_bsk_tot">
<span>총계</span>
<strong><span id="ct_tot_amount"><?php echo number_format($tot_amount); ?></span> 원 <?php echo number_format($tot_point); ?> 점</strong>
<strong id="ct_tot_amount"><?php echo number_format($tot_amount); ?></strong>
</div>
<?php } ?>
<div id="sod_bsk_point" class="sod_bsk_tot">
<span><?php echo $default['de_mileage_use'] ? '마일리지' : '포인트'; ?></span>
<strong><?php echo number_format($tot_point); ?> 점</strong>
</div>
<input type="hidden" name="od_amount" value="<?php echo $tot_sell_amount; ?>">
<input type="hidden" name="org_od_amount" value="<?php echo $tot_sell_amount; ?>">
@ -969,7 +973,9 @@ $(function() {
calculate_total_amount();
$("#it_coupon_frm").remove();
$cp_btn_el.focus();
$cp_btn_el.text("변경").focus();
if(!$cp_row_el.find(".it_coupon_cancel").size())
$cp_btn_el.after("<button type=\"button\" class=\"it_coupon_cancel btn_frmline\">취소</button>");
});
$("#it_coupon_close").live("click", function() {
@ -977,11 +983,12 @@ $(function() {
$cp_btn_el.focus();
});
$("#it_coupon_cancel").live("click", function() {
coupon_cancel($cp_row_el);
$(".it_coupon_cancel").live("click", function() {
coupon_cancel($(this).closest("tr"));
calculate_total_amount();
$("#it_coupon_frm").remove();
$cp_btn_el.focus();
$(this).closest("tr").find(".it_coupon_btn").text("적용").focus();
$(this).remove();
});
$("#od_coupon_btn").click(function() {
@ -998,7 +1005,7 @@ $(function() {
});
$(".od_cp_apply").live("click", function() {
var $el = $(this).closest("li");
var $el = $(this).closest("tr");
var cp_id = $el.find("input[name='o_cp_id[]']").val();
var amount = parseInt($el.find("input[name='o_cp_amt[]']").val());
var subj = $el.find("input[name='o_cp_subj[]']").val();
@ -1018,7 +1025,9 @@ $(function() {
$("input[name=od_cp_id]").val(cp_id);
calculate_order_amount();
$("#od_coupon_frm").remove();
$("#od_coupon_btn").focus();
$("#od_coupon_btn").text("쿠폰변경").focus();
if(!$("#od_coupon_cancel").size())
$("#od_coupon_btn").after("<button type=\"button\" id=\"od_coupon_cancel\" class=\"btn_frmline\">쿠폰취소</button>");
});
$("#od_coupon_close").live("click", function() {
@ -1031,7 +1040,8 @@ $(function() {
$("input[name=od_amount]").val(org_amount);
calculate_order_amount();
$("#od_coupon_frm").remove();
$("#od_coupon_btn").focus();
$("#od_coupon_btn").text("쿠폰적용").focus();
$(this).remove();
});
$("#sc_coupon_btn").click(function() {
@ -1049,7 +1059,7 @@ $(function() {
});
$(".sc_cp_apply").live("click", function() {
var $el = $(this).closest("li");
var $el = $(this).closest("tr");
var cp_id = $el.find("input[name='s_cp_id[]']").val();
var amount = parseInt($el.find("input[name='s_cp_amt[]']").val());
var subj = $el.find("input[name='s_cp_subj[]']").val();
@ -1065,7 +1075,9 @@ $(function() {
$("input[name=sc_cp_id]").val(cp_id);
calculate_order_amount();
$("#sc_coupon_frm").remove();
$("#sc_coupon_btn").focus();
$("#sc_coupon_btn").text("쿠폰변경").focus();
if(!$("#sc_coupon_cancel").size())
$("#sc_coupon_btn").after("<button type=\"button\" id=\"sc_coupon_cancel\" class=\"btn_frmline\">쿠폰취소</button>");
});
$("#sc_coupon_close").live("click", function() {
@ -1078,7 +1090,8 @@ $(function() {
$("input[name=od_send_cost]").val(send_cost);
calculate_order_amount();
$("#sc_coupon_frm").remove();
$("#sc_coupon_btn").focus();
$("#sc_coupon_btn").text("쿠폰적용").focus();
$(this).remove();
});
$("#od_settle_bank").bind("click", function() {
@ -1106,19 +1119,22 @@ function calculate_total_amount()
{
var $it_amt = $("input[name^=it_amount]");
var $cp_amt = $("input[name^=cp_amount]");
var tot_sell_amount = sell_amount = 0;
var tot_sell_amount = sell_amount = tot_cp_amount = 0;
var it_amount, cp_amount;
var send_cost = parseInt($("input[name=org_send_cost]").val());
$it_amt.each(function(index) {
it_amount = parseInt($(this).val());
cp_amount = parseInt($cp_amt.eq(index).val());
sell_amount += (it_amount - cp_amount);
sell_amount += it_amount;
tot_cp_amount += cp_amount;
});
tot_sell_amount = sell_amount + send_cost;
tot_sell_amount = sell_amount - tot_cp_amount + send_cost;
$("#ct_tot_coupon").text(number_format(String(tot_cp_amount))+" 원");
$("#ct_tot_amount").text(number_format(String(tot_sell_amount))+" 원");
$("#ct_tot_amount").text(number_format(String(tot_sell_amount)));
$("input[name=good_mny]").val(tot_sell_amount);
$("input[name=od_amount]").val(sell_amount);
$("input[name=org_od_amount]").val(sell_amount);

View File

@ -86,8 +86,5 @@ $count = mysql_num_rows($result);
?>
<div class="btn_confirm">
<button type="button" id="it_coupon_close" class="btn_submit">닫기</button>
<?php if($count > 0) { ?>
<button type="button" id="it_coupon_cancel" class="btn_cancel">쿠폰적용취소</button>
<?php } ?>
</div>
</div>

View File

@ -69,8 +69,5 @@ $count = mysql_num_rows($result);
?>
<div class="btn_confirm">
<button type="button" id="sc_coupon_close" class="btn_submit">닫기</button>
<?php if($count > 0) { ?>
<button type="button" id="sc_coupon_cancel" class="btn_cancel">쿠폰적용취소</button>
<?php } ?>
</div>
</div>