reg.asp

来自「旅游管理系统 用ASP+SQL 2」· ASP 代码 · 共 190 行

ASP
190
字号
<html>
<head>
<meta name=vs_targetSchema content="HTML 4.0">
<title>旅行社注册</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="css/css1.css" type="text/css">

<script id=clientEventHandlersVBS language=vbscript>
<!--

Sub button1_onclick
	if form1.t7.value="" then
	window.alert ("认证码错误!")
	form1.t7.focus
	else
	if form1.t1.value="" then
	window.alert ("所有项目必须填写!")
	form1.t1.focus
	else
	if form1.t2.value="" then
	window.alert ("所有项目必须填写!")
	form1.t2.focus
	else
	if form1.t3.value="" then
	window.alert ("所有项目必须填写!")
	form1.t3.focus
	else
	if form1.t4.value="" then
	window.alert ("所有项目必须填写!")
	form1.t4.focus
	else
	if form1.t5.value="" then
	window.alert ("所有项目必须填写!")
	form1.t5.focus
	else
	if form1.t6.value="" then
	window.alert ("所有项目必须填写!")
	form1.t6.focus
	else
	if form1.t2.value<>form1.t3.value then
	window.alert ("两次输入的密码不相等!")
	form1.t3.focus
	else
	form1.submit 
	end if
	end if
	end if
	end if
	end if
	end if
	end if
	end if
End Sub

-->
</script>
</head>
<body bgcolor="#FFFFFF" style="background-color: #999999" text="#000000" topmargin="5">
<!--#include file="includefile/shoubu.asp" -->
<!--#include file="includefile/conn.asp" -->
<%
dim action,username,userpassword,dianhua,shouji,jianjie,email,lg
action=request("action")
email=request("email")
username=request("t1")
userpassword=request("t2")
dianhua=request("t4")
shouji=request("t5")
longname=request("t8")
jianjie=request("t6")

if action<>"ok" then

%>
<div align="center">
  <center>
  <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" width="755" height="197" bgcolor="#FFFFFF">
    <tr>
      <td width="100%" height="197"> 
  <table width="350" border="0" align="center" cellspacing="0" cellpadding="0" bgcolor="#E7E7E7">
    <tr>
    
<form name="form1" method="post" action="reg.asp?action=ok"> 
      <td height="22" align="center" class="title">旅行社注册</td>
    </tr>
  </table>
  <table width="350" border="0" align="center" cellspacing="1" cellpadding="0" bgcolor="#CCCCCC">

    <tr bgcolor="#FFFFFF"> 
      <td height="25" width="82" bgcolor="#EFEFEF"> 旅行社:</td>
      <td height="25" width="265">  
        <input type="text" name="t8" class="input" value="" size="20"> 
      </td>
    </tr>

    <tr bgcolor="#FFFFFF"> 
      <td height="25" width="82" bgcolor="#EFEFEF"> 用户名:</td>
      <td height="25" width="265">  
        <input type="text" name="t1" class="input" value="" size="20"> 
      </td>
    </tr>
    <tr bgcolor="#FFFFFF"> 
      <td height="25" width="82" bgcolor="#EFEFEF"> 密码:</td>
      <td height="25" width="265">  
        <input type="password" name="t2" class="input" value="" size="20"> 
      </td>
    </tr>
    <tr bgcolor="#FFFFFF"> 
      <td height="25" width="82" bgcolor="#EFEFEF"> 确认密码:</td>
      <td height="25" width="265">  
        <input type="password" name="t3" class="input" value="" size="20">
      </td>
    </tr>
    <tr bgcolor="#FFFFFF"> 
      <td height="25" width="82" bgcolor="#EFEFEF"> E_mail:</td>
      <td width="265" height="25">  
        <input type="text" name="email" class="input" value="" size="20">
        <font color="#FF0000">*请确保正确</font></td>
    </tr>
    <tr bgcolor="#FFFFFF"> 
      <td height="25" bgcolor="#EFEFEF"> 电话:</td>
      <td width="265" height="25"> 
<input type="text" name="t4" class="input" value="" size="20"></td>
    </tr>
    <tr bgcolor="#FFFFFF"> 
      <td height="25" width="82" bgcolor="#EFEFEF"> 手机:</td>
      <td height="25" width="265">  
        <input type="text" name="t5" class="input" value="" size="20"> 
      </td>
    </tr>
    <tr bgcolor="#FFFFFF"> 
      <td height="25" width="82" bgcolor="#EFEFEF"> 简介:</td>
      <td height="25" width="265">  
        <input type="text" name="t6" class="input" value="" size="20"> 
      </td>
    </tr>
 <tr bgcolor="#FFFFFF"> 
      <td height="25" width="82" bgcolor="#EFEFEF"> </td>
      <td height="25" width="265">  
        <input type="hidden" name="t7" class="input" value="aaa" size="20">
      <font color="#FF0000"></font></td>
    </tr>
 <tr bgcolor="#EFEFEF" align="center"> 
      <td height="30" colspan="2"> 
        <input type="button" name="button1" value="注册" class="button">
           
        <input type="reset" name="Submit2" value="复位" class="button">
      </form>
     </td>
    </tr>
  </table>
  <div align="center"><font color="#FF0000"> 
    </font>
    <table width="400" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td><font color="#FF0000">注:客户的一些反馈信息会发送到您的Email请确保你填写的Email能用。</font></td>
      </tr>
    </table>
    <br>
  </div>

   </td>
 </tr>
</table>
  </center>
</div>
<%
else
sql="select * from master"
rs.open sql,,1,2
rs.addnew
rs("username")=username
rs("userpassword")=userpassword
rs("email")=email
rs("dianhua")=dianhua
rs("shouji")=shouji
rs("jianjie")=jianjie
rs("longname")=longname
rs("guanli")="1"
rs.update
rs.close
conn.close
session("1")="注册成功!"
Response.Redirect "ok.asp"
end if
%>
 
<!--#include file="includefile/weibu.asp" -->
</body>
</html>

⌨️ 快捷键说明

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