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

📄 reg.asp

📁 该软件是用asp编写的
💻 ASP
字号:
<!--#include file="top.asp"-->
<!--#include file="conn.asp"-->
<!--#include file="config.asp"-->
<!--#include file="inc/Email.asp"-->
<%
if request("action")="save" then
 dim username,mz,password,repassword,sex,email,question,answer
 dim oicq,icq,msn,homepage,tel,zipcode,address,remark,picurl
 
 username=request.form("username")
 mz=request.form("mz")
 password=request.form("password")
 repassword=request.form("repassword")
 sex=request.form("sex")
 email=request.form("email")
 question=request.form("question")
 answer=request.form("answer")
 
 oicq=request.form("oicq")
 icq=request.form("icq")
 msn=request.form("msn")
 homepage=request.form("homepage")
 picurl=request.form("picurl")
 tel=request.form("tel")
 zipcode=request.form("zipcode")
 address=request.form("address")
 remark=request.form("remark")
 
 '数据检查
 if username="" or strlength(username)>30 then
   call mb("帐号不能为空或大于15个汉字!","",0)
 end if
 if mz="" or strlength(mz)>10 then 
   call mb("名字不能为空或大于5个汉字!","",0)
 end if
 if password="" or strlength(password)>30 then
   call mb("密码不能为空或大于30字长!","",0)
 end if
 
 if repassword<>password then
   call mb("密码与确认密码不符,请重新输入!","",0)
 end if
 
 if sex="" then
   sex="男"
 end if
 
 if not isemail(email) then
   call mb("请正确输入电子邮件地址!","",0)
 end if
 
 if question="" or answer="" then
   call mb("请完整输入密码问题与答案!","",0)
 end if
 
 '保存数据
 set rs=server.createobject("adodb.recordset")
 sql="select * from author where username='"&username&"'"
 rs.open sql,conn,1,3
 
 if rs.bof and rs.eof then
   rs.addnew()
   rs("username")=username
   rs("mz")=mz
   rs("password")=password
   rs("sex")=sex
   rs("email")=email
   rs("question")=question
   rs("answer")=answer
   rs("oicq")=oicq
   rs("icq")=icq
   rs("msn")=msn
   rs("picurl")=picurl
   rs("tel")=tel
   rs("homepage")=homepage
   rs("zipcode")=zipcode
   rs("address")=address
   rs("remark")=remark
   rs.update
 else
   call mb("对不起,您要注册的帐号已经有人使用了!","",0)
 end if
 rs.close
 set rs=nothing 
 mailtopic="来至长春家教网的通知!"
%>
<!--#include file="inc/email_word1.asp" -->

<%
'
select case EmailSuport
  case 0
   '不支持邮件
  case 1
	call jmail(email,mailtopic,mailbody) 
  case 2
	call Cdonts(email,mailtopic,mailbody)
 case 3
	call aspemail(email,mailtopic,mailbody)
end select

response.write "<script language=javascript>alert('恭喜您,您已经成功的发布!');</script>"
%><head>
<TABLE width=760 border=0 align="center" cellPadding=0 cellSpacing=0 bgColor=#ffffff>
  <TBODY>
  <TR>
    <TD bgColor=#ffa200 class=bodyleft width=7><IMG height=1 
      src="img/blank.gif" width=7></TD>
      <TD 
    width=743 valign="top" 
    style="BORDER-BOTTOM: #000000 1px solid; BORDER-TOP: #000000 1px solid"><table width="743" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" class="borders">
          <tr> 
            <td width="190" valign="top" bgcolor="#F7F7F7"> <table width="98%" border="0" cellspacing="0" cellpadding="0">
                <tr> 
                  <td height="20" align="center">&nbsp;</td>
                </tr>
                <tr> 
                  <td height="20" align="center">&nbsp;</td>
                </tr>
                <tr> 
                  <td height="20" align="center">√ 填写个人资料</td>
                </tr>
                <tr> 
                  <td height="20" align="center">↓</td>
                </tr>
                <tr> 
                  <td height="20" align="center">→ <font color="#FF0000">教师加盟成功</font></td>
                </tr>
                <tr> 
                  <td height="20" align="center">&nbsp;</td>
                </tr>
                <tr> 
                  <td height="20" align="center">&nbsp;</td>
                </tr>
              </table></td>
            <td valign="top">  : 
              <table align="center" border="0" bordercolor="#000000" cellpadding="0" cellspacing="0" width="100%">
                <tr> 
                  <td width="18%">&nbsp;</td>
                  <td width="79%"> <font color="#993300">教师 加 盟 - 注 册 成 功</font></td>
                  <td width="5%">&nbsp;</td>
                </tr>
              </table>
              <table width="97%" border="0" align="center" cellpadding="3" cellspacing="1" bgcolor="#CCCCCC">
                <tr> 
                  <td height="77" align="center" bgcolor="#FFFFFF"><font color="#FF0000">恭 
                    喜 您 , 成 功 的 注 册 成 为 本 站 的 教师 !</font></td>
                </tr>
                <tr> 
                  <td height="60" align="center" bgcolor="#FFFFFF">请登陆系统,发布您的信息...   <a href="login.asp">点这里登陆</a></td>
                </tr>
              </table></td>
          </tr>
        </table></TD>
    <TD bgColor=#ffa200 class=bodyright width=6><IMG height=1 
      src="img/blank.gif" width=6></TD></TR></TBODY></TABLE>
	  <%else%>
<TABLE width=760 border=0 align="center" cellPadding=0 cellSpacing=0 bgColor=#ffffff>
  <TBODY>
  <TR>
    <TD bgColor=#ffa200 class=bodyleft width=7><IMG height=1 
      src="img/blank.gif" width=7></TD>
      <TD 
    width=743 valign="top" 
    style="BORDER-BOTTOM: #000000 1px solid; BORDER-TOP: #000000 1px solid"><table width="743" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" class="borders">
          <tr> 
            <td width="190" valign="top" bgcolor="#F7F7F7"> <table width="98%" border="0" cellspacing="0" cellpadding="0">
                <tr> 
                  <td height="20" align="center">&nbsp;</td>
                </tr>
                <tr> 
                  <td height="20" align="center">&nbsp;</td>
                </tr>
                <tr> 
                  <td height="20" align="center">→ <font color="#FF0000">填写个人资料</font></td>
                </tr>
                <tr> 
                  <td height="20" align="center">↓</td>
                </tr>
                <tr> 
                  <td height="20" align="center">教师加盟成功</td>
                </tr>
                <tr> 
                  <td height="20" align="center">&nbsp;</td>
                </tr>
                <tr> 
                  <td height="20" align="center">&nbsp;</td>
                </tr>
              </table></td>
            <td width="1" valign="top" background="images/bg_vline.gif">&nbsp;</td>
            <td valign="top"> <form action="?action=save" method="post" name="reg" id="reg">
                <br>
                <table align="center" border="0" bordercolor="#000000" cellpadding="0" cellspacing="0" width="100%">
                  <tr> 
                    <td width="18%">&nbsp;</td>
                    <td width="80%"> <font color="#993300">教师 加 盟 - 填 写 资 料</font></td>
                    <td width="5%">&nbsp;</td>
                  </tr>
                </table>
                <table width="96%" border="0" align="center" cellpadding="3" cellspacing="1" bgcolor="#CCCCCC">
                  <tr bgcolor="#FFFFFF"> 
                    <td width="120" height="25" align="center">帐  号:</td>
                    <td width="402" height="25"><input name="username" type="text" class="input" id="username" size="30">
                      *</td>
                  </tr>
                  <tr bgcolor="#FFFFFF"> 
                    <td height="25" align="center">中文名字:</td>
                    <td height="25"><input name="mz" type="text" class="input" id="mz" size="30">
                      *</td>
                  </tr>
                  <tr bgcolor="#FFFFFF"> 
                    <td height="25" align="center">密  码:</td>
                    <td height="25"><input name="password" type="password" class="input" id="password" size="30">
                      *</td>
                  </tr>
                  <tr bgcolor="#FFFFFF"> 
                    <td height="25" align="center">确认密码:</td>
                    <td height="25"><input name="repassword" type="password" class="input" id="repassword" size="30">
                      *</td>
                  </tr>
                  <tr bgcolor="#FFFFFF"> 
                    <td height="25" align="center">性  别:</td>
                    <td height="25"><input name="sex" type="radio" value="男" checked>
                      男士  
                      <input type="radio" name="sex" value="女">
                      女士</td>
                  </tr>
                  <tr bgcolor="#FFFFFF"> 
                    <td height="25" align="center">电子邮件:</td>
                    <td height="25"><input name="email" type="text" class="input" id="email" size="30">
                      *</td>
                  </tr>
                  <tr bgcolor="#FFFFFF"> 
                    <td height="25" align="center">密码问题:</td>
                    <td height="25"><input name="question" type="text" class="input" id="question" size="30">
                      *</td>
                  </tr>
                  <tr bgcolor="#FFFFFF"> 
                    <td height="25" align="center">密码答案:</td>
                    <td height="25"><input name="answer" type="text" class="input" id="answer" size="30">
                      *</td>
                  </tr>
                  <tr bgcolor="#FFFBFF"> 
                    <td height="25" colspan="2" align="center">以下为可选项</td>
                  </tr>
                  <tr bgcolor="#FFFFFF"> 
                    <td height="25" align="center">Oicq:</td>
                    <td height="25"><input name="oicq" type="text" class="input" id="oicq" size="30"></td>
                  </tr>
                  <tr bgcolor="#FFFFFF"> 
                    <td height="25" align="center">Icq:</td>
                    <td height="25"><input name="icq" type="text" class="input" id="icq" size="30"></td>
                  </tr>
                  <tr bgcolor="#FFFFFF"> 
                    <td height="25" align="center">Msn:</td>
                    <td height="25"><input name="msn" type="text" class="input" id="msn" size="30"></td>
                  </tr>
                  <tr bgcolor="#FFFFFF"> 
                    <td height="25" align="center">上传照片:</td>
                    <td height="25"><iframe name=ad frameborder=0 width=100% height=30 scrolling=no src=upload.asp?fpath=smallpic></iframe></td>
                  </tr>
                  <tr bgcolor="#FFFFFF"> 
                    <td height="25" align="center">(成功注册后上传)</td>
                    <td height="25"><input name="picurl" type="text" class="input" id="picurl" size="30">
                      (请自备<font color="#FF0000">130*165</font>的缩略图)</td>
                  </tr>
                  <tr bgcolor="#FFFFFF"> 
                    <td height="25" align="center">个人主页:</td>
                    <td height="25"><input name="homepage" type="text" class="input" id="homepage" size="30"></td>
                  </tr>
                  <tr bgcolor="#FFFFFF"> 
                    <td height="25" align="center">联系电话:</td>
                    <td height="25"><input name="tel" type="text" class="input" id="tel" size="30"></td>
                  </tr>
                  <tr bgcolor="#FFFFFF"> 
                    <td height="25" align="center">邮政编码:</td>
                    <td height="25"><input name="zipcode" type="text" class="input" id="zipcode" size="30"></td>
                  </tr>
                  <tr bgcolor="#FFFFFF"> 
                    <td height="25" align="center">详细地址:</td>
                    <td height="25"><input name="address" type="text" class="input" id="address" size="40"></td>
                  </tr>
                  <tr bgcolor="#FFFFFF"> 
                    <td height="25" align="center">个人简介:</td>
                    <td height="25"><textarea name="remark" cols="40" rows="10" class="input" id="remark"></textarea></td>
                  </tr>
                  <tr bgcolor="#FFFFFF"> 
                    <td height="25" colspan="2" align="center"><input name="Submit" type="submit" class="button" value=" 注 册 ">
                        
                      <input name="Submit2" type="reset"
class="button" value=" 清 除 "></td>
                  </tr>
                </table>
              </form></td>
          </tr>
        </table></TD>
    <TD bgColor=#ffa200 class=bodyright width=6><IMG height=1 
      src="img/blank.gif" width=6></TD></TR></TBODY></TABLE>
<%end if%>
<!--#include file="up.asp"-->

⌨️ 快捷键说明

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