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
|
<? include("../manage/category/common.php");
if( isset($mode) && $mode == "insert"){ // as»õ°Ô½Ã¹° ÀÔ·Â.
$memberQry = " SELECT * FROM member WHERE Mid = '$_COOKIE[USERID]' "; $memberResult = MYSQL_QUERY($memberQry); $memberRow = MYSQL_FETCH_ARRAY($memberResult);
$_content = addslashes($content); $reg_date = Time();
//fid¸¦ ±¸ÇÑ´Ù.
$fidQry = "select fid from mBoard_build order by fid desc limit 1"; $fidResult = mysql_query($fidQry);
$fidRow = mysql_fetch_array($fidResult); $_fid = $fidRow[0] +1; $Mid = $_COOKIE[USERID];
$insertQry = " insert into mBoard_build values ( '','$memberRow[Mname]','$memberRow[Mcompany]','$memberRow[Memail]','','$memberRow[Mtel1]','$memberRow[Mhp]','$subject','$_content','', '','','A','n','$reg_date','','$Mid','$_fid')"; mysql_query($insertQry);
//uid°©À» ±¸ÇÑ´Ù. $uidQry = "select uid from mBoard_build order by uid desc limit 1"; $uidResult = mysql_query($uidQry);
$uidRow = mysql_fetch_array($uidResult); $_uid = $uidRow[0];
?> <script> location.href = "mypage_05_01.php?pType=up&uid=<?=$_uid;?>"; </script> <? } if( $mode == "update" && $uid !== ""){
$_content = addslashes($content);
$updateQry = " update mBoard_build set subject = '$subject' , content = '$_content' WHERE uid = '$uid' " ; mysql_query($updateQry); ?> <script> location.href = "mypage_05_01.php?pType=up&uid=<?=$uid;?>"; </script> <? } ?>
|