diff --git a/adm/shop_admin/orderlist.php b/adm/shop_admin/orderlist.php
index 60c3eb7d0..069ab76fb 100644
--- a/adm/shop_admin/orderlist.php
+++ b/adm/shop_admin/orderlist.php
@@ -49,12 +49,27 @@ $sql = " select a.*, "._MISU_QUERY_."
order by $sort1 $sort2
limit $from_record, $rows ";
$result = sql_query($sql, false);
-if (!$result) {
- sql_query(" ALTER TABLE `{$g4['shop_order_table']}` ADD `od_temp_hp` INT NOT NULL AFTER `od_temp_card` ", false);
- sql_query(" ALTER TABLE `{$g4['shop_order_table']}` ADD `od_receipt_hp` INT NOT NULL AFTER `od_receipt_card` ", false);
- sql_query(" ALTER TABLE `{$g4['shop_order_table']}` ADD `od_hp_time` DATETIME NOT NULL AFTER `od_card_time` ", false);
+
+$lines = array();
+$tot_itemcnt = 0;
+$tot_orderamount = 0;
+$tot_ordercancel = 0;
+$tot_dc_amount = 0;
+$tot_receiptamount = 0;
+$tot_receiptcancel = 0;
+$tot_misuamount = 0;
+for ($i=0; $row=mysql_fetch_array($result); $i++)
+{
+ $lines[$i] = $row;
+
+ $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'];
}
-//echo $sql;
//$qstr1 = "sel_ca_id=$sel_ca_id&sel_field=$sel_field&search=$search";
// 김선용 200805 : sel_ca_id - 쓰레기 코드
@@ -144,58 +159,51 @@ $qstr = "$qstr1&sort1=$sort1&sort2=$sort2&page=$page";
- $tot_itemcnt = 0;
- $tot_orderamount = 0;
- $tot_ordercancel = 0;
- $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; $i';
}
else
{
- if ($row['od_temp_bank'] > 0 || $row['od_receipt_bank'] > 0)
+ if ($lines[$i]['od_temp_bank'] > 0 || $lines[$i]['od_receipt_bank'] > 0)
{
//$s_receipt_way = "무통장입금";
- $s_receipt_way = cut_str($row['od_bank_account'],8,"");
+ $s_receipt_way = cut_str($lines[$i]['od_bank_account'],8,"");
$s_br = "
";
}
- if ($row['od_temp_card'] > 0 || $row['od_receipt_card'] > 0)
+ if ($lines[$i]['od_temp_card'] > 0 || $lines[$i]['od_receipt_card'] > 0)
{
// 미수금이 없고 카드결제를 하지 않았다면 카드결제를 선택후 무통장 입금한 경우임
- if ($row['misuamount'] <= 0 && $row['od_receipt_card'] == 0)
+ if ($lines[$i]['misuamount'] <= 0 && $lines[$i]['od_receipt_card'] == 0)
; // 화면 출력하지 않음
else
{
$s_receipt_way .= $s_br."카드";
- if ($row['od_receipt_card'] == 0)
+ if ($lines[$i]['od_receipt_card'] == 0)
$s_receipt_way .= "(미승인)";
$s_br = "
";
}
}
}
- if ($row['od_receipt_point'] > 0)
+ if ($lines[$i]['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']}&uq_id={$row['uq_id']}&mb_id={$row['mb_id']}&$qstr');");
+ $s_mod = icon("수정", "./orderform.php?od_id={$lines[$i]['od_id']}&$qstr");
+ $s_del = icon("삭제", "javascript:del('./orderdelete.php?od_id={$lines[$i]['od_id']}&uq_id={$lines[$i]['uq_id']}&mb_id={$lines[$i]['mb_id']}&$qstr');");
- $mb_nick = get_sideview($row['mb_id'], $row['od_name'], $row['od_email'], '');
+ $mb_nick = get_sideview($lines[$i]['mb_id'], $lines[$i]['od_name'], $lines[$i]['od_email'], '');
$tot_cnt = "";
- if ($row['mb_id'])
+ if ($lines[$i]['mb_id'])
{
- $sql2 = " select count(*) as cnt from {$g4['shop_order_table']} where mb_id = '{$row['mb_id']}' ";
+ $sql2 = " select count(*) as cnt from {$g4['shop_order_table']} where mb_id = '{$lines[$i]['mb_id']}' ";
$row2 = sql_fetch($sql2);
$tot_cnt = '('.$row2['cnt'].')';
}
@@ -203,29 +211,21 @@ $qstr = "$qstr1&sort1=$sort1&sort2=$sort2&page=$page";
$list = $i%2;
?>
- | =$row['od_id']?> |
-
+ =$lines[$i]['od_id']?> |
+
=$mb_nick?> |
- =$row['mb_id']?> |
- =$row['itemcount']?>건 =$tot_cnt?> |
- =number_format($row['orderamount'])?> |
- =number_format($row['ordercancel'])?> |
- =number_format($row['od_dc_amount'])?> |
- =number_format($row['receiptamount'])?> |
- =number_format($row['receiptcancel'])?> |
- =number_format($row['misu'])?> |
+ =$lines[$i]['mb_id']?> |
+ =$lines[$i]['itemcount']?>건 =$tot_cnt?> |
+ =number_format($lines[$i]['orderamount'])?> |
+ =number_format($lines[$i]['ordercancel'])?> |
+ =number_format($lines[$i]['od_dc_amount'])?> |
+ =number_format($lines[$i]['receiptamount'])?> |
+ =number_format($lines[$i]['receiptcancel'])?> |
+ =number_format($lines[$i]['misu'])?> |
=$s_receipt_way?> |
- 수정 삭제 |
+ 수정 삭제 |
-
-
- $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)
@@ -235,7 +235,7 @@ $qstr = "$qstr1&sort1=$sort1&sort2=$sort2&page=$page";
-=get_paging($config['cf_write_pages'], $page, $total_page, "{$_SERVER['PHP_SELF']}?$qstr&page=");?>
+=get_paging($config['cf_write_pages'], $page, $total_page, "{$_SERVER['PHP_SELF']}?$qstr&page=");?>
주의) 주문번호를 클릭하여 나오는 주문상세내역의 주소를 외부에서 조회가 가능한곳에 올리지 마십시오.
diff --git a/adm/shop_admin/orderlist2.php b/adm/shop_admin/orderlist2.php
index ea9c6a84e..b94fe33f9 100644
--- a/adm/shop_admin/orderlist2.php
+++ b/adm/shop_admin/orderlist2.php
@@ -46,6 +46,27 @@ $sql = " select a.od_id,
limit $from_record, $rows ";
$result = sql_query($sql);
+$lines = array();
+$tot_itemcnt = 0;
+$tot_orderamount = 0;
+$tot_ordercancel = 0;
+$tot_dc_amount = 0;
+$tot_receiptamount = 0;
+$tot_receiptcancel = 0;
+$tot_misuamount = 0;
+for ($i=0; $row=mysql_fetch_array($result); $i++)
+{
+ $lines[$i] = $row;
+
+ $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'];
+}
+
//$qstr1 = "sel_ca_id=$sel_ca_id&sel_field=$sel_field&search=$search";
$qstr1 = "sel_ca_id=$sel_ca_id&sel_field=$sel_field&search=$search&save_search=$search";
$qstr = "$qstr1&sort1=$sort1&sort2=$sort2&page=$page";
@@ -134,87 +155,72 @@ $qstr = "$qstr1&sort1=$sort1&sort2=$sort2&page=$page";
-$tot_itemcnt = 0;
-$tot_orderamount = 0;
-$tot_ordercancel = 0;
-$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; $i';
}
else
{
- if ($row['od_temp_bank'] > 0 || $row['od_receipt_bank'] > 0)
+ if ($lines[$i]['od_temp_bank'] > 0 || $lines[$i]['od_receipt_bank'] > 0)
{
//$s_receipt_way = "무통장입금";
- $s_receipt_way = cut_str($row['od_bank_account'],8,"");
+ $s_receipt_way = cut_str($lines[$i]['od_bank_account'],8,"");
$s_br = "
";
}
- if ($row['od_temp_card'] > 0 || $row['od_receipt_card'] > 0)
+ if ($lines[$i]['od_temp_card'] > 0 || $lines[$i]['od_receipt_card'] > 0)
{
// 미수금이 없고 카드결제를 하지 않았다면 카드결제를 선택후 무통장 입금한 경우임
- if ($row['misuamount'] <= 0 && $row['od_receipt_card'] == 0)
+ if ($lines[$i]['misuamount'] <= 0 && $lines[$i]['od_receipt_card'] == 0)
; // 화면 출력하지 않음
else
{
$s_receipt_way .= $s_br."카드";
- if ($row['od_receipt_card'] == 0)
- $s_receipt_way .= "(미승인)";
- $s_br = "
";
+ if ($lines[$i]['od_receipt_card'] == 0)
+ $s_receipt_way .= '(미승인)';
+ $s_br = '
';
}
}
}
- if ($row['od_receipt_point'] > 0)
- $s_receipt_way .= $s_br."포인트";
+ if ($lines[$i]['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']}&uq_id={$row['uq_id']}&mb_id={$row['mb_id']}&$qstr&list=2');");
+ $s_mod = icon("수정", "./orderform.php?od_id={$lines[$i]['od_id']}&$qstr");
+ $s_del = icon("삭제", "javascript:del('./orderdelete.php?od_id={$lines[$i]['od_id']}&uq_id={$lines[$i]['uq_id']}&mb_id={$lines[$i]['mb_id']}&$qstr&list=2');");
if ($i>0)
- echo " |
";
+ echo ' |
';
$list = $i%2;
echo "
-
- | {$row['od_id']} |
- ".cut_str($row['od_name'],30,"")." |
- {$row['mb_id']} |
- {$row['itemcount']}건 |
- ".number_format($row['orderamount'])." |
- ".number_format($row['ordercancel'])." |
- ".number_format($row['od_dc_amount'])." |
- ".number_format($row['receiptamount'])." |
- ".number_format($row['receiptcancel'])." |
- ".number_format($row['misu'])." |
+
+ | {$lines[$i]['od_id']} |
+ ".cut_str($lines[$i]['od_name'],30,"")." |
+ {$lines[$i]['mb_id']} |
+ {$lines[$i]['itemcount']}건 |
+ ".number_format($lines[$i]['orderamount'])." |
+ ".number_format($lines[$i]['ordercancel'])." |
+ ".number_format($lines[$i]['od_dc_amount'])." |
+ ".number_format($lines[$i]['receiptamount'])." |
+ ".number_format($lines[$i]['receiptcancel'])." |
+ ".number_format($lines[$i]['misu'])." |
$s_receipt_way |
$s_mod $s_del |
";
- $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['shop_order_table']} a
left join {$g4['shop_cart_table']} b on (a.uq_id = b.uq_id)
left join {$g4['shop_item_table']} c on (b.it_id = c.it_id)
- where od_id = '{$row['od_id']}' ";
+ where od_id = '{$lines[$i]['od_id']}' ";
$result2 = sql_query($sql2);
for ($k=0; $row2=sql_fetch_array($result2); $k++)
{
diff --git a/adm/shop_admin/orderstatuslist.php b/adm/shop_admin/orderstatuslist.php
index 95de8dbbe..c9103fb31 100644
--- a/adm/shop_admin/orderstatuslist.php
+++ b/adm/shop_admin/orderstatuslist.php
@@ -71,6 +71,17 @@ $sql = " select a.od_id,
limit $from_record, $rows ";
$result = sql_query($sql);
+$lines = array();
+for ($i=0; $row=sql_fetch_array($result); $i++)
+{
+ $lines[$i] = $row;
+
+ $tot_amount += $row['ct_amount'];
+ $tot_qty += $row['ct_qty'];
+ $tot_sub_amount += $row['ct_sub_amount'];
+ $tot_sub_point += $row['ct_sub_point'];
+}
+
$qstr1 = "sel_ca_id=$sel_ca_id&sel_field=$sel_field&search=$search&save_search=$search";
$qstr = "$qstr1&sort1=$sort1&sort2=$sort2&page=$page";
?>
@@ -159,38 +170,33 @@ $qstr = "$qstr1&sort1=$sort1&sort2=$sort2&page=$page";