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

📄 reg1.asp

📁 本源代码为大学生购物网的源代码,欢迎大家的下载,学习与交流
💻 ASP
字号:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="conn.asp"-->
<!--#include file="Inc/MsgBox.asp"-->
<!--#include file="Inc/MD5.asp"-->
<!--#include file="Inc/FormChk.asp"-->
<!--#include file="Inc/SchoolSelect.asp"-->
<!--#include file="Inc/RegFormChk.asp"-->

<HTML>
<HEAD>
<TITLE><%=homepage%> - 注册帐号</TITLE>
<LINK href="style.css" type=text/css rel=stylesheet>
<%
IF Trim(request("Submit"))<>empty Then
  Dim Strsq1,Rs
  Set Rs=Server.CreateObject("Adodb.Recordset")
  Strsq1="SELECT user_name From [user_info] where user_name='"& request.Form("user_name") &"'"
  Rs.open strsq1,conn,1,1
  IF not rs.eof and not rs.bof Then
    rs.close
	set rs=nothing
	conn.close
	set conn=nothing
    Call MsgBox("客服MM提醒您:您输入的帐号已被注册了","Back","None")
    response.End()
  ElseIF request.Form("password1")<>request.Form("password2") Then
    rs.close
	set rs=nothing
	conn.close
	set conn=nothing
    Call MsgBox("你两次输入的密码不一致","Back","None")
    Response.End()
  ElseIF Not isNumeric(request.Form("user_qq")) Then
    rs.close
	set rs=nothing
	conn.close
	set conn=nothing
    Call MsgBox("客服MM提醒您:QQ号应为数字","Back","None")
    Response.End()
  Else
    rs.Close
    rs.open "select * from [user_info]",conn,1,3
	rs.addnew
rs("user_name")=request.form("user_name")
rs("user_sex")=request.form("user_sex")
rs("user_password")=MD5(encodestr(Request.Form("PassWord1")),16)
rs("user_email")=request.form("user_email")
rs("user_qq")=request.form("user_qq")
rs("userface")=encodestr(request.Form("userface"))
rs("School")=encodestr(request.Form("School"))
rs("user_realname")=request.form("user_realname")
rs("font")=2
rs.update
rs.close
set rs=nothing
conn.close
set conn=nothing
Call MsgBox("注册成功,请登陆","GoUrl","user_login.asp")
    Response.End()
  End IF
rs.Close
Set rs=Nothing
conn.Close
Set conn=Nothing   
End IF
%>
<style type="text/css">
<!--
input {
	border: 1px solid;
	background-color: #ffffff;
}
-->
</style>
<BODY>
<TABLE width="760" class=page border=0 align="center" cellPadding=0 cellSpacing=0>
  <TBODY>
    <TR> 
      <TD>
<!--#include file="top.asp"-->
<TABLE width=760 border=0 align=center cellpadding="4">
  <TBODY>
    <TR> 
      <TD align="center" vAlign=top>
        <TABLE cellSpacing=0 cellPadding=0 width="627" border=0 class=page>
          <TBODY>
            <TR> 
            
              <TD bgColor=#EFEFEF height=21 align="left" colspan="2"> 
                    
					&nbsp;<img border="0" src="images/news.gif" width="15" height="15"> 
						注册会员</TD>
                
             
            </TR>
            <TR> 
              <TD width="639"><form action="" method="post" name="form1" id="input" onsubmit="javascript:return check_null();">
                  <div align="left">
                  <table width="103%" border="0">
                    <tr> 
                      <td align="right" width="17%"> </td>
                      <td width="81%"> </td>
                    </tr>
                    <tr> 
                      <td align="right" width="17%"><font color="#009933">会员帐号:</font></td>
                      <td width="81%"><input name="user_name" type="text" id="user_name" size="20" maxlength="20"> 
                        <font color="#FF0000">*</font>不超过20个字符</td>
                    </tr>
                      <tr> 
                      <td align="right" width="17%"><font color="#009933">你的性别:</font></td>
                      <td width="81%"><input name='user_sex' class=input3 type='radio' value='男' checked><img src=images/male.gif border=0>男生&nbsp;&nbsp;&nbsp;&nbsp;<input class=input3 name='user_sex' type='radio' value='女'><img src=images/female.gif border=0>女生                          <font color="#FF0000">*</font></td>
                    </tr>
                    <tr> 
                      <td align="right" width="17%"><font color="#009933">会员密码:</font></td>
                      <td width="81%"><input name="password1" type="password" id="password1" size="20" maxlength="16"> 
                        <font color="#FF0000">*</font> 不超过16个字符 </td>
                    </tr>
                    <tr> 
                      <td align="right" width="17%"><font color="#009933">确认密码:</font></td>
                      <td width="81%"><input name="password2" type="password" id="password2" size="20" maxlength="16"> 
                        <font color="#FF0000">* </font>重复你的密码</td>
                    </tr>     <tr> 
                      <td align="right" width="17%"><font color="#009933">你的OICQ:</font></td>
                      <td width="81%">
						<input name="user_qq"  style="ime-mode:disabled"  type="text" id="user_qq" size="20" maxlength="11"> <font color="#FF0000">*</font> 交易联系之用</td>
                    </tr>
					<tr> 
                      <td align="right" width="17%"><font color="#009933">选择头像:</font></td>
                      <td width="81%">
						<img src="img/face/1.gif" name="tus" width=32 height=32> <script>function showimage(){document.images.tus.src=""+document.form1.userface.options[document.form1.userface.selectedIndex].value+"";}</script><select name=userface size=1  id=userface onChange="showimage()">
<option value="img/face/1.gif">默认</option>
<script>
for(i=1;i<=45;i++) {
document.write("<option value='img/face/"+i+".gif'>"+i+"</option>")
}
</script>
</select> 你的头像</td>
                    </tr>
                    <tr> 
                      <td align="right" width="17%"><font color="#009933">电子信箱:</font></td>
                      <td width="81%"><input name="user_email" type="text" id="user_email" size="20" maxlength="20"> 
                        <font color="#FF0000">*</font></td>
                    </tr><tr> 
                      <td align="right" width="17%"><font color="#009933">所在学校:</font></td>
                      <td width="81%">
<select name="School" id="School" size="1">
            <option value="0" selected>请选择学校</option>
			<%=SchoolSelect()%>             
          </select>
                                  <font color="#FF0000"> *请选择你的学校(如没有请通知我们<font color="#009933">)</font></font></td>
       
                    </tr>
                         
                    <tr> 
                      <td align="right" width="17%"><font color="#009933">真实姓名:</font></td>
                      <td width="81%">
						<input name="user_realname" type="text" id="user_realname" size="20" maxlength="6"> 
                        <font color="#FF0000">* </font></td>
                    </tr>
                    <tr align="center"> 
                      <td colspan="2"> <input type="submit" name="Submit" value="提交"> 
                        <input type="reset" name="Submit" value="重置">
                      </td>
                    </tr>
                  </table>
                	</div>
                </form></TD>
              <TD>
				<img border="0" src="img/shoploginad.jpg" width="265" height="215"></TD>
            </TR>
          </TBODY>
        </TABLE>
        </TD>
    </TR>
  </TBODY>
</TABLE>
<!--#include file="bottom.asp"-->   </TD>
    </TR>
  </TBODY>
</TABLE>

</BODY></HTML>
<%
conn.Close
Set conn=Nothing
%>

⌨️ 快捷键说明

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