-
Notifications
You must be signed in to change notification settings - Fork 0
/
orderaddressupdate.php
39 lines (28 loc) · 1.02 KB
/
orderaddressupdate.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
<?php
include_once('./backend/common.php');
if($is_guest)
die('회원 로그인 후 이용해 주십시오.');
$count = count($_POST['chk']);
if (!$count) {
alert('수정하실 항목을 하나이상 선택하세요.');
}
if ($is_member && $count) {
for ($i=0; $i<$count; $i++)
{
// 실제 번호를 넘김
$k = (int) $_POST['chk'][$i];
$ad_id = (int) $_POST['ad_id'][$k];
$ad_subject = clean_xss_tags($_POST['ad_subject'][$k]);
$sql = " update {$g5['g5_shop_order_address_table']}
set ad_subject = '$ad_subject' ";
if(!empty($_POST['ad_default']) && $ad_id == $_POST['ad_default']) {
sql_query(" update {$g5['g5_shop_order_address_table']} set ad_default = '0' where mb_id = '{$member['mb_id']}' ");
$sql .= ", ad_default = '1' ";
}
$sql .= " where ad_id = '".$ad_id."'
and mb_id = '{$member['mb_id']}' ";
sql_query($sql);
}
}
goto_url(G5_SHOP_URL.'/orderaddress.php');
?>