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

📄 userpasssave.asp

📁 3ani桑尼网络wap导航程序wap导航程序wap导航程序
💻 ASP
字号:
<!--#include file="conn.asp"-->
<%
	dim username
	dim oldpassword
	dim newpassword
	dim msg
	dim founderr
	founerr=false
	
	if trim(request.form("username"))="" then
  		founderr=true
  		errmsg="<li>帐号不能为空</li>"
	end if
	if trim(request.form("oldpassword"))="" then
 		founderr=true
  		errmsg="<li>旧密码不能为空</li>"
	end if
	if trim(request.form("newpassword"))="" then
  		founderr=true
  		errmsg="<li>新密码不能为空</li>"
	end if

	if founderr=false then
		username=request("username")
		oldpassword=request("oldpassword")
		newpassword=request("newpassword")

	set rs=server.createobject("adodb.recordset")
%>                  
<HTML>
<HEAD>
<TITLE>密码修改</TITLE>
<META content="text/html; charset=gb2312" http-equiv=Content-Type><LINK 
href="main.css" rel=stylesheet type=text/css>
<META content="Microsoft FrontPage 6.0" name=GENERATOR>
</HEAD>
<BODY aLink=#000000 bgColor=#FFD89D leftMargin=0 link=#000000 text=#000000 topMargin=0 vLink=#000000>
<%
	sql="select * from admin where adminname='"&username&"' and password='"&oldpassword&"'"
	rs.Open sql,conn,1,3
	if rs.eof or rs.bof then
%>
<script language=vbscript>
	alert ("帐号或密码错误!")
	location.href = "javascript:history.back()"
</script>
<%
  else
	rs("password")=newpassword
	rs.update
%>
<script language=vbscript>
	alert ("密码修改成功!")
	location.href = "javascript:window.close()"
</script>
<%
 end if
 set rs=nothing
 	conn.close
 	set conn=nothing
 else
 response.write "由于以下的原因不能保存数据:"
 response.write errmsg
 end if
%>
</BODY>
</HTML>

⌨️ 快捷键说明

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