📄 modifyuser.asp
字号:
<!--#include file="check.asp"-->
<!--#include file="checkpower.asp"-->
<!--#INCLUDE FILE="connect.asp" -->
<%if Request.ServerVariables("Request_Method")="POST" then
set rs=server.createobject("adodb.recordset")
if request("choose")="1" then
sql="select * from userlist where id="&CLng(request("id"))
rs.open sql,conn,1,3
rs("uid")=request("uid")
rs("name")=request("name")
rs("passwd")=request("password")
rs("depid")=request("dep")
rs("dep")=request("depname")
rs("mobilephone")=request("mobilephone")
rs("workphone")=request("workphone")
rs("type")=request("type")
rs("power")=request("power")
rs("email")=request("email")
rs("bz")=request("bz")
rs.update
rs.close
set rs=nothing
response.write("<script language=javascript>opener.location=opener.location;window.close()</script>")
response.end
end if
if request("choose")="2" then
set rs=server.createobject("adodb.recordset")
if session("uid")=request("uid") then
response.write("<script language=javascript>alert('对不起您不能删除自己的帐户!')</script>")
response.write("<script>opener.location=opener.location;window.close()</script>")
response.end
end if
sql="delete from userlist where id="&CLng(request("id"))
conn.execute(sql)
conn.close
set conn=nothing
response.write("<script language=javascript>alert('成功删除改用户!')</script>")
response.write("<script>opener.location=opener.location;window.close()</script>")
response.end
end if
end if
%>
<html>
<head>
<title>用户信息</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="outplan.css" type="text/css">
</head>
<script language="javascript">
UserId="<%=session("uid")%>" //判断帐户是否为管理员自己帐户,如果是不能删除
</script>
<script language="javascript" src="apply.js"></script>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<%
set rs=server.createobject("adodb.recordset")
sql="select * from userlist where id="&CLng(request("id"))
rs.open sql,conn,1,1
%>
<form method="POST" name="form" action="modifyuser.asp">
<table width="100%" border="0" cellspacing="0" cellpadding="0" height="35">
<tr>
<td background="images/outplan4.gif" valign="top">
<table width="100%" border="0" cellspacing="0" cellpadding="0" height="100%">
<tbody>
<tr>
<td width="30" align="right"><img src="images/outplan7.gif" width="22" height="35"></td>
<td width="70" align="center">
<a href="#" class="wlink" onClick="return checkmodifyuser()">保 存</a></td>
<td width="10"><img src="images/outplanline.gif" width="16" height="35"></td>
<td width="22"><img src="images/outplan6.gif" width="22" height="35"></td>
<td width="70" align="center"> <a href="#" class="wlink" onClick="return checkdeluser()">删
除</a></td>
<td width="3"><img src="images/outplanline.gif" width="16" height="35"></td>
<td width="22"><img src="images/outplan5.gif" width="22" height="35"></td>
<td width="70" align="center"> <a href="#" onClick="window.close()" class="wlink">关
闭</a></td>
<td width="6"><img src="images/outplanline.gif" width="16" height="35"></td>
<td class="wnolink"> </td>
</tr>
</tbody>
</table>
</td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0" height="40">
<tbody>
<tr>
<td width="210" background="images/outplan1.gif" class="outtitle"> 用户信息</td>
<td width="91"><img src="images/outplan2.gif" width="91" height="40"></td>
<td background="images/outplan3.gif" valign="top" width="45"> </td>
<td width="2"><img src="images/outplan8.gif" width="2" height="40"></td>
<td background="images/outplan9.gif" width="75" align="center" valign="middle">
<table width="100%" border="0" cellspacing="0" cellpadding="0" height="100%">
<tbody>
<tr height="6">
<td align="center" height="6"></td>
</tr>
<tr>
<td align="center" class="whitetd">详细内容</td>
</tr>
</tbody>
</table>
</td>
<td width="2"><img src="images/outplan8.gif" width="2" height="40"></td>
<td background="images/outplan3.gif" valign="top"> </td>
</tr>
</tbody>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0" align="center" height="123">
<tr>
<td height="33" valign="top">
<div align="center">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="30"> </td>
<td>
<table width="100%" cellspacing="0" cellpadding="0" bordercolordark="#FFFFFF" align="center">
<tr>
<td width="100" height="40" align="left"> 用户帐号: </td>
<td height="40">
<table width="100%" border="0" cellspacing="0" cellpadding="0" height="100%">
<tr>
<td width="43%">
<input type="text" class="noinput" name="uid" maxlength="25" size="25" value="<%=rs("uid")%>">
</td>
<td width="13%" align="center">类 型:</td>
<td width="44%">
<select name="type">
<option value="1" <%if rs("type")=1 then response.write("selected")%>>普通用户</option>
<option value="2" <%if rs("type")=2 then response.write("selected")%>>管理员</option>
</select>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="100" height="40" align="left">密 码: </td>
<td height="40">
<table width="100%" border="0" cellspacing="0" cellpadding="0" height="100%">
<tr>
<td width="43%">
<input class="noinput" title="点击输入用户密码" type="text" name="password" maxlength="25" size="25" value="<%=rs("passwd")%>">
</td>
<td width="13%" align="center"> </td>
<td width="44%"> </td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="100" height="40" align="left">姓 名: </td>
<td height="40">
<table width="100%" border="0" cellspacing="0" cellpadding="0" height="100%">
<tr>
<td width="43%">
<input class="noinput" title="点击输入用户姓名" type="text" name="name" maxlength="25" size="25" value="<%=rs("name")%>">
</td>
<td width="13%" align="center">公文权限:</td>
<td width="44%">
<select name="power">
<option value="1" <%if rs("power")="1" then response.write("selected")%>>普通</option>
<option value="2" <%if rs("power")="2" then response.write("selected")%>>秘密</option>
<option value="3" <%if rs("power")="3" then response.write("selected")%>>绝密</option>
</select>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="100" height="40" align="left"> 电子邮箱:</td>
<td height="40">
<input title="点击输入电子邮箱" type="text" name="email" size="25" class="noinput" maxlength="25" value="<%=rs("email")%>">
</td>
</tr>
<tr>
<td width="100" height="40" align="left"> 手 机:</td>
<td height="40">
<table width="100%" border="0" cellspacing="0" cellpadding="0" height="100%">
<tr>
<td width="43%">
<input class="noinput" title="点击输入手机号码" type="text" name="mobilephone" size="25" maxlength="25" value="<%=rs("mobilephone")%>">
</td>
<td width="13%" align="center">部 门:</td>
<td width="44%">
<select name="dep" onChange="choosedep()">
<% set ptr=server.createobject("adodb.recordset")
sql1="select * from depart"
ptr.open sql1,conn,1,1
%>
<%while not ptr.eof %>
<option value="<%=ptr("depno")%>" <%if rs("depid")=ptr("depno") then response.write("selected")%>> <%=ptr("depname")%></option>
<%ptr.movenext
wend
ptr.close
set ptr=nothing
%>
</select>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="100" height="40" align="left"> 电 话:</td>
<td height="40">
<input type="text" class="noinput" title="点击输入办公电话" name="workphone" size="25" maxlength="25" value="<%=rs("workphone")%>">
</td>
</tr>
</table>
</td>
</tr>
</table>
<table width="85%" border="0" cellspacing="0" cellpadding="0">
<tr height="1">
<td bgcolor="0066CC" height="1"></td>
</tr height="1">
<tr>
<td bgcolor="ffffff" height="1"></td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr height="20">
<td ></td>
<td></td>
</tr>
<tr>
<td width="30"> </td>
<td>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="100" align="left">备 注:</td>
<td>
<textarea name="bz" rows="5" cols="69" class="body1"><%=rs("bz")%></textarea>
</td>
</tr>
</table>
</td>
</tr>
</table>
<input type="hidden" name="depname">
<input type="hidden" name="choose">
<input type="hidden" name="id" value="<%=CLng(request("id"))%>">
</div>
</td>
</tr>
</table>
</form>
<!--#include file="close.asp"-->
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -