📄 up.asp
字号:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file=DataBase/conn.asp-->
<!--#include file=config.asp-->
<%
if request("post")<>"" then
if trim(request("admin_pwd"))="" then
response.Write("<script language=javascript>alert('密码不能为空!');location='javascript:history.go(-1)'</script>")
response.End()
end if
if trim(request("admin_pwd1"))="" then
response.Write("<script language=javascript>alert('确认密码不能为空!');location='javascript:history.go(-1)'</script>")
response.End()
end if
if request("admin_pwd")<>request("admin_pwd1") then
response.Write("<script language=javascript>alert('两次输入密码不一致');location='javascript:history.go(-1)'</script>")
response.End()
end if
set rs=server.CreateObject("adodb.recordset")
sql="select * from tb_User where username='"&session("admin_name")&"'"
rs.open sql,conn,1,3
rs("userpwd")=request("admin_pwd")
rs.update
rs.close
response.Write("<script language=javascript>alert('修改成功')</script>")
end if
set rsx=server.CreateObject("adodb.recordset")
sqlx="select * from tb_User where username='"&session("admin_name")&"'"
rsx.open sqlx,conn,1,1
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>修改密码</title>
<link href="css/css.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
body,td,th {
font-size: 12px;
}
body {
background-color: #DFEEFF;
}
-->
</style></head>
<body>
<form name="form1" method="post" action="">
<table width="301" border="0" cellspacing="0">
<tr>
<td height="24" align="right">用户名:</td>
<td><input name="textfield" type="text" value="<%=session("admin_name")%>" readonly="true">
<input name="post" type="hidden" id="post" value="true"></td>
</tr>
<tr>
<td height="24" align="right">密 码:</td>
<td><input name="admin_pwd" type="password" id="admin_pwd" value="<%=rsx("userpwd")%>"></td>
</tr>
<tr>
<td height="24" align="right">确认密码:</td>
<td><input name="admin_pwd1" type="password" id="admin_pwd1" value="<%=rsx("userpwd")%>"></td>
</tr>
<tr align="center">
<td colspan="2"><input name="Submit" type="submit" class="input" value=" 修 改 ">
<input name="Submit2" type="reset" class="input" value=" 重 置 "></td>
</tr>
</table>
</form>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -