%
'#################################################################################
'## Copyright (C) 2000-01 Michael Anderson and Pierre Gorissen
'##
'## 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 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 support forums at:
'## http://forum.snitz.com
'##
'## Correspondence and Marketing Questions can be sent to:
'## reinhold@bigfoot.com
'##
'## or
'##
'## Snitz Communications
'## C/O: Michael Anderson
'## PO Box 200
'## Harpswell, ME 04079
'#################################################################################
%>
<% if not(strUseExtendedProfile) then %>
<% else %>
<%
end if
if Instr(1,Request.Form("refer"),"search.asp",1) > 0 then
strRefer = "search.asp"
elseif Instr(1,Request.Form("refer"),"register.asp",1) > 0 then
strRefer = "default.asp"
else
strRefer = Request.Form("refer")
end if
if strRefer = "" then strRefer = "default.asp"
if strAuthType = "nt" then
if ChkAccountReg() <> "1" then
%>
Note: This NT account has not been registered yet, thus the profile is not available.
If this is your account, click here to register.
<% else%>
<% end if
else
if rs2("T_REPLIES") >= intHotTopicNum then%>
<% else%>
<%
end if
end if
else
if rs2("T_LAST_POST") > Session(strCookieURL & "last_here_date") then %>
<% else%>
<%
end if
end if
else
if rs2("T_LAST_POST") > Session(strCookieURL & "last_here_date") then
%>
<% else %>
<%
end if
end if
%>
<%
end if
if (strCity = "1" and Trim(rs("M_CITY")) <> "") or (strCountry = "1" and Trim(rs("M_COUNTRY")) <> "") or (strCountry = "1" and Trim(rs("M_STATE")) <> "") then
%>
Location:
<%
Response.Write(rs("M_CITY"))
if Trim(rs("M_CITY")) <> "" then
Response.Write(" ")
end if
if Trim(rs("M_STATE")) <> "" then
Response.Write(ChkString(rs("M_STATE"), "display") & " ")
end if
Response.Write(ChkString(rs("M_COUNTRY"), "display"))
%>
<%
end if
if (strAge = "1" and Trim(rs("M_AGE")) <> "") then
%>
Age:
<% =ChkString(rs("M_AGE"), "display") %>
<%
end if
if (strMarStatus = "1" and Trim(rs("M_MARSTATUS")) <> "") then
%>
Marital Status:
<% = ChkString(rs("M_MARSTATUS"), "display") %>
<%
end if
if (strSex = "1" and Trim(rs("M_SEX")) <> "") then
%>
Sex:
<% = ChkString(rs("M_SEX"), "display") %>
<%
end if
if (strOccupation = "1" and Trim(rs("M_OCCUPATION")) <> "") then
%>
<%
end if
if strFavLinks = "1" then
if Trim(rs("M_LINK1")) <> "" and lcase(trim(rs("M_LINK1"))) <> "http://" and Trim(lcase(rs("M_LINK1"))) <> "https://" then
%>
<%
end if
end if
case "EditIt"
Err_Msg = ""
if trim(Request.Form("Name")) = "" then
Err_Msg = Err_Msg & "
You must choose a UserName
"
end if
if (Instr(Request.Form("Name"), ">") > 0 ) or (Instr(Request.Form("Name"), "<") > 0) then
Err_Msg = Err_Msg & "
> and < are not allowed in the UserName, Please Choose Another
"
end if
if strAuthType = "db" then
if trim(Request.Form("Password")) = "" then
Err_Msg = Err_Msg & "
You must choose a Password
"
end if
if Len(Request.Form("Password")) > 25 then
Err_Msg = Err_Msg & "
Your Password can not be greater than 25 characters
"
end if
if Request.Form("Password") <> Request.Form("Password2") then
Err_Msg = Err_Msg & "
Your Passwords didn't match.
"
end if
end if
if Request.Form("Email") = "" then
Err_Msg = Err_Msg & "
You Must give an email address
"
end if
if EmailField(Request.Form("Email")) = 0 then
Err_Msg = Err_Msg & "
You Must enter a valid email address
"
end if
if (lcase(left(Request.Form("Homepage"), 7)) <> "http://") and (lcase(left(Request.Form("Homepage"), 8)) <> "https://") and (Request.Form("Homepage") <> "") then
Err_Msg = Err_Msg & "
You Must prefix your URL with http:// or https://
"
end if
if strUniqueEmail = "1" then
if lcase(Request.Form("Email")) <> lcase(Request.Form("Email2")) then
'## Forum_SQL
strSql = "SELECT M_EMAIL FROM " & strMemberTablePrefix & "MEMBERS "
strSql = strSql & " WHERE M_EMAIL = '" & Trim(ChkString(Request.Form("Email"), "SQLString")) &"'"
set rs = my_Conn.Execute (strSql)
if rs.BOF and rs.EOF then
'## Do Nothing - proceed
else
Err_Msg = Err_Msg & "
Email Address already in use, Please Choose Another
"
end if
rs.close
set rs = nothing
end if
end if
if Len(ChkString(Request.Form("Sig"),"message")) > 255 then
Err_Msg = Err_Msg & "
Your signature can not be greater than 255 characters. "
Err_Msg = Err_Msg & "It now is " & Len(ChkString(Request.Form("Sig"),"message")) & " characters long.
"
end if
if Err_Msg = "" then
if Trim(Request.Form("Homepage")) <> "" and lcase(trim(Request.Form("Homepage"))) <> "http://" and Trim(lcase(Request.Form("Homepage"))) <> "https://" then
regHomepage = ChkString(Request.Form("Homepage"),"url")
else
regHomepage = " "
end if
if Trim(Request.Form("LINK1")) <> "" and lcase(trim(Request.Form("LINK1"))) <> "http://" and Trim(lcase(Request.Form("LINK1"))) <> "https://" then
regLink1 = ChkString(Request.Form("LINK1"),"url")
else
regLink1 = " "
end if
if Trim(Request.Form("LINK2")) <> "" and lcase(trim(Request.Form("LINK2"))) <> "http://" and Trim(lcase(Request.Form("LINK2"))) <> "https://" then
regLink2 = ChkString(Request.Form("LINK2"),"url")
else
regLink2 = " "
end if
if Trim(Request.Form("PHOTO_URL")) <> "" and lcase(trim(Request.Form("PHOTO_URL"))) <> "http://" and Trim(lcase(Request.Form("PHOTO_URL"))) <> "https://" then
regPhoto_URL = ChkString(Request.Form("Photo_URL"),"url")
else
regPhoto_URL = " "
end if
'## Forum_SQL
strSql = "UPDATE " & strMemberTablePrefix & "MEMBERS "
strSql = strSql & " SET M_PASSWORD = '" & ChkString(Request.Form("Password"),"SQLString") & "', "
strSql = strSql & " M_COUNTRY = '" & ChkString(Request.Form("Country"),"SQLString") & "', "
if strICQ = "1" then
strSql = strSql & " M_ICQ = '" & ChkString(Request.Form("ICQ"),"SQLString") & "', "
end if
if strYAHOO = "1" then
strSql = strSql & " M_YAHOO = '" & ChkString(Request.Form("YAHOO"),"SQLString") & "', "
end if
if strAIM = "1" then
strSql = strSql & " M_AIM = '" & ChkString(Request.Form("AIM"),"SQLString") & "', "
end if
if strHOMEPAGE = "1" then
strSql = strSql & " M_Homepage = '" & ChkString(Trim(regHomepage),"SQLString") & "', "
end if
strSql = strSql & " M_SIG = '" & ChkString(Request.Form("Sig"),"message") & "', "
strSql = strSql & " M_EMAIL = '" & ChkString(Request.Form("Email"),"SQLString") & "' "
if strfullName = "1" then
strSql = strSql & ", M_FIRSTNAME = '" & ChkString(Request.Form("FirstName"), "SQLString") & "'"
strSql = strSql & ", M_LASTNAME = '" & ChkString(Request.Form("LastName"),"SQLString") & "'"
end if
if strCity = "1" then
strsql = strsql & ", M_CITY = '" & ChkString(Request.Form("City"),"SQLString") & "'"
end if
if strState = "1" then
strsql = strsql & ", M_STATE = '" & ChkString(Request.Form("State"),"SQLString") & "'"
end if
' strsql = strsql & ", M_HIDE_EMAIL = '" & ChkString(Request.Form("HideMail"),"SQLString") & "'"
if strPicture = "1" then
strsql = strsql & ", M_PHOTO_URL = '" & ChkString(Request.Form("Photo_URL"),"SQLString") & "'"
end if
if strFavLinks = "1" then
strsql = strsql & ", M_LINK1 = '" & ChkString(Request.Form("LINK1"),"SQLString") & "'"
strSql = strSql & ", M_LINK2 = '" & ChkString(Request.Form("LINK2"),"SQLString") & "'"
end if
if strAge = "1" then
strSql = strsql & ", M_AGE = '" & ChkString(Request.Form("Age"),"SQLString") & "'"
end if
if strMarStatus = "1" then
strSql = strSql & ", M_MARSTATUS = '" & ChkString(Request.Form("MarStatus"),"SQLString") & "'"
end if
if strSex = "1" then
strSql = strsql & ", M_SEX = '" & ChkString(Request.Form("Sex"),"SQLString") & "'"
end if
if strOccupation = "1" then
strSql = strSql & ", M_OCCUPATION = '" & ChkString(Request.Form("Occupation"),"SQLString") & "'"
end if
if strBio = "1" then
strSql = strSql & ", M_BIO = '" & ChkString(Request.Form("Bio"),"message") & "'"
end if
if strHobbies = "1" then
strSql = strSql & ", M_HOBBIES = '" & ChkString(Request.Form("Hobbies"),"message") & "'"
end if
if strLNews = "1" then
strsql = strsql & ", M_LNEWS = '" & ChkString(Request.Form("LNews"),"message") & "'"
end if
if strQuote = "1" then
strSql = strSql & ", M_QUOTE = '" & ChkString(Request.Form("Quote"),"message") & "'"
end if
strSql = strSql & " WHERE M_NAME = '" & ChkString(Request.Form("Name"), "SQLString") & "' "
if strAuthType = "db" then
strSql = strSql & " AND M_PASSWORD = '" & ChkString(Request.Form("Password-d"), "SQLString") & "'"
end if
my_Conn.Execute(strSql)
regHomepage = ""
%>
<%
end if
end if
case "ModifyIt"
mLev = cint(chkUser(STRdbntUserName, Request.Form("Pass")))
if mLev > 0 then '## is Member
if mLev = 4 then '## is Admin
Err_Msg = ""
if trim(Request.Form("Name")) = "" then
Err_Msg = Err_Msg & "
You must set a UserName
"
end if
if (Instr(Request.Form("Name"), ">") > 0 ) or (Instr(Request.Form("Name"), "<") > 0) then
Err_Msg = Err_Msg & "
> and < are not allowed in the UserName, Please Choose Another
"
end if
'## Forum_SQL
strSql = "SELECT M_NAME FROM " & strMemberTablePrefix & "MEMBERS "
strSql = strSql & " WHERE M_NAME = '" & Trim(ChkString(Request.Form("Name"), "SQLString")) &"' "
strSql = strSql & " AND MEMBER_ID <> " & Trim(ChkString(Request.Form("Member_ID"), "SQLString")) &" "
set rs = my_Conn.Execute (strSql)
if rs.BOF and rs.EOF then
'## Do Nothing - proceed
else
Err_Msg = Err_Msg & "
UserName is already in use, Please Choose Another
"
end if
rs.close
set rs = nothing
if strAuthType = "db" then
if trim(Request.Form("Password")) = "" then
Err_Msg = Err_Msg & "
You must set a Password
"
end if
if Len(Request.Form("Password")) > 25 then
Err_Msg = Err_Msg & "
The Password can not be greater than 25 characters
"
end if
' if Request.Form("Password") <> Request.Form("Password2") then
' Err_Msg = Err_Msg & "
The Passwords didn't match.
"
' end if
end if
if Request.Form("Email") = "" then
Err_Msg = Err_Msg & "
You Must set an email address
"
end if
if EmailField(Request.Form("Email")) = 0 then
Err_Msg = Err_Msg & "
You Must enter a valid email address
"
end if
if (lcase(left(Request.Form("Homepage"), 7)) <> "http://") and (lcase(left(Request.Form("Homepage"), 8)) <> "https://") and (Request.Form("Homepage") <> "") then
Err_Msg = Err_Msg & "
You Must prefix the URL with http:// or https://
"
end if
if Len(Request.Form("Sig")) > 255 then
Err_Msg = Err_Msg & "
The signature can not be greater than 255 characters. "
Err_Msg = Err_Msg & "It now is " & Len(Request.Form("Sig")) & " characters long.
"
end if
if Err_Msg = "" then '## it is ok to update the profile
if Trim(Request.Form("Homepage")) <> "" and lcase(trim(Request.Form("Homepage"))) <> "http://" and Trim(lcase(Request.Form("Homepage"))) <> "https://" then
regHomepage = chkString(Request.Form("Homepage"),"url")
else
regHomepage = " "
end if
if Trim(Request.Form("LINK1")) <> "" and lcase(trim(Request.Form("LINK1"))) <> "http://" and Trim(lcase(Request.Form("LINK1"))) <> "https://" then
regLink1 = chkString(Request.Form("LINK1"),"url")
else
regLink1 = " "
end if
if Trim(Request.Form("LINK2")) <> "" and lcase(trim(Request.Form("LINK2"))) <> "http://" and Trim(lcase(Request.Form("LINK2"))) <> "https://" then
regLink2 = chkString(Request.Form("LINK2"),"url")
else
regLink2 = " "
end if
if Trim(Request.Form("PHOTO_URL")) <> "" and lcase(trim(Request.Form("PHOTO_URL"))) <> "http://" and Trim(lcase(Request.Form("PHOTO_URL"))) <> "https://" then
regPhoto_URL = chkString(Request.Form("Photo_URL"),"url")
else
regPhoto_URL = " "
end if
'## Forum_SQL
strSql = "UPDATE " & strMemberTablePrefix & "MEMBERS "
strSql = strSql & " SET M_NAME = '" & chkString(Request.Form("Name"),"SQLString") & "'"
if strAuthType = "nt" then
strSql = strSql & ", M_USERNAME = '" & chkString(Request.Form("Account"),"SQLString") & "'"
else
if strAuthType = "db" then
strSql = strSql & ", M_PASSWORD = '" & chkString(Request.Form("password"),"SQLString") & "'"
end if
end if
strSql = strSql & ", M_EMAIL = '" & chkString(Request.Form("Email"),"SQLString") & "'"
strSql = strSql & ", M_TITLE = '" & chkString(Request.Form("Title"),"SQLString") & "'"
strSql = strSql & ", M_POSTS = " & chkString(Request.Form("Posts"),"SQLString") & " "
strSql = strSql & ", M_COUNTRY = '" & chkString(Request.Form("Country"),"SQLString") & "'"
if strICQ = "1" then
strSql = strSql & ", M_ICQ = '" & chkString(Request.Form("ICQ"),"SQLString") & "'"
end if
if strYAHOO = "1" then
strSql = strSql & ", M_YAHOO = '" & chkString(Request.Form("YAHOO"),"SQLString") & "'"
end if
if strAIM = "1" then
strSql = strSql & ", M_AIM = '" & chkString(Request.Form("AIM"),"SQLString") & "'"
end if
if strHOMEPAGE = "1" then
strSql = strSql & ", M_HOMEPAGE = '" & chkString(Request.Form("Homepage"),"SQLString" ) & "'"
end if
strSql = strSql & ", M_SIG = '" & chkString(Request.Form("Sig"),"message") & "'"
strSql = strSql & ", M_LEVEL = " & chkString(Request.Form("Level"),"SQLString")
if strfullName = "1" then
strSql = strSql & ", M_FIRSTNAME = '" & chkString(Request.Form("FirstName"),"SQLString") & "'"
strSql = strSql & ", M_LASTNAME = '" & chkString(Request.Form("LastName"),"SQLString") & "'"
end if
if strCity = "1" then
strsql = strsql & ", M_CITY = '" & chkString(Request.Form("City"),"SQLString") & "'"
end if
if strState = "1" then
strsql = strsql & ", M_STATE = '" & chkString(Request.Form("State"),"SQLString") & "'"
end if
' strsql = strsql & ", M_HIDE_EMAIL = '" & chkString(Request.Form("HideMail"),"SQLString") & "'"
if strPicture = "1" then
strsql = strsql & ", M_PHOTO_URL = '" & chkString(Request.Form("Photo_URL"),"SQLString") & "'"
end if
if strFavLinks = "1" then
strsql = strsql & ", M_LINK1 = '" & chkString(Request.Form("LINK1"),"SQLString") & "'"
strSql = strSql & ", M_LINK2 = '" & chkString(Request.Form("LINK2"),"SQLString") & "'"
end if
if strAge = "1" then
strSql = strsql & ", M_AGE = '" & chkString(Request.Form("Age"),"SQLString") & "'"
end if
if strMarStatus = "1" then
strSql = strSql & ", M_MARSTATUS = '" & chkString(Request.Form("MarStatus"),"SQLString") & "'"
end if
if strSex = "1" then
strSql = strsql & ", M_SEX = '" & chkString(Request.Form("Sex"),"SQLString") & "'"
end if
if strOccupation = "1" then
strSql = strSql & ", M_OCCUPATION = '" & chkString(Request.Form("Occupation"),"SQLString") & "'"
end if
if strHobbies = "1" then
strSql = strSql & ", M_HOBBIES = '" & chkString(Request.Form("Hobbies"),"message") & "'"
end if
if strQuote = "1" then
strSql = strSql & ", M_QUOTE = '" & chkString(Request.Form("Quote"),"message") & "'"
end if
if strBio = "1" then
strSql = strSql & ", M_BIO = '" & chkString(Request.Form("Bio"),"message") & "'"
end if
if strLNews = "1" then
strsql = strsql & ", M_LNEWS = '" & chkString(Request.Form("LNews"),"message") & "'"
end if
strSql = strSql & " WHERE MEMBER_ID = " & ChkString(Request.Form("MEMBER_ID"), "SQLString")
my_Conn.Execute(strSql)
if ChkString(Request.Form("Level"),"") = "1" then
'## Forum_SQL - Remove the member from the moderator table
strSql = "DELETE FROM " & strTablePrefix & "MODERATOR "
strSql = strSql & " WHERE " & strTablePrefix & "MODERATOR.MEMBER_ID = " & ChkString(Request.Form("MEMBER_ID"), "SQLString")
my_Conn.Execute (strSql)
end if
%>