📄 userinfo.asp
字号:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="nimda/config.asp"-->
<!--#include file="edulcni/conn.asp"-->
<!--#include file="edulcni/chk.asp"--> <%
if request.cookies(cookieName)("UserName")="" then
response.Redirect "reg.asp"
response.End
end if
set rs=server.CreateObject("adodb.recordset")
if NOT isempty(request("SaveSubmit")) then
dim UserName
UserName=request.cookies(cookieName)("UserName")
rs.open "select UserEmail,realname,UserQuestion,UserAnswer from [user] where UserName='"&UserName&"'",conn,1,3
rs("UserEmail")=trim(request("UserEmail"))
rs("realname")=trim(request("realname"))
rs("UserQuestion")=trim(request("UserQuestion"))
if trim(request("UserAnswer"))<>""then
rs("UserAnswer")=md5(trim(request("UserAnswer")))
end if
rs.update
rs.close
end if
rs.open "select UserEmail,vip,identify,UserQuestion,realname from [user] where UserName='"&request.cookies(cookieName)("UserName")&"' ",conn,1,1
Dim Rank
Rank="普通会员"
If rs("vip")=true then
Rank = "VIP会员"
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>E书部落—网上书城</title>
<link href="style.css" rel="stylesheet" type="text/css">
</head>
<body>
<!--#include file="head.htm"-->
<table width="778" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="218" align="left" valign="top" style="border-left: 1px dotted #65A8CF; border-top: 1px dotted #65A8CF; border-bottom: 1px dotted #65A8CF"><!--#include file="uleft.asp"--> <br></td><td width="560" align="left" valign="top" style="border-left: 1px dotted #65A8CF; border-right:1px dotted #65A8CF; border-top: 1px dotted #65A8CF; border-bottom: 1px dotted #65A8CF">
<br> <table border="0" cellpadding="0" cellspacing="0">
<tr>
<td><img src="images/w.gif" width="18" height="18"></td>
<td style="color:#415373">个人资料</td>
</tr>
</table> <br> <form name=userinfo method=post action="">
<table border=0 align=center cellpadding=3 cellspacing=3>
<tr>
<td bgcolor=#FFFFFF >用 户 名: <font color=#FF6600>
<% = request.cookies(cookieName)("UserName") %>
</font></td>
</tr>
<tr>
<td bgcolor=#FFFFFF >会员级别: [<b><font color=#FF6600>
<% = Rank %>
</font></b>]</td>
</tr>
<tr>
<td bgcolor=#FFFFFF >E-Mail :
<input name=UserEmail type=text id=UserEmail value=<% =trim(rs("UserEmail")) %>></td>
</tr>
<tr>
<td bgcolor=#FFFFFF >真实姓名:
<input name=realname type=text id=realname value=<% = trim(rs("realname"))%>></td>
</tr>
<tr>
<td bgcolor=#FFFFFF >密码提问:
<input name=UserQuestion type=text id=UserQuestion value=<% = trim(rs("UserQuestion"))%>>
(用于密码遗忘时使用)</td>
</tr>
<tr>
<td bgcolor=#FFFFFF >密码答案:
<input name=UserAnswer type=text id=UserAnswer>
(密码遗忘时将验证此答案)</td>
</tr>
<tr>
<td height=32 align="center" bgcolor=#FFFFFF ><input name=SaveSubmit type=submit id="SaveSubmit" onClick='return checkuserinfo();' value=提交保存>
<script language="JavaScript" type="text/JavaScript">
function checkuserinfo()
{
if(document.userinfo.UserEmail.value.length!=0)
{
if (document.userinfo.UserEmail.value.charAt(0)=="." ||
document.userinfo.UserEmail.value.charAt(0)=="@"||
document.userinfo.UserEmail.value.indexOf('@', 0) == -1 ||
document.userinfo.UserEmail.value.indexOf('.', 0) == -1 ||
document.userinfo.UserEmail.value.lastIndexOf("@")==document.userinfo.UserEmail.value.length-1 ||
document.userinfo.UserEmail.value.lastIndexOf(".")==document.userinfo.UserEmail.value.length-1)
{
alert("Email地址格式不正确!");
document.userinfo.UserEmail.focus();
return false;
}
}
else
{
alert("Email不能为空!");
document.userinfo.UserEmail.focus();
return false;
}
}
</script>
<%
rs.close
set rs=nothing
%></td>
</tr>
</table>
</form></td>
</tr>
</table>
<!--#include file="foot.htm"-->
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -