⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 reg.asp

📁 基于asp的网站管理系统,课直接下载使用,对初学者有恨大帮助,希望对大家有用
💻 ASP
📖 第 1 页 / 共 2 页
字号:
</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="reg.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'>
<p>
<% if request("action")="" then %>
<form action='reg.asp?action=accept' method="post">
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;欢迎您加入注册本系统,注册后您将免费阅读本站所有资源!为维护网上公共秩序和社会稳定,请您自觉遵守以下条款:
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;一、不得利用本站危害国家安全、泄露国家秘密,不得侵犯国家社会集体的和公民的合法权益,不得利用本站制作、复制和传播下列信息:
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(一)煽动抗拒、破坏宪法和法律、行政法规实施的;<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(二)煽动颠覆国家政权,推翻社会主义制度的;<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(三)煽动分裂国家、破坏国家统一的;<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(四)煽动民族仇恨、民族歧视,破坏民族团结的;<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(五)捏造或者歪曲事实,散布谣言,扰乱社会秩序的;<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(六)宣扬封建迷信、淫秽、色情、赌博、暴力、凶杀、恐怖、教唆犯罪的;<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(七)公然侮辱他人或者捏造事实诽谤他人的,或者进行其他恶意攻击的;<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(八)损害国家机关信誉的;<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(九)其他违反宪法和法律行政法规的;<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(十)进行商业广告行为的。
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;二、互相尊重,对自己的言论和行为负责。<br><br>
<center><input type=submit value="我已阅读并同意以上条款">&nbsp;┋&nbsp;<input type=button value="不同意" onClick="document.location='index.asp'"></center>
<% end if %>
<% if request("action")="accept" then %>
<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=="" || reg.pass2.value=="")
  { alert("请填写您的 登陆密码 和 确认密码 !\n\n必须>=4个字符且必须<=20个字符"); return false; }
  else
  {
    if (reg.pass.value != 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; }
}
-->
</script>
<br>
 <table border=0 width='100%' cellspacing=0 cellpadding=2>
  <form name=reg action='reg.asp?action=ok' method=post>
  <tr><td align=center>用户名称:</td><td align='left'><input type=text name=user size=20 maxlength='20'>&nbsp;<font color='#ff0000'>*</font></td></tr>
  <tr><td align=center>真实姓名:</td><td><input type=text name=realname size=20 maxlength=50>&nbsp;<font color='#ff0000'>*</font>&nbsp;</td></tr>
  <tr><td align=center>出生年日:</td><td><input type=text name=birthday size=20 maxlength=50>&nbsp;<font color='#ff0000'>*</font>&nbsp;</td></tr>
  <tr><td align=center>登陆密码:</td><td><input type=password name=pass size=20 maxlength='20'>&nbsp;<font color='#ff0000'>*</font>&nbsp;</td></tr>
  <tr><td align=center>确认密码:</td><td><input type=password name=pass2 size=20 maxlength='20'>&nbsp;<font color='#ff0000'>*</font>&nbsp;</td></tr>
  <tr><td align=center>密码钥匙:</td><td><input type=text name=pass1 size=20 maxlength='20'>&nbsp;<font color='#ff0000'>*</font>&nbsp;</td></tr>
  <tr><td align=center>E - mail:</td><td><input type=text name=mail size=20 maxlength=50>&nbsp;<font color='#ff0000'>*</font>&nbsp;</td></tr>
  <tr><td align=center>电  话:</td><td><input type=text name=tel size=20 maxlength=50></td></tr>
  <tr><td align=center>Q    Q:</td><td><input type=text name=qq size=20 maxlength=50></td></tr>
  <tr><td align=center>个人简介:</td><td><input type=text name=info size=35 maxlength=80 value='这个人很懒,什么都没留下!'></td></tr>
  <tr><td align=center>您的性别:</td><td>&nbsp;<input type=radio name=sex value='男' checked>&nbsp;男&nbsp;&nbsp;&nbsp;<input type=radio name=sex value='女'>&nbsp;女&nbsp;&nbsp;<font color='#ff0000'>*</font>&nbsp;</td></tr>
    <tr><td align=center>用户头像:</td><td><input type=text name=myphotourl size=35 maxlength=80 value='http://'></td></tr>
  <tr><td align=center><%
set rs=server.createobject("adodb.recordset") 
sql="select top 1 question from system order by id desc"
rs.open sql,db,1,1
%>
<%=rs("question")%>
<% rs.close %>:</td><td align='left'><input type=text name=answer size=20 maxlength='20'>&nbsp;<font color='#ff0000'>*(<%
set rs=server.createobject("adodb.recordset") 
sql="select top 1 memo from system order by id desc"
rs.open sql,db,1,1
%>
<%=rs("memo")%>
<% rs.close %>)</font></td></tr>
  <tr><td height='5'></td></tr>
  <tr><td align=center><input type=submit value=' 现 在 注 册 ' onclick="return reg_check()"></td><td><input type=reset value=' 重 新 填 写 '></td></tr>
  </form>
  </table><br><p><br>
<font color=red>&nbsp;&nbsp;&nbsp;注册说明:</font>带*号的为必填项,请认真填写!用户名称可以是大小写英文字母(a~z、A~Z)、阿拉伯数字(0~9)、连接字符“-”、下划线“_”和汉字组成,首字符不能为连接字符“-”或下划线“_”。为了帐户安全,登陆密码和密码钥匙长度必须>=4且<=12个字符。密码钥匙为用来找回密码之用。出生年日格式为:19xx年xx月xx日,或19xx-xx-xx。用户头像地址前必须加http://。</p>
<% end if %>

<% if request("action")="ok" then %>
<%
set rs=server.createobject("adodb.recordset") 
sql="select top 1 answer from system order by id desc"
rs.open sql,db,1,1
answer=rs("answer")
rs.close %>
<% if request("answer")=answer then %>
<%
on error resume next
user=trim(request("user"))
realname=trim(request("realname"))
pass=trim(request("pass"))
pass1=trim(request("pass1"))
mail=trim(request("mail"))
tel=trim(request("tel"))
qq=trim(request("qq"))
birthday=trim(request("birthday"))
info=trim(request("info"))
sex=trim(request("sex"))
myphotourl=trim(request("myphotourl"))
sql="select * from user where user='"&user&"'"
set rs=server.createobject("adodb.recordset")
rs.open sql,db,1,3

    if rs.eof and rs.bof then
      rs.addnew
      rs("user")=user
      rs("realname")=realname
      rs("pass")=pass
      rs("pass1")=pass1
      rs("birthday")=birthday
      rs("mail")=mail
      rs("qq")=qq
      rs("tel")=tel
      rs("info")=info
      rs("sex")=sex
      rs("myphotourl")=myphotourl
      rs.update
    else
   response.write "<br><br><br><br><br><center><font color=red size=1>对不起,该用户已经存在!请用另外一个用户名!</font><br><br><a href='reg.asp?action=accept'>返回重填</a></center>"
   response.end
    end if
if db.errors.count>0 then
response.write "<br><br><br><br><br><center><font color=red size=1>保存过程中发生错误,必须重新填写!<br><br><a href='reg.asp?action=accept'>返回重填</a>"
else
response.write "<br><br><br><br><br><center><font color=red size=1>恭喜你!你已经注册成功!欢迎你登录本系统。<br><br><a href='index.asp'>返回首页进行登录</a>"
end if
%>
 <%else%>
<center><br><BR><font color='red' size=+2>对不起。问题回答出错。</font><br><br><a href='reg.asp?action=accept'>返回重填</a></center>
<% end if%>
<% end if %>
</p>
</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 + -