Merge branch 'master' of github.com:gnuboard/yc5

This commit is contained in:
gnuboard
2013-11-05 15:23:46 +09:00
88 changed files with 2941 additions and 2637 deletions

View File

@ -375,19 +375,19 @@ $pg_anchor = '<ul class="anchor">
<th scope="row"><label for="cf_possible_ip">접근가능 IP</label></th>
<td>
<?php echo help('입력된 IP의 컴퓨터만 접근할 수 있습니다.<br>123.123.+ 도 입력 가능. (엔터로 구분)') ?>
<textarea name="cf_possible_ip" id="cf_possible_ip"><?php echo $config['cf_possible_ip'] ?> </textarea>
<textarea name="cf_possible_ip" id="cf_possible_ip"><?php echo $config['cf_possible_ip'] ?></textarea>
</td>
<th scope="row"><label for="cf_intercept_ip">접근차단 IP</label></th>
<td>
<?php echo help('입력된 IP의 컴퓨터는 접근할 수 없음.<br>123.123.+ 도 입력 가능. (엔터로 구분)') ?>
<textarea name="cf_intercept_ip" id="cf_intercept_ip"><?php echo $config['cf_intercept_ip'] ?> </textarea>
<textarea name="cf_intercept_ip" id="cf_intercept_ip"><?php echo $config['cf_intercept_ip'] ?></textarea>
</td>
</tr>
<tr>
<th scope="row"><label for="cf_analytics">방문자분석 스크립트</label></th>
<td colspan="3">
<?php echo help('방문자분석 스크립트 코드를 입력합니다. 예) 구글 애널리스틱'); ?>
<textarea name="cf_analytics" id="cf_analytics"><?php echo $config['cf_analytics']; ?> </textarea>
<textarea name="cf_analytics" id="cf_analytics"><?php echo $config['cf_analytics']; ?></textarea>
</td>
</tr>
</tbody>
@ -467,7 +467,7 @@ $pg_anchor = '<ul class="anchor">
<th scope="row"><label for="cf_filter">단어 필터링</label></th>
<td colspan="3">
<?php echo help('입력된 단어가 포함된 내용은 게시할 수 없습니다. 단어와 단어 사이는 ,로 구분합니다.') ?>
<textarea name="cf_filter" id="cf_filter" rows="7"><?php echo $config['cf_filter'] ?> </textarea>
<textarea name="cf_filter" id="cf_filter" rows="7"><?php echo $config['cf_filter'] ?></textarea>
</td>
</tr>
</tbody>
@ -613,7 +613,7 @@ $pg_anchor = '<ul class="anchor">
</tr>
<tr>
<th scope="row"><label for="cf_privacy">개인정보취급방침</label></th>
<td colspan="3"><textarea id="cf_privacy" name="cf_privacy" rows="10"><?php echo $config['cf_privacy'] ?> </textarea></td>
<td colspan="3"><textarea id="cf_privacy" name="cf_privacy" rows="10"><?php echo $config['cf_privacy'] ?></textarea></td>
</tr>
</tbody>
</table>

View File

@ -101,10 +101,12 @@ include_once('./admin.head.php');
</tbody>
</table>
<div class="btn_confirm01 btn_confirm">
<input type="submit" value="확인" class="btn_submit" accesskey="s">
<a href="./poll_list.php?<?php echo $qstr ?>">목록</a>
</div>
</div>
<div class="btn_confirm01 btn_confirm">
<input type="submit" value="확인" class="btn_submit" accesskey="s">
<a href="./poll_list.php?<?php echo $qstr ?>">목록</a>
</div>
</form>

View File

@ -0,0 +1,98 @@
<?php
$sub_menu = '400400';
include_once('./_common.php');
auth_check($auth[$sub_menu], "r");
$od_id = $_POST['od_id'];
$sql = " select * from {$g5['g5_shop_order_table']} where od_id = '$od_id' ";
$od = sql_fetch($sql);
if(!$od['od_id'])
die('<div>주문정보가 존재하지 않습니다.</div>');
// 상품목록
$sql = " select it_id,
it_name,
cp_price,
ct_notax
from {$g5['g5_shop_cart_table']}
where od_id = '$od_id'
group by it_id
order by ct_id ";
$result = sql_query($sql);
?>
<section id="cart_list">
<h2 class="h2_frm">주문상품 목록</h2>
<div class="tbl_head01 tbl_wrap">
<table>
<caption>주문 상품 목록</caption>
<thead>
<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>
<th scope="col">포인트</th>
<th scope="col">배송비</th>
</tr>
</thead>
<tbody>
<?php
for($i=0; $row=sql_fetch_array($result); $i++) {
// 상품이미지
$image = get_it_image($row['it_id'], 50, 50);
// 상품의 옵션정보
$sql = " select ct_id, it_id, ct_price, ct_qty, ct_option, ct_status, cp_price, ct_send_cost, io_type, io_price
from {$g5['g5_shop_cart_table']}
where od_id = '$od_id'
and it_id = '{$row['it_id']}'
order by io_type asc, ct_id asc ";
$res = sql_query($sql);
$rowspan = mysql_num_rows($res);
for($k=0; $opt=sql_fetch_array($res); $k++) {
if($opt['io_type'])
$opt_price = $opt['io_price'];
else
$opt_price = $opt['ct_price'] + $opt['io_price'];
// 소계
$ct_price['stotal'] = $opt_price * $opt['ct_qty'];
$ct_point['stotal'] = $opt['ct_point'] * $opt['ct_qty'];
?>
<tr>
<?php if($k == 0) { ?>
<td class="td_itname" rowspan="<?php echo $rowspan; ?>">
<a href="./itemform.php?w=u&amp;it_id=<?php echo $row['it_id']; ?>"><?php echo $image; ?> <?php echo stripslashes($row['it_name']); ?></a>
<?php if($od['od_tax_flag'] && $row['ct_notax']) echo '[비과세상품]'; ?>
</td>
<?php } ?>
<td class="td_itopt_tl">
<?php echo $opt['ct_option']; ?>
</td>
<td class="td_mngsmall"><?php echo $opt['ct_status']; ?></td>
<td class="td_cntsmall"><?php echo $opt['ct_qty']; ?></td>
<td class="td_num"><?php echo number_format($opt_price); ?></td>
<td class="td_num"><?php echo number_format($ct_price['stotal']); ?></td>
<td class="td_num"><?php echo number_format($opt['cp_price']); ?></td>
<td class="td_num"><?php echo number_format($ct_point['stotal']); ?></td>
<td class="td_sendcost_by"><?php echo $opt['ct_send_cost'] ? '착불' : '선불'; ?></td>
</tr>
<?php
}
?>
<?php
}
?>
</tbody>
</table>
</div>
</section>

View File

@ -33,7 +33,7 @@ if ($od_status) {
$sort1 = "od_receipt_time";
$sort2 = "desc";
break;
case '배송' : // 배송중
case '배송' : // 배송중
$sort1 = "od_invoice_time";
$sort2 = "desc";
break;
@ -323,7 +323,7 @@ $listall = '<a href="'.$_SERVER['PHP_SELF'].'" class="ov_listall">전체목록</
비회원
<?php } ?>
</td>
<td headers="th_odrcnt"><?php echo $row['od_cart_count']; ?>건</td>
<td headers="th_odrcnt"><a href="./orderform.php?od_id=<?php echo $row['od_id']; ?>&amp;<?php echo $qstr; ?>" id="order-id-<?php echo $row['od_id']; ?>" class="orderitem"><?php echo $row['od_cart_count']; ?>건</a></td>
<td headers="th_odrall"><?php echo $od_cnt; ?>건</td>
</tr>
<tr class="<?php echo $tr_bg; ?>">
@ -427,11 +427,47 @@ $listall = '<a href="'.$_SERVER['PHP_SELF'].'" class="ov_listall">전체목록</
<script>
$(function(){
$("#fr_date, #to_date").datepicker({ changeMonth: true, changeYear: true, dateFormat: "yy-mm-dd", showButtonPanel: true, yearRange: "c-99:c+99", maxDate: "+0d" });
$("#fr_date, #to_date").datepicker({ changeMonth: true, changeYear: true, dateFormat: "yy-mm-dd", showButtonPanel: true, yearRange: "c-99:c+99", maxDate: "+0d" });
// 주문상품보기
$(".orderitem").on("click", function() {
var $this = $(this);
var od_id = $this.attr("id").replace("order-id-", "");
if($this.next().size())
return false;
$("#orderitemlist").remove();
$.post(
"./ajax.orderitem.php",
{ od_id: od_id },
function(data) {
$this.parent().append("<div id=\"orderitemlist\"><div class=\"itemlist\"></div></div>");
$("#orderitemlist .itemlist")
.html(data)
.append("<div id=\"orderitemlist_close\"><button type=\"button\" id=\"orderitemlist-x\" class=\"btn_frmline\">닫기</button></div>");
}
);
return false;
});
// 상품리스트 닫기
$(".orderitemlist-x").on("click", function() {
$("#orderitemlist").remove();
});
$("body").on("click", function() {
$("#orderitemlist").remove();
});
});
function set_date(today)
function set_date(today)
{
<?php
$date_term = date('w', G5_SERVER_TIME) - 1;
?>
if (today == "오늘") {
document.getElementById("fr_date").value = "<?php echo G5_TIME_YMD; ?>";
document.getElementById("to_date").value = "<?php echo G5_TIME_YMD; ?>";
@ -439,14 +475,14 @@ function set_date(today)
document.getElementById("fr_date").value = "<?php echo date('Y-m-d', G5_SERVER_TIME - 86400); ?>";
document.getElementById("to_date").value = "<?php echo date('Y-m-d', G5_SERVER_TIME - 86400); ?>";
} else if (today == "이번주") {
document.getElementById("fr_date").value = "<?php echo date('Y-m-d', strtotime('last Monday', G5_SERVER_TIME)); ?>";
document.getElementById("fr_date").value = "<?php echo date('Y-m-d', strtotime('this Monday', G5_SERVER_TIME - (86400 * $date_term))); ?>";
document.getElementById("to_date").value = "<?php echo date('Y-m-d', G5_SERVER_TIME); ?>";
} else if (today == "이번달") {
document.getElementById("fr_date").value = "<?php echo date('Y-m-01', G5_SERVER_TIME); ?>";
document.getElementById("to_date").value = "<?php echo date('Y-m-d', G5_SERVER_TIME); ?>";
} else if (today == "지난주") {
document.getElementById("fr_date").value = "<?php echo date('Y-m-d', strtotime('last Monday', G5_SERVER_TIME - (86400 * 7))); ?>";
document.getElementById("to_date").value = "<?php echo date('Y-m-d', strtotime('last Sunday', G5_SERVER_TIME)); ?>";
document.getElementById("fr_date").value = "<?php echo date('Y-m-d', strtotime('last Monday', G5_SERVER_TIME - (86400 * $date_term))); ?>";
document.getElementById("to_date").value = "<?php echo date('Y-m-d', strtotime('last Sunday', G5_SERVER_TIME - (86400 * $date_term))); ?>";
} else if (today == "지난달") {
document.getElementById("fr_date").value = "<?php echo date('Y-m-01', strtotime('-1 Month', G5_SERVER_TIME)); ?>";
document.getElementById("to_date").value = "<?php echo date('Y-m-t', strtotime('-1 Month', G5_SERVER_TIME)); ?>";
@ -469,10 +505,10 @@ function forderlist_submit(f)
/*
switch (f.od_status.value) {
case "" :
case "" :
alert("변경하실 주문상태를 선택하세요.");
return false;
case '주문' :
case '주문' :
default :
@ -494,9 +530,9 @@ function forderlist_submit(f)
var chk = document.getElementsByName("chk[]");
for (var i=0; i<chk.length; i++)
for (var i=0; i<chk.length; i++)
{
if (chk[i].checked)
if (chk[i].checked)
{
var k = chk[i].value;
var current_settle_case = f.elements['current_settle_case['+k+']'].value;
@ -504,21 +540,21 @@ function forderlist_submit(f)
switch (change_status)
{
case "입금" :
case "입금" :
if (!(current_status == "주문" && current_settle_case == "무통장")) {
alert("'주문' 상태의 '무통장'(결제수단)인 경우에만 '입금' 처리 가능합니다.");
return false;
}
break;
case "준비" :
case "준비" :
if (current_status != "입금") {
alert("'입금' 상태의 주문만 '준비'로 변경이 가능합니다.");
return false;
}
break;
case "배송" :
case "배송" :
if (current_status != "준비") {
alert("'준비' 상태의 주문만 '배송'으로 변경이 가능합니다.");
return false;
@ -553,7 +589,7 @@ function forderlist_submit(f)
if (!confirm("선택하신 주문서의 주문상태를 '"+change_status+"'상태로 변경하시겠습니까?"))
return false;
f.action = "./orderlistupdate.php";
return true;
}

View File

@ -5,7 +5,7 @@ include_once('./_common.php');
//print_r2($_POST); exit;
// 상품옵션별재고 또는 상품재고에 더하기
function add_io_stock($it_id, $ct_qty, $io_id="", $io_type="")
function add_io_stock($it_id, $ct_qty, $io_id="", $io_type=0)
{
global $g5;
@ -25,7 +25,7 @@ function add_io_stock($it_id, $ct_qty, $io_id="", $io_type="")
// 상품옵션별재고 또는 상품재고에서 빼기
function subtract_io_stock($it_id, $ct_qty, $io_id="", $io_type="")
function subtract_io_stock($it_id, $ct_qty, $io_id="", $io_type=0)
{
global $g5;
@ -58,7 +58,7 @@ function change_status($od_id, $current_status, $change_status)
// 주문서에 입금시 update
function order_update_receipt($od_id)
function order_update_receipt($od_id)
{
global $g5;
@ -78,17 +78,17 @@ function order_update_delivery($od_id, $mb_id, $change_status, $delivery)
$sql = " select * from {$g5['g5_shop_cart_table']} where od_id = '$od_id' ";
$result = sql_query($sql);
for ($i=0; $row=sql_fetch_array($result); $i++)
for ($i=0; $row=sql_fetch_array($result); $i++)
{
// 재고를 이미 사용했거나 재고에서 이미 뺐다면
$stock_use = $row['ct_stock_use'];
if ($row['ct_stock_use'])
{
if ($change_status == '주문' ||
$change_status == '취소' ||
$change_status == '반품' ||
$change_status == '품절')
if ($change_status == '주문' ||
$change_status == '취소' ||
$change_status == '반품' ||
$change_status == '품절')
{
// 재고에 다시 더한다.
add_io_stock($row['it_id'], $row['ct_qty'], $row['io_id'], $row['io_type']);
@ -98,7 +98,7 @@ function order_update_delivery($od_id, $mb_id, $change_status, $delivery)
else
{
// 재고 오류로 인한 수정
if ($change_status == '배송' ||
if ($change_status == '배송' ||
$change_status == '완료')
{
// 재고에서 뺀다.
@ -108,7 +108,7 @@ function order_update_delivery($od_id, $mb_id, $change_status, $delivery)
}
$point_use = $row['ct_point_use'];
// 회원이면서 포인트가 0보다 크거나 이미 포인트를 부여했다면 뺀다.
if ($mb_id && $row['ct_point'] && $row['ct_point_use'])
{
@ -141,14 +141,14 @@ for ($i=0; $i<count($_POST['chk']); $i++)
$od = sql_fetch(" select * from {$g5['g5_shop_order_table']} where od_id = '$od_id' ");
if (!$od) continue;
//change_order_status($od['od_status'], $_POST['od_status'], $od);
//echo $od_id . "<br>";
$current_status = $od['od_status'];
$change_status = $_POST['od_status'];
switch ($current_status)
switch ($current_status)
{
case '주문' :
if ($change_status != '입금') continue;
@ -173,7 +173,7 @@ for ($i=0; $i<count($_POST['chk']); $i++)
order_update_delivery($od_id, $od['mb_id'], $change_status, $delivery);
/*
$sql = " update {$g5['g5_shop_order_table']}
$sql = " update {$g5['g5_shop_order_table']}
set od_delivery_company = '$delivery_company',
od_invoice = '$invoice',
od_invoice_time = '$invoice_time'
@ -183,11 +183,11 @@ for ($i=0; $i<count($_POST['chk']); $i++)
$sql = " select * from {$g5['g5_shop_cart_table']} where od_id = '$od_id' ";
$result = sql_query($sql);
for ($i=0; $row=sql_fetch_array($result); $i++)
for ($i=0; $row=sql_fetch_array($result); $i++)
{
// 재고를 이미 사용했거나 재고에서 이미 뺐다면
$stock_use = $row['ct_stock_use'];
if ($row['ct_stock_use'])
{
if ($ct_status == '주문' || $ct_status == '취소' || $ct_status == '반품' || $ct_status == '품절')
@ -209,7 +209,7 @@ for ($i=0; $i<count($_POST['chk']); $i++)
}
$point_use = $row['ct_point_use'];
// 회원이면서 포인트가 0보다 크거나 이미 포인트를 부여했다면 뺀다.
if ($od['mb_id'] && $row['ct_point'] && $row['ct_point_use'])
{
@ -233,7 +233,7 @@ for ($i=0; $i<count($_POST['chk']); $i++)
change_status($od_id, '배송', '완료');
break;
} // switch end
} // switch end
// 주문정보