📄 editdept0.asp
字号:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>资源管理系统</title>
</head>
<body>
<font color="#FF9900"><strong>>> 部门内容</strong></font>
<%
dim deptID,headID,deptName,headName,deptDesc
deptID=request("deptID")
set conn=server.CreateObject("adodb.connection")
conn.open"DBSource","sa",""
set rs=conn.execute("select * from TDept where dept_id="&deptID)
if not rs.eof then
deptName=rs("dept_name")
headID=rs("head_id")
deptDesc=rs("dept_desc")
end if
%>
<form action="editDept1.asp" method="post" name="from">
<table width="75%" border="1" cellspacing="0" bordercolor="#FFAC75">
<tr>
<td width="26%"><div align="center"><font color="#006600">系名称:</font></div></td>
<td width="74%"><input type="deptName" name="deptName" value="<%=deptName%>"></td>
</tr>
<tr>
<td><div align="center"><font color="#006600">负责人:</font></div></td>
<td>
<select name="headID">
<option value="0" selected>无</option>
<%
set conn = server.CreateObject("adodb.connection")
conn.open"DBSource","sa",""
dim userID,realName
set rs=conn.execute("select user_id,real_name from TUser")
do until rs.eof
userID=rs("user_id")
realName=rs("real_name")
if Cint(userID)=Cint(headID) then
%>
<option value="<%=userID%>" selected><%=realName%></option>
<%
else
%>
<option value="<%=userID%>" ><%=realName%></option>
<%
end if
rs.movenext
loop
%>
</select></td>
</tr>
<tr>
<td><div align="center"><font color="#006600">描述: </font></div></td>
<td><textarea name="deptDesc"><%=deptDesc%></textarea></td>
</tr>
<tr>
<td> </td>
<td>
<input type="hidden" name="deptID" value="<%=deptID%>">
<input name="提交" type="submit"value="提交"> <input name="重置" type="reset" value="重置">
</td>
</tr>
</table>
</form>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -