📄 admin_editpass.asp
字号:
<!--#include file="admin_head.asp"-->
<!--#include file="md5.asp"-->
<br><br>
<%
if request("method") = 1 then
Unid = Request.Form("Unid")
if Trim(Request.Form("username")) = "" then
Errmsg = "<li>请输入用户名。"
FoundErr = true
else
username = Qcdn.checkStr(Trim(Request.Form("username")))
end if
if Trim(Request.Form("pass1")) = "" or Trim(Request.Form("pass2")) = "" then
Errmsg = Errmsg + "<li>请输入密码及确认密码。"
FoundErr = true
elseif Trim(Request.Form("pass1"))<>Trim(Request.Form("pass2")) then
Errmsg = Errmsg + "<li>输入的密码和确认密码不符。"
FoundErr = true
else
password = Qcdn.checkStr(Trim(Request.Form("pass1")))
password = md5(password,16)
end if
if FoundErr then
Call Qcdn.Err_List(Errmsg,1)
Response.end
end if
sql = "Update article_admin set username = '"& username &"',[password] = '"& password &"' where id = " & Unid
conn.execute(sql)
Response.write("<script>alert(""修改成功"");location.href=""admin_EditPass.asp"";</script>")
Response.end
end if
Admin_Name = Session("Admin_Name")
sql = "Select id,flag from article_admin where username = '" & Admin_Name & "'"
set rs = conn.execute(sql)
if not rs.eof then
Unid = rs(0)
flag = rs(1)
rs.close
end if
%>
<table width="95%" border="1" cellspacing="0" cellpadding="3" align="center" bordercolorlight="#ECEEE4" bordercolordark="#CCCABC">
<form name="form1" action="" method="post">
<input type="hidden" name="unid" value="<%=Unid%>">
<tr>
<td colspan="7" align="center" height="30" background="image/tablebg.gif"><b>修 改 用 户 信 息</b> </td>
</tr>
<tr>
<td width="20%" height="25">用 户 名:</td>
<td height="25">
<input name="username" type="text" id="username" size="30" maxlength="20" value="<%=Admin_Name%>"></td>
</tr>
<tr>
<td height="25">密 码:</td>
<td height="25">
<input name="pass1" type="password" id="pass1" size="30" maxlength="20"></td>
</tr>
<tr>
<td height="25">确认密码:</td>
<td height="25">
<input name="pass2" type="password" id="pass2" size="30" maxlength="20"></td>
</tr>
<tr>
<td height="25" colspan="2" align="center"><input type="submit" name="Submit" value="提交" class="tbutton">
<input type="reset" name="Submit2" value="重置" class="tbutton"></td>
</tr>
<input type="hidden" name="method" value="1">
</form>
</table>
<!--#include file="admin_copy.asp"-->
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -