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

📄 reg.asp

📁 东营人家多用户留言本 2.2 版 留言本演示地址:http://www.860546.net/gbook/index.asp 留言本下载地址:http://www.860546.net/8
💻 ASP
字号:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>申请留言本</title>
<link href="style.css" rel="stylesheet" type="text/css">
</head>
<body background="pic/a1bf.gif">
<!--#INCLUDE FILE="head.asp" -->
<br>
<div align="center">                
  <center>  
    <table border="0" width="560" cellpadding="0">
      <tr> <td width="100%"> 您的位置:<a href="http://www.860546.net" target="_blank">东营人家</a> &gt;&gt; 
          申请留言本 </td>
      </tr>
    </table>    
<br>
<%tmp = "http://" & request.servervariables("SERVER_NAME") & _            
               left(request.servervariables("SCRIPT_NAME"),len(request.servervariables("SCRIPT_NAME"))-len("reg.asp"))%>
<%if request("d")="add" then%> 
<!--#include file="config.asp"-->
<%
user=request.form("user")
pwd1=request.form("pwd1")
pwd2=request.form("pwd2")
email=request.form("email")
web=request.form("web")
url=request.form("url")
gbname=request.form("gbname")

'**********检查是否填写了所有项,如果不是侧自动返回申请页面
if user="" or pwd1="" or pwd2="" or email="" or web="" or url="" or gbname="" then
errmsg=errmsg & "△ 请填写所有内容!\n"
end if
if pwd1<>pwd2 then
errmsg=errmsg & "△ 两次输入的密码不相同!\n"
end if
'**********检查用户名.如果有重复用户名侧自动返回申请页面
dim rsc,errmsg
Set rsc = Conn.Execute("select * from user where user = '" & user & "'")
if not rsc.eof then errmsg=errmsg & "△ 此用户名已被注册,请改名!\n"


if errmsg<>"" then
    Conn.Close
    Set conn = nothing
    Set rsc = nothing
    response.write("<script>alert('" & errmsg & "');history.go(-1)</script>")
    response.end
end if
'**********检查结束**********

set rs=server.createobject("adodb.recordset")
sql="select * from user where (id is null)" 

rs.open sql,conn,1,3
rs.addnew
rs("user")=user
rs("pwd")=pwd1
rs("email")=email
rs("web")=web
rs("url")=url
rs("gbname")=gbname
rs.update

set rsnew=server.createobject("adodb.recordset")
sqlnew="select * from book where (id is null)" 

rsnew.open sqlnew,conn,1,3
rsnew.addnew
rsnew("user")=user
rsnew("name")="蓝蜂"
rsnew("face")="9"
rsnew("email")="zk@860531.com"
rsnew("url")="http://www.860546.net"
rsnew("ly")="免费服务由东营人家提供 网址:http://www.860546.net"
rsnew.update

rsnew.close
set rsnew=nothing 
rs.close
set rs=nothing  
conn.close     
set conn=nothing
%>
<div align="center">
  <center>
    <table class=table border="0" cellspacing="0" cellpadding="10" width="350">
      <tr> 
        <td height="50" colspan="2"> 
          <p align="center"><font size="2"><b>申请成功! </b></font> 
        </td>
      </tr>
      <tr> 
        <td width="66" align="center"> 
          <p>请紧记你的 
        </td>
        <td width="264"> 用户名:<%=user%></td>
      </tr>
      <tr> 
        <td width="66"> </td>
        <td width="264"> 密&nbsp; 码:<%=pwd1%></td>
      </tr>
      <tr> 
        <td colspan="2"><br>
          你的留言板地址是:<br>
          <a href="<%=tmp%>index.asp?user=<%=user%>"><%=tmp%>index.asp?user=<%=user%><br>
          </a> 
          <p align="center"><a href="<%=tmp%>index.asp?user=<%=user%>">现在就到你的留言本看看吧!</a></p>
        </td>
      </tr>
    </table>           
  </center>           
</div>           
<%else%>           
            
           
<div align="center">            
  <center>            
    <table class=table border="0" width="556" cellspacing="0" cellpadding="6">
      <tr>            
      <td width="100%">            
              <table border="0" width="100%" cellpadding="5" cellspacing="1" background="pic/a1bf.gif">
                <form action="reg.asp?d=add" method="POST">                
      <tr>                
        <td width="20%" align="right">用户名:</td>                
        <td width="80%">                 
                <input onmouseover="style.backgroundColor='#ffffff'"  onmouseout="style.backgroundColor='#ECECFF'" type="text" name="user" size="19" maxlength="15">                
                * 1-15个字节,不要有空格</td>                          
      </tr>                          
      <tr>                          
        <td width="20%" align="right">密码:</td>                           
        <td width="80%">                            
                <input onmouseover="style.backgroundColor='#ffffff'"  onmouseout="style.backgroundColor='#ECECFF'" type="password" name="pwd1" size="20" maxlength="15">                           
                * 1-15个字节,不要有空格</td>                          
      </tr>                          
      <tr>                          
        <td width="20%" align="right">重复密码:</td>                          
        <td width="80%">                           
                <input onmouseover="style.backgroundColor='#ffffff'"  onmouseout="style.backgroundColor='#ECECFF'" type="password" name="pwd2" size="20" maxlength="15"> </td>                           
      </tr>                           
      <tr>                           
        <td width="20%" align="right">E-mail:</td>                           
        <td width="80%"><input onmouseover="style.backgroundColor='#ffffff'"  onmouseout="style.backgroundColor='#ECECFF'" type="text" size="50" maxlength="100" name="email">                           
          *</td>                             
      </tr>                             
      <tr>                             
        <td width="20%" align="right">站&nbsp; 名:</td>                           
        <td width="80%"><input onmouseover="style.backgroundColor='#ffffff'"  onmouseout="style.backgroundColor='#ECECFF'" type="text" size="50" maxlength="20" name="web">                           
          *</td>                           
      </tr>                           
      <tr>                           
        <td width="20%" align="right">主&nbsp; 页:</td>                           
        <td width="80%">
                  <input onmouseover="style.backgroundColor='#ffffff'"  onmouseout="style.backgroundColor='#ECECFF'" type="text" name="url" size="50" maxlength="100" value="http://www.860546.net">                           
          *</td>                           
      </tr>                           
      <tr>                           
        <td width="20%" align="right">留言本标题:</td>                          
        <td width="80%">
                  <input onmouseover="style.backgroundColor='#ffffff'"  onmouseout="style.backgroundColor='#ECECFF'" type="text" size="50" maxlength="20" name="gbname" value="东营人家">                          
          *                         
        </td>                         
      </tr>                         
      <tr>                         
        <td width="20%" colspan="2" align="right">                         
          <p align="center"><input onmouseover="style.backgroundColor='#ffffff'"  onmouseout="style.backgroundColor='#ECECFF'" style="width:80;height:18" type="submit" value="写完了">                          
          <input onmouseover="style.backgroundColor='#ffffff'"  onmouseout="style.backgroundColor='#ECECFF'" style="width:80;height:18" type="reset" value="重新写" name="reset">                         
        </td>                         
      </tr>                         
              <tr align="center"> 
                <td width="20%" colspan="2"> <br>
                  <font size="1">申请成功后你的留言本地址就是:<br>
                  <%=tmp%>index.asp?user=<font color="#CC9999">你的用户名</font></font> 
                </td>                      
      </tr>                
      </form>                    
    </table></td>                
    </tr>                
  </table>                
    <br>
  </center>                
</div>                
                    

    <div align="center"> 
      <center>
        <table style="BORDER-BOTTOM: #DFDFFF 1px dotted" cellspacing=0 cellpadding=0 
width=570 border=0>
          <tbody> 
          <tr> 
            <td></td>
          </tr>
          </tbody> 
        </table><br>
        <table border="0" cellpadding="0" width="500" cellspacing="0">
          <tr> 
            <td nowrap> 
              <p align="center"><font face="Verdana">免费服务由<a href="http://www.860546.net" target="_blank">东营人家</a>提供<br>
           
                </font> 
            </td>
          </tr>
        </table>
      </center>
    </div>
  </center>              
</div>              
<%end if%>            
</body>                  
</html>

⌨️ 快捷键说明

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