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
|
<? include("../manage/category/common.php"); if(!isset($mode)) exit; if($mode == "insert") {
if(trim($ddlCategory) == "") return; if(!isset($_COOKIE[USERID])) return;
$category_code = $ddlCategory; $mid = $_COOKIE[USERID]; $subject = $txtSubject; $company = $txtCompany; $name = $txtName; $upjong = $txtUpjong; $employer = $txtEmployer; $paper = $ddlPaper; $content = $txtContent; $regdate_ymd = time();
$query = " INSERT INTO mBoard_useafter (category_code, mid, subject, company, name, upjong, employer, paper_opt, content, regdate_ymd) ". $query .= " VALUES ('$category_code', '$mid', '$subject', '$company', '$name', '$upjong', $employer, $paper, '$content', now()) ";
$result = mysql_query($query); if($result > 0) echo "<script>alert('* »ç¿ëÈıⰡ µî·ÏµÇ¾ú½À´Ï´Ù.');location.href='mypage_06.php'</script>"; else echo "<script>alert('* »ç¿ëÈıⰡ µî·ÏÁß ¿À·ù°¡ ¹ß»ýÇÏ¿´½À´Ï´Ù.');history.back();</script>";
} else if($mode == "update") { if(!isset($seq)) return; if(!isset($elect)) return; $query = " UPDATE mBoard_useafter SET elect_yn = $elect WHERE seq = $seq "; $result = mysql_query($query); if($result > 0) echo "<script>location.href='/manage/useafterBoard.php';</script>"; else echo "<script>alert('* »ç¿ëÈıⰡ µî·ÏÁß ¿À·ù°¡ ¹ß»ýÇÏ¿´½À´Ï´Ù.');history.back();</script>"; } else if($mode == "delete") { } else { echo "<script>history.back();</script>"; } exit; ?>
|