퍼스트가든에서 사용하는 사용자 함수 및 관련파일 추가
This commit is contained in:
27
adm/fg_admin/orderliveupdate.php
Normal file
27
adm/fg_admin/orderliveupdate.php
Normal file
@ -0,0 +1,27 @@
|
||||
<?
|
||||
$sub_menu = "998100";
|
||||
include_once("./_common.php");
|
||||
|
||||
$current_status = $od_id = 0; // 변수 초기화
|
||||
|
||||
// orderlist_ticket.php 에서 가져온거 넣어줌
|
||||
$current_status = $_GET['st'];
|
||||
$od_id = $_GET['od_id'];
|
||||
|
||||
// 조건문 시작
|
||||
if($_GET['bo']=="u" && $current_status === '입금') { //사용처리
|
||||
change_status($od_id, '입금', '완료'); // 완료처리하고
|
||||
// cart table에도 완료처리 시키고
|
||||
$sql2 = " select it_id from {$g5['g5_shop_cart_table']} where od_id = '$od_id' and ct_status = '완료' group by it_id ";
|
||||
$result2 = sql_query($sql2);
|
||||
for ($k=0; $row2=sql_fetch_array($result2); $k++) {
|
||||
$sql3 = " select sum(ct_qty) as sum_qty from {$g5['g5_shop_cart_table']} where it_id = '{$row2['it_id']}' and ct_status = '완료' ";
|
||||
$row3 = sql_fetch($sql3);
|
||||
|
||||
$sql4 = " update {$g5['g5_shop_item_table']} set it_sum_qty = '{$row3['sum_qty']}' where it_id = '{$row2['it_id']}' ";
|
||||
sql_query($sql4);
|
||||
}
|
||||
} // end if
|
||||
|
||||
goto_url("./orderlist_ticket.php"); //이전 url로 보내기
|
||||
?>
|
||||
Reference in New Issue
Block a user