📄 admin_edituser.asp
字号:
<!--#include file="conn.asp" -->
<!--#include file="md5.inc" -->
<!--#include file="checkstr.asp" -->
<!--#include file="checkadmin.asp" -->
<!--#include file="config.asp" -->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>留溪网上办公平台_修改用户资料</title>
<!--#include file="css.css" -->
</head>
<%doing=Trim(Request.QueryString("doing"))
doing=checkstr(doing)%>
<%
editid=Int(Request.QueryString("editid"))
page=Int(Request.QueryString("page"))
sortkey=Int(Request.QueryString("sortkey"))
%>
<%'修改资料
if doing="edit1" then
edit_name=Trim(Request.Form("edit_name"))
edit_name=checkstr(edit_name)
edit_name1=Request.Form("edit_name1")
if edit_name="" then edit_name=edit_name1 end if
edit_class=Request.Form("edit_class")
edit_bumeng=Request.Form("edit_bumeng")
edit_sex=Request.Form("edit_sex")
edit_sendyn=Request.Form("edit_sendyn")
set edit_gllm=Request.Form("edit_gllm")
set edit_zhiwu=Request.Form("edit_zhiwu")
edit_gllm=replace(edit_gllm," ","")
edit_zhiwu=replace(edit_zhiwu," ","")
edit_gllm=replace(edit_gllm,",","|")
edit_zhiwu=replace(edit_zhiwu,",","|")
if edit_gllm="" then edit_gllm="|" else edit_gllm="|"&edit_gllm&"|" end if
if edit_zhiwu="" then edit_zhiwu="|无职务|" else edit_zhiwu="|"&edit_zhiwu&"|" end if
sql="select * from user_teacher where id="&editid&""
rs.open sql,conn,2,3
rs("姓名")=edit_name
rs("用户类别")=edit_class
rs("性别")=edit_sex
rs("能否发送")=edit_sendyn
rs("部门")=edit_bumeng
rs("管理栏目")=edit_gllm
rs("职务")=edit_zhiwu
rs.update
rs.close
end if
%>
<%'修改用户密码
if doing="edit2" then
edit_pass=Trim(Request.Form("edit_pass"))
edit_pass=checkstr(edit_pass)
if edit_pass<>"" then
edit_pass=ucase(md5(edit_pass))
str="update user_teacher set 密码='"&edit_pass&"' where id="&editid&""
conn.execute(str)
end if
end if
%>
<body background="images/index_bg.gif" topmargin="0">
<table width="760" height="101" border="0" align="center" cellpadding="0" cellspacing="0" class="tabletblg">
<tr>
<td><img src="images/top.jpg" width="758" height="100"></td>
</tr>
</table>
<table width="760" border="0" align="center" cellpadding="0" cellspacing="0" class="tablelrb">
<tr>
<td class="fontsize04"> </td>
</tr>
</table>
<table width="760" border="0" align="center" cellpadding="0" cellspacing="0" class="tablelrb">
<tr>
<td height="25" background="images/menu-d-gg.gif" class="fontsize12"><!--#include file="admin_menu.asp" --></td>
</tr>
</table>
<table width="760" border="0" align="center" cellpadding="0" cellspacing="0" class="tablelrb">
<tr>
<td background="images/bocolor01.gif">
<table width="600" border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="fontsize10"> </td>
</tr>
</table>
<%str="select * from user_teacher where id="&editid&""
set rs=conn.execute(str)%>
<table width="750" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td><form name="form1" method="post" action=admin_edituser.asp?doing=edit1&editid=<%=rs("id")%>&page=<%=page%>&sortkey=<%=sortkey%>>
<table width="740" border="1" align="center" cellpadding="2" cellspacing="0" borderColorLight="#000000" borderColorDark="#ffffff">
<tr>
<td width="20%" height="30"><div align="right" class="fontsize14">用
户 名:</div></td>
<td width="30%" class="fontsize12wu"><%=rs("用户名")%></td>
<td width="20%" class="fontsize14"><div align="right">用户姓名:</div></td>
<td width="30%"><input name="edit_name" type="text" class="inputtext" id="edit_name" value="<%=rs("姓名")%>" size="12">
<input name="edit_name1" type="hidden" id="edit_name1" value="<%=rs("姓名")%>"> </td>
</tr>
<tr>
<td height="30" class="fontsize14"><div align="right">用户类别:</div></td>
<td><select name="edit_class" class="inputtext" id="edit_class">
<option value="一般用户" <%if rs("用户类别")="一般用户" then response.write "selected" end if%>>一般用户</option>
<option value="超级管理员" <%if rs("用户类别")="超级管理员" then response.write "selected" end if%>>管
理 员</option>
</select> </td>
<td class="fontsize14"><div align="right">所在部门:</div></td>
<td><select name="edit_bumeng" class="inputtext" id="edit_bumeng">
<%str="select * from woa_bumeng"
set rs1=conn.execute(str)
if not rs1.eof then
do while not rs1.eof%>
<option value=<%=rs1("部门")%><%if rs("部门")=rs1("部门") then%> selected<%end if%>><%=rs1("部门")%></option>
<%rs1.movenext
loop
end if
rs1.close%>
</select> </td>
</tr>
<tr>
<td height="30"><div align="right" class="fontsize14">用户性别:</div></td>
<td><select name="edit_sex" class="inputtext" id="edit_sex">
<option value="男"<%if rs("性别")="男" then%> selected<%end if%>>男</option>
<option value="女"<%if rs("性别")="女" then%> selected<%end if%>>女</option>
</select> </td>
<td class="fontsize14"><div align="right">发送信息:</div></td>
<td><select name="edit_sendyn" class="inputtext" id="edit_sendyn">
<option value="1"<%if rs("能否发送")="1" then%> selected<%end if%>>允许</option>
<option value="0"<%if rs("能否发送")="0" then%> selected<%end if%>>禁止</option>
</select> </td>
</tr>
<tr>
<td height="30"><div align="right" class="fontsize14wu">管理栏目:</div></td>
<td colspan="3"><input name="edit_gllm" type="checkbox" class="fontsize12wu" id="edit_gllm" value="工作安排"<%if instr(rs("管理栏目"),"|工作安排|")>0 then%> checked<%end if%>>
<span class="fontsize12">工作安排</span> <input name="edit_gllm" type="checkbox" class="fontsize12wu" id="edit_gllm" value="人员去向" <%if instr(rs("管理栏目"),"|人员去向|")>0 then%> checked<%end if%>>
<span class="fontsize12">人员去向</span></td>
</tr>
<tr>
<td height="30" valign="top">
<div align="right" class="fontsize14">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="30" class="fontsize14">
<div align="right">担任职务:</div></td>
</tr>
</table>
</div></td>
<td colspan="3"><table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<%str="select * from woa_zhiwu"
set rs1=conn.execute(str)
if not rs1.eof then
m=0
do while not rs1.eof%>
<td height="26" class="fontsize12h20"><input name="edit_zhiwu" type="checkbox" id="edit_zhiwu" value=<%=rs1("职务")%><%if instr(rs("职务"),"|"&rs1("职务")&"|")>0 then%> checked<%end if%>>
<%=rs1("职务")%></td>
<%rs1.movenext
m=m+1
if m mod glhzws=0 then response.write "</tr><tr>" end if
loop
end if
rs1.close%>
</tr>
</table></td>
</tr>
<tr background="images/bocolor02.gif">
<td height="40" colspan="4" background="images/bocolor02.gif"><div align="center">
<span class="fontsize14">
<input name="Submit" type="submit" class="inputbox" value=" 提 交 ">
<input name="Submit2" type="reset" class="inputbox" value=" 重 置 ">
<a href="admin_user.asp?page=<%=page%>&sortkey=<%=sortkey%>" class="fontsize14wu">返
回</a></span></div></td>
</tr>
</table>
</td></form>
</tr>
</table>
<table width="600" border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="fontsize04"> </td>
</tr>
</table>
<table width="750" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td><form name="form2" method="post" action=admin_edituser.asp?doing=edit2&editid=<%=rs("id")%>&page=<%=page%>&sortkey=<%=sortkey%>>
<table width="740" border="1" align="center" cellpadding="2" cellspacing="0" borderColorLight="#000000" borderColorDark="#ffffff">
<tr>
<td height="40" background="images/bocolor02.gif"><table width="80%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="50%" class="fontsize14"><div align="center">新密码:
<input name="edit_pass" type="text" class="inputtext" id="edit_pass">
</div></td>
<td width="50%"> <div align="center">
<input name="Submit3" type="submit" class="inputbox" value=" 修改密码 ">
</div></td>
</tr>
</table></td>
</tr>
</table>
</td></form>
</tr>
</table>
<table width="600" border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="fontsize10"> </td>
</tr>
</table></td>
</tr>
</table>
<table width="760" border="0" align="center" cellpadding="0" cellspacing="0" class="tablelr">
<tr>
<td class="fontsize04"> </td>
</tr>
</table>
<table width="760" border="0" align="center" cellpadding="0" cellspacing="0" class="tabletblg">
<tr>
<td background="images/bocolor02.gif">
<!--#include file="bottom.asp" --></td>
</tr>
</table>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -