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

   if( 
$mode == "insert"){
     
     
$_content     addslashes($content);  
     
$reg_date     =  Time();
     
$insertQry     =  " insert into mBoard_up_notice values
                      ('','
$name','','','','','','$subject','$_content',
                       '','
$hit','','$reg_date','')";
     
      
mysql_query($insertQry);
  
     
$sel      =  "select uid from mBoard_up_notice order by uid desc limit 1";
     
$result   =   mysql_query($sel);
     
$row      =   mysql_fetch_array($result);
?>
<script>
 location.href = 'up_noticeBoardMody.php?uid=<?=$row[0];?>';
</script>
<?
    
}
    
 
  if(
$mode == "edit" && $uid !== ""){
    
      
$_content      =     addslashes($content);
       
      
$updateQry  =  " update mBoard_up_notice SET 
                         subject = '
$subject', content = '$_content', hit = '$hit'
                      
                       WHERE uid = '
$uid'
                       "
;
                       
      
mysql_query($updateQry);  
     
?>
<script>
 location.href = 'up_noticeBoardMody.php?uid=<?=$uid;?>';
</script>
<?
    

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

      
$alldel   =  " delete from  mBoard_up_notice where uid = '$up_noticeForm[$i]' ";  
                      
MYSQL_QUERY($alldel);
              
      }
?>
<script>
 location.href = 'up_noticeBoard.php';
</script>
<?      
               
  

?>