/home/mjc1/public_html/manage/orderProcess.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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
<?
include("./_common.php");
 include(
"category/common.php");

 function 
memo_save(){
    Global 
$_GET,$idx;
    
$memo $_GET['mo_memo'];
    
$memo_admin $_GET['memo_admin'];
    if(
$memo_admin=='1'){
        
$sql "select count(*) as cnt from mBoard_order_memo where mo_idx = '$idx' ";
        
$res mysql_query($sql);
        
$info mysql_fetch_array($res);
        if(
$info['cnt']>0){
            
$sql "update mBoard_order_memo set memo='$memo', mod_date = '".date("Y-m-d H:i:s",time())."' where mo_idx = '$idx' ";
        } else {
            
$sql "insert into mBoard_order_memo set mo_idx = '$idx', memo='$memo', reg_date = '".date("Y-m-d H:i:s",time())."' ";
        }
        echo 
$sql;
        
mysql_query($sql);
    }
 }

 if(
$exCode == "alldel"){  ////////  ¼±ÅûèÁ¦

    
$admin_info admin_member_info();
    if(
$admin_info['psn_auth']=='0' || substr($admin_info['psn_rwed'],3,1)=='0'){
        echo 
"<script>alert('ÇØ´ç »èÁ¦±ÇÇÑÀÌ ¾ø½À´Ï´Ù.');window.history.go(-1);</script>"; exit;
    }
    
     for (
$i 0$i count$orderForm ); $i++) { 

      
$alldel   =  " delete from mBoard_order where idx = '$orderForm[$i]' ";  
                    
MYSQL_QUERY($alldel);
           
       }
      
auth_access_log("DEL");
?>
<script>
 parent.location.href = "orderList.php";
</script>  



<?       
   
}
  
  if( 
$exCode == "rSuccYnCh"){

        
$admin_info admin_member_info();
        if(
$admin_info['psn_auth']=='0' || substr($admin_info['psn_rwed'],2,1)=='0'){
            echo 
"<script>alert('ÇØ´ç ¼öÁ¤±ÇÇÑÀÌ ¾ø½À´Ï´Ù.');window.history.go(-1);</script>"; exit;
        }
    
      
$update " update mBoard_order set rSuccYn = '$val'  WHERE idx = '$idx'";
                   
mysql_query($update);

      
auth_access_log("EDIT");
   
?>
<script>
 parent.location.href = "orderList.php?pg=<?=$pg;?>&mode=search&category_code=<?=$category_code?>&searchCode1=<?=$searchCode1;?>&searchCode2=<?=$searchCode2;?>&SearchMsw1=<?=$SearchMsw1;?>&keyword=<?=$keyword;?>&escrow=<?=$escrow?>";
</script> 



<?    
    
}     

  if( 
$exCode == "Deliver"){

        
$admin_info admin_member_info();
        if(
$admin_info['psn_auth']=='0' || substr($admin_info['psn_rwed'],2,1)=='0'){
            echo 
"<script>alert('ÇØ´ç ¼öÁ¤±ÇÇÑÀÌ ¾ø½À´Ï´Ù.');window.history.go(-1);</script>"; exit;
        }

        
$update " update mBoard_order set Deliver = '$val'  WHERE idx = '$idx'";
               
mysql_query($update);

        
auth_access_log("EDIT");
?>
<script>
 parent.location.href = "orderList.php?pg=<?=$pg;?>&mode=search&category_code=<?=$category_code?>&searchCode1=<?=$searchCode1;?>&searchCode2=<?=$searchCode2;?>&SearchMsw1=<?=$SearchMsw1;?>&keyword=<?=$keyword;?>&escrow=<?=$escrow?>";
</script> 



<?    
  
}

  if( 
$exCode == "InboiceNm"){

        
$admin_info admin_member_info();
        if(
$admin_info['psn_auth']=='0' || substr($admin_info['psn_rwed'],2,1)=='0'){
            echo 
"<script>alert('ÇØ´ç ¼öÁ¤±ÇÇÑÀÌ ¾ø½À´Ï´Ù.');window.history.go(-1);</script>"; exit;
        }

        
$update " update mBoard_order set InvoiceNum = '$val'  WHERE idx = '$idx'";
               
mysql_query($update);

          
auth_access_log("EDIT");

?>
<script>
 parent.location.href = "orderList.php?pg=<?=$pg;?>&mode=search&category_code=<?=$category_code?>&searchCode1=<?=$searchCode1;?>&searchCode2=<?=$searchCode2;?>&SearchMsw1=<?=$SearchMsw1;?>&keyword=<?=$keyword;?>&escrow=<?=$escrow?>";
</script> 



<?    
  
}

  if( 
$exCode == "SaveData"){

        
$admin_info admin_member_info();
        if(
$admin_info['psn_auth']=='0' || substr($admin_info['psn_rwed'],2,1)=='0'){
            echo 
"<script>alert('ÇØ´ç ¼öÁ¤±ÇÇÑÀÌ ¾ø½À´Ï´Ù.');window.history.go(-1);</script>"; exit;
        }

        
$update " update mBoard_order set rSuccYn = '$val1', InvoiceNum = '$val2', Deliver = '$val3' WHERE idx = $idx";

    
mysql_query($update);

    
auth_access_log("EDIT");

    
memo_save();

?>

<script>
 parent.location.href = "orderList.php?pg=<?=$pg;?>&mode=search&category_code=<?=$category_code?>&searchCode1=<?=$searchCode1;?>&searchCode2=<?=$searchCode2;?>&SearchMsw1=<?=$SearchMsw1;?>&keyword=<?=$keyword;?>&escrow=<?=$escrow?>";
</script> 

<?
    
}
?>