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

This commit is contained in:
whitedot
2013-11-12 14:20:56 +09:00
89 changed files with 249 additions and 772 deletions

View File

@ -15,7 +15,7 @@ include_once(G5_ADMIN_PATH.'/admin.head.php');
//------------------------------------------------------------------------------
$keep_term = $default['de_cart_keep_term'];
if (!$keep_term) $keep_term = 15; // 기본값 15일
$beforetime = date('Y-m-d H:i:s', ( G5_SERVER_TIME - (86400 * $keep_term) ) );
$beforetime = date('Y-m-d H:i:s', ( G5_SERVER_TIME - (86400 * ($keep_term - 1)) ) );
$sql = " delete from {$g5['g5_shop_cart_table']} where ct_status = '쇼핑' and ct_time <= '$beforetime' ";
sql_query($sql);
//------------------------------------------------------------------------------

View File

@ -239,6 +239,17 @@ for ($i=0; $i<count($_POST['chk']); $i++)
case '배송' :
if ($change_status != '완료') continue;
change_status($od_id, '배송', '완료');
// 완료인 경우에만 상품구입 합계수량을 상품테이블에 저장한다.
$sql2 = " select ct_id, ct_qty from {$g5['g5_shop_cart_table']} where od_id = '$od_id' ";
$result2 = sql_query($sql2);
for ($k=0; $row2=sql_fetch_array($result2); $k++) {
$sql3 = " select it_id, sum(ct_qty) as sum_qty from {$g5['g5_shop_cart_table']} where ct_id = '{$row2['ct_id']}' ";
$row3 = sql_fetch($sql3);
$sql4 = " update {$g5['g5_shop_item_table']} set it_sum_qty = '{$row3['sum_qty']}' where it_id = '{$row3['it_id']}' ";
sql_query($sql4);
}
break;
} // switch end