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
|
<?php include("./_common.php");
$dir = "../save_dir/notice/"; function file_upload($file,$last_idx){ Global $ADMINID, $dir; if($file['name']!='' && $file['size']>0){ $v = explode(".",$file['name']); $ext = $v[count($v)-1]; $body_file_name = ".".$ext; if($body_file_name == ".php" || $body_file_name == ".html" || $body_file_name == ".cgi" || $body_file_name == ".pl" || $body_file_name == ".htm" || $body_file_name == ".php3" || $body_file_name == ".php4") { return "ext_error"; } //$filename = $last_idx."-".$ADMINID."-.".$ext; $filename = $last_idx."-".$file['name']; copy($file['tmp_name'] ,$dir.$filename); unlink($file['tmp_name']); return $filename; } }
$sql = "set names euckr"; mysql_query($sql,$connect_web);
$table = "mBoard_education";
@extract($_POST); @extract($_FILES);
if($sel_del=='Y'){ // 선택삭제 $uids = ""; foreach($code_idx as $key=>$val){ $uid = $codes[$val]; $sql = "select * from {$table} where uid = '{$uid}' "; $res = mysql_query($sql,$connect_web); $info = mysql_fetch_array($res); $sql = "delete from {$table} where uid = '{$uid}' "; mysql_query($sql,$connect_web); }
} else if($code!=''){ // 업데이트 if($e_state!='신청'){ $add = ", proc_date = '".date("Y-m-d H:i:s",time())."' "; } else { $add = " "; }
$_content = addslashes($content); $sql = "update {$table} set e_company = '{$e_company}', e_name = '{$e_name}', e_product = '{$e_product}', e_tel = '{$e_tel}', e_ofc_cnt = '{$e_ofc_cnt}', e_edu_cnt = '{$e_edu_cnt}', e_location = '{$e_location}', e_purpose = '{$e_purpose}', e_date = '{$e_date}', e_person = '{$e_person}', e_state = '{$e_state}', e_memo = '{$e_memo}' {$add} where uid = '$code' "; mysql_query($sql,$connect_web); }
?> <script> document.location.href='m_education.php?<?php echo $qstr;?>'; </script>
|