%
'#################################################################################
'## Ver.3.4.06 multi-language Skin3D Portal
'#################################################################################
'## Copyright (C) 2001-07 Gaëtan Dupont All Rights Reserved
'##
'## By using this program, you are agreeing to the terms of the
'## GNU General Public License.
'##
'## 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 ImageForums2001 must remain intact
'## in the scripts and in the outputted HTML.
'## The "Image Forums 2001" text with a link back to
'## http://www.forums2001.ca in the footer of the pages MUST
'## remain visible when the pages are viewed on the internet or intranet.
'##
'## Support can be obtained from support forums at:
'## http://www.forums2001.ca
'##
'## Email: image_forum_2001@hotmail.com
'##
'#################################################################################
'## This Page Contains source code of Snitz Forums 2000
'#################################################################################
'## Snitz Forums 2000 v3.4.06
'#################################################################################
'## Copyright (C) 2000-06 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
'##
'#################################################################################
%>
<%
strTempFont = ""
strTempSmallFont = ""
strsql = "SELECT G_ID, G_VARFIELD1, G_VARFIELD2, G_VARFIELD3, G_V1_SWITCH, G_V2_SWITCH, G_V3_SWITCH, G_PAGECOUNT, G_V1_REQ, G_V2_REQ, G_V3_REQ, G_MESSAGE FROM " & strTablePrefix & "GB_OPTIONS WHERE G_ID=1"
set optionrs = my_conn.execute(strsql)
strV1 = optionrs("G_VARFIELD1")
strV2 = optionrs("G_VARFIELD2")
strV3 = optionrs("G_VARFIELD3")
strV1E = optionrs("G_V1_SWITCH")
strV2E = optionrs("G_V2_SWITCH")
strV3E = optionrs("G_V3_SWITCH")
strV1req = optionrs("G_V1_REQ")
strV2req = optionrs("G_V2_REQ")
strV3req = optionrs("G_V3_REQ")
strTempPageCount = optionrs("G_PAGECOUNT")
strGuestbookWelcome = optionrs("G_MESSAGE")
set optionrs = nothing
strGuestbookPageSize = strTempPageCount
set countrs = my_conn.execute("SELECT G_ID FROM " & strTablePrefix & "GUESTBOOK")
rec = 0
do until countrs.eof
rec = rec + 1
countrs.movenext
Loop
set countrs = nothing
strTotalRecords = rec
strGAction = request.querystring("action")
if strGAction = "" then
strGAction = "view"
end if
%>
<%
Response.Write " " & vbNewLine
%>
<% if (strGAction = "view") then %>
<% end if
Select Case strGAction
Case "view"
strSortMethod = request.querystring("sortby")
if strSortMethod = "" then
strSortMethod = "DESC"
end if
intPage = request.querystring("page")
strsql = "SELECT G_ID, G_NAME, G_EMAIL, G_WEBSITE, G_ICQ, G_MESSAGE, G_DATE, G_VARFIELD1, G_VARFIELD2, G_VARFIELD3 FROM " & strTablePrefix & "GUESTBOOK ORDER BY G_ID " & strSortMethod
Set grs = Server.CreateObject("ADODB.Recordset")
grs.CursorLocation = 3
grs.CursorType = 3
grs.Open strsql, my_Conn
grs.PageSize = strGuestbookPageSize
grs.CacheSize = grs.PageSize
strGTotalPages = grs.PageCount
If request.querystring("page") = "" then
ipage = 1
else
ipage = Cint(request.querystring("page"))
End if
if grs.eof then
response.write("
" & fLang(strLangInc_Guestbook00050) & "")
else
%>
<%
if strGTotalPages > "1" then
Call subgpaging()
End if
rec = 0
grs.absolutepage = ipage
do until rec = grs.PageSize or grs.eof
strTempID = ChkString(grs("G_ID"), "display")
strTempName = ChkString(grs("G_NAME"), "name")
strTempEmail = ChkString(grs("G_EMAIL"), "display")
strTempWebsite = ChkString(grs("G_WEBSITE"), "display")
strTempICQ = ChkString(grs("G_ICQ"), "display")
strTempMessage = formatStr(grs("G_MESSAGE"))
strTempDate = chkDate(grs("G_DATE")," -" ,true)
if grs("G_VARFIELD1") <> "" and strV1E = 1 then
strTempField1 = ChkString(grs("G_VARFIELD1"), "display")
End if
if grs("G_VARFIELD2") <> "" and strV2E = 1 then
strTempField2 = ChkString(grs("G_VARFIELD2"), "display")
End if
if grs("G_VARFIELD3") <> "" and strV3E = 1 then
strTempField3 = ChkString(grs("G_VARFIELD3"), "display")
End if
'# New code for displaying profile
strsql = "SELECT " & strMemberTablePrefix & "MEMBERS.MEMBER_ID FROM " & strMemberTablePrefix & "MEMBERS WHERE M_NAME='" & strTempName & "'"
set temprs = my_conn.execute(strsql)
if temprs.eof then
strDisplayProfileLink = false
else
strDisplayProfileLink = true
strTempMemberId = temprs("MEMBER_ID")
end if
set temprs = nothing
'# end new code
%>
<% if (strV1E = 1 or strV2E = 1 or strV3E = 1) then
%>
<%=strTempSmallFont%>
<%if (NOT(grs("G_VARFIELD1") = "" or grs("G_VARFIELD1") = " ") and strV1E = 1) then%>
<%=strV1%>: <%=strTempField1%>
<%end if%>
<%if (NOT(grs("G_VARFIELD2") = "" or grs("G_VARFIELD2") = " ") and strV2E = 1) then%>
<%=strV2%>: <%=strTempField2%>
<%end if%>
<%if (NOT(grs("G_VARFIELD3") = "" or grs("G_VARFIELD3") = " ") and strV3E = 1) then%>
<%=strV3%>: <%=strTempField3%>
<%end if%>
|
|
<%
else
response.write(" | ")
end if
%>
<%=strTempFont & strTempMessage%> |
|
<%
rec = rec + 1
grs.movenext
Loop
if strGTotalPages > "1" then
Call subgpaging()
End if
%>
|
<%
End if
set grs = nothing
Case "sign"
'# New code to automatically fill in fields if user is logged into the forum
if not(strDBNTUserName = "") then
strsql = "SELECT " & strMemberTablePrefix & "MEMBERS.M_EMAIL, " & _
strMemberTablePrefix & "MEMBERS.M_ICQ, " & _
strMemberTablePrefix & "MEMBERS.M_HOMEPAGE " & _
"FROM " & strMemberTablePrefix & "MEMBERS WHERE " & strMemberTablePrefix & "MEMBERS." & strDBNTSQLName & "='" & strDBNTUserName & "'"
set temprs = my_conn.execute(strsql)
if not(temprs.eof) then
strTempUrl = temprs("M_HOMEPAGE")
strTempEmail = temprs("M_EMAIL")
strTempICQ = temprs("M_ICQ")
end if
set temprs = nothing
end if
'# End new code
strTempFont = ""
%>
<%
Case "sign_info"
strTempField1 = request.form("field1")
strTempField2 = request.form("field2")
strTempField3 = request.form("field3")
errmsg = strTempFont & "" & vbcrlf
if request.form("name") = "" then
errmsg = errmsg & "- " & fLang(strLangGuestbook00400) & vbcrlf
End if
if request.form("email") = "" then
errmsg = errmsg & "
- " & fLang(strLangGuestbook00330) & vbcrlf
End if
if strV1E = 1 and strV1req = 1 and (strTempField1 = "" or strTempField1 = " ") then
errmsg = errmsg & "
- " & strV1 & vbcrlf
End if
if strV2E = 1 and strV2req = 1 and (strTempField2 = "" or strTempField2 = " ") then
errmsg = errmsg & "
- " & strV2 & vbcrlf
End if
if strV3E = 1 and strV3req = 1 and (strTempField3 = "" or strTempField3 = " ") then
errmsg = errmsg & "
- " & strV3 & vbcrlf
End if
if request.form("message") = "" then
errmsg = errmsg & "
- " & fLang(strLangGuestbook00370) & vbcrlf
End if
errmsg = errmsg & "
" & vbcrlf
errmsg = errmsg & "" & fLang(strLangGuestbook00410) & ""
strFormName = ChkString(request.form("name"), "name")
strFormEmail = ChkString(request.form("email"), "email")
strFormWebsite = ChkString(request.form("website"), "url")
strFormIcq = ChkString(request.form("icq"), "number")
strFormDate = request.form("date")
strFormMessage = ChkString(request.form("message"), "message")
strFormField1 = request.form("field1")
if strFormField1 = "" then
strFormField1 = " "
end if
strFormField2 = request.form("field2")
if strFormField2 = "" then
strFormField2 = " "
end if
strFormField3 = request.form("field3")
if strFormField3 = "" then
strFormField3 = " "
end if
If request.form("website") = "http://" or request.form("website") = " " or request.form("website") = "" then
strFormWebsite = ""
End if
if strTempField1 = "" or strTempField1 = " " then
strTempField1 = Trim(strTempField1)
end if
if strTempField2 = "" or strTempField2 = " " then
strTempField2 = Trim(strTempField2)
end if
if strTempField3 = "" or strTempField3 = " " then
strTempField3 = Trim(strTempField3)
end if
If (Trim(request.form("name")) <> "" and Trim(request.form("email")) <> "" and Trim(request.form("message")) <> "") and not(strV1req = 1 and strTempField1 = "") and not(strV2req = 1 and strTempField2 = "") and not(strV3req = 1 and strTempField3 = "") then
strsql = "INSERT INTO " & strTablePrefix & "GUESTBOOK (G_NAME, G_EMAIL, G_WEBSITE, G_ICQ, G_MESSAGE, G_DATE, G_VARFIELD1, G_VARFIELD2, G_VARFIELD3)"
strsql = strsql & " VALUES('" & strFormName & "', '" & strFormEmail & "', '" & strFormWebsite & "', '" & strFormICq & "', '" & strFormMessage & "', '" & strFormDate & "', '" & strFormField1 & "', '" & strFormField2 & "', '" & strFormField3 & "')"
my_conn.execute(strsql)
if lcase(strEmail) = "1" then
%>
<%
end if
%>
<%
response.write(strTempFont & "" & strTempFont & vbcrlf & _
"- " & fLang(strLangGuestbook00400) & ": " & strFormName & vbcrlf & _
"
- " & fLang(strLangGuestbook00330) & " " & strFormEmail & vbcrlf & _
"
- " & fLang(strLangGuestbook00340) & " " & strFormWebsite & "" & vbcrlf & _
"
- " & fLang(strLangGuestbook00350) & " " & strFormIcq & vbcrlf & _
"
- " & fLang(strLangGuestbook00360) & " " & strToDate(strFormDate) & vbcrlf)
if strV1E = 1 then
response.write(_
"
- " & strV1 & ": " & strFormField1 & vbcrlf)
end if
if strV2E = 1 then
response.write(_
"
- " & strV2 & ": " & strFormField2 & vbcrlf)
end if
if strV3E = 1 then
response.write(_
"
- " & strV3 & ": " & strFormField3 & vbcrlf)
end if
response.write("
- " & fLang(strLangGuestbook00370) & ": " & formatStr(strFormMessage) & vbcrlf & _
"
")
response.write("" & strTempFont & "" & fLang(strLangGuestbook00430) & "")
%>
|
<%
else
%>
<%
response.write(errmsg)
response.write(" |
")
End if
End Select
Sub subgpaging()
p_rec = 1
response.write("" & strTempFont & fLang(strLangInc_Guestbook00120) & vbcrlf)
writepaging = ""
Do until p_rec = strGTotalPages + 1
if p_rec = ipage then
writepaging = writepaging & "" & p_rec & " | "
else
writepaging = writepaging & "" & p_rec & " | "
end if
p_rec = p_rec + 1
Loop
tmpsize = Len(writepaging)
tmpsize = tmpsize - 2
writepaging = Left(writepaging, tmpsize)
response.write(writepaging)
response.write(" |
" & vbcrlf)
End Sub
%>