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

📄 register_save.asp

📁 里面说明详细
💻 ASP
字号:
<!--#include file="admin/conn.asp"-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>蓝雨聊天室(注册新会员)</title>
<style type="text/css"><!--
.p9 {  font-size: 9pt; line-height: 14pt}
-->
</style>
</head>
<body bgcolor="#DAE7E4">
<table border="1" width="100%" height="100%" bordercolor="#008080" bordercolorlight="#008080"
bordercolordark="#008080" cellspacing="0" cellpadding="5">
  <tr>
    <td width="100%" bgcolor="#B8D3CE" height="10%"><table border="0" width="100%">
      <tr>
        <td width="50%"><strong>会员注册</strong></td>
        <td width="50%" align="right"><input type="button" value="关闭窗口" onclick="window.close()"></td>
      </tr>
    </table>
    </td>
  </tr>
  <tr>
    <td width="100%"><table border="0" width="100%" height="50%">
<%
username=trim(request.form("username"))
password=trim(request.form("password"))
email=request.form("email")
homepage=request.form("homepage")
oicq=request.form("oicq")
biography=request.form("biography")
reg_err=""
if username="" or password="" or email="" then
  reg_err="参数不全,无法注册。名字和密码不能为空。"
elseif Instr(username,"=")>0 or Instr(username,"%")>0 or Instr(username,chr(32))>0 or Instr(username,"?")>0 or Instr(username,"&")>0 or Instr(username,";")>0 or Instr(username,",")>0 or Instr(username,"'")>0 or Instr(LCase(username)," or")>0 or Instr(username,chr(34))>0 then
  reg_err="用户名中含有非法字符,请重新输入。"
elseif len(oicq)>10 or (len(oicq)<>0 and (not isnumeric(oicq))) then
  reg_err="Oicq号码只能是4-10位数字,您可以选择不输入。"
else
 reg_err=""
 Conn = DBCN()
 set rs = Server.CreateObject("ADODB.Recordset")
 sql="select * from [user] where username='" & username & "'"
 rs.open sql,conn,3,3
 if Not rs.eof then
   rs.close
   set rs=nothing
   reg_err="名字为<font color=#ff0000>" & username & "</font>的用户已经存在了,请重新输入一个用户名。"
 else
    biography=htmlencode(biography)
    if len(biography)>120 then biography=Mid(biography,1,120)
    rs.addnew
    rs("username")=username
    rs("password")=password
    rs("email")=email
    rs("money")=122
    rs("allmoney")=122
    rs("homepage")=homepage
    rs("oicq")=oicq
    rs("biography")=biography
    rs("lastactivity")=now()
    rs.update
    rs.close
    set rs=nothing
    reg_err=""
 end if
end if
 if reg_err="" then
%>
    <tr>
       <td width="100%" height="30" colspan="2">注册成功!<font color="#ff0000"><%=username%></font>,感谢你注册本站,以下是的你的一些注册信息,请记住你的用户名和密码,进入聊天室的时候请输入你的用户名和密码。</td>
    </tr>
      <tr>
        <td width="16%">用户名:</td>
        <td width="84%"><font color="#8000FF"><%=username%></font></td>
      </tr>
      <tr>
        <td width="16%">密码:</td>
        <td width="84%"><font color="#8000FF"><%=password%></font></td>
      </tr>
      <tr>
        <td width="16%">EMAIL:</td>
        <td width="84%"><font color="#8000FF"><%=htmlencode(email)%></font></td>
      </tr>
      <tr>
        <td width="16%">经验值:</td>
        <td width="84%"><font color="#8000FF">0</font></td>
      </tr>
      <tr>
        <td width="16%">银子:</td>
        <td width="84%"><font color="#8000FF">2</font>&nbsp;两</td>
      </tr>
<%
 else
  response.write "<tr><td>" & reg_err & "&nbsp;&nbsp;<input type=button value=""返 回"" onclick=""history.back();""></td></tr>"
 end if
%>
    </table>
    <p><br>
    <br>
    </td>
  </tr>
</table>
</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -