📄 user.asp
字号:
sql="select top 17 info,url from freindsite order by id desc"
rs.open sql,db,1,1
%>
<%do while not rs.eof%>
· <a href="<%=rs("url")%>" target="_blank"><%=rs("info")%></a><br>
<%
rs.movenext
loop
%>
<% rs.close %>
</TD></TR></TABLE></td>
<td align="left" width="4" background="images/sidebox-content-right.gif"><img src="images/sidebox-content-right.gif" width="4" height="1" alt=""></td>
</tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="150">
<tr>
<td align="left" width="150" height="9"><img src="images/sidebox-bottom.gif" width="150" height="9" alt=""></td>
</tr>
</table>
</td>
<td width="100%"><table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td align="left" width="4" height="10"><img src="images/a1.gif" width="4" height="10" alt=""></td>
<td height="10" background="images/a2.gif"><img height="10"></td>
<td align="right" width="4" height="10"><img src="images/a3.gif" width="4" height="10" alt=""></td>
</tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" bgcolor="#99CCFF" width="100%">
<tr>
<td align="left" width="5" background="images/sidebox-title-left.gif"><img src="images/sidebox-title-left.gif" width="5" height="16" alt=""></td>
<td width="100%" background="images/title-bg.gif" align="center"><font color="#363636"><a href="user.asp"><b>※ 会 员 中 心 ※</b></a></font></td>
<td align="left" width="5" background="images/sidebox-title-right.gif"><img src="images/sidebox-title-right.gif" width="5" height="16" alt=""></td>
</tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td align="left" width="4" height="7"><img src="images/b1.gif" width="4" height="7" alt=""></td>
<td height="7" background="images/b2.gif"><img height="7"></td>
<td align="right" width="4" height="7"><img src="images/b3.gif" width="4" height="7" alt=""></td>
</tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" bgcolor="#99CCFF" width="100%" height="600">
<tr>
<td align="left" width="4" background="images/sidebox-content-left.gif"><img src="images/sidebox-content-left.gif" width="4" height="1" alt=""></td>
<td bgcolor="#99CCFF" valign='top'>
<%
if request.cookies("user")("username")="" then
response.write "<br><br><br><br><center><font color=red>你还没有登录本站呢。不能修改你的资料!</font><br><br>请先登录再修改会员资料!</center>"
end if
%>
<%if request.cookies("user")("username")<>"" then%>
<%if request("action")="" then%>
<%
user=request.cookies("user")("username")
pass=request.cookies("user")("password")
set rs=server.createobject("adodb.recordset")
sql="select * from user where user='"&user&"' and pass='"&pass&"'"
rs.open sql,db,1,3
%>
<script language=javascript>
<!--
function reg_check()
{
if (reg.user.value=="")
{ alert("请填写您的 用户名称 !\n\n必须>=2个字符(1个汉字)且必须<=20个字符(10个汉字)"); return false; }
if (reg.realname.value=="")
{ alert("请填写您的真实姓名 !\n\n必须为汉字!"); return false; }
if (reg.pass.value=="")
{ alert("请填写您的 密码 !"); return false; }
if (reg.pass2.value=="")
{ alert("请填写您的 确认密码 !"); return false; }
if (reg.pass1.value=="")
{ alert("请填写您的 密码钥匙 !\n\n必须>=4个字符且必须<=20个字符"); return false; }
if (reg.mail.value=="")
{ alert("请填写您的 Email !"); return false; }
if (reg.qq.value=="")
{ alert("请填写您的 QQ !"); return false; }
}
-->
</script>
<br>
<table border=0 width='100%' cellspacing=0 cellpadding=2>
<form name=reg action='user.asp?action=modify' method=post>
<tr><td></td><td><img src=<%=rs("myphotourl")%> width=120 height=100 border=0 alt="我的头像"></td></tr>
<tr><td height='10'> </td></tr>
<tr><td align=right width=40%>用户名称: </td><td align='left'><input type=text name=user size=20 maxlength='20' readonly value=<%=rs("user")%>> <font color='#ff0000'>*</font></td></tr>
<tr><td align=right width=40%>真实姓名: </td><td><input type=text name=realname size=20 maxlength=50 value=<%=rs("realname")%>> <font color='#ff0000'>*</font> </td></tr>
<tr><td align=right width=40%>出生年日: </td><td><input type=text name=birthday size=20 maxlength=50 value=<%=rs("birthday")%>> <font color='#ff0000'>*</font> </td></tr>
<tr><td align=right width=40%>登陆密码: </td><td><input type=password name=pass size=20 maxlength='20'> <font color='#ff0000'>*</font> </td></tr>
<tr><td align=right width=40%>确认密码: </td><td><input type=password name=pass2 size=20 maxlength='20'> <font color='#ff0000'>*</font> </td></tr>
<tr><td align=right width=40%>密码钥匙: </td><td><input type=text name=pass1 size=20 maxlength='20' readonly value=<%=rs("pass")%>> <font color='#ff0000'>*</font> </td></tr>
<tr><td align=right width=40%>E - mail: </td><td><input type=text name=mail size=20 maxlength=50 value=<%=rs("mail")%>> <font color='#ff0000'>*</font> </td></tr>
<tr><td align=right width=40%>电 话: </td><td><input type=text name=tel size=20 maxlength=50 value=<%=rs("tel")%>></td></tr>
<tr><td align=right width=40%>Q Q: </td><td><input type=text name=qq size=20 maxlength=50 value=<%=rs("qq")%>> <font color='#ff0000'>*</font> </td></tr>
<tr><td align=right width=40%>个人简介: </td><td><input type=text name=info size=35 maxlength=80 value=<%=rs("info")%>></td></tr>
<tr><td align=right width=40%>您的性别: </td><td> <input type=radio name=sex value='男' checked> 男 <input type=radio name=sex value='女'> 女 <font color='#ff0000'>*</font> </td></tr>
<tr><td align=right width=40%>用户头像: </td><td><input type=text name=myphotourl size=40 maxlength=50 value=<%=rs("myphotourl")%>> <a href='upfile.asp' target=_blank>上传图片</a></td></tr>
<tr><td height='10'></td></tr>
<tr><td></td><td><input type=submit value=' 修 改 资 料 ' onclick="return reg_check()"> </form>
<form name=ask action='user.asp?action=ask' method=post><input type=submit value=' 申请成为管理员 '></form></td></tr>
</table>
<p><font color=red> 修改说明:</font>带*号的为必填项,请认真填写!用户名称可以是大小写英文字母(a~z、A~Z)、阿拉伯数字(0~9)、连接字符“-”、下划线“_”和汉字组成,首字符不能为连接字符“-”或下划线“_”。为了帐户安全,登陆密码和密码钥匙长度必须>=4且<=12个字符。密码钥匙为用来找回密码之用。出生年日格式为:19xx年xx月xx日,或19xx-xx-xx。用户头像地址前必须加http://。</p>
<%end if%>
<%if request("action")="modify" then%>
<%
user=trim(request("user"))
realname=trim(request("realname"))
birthday=trim(request("birthday"))
pass=trim(request("pass"))
if pass<>"" then
pass=pass
else
pass=request.cookies("user")("password")
end if
pass2=trim(request("pass2"))
mail=trim(request("mail"))
tel=trim(request("tel"))
qq=trim(request("qq"))
info=trim(request("info"))
sex=trim(request("sex"))
myphotourl=trim(request("myphotourl"))
if pass<>pass2 then
response.write "<br><br><br><center><font color=red>对不起,密码与确认密码不相同!<br><br><a href='user.asp'>返回重填</a>"
end if
if pass=pass2 then
sql="update user set realname='"&realname&"',birthday='"&birthday&"',pass='"&pass&"',mail='"&mail&"',tel="&tel&",qq="&qq&",info='"&info&"',sex='"&sex&"',myphotourl='"&myphotourl&"' where user='"&user&"'"
db.execute(sql)
if db.errors.count>0 then
response.write "<br><br><br><center><font color=red>保存过程中发生错误,必须重新填写!<br><br><a href='user.asp'>返回重填</a>"
else
response.cookies("user")("password")=pass
response.write "<br><br><br><center><font color=red>恭喜你!你已经成功修改资料!<br><br><a href='user.asp'>返回</a>"
end if
end if
%>
<%end if%>
<%end if%>
<%
if request("action")="ask" then
user=request.cookies("user")("username")
sql="update user set ask='是' where user='"&user&"'"
db.execute(sql)
if db.errors.count>0 then
response.write "<br><br><br><center><font color=red>申请过程中发生错误,必须重新申请!<br><br><a href='user.asp'>返回重新申请</a>"
else
response.write "<br><br><br><center><font color=red>恭喜你!你已经成功申请!请等待管理员验证!<br><br>管理员验证后,你将收到消息!谢谢合作,不用重复申请!<br><br><a href='user.asp'>返回继续修改</a>"
end if
end if
%>
</td>
<td align="left" width="4" background="images/sidebox-content-right.gif"><img src="images/sidebox-content-right.gif" width="4" height="1" alt=""></td>
</tr>
</table>
</td>
<table width="780" cellpadding="0" cellspacing="0" border="0" align="center">
<tr valign="top">
<td><img src="images/column-footer.gif" width="780" height="16" border="0" alt=""></td>
</tr>
</table>
<table width="780" cellpadding="0" cellspacing="0" border="0" align="center">
<tr valign="top">
<td><img src="images/footer.gif" width="780" height="20" border="0" alt=""></td>
</tr>
</table>
<!-- footer -->
<table width="780" cellpadding="0" cellspacing="0" border="0" align="center">
<tr align="center">
<td width="100%" colspan="3"><%
set rs=server.createobject("adodb.recordset")
sql="select top 1 copyright from system order by id desc"
rs.open sql,db,1,1
%>
<%=rs("copyright")%>
<% rs.close %>
</td>
</tr>
</table>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -