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

📄 register.asp

📁 图书管理系统的所有程序
💻 ASP
字号:
<!--#include file="conn/conn.asp" -->
<%
if Request.Form("mName")<>"" and session("mName")="" then
session("MyID")=request.Form("ID")
session("mName")=Request.Form("mName")
session("MyPWD")=request.Form("PassWord")
mName=Request.Form("mName")
address=Request.Form("address")
postcode=Request.Form("postcode")
Tel=Request.Form("Tel")
Email=Request.Form("Email")
Ins_sql = "Insert into tb_Member (userID,userName,PassWord,address,postcode,"&_
"Tel,Email) values ('"&session("MyID")&"','"&mName&"','"&session("MyPWD")&_
"','"&address&"','"&postcode&"','"&Tel&_
"','"&Email&"')"
response.write Ins_sql
conn.execute(Ins_sql)
response.redirect("register_OK.asp")
end if

%>
<%
Set rs_Max = Server.CreateObject("ADODB.Recordset")
sql_max="SELECT MAX(userID) AS MaxID  FROM tb_Member"
rs_max=conn.execute(sql_max)
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>注册新会员</title>
<LINK rel="stylesheet" href="CSS/STYLE.CSS" type="text/css">
</head>

<body leftmargin="0" topmargin="0">
<table width="690" height="54" border="0" align="center" cellpadding="-1" cellspacing="-1">
  <tr>
    <td height="54" style="filter:progid:DXImageTransform.Microsoft.Gradient(startColorStr='#FFCC00', endColorStr='#FFFFFF', gradientType='1')"><div align="center" style="font-size:12px">
      <p><br>
        用 户 注 册<br>
        <br>
        </p>
    </div></td>
  </tr>
</table>
<table width="660" height="278" border="0" align="center" cellpadding="-1" cellspacing="-1">
  <tr>
    <td height="278" valign="top" background="images/buycar_bottom.jpg">      <div align="center"> 
        <form method="POST" action="register.asp" name="form1" onSubmit="return mysubmit();">
          <table width="346" border="1" align="center" cellpadding="0"
		   cellspacing="0" bordercolor="#FFFFFF" bordercolorlight="#FFFFFF"
		    bordercolordark="#aaaaFF">
            <tr> 
			<% no=trim(rs_max("MaxID"))
			  if len(month(date()))=1 then 
			  cmonth="0"& cstr(month(date()))
			  else
			  cmonth=cstr(month(date()))
			  end if
			  if len(day(date()))=1 then 
			  cday="0"& cstr(day(date()))
			  else
			  cday=cstr(day(date()))
			  end if
			  select case len(int(Right(no,5)+1))
				case 1
					cno="0000"+Cstr(int(Right(no,5)+1))
				case 2
					cno="000"+Cstr(int(Right(no,5)+1))
				case 3
					cno="00"+Cstr(int(Right(no,5)+1))
				case 4
					cno="0"+Cstr(int(Right(no,5)+1))
				case 5
					cno=Cstr(int(Right(no,5)+1))
				case Else
					cno="00001"
				end select
			  intno="HY"& cStr(Year(Date()))& cmonth& cday&cno
			  %>
              <td width="82" height="27" align="right" nowrap>会员ID:</td>
              <td width="258" height="27">&nbsp;
                <input type="hidden"  name="ID" value="<%= intno %>" size="32"> 
                 <font color="#666699"><%= intno %></font></td>
            </tr>
            <tr> 
              <td height="27" align="right" nowrap>会员名称:</td>
              <td height="27"> <div align="center"> 
                  <input type="text" name="mName" size="32" style="border:1px solid;border-color:#000000">
                </div></td>
            </tr>
            <tr> 
              <td height="27" align="right" nowrap>您的密码:</td>
              <td height="27"> <div align="center"> 
                  <input type="password" name="PassWord" value="" size="32" style="border:1px solid;border-color:#000000">
                </div></td>
            </tr>
            <tr> 
              <td height="27" align="right" nowrap>地址:</td>
              <td height="27"> <div align="center"> 
                  <input type="text" name="address" value="" size="32" style="border:1px solid;border-color:#000000">
                </div></td>
            </tr>
            <tr> 
              <td height="27" align="right" nowrap>邮政编码:</td>
              <td height="27"> <div align="center"> 
                  <input name="postcode" type="text" value="" size="32" maxlength="6" style="border:1px solid;border-color:#000000">
                </div></td>
            </tr>
            <tr> 
              <td height="27" align="right" nowrap>联系电话:</td>
              <td height="27"> <div align="center"> 
                  <input type="text" name="Tel" value="" size="32" style="border:1px solid;border-color:#000000">
                </div></td>
            </tr>
            <tr> 
              <td height="27" align="right" nowrap>Email:</td>
              <td height="27"> <div align="center"> 
                  <input type="text" name="Email" value="" size="32" style="border:1px solid;border-color:#000000">
                </div></td>
            </tr>
			<script language="JavaScript">
			function myreset(){
			form1.reset();
			event.returnValue=false;
			}
			function mysubmit(){
			if (form1.mName.value=="")
			{alert("请输入会员姓名!");form1.mName.focus();return false;}
			if (form1.PassWord.value=="")
			{alert("请输入会员密码!");form1.PassWord.focus();return false;}
			if (form1.address.value=="")
			{alert("请输入地址!");form1.address.focus();return false;}
			if (form1.postcode.value=="")
			{alert("请输入邮政编码!");form1.postcode.focus();return false;}
			if (form1.Tel.value=="")
			{alert("请输入联系电话!");form1.Tel.focus();return false;}
			if (form1.Email.value=="")
			{alert("请输入Email!");form1.Email.focus();return false;}
            return true;
			}
			</script>
	    </table>
	    <table>
            <tr> 
              <td width="314" colspan="2" align="right" valign="bottom" nowrap>                <div align="center"> 
                  <input type="submit" value="提交" style="border:1px solid;border-color:#AAAAFF;background-color:#ffcf00">
                  <input type="reset" name="Submit" value="重置"
				    onClick="myreset()" style="border:1px solid;border-color:#AAAAFF;background-color:#ffcf00">
                  <input type="button" value="返 回" onClick="javascript:window.history.back();" style="border:1px solid;border-color:#AAAAFF;background-color:#ffcf00">
              </div></td>
            </tr>
          </table>
		  <table width="100%" height="50"  border="0" cellpadding="-2" cellspacing="-2">
          <tr>
            <td width="23%" height="26">&nbsp;</td>
            <td width="77%" style="line-height:15pt">建议您务必输入您的真实信息,我们会为您绝对保密。<br>
这样有利于准确发货和提供必要的服务,必要时迅速与您联系!</td>
          </tr>
        </table>
        </form>

      </div></td>
  </tr>
</table>
</body>
</html>

⌨️ 快捷键说明

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