📄 savereg.asp
字号:
<!--#include file="conn.asp"-->
<!--#include file="const.asp"-->
<%
username=request("username")
password=request("password")
email=request("email")
intro=request("intro")
sex=request("sex")
addtime=date()
'效验用户名和内容
If username="" or password="" or email="" or intro="" Then
response.write "对不起! <br>"
response.write "输入各栏不能为空"
response.write(" <br><a href=vbscript:history.back()>返回重来</a>")
response.end
end if
if Instr(email,"@")=0 Then
response.write "对不起! <br>"
response.write "这是什么邮箱地址?一看就是假的!"
response.write(" <br><a href=vbscript:history.back()>返回重来</a>")
response.end
end if
if len(password)>=20 then
response.write("<table width=300 border=0 cellspacing=0 cellpadding=0 align=center>")
response.write("<tr><td>--密码有那么长吗?--</td></tr>")
response.write(" <tr><td>---<a href=vbscript:history.back()>返回重来</a>---</td></tr>")
response.write("</table>")
response.end
end if
if len(username)>=20 then
response.write("<table width=300 border=0 cellspacing=0 cellpadding=0 align=center>")
response.write("<tr><td>--名字有那么长吗?--</td></tr>")
response.write(" <tr><td>---<a href=vbscript:history.back()>返回重来</a>---</td></tr>")
response.write("</table>")
response.end
end if
if len(intro)>=1000 then
response.write("<table width=300 border=0 cellspacing=0 cellpadding=0 align=center>")
response.write("<tr><td>--你的自我介绍太长,请简明扼要!--</td></tr>")
response.write(" <tr><td>---<a href=vbscript:history.back()>返回重来</a>---</td></tr>")
response.write("</table>")
response.end
end if
if len(emill)>=30 then
response.write("<table width=300 border=0 cellspacing=0 cellpadding=0 align=center>")
response.write("<tr><td>--邮箱有那么长吗?--</td></tr>")
response.write(" <tr><td>---<a href=vbscript:history.back()>返回重来</a>---</td></tr>")
response.write("</table>")
response.end
end if
set rs=server.createobject("adodb.recordset")
set rs=conn.execute("Select * from admin Where username='"&trim(request.form("username"))&"'")
if not rs.eof then
response.write("错误:<p>用户名:"&request.form("username")&"已经被其他人使用,请使用其他用户名!<p><a href=javascript:history.back()>按此返回>></a>")
rs.close
else
Set rs = Server.CreateObject("ADODB.Recordset")
sql="select * from admin"
rs.open sql,conn,1,3
rs.addnew
rs("username")=username
rs("password")=password
rs("email")=email
rs("intro")=intro
rs("addtime")=addtime
rs("sex")=sex
rs("score")=0
rs.update
rs.close
rs=noting
conn.close
set conn=nothing
%>
<html>
<head>
<title></title>
<STYLE type=text/css>
BODY {font-size:12px;font-family:"Tahoma", "Verdana", "MS Sans Serif", "宋体", "Courier New";}
A:link {COLOR: #333333;text-decoration:none;}
A:visited {COLOR: teal;text-decoration:none;}
A:hover {COLOR: red; text-decoration: none}
FONT {TEXT-DECORATION: none; font-family: "Verdana", "Arial", "Helvetica", "sans-serif"; font-size: 12px}
TEXTAREA{color:#333333;background-color:#FFFFFF;border:1 solid #101010; font-family: "Verdana", "Arial", "Helvetica", "sans-serif"; font-size: 12px}
TD { font-size:12px; } SELECT { color:#333333;background-color:#FFFFFF;border:1 solid #101010 ; font-family: "宋体"; font-size: 9pt} .myin { font-family: "Verdana", "Arial", "Helvetica", "sans-serif"; font-size: 12px; border: #333333; border-style: solid; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; background-color: #FFFFFF}
hr { color: #CCCCCC}
</style>
</head>
<body>
<div align="center"><center>
<p> </p>
<table border="1" cellspacing="0" width="500" bordercolorlight="#666666"
bordercolordark="#FFFFFF" cellpadding="5">
<tr>
<td height="20" colspan="2" bgcolor="#ecf0ef" align="center">
<p align="center"><font color="#000000"><b>用户注册添加成功</b></font>
</td>
</tr>
<tr>
<td colspan="2" align="center">
<p align="left">以下是您的注册信息:
</td>
</tr>
<tr>
<td width="26%" align="center" height="6">用 户 名:</td>
<td width="74%" height="6">
<%response.write username%>
</td>
</tr>
<tr>
<td width="26%" align="center" height="6">
<p>性 别:</p>
</td>
<td width="74%" height="6"><%response.write sex%></td>
</tr>
<tr>
<td width="26%" align="center">管理密码:</td>
<td width="74%">
<%response.write password%>
</td>
</tr>
<tr>
<td width="26%" align="center">站长邮箱:</td>
<td width="74%">
<%response.write email%>
</td>
</tr>
<tr>
<td width="26%" align="center">自我介绍:</td>
<td width="74%">
<%response.write intro%>
</td>
</tr>
<tr>
<td width="26%" align="center">申请时间:</td>
<td width="74%">
<% response.write addtime%>
</td>
</tr>
</table>
<p> </p></center></div>
<table width="500" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td>恭喜您!你已注册完毕。但是,这时还没有发表文章的权利,你必须经过管理员的授权。当身份确认后,你可以在首页看见你的身份确认告示。这样,就可以在管理区添加文章,更改个人信息以及上传相片。</td>
</tr>
</table>
<p align="center"> </p>
<p align="center"><a href="index.asp">返回首页</a></p>
<%
set conn=nothing
set rs=nothing
end if
%>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -