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

📄 regchk.asp

📁 二手书籍系统
💻 ASP
字号:
<!--#include file="inc/conn.asp"-->
<!--#include file="config.asp"-->
<!--#include file="inc/err.asp"-->
<!--#include file=inc/ipt.asp-->
<!--#include file=inc/ip.asp-->
<%
dim username,password,rs,sql,k,per,password1
per=Request.form("per")
username=Request.form("username")
if nothaveChinese(username)=false then
response.write "<script language=JavaScript>" & chr(13) & "alert('用户名不能是中文!');" & "history.back()" & "</script>"
end if
password=Request.form("password")
password1=Request.form("password1")
set rs=server.createobject("adodb.recordset")
sql="select username from [user] where username='"&username&"' "
rs.open sql,conn,1,1
if not rs.eof or not rs.bof then
if trim(rs("username"))<>username then
sql="select username from [com] where username='"&username&"' "
 if not rs.eof or not rs.bof then
  if trim(rs("username"))=username then
  response.write "<script language=JavaScript>" & chr(13) & "alert('您输入的用户名已经注册过,请重新注册com');" & "history.back()" & "</script>"
  end if
 end if
else 
response.write "<script language=JavaScript>" & chr(13) & "alert('您输入的用户名已经注册过,请重新注册per');" & "history.back()" & "</script>"
response.end
end if
response.write "<script language=JavaScript>" & chr(13) & "alert('未知错误');" & "history.back()" & "</script>"
response.end
end if
rs.close
set rs=nothing
%>
<html>
<head>
<meta http-equiv="Content-Language" content="zh-cn">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title><%=title%>-注册会员</title>
<script>
function loadThreadFollow(t_id,b_id){
	var targetImg =eval("document.all.followImg" + t_id);
	var targetDiv =eval("document.all.follow" + t_id);
	
	if ("object"==typeof(targetImg)){
		if (targetDiv.style.display!='block'){
			targetDiv.style.display="block";
			
		}else{
			targetDiv.style.display="none";
		}
	}
}
</script>
</head>
<body topmargin="0">
<!--#include file="topcnmai.asp"-->
<div align="center">
<table width="760" id="table1" bgcolor="#FFFFFF" style="border-left:1px solid #CCCCCC; border-right:1px solid #CCCCCC; padding:1px; border-bottom-width:1px" cellspacing="0" cellpadding="0">
<tr>
<td height="30">
 </td>
</tr>
<tr>
<td></td>
</tr>
<tr>
<td valign="top" width="58%">
<div align="center">
<table width="510" border="0" bordercolor="#FFFFFF" cellpadding="0" style="border-collapse: collapse">
<%if per="1" then%>
<SCRIPT language=javascript>
<!--
function CheckForm()
{
if(document.thisForm.username.value.length<1)
	{
	    alert("登陆帐号没有填写!");
	    return false;
	}
    var filter=/^\s*[.A-Za-z0-9_-]{5,15}\s*$/;
        if (!filter.test(document.thisForm.username.value)) { 
                alert("用户名填写不正确,请重新填写!可使用的字符为(A-Z a-z 0-9 _ - .)长度不小于5个字符,不超过15个字符,注意不要使用空格。"); 
                document.thisForm.username.focus();
                document.thisForm.username.select();
                return (false); 
                } 
if(document.thisForm.password.value.length<1)
	{
	    alert("密码没有填写正确!");
	    return false;
	}
if(document.thisForm.name.value.length<2)
	{
	    alert("真实姓名没有填写或不正确!");
	    return false;
        document.thisForm.name.focus();
        document.thisForm.name.select();
	}
if(document.thisForm.idcard.value.length<1)
	{
	    alert("身份证号码没有填写!");
	    return false;
	}
	  var filter=/^\s*[0-9]{15,18}\s*$/;
        if (!filter.test(document.thisForm.idcard.value)) { 
                alert("身份证号码填写不正确,请重新填写!"); 
                document.thisForm.idcard.focus();
                document.thisForm.idcard.select();
                return (false); 
                }  
if(document.thisForm.dianhua.value.length<1)
	{
	    alert("联系电话没有填写!");
	    return false;
	}
if(document.thisForm.email.value.length<1)
	{
	    alert("电子邮箱没有填写!");
	    return false;
	}
        var filter=/^\s*([A-Za-z0-9_-]+(\.\w+)*@(\w+\.)+\w{2,3})\s*$/;
        if (!filter.test(document.thisForm.email.value)) { 
                alert("邮件地址不正确,请重新填写!"); 
                document.thisForm.email.focus();
                document.thisForm.email.select();
                return (false); 
                }  
if(document.thisForm.dizhi.value.length<1)
	{
	    alert("通信地址没有填写!");
	    return false;
	}
}

//-->
</SCRIPT>
<form method="POST" name="thisForm" action="regchkok.asp">
<tr> 
<td height="26" align="center" class=td2_muen><font color=white>注册个人会员</font></td>
</tr>
<tr> 
<td><IMG src="image/a_1.gif" width="515" height="10"></td>
</tr>
<tr> 
<td height="26" background="image/b_1.gif">
<p style="margin-left: 80px">登陆帐号:<input type="text" maxlength="12" name="username" size="20" value="<%=username%>"><font color="#FF0000"> *</font></td>
</tr>
<tr> 
<td height="26" background="image/b_1.gif">
<p style="margin-left: 80px">帐号密码:<input type="password" maxlength="40" name="password" size="20" value="<%=password%>" >
<font color="#FF0000">*</font></td>
</tr>
<tr> 
<td height="26" background="image/b_1.gif">
<p style="margin-left: 80px">真实姓名:<input type="text" maxlength="12" name="name" size="20">
<font color="#FF0000">*</font></td>
</tr>
<tr> 
<td height="26" background="image/b_1.gif">
<p style="margin-left: 80px">&nbsp; 身份证:<input type="text" maxlength="18" name="idcard" size="24" >
<font color="#FF0000">*</font></td>
</tr>
<tr> 
<td height="26" background="image/b_1.gif">
<p style="margin-left: 80px">联系电话:<input type="text" maxlength="20" name="dianhua" size="24" >
<font color="#FF0000">*</font></td>
</tr>
<tr> 
<td height="26" background="image/b_1.gif">
<p style="margin-left: 80px">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
QQ:<input type="text" maxlength="50" name="qq" size="24" ></td>
</tr>
<tr> 
<td height="26" background="image/b_1.gif">
<p style="margin-left: 80px">&nbsp;&nbsp; Email:<input type="text" maxlength="255" name="email" size="24" >
<font color="#FF0000">*</font></td>
</tr>
<tr> 
<td height="26" background="image/b_1.gif">
<p style="margin-left: 80px">通信地址:<input type="text" maxlength="50" name="dizhi" size="37" >
<font color="#FF0000">*</font></td>
</tr>
<tr> 
<td height="40" background="image/b_1.gif">
<p align="center"><input type="hidden" name="per" value="cnmai">
<input type="submit" onclick="javascript:return CheckForm();" value="确认信息,提交注册" name="tijiao"></td>
</tr>
<tr> 
<td>
<IMG 
                      src="image/c_1.gif" width="515" height="9"></td>
</tr>
</form>
<%else%>
<SCRIPT language=javascript>
<!--
function CheckForm()
{
if(document.comForm.comusername.value.length<1)
	{
	    alert("登陆帐号没有填写!");
	    return false;
	}
    var filter=/^\s*[.A-Za-z0-9_-]{5,15}\s*$/;
        if (!filter.test(document.comForm.comusername.value)) { 
                alert("用户名填写不正确,请重新填写!可使用的字符为(A-Z a-z 0-9 _ - .)长度不小于5个字符,不超过15个字符,注意不要使用空格。"); 
                document.comForm.comusername.focus();
                document.comForm.comusername.select();
                return (false); 
                } 
if(document.comForm.compassword.value.length<6)
	{
	    alert("密码没有填写正确或小于6位!");
	    return false;
	}
if(document.comForm.compassword1.value.length<6)
	{
	    alert("确认密码没有填写正确或小于6位!");
	    return false;
	}
		if (document.comForm.compassword.value!=document.comForm.compassword1.value ){
		        alert("两次填写的密码不一致,请重新填写!"); 
                document.comForm.compassword.focus();
                document.comForm.compassword.select();
                return (false); 
                } 
if(document.comForm.class1.value.length<1)
	{
	    alert("请选择所属行业!");
	    return (false);
	}
if(document.comForm.com.value.length<3)
	{
	    alert("公司/商店名称没有填写或少于3个字!");
        document.comForm.com.focus();
        document.comForm.com.select();
	    return false;
	}
if(document.comForm.comabout.value.length<5)
	{
	    alert("公司/商店简介没有填写或少于5个字!");
        document.comForm.comabout.focus();
        document.comForm.comabout.select();
	    return false;
	}
if(document.comForm.comname.value.length<2)
	{
	    alert("商家姓名没有填写或少于2位!");
	    return false;
	}
if(document.comForm.comidcard.value.length<1)
	{
	    alert("商家身份证号码没有填写!");
	    return false;
	}
	  var filter=/^\s*[0-9]{15,18}\s*$/;
        if (!filter.test(document.comForm.comidcard.value)) { 
                alert("身份证号码填写不正确,请重新填写!"); 
                document.comForm.comidcard.focus();
                document.comForm.comidcard.select();
                return (false); 
                }  
if(document.comForm.comdianhua.value.length<1)
	{
	    alert("联系电话没有填写!");
	    return false;
	}
if(document.comForm.comemail.value.length<1)
	{
	    alert("电子邮箱没有填写!");
	    return false;
	}
        var filter=/^\s*([A-Za-z0-9_-]+(\.\w+)*@(\w+\.)+\w{2,3})\s*$/;
        if (!filter.test(document.comForm.comemail.value)) { 
                alert("邮件地址不正确,请重新填写!"); 
                document.comForm.comemail.focus();
                document.comForm.comemail.select();
                return (false); 
                }  
if(document.comForm.comdizhi.value.length<1)
	{
	    alert("通信地址没有填写!");
	    return false;
	}
}

//-->
</SCRIPT>
<form method="POST" name="comForm" action="regchkok.asp">
<tr> 
<td height="26" class=td4_muen align="center">注册商家用户,即注册开店,可以自动生成3个专业页面,支持独立开店!</td>
</tr>
<tr> 
<td><IMG src="image/a_1.gif" width="515" height="10"></td>
</tr>
<tr> 
<td height="25" width="516" background="image/b_1.gif">
<p align="left" style="margin-left: 50px">&nbsp;&nbsp;&nbsp;&nbsp; 登陆帐号:<input type="text" maxlength="12" name="comusername" size="20" value="<%=username%>"><font color="#FF0000"> *</font></td>
</tr>
<tr> 
<td height="25" width="516" align="left" background="image/b_1.gif">
<p style="margin-left: 50px">&nbsp;&nbsp;&nbsp;&nbsp; 帐号密码:<input type="password" maxlength="40" name="compassword" size="20" value="<%=password%>" >
<font color="#FF0000">*</font></td>
</tr>
<tr> 
<td height="25" width="516" align="left" background="image/b_1.gif">
<p style="margin-left: 50px">&nbsp;&nbsp;&nbsp;&nbsp; 确认密码:<input type="password" maxlength="40" name="compassword1" size="20" value="<%=password%>" >
<font color="#FF0000">*</font></td>
</tr>
<tr> 
<td height="25" width="516" align="left" background="image/b_1.gif">
<p style="margin-left: 50px">&nbsp;&nbsp;&nbsp;&nbsp; 所属行业:<%
dim rsc,sqlc
set rsc=server.createobject("adodb.recordset")
sqlc = "select * from class1 order by paixu desc"
rsc.open sqlc,conn,1,1
if rsc.eof and rsc.bof then
response.write "请先添加栏目。"
response.end
else
%><SELECT name="class1"  size="1">
<OPTION selected value="">选择分类</OPTION>
<%do while not rsc.eof
%><OPTION value="<%=trim(rsc("id"))%>"><%=trim(rsc("class1"))%></OPTION>
<%
        rsc.movenext
        loop
	    end if
        rsc.close
        set rsc=nothing
%></SELECT>
<font color="#FF0000">*</font></td>
</tr>
<tr> 
<td height="25" width="516" background="image/b_1.gif">
<p align="left" style="margin-left: 50px">商家/店铺名称:<input type="text" maxlength="12" name="com" size="35">
<font color="#FF0000">*</font></td>
</tr>
<tr> 
<td height="25" width="516" background="image/b_1.gif">
<p style="margin-left: 50px">商家/店铺简介:<textarea rows="6" name="comabout" cols="37"></textarea>
<font color="#FF0000">*</font></td>
</tr>
<tr> 
<td height="25" width="516" background="image/b_1.gif">
<p align="left" style="margin-left: 50px">&nbsp;&nbsp;&nbsp;&nbsp; 商家姓名:<input type="text" maxlength="12" name="comname" size="20">
<font color="#FF0000">*</font></td>
</tr>
<tr> 
<td height="25" width="516" background="image/b_1.gif">
<p style="margin-left: 50px">&nbsp;商家身份证号:<input type="text" maxlength="18" name="comidcard" size="20" >
<font color="#FF0000">*请填写真实证件号码</font></td>
</tr>
<tr> 
<td height="25" width="516" background="image/b_1.gif">
<p style="margin-left: 50px">&nbsp;&nbsp;&nbsp;&nbsp; 联系电话:<input type="text" maxlength="20" name="comdianhua" size="20" >
<font color="#FF0000">*</font></td>
</tr>
<tr> 
<td height="25" width="516" background="image/b_1.gif">
<p style="margin-left: 50px">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 传真:<input type="text" maxlength="20" name="comfax" size="20" ></td>
</tr>
<tr> 
<td height="25" width="516" background="image/b_1.gif">
<p style="margin-left: 50px">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; QQ:<input type="text" maxlength="255" name="qq" size="20" >
<font color="#FF0000">*用于店铺在线交易</font><font color="#0000FF">[</font><a target="_blank" href="http://freeqq2.qq.com/1.shtml"><font color="#0000FF">注册QQ</font></a><font color="#0000FF">]</font></td>
</tr>
<tr> 
<td height="25" width="516" background="image/b_1.gif">
<p style="margin-left: 50px">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; email:<input type="text" maxlength="255" name="comemail" size="20" >
<font color="#FF0000">*</font></td>
</tr>
<tr> 
<td height="25" width="516" background="image/b_1.gif">
<p style="margin-left: 50px">公司/商店地址:<input type="text" maxlength="50" name="comdizhi" size="35" >
<font color="#FF0000">*</font></td>
</tr>
<tr> 
<td height="25" width="516" background="image/b_1.gif">
<p style="margin-left: 50px">&nbsp;标志图片地址:<input type="text" name="tupian" size="35" id="tupian" maxlength="200"><span id="followImg1" style="CURSOR: hand" title="选中上传店标图片" onclick="loadThreadFollow(1,5)">4:3 
无现成图片,<font color="#FF0000">上传图片</font>↓</span></td>
</tr>
<tr style="display:none" id="follow1"> 
<td height="25" width="516" background="image/b_1.gif">
<p style="margin-left: 50px">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<iframe name="I1" frameborder="0" width="71%" height="30" scrolling="no" src="upload.asp"></iframe></td>
</tr>
<tr> 
<td height="40" background="image/b_1.gif">
<p align="center">
<input type="submit" onclick="javascript:return CheckForm();" value="确认信息,提交注册" name="tijiao"></td>
</tr>
<tr> 
<td>
<IMG src="image/c_1.gif" width="515" height="9"></td>
</tr>
</form>
<%end if%>
</table></div>
</td>
</tr></table>
</div>
<!--#include file="endcnmai.asp"-->
</body>

</html>

⌨️ 快捷键说明

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