| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 2486 人关注过本帖
标题:想要一段注册会员的ASP代码?谢谢
只看楼主 加入收藏
杨絮
Rank: 1
等 级:新手上路
帖 子:3
专家分:0
注 册:2008-5-9
收藏
 问题点数:0 回复次数:3 
想要一段注册会员的ASP代码?谢谢
做毕业设计想要一段注册会员的ASP代码?谢谢!
急急急……
搜索更多相关主题的帖子: ASP 会员 代码 注册 
2008-05-10 15:08
multiple1902
Rank: 8Rank: 8
等 级:贵宾
威 望:42
帖 子:4881
专家分:671
注 册:2007-2-9
收藏
得分:0 
第一,上网随便下个asp论坛的程序里都会有你要的代码,当然要看许可协议是不是给你随便用

第二,你可能马上要说了,这个注册会员的代码没法直接放到你程序里,那是肯定的,所以你要学习人家的程序为什么这样做就是注册会员了。你读读你的问题,再强的高手也没法给你能在你的程序里跑起来的代码。
2008-05-10 16:04
杨絮
Rank: 1
等 级:新手上路
帖 子:3
专家分:0
注 册:2008-5-9
收藏
得分:0 
回复 2# 的帖子
我想把发到邮箱的注册方式删除掉,直接就可以注册成功,该怎么改啊?
<!--#include file="top.asp"-->
<!--#include file="connection.asp"-->
<!--#include file="inc/WebConfig.asp"-->
<!--#include file="inc/Check_SI.asp"-->
<!--#include file="inc/fy_fuction.asp"-->
<%dim action
action=request.QueryString("action")%>
<HTML><HEAD><TITLE><%=webname%>--新用户注册</TITLE>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<META name=Robots contect="all">
<LINK href="img/lyml_style.css"
type=text/css rel=stylesheet>
<script language=JavaScript>
function IsDigit()
{
  return ((event.keyCode >= 48) && (event.keyCode <= 57));
}
</script>
<SCRIPT LANGUAGE="JavaScript">
<!--
function checkuserinfo()
{
   if(checkspace(document.userinfo.username.value)) {
    document.userinfo.username.focus();
    alert("对不起,请填写用户名!");
    return false;
  }
    if(checkspace(document.userinfo.userpassword.value) || document.userinfo.userpassword.value.length < 6 || document.userinfo.userpassword.value.length >20) {
    document.userinfo.userpassword.focus();
    alert("密码长度不能不能这空,在6位到20位之间,请重新输入!");
    return false;
  }
    if(document.userinfo.userpassword.value != document.userinfo.userpassword1.value) {
    document.userinfo.userpassword.focus();
    document.userinfo.userpassword.value = '';
    document.userinfo.userpassword1.value = '';
    alert("两次输入的密码不同,请重新输入!");
    return false;
  }

 if(document.userinfo.useremail.value.length!=0)
    if (document.userinfo.useremail.value.charAt(0)=="." ||        
         document.userinfo.useremail.value.charAt(0)=="@"||      
         document.userinfo.useremail.value.indexOf('@', 0) == -1 ||
         document.userinfo.useremail.value.indexOf('.', 0) == -1 ||
         document.userinfo.useremail.value.lastIndexOf("@")==document.userinfo.useremail.value.length-1 ||
         document.userinfo.useremail.value.lastIndexOf(".")==document.userinfo.useremail.value.length-1)
     {
      alert("Email地址格式不正确!");
      document.userinfo.useremail.focus();
      return false;
      }
if(checkspace(document.userinfo.useremail.value)) {
   alert("Email不能为空!");
   document.userinfo.useremail.focus();
   return false;
   }
   if(checkspace(document.userinfo.userzhenshiname.value)) {
    document.userinfo.userzhenshiname.focus();
    alert("对不起,请填写真实姓名!");
    return false;
  }
   if(checkspace(document.userinfo.idcard.value)) {
    document.userinfo.idcard.focus();
    alert("对不起,请填写真实身份证!");
    return false;
  }
     if(checkspace(document.userinfo.work.value)) {
    document.userinfo.work.focus();
    alert("对不起,请填写你工作!");
    return false;
  }
  if(checkspace(document.userinfo.address.value)) {
    document.userinfo.address.focus();
    alert("对不起,请填写详细地址!");
    return false;
  }
  if(checkspace(document.userinfo.youbian.value)) {
    document.userinfo.youbian.focus();
    alert("对不起,请填写邮编!");
    return false;
  }
  if(document.userinfo.youbian.value.length!=6) {
    document.userinfo.youbian.focus();
    alert("对不起,请正确填写邮编!");
    return false;
  }
    if(checkspace(document.userinfo.usertel.value)) {
    document.userinfo.usertel.focus();
    alert("对不起,请留下您的联系电话!");
    return false;
  }
}
function checkspace(checkstr) {
  var str = '';
  for(i = 0; i < checkstr.length; i++) {
    str = str + ' ';
  }
  return (str == checkstr);
}
function showmm(Qy){
if(Qy.style.display=="none"){
Qy.style.display="";
}else{
Qy.style.display="none";
}
}
//-->
</script>

<BODY>
<TABLE cellSpacing=0 cellPadding=0 width=964 align=center border=0>
  <TBODY>
  <TR>
    <TD bgColor=#ffffff height=38>
      <TABLE cellSpacing=0 cellPadding=0 width=956 align=center border=0>
        <TBODY>
        <TR>
          <TD background=img/dh_img01b.jpg height=36>
            <TABLE cellSpacing=0 cellPadding=0 width="100%" align=center
            border=0>
              <TBODY>
              <TR>
                <TD class=dh1 width=255><FONT color=#000000>   本页位置:</FONT><a href="../Default.htm"><font color="#FF0000">首页</font></a> <FONT
                  color=#000000>/</FONT> <font color="#000000">会员注册</font></TD>
                </TR></TBODY></TABLE></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE>
<TABLE cellSpacing=0 cellPadding=0 width=964 align=center border=0>
  <TBODY>
  <TR>
    <TD bgColor=#ffffff>
      <div align="center">
      <TABLE class=zw-bj cellSpacing=0 cellPadding=0 width=956
      border=0 style="background-image: url('img/login_bg.jpg')">
        <TBODY>
        <TR>
          <TD vAlign=top height=500>
            <TABLE cellSpacing=5 cellPadding=0 width=935 align=center
              border=0><TBODY>
              <TR>
                <TD height=5></TD></TR>
              <TR>
                <TD vAlign=top width=701 bgColor=#ffffff>
                  <TABLE cellSpacing=0 cellPadding=0 width=940 align=center border=0 style="BORDER-LEFT: #d8d8d8 1px solid;BORDER-RIGHT: #d8d8d8 1px solid;">
  <TBODY>
    <TR>
      <TD class=b vAlign=top align=left width=764><%select case action
case ""%>
        <table width="940" align="center" border="0" cellspacing="0" cellpadding="0" class="table-zuoyou" bordercolor="#CCCCCC">
          <tr>
            <td height="22" bgcolor="#FFFFFF" bordercolor="#FFFFFF"><table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
                <tr>
                  <td valign="top"><table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
                      <tr>
                        <td><table width="80%" align="center" border="0" cellspacing="0" cellpadding="0">
                            <tr>
                              <td height="40" align="center"><font color=red><strong>请用户仔细阅读<%=webname%>注册条约</strong></font></td>
                            </tr>
                        </table></td>
                      </tr>
                      <tr>
                        <td><table width="90%" border="0" align="center" cellpadding="10" cellspacing="1" bgcolor="#CCCCCC">
                            <tr bgcolor="#ffffff">
                              <td><%call tiaoyue()%>
                              </td>
                            </tr>
                        </table></td>
                      </tr>
                    </table>
                      <table name=agree border="0" cellpadding="10" cellspacing="0" align=center width="80%">
                        <tr align=center>
                          <td width="50%" align="right"><FORM name=register method=post action=User_Reg.asp?action=yes>
                              <input type="hidden" name="action" value="agree">
                              <INPUT class="go-wenbenkuang" type=submit value=" 同意注册 " name=Submit>
                          </FORM></td>
                          <td width="50%" align="left"><FORM action=default.htm method=post>
                              <INPUT class=go-wenbenkuang type=submit value=" 我不同意 ">
                          </FORM></td>
                        </tr>
                    </table></td>
                </tr>
            </table></td>
          </tr>
        </table>
        <SCRIPT>
    secs = 30; // 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"%>
        <table width="940" align="center" border="0" cellspacing="0" cellpadding="0" class="table-zuoyou" bordercolor="#CCCCCC">
          <tr>
            <td bgcolor="#FFFFFF" bordercolor="#FFFFFF"><table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
                <tr>
                  <td align="center"><font color="#FF3300"><b><br>
                    请您务必详细填写您的信息,并核对无误,国内用户请留下您的真实中文姓名。<br>
              未经您的允许,您的个人信息对外保密。(带 <font color=red>*</font> 号为必填项) </b></font>
                      <form name=userinfo method=post action=user_Reg.asp?action=save>
                        <table width="80%" border="0" cellpadding="5" cellspacing="1" bgcolor="#CCCCCC" align="center">
                          <tr>
                            <td height=30 colspan=2 bgcolor="#FFFFFF" ><font color="#FF3300"><img src="Images/ring01.gif" width="9" height="9"> 用户名和密码</font> </td>
                          </tr>
                          <tr bgcolor="#FFFFFF">
                            <td width=30% align=right>用 户 名:</td>
                            <td width=70% class=pad><input class="wenbenkuang" name="username" type="text" id="username" maxLength="18">
                                <font color=red>* 支持中文,不支持特殊符号如:*%#!-&%$</td></font>
                          </tr>
                          <tr bgcolor="#FFFFFF">
                            <td width=30% align=right>密  码:</td>
                            <td class=pad><input class="wenbenkuang" name="userpassword" type="password" id="userpassword" maxLength="18">
                                <font color=red>*不支持特殊符号如:*%#!-&%$</td></font>
                          </tr>
                          <tr bgcolor="#FFFFFF">
                            <td width=30% align=right>确认密码:</td>
                            <td class=pad><input class="wenbenkuang" name="userpassword1" type="password" id="userpassword1" maxLength="18">
                                <font color=red>*</font></td>
                          </tr>
                          <tr bgcolor="#FFFFFF">
                            <td width=30% align=right>电子邮箱:</td>
                            <td class=pad><input name="useremail" type="text" class="wenbenkuang" id="useremail" maxlength="25">
                                <font color=red>*</font></td>
                          </tr>
                          <tr bgcolor="#FFFFFF">
                            <td height="30" colspan="2" valign="middle" ><font color="#FF3300"><img src="Images/ring01.gif" width="9" height="9"> 用户详细资料</font></td>
                          </tr>
                          <tr bgcolor="#FFFFFF">
                            <td width=30% align=right>您的真实姓名:</td>
                            <td class=pad><input name="userzhenshiname" type="text" id="userzhenshiname" size="15" maxlength="10">
                                <font color=red>* 以便确认</font> </td>
                          </tr>
                          <tr bgcolor="#FFFFFF">
                            <td width=30% align=right>您的身份证号:</td>
                            <td class=pad><input class="wenbenkuang" name="idcard" type="text" id="idcard" maxlength="18" onKeyPress="event.returnValue=IsDigit();">
                              <font color=red>*</font>                            </td>
                          </tr>
                          <tr bgcolor="#FFFFFF">
                            <td width=30% align=right>姓  别:</td>
                            <td class=pad><input type=radio name=sex id=Select1 value=男 checked>
                              
                                <input type=radio name=sex id=Select1 value=女>
                                女 </td>
                          </tr>
                          <tr bgcolor="#FFFFFF">
                            <td width=30% align=right> 工作:</td>
                            <td class=pad><input name="work" type="text" id="work" size="15" maxlength="20">
                              <font color=red>*</font> </td>
                          </tr>
                          <tr bgcolor="#FFFFFF">
                            <td width=30% align=right>通讯地址:</td>
                            <td class=pad><input class="wenbenkuang" name="address" type="text" id="address" size="40" maxlength="30">
                                <font color=red>*</font> </td>
                          </tr>
                          <tr bgcolor="#FFFFFF">
                            <td width=30% align=right>邮  编:</td>
                            <td class=pad><input class="wenbenkuang" name="youbian" type="text" id="youbian" maxlength="6" size="10" onKeyPress="event.returnValue=IsDigit();">
                                <font color=red>*</font></td>
                          </tr>
                          <tr bgcolor="#FFFFFF">
                            <td width=30% align=right>联系电话:</td>
                            <td class=pad><input class="wenbenkuang" name="usertel" maxlength="18" type="text" id="usertel" onKeyUp="this.value=this.value.replace(/\D/gi,'')">
                                <font color=red>*</font> </td>
                          </tr>
                          <tr bgcolor="#FFFFFF">
                            <td width=30% align="right">是否注册企业会员:</td>
                            <td class=pad><input name="qy" type="checkbox" id="qy" onClick="showmm(Qy);" value="yes">
                            <font color="#FF0000">(注册企业会员后可以发布线路和酒店信息,需要管理员审核)</font></td>
                          </tr>
                        </table>
                          <table width="80%" border="0" cellpadding="5" cellspacing="1" bgcolor="#CCCCCC" align="center" id="Qy" style="display:none" >
                          <tr bgcolor="#FFFFFF">
                            <td width=30% align="right">公司名称:</td>
                            <td width=70%><input type="text" name="qy_name"><font color="#FF0000">(你选择了企业会员后此项必填!)</font></td>
                          </tr>
                          <tr bgcolor="#FFFFFF">
                            <td align="right">公司联系电话:</td>
                            <td class=pad><input type="text" name="qy_tel" onKeyUp="this.value=this.value.replace(/\D/gi,'')"><font color="#FF0000">(你选择了企业会员后此项必填!)</font></td>
                          </tr>
                          <tr bgcolor="#FFFFFF">
                            <td align="right">公司E-Mail:</td>
                            <td><input type="text" name="qy_email"><font color="#FF0000">(你选择了企业会员后此项必填!)</font></td>
                        </tr></table>
                          <table>
                          <tr bgcolor="#FFFFFF">
                            <td><input class="go-wenbenkuang" onClick="return checkuserinfo();" type=submit name="submit" value=" 提交信息 ">
                              <input class="go-wenbenkuang" onClick="ClearReset()" type=reset name="Clear" value=" 重新填写 "></td>
                          </tr>
                        </table>
                    </form></td>
                </tr>
            </table></td>
          </tr>
        </table>
        <table width="760" align="center" border="0" cellspacing="0" cellpadding="0" class="table-zuoyou" bordercolor="#CCCCCC">
          <tr>
            <td bordercolor="#FFFFFF" bgcolor="#FFFFFF"><%case "save"%>
                <!--#include file="inc/md5.asp"-->
                <%if request("Qy")="yes" then
if request("Qy_Name")="" then
response.Write "<script language='javascript'>alert('你选择了注册企业信息,那么企业名称必须填写!');window.location.href='User_Reg.asp?action=yes';</script>"
                end if
                if request("Qy_Tel")="" then
response.Write "<script language='javascript'>alert('你选择了注册企业信息,那么企业联系电话必须填写!');window.location.href='User_Reg.asp?action=yes';</script>"
                end if
                if request("Qy_Email")="" then
response.Write "<script language='javascript'>alert('你选择了注册企业信息,那么企业E-mail必须填写!');window.location.href='User_Reg.asp?action=yes';</script>"
                end if
call saveuser()
Else
call saveuser()
End if
end select

sub tiaoyue()
set rs=server.CreateObject("adodb.recordset")
rs.Open "select regtiaoyue from config",conn,1,1
response.Write trim(rs("regtiaoyue"))
rs.Close
set rs=nothing
end sub

sub saveuser()
set rse=server.CreateObject("adodb.recordset")
rse.open "select * from userb where email='"&trim(request("useremail"))&"' or username='"&trim(request("username"))&"'",conn,1,1
if not(rse.bof or rse.eof) then
call usererr()
rse.close
Else
'Star____________________________________

set rs=server.CreateObject("adodb.recordset")
rs.open "select * from userb",conn,1,3
rs.addnew
rs("username")=trim(request("username"))

rs("userpassword")=md5(trim(request("userpassword")))

rs("email")=trim(request("useremail"))

rs("name")=trim(request("userzhenshiname"))

rs("sex")=trim(request("sex"))

rs("telphone")=RtnReplaceInt(request("usertel"),0000)

rs("zip")=trim(request("youbian"))

rs("address")=trim(request("address"))
rs("idcard")=trim(request("idcard"))
rs("work")=trim(request("work"))

rs("jifen")=0
rs("lastlogin")=now()

rs("userlastip")=Request.ServerVariables("REMOTE_ADDR")
rs("logins")=1

rs("regdate")=now()
Qy=request("Qy")
if Qy="yes" then
        rs("reglx")=3
    else
        rs("reglx")=1
end if
rs("Qy_Name")=trim(request("Qy_Name"))
rs("Qy_Tel")=trim(request("Qy_Tel"))
rs("Qy_Email")=trim(request("Qy_Email"))

rs.update
rs.close
set rs=nothing


response.Cookies("Gemisum")("username")=trim(request("username"))
Qy=request("Qy")
if Qy="yes" then
response.Cookies("Gemisum")("reglx")=3
    else
response.Cookies("Gemisum")("reglx")=1
end if
response.Cookies("Gemisum")("yucun")=0
response.Cookies("Gemisum")("jifen")=0
session("regtimes")=1
session.Timeout=1
'发送邮件
'if Forum_Setting(47)=1 then
if webdddd="dasffdf" then
    'on error resume next
    '发送注册邮件
    topic="您在" & webname & "的注册资料"
    getpass=trim(request("userpassword"))
    
    mailbody="<html>"
    mailbody=mailbody & "<title>注册信息</title>"
    mailbody=mailbody & "<body>"
    mailbody=mailbody & "<TABLE border=0 width='95%' align=center><TBODY><TR>"
    mailbody=mailbody & "<TD valign=middle align=top>"
    mailbody=mailbody & trim(request("username"))&",您好:<br><br>"
    mailbody=mailbody & "欢迎您注册" & webname & ",我们将提供给您最好的服务!<br>"
    mailbody=mailbody & "下面是您在" & webname & "的注册信息:<br><br>"
    mailbody=mailbody & "注册名:"&trim(request("username"))&"<br>"
    mailbody=mailbody & "密  码:"&getpass&"<br>"
    mailbody=mailbody & "<br><br>"
    mailbody=mailbody & "<center><font color=red>再次感谢您注册" & webname & "!</font>"
    mailbody=mailbody & "</TD></TR></TBODY></TABLE><br><hr width=95% size=1>"
    mailbody=mailbody & "</body>"
    mailbody=mailbody & "</html>"
    
Set JMail=Server.CreateObject("JMail.Message")
    JMail.Charset="gb2312"
    JMail.ContentType = "text/html"
jmail.from = mailsend
jmail.silent = true
jmail.Logging = true
jmail.FromName = mailname
jmail.mailserverusername = mailusername
jmail.mailserverpassword = mailuserpass
jmail.AddRecipient trim(request("useremail"))
jmail.body=mailbody
JMail.Subject=topic
if not jmail.Send ( mailaddress ) then
SendMail=""
else
SendMail="OK"
end if
    if SendMail="OK" then
    sendmsg="<p>· 您的注册信息已经发往您的邮箱,请注意查收!</p>"
    else
    sendmsg="<p>· 系统出错,注册信息资料未能发送到您的邮箱!</p>"
    end if
End if'--------------------------------------
response.Write "<table width=760 align=center border=0 cellspacing=0 cellpadding=0 class=table-zuoyou bordercolor=#CCCCCC><tr><td bordercolor=#FFFFFF bgcolor=#FFFFFF align=center> "
response.Write "<table width=450 border=0 align=center cellpadding=0 cellspacing=0><tr><td height=260>"
response.Write "<p>· <font color=red>用户注册成功!</font></p><p>· 恭喜您注册成为 ["&webname&"] 的正式用户,请记好您的用户名及密码!</p>"
response.Write "<p>· <a href=default.htm>返回首页</a></p></td></tr></table></td></tr></table>"
end if
end sub

sub usererr()
response.write "<table width=760 align=center border=0 cellspacing=0 cellpadding=0 class=table-zuoyou bordercolor=#CCCCCC><tr><td bordercolor=#FFFFFF bgcolor=#FFFFFF align=center>"
response.write "<table width=450 border=0 align=center cellpadding=2 cellspacing=0><tr><td height=260>"
response.write "<p>· <font color=red>用户注册失败!</font></p><p>· 您输入的用户名或e-mail地址已存在,请返回重新输入!</p><p>· <a href=javascript:history.go(-1)>返回上一页</a></p> </td></tr></table></td></tr></table>"
end sub
%>
            </td>
          </tr>
        </table></TD>
    </TR>
  </TBODY>
</TABLE></TD></TR>
              <TR>
                <TD
    height=5></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></div>
    </TD></TR></TBODY></TABLE>
</BODY></HTML>
<!--#include file="end.asp"-->
2008-05-10 21:32
multiple1902
Rank: 8Rank: 8
等 级:贵宾
威 望:42
帖 子:4881
专家分:671
注 册:2007-2-9
收藏
得分:0 
把HTML输入EMail的外观代码(表格和文字,还有文本框)删掉。
把HTML验证EMail是否可用的Javascript删掉。检查代码是否合法。

把ASP验证EMail地址是否输入的代码删掉。
进数据库,把EMail字段删掉,或者空着不用。
写入数据库时不从表单获取EMail,不存入数据库。
2008-05-11 10:09
快速回复:想要一段注册会员的ASP代码?谢谢
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.047325 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved