www.gusucode.com > 盐城分类信息网asp源码程序 > regchk.asp
<% '*********************************** '本站由吉林信息网团队制作 '*********************************** '--------版权说明------------------ '吉林信息网官方网站:http://www.jl-e.com 'QQ:304133183 '*********************************** %><!--#include file="inc/conn.asp"--> <!--#include file="inc/inc.asp"--> <!--#include file=inc/ipt.asp--> <% dim 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> <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> <LINK href="images/at_news.css" type=text/css rel=stylesheet> <style type="text/css"> <!-- #pwdpower { width:125px; border:0px none; background-color:#f1f1f1 } --> </style> </HEAD> <body topmargin="0" leftmargin="0" rightmargin="0" bottommargin="0" marginwidth="0" marginheight="0"> <%call t()%> <DIV class=leftborder> <table width="956" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="956" height="205" valign="top"><table width="100%" border="0" cellpadding="1" cellspacing="1" id="table1" style="border-collapse: collapse"> <tr> <td width="100%" colspan="0" class="td1" background="Images/menu_r.gif"> 位置导航:<a href="/">首页</a>→注册会员-第二步</td> </tr> </table> <table width="90%" 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,18}\s*$/; if (!filter.test(document.thisForm.username.value)) { alert("用户名填写不正确,请重新填写!可使用的字符为(A-Z a-z 0-9 _ - .)长度不小于5个字符,不超过18个字符,注意不要使用空格。"); 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 == 0) { alert("请您填写真实姓名!"); document.thisForm.name.focus(); return false; } var str="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ,./'[]{}`1234567890-=\~!@#$%^&*()_+|?><:"; var errorChar errorChar = isCharsInBag(thisForm.name.value,str) if (errorChar != "" ) { alert('真实姓名必须是中文!'); thisForm.name.focus(); return false; } function isCharsInBag (s, bag) { var i,c; for (i = 0; i < s.length; i++) { c = s.charAt(i);//字符串s中的字符 if (bag.indexOf(c) > -1) return c; } return ""; } if(document.thisForm.name.value.length<2||document.thisForm.name.value.length>4){ alert("联系人姓名不能少于2字多于4字!"); document.thisForm.name.focus(); 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; } if(document.thisForm.idcard.value.length<15) { alert("身份证件号没有填写或不完整!"); return false; } } //--> </SCRIPT> <table width="70%" border="0" bordercolor="#FFFFFF" cellpadding="0" style="border-collapse: collapse" align="center"> <form method="POST" name="thisForm" action="regchkok.asp"> <tr class="tdx"> <td align="center" class=sortbiaoti2 class="tdx">注册个人会员</td> </tr> <tr> <td height="26" class="tdx"> <p style="margin-left: 90px">登陆帐号:<input type="text" maxlength="18" name="username" size="15" value="<%=username%>" class=input ><font color="#FF0000"> *</font></td> </tr> <tr> <td height="26" class="tdx"> <p style="margin-left: 90px">帐号密码:<input type="password" maxlength="40" name="password" size="15" value="<%=password%>" class=input > <font color="#FF0000">*</font></td> </tr> <tr> <td height="26" class="tdx"> <p style="margin-left: 90px">真实姓名:<input type="text" maxlength="12" name="name" size="15" class=input> <font color="#FF0000">*</font>中文(2-4)</td> </tr> <tr> <td height="26" class="tdx"> <p style="margin-left: 90px">身份证件:<input type="text" maxlength="18" name="idcard" size="20" class=input > <font color="#FF0000">*取回密码时用</font></td> </tr> <tr> <td height="26" class="tdx"> <p style="margin-left: 90px">联系电话:<input type="text" maxlength="20" name="dianhua" size="20" class=input > <font color="#FF0000">*</font></td> </tr> <tr> <td height="26" class="tdx"> <p style="margin-left: 90px"> QQ:<input type="text" maxlength="50" name="qq" size="20" class=input ></td> </tr> <tr> <td height="26" class="tdx"> <p style="margin-left: 90px"> Email:<input type="text" maxlength="255" name="email" size="20" class=input > <font color="#FF0000">*短信息或取回密码时用</font></td> </tr> <tr> <td height="26" class="tdx"> <p style="margin-left: 90px"">通信地址:<input type="text" maxlength="50" name="dizhi" size="32" class=input ><font color="#FF0000">*</font></td> </tr> <tr> <td height="26" width="87%" class="tdx"> <p style="margin-left: 50px"> 验 证 码:<input name="verifycode" type="text" size="14" class=input> <img src="code.asp"alt= "验证码,看不清楚?请点击刷新验证码" style="cursor : pointer;" onClick="this.src='code.asp'" onKeyPress="if ((event.keyCode<48 &&event.keyCode!=13) || event.keyCode>57) event.returnValue=false"> 输入验证码,点图片刷新</td> </tr> <tr> <td height="30"><br> <p align="center"><input type="hidden" name="per" value="cnmai"> <input type="submit" onClick="javascript:return CheckForm();" value="确认信息,提交注册" name="tijiao"></td> </tr> <tr> <td> </td> </tr> </form> </table> <%else%> <SCRIPT language=javascript> <!-- function CheckForm() { if(document.comForm.comusername.value.length<1) { alert("登陆帐号没有填写!"); return false; } var filter=/^\s*[.A-Za-z0-9_-]{5,18}\s*$/; if (!filter.test(document.comForm.comusername.value)) { alert("用户名填写不正确,请重新填写!可使用的字符为(A-Z a-z 0-9 _ - .)长度不小于5个字符,不超过18个字符,注意不要使用空格。"); 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<5) { alert("商家名称没有填写或不少于5字!"); 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 == 0) { alert("请您填写联系人姓名!"); document.comForm.comname.focus(); return false; } var str="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ,./'[]{}`1234567890-=\~!@#$%^&*()_+|?><:"; var errorChar errorChar = isCharsInBag(comForm.comname.value,str) if (errorChar != "" ) { alert('联系人姓名必须是中文!'); comForm.comname.focus(); return false; } function isCharsInBag (s, bag) { var i,c; for (i = 0; i < s.length; i++) { c = s.charAt(i);//字符串s中的字符 if (bag.indexOf(c) > -1) return c; } return ""; } if(document.comForm.comname.value.length<2||document.comForm.comname.value.length>4){ alert("联系人姓名不能少于2字多于4字!"); document.comForm.comname.focus(); 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; } if(document.comForm.comidcard.value.length<15) { alert("相关证件号没有填写或不完整!"); return false; } } //--> </SCRIPT> <table border="0" width="100%" id="table1" style="border-collapse: collapse"> <tr> <td width="100%" colspan="0" class="td1" background="Images/menu_r.gif"> 位置导航:<a href="../">首页</a>→注册商家用户</td> </tr></table> <table width="70%" border="0" bordercolor="#FFFFFF" cellpadding="0" style="border-collapse: collapse" align="center"> <form method="POST" name="comForm" action="regchkok.asp"> <tr> <td height="26" class="tdx" align="center">注册商家用户,可自动生成专业页面,支持独立开店!无稳定货源的,请<a href="axx.asp?cnmai=free">直接发布信息</a></td> </tr> <tr> <td height="25" width="500" class="tdx"> <p align="left" style="margin-left: 50px"> 登陆帐号:<input type="text" maxlength="18" name="comusername" size="20" value="<%=username%>" class=input ><font color="#FF0000"> *</font></td> </tr> <tr> <td height="25" width="500" align="left" class="tdx"> <p style="margin-left: 50px"> 帐号密码:<input type="password" maxlength="40" name="compassword" size="20" value="<%=password%>" class=input > <font color="#FF0000">*</font></td> </tr> <tr> <td height="25" width="500" align="left" class="tdx"> <p style="margin-left: 50px"> 确认密码:<input type="password" maxlength="40" name="compassword1" size="20" value="<%=password%>" class=input > <font color="#FF0000">*</font></td> </tr> <tr> <td height="25" width="500" align="left" class="tdx"> <p style="margin-left: 50px"> 所属行业:<% dim rsclass,sqlclass username=request.cookies("cnmai")("username") set rsclass=server.createobject("adodb.recordset") sqlclass = "select * from class2 order by paixu desc" rsclass.open sqlclass,conn,1,1 %><SCRIPT language = "JavaScript"> var onecount; onecount=0; subcat = new Array(); <% count = 0 do while not rsclass.eof %> subcat[<%=count%>] = new Array("<%=rsclass("class2")%>","<%= trim(rsclass("class1"))%>","<%= trim(rsclass("id"))%>"); <% count = count + 1 rsclass.movenext loop rsclass.close %> onecount=<%=count%>; function changelocation(locationid) { document.comForm.class2.length = 0; var locationid=locationid; var i; for (i=0;i < onecount; i++) { if (subcat[i][1] == locationid) { document.comForm.class2.options[document.comForm.class2.length] = new Option(subcat[i][0], subcat[i][2]); } } } </SCRIPT><% sqlclass = "select * from class1 order by paixu desc" rsclass.open sqlclass,conn,1,1 if rsclass.eof and rsclass.bof then response.write "请先添加栏目。" response.end else %><SELECT name="class1" onChange="changelocation(document.comForm.class1.options[document.comForm.class1.selectedIndex].value)" size="1"> <OPTION selected value="0">==分类==</OPTION> <%do while not rsclass.eof %><OPTION value="<%=trim(rsclass("id"))%>"><%=trim(left(rsclass("class1"),4))%></OPTION> <% rsclass.movenext loop end if rsclass.close %></SELECT> <SELECT name="class2"> <OPTION selected value="0">==二级分类==</OPTION> </SELECT> <font color="#FF0000" value>*</font></td> </tr><tr> <td height="25" width="500" class="tdx"> <p align="left" style="margin-left: 50px"> 城市区域:<%call dix()%> <font color="#FF0000">*</font></td> </tr> <tr> <td height="25" width="500" class="tdx"> <p align="left" style="margin-left: 50px">商家/店铺名称:<input type="text" maxlength="20" name="com" size="38" class=input > <font color="#FF0000">*</font></td> </tr> <tr> <td height="25" width="500" class="tdx"> <p style="margin-left: 50px">商家/店铺简介:<textarea rows="10" name="comabout" class="regcss" cols="42"></textarea> <font color="#FF0000">*</font></td> </tr> <tr> <td height="25" width="500" class="tdx"> <p align="left" style="margin-left: 50px"> 联系人:<input type="text" maxlength="12" name="comname" size="20" class=input > <font color="#FF0000">*</font>中文(2-4)</td> </tr> <tr> <td height="25" width="500" class="tdx"> <p style="margin-left: 50px"> 相关证件号码:<input type="text" maxlength="18" name="comidcard" size="20" class=input > <font color="#FF0000">*<br> 请如实填写,负责人身份证或其他营业证件,取回密码时用</font></td> </tr> <tr> <td height="25" width="500" class="tdx"> <p style="margin-left: 50px"> 联系电话:<input type="text" maxlength="20" name="comdianhua" size="20" class=input > <font color="#FF0000">*</font></td> </tr> <tr> <td height="25" width="500" class="tdx"> <p style="margin-left: 50px"> 传真:<input type="text" maxlength="20" name="comfax" size="20" class=input ></td> </tr> <tr> <td height="25" width="500" class="tdx"> <p style="margin-left: 50px"> QQ/MSN:<input type="text" maxlength="30" name="qq" size="20" class=input ></td> </tr> <tr> <td height="25" width="500" class="tdx"> <p style="margin-left: 50px"> email:<input type="text" maxlength="30" name="comemail" size="20" class=input > <font color="#FF0000">*短信息或取回密码时用</font></td> </tr> <tr> <td height="25" width="500" class="tdx"> <p style="margin-left: 50px"> 商家地址:<input type="text" maxlength="50" name="comdizhi" size="38" class=input > <font color="#FF0000">*</font></td> </tr> <tr> <td height="25" width="500" class="tdx"> <p style="margin-left: 50px"> 标志图片地址:<input type="text" name="tupian" size="38" id="tupian" maxlength="180" class=input ><span id="followImg1" style="CURSOR: hand" title="选中上传店标图片" onClick="loadThreadFollow(1,5)">或<font color="#FF0000">注册后上传图片</font>↓</span></td> </tr> <tr style="display:none" id="follow1"> <td height="25" width="500" class="tdx"> <p style="margin-left: 50px"> <iframe name="I1" frameborder="0" width="71%" height="30" scrolling="no" src="upload.asp"></iframe></td> </tr> <tr> <td height="26" width="87%" class="tdx"> <p style="margin-left: 50px"> 验 证 码:<input name="verifycode" type="text" size="14" class=input > <img src="code.asp"alt= "验证码,看不清楚?请点击刷新验证码" style="cursor : pointer;" onClick="this.src='code.asp'" onKeyPress="if ((event.keyCode<48 &&event.keyCode!=13) || event.keyCode>57) event.returnValue=false">输入验证码,点图片刷新</td> </tr> <tr> <td height="40"> <p align="center"><br> <input type="submit" onClick="javascript:return CheckForm();" value="确认信息,提交注册" name="tijiao"></td> </tr></form> </table> <%end if%> </tr></table> </div> <!--#include file="foot.asp"--> </body> </html><% '*********************************** '本站由吉林信息网团队制作 '*********************************** '--------版权说明------------------ '吉林信息网官方网站:http://www.jl-e.com 'QQ:304133183 '*********************************** %>