⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 adminedit.asp

📁 汽车销售集团网站汽车销售集团网站汽车销售集团网站汽车销售集团网站
💻 ASP
字号:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file=../DataBase/conn.asp-->
<% 
'获取用户
set rs1=server.CreateObject("adodb.recordset")
sql1="select * from admin where id=1 "
rs1.open sql1,conn,1,3
if request("post")<>"" then 
	'严整两次输入密码是否一直
	if request("username")<>"" and request("userpwd")<>"" and request("userpwd1")<>"" then
		if request("userpwd")<>request("userpwd1") then
			response.Write("<script language=javascript>alert('两次输入密码不一致');location='javascript:history.go(-1)'</script>")
		else
			set rs=server.CreateObject("adodb.recordset")
			sql="select * from admin where id=1 "
			rs.open sql,conn,1,3
			
			rs("username")=request("username")
			rs("userpwd")=request("userpwd")
			rs.update
			rs.close
			response.Write("<script language=javascript>alert('修改成功');window.close()</script>")
		end if
	else
		response.Write("<script language=javascript>alert('信息内容不能为空');location='javascript:history.go(-1)'</script>")
	end if
end if
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>修改密码</title>
<style type="text/css">
<!--
.style1 {
	font-size: 16px;
	font-weight: bold;
	color: #FF0000;
}
body {
	background-color: #efefef;
}
body,td,th {
	font-size: 12px;
}
-->
</style>
</head>

<body topmargin="0">
<form name="form1" method="post" action="">
  <table width="380" height="203"  border="0" align="center">
    <tr>
      <td height="33" colspan="2"><div align="center" class="style1">修改密码</div></td>
    </tr>
    <tr>
      <td width="119"><div align="right">用户名:</div></td>
      <td width="251"><input name="username" type="text" id="username" value="<%=rs1("username")%>">
      <input name="post" type="hidden" id="post" value="true"></td>
    </tr>
    <tr>
      <td> <div align="right">密 码:</div></td>
      <td><input name="userpwd" type="password" id="userpwd2" value="<%=rs1("userpwd")%>"></td>
    </tr>
    <tr>
      <td><div align="right">确认密码:</div></td>
      <td><input name="userpwd1" type="password" id="userpwd1" value="<%=rs1("userpwd")%>"></td>
    </tr>
    <tr>
      <td colspan="2"><div align="center">
        <input type="submit" name="Submit" value="提交">
         
        <input type="reset" name="Submit2" value="重置">
      </div></td>
    </tr>
  </table>
</form>
</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -