Registration Referral
[ALTER]
MEMBERS
ADD#M_REFERRED#VARCHAR (255)#NULL#
[END]
[ALTER]
MEMBERS_PENDING
ADD#M_REFERRED#VARCHAR (255)#NULL#
[END]
Look for the following lines (appx 733-738):
if strQuote = "1" then
strSql = strSql & ", '" & ChkString(Request.Form("Quote"),"message") & "'"
else
strSql = strSql & ", ''"
end if
strSql = strSql & ", 1"
Change them to say:
if strQuote = "1" then
strSql = strSql & ", '" & ChkString(Request.Form("Quote"),"message") & "'"
else
strSql = strSql & ", ''"
end if
strSql = strSql & ", '" & ChkString(Request.Form("Referred"),"message") & "'"
Look for the following line (appx 599):
strSql = strSql & ", M_QUOTE"
After it, insert this:
strSql = strSql & ", M_REFERRED"
Look for the following line (appx 182):
strSql = strSql & ", '" & chkString(rsKey("M_QUOTE"),"message") & "'"
After it, insert this:
strSql = strSql & ", '" & chkString(rsKey("M_REFERRED"),"message") & "'"
Look for the following line (appx 142):
strSql = strSql & ", M_QUOTE"
After it, insert this:
strSql = strSql & ", M_REFERRED"
Look for the following line (appx 87):
", M_BIO, M_HOBBIES, M_LNEWS, M_QUOTE, M_SHA256" & _
Change it to say:
", M_BIO, M_HOBBIES, M_LNEWS, M_QUOTE, M_REFERRED, M_SHA256" & _
Look for the following lines (appx 744-750):
Response.Write " </table>" & vbNewLine & _
" </td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" </table>" & vbNewLine & _
" </td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" </table>" & vbNewLine
Above those, insert these:
If strMode = "Register" then
Response.Write " <tr>" & vbNewLine & _
" <td bgColor=""" & strPopUpTableColor & """ align=""right"" valign=""middle"" nowrap width=""10%""><b><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>How did you find us? </font></b></td>" & vbNewLine & _
" <td bgColor=""" & strPopUpTableColor & """><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><input name=""Referred"" size=""25"" maxLength=""255"" value=""" & Request.Form("Referred") & """>" & vbNewLine & _
" </font></td></tr>" & vbNewLine
End If
Look for the following lines (appx 266-275):
if strQuote = "1" then
Response.Write " <tr>" & vbNewLine
if strReqQuote = "1" then
Response.Write " <td bgcolor=""" & strPopUpTableColor & """ valign=""top"" align=""right"" nowrap width=""10%""><b><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><font color=""" & strHiLiteFontColor & """>*</font> Favorite Quote: </font></b></td>" & vbNewLine
else
Response.Write " <td bgcolor=""" & strPopUpTableColor & """ valign=""top"" align=""right"" nowrap width=""10%""><b><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>Favorite Quote: </font></b></td>" & vbNewLine
end if
Response.Write " <td bgColor=""" & strPopUpTableColor & """ valign=""top""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><textarea name=""Quote"" cols=""30"" rows=""4"">" & Trim(cleancode(strMyQuote)) & "</textarea></font></td>" & vbNewLine & _
" </tr>" & vbNewLine
end if
[navyAfter those, insert these:
if strReferral = "1" then
Response.Write " <tr>" & vbNewLine
if strReqReferral= "1" then
Response.Write " <td bgcolor=""" & strPopUpTableColor & """ valign=""top"" align=""right"" nowrap width=""10%""><b><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><font color=""" & strHiLiteFontColor & """>*</font> Referral: </font></b></td>" & vbNewLine
else
Response.Write " <td bgcolor=""" & strPopUpTableColor & """ valign=""top"" align=""right"" nowrap width=""10%""><b><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>Where did you hear about us? </font></b></td>" & vbNewLine
end if
Response.Write " <td bgColor=""" & strPopUpTableColor & """ valign=""top""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><input type=""text"" size=""25"" maxLength=""255"" name=""Referred"" value=""" & Trim(cleancode(rs("M_REFERRED"))) & """></font></td>" & vbNewLine & _
" </tr>" & vbNewLine
end if
Search for the following lines (appx 425-436):
Response.Write " <tr valign=""top"">" & vbNewLine & _
" <td bgColor=""" & strPopUpTableColor & """ align=""right""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><b>Enabled:</b> </font></td>" & vbNewLine & _
" <td bgColor=""" & strPopUpTableColor & """><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>" & vbNewLine & _
" On: <input type=""radio"" class=""radio"" name=""strQuote"" value=""1""" & chkRadio(strQuote,0,false) & "> " & vbNewLine & _
" Off: <input type=""radio"" class=""radio"" name=""strQuote"" value=""0""" & chkRadio(strQuote,0,true) & ">" & vbNewLine & _
" <a href=""JavaScript:openWindow3('pop_config_help.asp?mode=members#Quote')"">" & getCurrentIcon(strIconSmileQuestion,"","") & "</a></td>" & vbNewLine & _
" </tr>" & vbNewLine
Response.Write " <td bgColor=""" & strPopUpTableColor & """ align=""right""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><b>Required:</b> </font></td>" & vbNewLine & _
" <td bgColor=""" & strPopUpTableColor & """><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>" & vbNewLine & _
" On: <input type=""radio"" class=""radio"" name=""strReqQuote"" value=""1""" & chkRadio(strReqQuote,0,false) & "> " & vbNewLine & _
" Off: <input type=""radio"" class=""radio"" name=""strReqQuote"" value=""0""" & chkRadio(strReqQuote,0,true) & ">" & vbNewLine & _
" </tr>" & vbNewLine
After those, insert these:
Response.Write " <tr valign=""top"">" & vbNewLine & _
" <td bgColor=""" & strCategoryCellColor & """ colspan=""2"" align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strCategoryFontColor & """><b>Referral</b></font></td>" & vbNewLine & _
" </tr>" & vbNewLine
Response.Write " <tr valign=""top"">" & vbNewLine & _
" <td bgColor=""" & strPopUpTableColor & """ align=""right""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><b>Enabled:</b> </font></td>" & vbNewLine & _
" <td bgColor=""" & strPopUpTableColor & """><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>" & vbNewLine & _
" On: <input type=""radio"" class=""radio"" name=""strReferral"" value=""1""" & chkRadio(strReferral,0,false) & "> " & vbNewLine & _
" Off: <input type=""radio"" class=""radio"" name=""strReferral"" value=""0""" & chkRadio(strReferral,0,true) & ">" & vbNewLine & _
" <a href=""JavaScript:openWindow3('pop_config_help.asp?mode=members#Referral')"">" & getCurrentIcon(strIconSmileQuestion,"","") & "</a></td>" & vbNewLine & _
" </tr>" & vbNewLine
Response.Write " <td bgColor=""" & strPopUpTableColor & """ align=""right""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><b>Required:</b> </font></td>" & vbNewLine & _
" <td bgColor=""" & strPopUpTableColor & """><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>" & vbNewLine & _
" On: <input type=""radio"" class=""radio"" name=""strReqReferral"" value=""1""" & chkRadio(strReqReferral,0,false) & "> " & vbNewLine & _
" Off: <input type=""radio"" class=""radio"" name=""strReqReferral"" value=""0""" & chkRadio(strReqReferral,0,true) & ">" & vbNewLine & _
" </tr>" & vbNewLine
Search for the following line (appx 372):
strReqQuote = Application(strCookieURL & "STRREQQUOTE")
After that, insert this:
strReqReferral = Application(strCookieURL & "STRREQREFERRAL")
Search for the following line (appx 345):
strQuote = Application(strCookieURL & "STRQUOTE")
After that, insert this:
strReferral = Application(strCookieURL & "STRREFERRAL")
Search for the following line (appx 142):
Dim strReqHobbies, strReqLNews, strReqQuote, strReqMarStatus, strReqFavLinks
Change it to say:
Dim strReqHobbies, strReqLNews, strReqQuote, strReqReferral, strReqMarStatus, strReqFavLinks
Search for the following line (appx 137):
Dim strHobbies, strLNews, strQuote, strMarStatus, strFavLinks
Change it to say:
Dim strHobbies, strLNews, strQuote, strReferral, strMarStatus, strFavLinks
Look for the following lines (appx 315-320):
if strQuote = "1" and strReqQuote = "1" then
if trim(Request.Form("Quote")) = "" then
Err_Msg = Err_Msg & "<li>You Must Provide A Quote</li>"
end if
end if
After them, insert these:
if strReferral = "1" and strReqReferral = "1" then
if trim(Request.Form("Referred")) = "" then
Err_Msg = Err_Msg & "<li>You Must Provide A Reference</li>"
end if
end if
Look for the following lines (appx 1729-1731):
if strQuote = "1" then
strSql = strSql & ", M_QUOTE = '" & chkString(Request.Form("Quote"),"message") & "'"
end if
After those, insert these:
if strReferral = "1" then
strSql = strSql & ", M_REFERRED = '" & chkString(Request.Form("Referred"),"message") & "'"
end if
Look for the following lines (appx 1376-1378):
if strQuote = "1" then
strSql = strSql & ", M_QUOTE = '" & ChkString(Request.Form("Quote"),"message") & "'"
end if
After those, insert these:
if strReferral = "1" then
strSql = strSql & ", M_Referred = '" & ChkString(Request.Form("Referred"),"message") & "'"
end if
Look for the following lines (appx 1132-1136):
if strQuote = "1" and strReqQuote = "1" then
if trim(Request.Form("Quote")) = "" then
Err_Msg = Err_Msg & "<li>You Must Provide A Quote</li>"
end if
end if
After those, insert these:
if strReferral = "1" and strReqReferral = "1" then
if trim(Request.Form("Referred")) = "" then
Err_Msg = Err_Msg & "<li>You Must Provide A Reference</li>"
end if
end if
Look for the following line (appx 969):
strsql = strsql & ", " & strMemberTablePrefix & "MEMBERS.M_QUOTE"
After it, insert this:
strsql = strsql & ", " & strMemberTablePrefix & "MEMBERS.M_REFERRED"
Look for the following line (appx 837):
strsql = strsql & ", " & strMemberTablePrefix & "MEMBERS.M_QUOTE"
After it, insert this:
strsql = strsql & ", " & strMemberTablePrefix & "MEMBERS.M_REFERRED"
Look for the following lines (appx 669-677):
if strQuote = "1" then
Response.Write " <tr>" & vbNewLine & _
" <td bgcolor=""" & strPopUpTableColor & """ valign=""top"" align=""right"" nowrap width=""10%""><b><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>Favorite Quote: </font></b></td>" & vbNewLine & _
" <td bgColor=""" & strPopUpTableColor & """ valign=""top""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>"
if IsNull(strMyQuote) or Trim(strMyQuote) = "" then Response.Write("-") else Response.Write(formatStr(strMyQuote))
Response.Write "</font></td>" & vbNewLine & _
" </tr>" & vbNewLine
end if
end if
After those, insert these:
if strReferral = "1" then
Response.Write " <tr>" & vbNewLine & _
" <td bgcolor=""" & strPopUpTableColor & """ valign=""top"" align=""right"" nowrap width=""10%""><b><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>Where did you hear about us? </font></b></td>" & vbNewLine & _
" <td bgColor=""" & strPopUpTableColor & """ valign=""top""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>"
if IsNull(strReferral) or Trim(strReferral) = "" then Response.Write("-") else Response.Write(formatStr(strReferral))
Response.Write "</font></td>" & vbNewLine & _
" </tr>" & vbNewLine
end if
Look for the following line (appx 640):
if IsNull(strMyQuote) or trim(strMyQuote) = "" then strQuote = 0
After it, insert this:
if IsNull(strReferral) or trim(strReferral) = "" then strReferral = 0
Look for the following line (appx 227):
strMyQuote = rs("M_QUOTE")
After it, insert this:
strReferral = rs("M_REFERRED")
Look for the following line (appx 196):
strsql = strsql & ", " & strMemberTablePrefix & "MEMBERS.M_QUOTE"
After it, insert this:
strsql = strsql & ", " & strMemberTablePrefix & "MEMBERS.M_REFERRED"
Look for the following line (appx 145):
" <LI><span class=""spnMessageText""><a href=""admin_member_search.asp"">Member Search</a></span></LI>" & vbNewLine & _
Above that, insert this:
" <LI><span class=""spnMessageText""><a href=""admin_referrals.asp"">Members: Referrals</a></span></LI>" & vbNewLine & _
<%
'###############################################################################
'##
'## Snitz Forums 2000 v3.4.07
'##
'###############################################################################
'##
'## Copyright © 2000-09 Michael Anderson, Pierre Gorissen,
'## Huw Reddick and Richard Kinser
'##
'## This program is free. You can redistribute and/or modify it under the
'## terms of the GNU General Public License as published by the Free Software
'## Foundation; either version 2 or (at your option) any later version.
'##
'## All copyright notices regarding Snitz Forums 2000 must remain intact in
'## the scripts and in the HTML output. 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 an 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:
'##
'## Free Software Foundation, Inc.
'## 59 Temple Place, Suite 330
'## Boston, MA 02111-1307
'##
'## Support can be obtained from our support forums at:
'##
'## http://forum.snitz.com
'##
'## Correspondence and marketing questions can be sent to:
'##
'## manderson@snitz.com
'##
'###############################################################################
'##
'## admin_referrals.asp
'##
'###############################################################################
%>
<!--#INCLUDE FILE="config.asp"-->
<!--#INCLUDE FILE="inc_sha256.asp"-->
<!--#INCLUDE FILE="inc_header.asp" -->
<!--#INCLUDE FILE="inc_func_admin.asp" -->
<!--#INCLUDE FILE="inc_func_member.asp" -->
<%
If Session(strCookieURL & "Approval") <> "15916941253" Then
scriptname = split(request.servervariables("SCRIPT_NAME"),"/")
Response.Redirect "admin_login.asp?target=" & scriptname(ubound(scriptname))
end if
Response.Write "<table border=""0"" width=""100%"">" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td width=""33%"" align=""left"" nowrap><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>" & vbNewLine & _
" " & getCurrentIcon(strIconFolderOpen,"","") & " <a href=""default.asp"">All Forums</a><br />" & vbNewLine & _
" " & getCurrentIcon(strIconBar,"","") & getCurrentIcon(strIconFolderOpen,"","") & " <a href=""admin_home.asp"">Admin Section</a><br />" & vbNewLine & _
" " & getCurrentIcon(strIconBlank,"","") & getCurrentIcon(strIconBar,"","") & getCurrentIcon(strIconFolderOpenTopic,"","") & " Member Referrals<br /></font>" & vbNewLine & _
" </td>" & vbNewLine & _
" </tr>" & vbNewLine & _
"</table><br />" & vbNewLine & _
"<table border=""0"" width=""50%"" cellspacing=""0"" cellpadding=""0"" align=""center"">" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td bgcolor=""" & strPopUpBorderColor & """>" & vbNewLine & _
" <table border=""0"" width=""100%"" cellspacing=""1"" cellpadding=""4"">" & vbNewLine & _
" <tr valign=""middle"">" & vbNewLine & _
" <td align=""center"" colspan=""2"" width=""100%"" bgcolor=""" & strCategoryCellColor & """>" & vbNewLine & _
" <font face=""" & strDefaultFontFace & """ size=""" & strHeaderFontSize+1 & """ color=""" & strCategoryFontColor & """><b>Member Referrals</b>" & vbNewLine & _
" </font>" & vbNewLine & _
" </td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" <tr valign=""middle"">" & vbNewLine & _
" <td align=""left"" bgcolor=""" & strHeadCellColor & """><a href=""admin_referrals.asp?sort="
If Request.QueryString("sort") = "source asc" Then Response.Write("source desc") Else Response.Write("source asc")
Response.Write """" & dWStatus("Sort by Source") & "><acronym style=""border:none; text-decoration:none"" title=""Sort by Source""><b><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strHeadFontColor & """><b>Source</b></font></b></acronym></a></td>" & vbNewLine & _
" <td align=""center"" bgcolor=""" & strHeadCellColor & """><a href=""admin_referrals.asp?sort="
If Request.QueryString("sort") = "qty asc" Then Response.Write("qty desc") Else Response.Write("qty asc")
Response.Write """" & dWStatus("Sort by Quantity") & "><acronym style=""border:none; text-decoration:none"" title=""Sort by Quantity""><b><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strHeadFontColor & """><b>Quantity</b></font></b></acronym></a></td>" & vbNewLine & _
" </tr>" & vbNewLine
strSort="":strCnt=""
If Request.QueryString("sort")>"" Then
strSorted=Request.QueryString("sort")
If strSorted = "source asc" Then strSort="ORDER BY M_REFERRED ASC"
If strSorted = "source desc" Then strSort="ORDER BY M_REFERRED DESC"
If strSorted = "qty asc" Then strCnt="QTY ASC"
If strSorted = "qty desc" Then strCnt="QTY DESC"
End If
strSql="SELECT DISTINCT(M_REFERRED) FROM " & strMemberTablePrefix & "MEMBERS WHERE M_REFERRED>''" & strSort
Set rsDis=my_Conn.Execute(strSql)
If not rsDis.EOF Then
rsDis.MoveFirst
intI=0
Do while not rsDis.EOF
strCnt="SELECT COUNT(M_REFERRED) AS CNT FROM " & strMemberTablePrefix & "MEMBERS WHERE M_REFERRED='" & rsDis("M_REFERRED") & "'"
Set rsCnt=my_Conn.Execute(strCnt)
If not rsCnt.EOF Then
intCnt=rsCnt("CNT")
rsCnt.Close
End If
Set rsCnt=Nothing
If intI=0 Then CColor=strForumFirstCellColor Else CColor=strForumCellColor
Response.Write " <tr valign=""middle"">" & vbNewLine & _
" <td align=""left"" width=""100%"" bgcolor=""" & CColor & """>" & vbNewLine & _
" <font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strForumFontColor & """>" & rsDis("M_REFERRED") & vbNewLine & _
" </font>" & vbNewLine & _
" </td>" & vbNewLine & _
" <td align=""center"" width=""100%"" bgcolor=""" & CColor & """>" & vbNewLine & _
" <font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strForumFontColor & """>" & intCnt & vbNewLine & _
" </font>" & vbNewLine & _
" </td>" & vbNewLine & _
" </tr>" & vbNewLine
intI=1-intI
rsDis.MoveNext
Loop
rsDis.Close
End If
Set rsDis=Nothing
Response.Write " </table>" & vbNewLine & _
" </td>" & vbNewLine & _
" </tr>" & vbNewLine & _
"</table>" & vbNewLine
WriteFooter
%>
Search for this line, added by the mod:
strMessage = Request.Form("Name") & " (" & Request.Form("Email") & ") has registered at " & strForumURL
After it, insert this:
strMessage = strMessage & vbNewline & vbNewline & "Referral source: " & strReferral