/home/mjc1/public_html/adm/shop_admin/sendcostupdate.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
40
41
42
43
44
45
<?php
$sub_menu 
'100750';
include_once(
'./_common.php');

check_demo();

auth_check($auth[$sub_menu], "w");

$w $_POST['w'];

if(
$w == 'd') {
    
$count count($_POST['chk']);
    if(!
$count)
        
alert('삭제하실 항목을 하나이상 선택해 주십시오.');

    for(
$i=0$i<$count$i++) {
        
$k $_POST['chk'][$i];

        
$sc_id $_POST['sc_id'][$k];
        
sql_query(" delete from {$g5['g5_shop_sendcost_table']} where sc_id = '$sc_id' ");
    }
} else {
    
$sc_name trim($_POST['sc_name']);
    
$sc_zip1 preg_replace('/[^0-9]/'''$_POST['sc_zip1']);
    
$sc_zip2 preg_replace('/[^0-9]/'''$_POST['sc_zip2']);
    
$sc_price preg_replace('/[^0-9]/'''$_POST['sc_price']);

    if(!
$sc_name)
        
alert('지역명을 입력해 주십시오.');
    if(!
$sc_zip1)
        
alert('우편번호 시작을 입력해 주십시오.');
    if(!
$sc_zip2)
        
alert('우편번호 끝을 입력해 주십시오.');
    if(!
$sc_price)
        
alert('추가배송비를 입력해 주십시오.');

    
$sql " insert into {$g5['g5_shop_sendcost_table']}
                  ( sc_name, sc_zip1, sc_zip2, sc_price )
                values
                  ( '
$sc_name', '$sc_zip1', '$sc_zip2', '$sc_price' ) ";
    
sql_query($sql);
}

goto_url('./sendcostlist.php?page='.$page);
?>