/home/mjc1/public_html/manage/shoppingBoardProcess.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
<?
    
include("./_common.php");
   include(
"category/common.php");

   if( 
$mode == "insert"){

     
$devel_date $devel_year."-".$devel_mon."-".$devel_day;

     
$domain     addslashes($domain);  
     
$set_price     addslashes($set_price);  
     
$month_price     addslashes($month_price);  
     
$custom_price     addslashes($custom_price);  
     
$meno     addslashes($meno);  
     
$reg_date date("Y-m-d H:i:s",time());

     
$insertQry     =  " insert into mBoard_shopping set
                                cs_type = '
$cs_type', server = '$server', Mid = '$Mid', name = '$name', dir_name = '$dir_name', 
                                domain_temp = '
$domain_temp', domain = '$domain', shop_type = '$shop_type', 
                                set_date = '
$set_date', reg_date = '$reg_date', custom_type = '$custom_type', 
                                skin_type = '
$skin_type', set_price = '$set_price', month_price = '$month_price', 
                                custom_price = '
$custom_price', db_user = '$db_user', db_name = '$db_name', 
                                memo = '
$memo', show_list = '$show_list', list_subject = '$list_subject', list_basic = '$list_basic', list_content = '$list_content', demo_link = '$demo_link'
     "
;
     
     
mysql_query($insertQry);

     
     
auth_access_log("WRITE");
 
     
$sel      =  "select uid from mBoard_shopping order by uid desc limit 1";
     
$result   =   mysql_query($sel);
     
$row      =   mysql_fetch_array($result);

     
$uid $row[0];

     
$file_update "";
        foreach(
$_FILES as $key=>$val){
            if(
$val['name']!='' && $val['size']>0){
                
$dir $_SERVER['DOCUMENT_ROOT']."/html/ebizmall/data/img/$uid";
                @
mkdir($dir);
                
copy($val['tmp_name'],$dir."/$key");
            }
        }
?>
<script>
     parent.location.href = 'shoppingBoard.php?menu=<?=$menu?>&sub=<?=$sub?>&uid=<?=$row[0];?>';
</script>
<?
    
}
    
 
  if(
$mode == "edit" && $uid !== ""){

     
$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;
    }

   
    
$domain     addslashes($domain);  
     
$set_price     addslashes($set_price);  
     
$month_price     addslashes($month_price);  
     
$custom_price     addslashes($custom_price);  
     
$meno     addslashes($meno);  

      
$updateQry  =  " update mBoard_shopping SET 
                                cs_type = '
$cs_type', server = '$server',Mid = '$Mid', name = '$name', dir_name = '$dir_name', 
                                domain_temp = '
$domain_temp', domain = '$domain', shop_type = '$shop_type', 
                                set_date = '
$set_date', custom_type = '$custom_type', 
                                skin_type = '
$skin_type', set_price = '$set_price', month_price = '$month_price', 
                                custom_price = '
$custom_price', db_user = '$db_user', db_name = '$db_name', 
                                memo = '
$memo', show_list = '$show_list', list_subject = '$list_subject', list_basic = '$list_basic', list_content = '$list_content', demo_link = '$demo_link'
                         WHERE uid = '
$uid'
                       "
;
                       
      
mysql_query($updateQry);  

        
$file_update "";
        foreach(
$_FILES as $key=>$val){
            if(
$val['name']!='' && $val['size']>0){
                
$dir $_SERVER['DOCUMENT_ROOT']."/html/ebizmall/data/img/$uid";
                @
mkdir($dir);
                
copy($val['tmp_name'],$dir."/$key");
            }
        }

      
auth_access_log("EDIT");
     
?>
<script>
 //parent.location.href = 'develBoardMody.php?menu=<?=$menu?>&sub=<?=$sub?>&uid=<?=$uid;?>';
 //alert("¼öÁ¤ µÇ¾ú½À´Ï´Ù.");
 parent.location.href = 'shoppingBoard.php?menu=<?=$menu?>&sub=<?=$sub?>&pg=<?=$pg?>';
</script>
<?
    

    
     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$develForm ); $i++) { 

      
$alldel   =  " delete from  mBoard_shopping where uid = '$develForm[$i]' ";  
                      
MYSQL_QUERY($alldel);
              
      }

      
auth_access_log("DEL");
?>
<script>
 parent.location.href = 'shoppingBoard.php?menu=<?=$menu?>&sub=<?=$sub?>&pg=<?=$pg?>';
</script>
<?      
               
  

?>