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

   if( 
$mode == "insert"){
     
     
$_content     addslashes($content);  
     
$reg_date     =  Time();
     
     
$path "../save_dir/m_board/file";

     
$file $_FILES['new_add_file'];
     if(
$file['name']!=''){
         @
copy($file['tmp_name'],$path."/".$file['name']);
         
$add_file $file['name'];
     }     
     
     
$insertQry     =  " insert into mBoard_etc_store values
                      ('','
$name','','','','','','$subject','$_content',
                       '
$add_file','$hit','','$reg_date','')";
     
      
mysql_query($insertQry);
  
     
$sel      =  "select uid from mBoard_etc_store order by uid desc limit 1";
     
$result   =   mysql_query($sel);
     
$row      =   mysql_fetch_array($result);
?>
<script>
 parent.location.href = 'etc_storeBoardMody.php?menu=<?=$menu?>&sub=<?=$sub?>&uid=<?=$row[0];?>';
</script>
<?
    
}
    
 
  if(
$mode == "edit" && $uid !== ""){

      
$path "../save_dir/m_board/file";

     
$add_file $_POST['new_add_file_name'];

     if(
$_POST['new_add_file_del']=='Y'){
        @
unlink($path."/".$_POST['new_add_file_name']);
        
$add_file "";
     }

     
$file $_FILES['new_add_file'];
     if(
$file['name']!=''){
         @
copy($file['tmp_name'],$path."/".$file['name']);
         
$add_file $file['name'];
     }
    
      
$_content      =     addslashes($content);
       
      
$updateQry  =  " update mBoard_etc_store SET 
                         subject = '
$subject', content = '$_content', hit = '$hit',
                        add_file = '
$add_file'
                       WHERE uid = '
$uid'
                       "
;
                       
      
mysql_query($updateQry);  
     
?>
<script>
 //parent.location.href = 'etc_storeBoardMody.php?menu=<?=$menu?>&sub=<?=$sub?>&uid=<?=$uid;?>';
 alert("¼öÁ¤ µÇ¾ú½À´Ï´Ù.");
 parent.location.reload();
</script>
<?
    

    
     if(
$exCode == "alldel"){ 
       
      for (
$i 0$i count$etc_storeForm ); $i++) { 

      
$alldel   =  " delete from  mBoard_etc_store where uid = '$etc_storeForm[$i]' ";  
                      
MYSQL_QUERY($alldel);
              
      }
?>
<script>
 parent.location.href = 'etc_storeBoard.php?menu=<?=$menu?>&sub=<?=$sub?>';
</script>
<?      
               
  

?>