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

📄 reg_shang.asp

📁 21世纪人才www.51zy.net 网站源码
💻 ASP
📖 第 1 页 / 共 2 页
字号:
<!--#include file="conn.asp"-->
<!--#include file="webconfig.asp"-->
<!--#Include File="WrSky_Sql.Asp"-->
<%dim action
action=request.QueryString("action")%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title><%=webname%>-商城注册</title>
<link href="css/reg.css" rel="stylesheet" type="text/css" />
<script language="javascript" type="text/javascript">
function IsDigit()
{
  return ((event.keyCode >= 48) && (event.keyCode <= 57));
}
</script>
<script language="javascript" type="text/javascript">
<!--
function checkuserinfo()
{
   if(checkspace(document.shjiainfo.shjianame.value)) {
	document.shjiainfo.shjianame.focus();
    alert("对不起,请填写用户名!");
	return false;
  }
  if(checkspace(document.shjiainfo.name.value)) {
	document.shjiainfo.name.focus();
    alert("对不起,请填写商店名称!");
	return false;
  }
  if(checkspace(document.shjiainfo.name2.value)) {
	document.shjiainfo.name2.focus();
    alert("对不起,请填写商店负责人名称!");
	return false;
  }
    if(checkspace(document.shjiainfo.shjiapassword.value) || document.shjiainfo.shjiapassword.value.length < 6 || document.shjiainfo.shjiapassword.value.length >20) {
	document.shjiainfo.shjiapassword.focus();
    alert("密码长度不能不能这空,在6位到20位之间,请重新输入!");
	return false;
  }
    if(document.shjiainfo.shjiapassword.value != document.shjiainfo.shjiapassword1.value) {
	document.shjiainfo.shjiapassword.focus();
	document.shjiainfo.shjiapassword.value = '';
	document.shjiainfo.shjiapassword1.value = '';
    alert("两次输入的密码不同,请重新输入!");
	return false;
  }

 if(document.shjiainfo.shjiaemail.value.length!=0)
  {
    if (document.shjiainfo.shjiaemail.value.charAt(0)=="." ||        
         document.shjiainfo.shjiaemail.value.charAt(0)=="@"||       
         document.shjiainfo.shjiaemail.value.indexOf('@', 0) == -1 || 
         document.shjiainfo.shjiaemail.value.indexOf('.', 0) == -1 || 
         document.shjiainfo.shjiaemail.value.lastIndexOf("@")==document.shjiainfo.shjiaemail.value.length-1 || 
         document.shjiainfo.shjiaemail.value.lastIndexOf(".")==document.shjiainfo.shjiaemail.value.length-1)
     {
      alert("Email地址格式不正确!");
      document.shjiainfo.shjiaemail.focus();
      return false;
      }
   }
 else
  {
   alert("Email不能为空!");
   document.shjiainfo.shjiaemail.focus();
   return false;
   }
   if(checkspace(document.shjiainfo.quesion.value)) {
	document.shjiainfo.quesion.focus();
    alert("对不起,请填写密码提问!");
	return false;
  }
   if(checkspace(document.shjiainfo.answer.value)) {
	document.shjiainfo.answer.focus();
    alert("对不起,请填写密码提问的答案!");
	return false;
  }
}
function checkshouhuoxx()
{
   if(checkspace(document.shouhuoxx.userzhenshiname.value)) {
	document.shouhuoxx.userzhenshiname.focus();
    alert("对不起,请填写真实姓名!");
	return false;
  }
  if(checkspace(document.shouhuoxx.shouhuodizhi.value)) {
	document.shouhuoxx.shouhuodizhi.focus();
    alert("对不起,请填写收货人详细收货地址!");
	return false;
  }
  if(checkspace(document.shouhuoxx.youbian.value)) {
	document.shouhuoxx.youbian.focus();
    alert("对不起,请填写邮编!");
	return false;
  }
  if(document.shouhuoxx.youbian.value.length!=6) {
	document.shouhuoxx.youbian.focus();
    alert("对不起,请正确填写邮编!");
	return false;
  } 
    if(checkspace(document.shouhuoxx.usertel.value)) {
	document.shouhuoxx.usertel.focus();
    alert("对不起,请留下您的联系电话!");
	return false;
  }     
}
function checkspace(checkstr) {
  var str = '';
  for(i = 0; i < checkstr.length; i++) {
    str = str + ' ';
  }
  return (str == checkstr);
}
//-->
</script>
</head>

<body>
<!-- 导航菜单 -->
<!--#include file="top.asp" -->
<%dim count
set rs=server.createobject("adodb.recordset")
rs.open "select * from shop_Nclass order by Nclassidorder ",conn,1,1%>
<script language = "JavaScript">
var onecount;
onecount=0;
subcat = new Array();
<%
   count = 0
   do while not rs.eof 
%>
subcat[<%=count%>] = new Array("<%= trim(rs("Nclass"))%>","<%= rs("anclassid")%>","<%= rs("Nclassid")%>");
<%
        count = count + 1
        rs.movenext
        loop
        rs.close
%>
		
onecount=<%=count%>;

function changelocation(locationid)
    {
    document.shjiainfo.Nclassid.length = 0; 

    var locationid=locationid;
    var i;
    for (i=0;i < onecount; i++)
        {
            if (subcat[i][1] == locationid)
            { 
             document.shjiainfo.Nclassid.options[document.shjiainfo.Nclassid.length] = new Option(subcat[i][0], subcat[i][2]);
            }        
        }
        
    }    
</script>
<div id="content">
	<!-- 快捷导航 -->
	<div id="content_m"><a href="index.asp">首页</a> > <span class="new">新用户注册</span></div>
	<!-- 主内容左侧 -->
	<div id="content_l">
	<%select case action
	case ""%>
	<h1>请用户仔细阅读<%=webname%>注册条约</h1>
		<div id="tiaoyue">
		<%call tiaoyue()%>
		<form name="register" method="post" action="reg_shang.asp?action=yes">
		<input type="hidden" name="action" value="agree">
		<input type="submit" value=" 同意注册 " name=Submit>
		</form> 
		<form action="index.asp" method="post">
		<input class="right" type="submit" value=" 我不同意 ">
		</form>
		</div>
<script language="javascript" type="text/javascript">
	secs = 60; // Number of secs to delay -CHINA-studio
	wait = secs * 100;
	document.forms.register.Submit.disabled =true;
	for(i=1;i<=(wait/100);i++) {
		window.setTimeout("doUpdate(" + i + ")", i * 100);
	}
	window.setTimeout("Timer()", wait);

	function doUpdate(num) {
		if(num == (wait/100)) {
			document.forms.register.Submit.value = " 同意注册 ";
		} else {
			wut = (wait/100)-num;
			document.forms.register.Submit.value = " 同意前请先阅读 (" + wut + ")";
		}
	}

	function Timer() {
		document.forms.register.Submit.disabled =false;
}
</script>
<%case "yes"%>
	<h1>请您务必详细填写您的信息,并核对无误,国内用户请留下您的真实中文姓名</h1>
	<h1>未经您的允许,您的个人信息对外保密。(带 ** 号为必填项)</h1>
<form name="shjiainfo" method="post" action="reg_shang.asp?action=save">
<table width="570" cellspacing="0" cellpadding="0">
  <tr>
    <td colspan="2" class="tit"> &gt; 商家联系信息</td>
  </tr>
  <tr>
    <td class="left">商店类别:</td>
    <td class="right">
		<%set rs=server.createobject("adodb.recordset")
	rs.open "select * from shop_anclass order by anclassidorder",conn,1,1
	if rs.eof and rs.bof then
	response.write "请先添加栏目。"
	response.end
	else%>
<select name="anclassid" size="1" id="anclassid" onchange="changelocation(document.shjiainfo.anclassid.options[document.shjiainfo.anclassid.selectedIndex].value)">
<option selected="selected" value="<%=rs("anclassid")%>"><%=trim(rs("anclass"))%></option>
		<%dim selclass
        selclass=rs("anclassid")
        rs.movenext
        do while not rs.eof%>
<option value="<%=rs("anclassid")%>"><%=trim(rs("anclass"))%></option>
	<%
        rs.movenext
        loop
	end if
        rs.close
%>
</select>
-&gt;
<select name="Nclassid">
	<%rs.open "select * from shop_Nclass where anclassid="&selclass ,conn,1,1
	if not(rs.eof and rs.bof) then
	%>
<option selected="selected" value="<%=rs("NclassID")%>"><%=rs("Nclass")%></option>

⌨️ 快捷键说明

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