From 25d9290ae85dfceedcb3f5b8437e984e6ff37710 Mon Sep 17 00:00:00 2001 From: chicpro Date: Tue, 9 Apr 2013 17:10:02 +0900 Subject: [PATCH] =?UTF-8?q?tfoot=20=EC=97=90=20=ED=95=A9=EA=B3=84=20?= =?UTF-8?q?=EC=B6=9C=EB=A0=A5=EB=90=98=EB=8F=84=EB=A1=9D=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- adm/shop_admin/orderlist.php | 94 +++++++++++++++--------------- adm/shop_admin/orderlist2.php | 90 +++++++++++++++------------- adm/shop_admin/orderstatuslist.php | 48 ++++++++------- 3 files changed, 122 insertions(+), 110 deletions(-) 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"; '; } 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; ?> - - + + - - - - - - - - + + + + + + + + - 수정 삭제 + 수정 삭제 - -

+

주의) 주문번호를 클릭하여 나오는 주문상세내역의 주소를 외부에서 조회가 가능한곳에 올리지 마십시오.

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"; '; } 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"; ".cut_str($row['it_name'],35)."
"; - $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']); + $href = "$_SERVER[PHP_SELF]?sort1=$sort1&sort2=$sort2&sel_field=c.it_id&search=$lines[$i][it_id]"; + $it_name = "".cut_str($lines[$i]['it_name'],35)."
"; + $it_name .= print_item_options($lines[$i]['it_id'], $lines[$i]['it_opt1'], $lines[$i]['it_opt2'], $lines[$i]['it_opt3'], $lines[$i]['it_opt4'], $lines[$i]['it_opt5'], $lines[$i]['it_opt6']); - $s_mod = icon("수정", "./orderform.php?od_id={$row['od_id']}"); + $s_mod = icon("수정", "./orderform.php?od_id={$lines[$i]['od_id']}"); $list = $i%2; echo " - {$row['od_id']} - ".cut_str($row['od_name'],10,"")." - {$row['mb_id']} - ".get_it_image($row['it_id'].'_s', 50, 50)." + {$lines[$i]['od_id']} + ".cut_str($lines[$i]['od_name'],10,"")." + {$lines[$i]['mb_id']} + ".get_it_image($lines[$i]['it_id'].'_s', 50, 50)." $it_name - ".number_format($row['ct_amount'])."  - $row[ct_qty] - ".number_format($row['ct_sub_amount'])."  - ".number_format($row['ct_sub_point'])."  - {$row['ct_status']} + ".number_format($lines[$i]['ct_amount'])."  + {$lines[$i]['ct_qty']} + ".number_format($lines[$i]['ct_sub_amount'])."  + ".number_format($lines[$i]['ct_sub_point'])."  + {$lines[$i]['ct_status']} $s_mod "; - - $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)