관리자 경로 수정 작업 중

This commit is contained in:
chicpro
2013-03-15 17:20:21 +09:00
parent fecde18782
commit 79cbd300f9
24 changed files with 812 additions and 812 deletions

View File

@ -1,6 +1,6 @@
<?
$menu['menu500'] = array (
array('', '쇼핑몰현황/기타', ''),
array('', '쇼핑몰현황/기타', G4_ADMIN_URL.'/shop_admin/itemsellrank.php'),
array('500100', '상품판매순위', G4_ADMIN_URL.'/shop_admin/itemsellrank.php'),
array('500110', '매출현황', G4_ADMIN_URL.'/shop_admin/sale1.php'),
array('500120', '주문내역출력', G4_ADMIN_URL.'/shop_admin/orderprint.php'),

View File

@ -1,19 +1,19 @@
<?
$sub_menu = "500130";
include_once("./_common.php");
$sub_menu = '500130';
include_once('./_common.php');
auth_check($auth[$sub_menu], "r");
$g4[title] = "전자결제내역";
include_once ("$g4[admin_path]/admin.head.php");
$g4['title'] = '전자결제내역';
include_once (G4_ADMIN_PATH.'/admin.head.php');
sql_query(" ALTER TABLE `$g4[yc4_card_history_table]` ADD INDEX `od_id` ( `od_id` ) ", false);
sql_query(" ALTER TABLE `{$g4['yc4_card_history_table']}` ADD INDEX `od_id` ( `od_id` ) ", false);
$where = " where ";
$sql_search = "";
if ($search != "")
if ($search != "")
{
if ($sel_field != "")
if ($sel_field != "")
{
$sql_search .= " $where $sel_field like '%$search%' ";
$where = " and ";
@ -24,16 +24,16 @@ if ($sel_field == "") $sel_field = "a.od_id";
if ($sort1 == "") $sort1 = "od_id";
if ($sort2 == "") $sort2 = "desc";
$sql_common = " from $g4[yc4_card_history_table] a
left join $g4[yc4_order_table] b on (a.od_id = b.od_id)
$sql_common = " from {$g4['yc4_card_history_table']} a
left join {$g4['yc4_order_table']} b on (a.od_id = b.od_id)
$sql_search ";
// 테이블의 전체 레코드수만 얻음
$sql = " select count(*) as cnt " . $sql_common;
$row = sql_fetch($sql);
$total_count = $row[cnt];
$total_count = $row['cnt'];
$rows = $config[cf_page_rows];
$rows = $config['cf_page_rows'];
$total_page = ceil($total_count / $rows); // 전체 페이지 계산
if ($page == "") { $page = 1; } // 페이지가 없으면 첫 페이지 (1 페이지)
$from_record = ($page - 1) * $rows; // 시작 열을 구함
@ -54,7 +54,7 @@ $qstr = "$qstr1&sort1=$sort1&sort2=$sort2&page=$page";
<input type=hidden name=page value="<? echo $page ?>">
<table width=100% cellpadding=4 cellspacing=0>
<tr>
<td width=20%><a href='<?=$_SERVER[PHP_SELF]?>'>처음</a></td>
<td width=20%><a href='<?=$_SERVER['PHP_SELF']?>'>처음</a></td>
<td width=70% align=center>
<select name=sel_field>
<option value='a.od_id'>주문번호
@ -64,7 +64,7 @@ $qstr = "$qstr1&sort1=$sort1&sort2=$sort2&page=$page";
<? if ($sel_field) echo "<script> document.flist.sel_field.value = '$sel_field';</script>"; ?>
<input type=text name=search value='<? echo $search ?>' autocomplete="off">
<input type=image src='<?=$g4[admin_path]?>/img/btn_search.gif' align=absmiddle>
<input type=image src='<?=G4_ADMIN_URL?>/img/btn_search.gif' align=absmiddle>
</td>
<td width=20% align=right>건수 : <? echo $total_count ?>&nbsp;</td>
</tr>
@ -89,17 +89,17 @@ $qstr = "$qstr1&sort1=$sort1&sort2=$sort2&page=$page";
</tr>
<tr><td colspan=6 height=1 bgcolor=#CCCCCC></td></tr>
<?
for ($i=0; $row=sql_fetch_array($result); $i++)
for ($i=0; $row=sql_fetch_array($result); $i++)
{
$list = $i%2;
echo "
<tr class='list$list center ht'>
<td><a href='./orderform.php?od_id=$row[od_id]'><U>$row[od_id]</U></a></td>
<td>".display_amount($row[cd_amount])."</td>
<td>$row[cd_app_no]</td>
<td>$row[cd_app_rt]</td>
<td>$row[cd_app_time]</td>
<td>$row[cd_opt01]</td>
<td><a href='./orderform.php?od_id={$row['od_id']}'><U>{$row['od_id']}</U></a></td>
<td>".display_amount($row['cd_amount'])."</td>
<td>{$row['cd_app_no']}</td>
<td>{$row['cd_app_rt']}</td>
<td>{$row['cd_app_time']}</td>
<td>{$row['cd_opt01']}</td>
</tr><tr><td colspan=6 height=1 bgcolor=F5F5F5></td></tr>";
}
@ -112,7 +112,7 @@ if ($i == 0)
<table width=100%>
<tr>
<td width=50%></td>
<td width=50% align=right><?=get_paging($config[cf_write_pages], $page, $total_page, "$_SERVER[PHP_SELF]?$qstr&page=");?></td>
<td width=50% align=right><?=get_paging($config['cf_write_pages'], $page, $total_page, "{$_SERVER['PHP_SELF']}?$qstr&page=");?></td>
</tr>
</table>
</form>
@ -121,5 +121,5 @@ if ($i == 0)
<?
include_once ("$g4[admin_path]/admin.tail.php");
include_once (G4_ADMIN_PATH.'/admin.tail.php');
?>

View File

@ -1,44 +1,44 @@
<?
$sub_menu = "400400";
include_once("./_common.php");
$sub_menu = '400400';
include_once('./_common.php');
auth_check($auth[$sub_menu], "w");
$cnt = count($_POST[ct_id]);
for ($i=0; $i<$cnt; $i++)
$cnt = count($_POST['ct_id']);
for ($i=0; $i<$cnt; $i++)
{
if ($_POST[ct_chk][$i])
if ($_POST['ct_chk'][$i])
{
$ct_id = $_POST[ct_id][$i];
$ct_id = $_POST['ct_id'][$i];
$sql = " select * from $g4[yc4_cart_table]
$sql = " select * from {$g4['yc4_cart_table']}
where on_uid = '$on_uid'
and ct_id = '$ct_id' ";
$ct = sql_fetch($sql);
// 재고를 이미 사용했다면 (재고에서 이미 뺐다면)
$stock_use = $ct[ct_stock_use];
if ($ct[ct_stock_use])
$stock_use = $ct['ct_stock_use'];
if ($ct['ct_stock_use'])
{
if ($ct_status == '주문' || $ct_status == '취소' || $ct_status == '반품' || $ct_status == '품절')
if ($ct_status == '주문' || $ct_status == '취소' || $ct_status == '반품' || $ct_status == '품절')
{
$stock_use = 0;
// 재고에 다시 더한다.
$sql =" update $g4[yc4_item_table] set it_stock_qty = it_stock_qty + '$ct[ct_qty]' where it_id = '$ct[it_id]' ";
$sql =" update {$g4['yc4_item_table']} set it_stock_qty = it_stock_qty + '{$ct['ct_qty']}' where it_id = '{$ct['it_id']}' ";
sql_query($sql);
}
}
else
}
else
{
// 재고 오류로 인한 수정
// if ($ct_status == '주문' || $ct_status == '준비' || $ct_status == '배송' || $ct_status == '완료') {
if ($ct_status == '배송' || $ct_status == '완료')
if ($ct_status == '배송' || $ct_status == '완료')
{
$stock_use = 1;
// 재고에서 뺀다.
$sql =" update $g4[yc4_item_table] set it_stock_qty = it_stock_qty - '$ct[ct_qty]' where it_id = '$ct[it_id]' ";
$sql =" update {$g4['yc4_item_table']} set it_stock_qty = it_stock_qty - '{$ct['ct_qty']}' where it_id = '{$ct['it_id']}' ";
sql_query($sql);
}
}
/* 주문 수정에서 "품절" 선택시 해당 상품 자동 품절 처리하기
else if ($ct_status == '품절') {
$stock_use = 1;
@ -48,10 +48,10 @@ for ($i=0; $i<$cnt; $i++)
} */
}
$point_use = $ct[ct_point_use];
$point_use = $ct['ct_point_use'];
// 회원이면서 포인트가 0보다 크면
// 이미 포인트를 부여했다면 뺀다.
if ($mb_id && $ct[ct_point] && $ct[ct_point_use])
if ($mb_id && $ct['ct_point'] && $ct['ct_point_use'])
{
$point_use = 0;
//insert_point($mb_id, (-1) * ($ct[ct_point] * $ct[ct_qty]), "주문번호 $od_id ($ct_id) 취소");
@ -62,7 +62,7 @@ for ($i=0; $i<$cnt; $i++)
// 히스토리에 남길때는 작업|시간|IP|그리고 나머지 자료
$ct_history="\n$ct_status|$now|$REMOTE_ADDR";
$sql = " update $g4[yc4_cart_table]
$sql = " update {$g4['yc4_cart_table']}
set ct_point_use = '$point_use',
ct_stock_use = '$stock_use',
ct_status = '$ct_status',
@ -78,8 +78,8 @@ $qstr = "sort1=$sort1&sort2=$sort2&sel_field=$sel_field&search=$search&page=$pag
$url = "./orderform.php?od_id=$od_id&$qstr";
// 1.06.06
$od = sql_fetch(" select od_receipt_point from $g4[yc4_order_table] where od_id = '$od_id' ");
if ($od[od_receipt_point])
$od = sql_fetch(" select od_receipt_point from {$g4['yc4_order_table']} where od_id = '$od_id' ");
if ($od['od_receipt_point'])
alert("포인트로 결제한 주문은,\\n\\n주문상태 변경으로 인해 포인트의 가감이 발생하는 경우\\n\\n회원관리 > 포인트관리에서 수작업으로 포인트를 맞추어 주셔야 합니다.\\n\\n만약, 미수금이 발생하는 경우에는 DC에 금액을 음수로 입력하시면 해결됩니다.", $url);
else
goto_url($url);

View File

@ -1,28 +1,28 @@
<?
$sub_menu = "400400";
include_once("./_common.php");
$sub_menu = '400400';
include_once('./_common.php');
check_demo();
auth_check($auth[$sub_menu], "d");
if ($od_id && $on_uid)
if ($od_id && $on_uid)
{
// 장바구니 삭제
sql_query(" delete from $g4[yc4_cart_table] where on_uid = '$on_uid' ");
sql_query(" delete from {$g4['yc4_cart_table']} where on_uid = '$on_uid' ");
// 카드결제내역 삭제
sql_query(" delete from $g4[yc4_card_history_table] where od_id = '$od_id' and on_uid = '$on_uid' ");
sql_query(" delete from {$g4['yc4_card_history_table']} where od_id = '$od_id' and on_uid = '$on_uid' ");
// 주문서 삭제
sql_query(" delete from $g4[yc4_order_table] where od_id = '$od_id' and on_uid = '$on_uid' ");
sql_query(" delete from {$g4['yc4_order_table']} where od_id = '$od_id' and on_uid = '$on_uid' ");
}
if ($return_url)
if ($return_url)
{
goto_url("$return_url");
}
else
}
else
{
$qstr = "sel_ca_id=$sel_ca_id&sel_field=$sel_field&search=$search&sort1=$sort1&sort2=$sort2&page=$page";
goto_url("./orderlist{$list}.php?$qstr");

View File

@ -1,30 +1,30 @@
<?
$sub_menu = "400400";
include_once("./_common.php");
$sub_menu = '400400';
include_once('./_common.php');
// 메세지
$html_title = "주문 내역 수정";
$alt_msg1 = "주문번호 오류입니다.";
$mb_guest = "비회원";
$html_title = '주문 내역 수정';
$alt_msg1 = '주문번호 오류입니다.';
$mb_guest = '비회원';
$hours = 6; // 설정 시간이 지난 주문서 없는 장바구니 자료 삭제
$cart_title1 = "쇼핑";
$cart_title2 = "완료";
$cart_title3 = "주문번호";
$cart_title4 = "배송완료";
$cart_title1 = '쇼핑';
$cart_title2 = '완료';
$cart_title3 = '주문번호';
$cart_title4 = '배송완료';
auth_check($auth[$sub_menu], "w");
$g4[title] = $html_title;
include_once("$g4[admin_path]/admin.head.php");
$g4['title'] = $html_title;
include_once(G4_ADMIN_PATH.'/admin.head.php');
//------------------------------------------------------------------------------
// 설정 시간이 지난 주문서 없는 장바구니 자료 삭제
//------------------------------------------------------------------------------
if (!isset($cart_not_delete)) {
if (!$hours) $hours = 6;
$beforehours = date("Y-m-d H:i:s", ( $g4[server_time] - (60 * 60 * $hours) ) );
$sql = " delete from $g4[yc4_cart_table] where ct_status = '$cart_title1' and ct_time <= '$beforehours' ";
$beforehours = date("Y-m-d H:i:s", ( G4_SERVER_TIME - (60 * 60 * $hours) ) );
$sql = " delete from {$g4['yc4_cart_table']} where ct_status = '$cart_title1' and ct_time <= '$beforehours' ";
sql_query($sql);
}
//------------------------------------------------------------------------------
@ -36,26 +36,26 @@ if (!isset($cart_not_delete)) {
// 설정일이 0 이면 주문서 완료 설정 시점에서 포인트를 바로 부여합니다.
//------------------------------------------------------------------------------
if (!isset($order_not_point)) {
$beforedays = date("Y-m-d H:i:s", ( time() - (60 * 60 * 24 * (int)$default[de_point_days]) ) );
$sql = " select * from $g4[yc4_cart_table]
where ct_status = '$cart_title2'
and ct_point_use = '0'
$beforedays = date("Y-m-d H:i:s", ( time() - (60 * 60 * 24 * (int)$default['de_point_days']) ) );
$sql = " select * from {$g4['yc4_cart_table']}
where ct_status = '$cart_title2'
and ct_point_use = '0'
and ct_time <= '$beforedays' ";
$result = sql_query($sql);
for ($i=0; $row=sql_fetch_array($result); $i++)
for ($i=0; $row=sql_fetch_array($result); $i++)
{
// 회원 ID 를 얻는다.
$tmp_row = sql_fetch("select od_id, mb_id from $g4[yc4_order_table] where on_uid = '$row[on_uid]' ");
$tmp_row = sql_fetch("select od_id, mb_id from {$g4['yc4_order_table']} where on_uid = '{$row['on_uid']}' ");
// 회원이면서 포인트가 0보다 크다면
if ($tmp_row[mb_id] && $row[ct_point] > 0)
if ($tmp_row['mb_id'] && $row['ct_point'] > 0)
{
$po_point = $row[ct_point] * $row[ct_qty];
$po_content = "$cart_title3 $tmp_row[od_id] ($row[ct_id]) $cart_title4";
insert_point($tmp_row[mb_id], $po_point, $po_content, "@delivery", $tmp_row[mb_id], "$tmp_row[od_id],$row[on_uid],$row[ct_id]");
$po_point = $row['ct_point'] * $row['ct_qty'];
$po_content = "$cart_title3 {$tmp_row['od_id']} ({$row['ct_id']}) $cart_title4";
insert_point($tmp_row['mb_id'], $po_point, $po_content, "@delivery", $tmp_row['mb_id'], "{$tmp_row['od_id']},{$row['on_uid']},{$row['ct_id']}");
}
sql_query("update $g4[yc4_cart_table] set ct_point_use = '1' where ct_id = '$row[ct_id]' ");
sql_query("update {$g4['yc4_cart_table']} set ct_point_use = '1' where ct_id = '{$row['ct_id']}' ");
}
}
//------------------------------------------------------------------------------
@ -64,14 +64,14 @@ if (!isset($order_not_point)) {
//------------------------------------------------------------------------------
// 주문서 정보
//------------------------------------------------------------------------------
$sql = " select * from $g4[yc4_order_table] where od_id = '$od_id' ";
$sql = " select * from {$g4['yc4_order_table']} where od_id = '$od_id' ";
$od = sql_fetch($sql);
if (!$od[od_id]) {
if (!$od['od_id']) {
alert($alt_msg1);
}
if ($od[mb_id] == "") {
$od[mb_id] = $mb_guest;
if ($od['mb_id'] == "") {
$od['mb_id'] = $mb_guest;
}
//------------------------------------------------------------------------------
@ -79,11 +79,11 @@ if ($od[mb_id] == "") {
$qstr = "sort1=$sort1&sort2=$sort2&sel_field=$sel_field&search=$search&page=$page";
// PG사를 KCP 사용하면서 테스트 상점아이디라면
if ($default[de_card_test]) {
// 로그인 아이디 / 비번
if ($default['de_card_test']) {
// 로그인 아이디 / 비번
// 일반 : test1234 / test12345
// 에스크로 : escrow / escrow913
$g4[yc4_cardpg][kcp] = "http://testadmin8.kcp.co.kr";
$g4['yc4_cardpg']['kcp'] = "http://testadmin8.kcp.co.kr";
}
$sql = " select a.ct_id,
@ -102,8 +102,8 @@ $sql = " select a.ct_id,
a.it_opt5,
a.it_opt6,
b.it_name
from $g4[yc4_cart_table] a, $g4[yc4_item_table] b
where a.on_uid = '$od[on_uid]'
from {$g4['yc4_cart_table']} a, {$g4['yc4_item_table']} b
where a.on_uid = '{$od['on_uid']}'
and a.it_id = b.it_id
order by a.ct_id ";
$result = sql_query($sql);
@ -114,9 +114,9 @@ $result = sql_query($sql);
<tr>
<td><?=subtitle("주문상품")?></td>
<td align=right>
<? if ($default[de_hope_date_use]) { ?>
<? if ($default['de_hope_date_use']) { ?>
희망배송일은
<b><?=$od[od_hope_date]?> (<?=get_yoil($od[od_hope_date])?>)</b> 입니다.
<b><?=$od['od_hope_date']?> (<?=get_yoil($od['od_hope_date'])?>)</b> 입니다.
<? } ?>
</td>
</tr>
@ -125,10 +125,10 @@ $result = sql_query($sql);
<form name=frmorderform method=post action='' style="margin:0px;">
<input type=hidden name=ct_status value=''>
<input type=hidden name=on_uid value='<? echo $od[on_uid] ?>'>
<input type=hidden name=on_uid value='<? echo $od['on_uid'] ?>'>
<input type=hidden name=od_id value='<? echo $od_id ?>'>
<input type=hidden name=mb_id value='<? echo $od[mb_id] ?>'>
<input type=hidden name=od_email value='<? echo $od[od_email] ?>'>
<input type=hidden name=mb_id value='<? echo $od['mb_id'] ?>'>
<input type=hidden name=od_email value='<? echo $od['od_email'] ?>'>
<input type=hidden name=sort1 value="<? echo $sort1 ?>">
<input type=hidden name=sort2 value="<? echo $sort2 ?>">
<input type=hidden name=sel_field value="<? echo $sel_field ?>">
@ -160,36 +160,36 @@ $result = sql_query($sql);
<tr><td colspan=10 height=1 bgcolor=#CCCCCC></td></tr>
<?
$image_rate = 2.5;
for ($i=0; $row=sql_fetch_array($result); $i++)
for ($i=0; $row=sql_fetch_array($result); $i++)
{
$it_name = "<a href='./itemform.php?w=u&it_id=$row[it_id]'>".stripslashes($row[it_name])."</a><br>";
$it_name .= print_item_options($row[it_id], $row[it_opt1], $row[it_opt2], $row[it_opt3], $row[it_opt4], $row[it_opt5], $row[it_opt6]);
$it_name = "<a href='./itemform.php?w=u&it_id={$row['it_id']}'>".stripslashes($row['it_name'])."</a><br>";
$it_name .= print_item_options($row['it_id'], $row['it_opt1'], $row['it_opt2'], $row['it_opt3'], $row['it_opt4'], $row['it_opt5'], $row['it_opt6']);
$ct_amount[소계] = $row[ct_amount] * $row[ct_qty];
$ct_point[소계] = $row[ct_point] * $row[ct_qty];
if ($row[ct_status]=='주문' || $row[ct_status]=='준비' || $row[ct_status]=='배송' || $row[ct_status]=='완료')
$t_ct_amount[정상] += $row[ct_amount] * $row[ct_qty];
else if ($row[ct_status]=='취소' || $row[ct_status]=='반품' || $row[ct_status]=='품절')
$t_ct_amount[취소] += $row[ct_amount] * $row[ct_qty];
$image = get_it_image("$row[it_id]_s", (int)($default[de_simg_width] / $image_rate), (int)($default[de_simg_height] / $image_rate), $row[it_id]);
$ct_amount['소계'] = $row['ct_amount'] * $row['ct_qty'];
$ct_point['소계'] = $row['ct_point'] * $row['ct_qty'];
if ($row['ct_status']=='주문' || $row['ct_status']=='준비' || $row['ct_status']=='배송' || $row['ct_status']=='완료')
$t_ct_amount['정상'] += $row['ct_amount'] * $row['ct_qty'];
else if ($row['ct_status']=='취소' || $row['ct_status']=='반품' || $row['ct_status']=='품절')
$t_ct_amount['취소'] += $row['ct_amount'] * $row['ct_qty'];
$image = get_it_image("$row[it_id]_s", (int)($default['de_simg_width'] / $image_rate), (int)($default['de_simg_height'] / $image_rate), $row['it_id']);
$list = $i%2;
echo "
<tr class='list$list'>
<td align=center title='$row[ct_id]'><input type=hidden name=ct_id[$i] value='$row[ct_id]'><input type=checkbox id='ct_chk_{$i}' name='ct_chk[{$i}]' value='1'></td>
<td align=center title='{$row['ct_id']}'><input type=hidden name=ct_id[$i] value='{$row['ct_id']}'><input type=checkbox id='ct_chk_{$i}' name='ct_chk[{$i}]' value='1'></td>
<td style='padding-top:5px; padding-bottom:5px;'><table width='100%'><tr><td width=40 align=center>$image</td><td>$it_name</td></tr></table></td>
<td align=center>$row[ct_status]</td>
<td align=center>$row[ct_qty]</td>
<td align=right>".number_format($row[ct_amount])."</td>
<td align=right>".number_format($ct_amount[소계])."</td>
<td align=right>".number_format($ct_point[소계])."</td>
<td align=center>".get_yn($row[ct_point_use])."</td>
<td align=center>".get_yn($row[ct_stock_use])."</td>";
<td align=center>".$row['ct_status']."</td>
<td align=center>".$row['ct_qty']."</td>
<td align=right>".number_format($row['ct_amount'])."</td>
<td align=right>".number_format($ct_amount['소계'])."</td>
<td align=right>".number_format($ct_point['소계'])."</td>
<td align=center>".get_yn($row['dct_point_use'])."</td>
<td align=center>".get_yn($row['ct_stock_use'])."</td>";
echo "</tr><tr><td colspan=8 height=1 bgcolor=F5F5F5></td></tr>";
$t_ct_amount[합계] += $ct_amount[소계];
$t_ct_point[합계] += $ct_point[소계];
$t_ct_amount['합계'] += $ct_amount['소계'];
$t_ct_point['합계'] += $ct_point['소계'];
}
?>
<tr><td colspan=10 height=1 bgcolor=#CCCCCC></td></tr>
@ -204,10 +204,10 @@ for ($i=0; $row=sql_fetch_array($result); $i++)
<a href="javascript:form_submit('품절')">품절</a>
<?=help("한 주문에 여러가지의 상품주문이 있을 수 있습니다.\n\n상품을 체크하여 해당되는 상태로 설정할 수 있습니다.");?>
</td>
<td colspan=3>주문일시 : <?=substr($od[od_time],0,16)?> (<?=get_yoil($od[od_time]);?>)</td>
<td colspan=3 align=right>
<td colspan=3>주문일시 : <?=substr($od['od_time'],0,16)?> (<?=get_yoil($od['od_time']);?>)</td>
<td colspan=3 align=right>
<input type=hidden name="chk_cnt" value="<? echo $i ?>">
<b>주문합계 : <? echo number_format($t_ct_amount[합계]); ?>원</B></td>
<b>주문합계 : <? echo number_format($t_ct_amount['합계']); ?>원</B></td>
<? //echo number_format($t_ct_point[합계]); ?>
</tr>
</form>
@ -219,18 +219,18 @@ for ($i=0; $row=sql_fetch_array($result); $i++)
<?
// 주문금액 = 상품구입금액 + 배송비
$amount[정상] = $t_ct_amount[정상] + $od[od_send_cost];
$amount['정상'] = $t_ct_amount['정상'] + $od['od_send_cost'];
// 입금액 = 무통장(가상계좌, 계좌이체 포함) + 신용카드 + 휴대폰 + 포인트
$amount[입금] = $od[od_receipt_bank] + $od[od_receipt_card] + $od[od_receipt_hp] + $od[od_receipt_point];
$amount['입금'] = $od['od_receipt_bank'] + $od['od_receipt_card'] + $od['od_receipt_hp'] + $od['od_receipt_point'];
// 미수금 = (주문금액 - DC + 환불액) - (입금액 - 신용카드승인취소)
$amount[미수] = ($amount[정상] - $od[od_dc_amount] + $od[od_refund_amount]) - ($amount[입금] - $od[od_cancel_card]);
$amount['미수'] = ($amount['정상'] - $od['od_dc_amount'] + $od['od_refund_amount']) - ($amount['입금'] - $od['od_cancel_card']);
// 결제방법
$s_receipt_way = $od[od_settle_case];
$s_receipt_way = $od['od_settle_case'];
if ($od[od_receipt_point] > 0)
if ($od['od_receipt_point'] > 0)
$s_receipt_way .= "+포인트";
?>
@ -250,17 +250,17 @@ if ($od[od_receipt_point] > 0)
</tr>
<tr><td colspan=8 height=1 bgcolor=#CCCCCC></td></tr>
<tr align=center class=ht>
<td><? echo $od[od_id] ?></td>
<td><? echo $od['od_id'] ?></td>
<td><? echo $s_receipt_way ?></td>
<td><? echo display_amount($amount[정상]) ?></td>
<td><? echo display_point($od[od_receipt_point]); ?></td>
<td><? echo number_format($amount[입금]); ?>원</td>
<td><? echo display_amount($od[od_dc_amount]); ?></td>
<td><? echo display_amount($od[od_refund_amount]); ?></td>
<td><? echo number_format($t_ct_amount[취소]) ?>원</td>
<td><? echo display_amount($amount['정상']) ?></td>
<td><? echo display_point($od['od_receipt_point']); ?></td>
<td><? echo number_format($amount['입금']); ?>원</td>
<td><? echo display_amount($od['od_dc_amount']); ?></td>
<td><? echo display_amount($od['od_refund_amount']); ?></td>
<td><? echo number_format($t_ct_amount['취소']) ?>원</td>
</tr>
<tr><td colspan=8 height=1 bgcolor=#CCCCCC></td></tr>
<tr><td colspan=8 align=right class=ht><b><font color=#FF6600><b>미수금 : <? echo display_amount($amount[미수]) ?></b></font></b></td></tr>
<tr><td colspan=8 align=right class=ht><b><font color=#FF6600><b>미수금 : <? echo display_amount($amount['미수']) ?></b></font></b></td></tr>
</table>
@ -272,8 +272,8 @@ if ($od[od_receipt_point] > 0)
<input type=hidden name=sel_field value="<?=$sel_field?>">
<input type=hidden name=search value="<?=$search?>">
<input type=hidden name=page value="<?=$page?>">
<input type=hidden name=od_name value="<?=$od[od_name]?>">
<input type=hidden name=od_hp value="<?=$od[od_hp]?>">
<input type=hidden name=od_name value="<?=$od['od_name']?>">
<input type=hidden name=od_hp value="<?=$od['od_hp']?>">
<table border=0 cellpadding=0 cellspacing=0 width=100%>
<tr>
<td width=49% valign=top>
@ -284,32 +284,32 @@ if ($od[od_receipt_point] > 0)
<colgroup width='' bgcolor=#ffffff>
<tr><td colspan=2 height=1 bgcolor=0E87F9></td></tr>
<? if ($od[od_settle_case] == '무통장' || $od[od_settle_case] == '가상계좌' || $od[od_settle_case] == '계좌이체') { ?>
<?
if ($od[od_settle_case] == '무통장' || $od[od_settle_case] == '가상계좌')
{
<? if ($od['od_settle_case'] == '무통장' || $od['od_settle_case'] == '가상계좌' || $od['od_settle_case'] == '계좌이체') { ?>
<?
if ($od['od_settle_case'] == '무통장' || $od['od_settle_case'] == '가상계좌')
{
echo "<tr class=ht>";
echo "<td>계좌번호</td>";
echo "<td>".$od[od_bank_account]."</td>";
echo "<td>".$od['od_bank_account']."</td>";
echo "</tr>";
}
?>
<tr class=ht>
<td><?=$od[od_settle_case]?> 입금액</td>
<td><?=display_amount($od[od_receipt_bank]);?></td>
<td><?=$od['od_settle_case']?> 입금액</td>
<td><?=display_amount($od['od_receipt_bank']);?></td>
</tr>
<tr class=ht>
<td>입금자</td>
<td><? echo $od[od_deposit_name] ?></td>
<td><? echo $od['od_deposit_name'] ?></td>
</tr>
<tr class=ht>
<td>입금확인일시</td>
<td>
<?
if ($od[od_bank_time] == 0) {
if ($od['od_bank_time'] == 0) {
echo "입금 확인일시를 체크해 주세요.";
} else {
echo $od[od_bank_time].' ('.get_yoil($od[od_bank_time]).')';
echo $od['od_bank_time'].' ('.get_yoil($od['od_bank_time']).')';
}
?>
</td>
@ -317,23 +317,23 @@ if ($od[od_receipt_point] > 0)
<tr><td colspan=2 height=1 bgcolor=#84C718></td></tr>
<? } ?>
<? if ($od[od_settle_case] == '휴대폰') { ?>
<? if ($od['od_settle_case'] == '휴대폰') { ?>
<tr class=ht>
<td>휴대폰번호</td>
<td><?=$od[od_escrow2]?></td>
<td><?=$od['od_escrow2']?></td>
</tr>
<tr class=ht>
<td><?=$od[od_settle_case]?> 결제액</td>
<td><?=display_amount($od[od_receipt_hp]);?></td>
<td><?=$od['od_settle_case']?> 결제액</td>
<td><?=display_amount($od['od_receipt_hp']);?></td>
</tr>
<tr class=ht>
<td>결제 확인일시</td>
<td>
<?
if ($od[od_hp_time] == 0) {
if ($od['od_hp_time'] == 0) {
echo "결제 확인일시를 체크해 주세요.";
} else {
echo $od[od_hp_time].' ('.get_yoil($od[od_hp_time]).')';
echo $od['od_hp_time'].' ('.get_yoil($od['od_hp_time']).')';
}
?>
</td>
@ -341,15 +341,15 @@ if ($od[od_receipt_point] > 0)
<tr><td colspan=2 height=1 bgcolor=#84C718></td></tr>
<? } ?>
<? if ($od[od_settle_case] == '신용카드') { ?>
<? if ($od['od_settle_case'] == '신용카드') { ?>
<tr class=ht>
<td bgcolor=#F8FFED>신용카드 입금액</td>
<td>
<?
if ($od[od_card_time] == "0000-00-00 00:00:00")
if ($od['od_card_time'] == "0000-00-00 00:00:00")
echo "0원";
else
echo display_amount($od[od_receipt_card]);
echo display_amount($od['od_receipt_card']);
?>
</td>
</tr>
@ -357,48 +357,48 @@ if ($od[od_receipt_point] > 0)
<td bgcolor=#F8FFED>카드 승인일시</td>
<td>
<?
if ($od[od_card_time] == "0000-00-00 00:00:00")
if ($od['od_card_time'] == "0000-00-00 00:00:00")
echo "신용카드 결제 일시 정보가 없습니다.";
else
{
echo "" . substr($od[od_card_time], 0, 20);
echo "" . substr($od['od_card_time'], 0, 20);
}
?>
</td>
</tr>
<tr class=ht>
<td bgcolor=#F8FFED>카드 승인취소</td>
<td><? echo display_amount($od[od_cancel_card]); ?></td>
<td><? echo display_amount($od['od_cancel_card']); ?></td>
</tr>
<tr><td colspan=2 height=1 bgcolor=#84C718></td></tr>
<? } ?>
<tr class=ht>
<td>포인트</td>
<td><? echo display_point($od[od_receipt_point]); ?></td>
<td><? echo display_point($od['od_receipt_point']); ?></td>
</tr>
<tr class=ht>
<td>DC</td>
<td><? echo display_amount($od[od_dc_amount]); ?></td>
<td><? echo display_amount($od['od_dc_amount']); ?></td>
</tr>
<tr class=ht>
<td>환불액</td>
<td><? echo display_amount($od[od_refund_amount]); ?></td>
<td><? echo display_amount($od['od_refund_amount']); ?></td>
</tr>
<tr><td colspan=2 height=1 bgcolor=#84C718></td></tr>
<?
$sql = " select dl_company, dl_url, dl_tel from $g4[yc4_delivery_table] where dl_id = '$od[dl_id]' ";
$sql = " select dl_company, dl_url, dl_tel from {$g4['yc4_delivery_table']} where dl_id = '{$od['dl_id']}' ";
$dl = sql_fetch($sql);
?>
<tr class=ht>
<td>배송회사</td>
<td>
<?
if ($od[dl_id] > 0) {
if ($od['dl_id'] > 0) {
// get 으로 날리는 경우 운송장번호를 넘김
if (strpos($dl[dl_url], "=")) $invoice = $od[od_invoice];
echo "<a href='$dl[dl_url]{$invoice}' target=_new>$dl[dl_company]</a> &nbsp;&nbsp;(고객센터 : $dl[dl_tel]) ";
if (strpos($dl['dl_url'], "=")) $invoice = $od['od_invoice'];
echo "<a href='{$dl['dl_url']}{$invoice}' target=_new>{$dl['dl_company']}</a> &nbsp;&nbsp;(고객센터 : {$dl['dl_tel']}) ";
} else
echo "배송회사를 선택해 주세요.";
?>
@ -406,26 +406,26 @@ if ($od[od_receipt_point] > 0)
</tr>
<tr class=ht>
<td>운송장번호</td>
<td><? echo $od[od_invoice] ?>&nbsp;</td>
<td><? echo $od['od_invoice'] ?>&nbsp;</td>
</tr>
<tr class=ht>
<td>배송일시</td>
<td><? echo $od[od_invoice_time] ?>&nbsp;</td>
<td><? echo $od['od_invoice_time'] ?>&nbsp;</td>
</tr>
<tr class=ht>
<td>주문자 배송비</td>
<!-- <td><? echo number_format($od[od_send_cost]) ?>원</td> -->
<td><input type=text name='od_send_cost' value='<?=$od[od_send_cost]?>' class=ed size=10 style='text-align:right;'>원
<td><input type=text name='od_send_cost' value='<?=$od['od_send_cost']?>' class=ed size=10 style='text-align:right;'>원
<?=help("주문취소시 배송비는 취소되지 않으므로 이 배송비를 0으로 설정하여 미수금을 맞추십시오.");?></td>
</tr>
<?
if ($amount[미수] == 0) {
if ($od[od_receipt_bank]) {
if ($amount['미수'] == 0) {
if ($od['od_receipt_bank']) {
echo "<tr class=ht><td>현금영수증</td><td>";
if ($od["od_cash"])
echo "<a href=\"javascript:;\" onclick=\"window.open('https://admin.kcp.co.kr/Modules/Service/Cash/Cash_Bill_Common_View.jsp?cash_no=$od[od_cash_no]', 'taxsave_receipt', 'width=360,height=647,scrollbars=0,menus=0');\">현금영수증 확인하기</a>";
if ($od["od_cash"])
echo "<a href=\"javascript:;\" onclick=\"window.open('https://admin.kcp.co.kr/Modules/Service/Cash/Cash_Bill_Common_View.jsp?cash_no={$od['od_cash_no']}', 'taxsave_receipt', 'width=360,height=647,scrollbars=0,menus=0');\">현금영수증 확인하기</a>";
else
echo "<a href=\"javascript:;\" onclick=\"window.open('$g4[shop_path]/taxsave_kcp.php?od_id=$od_id&on_uid=$od[on_uid]', 'taxsave', 'width=550,height=400,scrollbars=1,menus=0');\">현금영수증을 발급하시려면 클릭하십시오.</a>";
echo "<a href=\"javascript:;\" onclick=\"window.open('".G4_SHOP_URL."/taxsave_kcp.php?od_id=$od_id&on_uid={$od['on_uid']}', 'taxsave', 'width=550,height=400,scrollbars=1,menus=0');\">현금영수증을 발급하시려면 클릭하십시오.</a>";
echo "</td></tr>";
}
}
@ -441,17 +441,17 @@ if ($od[od_receipt_point] > 0)
<colgroup width=110>
<colgroup width='' bgcolor=#ffffff>
<tr><td colspan=2 height=1 bgcolor=#0E87F9></td></tr>
<? if ($od[od_settle_case] == '무통장' || $od[od_settle_case] == '가상계좌' || $od[od_settle_case] == '계좌이체') { ?>
<? if ($od['od_settle_case'] == '무통장' || $od['od_settle_case'] == '가상계좌' || $od['od_settle_case'] == '계좌이체') { ?>
<?
// 주문서
$sql = " select * from $g4[yc4_order_table] where od_id = '$od_id' ";
$sql = " select * from {$g4['yc4_order_table']} where od_id = '$od_id' ";
$result = sql_query($sql);
$od = sql_fetch_array($result);
if ($od['od_settle_case'] == '무통장')
{
// 은행계좌를 배열로 만든후
$str = explode("\n", $default[de_bank_account]);
$str = explode("\n", $default['de_bank_account']);
$bank_account = "\n<select name=od_bank_account>\n";
$bank_account .= "<option value=''>------------ 선택하십시오 ------------\n";
for ($i=0; $i<count($str); $i++) {
@ -461,13 +461,13 @@ if ($od[od_receipt_point] > 0)
$bank_account .= "</select> ";
}
else if ($od['od_settle_case'] == '가상계좌')
$bank_account = $od[od_bank_account] . "<input type='hidden' name='od_bank_account' value='$od[od_bank_account]'>";
$bank_account = $od['od_bank_account'] . "<input type='hidden' name='od_bank_account' value='{$od['od_bank_account']}'>";
else if ($od['od_settle_case'] == '계좌이체')
$bank_account = $od['od_settle_case'];
?>
<?
if ($od[od_settle_case] == '무통장' || $od[od_settle_case] == '가상계좌')
if ($od['od_settle_case'] == '무통장' || $od['od_settle_case'] == '가상계좌')
{
echo "<tr class=ht>";
echo "<td>계좌번호</td>";
@ -475,14 +475,14 @@ if ($od[od_receipt_point] > 0)
echo "</tr>";
}
if ($od[od_settle_case] == '무통장')
echo "<script> document.frmorderreceiptform.od_bank_account.value = '".str_replace("\r", "", $od[od_bank_account])."'; </script>";
if ($od['od_settle_case'] == '무통장')
echo "<script> document.frmorderreceiptform.od_bank_account.value = '".str_replace("\r", "", $od['od_bank_account'])."'; </script>";
?>
<tr class=ht>
<td><?=$od[od_settle_case]?> 입금액</td>
<td><?=$od['od_settle_case']?> 입금액</td>
<td>
<input type=text class=ed name=od_receipt_bank size=10
value='<? echo $od[od_receipt_bank] ?>'>원
<input type=text class=ed name=od_receipt_bank size=10
value='<? echo $od['od_receipt_bank'] ?>'>원
<?
if ($od['od_settle_case'] == '계좌이체' || $od['od_settle_case'] == '가상계좌')
{
@ -495,9 +495,9 @@ if ($od[od_receipt_point] > 0)
<tr class=ht>
<td>입금자명</td>
<td>
<input type=text class=ed name=od_deposit_name
value='<? echo $od[od_deposit_name] ?>'>
<? if ($default[de_sms_use3]) { ?>
<input type=text class=ed name=od_deposit_name
value='<? echo $od['od_deposit_name'] ?>'>
<? if ($default['de_sms_use3']) { ?>
<input type=checkbox name=od_sms_ipgum_check> SMS 문자전송
<? } ?>
</td>
@ -505,24 +505,24 @@ if ($od[od_receipt_point] > 0)
<tr class=ht>
<td>입금 확인일시</td>
<td>
<input type=text class=ed name=od_bank_time maxlength=19 value='<? echo is_null_time($od[od_bank_time]) ? "" : $od[od_bank_time]; ?>'>
<input type=text class=ed name=od_bank_time maxlength=19 value='<? echo is_null_time($od['od_bank_time']) ? "" : $od['od_bank_time']; ?>'>
<input type=checkbox name=od_bank_chk
value="<? echo date("Y-m-d H:i:s", $g4['server_time']); ?>"
value="<? echo date("Y-m-d H:i:s", G4_SERVER_TIME); ?>"
onclick="if (this.checked == true) this.form.od_bank_time.value=this.form.od_bank_chk.value; else this.form.od_bank_time.value = this.form.od_bank_time.defaultValue;">현재 시간
</td>
</tr>
<tr><td colspan=2 height=1 bgcolor=#84C718></td></tr>
<? } ?>
<? if ($od[od_settle_case] == '휴대폰') { ?>
<? if ($od['od_settle_case'] == '휴대폰') { ?>
<tr class=ht>
<td>휴대폰번호</td>
<td><?=$od[od_escrow2]?></td>
<td><?=$od['od_escrow2']?></td>
</tr>
<tr class=ht>
<td><?=$od[od_settle_case]?> 결제액</td>
<td><?=$od['od_settle_case']?> 결제액</td>
<td>
<input type=text class=ed name=od_receipt_hp size=10 value='<? echo $od[od_receipt_hp] ?>'>원
<input type=text class=ed name=od_receipt_hp size=10 value='<? echo $od['od_receipt_hp'] ?>'>원
<?
$pg_url = $g4['yc4_cardpg'][$default['de_card_pg']];
echo "&nbsp;<a href='$pg_url' target=_new>결제대행사</a>";
@ -532,7 +532,7 @@ if ($od[od_receipt_point] > 0)
<tr class=ht>
<td>휴대폰 결제일시</td>
<td>
<input type=text class=ed name=od_hp_time size=19 maxlength=19 value='<? echo is_null_time($od[od_hp_time]) ? "" : $od[od_hp_time]; ?>'>
<input type=text class=ed name=od_hp_time size=19 maxlength=19 value='<? echo is_null_time($od['od_hp_time']) ? "" : $od['od_hp_time']; ?>'>
<input type=checkbox name=od_card_chk
value="<? echo date("Y-m-d H:i:s", $g4['server_time']); ?>"
onclick="if (this.checked == true) this.form.od_hp_time.value=this.form.od_card_chk.value; else this.form.od_hp_time.value = this.form.od_hp_time.defaultValue;">현재 시간
@ -541,15 +541,15 @@ if ($od[od_receipt_point] > 0)
<tr><td colspan=2 height=1 bgcolor=#84C718></td></tr>
<? } ?>
<? if ($od[od_settle_case] == '신용카드') { ?>
<? if ($od['od_settle_case'] == '신용카드') { ?>
<tr class=ht>
<td bgcolor=#F8FFED>신용카드 결제액</td>
<td>
<input type=text class=ed name=od_receipt_card size=10
value='<? echo $od[od_receipt_card] ?>'>원
<input type=text class=ed name=od_receipt_card size=10
value='<? echo $od['od_receipt_card'] ?>'>원
&nbsp;
<?
$card_url = $g4[yc4_cardpg][$default[de_card_pg]];
<?
$card_url = $g4['yc4_cardpg'][$default['de_card_pg']];
?>
<a href='<? echo $card_url ?>' target=_new>결제대행사</a>
</td>
@ -557,16 +557,16 @@ if ($od[od_receipt_point] > 0)
<tr class=ht>
<td bgcolor=#F8FFED>카드 승인일시</td>
<td>
<input type=text class=ed name=od_card_time size=19 maxlength=19 value='<? echo is_null_time($od[od_card_time]) ? "" : $od[od_card_time]; ?>'>
<input type=text class=ed name=od_card_time size=19 maxlength=19 value='<? echo is_null_time($od['od_card_time']) ? "" : $od['od_card_time']; ?>'>
<input type=checkbox name=od_card_chk
value="<? echo date("Y-m-d H:i:s", $g4['server_time']); ?>"
value="<? echo date("Y-m-d H:i:s", G4_SERVER_TIME); ?>"
onclick="if (this.checked == true) this.form.od_card_time.value=this.form.od_card_chk.value; else this.form.od_card_time.value = this.form.od_card_time.defaultValue;">현재 시간
</td>
</tr>
<tr class=ht>
<td bgcolor=#F8FFED>카드 승인취소</td>
<td>
<input type=text class=ed name=od_cancel_card size=10 value='<? echo $od[od_cancel_card] ?>'>원
<input type=text class=ed name=od_cancel_card size=10 value='<? echo $od['od_cancel_card'] ?>'>원
</td>
</tr>
<tr><td colspan=2 height=1 bgcolor=#84C718></td></tr>
@ -575,19 +575,19 @@ if ($od[od_receipt_point] > 0)
<tr class=ht>
<td>포인트 결제액</td>
<td>
<input type=text class=ed name=od_receipt_point size=10 value='<? echo $od[od_receipt_point] ?>'>점
<input type=text class=ed name=od_receipt_point size=10 value='<? echo $od['od_receipt_point'] ?>'>점
</td>
</tr>
<tr class=ht>
<td>DC</td>
<td>
<input type=text class=ed name=od_dc_amount size=10 value='<? echo $od[od_dc_amount] ?>'>원
<input type=text class=ed name=od_dc_amount size=10 value='<? echo $od['od_dc_amount'] ?>'>원
</td>
</tr>
<tr class=ht>
<td>환불액</td>
<td>
<input type=text class=ed name=od_refund_amount size=10 value='<? echo $od[od_refund_amount] ?>'>원
<input type=text class=ed name=od_refund_amount size=10 value='<? echo $od['od_refund_amount'] ?>'>원
<?=help("카드승인취소를 입력한 경우에는 중복하여 입력하면 미수금이 틀려집니다.", 0, -100);?>
</td>
</tr>
@ -599,19 +599,19 @@ if ($od[od_receipt_point] > 0)
<select name=dl_id>
<option value=''>배송시 선택하세요.
<?
$sql = "select * from $g4[yc4_delivery_table] order by dl_order desc, dl_id desc ";
$sql = "select * from {$g4['yc4_delivery_table']} order by dl_order desc, dl_id desc ";
$result = sql_query($sql);
for ($i=0; $row=sql_fetch_array($result); $i++)
echo "<option value='$row[dl_id]'>$row[dl_company]\n";
echo "<option value='{$row['dl_id']}'>{$row['dl_company']}\n";
mysql_free_result($result);
?>
</select>
</tr>
<tr class=ht>
<td>운송장번호</td>
<td><input type=text class=ed name=od_invoice
value='<? echo $od[od_invoice] ?>'>
<? if ($default[de_sms_use4]) { ?>
<td><input type=text class=ed name=od_invoice
value='<? echo $od['od_invoice'] ?>'>
<? if ($default['de_sms_use4']) { ?>
<input type=checkbox name=od_sms_baesong_check> SMS 문자전송
<? } ?>
</td>
@ -619,9 +619,9 @@ if ($od[od_receipt_point] > 0)
<tr class=ht>
<td>배송일시</td>
<td>
<input type=text class=ed name=od_invoice_time maxlength=19 value='<? echo is_null_time($od[od_invoice_time]) ? "" : $od[od_invoice_time]; ?>'>
<input type=text class=ed name=od_invoice_time maxlength=19 value='<? echo is_null_time($od['od_invoice_time']) ? "" : $od['od_invoice_time']; ?>'>
<input type=checkbox name=od_invoice_chk
value="<? echo date("Y-m-d H:i:s", $g4['server_time']); ?>"
value="<? echo date("Y-m-d H:i:s", G4_SERVER_TIME); ?>"
onclick="if (this.checked == true) this.form.od_invoice_time.value=this.form.od_invoice_chk.value; else this.form.od_invoice_time.value = this.form.od_invoice_time.defaultValue;">현재 시간
</td>
</tr>
@ -636,8 +636,8 @@ if ($od[od_receipt_point] > 0)
</table>
<?
if ($od[dl_id] > 0)
echo "<script language='javascript'> document.frmorderreceiptform.dl_id.value = '$od[dl_id]' </script>";
if ($od['dl_id'] > 0)
echo "<script language='javascript'> document.frmorderreceiptform.dl_id.value = '{$od['dl_id']}' </script>";
?>
<br>
@ -659,7 +659,7 @@ if ($od[od_receipt_point] > 0)
<input type=hidden name=page value="<?=$page?>">
<tr>
<td width=90%>
<textarea name="od_shop_memo" rows=8 style='width:99%;' class=ed><? echo stripslashes($od[od_shop_memo]) ?></textarea>
<textarea name="od_shop_memo" rows=8 style='width:99%;' class=ed><? echo stripslashes($od['od_shop_memo']) ?></textarea>
</td>
<td width=10%>
<input type=submit class=btn1 value='메모 수정'>
@ -682,28 +682,28 @@ if ($od[od_receipt_point] > 0)
<tr><td colspan=2 height=1 bgcolor=CCCCCC></td></tr>
<tr class=ht>
<td>이름</td>
<td><input type=text class=ed name=od_name value='<?=$od[od_name]?>' required itemname='주문하신 분 이름'></td>
<td><input type=text class=ed name=od_name value='<?=$od['od_name']?>' required itemname='주문하신 분 이름'></td>
</tr>
<tr class=ht>
<td>전화번호</td>
<td><input type=text class=ed name=od_tel value='<?=$od[od_tel]?>' required itemname='주문하신 분 전화번호'></td>
<td><input type=text class=ed name=od_tel value='<?=$od['od_tel']?>' required itemname='주문하신 분 전화번호'></td>
</tr>
<tr class=ht>
<td>핸드폰</td>
<td><input type=text class=ed name=od_hp value='<?=$od[od_hp]?>'></td>
<td><input type=text class=ed name=od_hp value='<?=$od['od_hp']?>'></td>
</tr>
<tr class=ht>
<td>주소</td>
<td>
<input type=text class=ed name=od_zip1 size=4 readonly required itemname='우편번호 앞자리' value='<?=$od[od_zip1]?>'> -
<input type=text class=ed name=od_zip2 size=4 readonly required itemname='우편번호 뒷자리' value='<?=$od[od_zip2]?>'>
&nbsp;<a href="javascript:;" onclick="win_zip('frmorderform2', 'od_zip1', 'od_zip2', 'od_addr1', 'od_addr2');"><img src="<?=$g4[shop_admin_path]?>/img/btn_zip_find.gif" border=0 align=absmiddle></a><br>
<input type=text class=ed name=od_addr1 size=50 readonly required itemname='주소' value='<?=$od[od_addr1]?>'><br>
<input type=text class=ed name=od_addr2 size=50 required itemname='상세주소' value='<?=$od[od_addr2]?>'></td>
<input type=text class=ed name=od_zip1 size=4 readonly required itemname='우편번호 앞자리' value='<?=$od['od_zip1']?>'> -
<input type=text class=ed name=od_zip2 size=4 readonly required itemname='우편번호 뒷자리' value='<?=$od['od_zip2']?>'>
&nbsp;<a href="javascript:;" onclick="win_zip('frmorderform2', 'od_zip1', 'od_zip2', 'od_addr1', 'od_addr2');"><img src="<?=G4_ADMIN_URL?>/img/btn_zip_find.gif" border=0 align=absmiddle></a><br>
<input type=text class=ed name=od_addr1 size=50 readonly required itemname='주소' value='<?=$od['od_addr1']?>'><br>
<input type=text class=ed name=od_addr2 size=50 required itemname='상세주소' value='<?=$od['od_addr2']?>'></td>
</tr>
<tr class=ht>
<td>E-mail</td>
<td><input type=text class=ed name=od_email size=30 email required itemname='주문하신 분 E-mail' value='<?=$od[od_email]?>'></td>
<td><input type=text class=ed name=od_email size=30 email required itemname='주문하신 분 E-mail' value='<?=$od['od_email']?>'></td>
</tr>
<tr class=ht>
<td>IP Address</td>
@ -723,38 +723,38 @@ if ($od[od_receipt_point] > 0)
<tr><td colspan=2 height=1 bgcolor=CCCCCC></td></tr>
<tr class=ht>
<td>이름</td>
<td><input type=text class=ed name=od_b_name value='<?=$od[od_b_name]?>' required itemname='받으시는 분 이름'></td>
<td><input type=text class=ed name=od_b_name value='<?=$od['od_b_name']?>' required itemname='받으시는 분 이름'></td>
</tr>
<tr class=ht>
<td>전화번호</td>
<td><input type=text class=ed name=od_b_tel value='<?=$od[od_b_tel]?>' required itemname='받으시는 분 전화번호'></td>
<td><input type=text class=ed name=od_b_tel value='<?=$od['od_b_tel']?>' required itemname='받으시는 분 전화번호'></td>
</tr>
<tr class=ht>
<td>핸드폰</td>
<td><input type=text class=ed name=od_b_hp value='<?=$od[od_b_hp]?>'></td>
<td><input type=text class=ed name=od_b_hp value='<?=$od['od_b_hp']?>'></td>
</tr>
<tr class=ht>
<td>주소</td>
<td>
<input type=text class=ed name=od_b_zip1 size=4 readonly required itemname='우편번호 앞자리' value='<?=$od[od_b_zip1]?>'> -
<input type=text class=ed name=od_b_zip2 size=4 readonly required itemname='우편번호 뒷자리' value='<?=$od[od_b_zip2]?>'>
&nbsp;<a href="javascript:;" onclick="win_zip('frmorderform2', 'od_b_zip1', 'od_b_zip2', 'od_b_addr1', 'od_b_addr2');"><img src="<?=$g4[shop_admin_path]?>/img/btn_zip_find.gif" border=0 align=absmiddle></a><br>
<input type=text class=ed name=od_b_addr1 size=50 readonly required itemname='주소' value='<?=$od[od_b_addr1]?>'><br>
<input type=text class=ed name=od_b_addr2 size=50 required itemname='상세주소' value='<?=$od[od_b_addr2]?>'></td>
<input type=text class=ed name=od_b_zip1 size=4 readonly required itemname='우편번호 앞자리' value='<?=$od['od_b_zip1']?>'> -
<input type=text class=ed name=od_b_zip2 size=4 readonly required itemname='우편번호 뒷자리' value='<?=$od['od_b_zip2']?>'>
&nbsp;<a href="javascript:;" onclick="win_zip('frmorderform2', 'od_b_zip1', 'od_b_zip2', 'od_b_addr1', 'od_b_addr2');"><img src="<?=G4_ADMIN_URL?>/img/btn_zip_find.gif" border=0 align=absmiddle></a><br>
<input type=text class=ed name=od_b_addr1 size=50 readonly required itemname='주소' value='<?=$od['od_b_addr1']?>'><br>
<input type=text class=ed name=od_b_addr2 size=50 required itemname='상세주소' value='<?=$od['od_b_addr2']?>'></td>
</tr>
<? if ($default[de_hope_date_use]) { ?>
<? if ($default['de_hope_date_use']) { ?>
<tr class=ht>
<td>희망배송일</td>
<td>
<input type=text class=ed name=od_hope_date value='<?=$od[od_hope_date]?>' maxlength=10 minlength=10 required itemname='희망배송일'>
(<?=get_yoil($od[od_hope_date])?>)</td>
<input type=text class=ed name=od_hope_date value='<?=$od['od_hope_date']?>' maxlength=10 minlength=10 required itemname='희망배송일'>
(<?=get_yoil($od['od_hope_date'])?>)</td>
</tr>
<? } ?>
<tr class=ht>
<td>전하는 말씀</td>
<td colspan=3><?=nl2br($od[od_memo])?></td>
<td colspan=3><?=nl2br($od['od_memo'])?></td>
</tr>
<tr><td colspan=2 height=1 bgcolor=CCCCCC></td></tr>
</table>
@ -765,7 +765,7 @@ if ($od[od_receipt_point] > 0)
<p align=center>
<input type=submit class=btn1 value='주소정보 수정'>&nbsp;
<input type=button class=btn1 value=' 목 록 ' accesskey='l' onclick="document.location.href='./orderlist.php?<?=$qstr?>';">&nbsp;
<input type=button class=btn1 value='주문서 삭제' onclick="del('<?="./orderdelete.php?od_id=$od[od_id]&on_uid=$od[on_uid]&mb_id=$od[mb_id]&$qstr"?>');">
<input type=button class=btn1 value='주문서 삭제' onclick="del('<?="./orderdelete.php?od_id={$od['od_id']}&on_uid={$od['on_uid']}&mb_id={$od['mb_id']}&$qstr"?>');">
</form>
<script language='javascript'>
@ -799,7 +799,7 @@ function form_submit(status)
for (i=0; i<f.chk_cnt.value; i++) {
if (document.getElementById('ct_chk_'+i).checked == true) check = true;
}
if (check == false) {
alert("처리할 자료를 하나 이상 선택해 주십시오.");
return;
@ -816,5 +816,5 @@ function form_submit(status)
</script>
<?
include_once("$g4[admin_path]/admin.tail.php");
include_once(G4_ADMIN_PATH.'/admin.tail.php');
?>

View File

@ -1,8 +1,8 @@
<?
$sub_menu = "400400";
include_once("./_common.php");
$sub_menu = '400400';
include_once('./_common.php');
$sql = " update $g4[yc4_order_table]
$sql = " update {$g4['yc4_order_table']}
set od_shop_memo = '$od_shop_memo',
od_name = '$od_name',
od_tel = '$od_tel',
@ -19,7 +19,7 @@ $sql = " update $g4[yc4_order_table]
od_b_zip2 = '$od_b_zip2',
od_b_addr1 = '$od_b_addr1',
od_b_addr2 = '$od_b_addr2' ";
if ($default[de_hope_date_use])
if ($default['de_hope_date_use'])
$sql .= " , od_hope_date = '$od_hope_date' ";
$sql .= " where od_id = '$od_id' ";
sql_query($sql);

View File

@ -1,17 +1,17 @@
<?
$sub_menu = "400400";
include_once("./_common.php");
$sub_menu = '400400';
include_once('./_common.php');
auth_check($auth[$sub_menu], "r");
$g4[title] = "주문서관리";
include_once ("$g4[admin_path]/admin.head.php");
$g4['title'] = '주문서관리';
include_once (G4_ADMIN_PATH.'/admin.head.php');
$where = " where ";
$sql_search = "";
if ($search != "")
{
if ($sel_field != "")
if ($sel_field != "")
{
$sql_search .= " $where $sel_field like '%$search%' ";
$where = " and ";
@ -25,8 +25,8 @@ if ($sel_field == "") $sel_field = "od_id";
if ($sort1 == "") $sort1 = "od_id";
if ($sort2 == "") $sort2 = "desc";
$sql_common = " from $g4[yc4_order_table] a
left join $g4[yc4_cart_table] b on (a.on_uid=b.on_uid)
$sql_common = " from {$g4['yc4_order_table']} a
left join {$g4['yc4_cart_table']} b on (a.on_uid=b.on_uid)
$sql_search ";
// 김선용 200805 : 조인 사용으로 전체카운트가 일정레코드 이상일 때 지연시간 문제가 심각하므로 변경
@ -36,23 +36,23 @@ $total_count = mysql_num_rows($result);
*/
$sql = " select count(distinct od_id) as cnt " . $sql_common;
$row = sql_fetch($sql);
$total_count = $row[cnt];
$total_count = $row['cnt'];
$rows = $config[cf_page_rows];
$rows = $config['cf_page_rows'];
$total_page = ceil($total_count / $rows); // 전체 페이지 계산
if ($page == "") { $page = 1; } // 페이지가 없으면 첫 페이지 (1 페이지)
$from_record = ($page - 1) * $rows; // 시작 열을 구함
$sql = " select a.*, "._MISU_QUERY_."
$sql_common
group by a.od_id
group by a.od_id
order by $sort1 $sort2
limit $from_record, $rows ";
$result = sql_query($sql, false);
if (!$result) {
sql_query(" ALTER TABLE `$g4[yc4_order_table]` ADD `od_temp_hp` INT NOT NULL AFTER `od_temp_card` ", false);
sql_query(" ALTER TABLE `$g4[yc4_order_table]` ADD `od_receipt_hp` INT NOT NULL AFTER `od_receipt_card` ", false);
sql_query(" ALTER TABLE `$g4[yc4_order_table]` ADD `od_hp_time` DATETIME NOT NULL AFTER `od_card_time` ", false);
sql_query(" ALTER TABLE `{$g4['yc4_order_table']}` ADD `od_temp_hp` INT NOT NULL AFTER `od_temp_card` ", false);
sql_query(" ALTER TABLE `{$g4['yc4_order_table']}` ADD `od_receipt_hp` INT NOT NULL AFTER `od_receipt_card` ", false);
sql_query(" ALTER TABLE `{$g4['yc4_order_table']}` ADD `od_hp_time` DATETIME NOT NULL AFTER `od_card_time` ", false);
}
//echo $sql;
@ -70,7 +70,7 @@ $qstr = "$qstr1&sort1=$sort1&sort2=$sort2&page=$page";
<input type=hidden name=sort2 value="<? echo $sort2 ?>">
<input type=hidden name=page value="<? echo $page ?>">
<tr>
<td width=20%><a href='<?=$_SERVER[PHP_SELF]?>'>처음</a></td>
<td width=20%><a href='<?=$_SERVER['PHP_SELF']?>'>처음</a></td>
<td width=60% align=center>
<select name=sel_field>
<option value='od_id'>주문번호
@ -86,7 +86,7 @@ $qstr = "$qstr1&sort1=$sort1&sort2=$sort2&page=$page";
</select>
<input type=hidden name=save_search value='<?=$search?>'>
<input type=text name=search value='<? echo $search ?>' autocomplete="off">
<input type=image src='<?=$g4[admin_path]?>/img/btn_search.gif' align=absmiddle>
<input type=image src='<?=G4_ADMIN_URL?>/img/btn_search.gif' align=absmiddle>
</td>
<td width=20% align=right>건수 : <? echo $total_count ?>&nbsp;</td>
</tr>
@ -131,80 +131,80 @@ $tot_dc_amount = 0;
$tot_receiptamount = 0;
$tot_receiptcancel = 0;
$tot_misuamount = 0;
for ($i=0; $row=mysql_fetch_array($result); $i++)
for ($i=0; $row=mysql_fetch_array($result); $i++)
{
// 결제 수단
$s_receipt_way = $s_br = "";
if ($row[od_settle_case])
{
$s_receipt_way = $row[od_settle_case];
$s_receipt_way = $row['od_settle_case'];
$s_br = '<br/>';
}
else
{
if ($row[od_temp_bank] > 0 || $row[od_receipt_bank] > 0)
if ($row['od_temp_bank'] > 0 || $row['od_receipt_bank'] > 0)
{
//$s_receipt_way = "무통장입금";
$s_receipt_way = cut_str($row[od_bank_account],8,"");
$s_receipt_way = cut_str($row['od_bank_account'],8,"");
$s_br = "<br>";
}
if ($row[od_temp_card] > 0 || $row[od_receipt_card] > 0)
if ($row['od_temp_card'] > 0 || $row['od_receipt_card'] > 0)
{
// 미수금이 없고 카드결제를 하지 않았다면 카드결제를 선택후 무통장 입금한 경우임
if ($row[misuamount] <= 0 && $row[od_receipt_card] == 0)
if ($row['misuamount'] <= 0 && $row['od_receipt_card'] == 0)
; // 화면 출력하지 않음
else
else
{
$s_receipt_way .= $s_br."카드";
if ($row[od_receipt_card] == 0)
if ($row['od_receipt_card'] == 0)
$s_receipt_way .= "<span class=small><span class=point style='font-size:8pt;'>(미승인)</span></span>";
$s_br = "<br>";
}
}
}
if ($row[od_receipt_point] > 0)
$s_receipt_way .= $s_br."포인트";
if ($row['od_receipt_point'] > 0)
$s_receipt_way .= $s_br."포인트";
$s_mod = icon("수정", "./orderform.php?od_id=$row[od_id]&$qstr");
$s_del = icon("삭제", "javascript:del('./orderdelete.php?od_id=$row[od_id]&on_uid=$row[on_uid]&mb_id=$row[mb_id]&$qstr');");
$s_del = icon("삭제", "javascript:del('./orderdelete.php?od_id={$row['od_id']}&on_uid={$row['on_uid']}&mb_id={$row['mb_id']}&$qstr');");
$mb_nick = get_sideview($row[mb_id], $row[od_name], $row[od_email], '');
$mb_nick = get_sideview($row['mb_id'], $row['od_name'], $row['od_email'], '');
$tot_cnt = "";
if ($row[mb_id])
if ($row['mb_id'])
{
$sql2 = " select count(*) as cnt from $g4[yc4_order_table] where mb_id = '$row[mb_id]' ";
$sql2 = " select count(*) as cnt from {$g4['yc4_order_table']} where mb_id = '{$row['mb_id']}' ";
$row2 = sql_fetch($sql2);
$tot_cnt = "($row2[cnt])";
$tot_cnt = '('.$row2['cnt'].')';
}
$list = $i%2;
echo "
<tr class='list$list ht'>
<td align=center title='주문일시 : $row[od_time]'><a href='$g4[shop_path]/orderinquiryview.php?od_id=$row[od_id]&on_uid=$row[on_uid]'>$row[od_id]</a></td>
<!-- <td align=center><a href='$_SERVER[PHP_SELF]?sort1=$sort1&sort2=$sort2&sel_field=od_name&search=$row[od_name]'><span title='$od_deposit_name'>".cut_str($row[od_name],8,"")."</span></a></td> -->
<td align=center title='주문일시 : {$row['od_time']}'><a href='"G4_SHOP_URL."/orderinquiryview.php?od_id={$row['od_id']}&on_uid={$row['on_uid']}'>{$row['od_id']}</a></td>
<!-- <td align=center><a href='{$_SERVER['PHP_SELF']}?sort1=$sort1&sort2=$sort2&sel_field=od_name&search={$row['od_name']}'><span title='$od_deposit_name'>".cut_str($row['od_name'],8,"")."</span></a></td> -->
<td align=center>$mb_nick</td>
<td align=center><a href='$_SERVER[PHP_SELF]?sort1=$sort1&sort2=$sort2&sel_field=mb_id&search=$row[mb_id]'>$row[mb_id]</a></td>
<td align=center>{$row[itemcount]}건 $tot_cnt</td>
<td align=right><FONT COLOR='#1275D3'>".number_format($row[orderamount])."</font></td>
<td align=right>".number_format($row[ordercancel])."</td>
<td align=right>".number_format($row[od_dc_amount])."</td>
<td align=right><FONT COLOR='#1275D3'>".number_format($row[receiptamount])."</font></td>
<td align=right>".number_format($row[receiptcancel])."</td>
<td align=right><FONT COLOR='#FF6600'>".number_format($row[misu])."</FONT></td>
<td align=center><a href='{$_SERVER['PHP_SELF']}?sort1=$sort1&sort2=$sort2&sel_field=mb_id&search={$row['mb_id']}'>{$row['mb_id']}</a></td>
<td align=center>{$row['itemcount']}건 $tot_cnt</td>
<td align=right><FONT COLOR='#1275D3'>".number_format($row['orderamount'])."</font></td>
<td align=right>".number_format($row['ordercancel'])."</td>
<td align=right>".number_format($row['od_dc_amount'])."</td>
<td align=right><FONT COLOR='#1275D3'>".number_format($row['receiptamount'])."</font></td>
<td align=right>".number_format($row['receiptcancel'])."</td>
<td align=right><FONT COLOR='#FF6600'>".number_format($row['misu'])."</FONT></td>
<td align=center>$s_receipt_way</td>
<td align=center>$s_mod $s_del</a></td>
</tr>";
$tot_itemcount += $row[itemcount];
$tot_orderamount += $row[orderamount];
$tot_ordercancel += $row[ordercancel];
$tot_dc_amount += $row[od_dc_amount];
$tot_receiptamount += $row[receiptamount];
$tot_receiptcancel += $row[receiptcancel];
$tot_misu += $row[misu];
$tot_itemcount += $row['itemcount'];
$tot_orderamount += $row['orderamount'];
$tot_ordercancel += $row['ordercancel'];
$tot_dc_amount += $row['od_dc_amount'];
$tot_receiptamount += $row['receiptamount'];
$tot_receiptcancel += $row['receiptcancel'];
$tot_misu += $row['misu'];
}
mysql_free_result($result);
if ($i == 0)
@ -229,7 +229,7 @@ if ($i == 0)
<table width=100%>
<tr>
<td width=50%>&nbsp;</td>
<td width=50% align=right><?=get_paging($config[cf_write_pages], $page, $total_page, "$_SERVER[PHP_SELF]?$qstr&page=");?></td>
<td width=50% align=right><?=get_paging($config['cf_write_pages'], $page, $total_page, "{$_SERVER['PHP_SELF']}?$qstr&page=");?></td>
</tr>
</table>
@ -241,5 +241,5 @@ f.sel_field.value = '<? echo $sel_field ?>';
</script>
<?
include_once ("$g4[admin_path]/admin.tail.php");
include_once (G4_ADMIN_PATH.'/admin.tail.php');
?>

View File

@ -1,17 +1,17 @@
<?
$sub_menu = "400420";
include_once("./_common.php");
$sub_menu = '400420';
include_once('./_common.php');
auth_check($auth[$sub_menu], "r");
$g4[title] = "주문서관리";
include_once ("$g4[admin_path]/admin.head.php");
$g4['title'] = '주문서관리';
include_once (G4_ADMIN_PATH.'/admin.head.php');
$where = " where ";
$sql_search = "";
if ($search != "")
{
if ($sel_field != "")
if ($sel_field != "")
{
$sql_search .= " $where $sel_field like '%$search%' ";
$where = " and ";
@ -25,23 +25,23 @@ if ($sel_field == "") $sel_field = "od_id";
if ($sort1 == "") $sort1 = "od_id";
if ($sort2 == "") $sort2 = "desc";
$sql_common = " from $g4[yc4_order_table] a
left join $g4[yc4_cart_table] b on (a.on_uid=b.on_uid)
$sql_common = " from {$g4['yc4_order_table']} a
left join {$g4['yc4_cart_table']} b on (a.on_uid=b.on_uid)
$sql_search ";
// 테이블의 전체 레코드수만 얻음
$row = sql_fetch("select count(od_id) as cnt from {$g4['yc4_order_table']} $sql_search ");
$total_count = $row[cnt];
$total_count = $row['cnt'];
$rows = $config[cf_page_rows];
$rows = $config['cf_page_rows'];
$total_page = ceil($total_count / $rows); // 전체 페이지 계산
if ($page == "") { $page = 1; } // 페이지가 없으면 첫 페이지 (1 페이지)
$from_record = ($page - 1) * $rows; // 시작 열을 구함
$sql = " select a.od_id,
$sql = " select a.od_id,
a.*, "._MISU_QUERY_."
$sql_common
group by a.od_id
group by a.od_id
order by $sort1 $sort2
limit $from_record, $rows ";
$result = sql_query($sql);
@ -58,7 +58,7 @@ $qstr = "$qstr1&sort1=$sort1&sort2=$sort2&page=$page";
<input type=hidden name=sort2 value="<? echo $sort2 ?>">
<input type=hidden name=page value="<? echo $page ?>">
<tr>
<td width=20%><a href='<?=$_SERVER[PHP_SELF]?>'>처음</a></td>
<td width=20%><a href='<?=$_SERVER['PHP_SELF']?>'>처음</a></td>
<td width=60% align=center>
<select name=sel_field>
<option value='od_id'>주문번호
@ -70,7 +70,7 @@ $qstr = "$qstr1&sort1=$sort1&sort2=$sort2&page=$page";
</select>
<input type=hidden name=save_search value='<?=$search?>'>
<input type=text name=search value='<? echo $search ?>' autocomplete="off">
<input type=image src='<?=$g4[admin_path]?>/img/btn_search.gif' align=absmiddle>
<input type=image src='<?=G4_ADMIN_URL?>/img/btn_search.gif' align=absmiddle>
</td>
<td width=20% align=right>건수 : <? echo $total_count ?>&nbsp;</td>
</tr>
@ -126,44 +126,44 @@ $tot_dc_amount = 0;
$tot_receiptamount = 0;
$tot_receiptcancel = 0;
$tot_misuamount = 0;
for ($i=0; $row=mysql_fetch_array($result); $i++)
for ($i=0; $row=mysql_fetch_array($result); $i++)
{
// 결제 수단
$s_receipt_way = $s_br = "";
if ($row[od_settle_case])
if ($row['od_settle_case'])
{
$s_receipt_way = $row[od_settle_case];
$s_receipt_way = $row['od_settle_case'];
$s_br = '<br/>';
}
else
{
if ($row[od_temp_bank] > 0 || $row[od_receipt_bank] > 0)
if ($row['od_temp_bank'] > 0 || $row['od_receipt_bank'] > 0)
{
//$s_receipt_way = "무통장입금";
$s_receipt_way = cut_str($row[od_bank_account],8,"");
$s_receipt_way = cut_str($row['od_bank_account'],8,"");
$s_br = "<br>";
}
if ($row[od_temp_card] > 0 || $row[od_receipt_card] > 0)
if ($row['od_temp_card'] > 0 || $row['od_receipt_card'] > 0)
{
// 미수금이 없고 카드결제를 하지 않았다면 카드결제를 선택후 무통장 입금한 경우임
if ($row[misuamount] <= 0 && $row[od_receipt_card] == 0)
if ($row['misuamount'] <= 0 && $row['od_receipt_card'] == 0)
; // 화면 출력하지 않음
else
else
{
$s_receipt_way .= $s_br."카드";
if ($row[od_receipt_card] == 0)
if ($row['od_receipt_card'] == 0)
$s_receipt_way .= "<span class=small><span class=point style='font-size:8pt;'>(미승인)</span></span>";
$s_br = "<br>";
}
}
}
if ($row[od_receipt_point] > 0)
$s_receipt_way .= $s_br."포인트";
if ($row['od_receipt_point'] > 0)
$s_receipt_way .= $s_br."포인트";
$s_mod = icon("수정", "./orderform.php?od_id=$row[od_id]&$qstr");
$s_del = icon("삭제", "javascript:del('./orderdelete.php?od_id=$row[od_id]&on_uid=$row[on_uid]&mb_id=$row[mb_id]&$qstr&list=2');");
$s_mod = icon("수정", "./orderform.php?od_id={$row['od_id']}&$qstr");
$s_del = icon("삭제", "javascript:del('./orderdelete.php?od_id={$row['od_id']}&on_uid={$row['on_uid']}&mb_id={$row['mb_id']}&$qstr&list=2');");
if ($i>0)
echo "<tr><td colspan=12 height=1 bgcolor='#CCCCCC'></td></tr>";
@ -171,44 +171,44 @@ for ($i=0; $row=mysql_fetch_array($result); $i++)
$list = $i%2;
echo "
<tr class='list$list ht'>
<td align=center title='주문일시 : $row[od_time]'><a href='$g4[shop_path]/orderinquiryview.php?od_id=$row[od_id]&on_uid=$row[on_uid]'>$row[od_id]</a></td>
<td align=center><a href='$_SERVER[PHP_SELF]?sort1=$sort1&sort2=$sort2&sel_field=od_name&search=$row[od_name]'><span title='$od_deposit_name'>".cut_str($row[od_name],30,"")."</span></a></td>
<td align=center><a href='$_SERVER[PHP_SELF]?sort1=$sort1&sort2=$sort2&sel_field=mb_id&search=$row[mb_id]'>$row[mb_id]</a></td>
<td align=center>{$row[itemcount]}건</td>
<td align=right><FONT COLOR='#1275D3'>".number_format($row[orderamount])."</font></td>
<td align=right>".number_format($row[ordercancel])."</td>
<td align=right>".number_format($row[od_dc_amount])."</td>
<td align=right><FONT COLOR='#1275D3'>".number_format($row[receiptamount])."</font></td>
<td align=right>".number_format($row[receiptcancel])."</td>
<td align=right><FONT COLOR='#FF6600'>".number_format($row[misu])."</FONT></td>
<td align=center title='주문일시 : {$row['od_time']}'><a href='".G4_SHOP_URL."/orderinquiryview.php?od_id={$row['od_id']}&on_uid={$row['on_uid']}'>{$row['od_id']}</a></td>
<td align=center><a href='{$_SERVER['PHP_SELF']}?sort1=$sort1&sort2=$sort2&sel_field=od_name&search={$row['od_name']}'><span title='$od_deposit_name'>".cut_str($row['od_name'],30,"")."</span></a></td>
<td align=center><a href='{$_SERVER['PHP_SELF']}?sort1=$sort1&sort2=$sort2&sel_field=mb_id&search={$row['mb_id']}'>{$row['mb_id']}</a></td>
<td align=center>{$row['itemcount']}건</td>
<td align=right><FONT COLOR='#1275D3'>".number_format($row['orderamount'])."</font></td>
<td align=right>".number_format($row['ordercancel'])."</td>
<td align=right>".number_format($row['od_dc_amount'])."</td>
<td align=right><FONT COLOR='#1275D3'>".number_format($row['receiptamount'])."</font></td>
<td align=right>".number_format($row['receiptcancel'])."</td>
<td align=right><FONT COLOR='#FF6600'>".number_format($row['misu'])."</FONT></td>
<td align=center>$s_receipt_way</td>
<td align=center>$s_mod $s_del</a></td>
</tr>";
$tot_itemcount += $row[itemcount];
$tot_orderamount += $row[orderamount];
$tot_ordercancel += $row[ordercancel];
$tot_dc_amount += $row[od_dc_amount];
$tot_receiptamount += $row[receiptamount];
$tot_receiptcancel += $row[receiptcancel];
$tot_misu += $row[misu];
$tot_itemcount += $row['itemcount'];
$tot_orderamount += $row['orderamount'];
$tot_ordercancel += $row['ordercancel'];
$tot_dc_amount += $row['od_dc_amount'];
$tot_receiptamount += $row['receiptamount'];
$tot_receiptcancel += $row['receiptcancel'];
$tot_misu += $row['misu'];
// 상품개별출력
$sql2 = " select c.it_name,
b.*
from $g4[yc4_order_table] a
left join $g4[yc4_cart_table] b on (a.on_uid = b.on_uid)
left join $g4[yc4_item_table] c on (b.it_id = c.it_id)
where od_id = '$row[od_id]' ";
$sql2 = " select c.it_name,
b.*
from {$g4['yc4_order_table']} a
left join {$g4['yc4_cart_table']} b on (a.on_uid = b.on_uid)
left join {$g4['yc4_item_table']} c on (b.it_id = c.it_id)
where od_id = '{$row['od_id']}' ";
$result2 = sql_query($sql2);
for ($k=0; $row2=sql_fetch_array($result2); $k++)
for ($k=0; $row2=sql_fetch_array($result2); $k++)
{
$href = "$g4[shop_path]/item.php?it_id=$row2[it_id]";
$it_name = "<a href='$href'>".cut_str($row2[it_name],35)."</a><br>";
$it_name .= print_item_options($row2[it_id], $row2[it_opt1], $row2[it_opt2], $row2[it_opt3], $row2[it_opt4], $row2[it_opt5], $row2[it_opt6]);
$href = G4_SHOP_URL."/item.php?it_id={$row2['it_id']}";
$it_name = "<a href='$href'>".cut_str($row2['it_name'],35)."</a><br>";
$it_name .= print_item_options($row2['it_id'], $row2['it_opt1'], $row2['it_opt2'], $row2['it_opt3'], $row2['it_opt4'], $row2['it_opt5'], $row2['it_opt6']);
$sub_amount = $row2[ct_qty] * $row2[ct_amount];
$sub_point = $row2[ct_qty] * $row2[ct_point];
$sub_amount = $row2['ct_qty'] * $row2['ct_amount'];
$sub_point = $row2['ct_qty'] * $row2['ct_point'];
echo "
<tr class='list$list ht'>
@ -216,14 +216,14 @@ for ($i=0; $row=mysql_fetch_array($result); $i++)
<td colspan=3>
<table width=100% cellpadding=0 cellspacing=0>
<tr>
<td style='padding-top:5px; padding-bottom:5px;'><a href='$href'>".get_it_image("{$row2[it_id]}_s", 50, 50)."</a></td>
<td style='padding-top:5px; padding-bottom:5px;'><a href='$href'>".get_it_image($row2['it_id'].'_s', 50, 50)."</a></td>
<td>$it_name</td>
</tr>
</table></td>
<td align=right>".number_format($row2[ct_amount])."&nbsp;</td>
<td align=center>$row2[ct_qty]</td>
<td align=right>".number_format($row2['ct_amount'])."&nbsp;</td>
<td align=center>".$row2['ct_qty']."</td>
<td align=right>".number_format($sub_point)."&nbsp;</td>
<td align=center colspan=2>$row2[ct_status]</td>
<td align=center colspan=2>".$row2['ct_status']."</td>
<td align=right>".number_format($sub_amount)."&nbsp;</td>
<td></td>
<td></td>
@ -253,7 +253,7 @@ if ($i == 0)
<table width=100%>
<tr>
<td width=50%>&nbsp;</td>
<td width=50% align=right><?=get_paging($config[cf_write_pages], $page, $total_page, "$_SERVER[PHP_SELF]?$qstr&page=");?></td>
<td width=50% align=right><?=get_paging($config['cf_write_pages'], $page, $total_page, "{$_SERVER['PHP_SELF']}?$qstr&page=");?></td>
</tr>
</table>
@ -265,5 +265,5 @@ f.sel_field.value = '<? echo $sel_field ?>';
</script>
<?
include_once ("$g4[admin_path]/admin.tail.php");
include_once (G4_ADMIN_PATH.'/admin.tail.php');
?>

View File

@ -5,9 +5,9 @@ if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
if (!defined("_ORDERMAIL_")) exit;
// 주문자님께 메일발송 체크를 했다면
if ($od_send_mail)
if ($od_send_mail)
{
$od = sql_fetch(" select * from $g4[yc4_order_table] where od_id = '$od_id' ");
$od = sql_fetch(" select * from {$g4['yc4_order_table']} where od_id = '$od_id' ");
$addmemo = nl2br(stripslashes($addmemo));
@ -25,8 +25,8 @@ if ($od_send_mail)
b.it_opt4_subject,
b.it_opt5_subject,
b.it_opt6_subject
from $g4[yc4_cart_table] a inner join $g4[yc4_item_table] b on (b.it_id=a.it_id)
where a.on_uid = '$od[on_uid]'
from {$g4['yc4_cart_table']} a inner join {$g4['yc4_item_table']} b on (b.it_id=a.it_id)
where a.on_uid = '{$od['on_uid']}'
order by a.ct_id ";
$result = sql_query($sql);
for ($i=0; $ct=mysql_fetch_array($result); $i++) {
@ -51,19 +51,19 @@ if ($od_send_mail)
$s_option = "없음";
}
$cart_list[$i][it_id] = $ct[it_id];
$cart_list[$i][it_name] = $ct[it_name];
$cart_list[$i][it_opt] = $s_option;
$cart_list[$i]['it_id'] = $ct['it_id'];
$cart_list[$i]['it_name'] = $ct['it_name'];
$cart_list[$i]['it_opt'] = $s_option;
$ct_status = $ct[ct_status];
$ct_status = $ct['ct_status'];
if ($ct_status == "준비") {
$ct_status = "상품준비중";
} else if ($ct_status == "배송") {
$ct_status = "배송중";
}
$cart_list[$i][ct_status] = $ct_status;
$cart_list[$i][ct_qty] = $ct[ct_qty];
$cart_list[$i]['ct_status'] = $ct_status;
$cart_list[$i]['ct_qty'] = $ct['ct_qty'];
}
@ -73,26 +73,26 @@ if ($od_send_mail)
$is_receipt = false;
// 신용카드 입금
if ($od[od_receipt_card] > 0) {
$card_list[od_card_time] = $od[od_card_time];
$card_list[od_receipt_card] = display_amount($od[od_receipt_card]);
if ($od['od_receipt_card'] > 0) {
$card_list['od_card_time'] = $od['od_card_time'];
$card_list['od_receipt_card'] = display_amount($od['od_receipt_card']);
$is_receipt = true;
}
// 무통장 입금
if ($od[od_receipt_bank] > 0) {
$bank_list[od_bank_time] = $od[od_bank_time];
$bank_list[od_receipt_bank] = display_amount($od[od_receipt_bank]);
$bank_list[od_deposit_name] = $od[od_deposit_name];
if ($od['od_receipt_bank'] > 0) {
$bank_list['od_bank_time'] = $od['od_bank_time'];
$bank_list['od_receipt_bank'] = display_amount($od['od_receipt_bank']);
$bank_list['od_deposit_name'] = $od['od_deposit_name'];
$is_receipt = true;
}
// 포인트 입금
if ($od[od_receipt_point] > 0) {
$point_list[od_time] = $od[od_time];
$point_list[od_receipt_point] = display_point($od[od_receipt_point]);
if ($od['od_receipt_point'] > 0) {
$point_list['od_time'] = $od['od_time'];
$point_list['od_receipt_point'] = display_point($od['od_receipt_point']);
$is_receipt = true;
}
@ -100,32 +100,32 @@ if ($od_send_mail)
// 배송정보
$is_delivery = false;
if ((int)$od[dl_id] > 0) {
$dl = sql_fetch(" select * from $g4[yc4_delivery_table] where dl_id = '$od[dl_id]' ");
$dl = sql_fetch(" select * from {$g4['yc4_delivery_table']} where dl_id = '{$od['dl_id']}' ");
$delivery_list[dl_url] = $dl[dl_url];
if (strpos($delivery_list[dl_url], "=")) $delivery_list[dl_url] .= $od[od_invoice];
$delivery_list[dl_company] = $dl[dl_company];
$delivery_list[dl_tel] = $dl[dl_tel];
$delivery_list[od_invoice] = $od[od_invoice];
$delivery_list[od_invoice_time] = $od[od_invoice_time];
$delivery_list['dl_url'] = $dl['dl_url'];
if (strpos($delivery_list['dl_url'], "=")) $delivery_list['dl_url'] .= $od['od_invoice'];
$delivery_list['dl_company'] = $dl['dl_company'];
$delivery_list['dl_tel'] = $dl['dl_tel'];
$delivery_list['od_invoice'] = $od['od_invoice'];
$delivery_list['od_invoice_time'] = $od['od_invoice_time'];
$is_delivery = true;
}
// 입금 또는 배송내역이 있다면 메일 발송
if ($is_receipt || $is_delivery)
if ($is_receipt || $is_delivery)
{
ob_start();
include "$g4[shop_path]/mail/ordermail.mail.php";
include G4_SHOP_PATH.'/mail/ordermail.mail.php';
$content = ob_get_contents();
ob_end_clean();
$title = "{$od[od_name]}님께서 주문하신 내역을 다음과 같이 처리하였습니다.";
$email = $od[od_email];
$title = "{$od['od_name']}님께서 주문하신 내역을 다음과 같이 처리하였습니다.";
$email = $od['od_email'];
// 메일 보낸 내역 상점메모에 update
$od_shop_memo = "$g4[time_ymdhis] - 결제/배송내역 메일발송\n" . $od[od_shop_memo];;
/* 1.00.06
$od_shop_memo = G4_TIME_YMDHIS.' - 결제/배송내역 메일발송\n' . $od['od_shop_memo'];
/* 1.00.06
** 주석처리 - 처리하지 않음
if ($receipt_check)
$od_shop_memo .= ", 입금확인";
@ -133,11 +133,11 @@ if ($od_send_mail)
$od_shop_memo .= ", 송장번호";
*/
sql_query(" update $g4[yc4_order_table] set od_shop_memo = '$od_shop_memo' where od_id = '$od_id' ");
sql_query(" update {$g4['yc4_order_table']} set od_shop_memo = '$od_shop_memo' where od_id = '$od_id' ");
$admin = get_admin('super');
mailer($config[cf_title], $admin[mb_email], $email, $title, $content, 1);
mailer($config['cf_title'], $admin['mb_email'], $email, $title, $content, 1);
}
}
?>

View File

@ -1,16 +1,16 @@
<?
$sub_menu = "500120";
include_once("./_common.php");
$sub_menu = '500120';
include_once('./_common.php');
auth_check($auth[$sub_menu], "r");
$g4[title] = "주문내역출력";
include_once ("$g4[admin_path]/admin.head.php");
$g4['title'] = '주문내역출력';
include_once (G4_ADMIN_PATH.'/admin.head.php');
?>
<table width=550><tr><td>
<?=subtitle($g4[title])?>
<?=subtitle($g4['title'])?>
<table cellpadding=0 cellspacing=0 border=0 width=100%>
<form name=forderprint action="./orderprintresult.php" onsubmit="return forderprintcheck(this);" autocomplete="off" style="margin:0px;">
@ -30,9 +30,9 @@ include_once ("$g4[admin_path]/admin.head.php");
</tr>
<tr>
<td align=right>
<input type=text name=fr_date id='fr_date' size=10 maxlength=8 value="<?=date("Ymd");?>" class=ed><a href="javascript:win_calendar('fr_date', document.getElementById('fr_date').value, '');"><img src='<?=$g4[path]?>/img/calendar.gif' border=0 align=absmiddle title='달력 - 날짜를 선택하세요'></a>
<input type=text name=fr_date id='fr_date' size=10 maxlength=8 value="<?=date("Ymd");?>" class=ed><a href="javascript:win_calendar('fr_date', document.getElementById('fr_date').value, '');"><img src='<?=G4_URL?>/img/calendar.gif' border=0 align=absmiddle title='달력 - 날짜를 선택하세요'></a>
<input type=text name=to_date id='to_date' size=10 maxlength=8 value="<?=date("Ymd");?>" class=ed><a href="javascript:win_calendar('to_date', document.getElementById('to_date').value, '');"><img src='<?=$g4[path]?>/img/calendar.gif' border=0 align=absmiddle title='달력 - 날짜를 선택하세요'></a>
<input type=text name=to_date id='to_date' size=10 maxlength=8 value="<?=date("Ymd");?>" class=ed><a href="javascript:win_calendar('to_date', document.getElementById('to_date').value, '');"><img src='<?=G4_URL?>/img/calendar.gif' border=0 align=absmiddle title='달력 - 날짜를 선택하세요'></a>
&nbsp;
<select name=ct_status>
<option value='주문'>주문
@ -97,7 +97,7 @@ include_once ("$g4[admin_path]/admin.head.php");
<script language="JavaScript">
function forderprintcheck(f)
{
if (f.csv[0].checked || f.csv[1].checked)
if (f.csv[0].checked || f.csv[1].checked)
{
f.target = "_top";
}
@ -112,5 +112,5 @@ function forderprintcheck(f)
</script>
<?
include_once ("$g4[admin_path]/admin.tail.php");
include_once (G4_ADMIN_PATH.'/admin.tail.php');
?>

View File

@ -1,6 +1,6 @@
<?
$sub_menu = "500120";
include_once("./_common.php");
$sub_menu = '500120';
include_once('./_common.php');
auth_check($auth[$sub_menu], "r");
@ -33,19 +33,19 @@ function conv_telno($t)
// 1.04.01
// MS엑셀 CSV 데이터로 다운로드 받음
if ($csv == 'csv')
if ($csv == 'csv')
{
$fr_date = date_conv($fr_date);
$to_date = date_conv($to_date);
$sql = " SELECT od_b_zip1, od_b_zip2, od_b_addr1, od_b_addr2, od_b_name, od_b_tel, od_b_hp, it_name, ct_qty, b.it_id, a.od_id, od_memo, od_invoice
FROM $g4[yc4_order_table] a, $g4[yc4_cart_table] b, $g4[yc4_item_table] c
FROM {$g4['yc4_order_table']} a, {$g4['yc4_cart_table']} b, {$g4['yc4_item_table']} c
where a.on_uid = b.on_uid
and b.it_id = c.it_id ";
if ($case == 1) // 출력기간
$sql .= " and a.od_time between '$fr_date 00:00:00' and '$to_date 23:59:59' ";
else // 주문번호구간
else // 주문번호구간
$sql .= " and a.od_id between '$fr_od_id' and '$to_od_id' ";
if ($ct_status)
$sql .= " and b.ct_status = '$ct_status' ";
@ -56,7 +56,7 @@ if ($csv == 'csv')
alert("출력할 내역이 없습니다.");
//header('Content-Type: text/x-csv');
header("Content-charset=$g4[charset]");
header("Content-charset=utf-8");
header('Content-Type: doesn/matter');
header('Expires: ' . gmdate('D, d M Y H:i:s') . ' GMT');
header('Content-Disposition: attachment; filename="' . date("ymd", time()) . '.csv"');
@ -64,22 +64,22 @@ if ($csv == 'csv')
header('Pragma: public');
//echo "우편번호,주소,이름,전화1,전화2,상품명,수량,비고,전하실말씀\n";
echo "우편번호,주소,이름,전화1,전화2,상품명,수량,상품코드,주문번호,운송장번호,전하실말씀\n";
for ($i=0; $row=mysql_fetch_array($result); $i++)
for ($i=0; $row=mysql_fetch_array($result); $i++)
{
echo '"' . $row[od_b_zip1] . '-' . $row[od_b_zip2] . '"' . ',';
echo '"' . $row[od_b_addr1] . ' ' . $row[od_b_addr2] . '"' . ',';
echo '"' . $row[od_b_name] . '"' . ',';
echo '"' . $row['od_b_zip1'] . '-' . $row['od_b_zip2'] . '"' . ',';
echo '"' . $row['od_b_addr1'] . ' ' . $row['od_b_addr2'] . '"' . ',';
echo '"' . $row['od_b_name'] . '"' . ',';
//echo '"' . multibyte_digit((string)$row[od_b_tel]) . '"' . ',';
//echo '"' . multibyte_digit((string)$row[od_b_hp]) . '"' . ',';
echo '"' . conv_telno($row[od_b_tel]) . '"' . ',';
echo '"' . conv_telno($row[od_b_hp]) . '"' . ',';
echo '"' . preg_replace("/\"/", "&#034;", $row[it_name]) . '"' . ',';
echo '"' . $row[ct_qty] . '"' . ',';
echo '"\'' . $row[it_id] . '\'"' . ',';
echo '"\'' . $row[od_id] . '\'"' . ',';
echo '"' . $row[od_invoice] . '"' . ',';
echo '"' . conv_telno($row['od_b_tel']) . '"' . ',';
echo '"' . conv_telno($row['od_b_hp']) . '"' . ',';
echo '"' . preg_replace("/\"/", "&#034;", $row['it_name']) . '"' . ',';
echo '"' . $row['ct_qty'] . '"' . ',';
echo '"\'' . $row['it_id'] . '\'"' . ',';
echo '"\'' . $row['od_id'] . '\'"' . ',';
echo '"' . $row['od_invoice'] . '"' . ',';
//echo '"' . preg_replace("/\"/", "&#034;", preg_replace("/\n/", "", $row[od_memo])) . '"';
echo '"' . preg_replace("/\"/", "&#034;", $row[od_memo]) . '"';
echo '"' . preg_replace("/\"/", "&#034;", $row['od_memo']) . '"';
echo "\n";
}
if ($i == 0)
@ -89,19 +89,19 @@ if ($csv == 'csv')
}
// MS엑셀 XLS 데이터로 다운로드 받음
if ($csv == 'xls')
if ($csv == 'xls')
{
$fr_date = date_conv($fr_date);
$to_date = date_conv($to_date);
$sql = " SELECT od_b_zip1, od_b_zip2, od_b_addr1, od_b_addr2, od_b_name, od_b_tel, od_b_hp, it_name, ct_qty, b.it_id, a.od_id, od_memo, od_invoice, b.it_opt1, b.it_opt2, b.it_opt3, b.it_opt4, b.it_opt5, b.it_opt6
FROM $g4[yc4_order_table] a, $g4[yc4_cart_table] b, $g4[yc4_item_table] c
FROM {$g4['yc4_order_table']} a, {$g4['yc4_cart_table']} b, {$g4['yc4_item_table']} c
where a.on_uid = b.on_uid
and b.it_id = c.it_id ";
if ($case == 1) // 출력기간
$sql .= " and a.od_time between '$fr_date 00:00:00' and '$to_date 23:59:59' ";
else // 주문번호구간
else // 주문번호구간
$sql .= " and a.od_id between '$fr_od_id' and '$to_od_id' ";
if ($ct_status)
$sql .= " and b.ct_status = '$ct_status' ";
@ -111,7 +111,7 @@ if ($csv == 'xls')
if (!$cnt)
alert("출력할 내역이 없습니다.");
header("Content-charset=$g4[charset]");
header("Content-charset=utf-8");
header('Content-Type: application/vnd.ms-excel');
header('Expires: ' . gmdate('D, d M Y H:i:s') . ' GMT');
header('Content-Disposition: attachment; filename="' . date("ymd", time()) . '.xls"');
@ -120,7 +120,7 @@ if ($csv == 'xls')
echo "<html>";
echo "<head>";
echo "<title>xls</title>";
echo "<style>.txt {mso-number-format:'\\@';}</style>";
echo "<style>.txt {mso-number-format:'\\@';}</style>";
echo "</head>";
echo "<body>";
echo "<table border='1'>";
@ -137,23 +137,23 @@ if ($csv == 'xls')
echo "<td>운송장번호</td>";
echo "<td>전하실말씀</td>";
echo "</tr>";
for ($i=0; $row=mysql_fetch_array($result); $i++)
for ($i=0; $row=mysql_fetch_array($result); $i++)
{
$it_name = stripslashes($row[it_name]) . "<br />";
$it_name .= print_item_options($row[it_id], $row[it_opt1], $row[it_opt2], $row[it_opt3], $row[it_opt4], $row[it_opt5], $row[it_opt6]);
$it_name = stripslashes($row['it_name']) . "<br />";
$it_name .= print_item_options($row['it_id'], $row['it_opt1'], $row['it_opt2'], $row['it_opt3'], $row['it_opt4'], $row['it_opt5'], $row['it_opt6']);
echo "<tr>";
echo "<td>" . $row[od_b_zip1] . '-' . $row[od_b_zip2] . "</td>";
echo "<td>" . $row[od_b_addr1] . ' ' . $row[od_b_addr2] . "</td>";
echo "<td>" . $row[od_b_name] . "</td>";
echo "<td class='txt'>" . $row[od_b_tel] . "</td>";
echo "<td class='txt'>" . $row[od_b_hp] . "</td>";
echo "<td>" . $row['od_b_zip1'] . '-' . $row['od_b_zip2'] . "</td>";
echo "<td>" . $row['od_b_addr1'] . ' ' . $row['od_b_addr2'] . "</td>";
echo "<td>" . $row['od_b_name'] . "</td>";
echo "<td class='txt'>" . $row['od_b_tel'] . "</td>";
echo "<td class='txt'>" . $row['od_b_hp'] . "</td>";
echo "<td>" . $it_name . "</td>";
echo "<td>" . $row[ct_qty] . "</td>";
echo "<td class='txt'>" . $row[it_id] . "</td>";
echo "<td class='txt'>'" . urlencode($row[od_id]) . "'</td>";
echo "<td class='txt'>" . $row[od_invoice] . "</td>";
echo "<td>" . $row[od_memo] . "</td>";
echo "<td>" . $row['ct_qty'] . "</td>";
echo "<td class='txt'>" . $row['it_id'] . "</td>";
echo "<td class='txt'>'" . urlencode($row['od_id']) . "'</td>";
echo "<td class='txt'>" . $row['od_invoice'] . "</td>";
echo "<td>" . $row['od_memo'] . "</td>";
echo "</tr>";
}
if ($i == 0)
@ -169,24 +169,24 @@ function get_order($on_uid)
{
global $g4;
$sql = " select * from $g4[yc4_order_table] where on_uid = '$on_uid' ";
$sql = " select * from {$g4['yc4_order_table']} where on_uid = '$on_uid' ";
return sql_fetch($sql);
}
$g4[title] = "주문내역";
include_once("$g4[path]/head.sub.php");
$g4['title'] = "주문내역";
include_once(G4_PATH.'/head.sub.php');
if ($case == 1)
if ($case == 1)
{
$fr_date = date_conv($fr_date);
$to_date = date_conv($to_date);
$sql = " SELECT DISTINCT a.on_uid FROM $g4[yc4_order_table] a, $g4[yc4_cart_table] b
$sql = " SELECT DISTINCT a.on_uid FROM {$g4['yc4_order_table']} a, {$g4['yc4_cart_table']} b
where a.on_uid = b.on_uid
and a.od_time between '$fr_date 00:00:00' and '$to_date 23:59:59' ";
}
else
{
$sql = " SELECT DISTINCT a.on_uid FROM $g4[yc4_order_table] a, $g4[yc4_cart_table] b
$sql = " SELECT DISTINCT a.on_uid FROM {$g4['yc4_order_table']} a, {$g4['yc4_cart_table']} b
where a.on_uid = b.on_uid
and a.od_id between '$fr_od_id' and '$to_od_id' ";
}
@ -194,7 +194,7 @@ if ($ct_status)
$sql .= " and b.ct_status = '$ct_status' ";
$sql .= " order by a.od_id ";
$result = sql_query($sql);
if (mysql_num_rows($result) == 0)
if (mysql_num_rows($result) == 0)
{
echo "<script>alert('출력할 내역이 없습니다.'); window.close();</script>";
exit;
@ -202,7 +202,7 @@ if (mysql_num_rows($result) == 0)
?>
<html>
<head>
<meta http-equiv="Content-type" content="text/html; charset=<?=$g4['charset']?>">
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
<title>주문내역</title>
<style>
body, table, tr, td, p { font-size:9pt; }
@ -210,7 +210,7 @@ if (mysql_num_rows($result) == 0)
</head>
<body bgcolor=ffffff leftmargin=0 topmargin=0 marginheight=0 marginwidth=0>
<?
<?
if ($case == 1)
echo "<p><b>[ $fr_date - $to_date $ct_status 내역 ]</b>";
else
@ -235,49 +235,49 @@ else
<?
$mod = 10;
$tot_total_amount = 0;
for ($i=0; $row=sql_fetch_array($result); $i++)
for ($i=0; $row=sql_fetch_array($result); $i++)
{
$sql1 = " select * from $g4[yc4_order_table] where on_uid = '$row[on_uid]' ";
$sql1 = " select * from {$g4['yc4_order_table']} where on_uid = '{$row['on_uid']}' ";
$row1 = sql_fetch($sql1);
// 1.03.02
$row1[od_addr] = "(".$row1[od_zip1]."-".$row1[od_zip2].") ".$row1[od_addr1]." ".$row1[od_addr2];
$row1[od_b_addr] = "(".$row1[od_b_zip1]."-".$row1[od_b_zip2].") ".$row1[od_b_addr1]." ".$row1[od_b_addr2];
$row1['od_addr'] = "(".$row1['od_zip1']."-".$row1['od_zip2'].") ".$row1['od_addr1']." ".$row1['od_addr2'];
$row1['od_b_addr'] = "(".$row1['od_b_zip1']."-".$row1['od_b_zip2'].") ".$row1['od_b_addr1']." ".$row1['od_b_addr2'];
$row1[od_addr] = ($row1[od_addr]) ? $row1[od_addr] : "&nbsp;";
$row1[od_tel] = ($row1[od_tel]) ? $row1[od_tel] : "&nbsp;";
$row1[od_hp] = ($row1[od_hp]) ? $row1[od_hp] : "&nbsp;";
$row1[od_b_tel] = ($row1[od_b_tel]) ? $row1[od_b_tel] : "&nbsp;";
$row1[od_b_hp] = ($row1[od_b_hp]) ? $row1[od_b_hp] : "&nbsp;";
$row1['od_addr'] = ($row1['od_addr']) ? $row1['od_addr'] : "&nbsp;";
$row1['od_tel'] = ($row1['od_tel']) ? $row1['od_tel'] : "&nbsp;";
$row1['od_hp'] = ($row1['od_hp']) ? $row1['od_hp'] : "&nbsp;";
$row1['od_b_tel'] = ($row1['od_b_tel']) ? $row1['od_b_tel'] : "&nbsp;";
$row1['od_b_hp'] = ($row1['od_b_hp']) ? $row1['od_b_hp'] : "&nbsp;";
if ($row1[od_name] == $row1[od_b_name]) $row1[od_b_name] = '"';
if ($row1[od_addr] == $row1[od_b_addr]) $row1[od_b_addr] = '"';
if ($row1[od_tel] == $row1[od_b_tel]) $row1[od_b_tel] = '"';
if ($row1[od_hp] == $row1[od_b_hp] && $row1[od_hp] != "&nbsp;") $row1[od_b_hp] = '"';
if ($row1['od_name'] == $row1['od_b_name']) $row1['od_b_name'] = '"';
if ($row1['od_addr'] == $row1['od_b_addr']) $row1['od_b_addr'] = '"';
if ($row1['od_tel'] == $row1['od_b_tel']) $row1['od_b_tel'] = '"';
if ($row1['od_hp'] == $row1['od_b_hp'] && $row1['od_hp'] != "&nbsp;") $row1['od_b_hp'] = '"';
$od_memo = ($row1[od_memo]) ? stripslashes($row1[od_memo]) : "";
$od_shop_memo = ($row1[od_shop_memo]) ? stripslashes($row1[od_shop_memo]) : "";
$od_memo = ($row1['od_memo']) ? stripslashes($row1['od_memo']) : "";
$od_shop_memo = ($row1['od_shop_memo']) ? stripslashes($row1['od_shop_memo']) : "";
echo "
<tr>
<td rowspan=3 align=center valign=top>$row1[od_id]</td>
<td>$row1[od_name]</td>
<td>$row1[od_addr]</td>
<td>$row1[od_tel]</td>
<td>$row1[od_hp]</td>
<td>".$row1['od_name']."</td>
<td>".$row1['od_addr']."</td>
<td>".$row1['od_tel']."</td>
<td>".$row1['od_hp']."</td>
</tr>
<tr>
<td>$row1[od_b_name]</td>
<td>$row1[od_b_addr]</td>
<td>$row1[od_b_tel]</td>
<td>$row1[od_b_hp]</td>
<td>".$row1['od_b_name']."</td>
<td>".$row1['od_b_addr']."</td>
<td>".$row1['od_b_tel']."</td>
<td>".$row1['od_b_hp']."</td>
</tr>
<tr>
<tr>
<td colspan=4>
<table width=100% cellpadding=2 cellspacing=0 border=1 bordercolordark='white' bordercolorlight='gray'>
";
$sql2 = " select a.*,
$sql2 = " select a.*,
b.it_opt1_subject,
b.it_opt2_subject,
b.it_opt3_subject,
@ -285,22 +285,22 @@ for ($i=0; $row=sql_fetch_array($result); $i++)
b.it_opt5_subject,
b.it_opt6_subject,
b.it_name
from $g4[yc4_cart_table] a, $g4[yc4_item_table] b
from {$g4['yc4_cart_table']} a, {$g4['yc4_item_table']} b
where a.it_id = b.it_id
and a.on_uid = '$row[on_uid]' ";
and a.on_uid = '{$row['on_uid']}' ";
if ($ct_status)
$sql2 .= " and a.ct_status = '$ct_status' ";
$sql2 .= " order by a.ct_id ";
$res2 = sql_query($sql2);
$cnt = $sub_tot_qty = $sub_tot_amount = 0;
while ($row2 = sql_fetch_array($res2))
while ($row2 = sql_fetch_array($res2))
{
$row2_tot_amount = $row2[ct_amount] * $row2[ct_qty];
$sub_tot_qty += $row2[ct_qty];
$row2_tot_amount = $row2['ct_amount'] * $row2['ct_qty'];
$sub_tot_qty += $row2['ct_qty'];
$sub_tot_amount += $row2_tot_amount;
$it_name = stripslashes($row2[it_name]);
$it_name = stripslashes($row2['it_name']);
$it_name = "$it_name ($row2[it_id])<br><font color=#555555>";
$str_split = "";
@ -326,7 +326,7 @@ for ($i=0; $row=sql_fetch_array($result); $i++)
$it_name .= "</font>";
$fontqty1 = $fontqty2 = "";
if ($row2[ct_qty] >= 2)
if ($row2['ct_qty'] >= 2)
{
$fontqty1 = "<font color=crimson><b>";
$fontqty2 = "</b></font>";
@ -335,15 +335,15 @@ for ($i=0; $row=sql_fetch_array($result); $i++)
echo "
<tr>
<td>$it_name</td>
<td width=80 align=right>".number_format($row2[ct_amount])."&nbsp;</td>
<td width=50 align=center>$fontqty1".number_format($row2[ct_qty])."$fontqty2</td>
<td width=80 align=right>".number_format($row2['ct_amount'])."&nbsp;</td>
<td width=50 align=center>$fontqty1".number_format($row2['ct_qty'])."$fontqty2</td>
<td width=80 align=right>".number_format($row2_tot_amount)."&nbsp;</td>
</tr>
";
$cnt++;
}
if ($cnt >= 2)
if ($cnt >= 2)
{
echo "
<tr>
@ -359,7 +359,7 @@ for ($i=0; $row=sql_fetch_array($result); $i++)
if ($od_memo) $od_memo = "<font color=crimson>비고 : $od_memo</font>";
if ($od_shop_memo) $od_shop_memo = "<br/><font color=crimson>상점메모 : $od_shop_memo</font>";
echo "
echo "
</table>
$od_memo
$od_shop_memo

View File

@ -1,30 +1,30 @@
<?
$sub_menu = "400400";
include_once("./_common.php");
include_once("$g4[path]/lib/mailer.lib.php");
include_once("$g4[path]/lib/icode.sms.lib.php");
$sub_menu = '400400';
include_once('./_common.php');
include_once(G4_LIB_PATH.'/mailer.lib.php');
include_once(G4_LIB_PATH.'/icode.sms.lib.php');
auth_check($auth[$sub_menu], "w");
if ($od_bank_time)
if ($od_bank_time)
{
if (check_datetime($od_bank_time) == false)
alert("무통장 입금일시 오류입니다.");
alert('무통장 입금일시 오류입니다.');
}
if ($od_card_time)
if ($od_card_time)
{
if (check_datetime($od_card_time) == false)
alert("신용카드 결제일시 오류입니다.");
alert('신용카드 결제일시 오류입니다.');
}
if ($od_hp_time)
if ($od_hp_time)
{
if (check_datetime($od_hp_time) == false)
alert("휴대폰 결제일시 오류입니다.");
}
$sql = " update $g4[yc4_order_table]
$sql = " update {$g4['yc4_order_table']}
set od_deposit_name = '$od_deposit_name',
od_bank_account = '$od_bank_account',
od_bank_time = '$od_bank_time',

View File

@ -3,19 +3,19 @@ if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
if (!defined("_ORDERSMS_")) exit;
$receive_number = preg_replace("/[^0-9]/", "", $od_hp); // 수신자번호 (받는사람 핸드폰번호 ... 여기서는 주문자님의 핸드폰번호임)
$send_number = preg_replace("/[^0-9]/", "", $default[de_admin_company_tel]); // 발신자번호
$send_number = preg_replace("/[^0-9]/", "", $default['de_admin_company_tel']); // 발신자번호
if ($od_sms_ipgum_check)
{
if ($od_bank_account && $od_receipt_bank && $od_deposit_name)
{
$sms_contents = $default[de_sms_cont3];
$sms_contents = $default['de_sms_cont3'];
$sms_contents = preg_replace("/{이름}/", $od_name, $sms_contents);
$sms_contents = preg_replace("/{입금액}/", number_format($od_receipt_bank), $sms_contents);
$sms_contents = preg_replace("/{주문번호}/", $od_id, $sms_contents);
$sms_contents = preg_replace("/{회사명}/", $default[de_admin_company_name], $sms_contents);
$sms_contents = preg_replace("/{회사명}/", $default['de_admin_company_name'], $sms_contents);
if ($default[de_sms_use] == "icode")
if ($default['de_sms_use'] == "icode")
{
$SMS = new SMS;
$SMS->SMS_con($default['de_icode_server_ip'], $default['de_icode_id'], $default['de_icode_pw'], $default['de_icode_server_port']);
@ -29,16 +29,16 @@ if ($od_sms_baesong_check)
{
if ($dl_id && $od_invoice)
{
$sms_contents = $default[de_sms_cont4];
$sms_contents = $default['de_sms_cont4'];
$sms_contents = preg_replace("/{이름}/", $od_name, $sms_contents);
$sql = " select dl_company from $g4[yc4_delivery_table] where dl_id = '$dl_id' ";
$row = sql_fetch($sql);
$sms_contents = preg_replace("/{택배회사}/", $row[dl_company], $sms_contents);
$sms_contents = preg_replace("/{택배회사}/", $row['dl_company'], $sms_contents);
$sms_contents = preg_replace("/{운송장번호}/", $od_invoice, $sms_contents);
$sms_contents = preg_replace("/{주문번호}/", $od_id, $sms_contents);
$sms_contents = preg_replace("/{회사명}/", $default[de_admin_company_name], $sms_contents);
$sms_contents = preg_replace("/{회사명}/", $default['de_admin_company_name'], $sms_contents);
if ($default[de_sms_use] == "icode")
if ($default['de_sms_use'] == "icode")
{
$SMS = new SMS;
$SMS->SMS_con($default['de_icode_server_ip'], $default['de_icode_id'], $default['de_icode_pw'], $default['de_icode_server_port']);

View File

@ -1,11 +1,11 @@
<?
$sub_menu = "400410";
include_once("./_common.php");
$sub_menu = '400410';
include_once('./_common.php');
auth_check($auth[$sub_menu], "r");
$g4[title] = "주문개별관리";
include_once ("$g4[admin_path]/admin.head.php");
$g4['title'] = '주문개별관리';
include_once (G4_ADMIN_PATH.'/admin.head.php');
$where = " where ";
$sql_search = "";
@ -26,17 +26,17 @@ if ($sel_field == "") $sel_field = "od_id";
if ($sort1 == "") $sort1 = "od_id";
if ($sort2 == "") $sort2 = "desc";
$sql_common = " from $g4[yc4_order_table] a
left join $g4[yc4_cart_table] b on (a.on_uid = b.on_uid)
left join $g4[yc4_item_table] c on (b.it_id = c.it_id)
$sql_common = " from {$g4['yc4_order_table']} a
left join {$g4['yc4_cart_table']} b on (a.on_uid = b.on_uid)
left join {$g4['yc4_item_table']} c on (b.it_id = c.it_id)
$sql_search ";
// 테이블의 전체 레코드수만 얻음
$sql = " select count(*) as cnt " . $sql_common;
$row = sql_fetch($sql);
$total_count = $row[cnt];
$total_count = $row['cnt'];
$rows = $config[cf_page_rows];
$rows = $config['cf_page_rows'];
$total_page = ceil($total_count / $rows); // 전체 페이지 계산
if ($page == "") { $page = 1; } // 페이지가 없으면 첫 페이지 (1 페이지)
$from_record = ($page - 1) * $rows; // 시작 열을 구함
@ -81,7 +81,7 @@ $qstr = "$qstr1&sort1=$sort1&sort2=$sort2&page=$page";
<input type=hidden name=page value="<? echo $page ?>">
<table width=100% cellpadding=4 cellspacing=0>
<tr>
<td width=10%><a href='<?=$_SERVER[PHP_SELF]?>'>처음</a></td>
<td width=10%><a href='<?=$_SERVER['PHP_SELF']?>'>처음</a></td>
<td width=80% align=center>
<!-- <input type=button value='주문' class=btn1 onclick="location.href='<?="$_SERVER[PHP_SELF]?sort1=$sort1&sort2=$sort2&sel_field=ct_status&search=주문"?>'">
<input type=button value='준비' class=btn1 onclick="location.href='<?="$_SERVER[PHP_SELF]?sort1=$sort1&sort2=$sort2&sel_field=ct_status&search=준비"?>'">
@ -91,13 +91,13 @@ $qstr = "$qstr1&sort1=$sort1&sort2=$sort2&page=$page";
<input type=button value='반품' class=btn1 onclick="location.href='<?="$_SERVER[PHP_SELF]?sort1=$sort1&sort2=$sort2&sel_field=ct_status&search=반품"?>'">
<input type=button value='품절' class=btn1 onclick="location.href='<?="$_SERVER[PHP_SELF]?sort1=$sort1&sort2=$sort2&sel_field=ct_status&search=품절"?>'"> -->
<!-- utf-8 에서 처리되도록 변경 -->
<input type=button value='주문' class=btn1 onclick="location.href='<?="$_SERVER[PHP_SELF]?sort1=$sort1&sort2=$sort2&sel_field=ct_status&search=".urlencode('주문')?>'">
<input type=button value='준비' class=btn1 onclick="location.href='<?="$_SERVER[PHP_SELF]?sort1=$sort1&sort2=$sort2&sel_field=ct_status&search=".urlencode('준비')?>'">
<input type=button value='배송' class=btn1 onclick="location.href='<?="$_SERVER[PHP_SELF]?sort1=$sort1&sort2=$sort2&sel_field=ct_status&search=".urlencode('배송')?>'">
<input type=button value='완료' class=btn1 onclick="location.href='<?="$_SERVER[PHP_SELF]?sort1=$sort1&sort2=$sort2&sel_field=ct_status&search=".urlencode('완료')?>'">
<input type=button value='취소' class=btn1 onclick="location.href='<?="$_SERVER[PHP_SELF]?sort1=$sort1&sort2=$sort2&sel_field=ct_status&search=".urlencode('취소')?>'">
<input type=button value='반품' class=btn1 onclick="location.href='<?="$_SERVER[PHP_SELF]?sort1=$sort1&sort2=$sort2&sel_field=ct_status&search=".urlencode('반품')?>'">
<input type=button value='품절' class=btn1 onclick="location.href='<?="$_SERVER[PHP_SELF]?sort1=$sort1&sort2=$sort2&sel_field=ct_status&search=".urlencode('품절')?>'">
<input type=button value='주문' class=btn1 onclick="location.href='<?=$_SERVER['PHP_SELF']."?sort1=$sort1&sort2=$sort2&sel_field=ct_status&search=".urlencode('주문')?>'">
<input type=button value='준비' class=btn1 onclick="location.href='<?=$_SERVER['PHP_SELF']."?sort1=$sort1&sort2=$sort2&sel_field=ct_status&search=".urlencode('준비')?>'">
<input type=button value='배송' class=btn1 onclick="location.href='<?=$_SERVER['PHP_SELF']."?sort1=$sort1&sort2=$sort2&sel_field=ct_status&search=".urlencode('배송')?>'">
<input type=button value='완료' class=btn1 onclick="location.href='<?=$_SERVER['PHP_SELF']."?sort1=$sort1&sort2=$sort2&sel_field=ct_status&search=".urlencode('완료')?>'">
<input type=button value='취소' class=btn1 onclick="location.href='<?=$_SERVER['PHP_SELF']."?sort1=$sort1&sort2=$sort2&sel_field=ct_status&search=".urlencode('취소')?>'">
<input type=button value='반품' class=btn1 onclick="location.href='<?=$_SERVER['PHP_SELF']."?sort1=$sort1&sort2=$sort2&sel_field=ct_status&search=".urlencode('반품')?>'">
<input type=button value='품절' class=btn1 onclick="location.href='<?=$_SERVER['PHP_SELF']."?sort1=$sort1&sort2=$sort2&sel_field=ct_status&search=".urlencode('품절')?>'">
&nbsp;
<select name=sel_field>
<option value='od_id'>주문번호
@ -110,7 +110,7 @@ $qstr = "$qstr1&sort1=$sort1&sort2=$sort2&page=$page";
</select>
<input type=hidden name=save_search value='<?=$search?>'>
<input type=text name=search value='<? echo $search ?>' autocomplete="off">
<input type=image src='<?=$g4[admin_path]?>/img/btn_search.gif' align=absmiddle>
<input type=image src='<?=G4_ADMIN_URL?>/img/btn_search.gif' align=absmiddle>
</td>
<td width=10% align=right>건수 : <? echo $total_count ?>&nbsp;</td>
</tr>
@ -150,35 +150,35 @@ $qstr = "$qstr1&sort1=$sort1&sort2=$sort2&page=$page";
for ($i=0; $row=sql_fetch_array($result); $i++) {
$od_deposit_name = "";
if ($row[od_deposit_name] != "")
$od_deposit_name = "title='입금자 : $row[od_deposit_name]'";
if ($row['od_deposit_name'] != "")
$od_deposit_name = "title='입금자 : {$row['od_deposit_name']}'";
$href = "$_SERVER[PHP_SELF]?sort1=$sort1&sort2=$sort2&sel_field=c.it_id&search=$row[it_id]";
$it_name = "<a href='$href'>".cut_str($row[it_name],35)."</a><br>";
$it_name .= print_item_options($row[it_id], $row[it_opt1], $row[it_opt2], $row[it_opt3], $row[it_opt4], $row[it_opt5], $row[it_opt6]);
$it_name = "<a href='$href'>".cut_str($row['it_name'],35)."</a><br>";
$it_name .= print_item_options($row['it_id'], $row['it_opt1'], $row['it_opt2'], $row['it_opt3'], $row['it_opt4'], $row['it_opt5'], $row['it_opt6']);
$s_mod = icon("수정", "./orderform.php?od_id=$row[od_id]");
$s_mod = icon("수정", "./orderform.php?od_id={$row['od_id']}");
$list = $i%2;
echo "
<tr class='list$list center'>
<td align=center title='주문일시 : $row[od_time]'><a href='$_SERVER[PHP_SELF]?sort1=$sort1&sort2=$sort2&sel_field=od_id&search=$row[od_id]'>$row[od_id]</a></td>
<td align=center $od_deposit_name><a href='$_SERVER[PHP_SELF]?sort1=$sort1&sort2=$sort2&sel_field=od_name&search=$row[od_name]'>".cut_str($row[od_name],10,"")."</a></td>
<td align=center><a href='$_SERVER[PHP_SELF]?sort1=$sort1&sort2=$sort2&sel_field=mb_id&search=$row[mb_id]'>$row[mb_id]</a></td>
<td style='padding-top:5px; padding-bottom:5px;'><a href='$href'>".get_it_image("{$row[it_id]}_s", 50, 50)."</a></td>
<td align=center title='주문일시 : {$row['od_time']}'><a href='{$_SERVER['PHP_SELF']}?sort1=$sort1&sort2=$sort2&sel_field=od_id&search={$row['od_id']}'>{$row['od_id']}</a></td>
<td align=center $od_deposit_name><a href='{$_SERVER['PHP_SELF']}?sort1=$sort1&sort2=$sort2&sel_field=od_name&search={$row['od_name']}'>".cut_str($row['od_name'],10,"")."</a></td>
<td align=center><a href='{$_SERVER['PHP_SELF']}?sort1=$sort1&sort2=$sort2&sel_field=mb_id&search={$row['mb_id']}'>{$row['mb_id']}</a></td>
<td style='padding-top:5px; padding-bottom:5px;'><a href='$href'>".get_it_image($row['it_id'].'_s', 50, 50)."</a></td>
<td align=left>$it_name</td>
<td align=right>".number_format($row[ct_amount])."&nbsp;</td>
<td align=right>".number_format($row['ct_amount'])."&nbsp;</td>
<td align=center>$row[ct_qty]</td>
<td align=right>".number_format($row[ct_sub_amount])."&nbsp;</td>
<td align=right>".number_format($row[ct_sub_point])."&nbsp;</td>
<td align=center><a href='$_SERVER[PHP_SELF]?sort1=$sort1&sort2=$sort2&sel_field=ct_status&search=$row[ct_status]'>$row[ct_status]</a></td>
<td align=right>".number_format($row['ct_sub_amount'])."&nbsp;</td>
<td align=right>".number_format($row['ct_sub_point'])."&nbsp;</td>
<td align=center><a href='{$_SERVER['PHP_SELF']}?sort1=$sort1&sort2=$sort2&sel_field=ct_status&search={$row['ct_status']}'>{$row['ct_status']}</a></td>
<td align=center>$s_mod</td>
</tr>";
$tot_amount += $row[ct_amount];
$tot_qty += $row[ct_qty];
$tot_sub_amount += $row[ct_sub_amount];
$tot_sub_point += $row[ct_sub_point];
$tot_amount += $row['ct_amount'];
$tot_qty += $row['ct_qty'];
$tot_sub_amount += $row['ct_sub_amount'];
$tot_sub_point += $row['ct_sub_point'];
}
if ($i == 0)
@ -199,7 +199,7 @@ if ($i == 0)
<table width=100%>
<tr>
<td width=50%>&nbsp;</td>
<td width=50% align=right><?=get_paging($config[cf_write_pages], $page, $total_page, "$_SERVER[PHP_SELF]?$qstr&page=");?></td>
<td width=50% align=right><?=get_paging($config['cf_write_pages'], $page, $total_page, "{$_SERVER['PHP_SELF']}?$qstr&page=");?></td>
</tr>
</table>
</form>
@ -211,5 +211,5 @@ f.sel_field.value = '<? echo $sel_field ?>';
</script>
<?
include_once ("$g4[admin_path]/admin.tail.php");
include_once (G4_ADMIN_PATH.'/admin.tail.php');
?>

View File

@ -1,14 +1,14 @@
<?
$sub_menu = "500210";
include_once("./_common.php");
$sub_menu = '500210';
include_once('./_common.php');
auth_check($auth[$sub_menu], "r");
$g4[title] = "가격비교사이트 연동";
include_once ("$g4[admin_path]/admin.head.php");
$g4['title'] = '가격비교사이트 연동';
include_once (G4_ADMIN_PATH.'/admin.head.php');
?>
<?=subtitle($g4[title])?>
<?=subtitle($g4['title'])?>
<p align=lh>
사용하실 가격비교사이트에 입점하신 후 해당하는 <B>엔진페이지 URL</B> 을 해당 사이트에 알려주시면 됩니다.
@ -16,25 +16,25 @@ include_once ("$g4[admin_path]/admin.head.php");
<li><b>네이버 지식쇼핑 (<a href="http://shopping.naver.com/" target=_blank>http://shopping.naver.com/</a>)</b>
<ul>
<li>입점 안내 : <a href="http://shopping.naver.com/join/index.nhn" target=_blank>http://shopping.naver.com/join/index.nhn</a>
<li>전체상품 URL : <a href="<?=$g4[shop_url]?>/price/naver.php" target=_blank><?=$g4[shop_url]?>/price/naver.php</a>
<li>요약상품 URL : <a href="<?=$g4[shop_url]?>/price/naver_summary.php" target=_blank><?=$g4[shop_url]?>/price/naver_summary.php</a>
<li>신규상품 URL : <a href="<?=$g4[shop_url]?>/price/naver_new.php" target=_blank><?=$g4[shop_url]?>/price/naver_new.php</a>
<li>신규요약 URL : <a href="<?=$g4[shop_url]?>/price/naver_new_summary.php" target=_blank><?=$g4[shop_url]?>/price/naver_new_summary.php</a>
<li>전체상품 URL : <a href="<?=G4_SHOP_URL?>/price/naver.php" target=_blank><?=G4_SHOP_URL?>/price/naver.php</a>
<li>요약상품 URL : <a href="<?=G4_SHOP_URL?>/price/naver_summary.php" target=_blank><?=G4_SHOP_URL?>/price/naver_summary.php</a>
<li>신규상품 URL : <a href="<?=G4_SHOP_URL?>/price/naver_new.php" target=_blank><?=G4_SHOP_URL?>/price/naver_new.php</a>
<li>신규요약 URL : <a href="<?=G4_SHOP_URL?>/price/naver_new_summary.php" target=_blank><?=G4_SHOP_URL?>/price/naver_new_summary.php</a>
</ul>
</li><br>
<li><b>다음 쇼핑하우 (<a href="http://shopping.daum.net/" target=_blank>http://shopping.daum.net/</a>)</b>
<ul>
<li>입점 안내 : <a href="http://commerceone.biz.daum.net/join/intro.daum" target=_blank>http://commerceone.biz.daum.net/join/intro.daum</a>
<li>전체상품 URL : <a href="<?=$g4[shop_url]?>/price/daum.php" target=_blank><?=$g4[shop_url]?>/price/daum.php</a>
<li>전체상품 URL : <a href="<?=G4_SHOP_URL?>/price/daum.php" target=_blank><?=G4_SHOP_URL?>/price/daum.php</a>
</ul>
</li><br>
<li><b>어바웃 (<a href="http://www.about.co.kr/" target=_blank>http://www.about.co.kr/</a>)</b>
<ul>
<li>입점 안내 : <a href="http://member.about.co.kr/LaunchIntroduce/Default.aspx" target=_blank>http://member.about.co.kr/LaunchIntroduce/Default.aspx</a>
<li>전체EP URL : <a href="<?=$g4[shop_url]?>/price/about.php" target=_blank><?=$g4[shop_url]?>/price/about.php</a>
<li>요약EP URL : <a href="<?=$g4[shop_url]?>/price/about_new.php" target=_blank><?=$g4[shop_url]?>/price/about_new.php</a>
<li>전체EP URL : <a href="<?=G4_SHOP_URL?>/price/about.php" target=_blank><?=G4_SHOP_URL?>/price/about.php</a>
<li>요약EP URL : <a href="<?=G4_SHOP_URL?>/price/about_new.php" target=_blank><?=G4_SHOP_URL?>/price/about_new.php</a>
</ul>
</li><br>
@ -42,10 +42,10 @@ include_once ("$g4[admin_path]/admin.head.php");
<li><b>옥션 오픈쇼핑 (<a href="http://openshopping.auction.co.kr/" target=_blank>http://openshopping.auction.co.kr/</a>)</b>
<ul>
<li>입점 안내 : <a href="http://openshopping.auction.co.kr/customer/shopinfo/shop_info.asp" target=_blank>http://openshopping.auction.co.kr/customer/shopinfo/shop_info.asp</a>
<!-- <li>상품DB파일 URL : <a href="<?=$g4[shop_url]?>/price/auction.php" target=_blank><?=$g4[shop_url]?>/price/auction.php</a> -->
<li>전체상품 URL : <a href="<?=$g4[shop_url]?>/price/auction.php" target=_blank><?=$g4[shop_url]?>/price/auction.php</a>
<li>요약상품 URL : <a href="<?=$g4[shop_url]?>/price/auction_summary.php" target=_blank><?=$g4[shop_url]?>/price/auction_summary.php</a>
<li>신규상품 URL : <a href="<?=$g4[shop_url]?>/price/auction_new.php" target=_blank><?=$g4[shop_url]?>/price/auction_new.php</a>
<!-- <li>상품DB파일 URL : <a href="<?=G4_SHOP_URL?>/price/auction.php" target=_blank><?=G4_SHOP_URL?>/price/auction.php</a> -->
<li>전체상품 URL : <a href="<?=G4_SHOP_URL?>/price/auction.php" target=_blank><?=G4_SHOP_URL?>/price/auction.php</a>
<li>요약상품 URL : <a href="<?=G4_SHOP_URL?>/price/auction_summary.php" target=_blank><?=G4_SHOP_URL?>/price/auction_summary.php</a>
<li>신규상품 URL : <a href="<?=G4_SHOP_URL?>/price/auction_new.php" target=_blank><?=G4_SHOP_URL?>/price/auction_new.php</a>
</ul>
</li><br>
<? */ ?>
@ -53,53 +53,53 @@ include_once ("$g4[admin_path]/admin.head.php");
<li><b>다나와 (<a href="http://www.danawa.co.kr" target=_blank>http://www.danawa.co.kr</a>)</b>
<ul>
<li>입점 안내 : <a href="http://pc.danawa.com/contact/contactus.html" target=_blank>http://pc.danawa.com/contact/contactus.html</a>
<li>엔진페이지 URL : <a href="<?=$g4[shop_url]?>/price/danawa.php" target=_blank><?=$g4[shop_url]?>/price/danawa.php</a>
<li>엔진페이지 URL : <a href="<?=G4_SHOP_URL?>/price/danawa.php" target=_blank><?=G4_SHOP_URL?>/price/danawa.php</a>
</ul>
</li><br>
<li><b>비비 (<a href="http://www.bb.co.kr" target=_blank>http://www.bb.co.kr</a>)</b>
<ul>
<li>입점 안내 : <a href="http://www.bb.co.kr/mainbbr/regist/entry_kcp1.php?partner=kcp" target=_blank>http://www.bb.co.kr/mainbbr/regist/entry_kcp1.php?partner=kcp</a>
<li>엔진페이지 URL : <a href="<?=$g4[shop_url]?>/price/bb.php" target=_blank><?=$g4[shop_url]?>/price/bb.php</a>
<li>엔진페이지 URL : <a href="<?=G4_SHOP_URL?>/price/bb.php" target=_blank><?=G4_SHOP_URL?>/price/bb.php</a>
</ul>
</li><br>
<li><b>에누리 (<a href="http://www.enuri.com" target=_blank>http://www.enuri.com</a>)</b>
<ul>
<li>입점 안내 : <a href="http://www.enuri.com/MallRegister/MallRegister.asp" target=_blank>http://www.enuri.com/MallRegister/MallRegister.asp</a>
<li>엔진페이지 URL : <a href="<?=$g4[shop_url]?>/price/enuri_list.php" target=_blank><?=$g4[shop_url]?>/price/enuri_list.php</a>
<li>엔진페이지 URL : <a href="<?=G4_SHOP_URL?>/price/enuri_list.php" target=_blank><?=G4_SHOP_URL?>/price/enuri_list.php</a>
</ul>
</li><br>
<li><b>마이마진 (<a href="http://www.mymargin.com" target=_blank>http://www.mymargin.com</a>)</b>
<ul>
<li>입점 안내 : <a href="http://www.mymargin.com/shop_admin/reg/process_su.asp" target=_blank>http://www.mymargin.com/shop_admin/reg/process_su.asp</a>
<li>엔진페이지 URL : <a href="<?=$g4[shop_url]?>/price/mymargin.php" target=_blank><?=$g4[shop_url]?>/price/mymargin.php</a>
<li>엔진페이지 URL : <a href="<?=G4_SHOP_URL?>/price/mymargin.php" target=_blank><?=G4_SHOP_URL?>/price/mymargin.php</a>
</ul>
</li><br>
<li><b>오미 (<a href="http://www.omi.co.kr" target=_blank>http://www.omi.co.kr</a>)</b>
<ul>
<li>입점 안내 : <a href="http://www.omi.co.kr/regist/shoppingmall.asp" target=_blank>http://www.omi.co.kr/regist/shoppingmall.asp</a>
<li>엔진페이지 URL : <a href="<?=$g4[shop_url]?>/price/omi_ufo.php" target=_blank><?=$g4[shop_url]?>/price/omi_ufo.php</a>
<li>엔진페이지 URL : <a href="<?=G4_SHOP_URL?>/price/omi_ufo.php" target=_blank><?=G4_SHOP_URL?>/price/omi_ufo.php</a>
</ul>
</li><br>
<li><b>샵바인더 (<a href="http://www.shopbinder.com" target=_blank>http://www.shopbinder.com</a>)</b>
<ul>
<li>입점 안내 : <a href="http://www.shopbinder.com/guide/regist.asp" target=_blank>http://www.shopbinder.com/guide/regist.asp</a>
<li>엔진페이지 URL : <a href="<?=$g4[shop_url]?>/price/shopbinder.php" target=_blank><?=$g4[shop_url]?>/price/shopbinder.php</a>
<li>엔진페이지 URL : <a href="<?=G4_SHOP_URL?>/price/shopbinder.php" target=_blank><?=G4_SHOP_URL?>/price/shopbinder.php</a>
</ul>
</li><br>
<li><b>mym 야비스 (<a href="http://yavis.nate.com/" target=_blank>http://yavis.nate.com/</a>)</b>
<ul>
<li>입점 안내 : <a href="http://search.nate.com/yavis/search.asp?ta=front/help_guide" target=_blank>http://search.nate.com/yavis/search.asp?ta=front/help_guide</a>
<li>엔진페이지 URL : <a href="<?=$g4[shop_url]?>/price/yavis.php" target=_blank><?=$g4[shop_url]?>/price/yavis.php</a>
<li>엔진페이지 URL : <a href="<?=G4_SHOP_URL?>/price/yavis.php" target=_blank><?=G4_SHOP_URL?>/price/yavis.php</a>
</ul>
</li><br>
</ul>
<?
include_once ("$g4[admin_path]/admin.tail.php");
include_once (G4_ADMIN_PATH.'/admin.tail.php');
?>

View File

@ -1,14 +1,14 @@
<?
$sub_menu = "500110";
include_once("./_common.php");
$sub_menu = '500110';
include_once('./_common.php');
auth_check($auth[$sub_menu], "r");
$g4[title] = "매출현황";
include_once ("$g4[admin_path]/admin.head.php");
$g4['title'] = '매출현황';
include_once (G4_ADMIN_PATH.'/admin.head.php');
?>
<?=subtitle($g4[title])?>
<?=subtitle($g4['title'])?>
<table cellpadding=0 cellspacing=0 border=0>
<colgroup width=150></colgroup>
@ -18,7 +18,7 @@ include_once ("$g4[admin_path]/admin.head.php");
<form name=frm_sale_today action='./sale1today.php'>
<td>당일 매출현황</td>
<td align=right>
<input type=text name=date size=8 maxlength=8 value='<? echo date("Ymd", $g4['server_time']) ?>' class=ed>
<input type=text name=date size=8 maxlength=8 value='<? echo date("Ymd", G4_SERVER_TIME) ?>' class=ed>
일 하루
<input type=submit class=btn1 value=' 확 인 '>
</td>
@ -29,9 +29,9 @@ include_once ("$g4[admin_path]/admin.head.php");
<form name=frm_sale_date action='./sale1date.php'>
<td>일별 매출현황</td>
<td align=right>
<input type=text name=fr_date size=8 maxlength=8 value='<? echo date("Ym01", $g4['server_time']) ?>' class=ed>
<input type=text name=fr_date size=8 maxlength=8 value='<? echo date("Ym01", G4_SERVER_TIME) ?>' class=ed>
일 부터
<input type=text name=to_date size=8 maxlength=8 value='<? echo date("Ymd", $g4['server_time']) ?>' class=ed>
<input type=text name=to_date size=8 maxlength=8 value='<? echo date("Ymd", G4_SERVER_TIME) ?>' class=ed>
일 까지
<input type=submit class=btn1 value=' 확 인 '>
</td>
@ -42,9 +42,9 @@ include_once ("$g4[admin_path]/admin.head.php");
<form name=frm_sale_month action='./sale1month.php'>
<td>월별 매출현황</td>
<td align=right>
<input type=text name=fr_date size=6 maxlength=6 value='<? echo date("Y01", $g4['server_time']) ?>' class=ed>
<input type=text name=fr_date size=6 maxlength=6 value='<? echo date("Y01", G4_SERVER_TIME) ?>' class=ed>
월 부터
<input type=text name=to_date size=6 maxlength=6 value='<? echo date("Ym", $g4['server_time']) ?>' class=ed>
<input type=text name=to_date size=6 maxlength=6 value='<? echo date("Ym", G4_SERVER_TIME) ?>' class=ed>
월 까지
<input type=submit class=btn1 value=' 확 인 '>
</td>
@ -55,9 +55,9 @@ include_once ("$g4[admin_path]/admin.head.php");
<form name=frm_sale_year action='./sale1year.php'>
<td>연별 매출현황</td>
<td align=right>
<input type=text name=fr_date size=4 maxlength=4 value='<? echo date("Y", $g4['server_time'])-1 ?>' class=ed>
<input type=text name=fr_date size=4 maxlength=4 value='<? echo date("Y", G4_SERVER_TIME)-1 ?>' class=ed>
년 부터
<input type=text name=to_date size=4 maxlength=4 value='<? echo date("Y", $g4['server_time']) ?>' class=ed>
<input type=text name=to_date size=4 maxlength=4 value='<? echo date("Y", G4_SERVER_TIME) ?>' class=ed>
년 까지
<input type=submit class=btn1 value=' 확 인 '>
</td>
@ -67,5 +67,5 @@ include_once ("$g4[admin_path]/admin.head.php");
</table>
<?
include_once ("$g4[admin_path]/admin.tail.php");
include_once (G4_ADMIN_PATH.'/admin.tail.php');
?>

View File

@ -1,14 +1,14 @@
<?
$sub_menu = "500110";
include_once("./_common.php");
$sub_menu = '500110';
include_once('./_common.php');
auth_check($auth[$sub_menu], "r");
$fr_date = preg_replace("/([0-9]{4})([0-9]{2})([0-9]{2})/", "\\1-\\2-\\3", $fr_date);
$to_date = preg_replace("/([0-9]{4})([0-9]{2})([0-9]{2})/", "\\1-\\2-\\3", $to_date);
$g4[title] = "$fr_date ~ $to_date 매출현황";
include_once ("$g4[admin_path]/admin.head.php");
$g4['title'] = "$fr_date ~ $to_date 매출현황";
include_once (G4_ADMIN_PATH.'/admin.head.php');
function print_line($save)
{
@ -18,24 +18,24 @@ function print_line($save)
if ($count++ > 0)
echo "<tr><td colspan=9 height=1 bgcolor=#EEEEEE></td></tr>\n";
$date = preg_replace("/-/", "", $save[od_date]);
$date = preg_replace("/-/", "", $save['od_date']);
echo "
<tr class=ht>
<td align=center><a href='./sale1today.php?date=$date'>$save[od_date]</a></td>
<td align=center>".number_format($save[ordercount])."</td>
<td align=right >".number_format($save[orderamount])."</td>
<td align=right >".number_format($save[ordercancel] + $save[dc])."</td>
<td align=right >".number_format($save[receiptbank])."</td>
<td align=right >".number_format($save[receiptcard])."</td>
<td align=right >".number_format($save[receiptpoint])."</td>
<td align=right >".number_format($save[receiptcancel])."</td>
<td align=right >".number_format($save[misu])."</td>
<td align=center><a href='./sale1today.php?date=$date'>{$save['od_date']}</a></td>
<td align=center>".number_format($save['ordercount'])."</td>
<td align=right >".number_format($save['orderamount'])."</td>
<td align=right >".number_format($save['ordercancel'] + $save['dc'])."</td>
<td align=right >".number_format($save['receiptbank'])."</td>
<td align=right >".number_format($save['receiptcard'])."</td>
<td align=right >".number_format($save['receiptpoint'])."</td>
<td align=right >".number_format($save['receiptcancel'])."</td>
<td align=right >".number_format($save['misu'])."</td>
</tr>\n";
}
?>
<?=subtitle($g4[title])?>
<?=subtitle($g4['title'])?>
<table cellpadding=0 cellspacing=0 width=100%>
<tr><td colspan=9 height=2 bgcolor=#0E87F9></td></tr>
@ -63,51 +63,51 @@ $sql = " select on_uid,
od_dc_amount,
(od_receipt_bank + od_receipt_card + od_receipt_point) as receiptamount,
(od_refund_amount + od_cancel_card) as receiptcancel
from $g4[yc4_order_table]
where SUBSTRING(od_time,1,10) between '$fr_date' and '$to_date'
from {$g4['yc4_order_table']}
where SUBSTRING(od_time,1,10) between '$fr_date' and '$to_date'
order by od_time desc ";
$result = sql_query($sql);
for ($i=0; $row=mysql_fetch_array($result); $i++)
{
if ($i == 0)
$save[od_date] = $row[od_date];
$save['od_date'] = $row['od_date'];
if ($save[od_date] != $row[od_date]) {
if ($save['od_date'] != $row['od_date']) {
print_line($save);
unset($save);
$save[od_date] = $row[od_date];
$save['od_date'] = $row['od_date'];
}
// 장바구니 상태별 금액
$sql1 = " select (SUM(ct_amount * ct_qty)) as orderamount, /* 주문합계 */
(SUM(IF(ct_status = '취소' OR ct_status = '반품' OR ct_status = '품절', ct_amount * ct_qty, 0))) as ordercancel /* 주문취소 */
from $g4[yc4_cart_table]
where on_uid = '$row[on_uid]' ";
from {$g4['yc4_cart_table']}
where on_uid = '{$row['on_uid']}' ";
$row1 = sql_fetch($sql1);
$row1[orderamount] += $row[od_send_cost];
$misu = $row1[orderamount] - $row1[ordercancel] - $row[od_dc_amount] - $row[receiptamount] + $row[receiptcancel];
$row1['orderamount'] += $row['od_send_cost'];
$misu = $row1['orderamount'] - $row1['ordercancel'] - $row['od_dc_amount'] - $row['receiptamount'] + $row['receiptcancel'];
$save[ordercount]++;
$save[orderamount] += $row1[orderamount];
$save[ordercancel] += $row1[ordercancel];
$save[dc] += $row[od_dc_amount];
$save[receiptbank] += $row[od_receipt_bank];
$save[receiptcard] += $row[od_receipt_card];
$save[receiptpoint] += $row[od_receipt_point];
$save[receiptcancel] += $row[receiptcancel];
$save[misu] += $misu;
$save['ordercount']++;
$save['orderamount'] += $row1['orderamount'];
$save['ordercancel'] += $row1['ordercancel'];
$save['dc'] += $row['od_dc_amount'];
$save['receiptbank'] += $row['od_receipt_bank'];
$save['receiptcard'] += $row['od_receipt_card'];
$save['receiptpoint'] += $row['od_receipt_point'];
$save['receiptcancel'] += $row['receiptcancel'];
$save['misu'] += $misu;
$tot[ordercount]++;
$tot[orderamount] += $row1[orderamount];
$tot[ordercancel] += $row1[ordercancel];
$tot[dc] += $row[od_dc_amount];
$tot[receiptbank] += $row[od_receipt_bank];
$tot[receiptcard] += $row[od_receipt_card];
$tot[receiptpoint ] += $row[od_receipt_point];
$tot[receiptamount] += $row[receiptamount];
$tot[receiptcancel] += $row[receiptcancel];
$tot[misu] += $misu;
$tot['ordercount']++;
$tot['orderamount'] += $row1['orderamount'];
$tot['ordercancel'] += $row1['ordercancel'];
$tot['dc'] += $row['od_dc_amount'];
$tot['receiptbank'] += $row['od_receipt_bank'];
$tot['receiptcard'] += $row['od_receipt_card'];
$tot['receiptpoint '] += $row['od_receipt_point'];
$tot['receiptamount'] += $row['receiptamount'];
$tot['receiptcancel'] += $row['receiptcancel'];
$tot['misu'] += $misu;
}
if ($i == 0) {
@ -119,18 +119,18 @@ if ($i == 0) {
<tr><td colspan=9 height=1 bgcolor=#CCCCCC></td></tr>
<tr class=ht>
<td align=center>합 계</td>
<td align=center><?=number_format($tot[ordercount])?></td>
<td align=right ><?=number_format($tot[orderamount])?></td>
<td align=right ><?=number_format($tot[ordercancel] + $tot[dc])?></td>
<td align=right ><?=number_format($tot[receiptbank])?></td>
<td align=right ><?=number_format($tot[receiptcard])?></td>
<td align=right ><?=number_format($tot[receiptpoint])?></td>
<td align=right ><?=number_format($tot[receiptcancel])?></td>
<td align=right ><?=number_format($tot[misu])?></td>
<td align=center><?=number_format($tot['ordercount'])?></td>
<td align=right ><?=number_format($tot['orderamount'])?></td>
<td align=right ><?=number_format($tot['ordercancel'] + $tot['dc'])?></td>
<td align=right ><?=number_format($tot['receiptbank'])?></td>
<td align=right ><?=number_format($tot['receiptcard'])?></td>
<td align=right ><?=number_format($tot['receiptpoint'])?></td>
<td align=right ><?=number_format($tot['receiptcancel'])?></td>
<td align=right ><?=number_format($tot['misu'])?></td>
</tr>
<tr><td colspan=9 height=1 bgcolor=#CCCCCC></td></tr>
</table>
<?
include_once ("$g4[admin_path]/admin.tail.php");
include_once (G4_ADMIN_PATH.'/admin.tail.php');
?>

View File

@ -1,14 +1,14 @@
<?
$sub_menu = "500110";
include_once("./_common.php");
$sub_menu = '500110';
include_once('./_common.php');
auth_check($auth[$sub_menu], "r");
$fr_date = preg_replace("/([0-9]{4})([0-9]{2})/", "\\1-\\2", $fr_date);
$to_date = preg_replace("/([0-9]{4})([0-9]{2})/", "\\1-\\2", $to_date);
$g4[title] = "$fr_date ~ $to_date 매출현황";
include_once ("$g4[admin_path]/admin.head.php");
$g4['title'] = "$fr_date ~ $to_date 매출현황";
include_once (G4_ADMIN_PATH.'/admin.head.php');
function print_line($save)
{
@ -18,24 +18,24 @@ function print_line($save)
if ($count++ > 0)
echo "<tr><td colspan=9 height=1 bgcolor=#EEEEEE></td></tr>\n";
$date = preg_replace("/-/", "", $save[od_date]);
$date = preg_replace("/-/", "", $save['od_date']);
echo "
<tr class=ht>
<td align=center><a href='./sale1date.php?fr_date={$date}01&to_date={$date}31'>$save[od_date]</a></td>
<td align=center>".number_format($save[ordercount])."</td>
<td align=right >".number_format($save[orderamount])."</td>
<td align=right >".number_format($save[ordercancel] + $save[dc])."</td>
<td align=right >".number_format($save[receiptbank])."</td>
<td align=right >".number_format($save[receiptcard])."</td>
<td align=right >".number_format($save[receiptpoint])."</td>
<td align=right >".number_format($save[receiptcancel])."</td>
<td align=right >".number_format($save[misu])."</td>
<td align=center>".number_format($save['ordercount'])."</td>
<td align=right >".number_format($save['orderamount'])."</td>
<td align=right >".number_format($save['ordercancel'] + $save['dc'])."</td>
<td align=right >".number_format($save['receiptbank'])."</td>
<td align=right >".number_format($save['receiptcard'])."</td>
<td align=right >".number_format($save['receiptpoint'])."</td>
<td align=right >".number_format($save['receiptcancel'])."</td>
<td align=right >".number_format($save['misu'])."</td>
</tr>\n";
}
?>
<?=subtitle($g4[title])?>
<?=subtitle($g4['title'])?>
<table cellpadding=0 cellspacing=0 width=100%>
<tr><td colspan=9 height=2 bgcolor=#0E87F9></td></tr>
@ -63,51 +63,51 @@ $sql = " select on_uid,
od_dc_amount,
(od_receipt_bank + od_receipt_card + od_receipt_point) as receiptamount,
(od_refund_amount + od_cancel_card) as receiptcancel
from $g4[yc4_order_table]
where SUBSTRING(od_time,1,7) between '$fr_date' and '$to_date'
from {$g4['yc4_order_table']}
where SUBSTRING(od_time,1,7) between '$fr_date' and '$to_date'
order by od_time desc ";
$result = sql_query($sql);
for ($i=0; $row=mysql_fetch_array($result); $i++)
{
if ($i == 0)
$save[od_date] = $row[od_date];
$save['od_date'] = $row['od_date'];
if ($save[od_date] != $row[od_date]) {
if ($save['od_date'] != $row['od_date']) {
print_line($save);
unset($save);
$save[od_date] = $row[od_date];
$save['od_date'] = $row['od_date'];
}
// 장바구니 상태별 금액
$sql1 = " select (SUM(ct_amount * ct_qty)) as orderamount, /* 주문합계 */
(SUM(IF(ct_status = '취소' OR ct_status = '반품' OR ct_status = '품절', ct_amount * ct_qty, 0))) as ordercancel /* 주문취소 */
from $g4[yc4_cart_table]
where on_uid = '$row[on_uid]' ";
from {$g4['yc4_cart_table']}
where on_uid = '{$row['on_uid']}' ";
$row1 = sql_fetch($sql1);
$row1[orderamount] += $row[od_send_cost];
$misu = $row1[orderamount] - $row1[ordercancel] - $row[od_dc_amount] - $row[receiptamount] + $row[receiptcancel];
$row1['orderamount'] += $row['od_send_cost'];
$misu = $row1['orderamount'] - $row1['ordercancel'] - $row['od_dc_amount'] - $row['receiptamount'] + $row['receiptcancel'];
$save[ordercount]++;
$save[orderamount] += $row1[orderamount];
$save[ordercancel] += $row1[ordercancel];
$save[dc] += $row[od_dc_amount];
$save[receiptbank] += $row[od_receipt_bank];
$save[receiptcard] += $row[od_receipt_card];
$save[receiptpoint] += $row[od_receipt_point];
$save[receiptcancel] += $row[receiptcancel];
$save[misu] += $misu;
$save['ordercount']++;
$save['orderamount'] += $row1['orderamount'];
$save['ordercancel'] += $row1['ordercancel'];
$save['dc'] += $row['od_dc_amount'];
$save['receiptbank'] += $row['od_receipt_bank'];
$save['receiptcard'] += $row['od_receipt_card'];
$save['receiptpoint'] += $row['od_receipt_point'];
$save['receiptcancel'] += $row['receiptcancel'];
$save['misu'] += $misu;
$tot[ordercount]++;
$tot[orderamount] += $row1[orderamount];
$tot[ordercancel] += $row1[ordercancel];
$tot[dc] += $row[od_dc_amount];
$tot[receiptbank] += $row[od_receipt_bank];
$tot[receiptcard] += $row[od_receipt_card];
$tot[receiptpoint] += $row[od_receipt_point];
$tot[receiptamount] += $row[receiptamount];
$tot[receiptcancel] += $row[receiptcancel];
$tot[misu] += $misu;
$tot['ordercount']++;
$tot['orderamount'] += $row1['orderamount'];
$tot['ordercancel'] += $row1['ordercancel'];
$tot['dc'] += $row['od_dc_amount'];
$tot['receiptbank'] += $row['od_receipt_bank'];
$tot['receiptcard'] += $row['od_receipt_card'];
$tot['receiptpoint'] += $row['od_receipt_point'];
$tot['receiptamount'] += $row['receiptamount'];
$tot['receiptcancel'] += $row['receiptcancel'];
$tot['misu'] += $misu;
}
if ($i == 0) {
@ -119,18 +119,18 @@ if ($i == 0) {
<tr><td colspan=9 height=1 bgcolor=#CCCCCC></td></tr>
<tr class=ht>
<td align=center>합 계</td>
<td align=center><?=number_format($tot[ordercount])?></td>
<td align=right ><?=number_format($tot[orderamount])?></td>
<td align=right ><?=number_format($tot[ordercancel] + $tot[dc])?></td>
<td align=right ><?=number_format($tot[receiptbank])?></td>
<td align=right ><?=number_format($tot[receiptcard])?></td>
<td align=right ><?=number_format($tot[receiptpoint])?></td>
<td align=right ><?=number_format($tot[receiptcancel])?></td>
<td align=right ><?=number_format($tot[misu])?></td>
<td align=center><?=number_format($tot['ordercount'])?></td>
<td align=right ><?=number_format($tot['orderamount'])?></td>
<td align=right ><?=number_format($tot['ordercancel'] + $tot['dc'])?></td>
<td align=right ><?=number_format($tot['receiptbank'])?></td>
<td align=right ><?=number_format($tot['receiptcard'])?></td>
<td align=right ><?=number_format($tot['receiptpoint'])?></td>
<td align=right ><?=number_format($tot['receiptcancel'])?></td>
<td align=right ><?=number_format($tot['misu'])?></td>
</tr>
<tr><td colspan=9 height=1 bgcolor=#CCCCCC></td></tr>
</table>
<?
include_once ("$g4[admin_path]/admin.tail.php");
include_once (G4_ADMIN_PATH.'/admin.tail.php');
?>

View File

@ -1,16 +1,16 @@
<?
$sub_menu = "500110";
include_once("./_common.php");
$sub_menu = '500110';
include_once('./_common.php');
auth_check($auth[$sub_menu], "r");
$date = preg_replace("/([0-9]{4})([0-9]{2})([0-9]{2})/", "\\1-\\2-\\3", $date);
$g4[title] = "$date 매출현황";
include_once ("$g4[admin_path]/admin.head.php");
$g4['title'] = "$date 매출현황";
include_once (G4_ADMIN_PATH.'/admin.head.php');
?>
<?=subtitle($g4[title])?>
<?=subtitle($g4['title'])?>
<table cellpadding=0 cellspacing=0 width=100%>
<tr><td colspan=9 height=2 bgcolor=#0E87F9></td></tr>
@ -29,8 +29,8 @@ include_once ("$g4[admin_path]/admin.head.php");
<?
unset($tot);
$sql = " select od_id,
mb_id,
od_name,
mb_id,
od_name,
on_uid,
od_send_cost,
od_receipt_bank,
@ -39,8 +39,8 @@ $sql = " select od_id,
od_dc_amount,
(od_receipt_bank + od_receipt_card + od_receipt_point) as receiptamount,
(od_refund_amount + od_cancel_card) as receiptcancel
from $g4[yc4_order_table]
where SUBSTRING(od_time,1,10) = '$date'
from {$g4['yc4_order_table']}
where SUBSTRING(od_time,1,10) = '$date'
order by od_id desc ";
$result = sql_query($sql);
for ($i=0; $row=mysql_fetch_array($result); $i++)
@ -51,41 +51,41 @@ for ($i=0; $row=mysql_fetch_array($result); $i++)
// 장바구니 상태별 금액
$sql1 = " select (SUM(ct_amount * ct_qty)) as orderamount, /* 주문합계 */
(SUM(IF(ct_status = '취소' OR ct_status = '반품' OR ct_status = '품절', ct_amount * ct_qty, 0))) as ordercancel /* 주문취소 */
from $g4[yc4_cart_table]
where on_uid = '$row[on_uid]' ";
from {$g4['yc4_cart_table']}
where on_uid = '{$row['on_uid']}' ";
$row1 = sql_fetch($sql1);
if ($row[mb_id] == "") { // 비회원일 경우는 주문자로 링크
$href = "<a href='./orderlist.php?sel_field=od_name&search=$row[od_name]'>";
if ($row['mb_id'] == '') { // 비회원일 경우는 주문자로 링크
$href = "<a href='./orderlist.php?sel_field=od_name&search={$row['od_name']}'>";
} else { // 회원일 경우는 회원아이디로 링크
$href = "<a href='./orderlist.php?sel_field=mb_id&search=$row[mb_id]'>";
$href = "<a href='./orderlist.php?sel_field=mb_id&search={$row['mb_id']}'>";
}
$row1[orderamount] += $row[od_send_cost];
$misu = $row1[orderamount] - $row1[ordercancel] - $row[od_dc_amount] - $row[receiptamount] + $row[receiptcancel];
$row1['orderamount'] += $row['od_send_cost'];
$misu = $row1['orderamount'] - $row1['ordercancel'] - $row['od_dc_amount'] - $row['receiptamount'] + $row['receiptcancel'];
echo "
<tr class=ht>
<td align=center><a href='./orderform.php?od_id=$row[od_id]'>$row[od_id]</a></td>
<td align=center>$href$row[od_name]</a></td>
<td align=right>".number_format($row1[orderamount])."</td>
<td align=right>".number_format($row1[ordercancel] + $row[od_dc_amount])."</td>
<td align=right>".number_format($row[od_receipt_bank])."</td>
<td align=right>".number_format($row[od_receipt_card])."</td>
<td align=right>".number_format($row[od_receipt_point])."</td>
<td align=right>".number_format($row[receiptcancel])."</td>
<td align=right>".number_format($row1['orderamount'])."</td>
<td align=right>".number_format($row1['ordercancel'] + $row['od_dc_amount'])."</td>
<td align=right>".number_format($row['od_receipt_bank'])."</td>
<td align=right>".number_format($row['od_receipt_card'])."</td>
<td align=right>".number_format($row['od_receipt_point'])."</td>
<td align=right>".number_format($row['receiptcancel'])."</td>
<td align=right>".number_format($misu)."</td>
</tr>\n";
$tot[orderamount] += $row1[orderamount];
$tot[ordercancel] += $row1[ordercancel];
$tot[dc] += $row[od_dc_amount];
$tot[receipt_bank] += $row[od_receipt_bank];
$tot[receipt_card] += $row[od_receipt_card];
$tot[receipt_point] += $row[od_receipt_point];
$tot[receiptamount] += $row[receiptamount];
$tot[receiptcancel] += $row[receiptcancel];
$tot[misu] += $misu;
$tot['orderamount'] += $row1['orderamount'];
$tot['ordercancel'] += $row1['ordercancel'];
$tot['dc'] += $row['od_dc_amount'];
$tot['receipt_bank'] += $row['od_receipt_bank'];
$tot['receipt_card'] += $row['od_receipt_card'];
$tot['receipt_point'] += $row['od_receipt_point'];
$tot['receiptamount'] += $row['receiptamount'];
$tot['receiptcancel'] += $row['receiptcancel'];
$tot['misu'] += $misu;
}
if ($i == 0) {
@ -95,17 +95,17 @@ if ($i == 0) {
<tr><td colspan=9 height=1 bgcolor=#CCCCCC></td></tr>
<tr class=ht>
<td align=center colspan=2>합 계</td>
<td align=right><?=number_format($tot[orderamount])?></td>
<td align=right><?=number_format($tot[ordercancel]+ $tot[dc])?></td>
<td align=right><?=number_format($tot[receipt_bank])?></td>
<td align=right><?=number_format($tot[receipt_card])?></td>
<td align=right><?=number_format($tot[receipt_point])?></td>
<td align=right><?=number_format($tot[receiptcancel])?></td>
<td align=right><?=number_format($tot[misu])?></td>
<td align=right><?=number_format($tot['orderamount'])?></td>
<td align=right><?=number_format($tot['ordercancel']+ $tot['dc'])?></td>
<td align=right><?=number_format($tot['receipt_bank'])?></td>
<td align=right><?=number_format($tot['receipt_card'])?></td>
<td align=right><?=number_format($tot['receipt_point'])?></td>
<td align=right><?=number_format($tot['receiptcancel'])?></td>
<td align=right><?=number_format($tot['misu'])?></td>
</tr>
<tr><td colspan=9 height=1 bgcolor=#CCCCCC></td></tr>
</table>
<?
include_once ("$g4[admin_path]/admin.tail.php");
include_once (G4_ADMIN_PATH.'/admin.tail.php');
?>

View File

@ -1,11 +1,11 @@
<?
$sub_menu = "500110";
include_once("./_common.php");
$sub_menu = '500110';
include_once('./_common.php');
auth_check($auth[$sub_menu], "r");
$g4[title] = "$fr_date ~ $to_date 매출현황";
include_once ("$g4[admin_path]/admin.head.php");
$g4['title'] = "$fr_date ~ $to_date 매출현황";
include_once (G4_ADMIN_PATH.'/admin.head.php');
function print_line($save)
{
@ -17,20 +17,20 @@ function print_line($save)
echo "
<tr class=ht>
<td align=center><a href='./sale1month.php?fr_date=$save[od_date]01&to_date=$save[od_date]12'>$save[od_date]</a></td>
<td align=center>".number_format($save[ordercount])."</td>
<td align=right >".number_format($save[orderamount])."</td>
<td align=right >".number_format($save[ordercancel] + $save[dc])."</td>
<td align=right >".number_format($save[receiptbank])."</td>
<td align=right >".number_format($save[receiptcard])."</td>
<td align=right >".number_format($save[receiptpoint])."</td>
<td align=right >".number_format($save[receiptcancel])."</td>
<td align=right >".number_format($save[misu])."</td>
<td align=center><a href='./sale1month.php?fr_date={$save['od_date']}01&to_date={$save['od_date']}12'>{$save['od_date']}</a></td>
<td align=center>".number_format($save['ordercount'])."</td>
<td align=right >".number_format($save['orderamount'])."</td>
<td align=right >".number_format($save['ordercancel'] + $save['dc'])."</td>
<td align=right >".number_format($save['receiptbank'])."</td>
<td align=right >".number_format($save['receiptcard'])."</td>
<td align=right >".number_format($save['receiptpoint'])."</td>
<td align=right >".number_format($save['receiptcancel'])."</td>
<td align=right >".number_format($save['misu'])."</td>
</tr>\n";
}
?>
<?=subtitle($g4[title])?>
<?=subtitle($g4['title'])?>
<table cellpadding=0 cellspacing=0 width=100%>
<tr><td colspan=9 height=2 bgcolor=#0E87F9></td></tr>
@ -58,51 +58,51 @@ $sql = " select on_uid,
od_dc_amount,
(od_receipt_bank + od_receipt_card + od_receipt_point) as receiptamount,
(od_refund_amount + od_cancel_card) as receiptcancel
from $g4[yc4_order_table]
where SUBSTRING(od_time,1,4) between '$fr_date' and '$to_date'
from {$g4['yc4_order_table']}
where SUBSTRING(od_time,1,4) between '$fr_date' and '$to_date'
order by od_time desc ";
$result = sql_query($sql);
for ($i=0; $row=mysql_fetch_array($result); $i++)
{
if ($i == 0)
$save[od_date] = $row[od_date];
$save['od_date'] = $row['od_date'];
if ($save[od_date] != $row[od_date]) {
if ($save['od_date'] != $row['od_date']) {
print_line($save);
unset($save);
$save[od_date] = $row[od_date];
$save['od_date'] = $row['od_date'];
}
// 장바구니 상태별 금액
$sql1 = " select (SUM(ct_amount * ct_qty)) as orderamount, /* 주문합계 */
(SUM(IF(ct_status = '취소' OR ct_status = '반품' OR ct_status = '품절', ct_amount * ct_qty, 0))) as ordercancel /* 주문취소 */
from $g4[yc4_cart_table]
where on_uid = '$row[on_uid]' ";
from {$g4['yc4_cart_table']}
where on_uid = '{$row['on_uid']}' ";
$row1 = sql_fetch($sql1);
$row1[orderamount] += $row[od_send_cost];
$misu = $row1[orderamount] - $row1[ordercancel] - $row[od_dc_amount] - $row[receiptamount] + $row[receiptcancel];
$row1['orderamount'] += $row['od_send_cost'];
$misu = $row1['orderamount'] - $row1['ordercancel'] - $row['od_dc_amount'] - $row['receiptamount'] + $row['receiptcancel'];
$save[ordercount]++;
$save[orderamount] += $row1[orderamount];
$save[ordercancel] += $row1[ordercancel];
$save[dc] += $row[od_dc_amount];
$save[receiptbank] += $row[od_receipt_bank];
$save[receiptcard] += $row[od_receipt_card];
$save[receiptpoint] += $row[od_receipt_point];
$save[receiptcancel] += $row[receiptcancel];
$save[misu] += $misu;
$save['ordercount']++;
$save['orderamount'] += $row1['orderamount'];
$save['ordercancel'] += $row1['ordercancel'];
$save['dc'] += $row['od_dc_amount'];
$save['receiptbank'] += $row['od_receipt_bank'];
$save['receiptcard'] += $row['od_receipt_card'];
$save['receiptpoint'] += $row['od_receipt_point'];
$save['receiptcancel'] += $row['receiptcancel'];
$save['misu'] += $misu;
$tot[ordercount]++;
$tot[orderamount] += $row1[orderamount];
$tot[ordercancel] += $row1[ordercancel];
$tot[dc] += $row[od_dc_amount];
$tot[receiptbank] += $row[od_receipt_bank];
$tot[receiptcard] += $row[od_receipt_card];
$tot[receiptpoint] += $row[od_receipt_point];
$tot[receiptamount] += $row[receiptamount];
$tot[receiptcancel] += $row[receiptcancel];
$tot[misu] += $misu;
$tot['ordercount']++;
$tot['orderamount'] += $row1['orderamount'];
$tot['ordercancel'] += $row1['ordercancel'];
$tot['dc'] += $row['od_dc_amount'];
$tot['receiptbank'] += $row['od_receipt_bank'];
$tot['receiptcard'] += $row['od_receipt_card'];
$tot['receiptpoint'] += $row['od_receipt_point'];
$tot['receiptamount'] += $row['receiptamount'];
$tot['receiptcancel'] += $row['receiptcancel'];
$tot['misu'] += $misu;
}
if ($i == 0) {
@ -114,18 +114,18 @@ if ($i == 0) {
<tr><td colspan=9 height=1 bgcolor=#CCCCCC></td></tr>
<tr class=ht>
<td align=center>합 계</td>
<td align=center><?=number_format($tot[ordercount])?></td>
<td align=right ><?=number_format($tot[orderamount])?></td>
<td align=right ><?=number_format($tot[ordercancel] + $tot[dc])?></td>
<td align=right ><?=number_format($tot[receiptbank])?></td>
<td align=right ><?=number_format($tot[receiptcard])?></td>
<td align=right ><?=number_format($tot[receiptpoint])?></td>
<td align=right ><?=number_format($tot[receiptcancel])?></td>
<td align=right ><?=number_format($tot[misu])?></td>
<td align=center><?=number_format($tot['ordercount'])?></td>
<td align=right ><?=number_format($tot['orderamount'])?></td>
<td align=right ><?=number_format($tot['ordercancel'] + $tot['dc'])?></td>
<td align=right ><?=number_format($tot['receiptbank'])?></td>
<td align=right ><?=number_format($tot['receiptcard'])?></td>
<td align=right ><?=number_format($tot['receiptpoint'])?></td>
<td align=right ><?=number_format($tot['receiptcancel'])?></td>
<td align=right ><?=number_format($tot['misu'])?></td>
</tr>
<tr><td colspan=9 height=1 bgcolor=#CCCCCC></td></tr>
</table>
<?
include_once ("$g4[admin_path]/admin.tail.php");
include_once (G4_ADMIN_PATH.'/admin.tail.php');
?>

View File

@ -1,17 +1,17 @@
<?
$sub_menu = "500200";
include_once("./_common.php");
$sub_menu = '500200';
include_once('./_common.php');
auth_check($auth[$sub_menu], "r");
$g4[title] = "SMS 문자전송";
include_once ("$g4[admin_path]/admin.head.php");
$g4['title'] = 'SMS 문자전송';
include_once (G4_ADMIN_PATH.'/admin.head.php');
// 발신자번호
$send_number = preg_replace("/[^0-9]/", "", $default[de_admin_company_tel]);
$send_number = preg_replace("/[^0-9]/", "", $default['de_admin_company_tel']);
?>
<?=subtitle($g4[title])?>
<?=subtitle($g4['title'])?>
<script language="JavaScript">
function byte_check(cont, bytes)
@ -69,7 +69,7 @@ var StrComma = "";
function tel_enter()
{
/*
if(window.event.keyCode ==13)
if(window.event.keyCode ==13)
{
receive_add();
}
@ -86,7 +86,7 @@ function receive_add()
var intCount = 0;
var strMobile = document.smsform.receive_input.value;
//strMobile = strMobile.replace("-", "", strMobile);
strMobile = strMobile.replace("-", "");
strMobile = strMobile.replace("-", "");
for (i = 0; i < document.smsform.receive_buffer.length; i++)
{
@ -205,7 +205,7 @@ function receive_alldel()
}
</script>
<? if ($default[de_sms_use] == "icode") { // 아이코드 사용 ?>
<? if ($default['de_sms_use'] == "icode") { // 아이코드 사용 ?>
<form action="./smssendicode.php" name="smsform" method=post autocomplete=off>
<input type="hidden" name="receive_number" value="">
<? } else { ?>
@ -329,13 +329,13 @@ document.smsform.reserved_day.value = '<?=date("j")?>';
function smsform_check(f)
{
<?
if (file_exists("$g4[path]/DEMO")) {
if (file_exists(G4_PATH.'/DEMO')) {
echo "alert('데모에서는 문자메세지를 발송할 수 없습니다.');";
echo "return;";
}
if ($default[de_sms_use] == "") {
if ($default['de_sms_use'] == "") {
echo "alert('우선 SMS 환경을 설정하여 주십시오.');";
echo "return;";
}
@ -359,5 +359,5 @@ function smsform_check(f)
<?
include_once ("$g4[admin_path]/admin.tail.php");
include_once (G4_ADMIN_PATH.'/admin.tail.php');
?>

View File

@ -1,7 +1,7 @@
<?
$sub_menu = "500200";
include_once("./_common.php");
include_once("$g4[path]/lib/icode.sms.lib.php");
$sub_menu = '500200';
include_once('./_common.php');
include_once(G4_LIB_PATH.'/icode.sms.lib.php');
auth_check($auth[$sub_menu], "w");
@ -14,13 +14,13 @@ $SMS->SMS_con($default['de_icode_server_ip'], $default['de_icode_id'], $default[
$recv = explode(",", $receive_number);
$tran_callback = preg_replace("/[^0-9]/", "", $send_number);
$sms_id = $default[de_icode_id];
$sms_id = $default['de_icode_id'];
$tran_msg = $sms_contents;
$tran_date = "";
if ($reserved_flag) // 예약전송
{
$tran_date = $reserved_year .
substr("0".$reserved_month, -2) .
$tran_date = $reserved_year .
substr("0".$reserved_month, -2) .
substr("0".$reserved_day, -2).
substr("0".$reserved_hour, -2).
substr("0".$reserved_minute, -2);
@ -33,20 +33,20 @@ for($i=0; $i<count($recv); $i++)
$result = $SMS->Add($tran_phone, $tran_callback, $sms_id, stripslashes($tran_msg), $tran_date);
}
$result = $SMS->Send();
if ($result)
if ($result)
{
//echo "SMS 서버에 접속했습니다.<br>";
$success = $fail = 0;
foreach($SMS->Result as $result)
foreach($SMS->Result as $result)
{
list($phone,$code)=explode(":",$result);
if ($code=="Error")
if ($code=="Error")
{
//echo $phone.'로 발송하는데 에러가 발생했습니다.<br>';
$msg .= $phone."로 발송하는데 에러가 발생했습니다.\\n";
$fail++;
}
else
}
else
{
//echo $phone."로 전송했습니다. (메시지번호:".$code.")<br>";
$success++;
@ -64,5 +64,5 @@ else
if (!$msg)
$msg = "정상적으로 전송하였습니다.";
alert($msg, "./smssend.php");
alert($msg, './smssend.php');
?>

View File

@ -1,12 +1,12 @@
<?
$sub_menu = "500200";
include_once("./_common.php");
$sub_menu = '500200';
include_once('./_common.php');
auth_check($auth[$sub_menu], "r");
// 로그를 남김
$fp = fopen("$g4[path]/data/log/sms.log", "a+");
$msg = "$now|$_SERVER[REMOTE_ADDR]|return_value=$return_value|success_value=$success_value|fail_value=$fail_value|";
$fp = fopen(G4_DATA_PATH.'/log/sms.log', "a+");
$msg = "$now|{$_SERVER['REMOTE_ADDR']}|return_value=$return_value|success_value=$success_value|fail_value=$fail_value|";
$msg .= "error_code=$error_code|error_msg=$error_msg|unique_num=$unique_num|";
$msg .= "process_type=$process_type|usrdata1=$usrdata1|usrdata2=$usrdata2|usrdata3=$usrdata3\n";
fwrite($fp, $msg);
@ -20,5 +20,5 @@ if ($return_value == 1) {
}
echo "</script>";
goto_url("./smssend.php");
goto_url('./smssend.php');
?>

View File

@ -1,23 +1,23 @@
<?
$sub_menu = "500140";
include_once("./_common.php");
$sub_menu = '500140';
include_once('./_common.php');
auth_check($auth[$sub_menu], "r");
$g4[title] = "보관함현황";
include_once ("$g4[admin_path]/admin.head.php");
$g4['title'] = '보관함현황';
include_once (G4_ADMIN_PATH.'/admin.head.php');
if (!$to_date) $to_date = date("Ymd", time());
if ($sort1 == "") $sort1 = "it_id_cnt";
if ($sort2 == "") $sort2 = "desc";
$sql = " select a.it_id,
$sql = " select a.it_id,
b.it_name,
COUNT(a.it_id) as it_id_cnt
from $g4[yc4_wish_table] a, $g4[yc4_item_table] b ";
from {$g4['yc4_wish_table']} a, {$g4['yc4_item_table']} b ";
$sql .= " where a.it_id = b.it_id ";
if ($fr_date && $to_date)
if ($fr_date && $to_date)
{
$fr = preg_replace("/([0-9]{4})([0-9]{2})([0-9]{2})/", "\\1-\\2-\\3", $fr_date);
$to = preg_replace("/([0-9]{4})([0-9]{2})([0-9]{2})/", "\\1-\\2-\\3", $to_date);
@ -32,7 +32,7 @@ $sql .= " group by a.it_id, b.it_name
$result = sql_query($sql);
$total_count = mysql_num_rows($result);
$rows = $config[cf_page_rows];
$rows = $config['cf_page_rows'];
$total_page = ceil($total_count / $rows); // 전체 페이지 계산
if ($page == "") { $page = 1; } // 페이지가 없으면 첫 페이지 (1 페이지)
$from_record = ($page - 1) * $rows; // 시작 열을 구함
@ -53,25 +53,25 @@ $qstr1 = "fr_date=$fr_date&to_date=$to_date&sel_ca_id=$sel_ca_id";
<input type=hidden name=sort2 value="<? echo $sort2 ?>">
<input type=hidden name=page value="<? echo $page ?>">
<tr>
<td width=10%><a href='<?=$_SERVER[PHP_SELF]?>'>처음</a></td>
<td width=10%><a href='<?=$_SERVER['PHP_SELF']?>'>처음</a></td>
<td width=80% align=center>
<select name="sel_ca_id">
<option value=''>전체분류
<?
$sql1 = " select ca_id, ca_name from $g4[yc4_category_table] order by ca_id ";
$sql1 = " select ca_id, ca_name from {$g4['yc4_category_table']} order by ca_id ";
$result1 = sql_query($sql1);
for ($i=0; $row1=mysql_fetch_array($result1); $i++) {
$len = strlen($row1[ca_id]) / 2 - 1;
$len = strlen($row1['ca_id']) / 2 - 1;
$nbsp = "";
for ($i=0; $i<$len; $i++) $nbsp .= "&nbsp;&nbsp;&nbsp;";
echo "<option value='$row1[ca_id]'>$nbsp$row1[ca_name]\n";
echo "<option value='{$row1['ca_id']}'>$nbsp{$row1['ca_name']}\n";
}
?>
</select>
<script> document.flist.sel_ca_id.value = '<?=$sel_ca_id?>';</script>
기간 : <input type=text name=fr_date size=8 maxlength=8 itemname='기간' value='<?=$fr_date?>'> ~ <input type=text name=to_date size=8 maxlength=8 itemname='기간' value='<?=$to_date?>'>
<input type=image src='<?=$g4[admin_path]?>/img/btn_search.gif' align=absmiddle>
<input type=image src='<?=G4_ADMIN_URL?>/img/btn_search.gif' align=absmiddle>
</td>
<td width=10% align=right>건수 : <? echo $total_count ?>&nbsp;</td>
</tr>
@ -87,12 +87,12 @@ $qstr1 = "fr_date=$fr_date&to_date=$to_date&sel_ca_id=$sel_ca_id";
</tr>
<tr><td colspan=20 height=1 bgcolor=#CCCCCC></td></tr>
<?
for ($i=0; $row=mysql_fetch_array($result); $i++)
for ($i=0; $row=mysql_fetch_array($result); $i++)
{
$s_mod = icon("수정", "./itemqaform.php?w=u&iq_id=$row[iq_id]&$qstr");
$s_del = icon("삭제", "javascript:del('./itemqaupdate.php?w=d&iq_id=$row[iq_id]&$qstr');");
$s_mod = icon("수정", "./itemqaform.php?w=u&iq_id={$row['iq_id']}&$qstr");
$s_del = icon("삭제", "javascript:del('./itemqaupdate.php?w=d&iq_id={$row['iq_id']}&$qstr');");
$href = "$g4[shop_path]/item.php?it_id=$row[it_id]";
$href = G4_SHOP_URL."/item.php?it_id={$row['it_id']}";
$num = $rank + $i + 1;
@ -100,11 +100,11 @@ for ($i=0; $row=mysql_fetch_array($result); $i++)
echo "
<tr class='list$list center'>
<td>$num</td>
<td style='padding-top:5px; padding-bottom:5px;'><a href='$href'>".get_it_image("{$row[it_id]}_s", 50, 50)."</a></td>
<td align=left><a href='$href'>".cut_str($row[it_name],30)."</a></td>
<td style='padding-top:5px; padding-bottom:5px;'><a href='$href'>".get_it_image($row['it_id'].'_s', 50, 50)."</a></td>
<td align=left><a href='$href'>".cut_str($row['it_name'],30)."</a></td>
<td>$row[it_id_cnt]</td>
</tr><tr><td colspan=20 height=1 bgcolor=F5F5F5></td></tr>";
}
}
if ($i == 0) {
echo "<tr><td colspan=20 align=center height=100 bgcolor=#ffffff><span class=point>자료가 한건도 없습니다.</span></td></tr>\n";
@ -117,12 +117,12 @@ if ($i == 0) {
<table width=100%>
<tr>
<td width=50%>&nbsp;</td>
<td width=50% align=right><?=get_paging($config[cf_write_pages], $page, $total_page, "$_SERVER[PHP_SELF]?$qstr&page=");?></td>
<td width=50% align=right><?=get_paging($config['cf_write_pages'], $page, $total_page, "{$_SERVER['PHP_SELF']}?$qstr&page=");?></td>
</tr>
</table>
* 수량을 합산하여 순위를 출력합니다.
<?
include_once ("$g4[admin_path]/admin.tail.php");
include_once (G4_ADMIN_PATH.'/admin.tail.php');
?>