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
|
<? include("category/common.php");
if( $mode == "insert"){ $_content = addslashes($content); $reg_date = date("Y-m-d H:i:s"); //¿À´Ã³¯Â¥½Ã°£ $path = "../save_dir/m_board/file"; $insertQry = " insert into mBoard_company (idx,mName,title,subject,content,add_file,reg_date) values ('','$name','$title','$subject','$_content','$fileName','$reg_date') "; mysql_query($insertQry); $sel = "select idx from mBoard_company order by idx desc limit 1"; $result = mysql_query($sel); $row = mysql_fetch_array($result);
?> <script> parent.location.href = 'companyMody.php?menu=5&sub=8&idx=<?=$row[0];?>'; </script> <? } if($mode == "edit" && $idx !== ""){ $_content = addslashes($content); $updateQry = " update mBoard_company SET title = '$title' , subject = '$subject', content = '$_content', add_file = '$fileName' WHERE idx = '$idx' ";
mysql_query($updateQry); ?> <script> //parent.location.href = 'companyMody.php?menu=5&sub=8&idx=<?=$idx;?>'; alert("¼öÁ¤ µÇ¾ú½À´Ï´Ù."); </script> <? } if($exCode == "alldel"){ for ($i = 0; $i < count( $company ); $i++) {
$alldel = " delete from mBoard_company where idx = '$company[$i]' "; MYSQL_QUERY($alldel); } ?> <script> parent.location.href = 'UpDownBoard.php?menu=5&sub=8'; </script> <? } ?>
|