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

📄 register.asp

📁 代码名称: Snitz Forums 2000 代码语言: 英文 代码类型: 国外代码 运行环境: ASP 授权方式: 免费代码 代码大小: 530kb 代码等级: 3 整
💻 ASP
📖 第 1 页 / 共 3 页
字号:
<%
'#################################################################################
'## Snitz Forums 2000 v3.4.05
'#################################################################################
'## Copyright (C) 2000-05 Michael Anderson, Pierre Gorissen,
'##                       Huw Reddick and Richard Kinser
'##
'## This program is free software; you can redistribute it and/or
'## modify it under the terms of the GNU General Public License
'## as published by the Free Software Foundation; either version 2
'## of the License, or (at your option) any later version.
'##
'## All copyright notices regarding Snitz Forums 2000
'## must remain intact in the scripts and in the outputted HTML
'## The "powered by" text/logo with a link back to
'## http://forum.snitz.com in the footer of the pages MUST
'## remain visible when the pages are viewed on the internet or intranet.
'##
'## This program is distributed in the hope that it will be useful,
'## but WITHOUT ANY WARRANTY; without even the implied warranty of
'## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
'## GNU General Public License for more details.
'##
'## You should have received a copy of the GNU General Public License
'## along with this program; if not, write to the Free Software
'## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
'##
'## Support can be obtained from our support forums at:
'## http://forum.snitz.com
'##
'## Correspondence and Marketing Questions can be sent to:
'## manderson@snitz.com
'##
'#################################################################################
%>
<!--#INCLUDE FILE="config.asp"-->
<!--#INCLUDE FILE="inc_sha256.asp"-->
<!--#INCLUDE FILE="inc_header.asp" -->
<!--#INCLUDE FILE="inc_func_member.asp" -->
<!--#INCLUDE FILE="inc_func_posting.asp"-->
<!--#include file="inc_profile.asp"-->
<%
Dim strURLError
Response.Write	"      <table width=""100%"" border=""0"">" & vbNewLine & _
		"        <tr>" & vbNewLine & _
		"          <td><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>" & getCurrentIcon(strIconFolderOpen,"","") & "&nbsp;<a href=""default.asp"">All Forums</a><br />" & vbNewLine & _
		"          " & getCurrentIcon(strIconBar,"","") & getCurrentIcon(strIconFolderOpenTopic,"","") & "&nbsp;Registration Rules and Policies Agreement<br />" & vbNewLine & _
		"          " & getCurrentIcon(strIconBlank,"","") & getCurrentIcon(strIconBar,"","") & getCurrentIcon(strIconFolderOpenTopic,"","") & "&nbsp;Registration Form for " & strForumTitle & "</font></td>" & vbNewLine & _
		"        </tr>" & vbNewLine & _
		"      </table>" & vbNewLine

if strProhibitNewMembers <> "1" then
	if Request.QueryString("mode") <> "DoIt" and Request.QueryString("actkey") = "" then
		if InStr(strReferer, "policy.asp") = 0 then
			Response.Redirect("policy.asp")
		end if
		if strAuthType = "nt" and ChkAccountReg = "1" then
			Response.Write	"      <p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><b>Registration for this account is not necessary.</b></font></p>" & vbNewLine & _
					"      <table align=""center"">" & vbNewLine & _
					"        <tr>" & vbNewLine & _
					"          <td><ul><li>This NT User account has already been registered.</li></ul></td>" & vbNewLine & _
					"        </tr>" & vbNewLine & _
					"      </table>" & vbNewLine
			WriteFooter
			Response.End
		end if

		if strUseExtendedProfile then
			strColspan = " colspan=""2"""
		else
			strColspan = ""
		end if

		call ShowForm
	'################################ E-mail Validation Mod #################################
	elseif Request.QueryString("actkey") <> "" and lcase(strEmail) = "1" and strEmailVal = "1" then
		key = chkString(Request.QueryString("actkey"),"SQLString")

		'###Forum_SQL
		strSql = "SELECT M_NAME, M_USERNAME, M_PASSWORD, M_KEY, M_LEVEL, M_EMAIL, M_DATE, M_COUNTRY, M_AIM, M_ICQ, M_MSN, M_YAHOO" & _
			 ", M_POSTS, M_HOMEPAGE, M_LASTHEREDATE, M_STATUS, M_RECEIVE_EMAIL, M_LAST_IP, M_IP, M_SIG, M_VIEW_SIG, M_SIG_DEFAULT" & _
			 ", M_FIRSTNAME, M_LASTNAME, M_CITY, M_STATE, M_PHOTO_URL, M_LINK1, M_LINK2, M_AGE, M_DOB, M_MARSTATUS, M_SEX, M_OCCUPATION" & _
			 ", M_BIO, M_HOBBIES, M_LNEWS, M_QUOTE, M_SHA256" & _
			 " FROM " & strMemberTablePrefix & "MEMBERS_PENDING" & _
			 " WHERE M_KEY = '" & key & "'"

		set rsKey = my_Conn.Execute (strSql)

		if rsKey.EOF or rsKey.BOF then '## activation key not found
			'Error message to user
			Response.Write	"      <p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strHeaderFontSize & """ color=""" & strHiLiteFontColor & """><b>Activation Key Not Found!</b></font></p>" & vbNewLine & _
					"      <p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strHiLiteFontColor & """>Your activation key was not found in our database.<br />Please try registering again by clicking the Register link at the top right hand corner.<br />If this problem persists, please contact the <a href=""mailto:" & strSender & """>Administrator</a> of the forums.</font></p>" & vbNewLine & _
					"      <p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><a href=""default.asp"">Back To Forum</a></font></p>" & vbNewLine
		elseif strComp(key,rsKey("M_KEY")) <> 0 then
			'Error message to user
			Response.Write	"      <p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strHeaderFontSize & """ color=""" & strHiLiteFontColor & """><b>Activation Key Did Not Match!</b></font></p>" & vbNewLine & _
					"      <p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strHiLiteFontColor & """>Your activation key did not match the one that we have in our database.<br />Please try registering again by clicking the Register link at the top right hand corner.<br />If this problem persists, please contact the <a href=""mailto:" & strSender & """>Administrator</a> of the forums.</font></p>" & vbNewLine & _
					"      <p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><a href=""default.asp"">Back To Forum</a></font></p>" & vbNewLine
		else
			'## Forum_SQL
			strSql = "INSERT INTO " & strMemberTablePrefix & "MEMBERS "
			strSql = strSql & "(M_NAME"
			strSql = strSql & ", M_USERNAME"
			strSql = strSql & ", M_PASSWORD"
			strSql = strSql & ", M_LEVEL"
			strSql = strSql & ", M_EMAIL"
			strSql = strSql & ", M_DATE"
			strSql = strSql & ", M_COUNTRY"
			strSql = strSql & ", M_AIM"
			strSql = strSql & ", M_ICQ"
			strSql = strSql & ", M_MSN"
			strSql = strSql & ", M_YAHOO"
			strSql = strSql & ", M_POSTS"
			strSql = strSql & ", M_HOMEPAGE"
			strSql = strSql & ", M_LASTHEREDATE"
			strSql = strSql & ", M_STATUS"
			strSql = strSql & ", M_RECEIVE_EMAIL"
			strSql = strSql & ", M_LAST_IP"
			strSql = strSql & ", M_IP"
			strSql = strSql & ", M_SIG"
			strSql = strSql & ", M_VIEW_SIG"
			strSql = strSql & ", M_SIG_DEFAULT"
			strSql = strSql & ", M_FIRSTNAME"
			strSql = strSql & ", M_LASTNAME"
			strSql = strSql & ", M_CITY"
			strSql = strSql & ", M_STATE"
			strSql = strSql & ", M_PHOTO_URL"
			strSql = strSql & ", M_LINK1"
			strSql = strSql & ", M_LINK2"
			strSql = strsql & ", M_AGE"
			strSql = strsql & ", M_DOB"
			strSql = strSql & ", M_MARSTATUS"
			strSql = strsql & ", M_SEX"
			strSql = strSql & ", M_OCCUPATION"
			strSql = strSql & ", M_BIO"
			strSql = strSql & ", M_HOBBIES"
			strsql = strsql & ", M_LNEWS"
			strSql = strSql & ", M_QUOTE"
			strSql = strSql & ", M_SHA256"
			strSql = strSql & ") "
			strSql = strSql & " VALUES ("
			strSql = strSql & "'" & chkString(rsKey("M_NAME"),"SQLString") & "'"
			strSql = strSql & ", '" & chkString(rsKey("M_USERNAME"),"SQLString") & "'"
			strSql = strSql & ", '" & chkString(rsKey("M_PASSWORD"),"SQLString") & "'"
			strSql = strSql & ", " & "1"
			strSql = strSql & ", '" & chkString(rsKey("M_EMAIL"),"SQLString") & "'"
			strSql = strSql & ", '" & DateToStr(strForumTimeAdjust) & "'"
			strSql = strSql & ", '" & chkString(rsKey("M_COUNTRY"),"SQLString") & "'"
			strSql = strSql & ", '" & chkString(rsKey("M_AIM"),"SQLString") & "'"
			strSql = strSql & ", '" & chkString(rsKey("M_ICQ"),"SQLString") & "'"
			strSql = strSql & ", '" & chkString(rsKey("M_MSN"),"SQLString") & "'"
			strSql = strSql & ", '" & chkString(rsKey("M_YAHOO"),"SQLString") & "'"
			strSql = strSql & ", 0"
			strSql = strSql & ", '" & chkString(rsKey("M_HOMEPAGE"),"SQLString") & "'"
			strSql = strSql & ", '" & DateToStr(strForumTimeAdjust) & "'"
			strSql = strSql & ", 1"
			strSql = strSql & ", " & cLng(rsKey("M_RECEIVE_EMAIL")) & " "
			strSql = strSql & ", '" & chkString(rsKey("M_LAST_IP"),"SQLString") & "'"
			strSql = strSql & ", '" & chkString(rsKey("M_IP"),"SQLString") & "'"
			strSql = strSql & ", '" & chkString(rsKey("M_SIG"),"message") & "'"
			strSql = strSql & ", '" & chkString(rsKey("M_VIEW_SIG"),"SQLString") & "'"
			strSql = strSql & ", '" & chkString(rsKey("M_SIG_DEFAULT"),"SQLString") & "'"
			strSql = strSql & ", '" & chkString(rsKey("M_FIRSTNAME"),"SQLString") & "'"
			strSql = strSql & ", '" & chkString(rsKey("M_LASTNAME"),"SQLString") & "'"
			strSql = strSql & ", '" & chkString(rsKey("M_CITY"),"SQLString") & "'"
			strSql = strSql & ", '" & chkString(rsKey("M_STATE"),"SQLString") & "'"
			strSql = strSql & ", '" & chkString(rsKey("M_PHOTO_URL"),"SQLString") & "'"
			strSql = strSql & ", '" & chkString(rsKey("M_LINK1"),"SQLString") & "'"
			strSql = strSql & ", '" & chkString(rsKey("M_LINK2"),"SQLString") & "'"
			strSql = strsql & ", '" & chkString(rsKey("M_AGE"),"SQLString") & "'"
			strSql = strsql & ", '" & chkString(rsKey("M_DOB"),"SQLString") & "'"
			strSql = strSql & ", '" & chkString(rsKey("M_MARSTATUS"),"SQLString") & "'"
			strSql = strSql & ", '" & chkString(rsKey("M_SEX"),"SQLString") & "'"
			strSql = strSql & ", '" & chkString(rsKey("M_OCCUPATION"),"SQLString") & "'"
			strSql = strSql & ", '" & chkString(rsKey("M_BIO"),"message") & "'"
			strSql = strSql & ", '" & chkString(rsKey("M_HOBBIES"),"message") & "'"
			strSql = strSql & ", '" & chkString(rsKey("M_LNEWS"),"message") & "'"
			strSql = strSql & ", '" & chkString(rsKey("M_QUOTE"),"message") & "'"
			strSql = strSql & ", 1"
			strSql = strSql & ")"

			my_Conn.Execute (strSql),,adCmdText + adExecuteNoRecords

			Call DoCount

			'## Forum_SQL - Delete the Member
			strSql = "DELETE FROM " & strMemberTablePrefix & "MEMBERS_PENDING "
			strSql = strSql & " WHERE M_KEY = '" & key & "'"

			my_Conn.Execute (strSql),,adCmdText + adExecuteNoRecords

			Response.Write	"      <p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strHeaderFontSize & """><b>Your Registration Has Been Completed!</b></font></p>" & vbNewLine & _
					"      <p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>You may now begin posting"
			if strAuthType="db" then Response.Write(" using your new UserName and Password")
			Response.Write	".</font></p>" & vbNewLine & _
					"      <p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><a href=""default.asp"">Back To Forum</a></font></p>" & vbNewLine
		end if

		rsKey.close
		set rsKey = nothing
	'#####################################################################################
	else
		strEncodedPassword = sha256("" & trim(Request.Form("Password")))

		Err_Msg = ""

		if strAutoLogon <> 1 then
			if trim(Request.Form("Name")) = "" then
				Err_Msg = Err_Msg & "<li>You must choose a UserName</li>"
			end if
			if Len(trim(Request.Form("Name"))) < 3 then
				Err_Msg = Err_Msg & "<li>Your UserName must be at least <strong>3</strong> characters long</li>"
			end if
		end if

		'## Forum_SQL
		strSql = "SELECT M_NAME FROM " & strMemberTablePrefix & "MEMBERS "
		strSql = strSql & " WHERE M_NAME = '" & ChkString(Trim(Request.Form("Name")), "SQLString") &"'"

		set rs = my_Conn.Execute (strSql)

		if rs.BOF and rs.EOF then
			'## Do Nothing
		else
			Err_Msg = Err_Msg & "<li>UserName already in Use, Please Choose Another</li>"
		end if

		rs.close
		set rs = nothing

		if strEmail = "1" and strEmailVal = "1" then
			'## Forum_SQL
			strSql = "SELECT M_NAME FROM " & strMemberTablePrefix & "MEMBERS_PENDING "
			strSql = strSql & " WHERE M_NAME = '" & ChkString(Trim(Request.Form("Name")), "SQLString") &"'"

			set rs = my_Conn.Execute (strSql)

			if rs.BOF and rs.EOF then
				'## Do Nothing
			else
				Err_Msg = Err_Msg & "<li>UserName already in Use, Please Choose Another</li>"
			end if
			rs.close
			set rs = nothing
		end if

		if strUserNameFilter = "1" then
			chkNameFilter(trim(Request.Form("Name")))
		end if

		if strBadWordFilter = "1" then
			chkNameBadWords(trim(Request.Form("Name")))
		end if
		if not IsValidString(trim(Request.Form("Name"))) then
			Err_Msg = Err_Msg & "<li>You may not use any of these chars in your username  !#$%^&*()=+{}[]|\;:/?>,<' </li>"
		end if
		'## NT authentication no additional password needed
		if strAuthType = "db" then
			if not IsValidString(trim(Request.Form("Password"))) then
				Err_Msg = Err_Msg & "<li>You may not use any of these chars in your password  !#$%^&*()=+{}[]|\;:/?>,<' </li>"
			end if

			if trim(Request.Form("Password")) = "" then
				Err_Msg = Err_Msg &  "<li>You must choose a Password</li>"
			end if

			if Len(Request.Form("Password")) > 25 then
				Err_Msg = Err_Msg & "<li>Your Password can not be greater than 25 characters</li>"
			end if

			if Request.Form("Password") <> Request.Form("Password2") then
				Err_Msg = Err_Msg & "<li>Your Passwords didn't match.</li>"
			end if
		end if

		If strAutoLogon <> 1 then
			if Request.Form("Email") = "" then
				Err_Msg = Err_Msg & "<li>You Must give an e-mail address</li>"
			end if

			if Request.Form("Email") <> Request.Form("Email3") then
				Err_Msg = Err_Msg & "<li>Your E-mail Addresses didn't match.</li>"
			end if

			if EmailField(Request.Form("Email")) = 0 then 
				Err_Msg = Err_Msg & "<li>You Must enter a valid e-mail address</li>"
			end if
		end if

⌨️ 快捷键说明

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