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

📄 userreg.asp

📁 管理登录system 管理员:admin 密码:admin888 数据库链接文件: conn.asp 内容数据库前台链接文件 systemconn.asp 内容数据库后台链接文件 sy
💻 ASP
字号:
<!--#include file="SiteInfo.asp"-->
<!--#include file="System/MD5.asp"-->
<%
'☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆
'★                                                                  ★
'☆                万博中小企业网站管理系统(NWEB)                    ☆
'★                                                                  ★
'☆  版权所有 Nweb.cn                                                ☆
'★                                                                  ★
'☆  程序制作 万博工作室                                             ☆
'★           Add:四川省彭州市西大街228号/611930                     ★
'☆           Tel:028-88079088  Fax:83708850                         ☆
'★           E-m:duolaimi-123@163.com                               ★
'☆           Q Q:59309100                                           ☆
'★                                                                  ★
'☆  相关网址 [产品介绍]http://www.Nweb.cn                           ☆
'★           [支持论坛]http://www.Nweb.cn/bbs                       ★
'☆                                                                  ☆
'★  演示网址 http://www.Nweb.cn                                     ★
'☆                                                                  ☆
'★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★
%>
<%
Action=trim(request.QueryString("Action"))
if Action="Save"  then
   if request("VCodes")="" or (not IsNumeric(request("VCodes"))) then
      response.write "<script language=javascript> alert('提示:\n\n非法的验证码,正确验证码应该是由4位数字组成!');history.back(-1);</script>"
      response.end
   else 
	  if (int(session("VCodes"))<>int(request("VCodes")))   then
         response.write "<script language=javascript> alert('提示:\n\n验证码错误,请重新输入黄色区域内的数字!');history.back(-1);</script>"
		 response.end
      end if
   end if 
   if session("regtimes")=1 then
      response.write "<Script language='JavaScript'>window.alert('对不起,您刚注册过用户。\n请稍后再进行注册!');history.back(-1);</Script>"
      response.End
   end if
   set rs=server.CreateObject("adodb.recordset")
   rs.open "select * from UserInfo where Uemail='"&trim(request("Uemail"))&"' or Uname='"&trim(request("Uname"))&"'",conn,1,1
   if rs.recordcount>0 then
      response.write "<Script language='JavaScript'>window.alert('您输入的用户名或Email地址已存在,请返回重新输入!');history.back(-1);</Script>"
	  response.End()
   end if
   sql="select * from UserInfo" 
   set rs=server.createobject("adodb.recordset")
   rs.open sql,conn,1,3	
   rs.addnew
   rs("Uname")=trim(request.Form("Uname"))
   rs("Uname1")=trim(request.Form("Uname1")) 
   rs("Sex")=request.Form("Sex")
   rs("Upass")=MD5(trim(request.Form("Upass"))) 
   rs("UpassS1")=trim(request.Form("UpassS1"))
   rs("UpassS2")=MD5(trim(request.Form("UpassS2")))
   rs("Ucom")=trim(request.Form("Ucom")) 
   rs("Uadd")=trim(request.Form("Uadd"))
   rs("Utel")=trim(request.Form("Utel")) 
   rs("Umtel")=trim(request.Form("Umtel")) 
   rs("Ufax")=trim(request.Form("Ufax"))
   rs("Ucode")=trim(request.Form("Ucode")) 
   rs("Uemail")=trim(request.Form("Uemail"))
   rs.update
   rs.close
   set rs=nothing
   response.write "<script language=javascript> alert('注册成功,点击确定立即登录!');location.replace('User.asp');</script>"
   response.end
end if
'===================================
%>

<HTML>
<HEAD>
<TITLE>首页-会员中心|<%=SiteName%></TITLE>
<META http-equiv="Content-Type" content="text/html; charset=gb2312">
<META NAME="copyright" CONTENT="Copyright 2004-2005 - NWEB.CN-STUDIO-多来米">
<META NAME="Author" CONTENT="万博网络技术工作室,www.Nweb.cn">
<META NAME="Robots" CONTENT="all">
<META NAME="Keywords" CONTENT="<%=Keywords%>">
<META NAME="Description" CONTENT="<%=Description%>">
<link href="Images/CSS.css" type=text/css rel=stylesheet>
</HEAD>
<script language="JavaScript" type="text/JavaScript">
 function voidNum(argValue) 
 {
  var flag1=false;
  var compStr="1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_-";
  var length2=argValue.length;
  for (var iIndex=0;iIndex<length2;iIndex++)
  	{
		var temp1=compStr.indexOf(argValue.charAt(iIndex));
		if(temp1==-1) 
		{
			flag1=false;
			break;							
		}
		else
		{flag1=true;}
	}
	return flag1;
 } 
function CheckUserInfo()
{
    var check; 
    if (!voidNum(document.userinfo.Uname.value))
    { alert("用户名非法字符,有效字符为0-9、a-z、A-Z及_-的任意组合。");
	  document.userinfo.Uname.focus();
	  return false;
	  exit;
    }    
    if(checkspace(document.userinfo.Uname.value) || document.userinfo.Uname.value.length < 2 || document.userinfo.Uname.value.length >12) {
	document.userinfo.Uname.focus();
    alert("对不起,用户名字符数在2-12位,请重新输入!");
	return false;
  }
    if(checkspace(document.userinfo.Upass.value) || document.userinfo.Upass.value.length < 6 || document.userinfo.Upass.value.length >20) {
	document.userinfo.Upass.focus();
    alert("密码长度在6位到20位之间,请重新输入!");
	return false;
  }
    if(document.userinfo.Upass.value != document.userinfo.Upass1.value) {
	document.userinfo.Upass.focus();
	document.userinfo.Upass.value = '';
	document.userinfo.Upass1.value = '';
    alert("两次输入的密码不同,请重新输入!");
	return false;
  }

    if(checkspace(document.userinfo.UpassS1.value) || document.userinfo.UpassS1.value.length < 2 || document.userinfo.UpassS1.value.length >30) {
	document.userinfo.UpassS1.focus();
    alert("对不起,密码提示长度在2-30位之间!");
	return false;
  }
    if(checkspace(document.userinfo.UpassS2.value) || document.userinfo.UpassS2.value.length < 2 || document.userinfo.UpassS2.value.length >30) {
	document.userinfo.UpassS2.focus();
    alert("对不起,密码提示答案长度在2-30位之间!");
	return false;
  }
  
 if(document.userinfo.Uemail.value.length!=0)
  {
    if (document.userinfo.Uemail.value.charAt(0)=="." ||        
         document.userinfo.Uemail.value.charAt(0)=="@"||       
         document.userinfo.Uemail.value.indexOf('@', 0) == -1 || 
         document.userinfo.Uemail.value.indexOf('.', 0) == -1 || 
         document.userinfo.Uemail.value.lastIndexOf("@")==document.userinfo.Uemail.value.length-1 || 
         document.userinfo.Uemail.value.lastIndexOf(".")==document.userinfo.Uemail.value.length-1)
     {
      alert("Email地址格式不正确!");
      document.userinfo.Uemail.focus();
      return false;
      }
   }
 else
  {
   alert("Email不能为空!");
   document.userinfo.Uemail.focus();
   return false;
   }
}
function checkspace(checkstr) {
  var str = '';
  for(i = 0; i < checkstr.length; i++) {
    str = str + ' ';
  }
  return (str == checkstr);
}

//-->
</script>
<BODY >
<!--#include file="Top.asp" -->
<table width="868" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td width="190" height="96" valign="top" bgcolor="#F2F2F2" ><!--#include file="LeftNav.asp" -->
        <!--#include file="UserLeft.asp" -->
    </td>
    <td width="5"></td>
    <td width="673" valign="top" class="Index-Center"><table width="100%" border="0" cellspacing="0" cellpadding="0">
      <!--DWLayoutTable-->
      <tr>
        <td height="180" colspan="2" bgcolor="#FFFFFF"><img src="Images/Banner_01.jpg" alt="万博中小企业网站系统" width="499" height="180"></td>
        <td width="172" align="right" bgcolor="#FFFFFF"><img src="Images/Banner_02.jpg" alt="万博中小企业网站系统" width="171" height="180"></td>
      </tr>
      <tr>
        <td width="93" height="5" bgcolor="#FFFFFF"></td>
        <td width="408" bgcolor="#FFFFFF"></td>
        <td bgcolor="#FFFFFF"></td>
      </tr>
      <tr>
        <td height="30" align="right" bgcolor="#F2F2F2"><strong><font color="#1c529b"><img src="Images/Arrow-locality.gif" width="14" height="12" align="absmiddle"> 当前位置:</font></strong></td>
        <td colspan="2" bgcolor="#F2F2F2" class="locality"><a href="index.asp">首 页</a> &gt;&gt; <a href="User.asp">会员中心</a> &gt;&gt; 注册</td>
      </tr>
      <tr>
        <td height="5" align="center" bgcolor="#FFFFFF"></td>
        <td colspan="2" align="center" bgcolor="#FFFFFF"></td>
      </tr>
    </table>
        <table width="100%" border="0" cellpadding="0" cellspacing="0" >
          <tr>
            <td height="12">&nbsp;</td>
            <td></td>
            <td></td>
          </tr>
          <tr>
            <td width="20" height="30">&nbsp;</td>
            <td align="center"><table width="99%"  border="0" align="center" cellpadding="0" cellspacing="1">
              <form name="userinfo" method="post"  action="UserReg.asp?Action=Save">
                <tr>
                  <td align="right">&nbsp;</td>
                  <td>&nbsp;</td>
                </tr>
                <tr>
                  <td width="36%" height="20" align="right">登录名:</td>
                  <td width="64%" height="20"><input name="Uname" type="text" class="myput" id="Uname" size="30">
                      <font color="#CC0000">* </font>(不可更改)</td>
                </tr>
                <tr>
                  <td height="20" align="right">姓 名:</td>
                  <td height="20"><input name="Uname1" type="text"  class="myput" id="Uname1" size="20"></td>
                </tr>
                <tr>
                  <td height="20" align="right">性别:</td>
                  <td height="20"><input name="Sex" class="myput" type="radio" value="男" checked />
                    <input type="radio" class="myput" name="Sex" value="女"/>
                    女</td>
                </tr>
                <tr>
                  <td height="20" align="right">密 码:</td>
                  <td height="20"><input name="Upass" type="password"  class="myput" id="Upass" size="20">
                      <font color="#CC0000">*</font></td>
                </tr>
                <tr>
                  <td height="20" align="right">验证密码:</td>
                  <td height="20"><input name="Upass1" type="password"  class="myput" id="Upass1" size="20">
                      <font color="#CC0000">*</font></td>
                </tr>
                <tr>
                  <td height="20" align="right">密码保护提示问题:</td>
                  <td height="20"><input name="UpassS1" type="text" class="myput" id="UpassS2" size="20">
                      <font color="#CC0000">*</font> (不可更改) </td>
                </tr>
                <tr>
                  <td height="20" align="right">密码提示答案:</td>
                  <td height="20"><input name="UpassS2" type="text" class="myput" id="UpassS2" size="20">
                      <font color="#CC0000">*</font> (不可更改) </td>
                </tr>
                <tr>
                  <td height="20" align="right">单位名称:</td>
                  <td height="20"><input name="Ucom" type="text" class="myput" id="Ucom" size="40"></td>
                </tr>
                <tr>
                  <td width="36%" height="20" align="right">地 址:</td>
                  <td height="20"><input name="Uadd" type="text" class="myput" id="Uadd" size="40"></td>
                </tr>
                <tr>
                  <td height="20" align="right">电 话:</td>
                  <td height="20"><input name="Utel" type="text" class="myput" id="Utel" size="20"></td>
                </tr>
                <tr>
                  <td height="20" align="right">手 机:</td>
                  <td height="20"><input name="Umtel" type="text" class="myput" id="Umtel" size="20"></td>
                </tr>
                <tr>
                  <td height="20" align="right">传 真:</td>
                  <td height="20"><input name="Ufax" type="text" class="myput" id="Ufax" size="20"></td>
                </tr>
                <tr>
                  <td width="36%" height="20" align="right">邮 编:</td>
                  <td height="20"><input name="Ucode" type="text" class="myput" id="Ucode" size="20"></td>
                </tr>
                <tr>
                  <td height="20" align="right">电子邮件:</td>
                  <td height="20"><input name="Uemail" type="text" class="myput" id="Uemail" size="20">
                      <font color="#CC0000">*</font></td>
                </tr>
                <tr>
                  <td width="36%" height="20" align="right">验证码:</td>
                  <td height="20"><input name="VCodes" id="VCodes" size=4   class="myput" maxlength=4>
                    &nbsp;<img src="VCodes.asp" align="absmiddle"></td>
                </tr>
                <tr align="center" valign="bottom" >
                  <td height="40" colspan="2"><input type="submit" name="Submit3" value="提 交" onClick="return CheckUserInfo();">
                    &nbsp;&nbsp;
                    <input type="reset" name="Submit22" value="重 置"></td>
                </tr>
              </form>
            </table></td>
            <td width="20"></td>
          </tr>
          <tr>
            <td height="30">&nbsp;</td>
            <td></td>
            <td></td>
          </tr>
      </table></td>
  </tr>
</table>
<!--#include file="Bot.asp" -->
</BODY>
</HTML>

⌨️ 快捷键说明

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