📄 admin_user_edit.asp
字号:
<!--#include file="mdb.asp"-->
<%
if session("adminlogin")<>sessionvar then
Response.Write("<script language=javascript>alert('你尚未登录,或者超时了!请重新登录');this.location.href='admin_login.asp';</script>")
Response.End
End if
dim id,pw1,pw2,pw3,pw4
if Session("level")<2 then
Call outcome("你的权限不足")
Response.End
End if
id=request("id")
if id="" then
Call outcome("非法操作")
Response.End
end if
sql="select * from O3888_user where id="&id
set rs=conn.execute(sql)
if rs.bof and rs.eof then
rs.close
set rs=nothing
Call outcome("非法操作")
Response.End
else
username=rs("username")
email=rs("email")
logincount=rs("logincount")
verity=rs("verity")
rs.close
set rs=nothing
end if
if request("action")="doit" then
if request("pw1")="" then
Call outcome("请输入会员帐号")
Response.End
end if
if request("pw3")="" then
Call outcome("请输入会员Email")
Response.End
end if
if request("pw4")="" then
Call outcome("请输入登陆次数")
Response.End
end if
if request("pw5")="" then
Call outcome("请输入会员权限")
Response.End
end if
pw1=ReplaceBadChar(Trim(request("pw1")))
pw2=ReplaceBadChar(Trim(request("pw2")))
pw3=ReplaceBadChar(Trim(request("pw3")))
pw4=ReplaceBadChar(Trim(request("pw4")))
pw5=ReplaceBadChar(Trim(request("pw5")))
if cstr(username)<>cstr(pw1) then
set rs=server.createobject("adodb.recordset")
rs.open "select * from O3888_user where username='"&pw1&"'",conn,1,3
if rs.eof and rs.bof then
rs.close
set rs=nothing
else
rs.close
set rs=nothing
Call outcome("该会员帐号已存在")
Response.End
end if
end if
set r=server.createobject("adodb.recordset")
r.open "select * from O3888_user where id="&id,conn,1,3
if not r.eof then
r("username")=pw1
if pw2<>"" then r("password")=md5(pw2)
r("email")=pw3
r("logincount")=pw4
r("verity")=pw5
r.update
r.close
set r=nothing
Call outcome("会员信息已成功更改")
Response.End
else
r.close
set r=nothing
Call outcome("非法操作")
Response.End
end if
end if
%>
<html>
<head>
<title>修改会员信息</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<LINK REL="stylesheet" HREF="css.css" TYPE="text/css">
</head>
<body>
<table width="96%" border="0" cellspacing="1" cellpadding="8" align="center" class="b">
<tr>
<td align="center">更改会员信息</td>
</tr></table>
<table width="96%" border="0" cellspacing="1" cellpadding="8" align="center" class="a">
<form action="admin_user_edit.asp?id=<%=id%>" method="post">
<tr>
<td width="20%"><br>会员帐号:</td>
<td width="80%"><input type="txt" name="pw1" value=<%=username%>> <font color="red">*</font></td>
</tr>
<tr>
<td>会员密码:</td>
<td><input type="password" name="pw2" value=""> 如不修改,请留空</td>
</tr>
<tr>
<td width="100">会员Email:</td>
<td><input type="txt" name="pw3" value=<%=email%>> <font color="red">*</font></td>
</tr>
<tr>
<td width="100">登陆次数:</td>
<td><input type="txt" name="pw4" value=<%=logincount%>> <font color="red">*</font></td>
</tr>
<tr>
<td width="100">权限:</td>
<td>
<%
if verity=1 then
Response.Write "<input type='radio' value='1' name='pw5' checked> <font color=red>正常</font> <input type='radio' name='pw5' value='0'> 锁定"
else
Response.Write "<input type='radio' value='1' name='pw5'> 正常 <input type='radio' name='pw5' value='0' checked> <font color=red>锁定</font>"
end if
%>
</td>
</tr>
<tr>
<td></td>
<td><input type="submit" class="d"></td>
<input type="hidden" value="doit" name="action">
</form>
</tr>
<td align="center" colspan="2">[<A href='http://www.03888.com/' target=_blank>03888网址大全</A>]</td>
</tr>
</table>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -