www.pudn.com > QQ.zip > ModiInfo.asp, change:2009-07-11,size:2376b


<!--#include file="conn.asp"--> 
<% 
  if session("admin")="" then 
    Response.Write("<script>alert('用户未登录,请登录!');top.location='../admin.asp';</script>") 
	Response.end 
  end if 
  if Request.form.count>0 then 
     set rs=server.createobject("adodb.recordset") 
	 sql="select pwd from tb_user_info where UserName='" & session("login_UserName") &"'" 
	 rs.open sql,conn,1,1 
	 if rs.recordcount=0 then 
		Response.Write("<script>alert('用户不存在,修改失败!');history.back();</script>") 
		Response.end 
	 else 
	   if Request.form("oldPassWord")=rs("pwd") then 
 
	       sql="update tb_user_info set PWD='" & replace(Request.form("PassWord"),"'","''") &"',RealName='" & replace(Request.form("RealName"),"'","''") &"' where UserName='" & session("login_UserName") &"'" 
		   conn.execute sql 
		   Response.redirect("../right.asp") 
	   else 
			Response.Write("<script>alert('旧密码错误,修改失败!');history.back();</script>") 
			Response.end 
	   end if 
	     
	 end if 
  end if 
%> 
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> 
<html> 
<head> 
<meta http-equiv="Content-Type" content="text/html; charset=gb2312"> 
<title>无标题文档</title> 
</head> 
 
<body> 
<table width="100%" border="1"> 
  <form name="form1" method="post" action=""> 
  <tr> 
    <td colspan="2"><div align="center">游戏帐号信息修改</div></td> 
  </tr> 
  <tr> 
    <td width="16%" align="right">用户名:</td> 
    <td width="84%"> 
      <input name="UserName" type="text" id="UserName" value="<%=Session("login_UserName")%>" readonly>    </td> 
  </tr> 
  <tr> 
    <td align="right">旧密码:</td> 
    <td><input name="oldPassWord" type="password" id="oldPassWord"></td> 
  </tr> 
  <tr> 
    <td align="right">新密码:</td> 
    <td><input name="PassWord" type="password" id="PassWord"></td> 
  </tr> 
  <tr> 
    <td align="right">密码确认:</td> 
    <td><input name="PassWord1" type="password" id="PassWord1"></td> 
  </tr> 
  <tr> 
    <td align="right">真实姓名:</td> 
    <td><input name="RealName" type="text" id="RealName" value="<%=Session("login_RealName")%>"></td> 
  </tr> 
  <tr> 
    <td colspan="2"><div align="center"> 
      <input type="submit" name="Submit" value="修改">  
       <input type="reset" name="Submit2" value="重置"> 
    </div></td> 
    </tr> 
  </form> 
</table> 
</body> 
</html>