📄 modifyuserinfo.asp
字号:
<%
if request.cookies("userloginok")="" then
response.redirect "login.htm"
end if
%>
<!--#include file="conn.asp"-->
<%
if request("action")="update" then
set rs_pwd=server.createobject("adodb.recordset")
sqlpwd="select * from userb where userid='"&request("uid")&"' and password='"&request("pwd")&"'"
rs_pwd.open sqlpwd,conn,1,1
if rs_pwd.recordcount=0 then
%>
<script language="vbscript">
<!--
window.alert"您输入的密码不正确!"
window.history.go(-1)
//-->
</script>
<%
else
rs_pwd.close
set rs_userinfo=server.createobject("adodb.recordset")
sqltext="select * from userb where userid='"&request("uid")&"'"
rs_userinfo.open sqltext,conn,3,3
rs_userinfo("username")=request("username")
rs_userinfo("sex")=request("sex")
rs_userinfo("birthday")=request("birthday")
rs_userinfo("idcard")=request("idcard")
rs_userinfo("zip")=request("zip")
rs_userinfo("address")=request("address")
rs_userinfo("telphone")=request("tel")
rs_userinfo.update
rs_userinfo.close
conn.close
%>
<script language="vbscript">
<!--
window.alert"恭喜,会员资料修改成功!"
window.history.go(-1)
//-->
</script>
<%
end if
else
dim uid ,upwd
uid=trim(Request("uid"))
set rs=server.createobject("adodb.recordset")
sqltext="select * from userb where userid='" & uid & "'"
rs.open sqltext,conn,1,1
%><html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<link rel="stylesheet" href="style.css" type="text/css">
<title>修改会员资料</title>
<SCRIPT LANGUAGE="JavaScript">
<!--//
function memberform_onsubmit() {
if (document.memberform.pwd.value.length == 0)
{
window.alert("请输入你的口令!!");
document.memberform.pwd.focus();
}
else if (document.memberform.IDCardNo.value.length > 0 && ! isChinaIDCard_J(document.memberform.IDCardNo.value) )
{
window.alert("请输入正确的身份证号码!!");
document.memberform.IDCardNo.select();
document.memberform.IDCardNo.focus();
}
else
{
return true;
}
return false;
}
//-->
</SCRIPT>
</head>
<body>
<p> </p>
<div align="center">
<center>
<table border="0" cellspacing="0" width="95%" height="240">
<tr>
<td width="100%" height="3" valign="top" colspan="3">
<hr color="#FF0000" size="1">
</td>
</tr>
<tr>
<td width="24%" height="238" valign="top" bgcolor="#6688CC">
<div align="center">
<table border="0" width="100%" cellpadding="3" class=main1>
<tr>
<td width="7%"></td>
<td width="93%"><a href="UserInfo.asp?uid=<%=rs("userid")%>">查询个人资料</a></td>
</tr>
<tr>
<td width="7%"></td>
<td width="93%"><a href="ModifyUserInfo.asp?uid=<%=rs("userid")%>">修改个人资料</a></td>
</tr>
<tr>
<td width="7%"></td>
<td width="93%"><a href="ModifyUserEmail.asp?uid=<%=rs("userid")%>">修改Email地址</a></td>
</tr>
<tr>
<td width="7%"></td>
<td width="93%"><a href="ModifyUserPwd.asp?uid=<%=rs("userid")%>">修改口令</a></td>
</tr>
<tr>
<td width="7%"></td>
<td width="93%"><a href="OrderInfo.asp?uid=<%=rs("userid")%>">订单修改&查询</a></td>
</tr>
</table>
</div>
</td>
<td width="2%" height="238"></td>
<td width="74%" height="238" valign="top">
<div align="center">
<form action=ModifyUserInfo.asp method=post name=memberform onsubmit="return memberform_onsubmit();">
<input type=hidden name=uid value=<%=rs("userid")%>>
<input type=hidden name=action value="update">
<table border="0" cellpadding="3" width="100%" class=main1 cellspacing="1">
<tr>
<td width="100%" bgcolor="#1F60A0" colspan="2"><font class="medium" color="white"><b>会员服务
>> 修改会员资料</b></font></td>
</tr>
<tr>
<td width="100%" colspan="2">
<table width="522">
<tr class=main1>
<td width="359"><font class="medium">为了确保本次修改是合法的,请输入你的口令以便确认:</font></td>
<td width="143">
<p><INPUT TYPE="PASSWORD" NAME="pwd" MAXLENGTH="20" CLASS="medium" style="font-family: 新细明体, 宋体, Arial; font-size: 14px; height: 20; background-color: #f3f3f3; width: 147; border: 1 solid black" onMouseOver = "this.style.backgroundColor = '#E5F0FF'" onMouseOut = "this.style.backgroundColor = ''" size="20">
</p>
</td>
</table>
</td>
</tr>
<tr>
<td width="100%" bgcolor="#1F60A0" colspan="2"><font class="medium" color="#ffffff">基本资料</font></td>
</tr>
<tr>
<td width="21%" align="right" bgcolor="#EFEFEF"><font class="medium"><span class="medium">用户名</span>:</font></td>
<td width="79%"><%=rs("userid")%></td>
</tr>
<tr>
<td width="21%" align="right" bgcolor="#EFEFEF"><span class="medium">电子邮件</span><font class="medium">:</font></td>
<td width="79%"><%=rs("email")%></td>
</tr>
<tr>
<td width="21%" align="right" bgcolor="#EFEFEF">
<%if rs("sex")="男" then%><span class="medium">性别</span><font class="medium">:</font></td>
<td width="79%"><span class=medium><input type=radio name=sex value="男" checked>男
<input type=radio name=sex value="女">女</span><%else%><span class="medium">性别</span><font class="medium">:</font></td>
<td width="79%"><span class=medium><input type=radio name=sex value="男">男
<input type=radio checked name=sex value="女">女</span><%end if%></td>
</tr>
<tr>
<td width="100%" colspan="2" bgcolor="#1F60A0"><font class="medium" color="#ffffff">补充资料</font></td>
</tr>
<tr>
<td width="21%" bgcolor="#EFEFEF" align="right"><font class="Medium">真实姓名</font><font class="medium">:</font></td>
<td width="79%"><FONT CLASS="Medium">
<INPUT NAME="UserName" VALUE="<%=rs("username")%>" MAXLENGTH="20" CLASS="Medium" style="font-family: 新细明体, 宋体, Arial; font-size: 14px; height: 20; background-color: #f3f3f3; width: 88; border: 1 solid black" onMouseOver = "this.style.backgroundColor = '#E5F0FF'" onMouseOut = "this.style.backgroundColor = ''" size="20"></FONT></td>
</tr>
<tr>
<td width="21%" bgcolor="#EFEFEF" align="right"><font class="medium"><span class="medium">生日</span>:</font></td>
<td width="79%"><span class=medium><input name=birthday value=<%=rs("birthday")%> size=20 maxlength=18 class=medium style="font-family: 新细明体, 宋体, Arial; font-size: 14px; height: 20; background-color: #f3f3f3; width: 100; border: 1 solid black" onMouseOver = "this.style.backgroundColor = '#E5F0FF'" onMouseOut = "this.style.backgroundColor = ''">
(yyyy-mm-dd)</span></td>
</tr>
<tr>
<td width="21%" bgcolor="#EFEFEF" align="right"><span class="medium">身份证号码</span><font class="medium">:</font></td>
<td width="79%"><span class=medium><input name=idcard value=<%=rs("idcard")%> size=20 maxlength=18 class=medium style="font-family: 新细明体, 宋体, Arial; font-size: 14px; height: 20; background-color: #f3f3f3; width: 132; border: 1 solid black" onMouseOver = "this.style.backgroundColor = '#E5F0FF'" onMouseOut = "this.style.backgroundColor = ''"></span></td>
</tr>
<tr>
<td width="21%" bgcolor="#EFEFEF" align="right"><span class="medium">邮政编码</span><font class="medium">:</font></td>
<td width="79%"><span class=medium><input name=ZIP value=<%=rs("zip")%> size=6 maxlength=6 class=medium style="font-family: 新细明体, 宋体, Arial; font-size: 14px; height: 20; background-color: #f3f3f3; width: 61; border: 1 solid black" onMouseOver = "this.style.backgroundColor = '#E5F0FF'" onMouseOut = "this.style.backgroundColor = ''"></span></td>
</tr>
<tr>
<td width="21%" bgcolor="#EFEFEF" align="right"><span class="medium">联系地址</span><font class="medium">:</font></td>
<td width="79%"><span class=medium><input name=Address value="<%=rs("address")%>" size=30 maxlength=50 class=medium style="font-family: 新细明体, 宋体, Arial; font-size: 14px; height: 20; background-color: #f3f3f3; width: 324; border: 1 solid black" onMouseOver = "this.style.backgroundColor = '#E5F0FF'" onMouseOut = "this.style.backgroundColor = ''"></span></td>
</tr>
<tr>
<td width="21%" bgcolor="#EFEFEF" align="right"><font class="medium">联系电话:</font></td>
<td width="79%"><span class=medium><input name=Tel value="<%=rs("telphone")%>" maxlength=25 class=medium style="font-family: 新细明体, 宋体, Arial; font-size: 14px; height: 20; background-color: #f3f3f3; width: 138; border: 1 solid black" onMouseOver = "this.style.backgroundColor = '#E5F0FF'" onMouseOut = "this.style.backgroundColor = ''" size="20"></span></td>
</tr>
</center>
<tr>
<td width="100%" bgcolor="#1F60A0" align="right" colspan="2">
<p align="left"><font color="#FFFFFF">提交</font></td>
</tr>
<tr>
<td width="100%" align="right" colspan="2">
<p align="left"><span class=medium>请检查你所填写的资料,保证所有资料的准确性,如日后有所变动请及时更正,谢谢!</span></td>
</tr>
<tr>
<td width="100%" align="right" colspan="2">
<p align="center"><input type=submit value=递交 class=medium name=submitReg>
<input type=reset value=重填 class=medium name=resetReg></td>
</tr>
<center>
</table>
</form>
</div>
</table>
</body>
<%
rs.close
conn.close
end if
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -