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

📄 register.asp

📁 shopxp网上购物系统v6.6已经调试,百分百可用
💻 ASP
📖 第 1 页 / 共 2 页
字号:
	return true;
}
function getMsg(name){
	itm = document.getElementById('err_msg');
	for (var i=0; i<itm.childNodes.length; i++){
		if (itm.childNodes[i].id == name){
			return itm.childNodes[i].innerHTML;
		}
	}
	return -1;
}
function getItem(itm){
	if (itm.className == 'item'){
		itm1 = itm;
	}else{
		itm1 = itm.parentNode.parentNode;
	}
	for (var i=0; i<itm1.childNodes.length; i++){
		if (itm1.childNodes[i].className == 'item_error'){
			itm2 = itm1.childNodes[i];
			break;
		}
	}
	return new Array(itm1, itm2);
}
function showError(msg, itm, onclickun){
	arr = getItem(itm);
	msg2=msg;
	arr[1].innerHTML = msg2;
	arr[1].style.display = 'block';
	//arr[0].style.marginBottom = '6px';
	
}
function hideError(itm){
	arr = getItem(itm);
	arr[1].innerHTML = '';
	arr[1].style.display = 'none';
	//arr[0].style.marginBottom = '20px';
}
function checkInput(itm, blank){
	str = checkItem(itm, blank);
	if (str != ''){
		showError(str, itm);
		return false;
	}else{
		hideError(itm);
		return true;
	}
}
function checkOnChange(itm){
	return checkInput(itm, false);
}
function checkOnClick(itm){
	return checkInput(itm, true);
}
function onloadError(msg,itmname){
	//alert(document.getElementById(itmname));
	if(msg=="msg_user_exists")
		showError(getMsg(msg), document.getElementById(itmname),true);
	else
		showError(getMsg(msg), document.getElementById(itmname));
}


function checkItem(itm, blank){
if (itm.parentNode.parentNode.id == 'loginpass'){
		if (blank && itm.value == ''){
			return getMsg('msg_pw_blank');
		}else if (bytes(itm) > 14 || bytes(itm) < 4){
			return getMsg('msg_pw_length');
		}else if (itm.value != '' && !itm.value.match(/^[\x21-\x7e]{1,14}$/ig)) {
			return getMsg('msg_pw_format');
		}
	}else if (itm.parentNode.parentNode.id == 'verifypass'){
		if (itm.value != document.reg.loginpass.value){
			return getMsg('msg_pw_verify');
		}
	}else if (itm.parentNode.parentNode.id == 'email'){
		if (blank && itm.value == ''){
			return getMsg('msg_email_blank');
		}else if (!blank && itm.value != '' && !itm.value.match(/^[\w\.\-]+@([\w\-]+\.)+[a-z]{2,4}$/ig)){
			return getMsg('msg_email');
		}else if (blank && !itm.value.match(/^[\w\.\-]+@([\w\-]+\.)+[a-z]{2,4}$/ig)){
			return getMsg('msg_email');
		}
	}else if (itm.parentNode.parentNode.id == 'verifycode'){
		if (blank && itm.value == ''){
			return getMsg('msg_vc_blank');
		}else if (!blank && itm.value != '' && !itm.value.match(/^\d{4,4}$/ig)) {
			return getMsg('msg_vc_format');
		}else if (blank && !itm.value.match(/^\d{4,4}$/ig)) {
			return getMsg('msg_vc_format');
		}
	}else if (itm.parentNode.parentNode.id == 'user_url'){
		if (blank && itm.value == ''){
			return getMsg('msg_pa_blank');
		}else if (bytes(itm) > 50) {
			return getMsg('msg_pa_length');
		}
	}else if (itm.parentNode.parentNode.id == 'user_note'){
		if (blank && itm.value == ''){
			return getMsg('msg_pq_blank');
		}else if (bytes(itm) > 100) {
			return getMsg('msg_pq_length');
		}
	}else if (itm.parentNode.parentNode.id == 'protocal'){
		if (!itm.checked){
			return getMsg('msg_protocal_no');
		}
	}

	return '';
}
var submited = false;
function checkForm(itm){
	err = false;
	if (!submited){
		with (itm){
			for (var i=0; i<elements.length; i++){
				if ((elements[i].type == 'text' || elements[i].type == 'password' || (elements[i].type == 'checkbox' && elements[i].name == 'protocal')) && !checkOnClick(elements[i])){
					if (!err){
						err = true;
					}
				}
			}
		}
		if (err){
			alert('注册数据不正确,请检查后重新输入。');
			return false;
		}else{
			submited = true;
			document.getElementById('btn_submit').disabled = true;
			return true;
		}
	}else{
		alert('请勿重复提交请求');
		return false;
	}
}

function setprotocal(pvalue)
{
	if(pvalue=="Y"){
		document.reg.protocal.checked=true;
	}
}
//-->
</SCRIPT>

<DIV id=check_username_script style="DISPLAY: none"></DIV>
<TABLE cellSpacing=0 cellPadding=0 width=630 border=0>
  <TBODY>
  <TR>
    <TD>
      <DIV id=err_msg style="DISPLAY: none">
      <DIV id=msg_pw_blank>请填写密码</DIV>
      <DIV id=msg_pw_length>密码应由4至14个字符(数字,字母和下划线)组成</DIV>
      <DIV id=msg_pw_format>密码应由数字,字母和下划线组成</DIV>
      <DIV id=msg_pw_verify>密码与验证密码不相符</DIV>
      <DIV id=msg_email_blank>请输入邮件地址</DIV>
      <DIV id=msg_email>邮件地址格式错误</DIV>
      <DIV id=msg_vc_blank>请输入验证码</DIV>
      <DIV id=msg_vc_format>验证码格式错误</DIV>
      <DIV id=msg_vc_err>验证码错误</DIV>
      <DIV id=msg_pa_blank>请输入网址</DIV>
      <DIV id=msg_pa_length>用户网址不应超过50个字节</DIV>
      <DIV id=msg_pq_blank>请输入签名</DIV>
      <DIV id=msg_pq_length>用户签名不应超过100个字节</DIV>
      <DIV id=msg_protocal_no>注册前请阅读并接受『秦直道』多用户博客管理系统用户协议</DIV>
      <DIV id=msg_format>注册数据格式错误:</DIV>
      <DIV id=msg_unknow>注册时发生未知错误</DIV></DIV>
      <TABLE class=pad10L cellSpacing=0 cellPadding=0 width="100%" border=0>
        <TBODY>
        <TR>
          <TD>
            <DIV class=item id=system>
            <DIV class=item_error></DIV></DIV></TD></TR><INPUT type=hidden 
        value=exists name=username_check_result> 
        <FORM name=reg onsubmit="return checkForm(this);" action=Register_Save.asp 
        method=post>
        <TR>
          <TD vAlign=top height=80>
            <DIV class=item id=email>
            <DIV class=item_title>邮件地址:</DIV>
            <DIV class=item_input><INPUT onchange=checkOnChange(this); size=30 
            name=email></DIV>
            <DIV class=item_error></DIV>
            <DIV class=item_desc>请输入有效的邮件地址,以保障您帐号的安全性(例:QinZD.kheu@Gmail.com)</DIV></DIV></TD></TR>
        <TR>
          <TD vAlign=top height=82>
            <DIV class=item id=loginpass>
            <DIV class=item_title>设置密码:</DIV>
            <DIV class=item_input><INPUT type=password maxLength=14 
            onchange="checkOnChange(this);if(document.reg.verifypass.value!='')checkOnChange(document.reg.verifypass);" 
            size=14 name=loginpass></DIV>
            <DIV class=item_error></DIV>
            <DIV class=item_desc>最少4个字符,不超过14个字符(数字,字母和下划线)</DIV></DIV></TD></TR>
        <TR>
          <TD vAlign=top height=64>
            <DIV class=item id=verifypass>
            <DIV class=item_title>请重复输入密码:</DIV>
            <DIV class=item_input><INPUT type=password maxLength=14 
            onchange=checkOnChange(this); size=14 name=verifypass></DIV>
            <DIV class=item_error></DIV></DIV></TD></TR>

                 <TD vAlign=top height=80>
            <DIV class=item id=user_url>
            <DIV class=item_title>用户网址:</DIV>
            <DIV class=item_input><INPUT id=confirmpw2 maxLength=50 onchange=checkOnChange(this); size=30 name=user_url></DIV>
            <DIV class=item_error></DIV>
            <DIV class=item_desc>网址长度不超过50个字节,区分大小写</DIV>
            </DIV></TD></TR>
          <TD vAlign=top height=80>
            <DIV class=item id=user_note>
            <DIV class=item_title>用户签名:</DIV>
            <DIV class=item_input>
            <textarea name="user_note" cols="65" onchange=checkOnChange(this);  rows="6"></textarea></DIV>
            <DIV class=item_error></DIV>
            <DIV class=item_desc>签名长度不超过100个字节,区分大小写</DIV></DIV></TD></TR>
                  <TR>
          <TD vAlign=top height=80>
            <DIV class=item id=user_face>
            <DIV class=item_title>用户头像:</DIV>
            <DIV class=item_input>
        <input type="radio" name="user_face" value="cache1.gif" >
        <img src="nUser_logo/cache1.gif" width="100" height="100"> 
        <input type="radio" checked name="user_face" value="cache2.gif" >
        <img src="nUser_logo/cache2.gif" width="100" height="100"> 
        <input type="radio" name="user_face" value="cache3.gif" >
        <img src="nUser_logo/cache3.gif" width="100" height="100"> 
        <input type="radio" name="user_face" value="cache4.gif" >
        <img src="nUser_logo/cache4.gif" width="100" height="100"> 
        <input type="radio" name="user_face" value="cache5.gif" >
        <img src="nUser_logo/cache5.gif" width="100" height="100"> 
        <input type="radio" name="user_face" value="cache6.gif" >
        <img src="nUser_logo/cache6.gif" width="100" height="100">
        </DIV></TD></TR>      
          <TR>
          <TD vAlign=top height=80>
            <DIV class=item id=pay_code>
            <DIV class=item_title>支付效验:</DIV>
            <DIV class=item_input><INPUT  size=30  name=pay_code> </DIV>
            <DIV class=item_error></DIV>
            <DIV class=item_desc>如果您拥有与您邮箱同名的支付宝帐户并且准备在本站交易,请输入支付效验码</DIV></DIV></TD></TR>
 <TR>
          <TD vAlign=top height=40>
            <DIV class=item id=verifycode>
            <DIV class=item_title>验证码确认:</DIV>
            <DIV class=item_input><INPUT maxLength=4 
            onchange=checkOnChange(this); size=6 name=verifycode></DIV>
            <DIV class=item_error></DIV>
            <DIV class=item_desc>请输入下面的数字</DIV></DIV></TD></TR>
        <TR>
          <TD vAlign=top align=left ><% = GetCode() %> </TD></TR>
        <TR>
          <TD vAlign=top height=56>
            <DIV class=item id=protocal>
            <DIV class=item_title></DIV>
            <DIV class=item_input><INPUT type=checkbox 
            onchange=checkOnChange(this); value=Y name=protocal>&nbsp;我已经阅读并接受<a href="copyright.htm">『秦直道』多用户博客管理系统用户协议</a></DIV>
            <DIV class=item_error></DIV>
            <DIV class=item_desc></DIV></DIV></TD></TR>
        <SCRIPT language=javascript>
	setprotocal("");
</SCRIPT>

        <TR>
          <TD vAlign=top height=10>&nbsp;</TD></TR>
        <TR>
          <TD>
            <DIV class=item><INPUT id=btn_submit type=submit value=" 创建用户 " name=submit></DIV></TD></TR></FORM></TBODY></TABLE>
<%
Function GetCode()
	Dim TestObj
	On Error Resume Next
	Set TestObj = Server.CreateObject("Adodb.Stream")
	Set TestObj = Nothing
	If Err Then
		Dim TempNum
		Randomize timer
		TempNum = cint(8999*Rnd+1000)
		Session("GetCode") = TempNum
		GetCode = Session("GetCode")		
	Else
		GetCode = "<img src=""../nUser/GetCode.asp"">"		
	End If
End Function
%>
      <BR>
      <DIV></DIV>
      <CENTER></CENTER>
<DIV style="FONT-SIZE: 12px; PADDING-BOTTOM: 0px; MARGIN: 0px auto; WIDTH: 650px; COLOR: black; LINE-HEIGHT: 20px; FONT-FAMILY: arial; HEIGHT: 20px; BACKGROUND-COLOR: #d9f0f0 ;TEXT-ALIGN: center">
<script src='http://s96.cnzz.com/stat.php?id=369478&web_id=369478&online=1&show=line' language='JavaScript' charset='gb2312'></script>&copy;2008 <A href="http://www.qinzd.com">北京秦直道网络搜索技术</A></DIV></BODY></HTML>

⌨️ 快捷键说明

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