-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathsystem_part_edit.php
More file actions
95 lines (95 loc) · 2.81 KB
/
system_part_edit.php
File metadata and controls
95 lines (95 loc) · 2.81 KB
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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
<?php
require(dirname(__FILE__)."/include/config_base.php");
require(dirname(__FILE__)."/include/config_rglobals.php");
require_once(dirname(__FILE__)."/include/checklogin.php");
if($id=='')
ShowMsg('非法参数,请正确执行此文件。','-1');
if($action=='save'){
if($p_name==''){
ShowMsg('请输入部门名称','-1');
exit();
}
$addsql="update #@__part set p_name='$p_name',p_text='$p_text' where id='$id'";
$message= "修改部门".$p_name."成功";
$loginip=getip();
$logindate=getdatetimemk(time());
$username=GetCookie('VioomaUserID');
$asql=New Dedesql(false);
$asql->ExecuteNoneQuery($addsql);
WriteNote($message,$logindate,$loginip,$username);
$asql->close();
showmsg('成功修改部门资料','system_part.php');
exit();
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/2019/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf8" />
<link href="style/main.css" rel="stylesheet" type="text/css" />
<title><?php echo $cfg_softname;?>部门管理</title>
</head>
<body>
<?php
$esql=New Dedesql(false);
$query="select * from #@__part where id='$id'";
$esql->SetQuery($query);
$esql->Execute();
if($esql->GetTotalRow()==0){
ShowMsg('非法调用参数,请重试','-1');
exit();
}
$row=$esql->GetOne($query);
$esql->close();
?>
<table width="100%" border="0" id="table_style_all" cellpadding="0" cellspacing="0">
<tr>
<td id="table_style" class="l_t"> </td>
<td> </td>
<td id="table_style" class="r_t"> </td>
</tr>
<tr>
<td> </td>
<td>
<table width="100%" border="0" cellpadding="0" cellspacing="2">
<tr>
<td><strong> 部门资料修改</strong></td>
</tr>
<form action="system_part_edit.php?action=save" method="post">
<tr>
<td bgcolor="#FFFFFF">
<table width="100%" cellspacing="0" cellpadding="0" border="0" id="table_border">
<tr>
<td id="row_style"> 部门名称:</td>
<td>
<input type="text" name="p_name" size="30" value="<?php echo $row['p_name'] ?>"><input type="hidden" name="id" value="<?php echo $id; ?>">
</td>
</tr>
<tr>
<td id="row_style"> 备注:</td>
<td>
<textarea name="p_text" rows="3" cols="30"><?php echo $row['p_text'] ?></textarea></td>
</tr>
<tr>
<td id="row_style"> </td>
<td> <input type="submit" name="submit" value=" 修改部门资料 "></td>
</tr>
</form>
</table>
</td>
</tr>
</table>
</td>
<td> </td>
</tr>
<tr>
<td id="table_style" class="l_b"> </td>
<td> </td>
<td id="table_style" class="r_b"> </td>
</tr>
</table>
<?php
copyright();
?>
</body>
</html>