Codice:
<%
'#################################################################################
'## Copyright (C) 2000-02 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 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
'#################################################################################
'#################################################################################
strNewVersion = "Platinum Full - Snitz Forums 2000 Version 3.4.03"
'#################################################################################
Dim NewConfig
ResponseCode = Request.QueryString("RC")
%>
<!--#INCLUDE FILE="inc_sha256.asp"-->
<%
Dim strCurrentDateTime
Dim strlhDateTime
strCurrentDateTime = DateToStr(Now())
strlhDateTime = DateToStr(dateadd("n", -5, Now()))
if ResponseCode <> "" then 'No parameter
blnSetup = "Y"
else
strCookieURL = Left(Request.ServerVariables("Path_Info"), InstrRev(Request.ServerVariables("Path_Info"), "/"))
Application.Lock
Application(strCookieURL & "ConfigLoaded")= ""
Application.UnLock
end if
if blnSetup <> "Y" then NewConfig = 1
%>
<!-- #INCLUDE FILE="config.asp" -->
<%
Response.Buffer = True
Response.Write "<html>" & vbNewLine & _
vbNewLine & _
"<head>" & vbNewLine & _
"<title>Pagina di Setup del Forum</title>" & vbNewLine
'## START - REMOVAL, MODIFICATION OR CIRCUMVENTING THIS CODE WILL VIOLATE THE SNITZ FORUMS 2000 LICENSE AGREEMENT
Response.Write "<meta name=""copyright"" content=""This Forum code is Copyright (C) 2000-02 Michael Anderson, Pierre Gorissen, Huw Reddick and Richard Kinser, Non-Forum Related code is Copyright (C) " & strCopyright & """>" & vbNewline
'## END - REMOVAL, MODIFICATION OR CIRCUMVENTING THIS CODE WILL VIOLATE THE SNITZ FORUMS 2000 LICENSE AGREEMENT
Response.Write "<style><!--" & vbNewLine & _
"a:link {color:darkblue;text-decoration:underline}" & vbNewLine & _
"a:visited {color:blue;text-decoration:underline}" & vbNewLine & _
"a:hover {color:red;text-decoration:underline}" & vbNewLine & _
"--></style>" & vbNewLine & _
"</head>" & vbNewLine & _
vbNewLine & _
"<body bgColor=""white"" text=""midnightblue"" link=""darkblue"" aLink=""red"" vLink=""red"" onLoad=""window.focus()"">" & vbNewLine
If strDBType = "" then
Response.Write "<table border=""0"" cellspacing=""0"" cellpadding=""5"" width=""50%"" height=""50%"" align=""center"">" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td bgColor=""#9FAFDF"" align=""center""><p><font face=""Verdana, Arial, Helvetica"" size=""2"">" & _
"<b>Setup Database....</b><br /><br />" & _
"La stringa <b>strDBType</b> not è settata, per favore modifica il tuo file <b>config.asp</b><br />per impostare il tipo di database che utilizzi." & _
"</font></p></td>" & vbNewLine & _
" </tr>" & vbNewLine & _
"
' Check to see if all the fields are in the database
on error resume next
set my_Conn = Server.CreateObject("ADODB.Connection")
my_Conn.Open strConnString
for counter = 0 to my_Conn.Errors.Count -1
ConnErrorNumber = Err.Number
ConnErrorDesc = my_conn.Errors(counter).Description
if ConnErrorNumber <> 0 then
my_Conn.Errors.Clear
Err.Clear
Response.Redirect "setup.asp?RC=1&EC=" & ConnErrorNumber & "&ED=" & Server.URLEncode(ConnErrorDesc)
end if
next
my_Conn.Errors.Clear
Err.Clear
strSql = "SELECT CAT_ID, FORUM_ID, F_STATUS, F_MAIL, F_SUBJECT, F_URL, F_DESCRIPTION, F_TOPICS, F_COUNT, F_LAST_POST, "
strSql = strSql & "F_PASSWORD_NEW, F_PRIVATEFORUMS, F_TYPE, F_IP, F_LAST_POST_AUTHOR, F_A_TOPICS, F_A_COUNT, "
strSQL = strSQL & "F_MODERATION, F_SUBSCRIPTION, F_ORDER, F_L_ARCHIVE, F_ARCHIVE_SCHED, F_L_DELETE, F_DELETE_SCHED"
strSql = strSql & " FROM " & strTablePrefix & "FORUM"
my_Conn.Execute strSql
Call CheckSqlError()
my_Conn.Errors.Clear
Err.Clear
strSql = "SELECT CAT_ID, FORUM_ID, TOPIC_ID, T_STATUS, T_SUBJECT, T_MESSAGE, T_AUTHOR, T_REPLIES, "
strSql = strSql & " T_VIEW_COUNT, T_LAST_POST, T_DATE, T_LAST_POSTER, T_IP, T_ARCHIVE_FLAG, T_LAST_POST_AUTHOR "
strSql = strSql & " FROM " & strTablePrefix & "TOPICS"
my_Conn.Execute strSql
Call CheckSqlError()
my_Conn.Errors.Clear
Err.Clear
strSql = "SELECT MEMBER_ID, M_STATUS, M_NAME, M_USERNAME, M_PASSWORD, M_EMAIL, M_COUNTRY, M_HOMEPAGE, "
strSql = strSql & "M_SIG, M_DEFAULT_VIEW, M_LEVEL, M_AIM, M_ICQ, M_MSN, M_YAHOO, M_POSTS, M_DATE, M_LASTHEREDATE, "
strSql = strSql & "M_LASTPOSTDATE, M_TITLE, M_SUBSCRIPTION, M_HIDE_EMAIL, M_RECEIVE_EMAIL, M_LAST_IP, M_IP, "
strSql = strSql & "M_FIRSTNAME, M_LASTNAME, M_OCCUPATION, M_SEX, M_AGE, M_HOBBIES, M_LNEWS, M_QUOTE, M_BIO, "
strSql = strSql & "M_MARSTATUS, M_LINK1, M_LINK2, M_CITY, M_STATE, M_PHOTO_URL, M_KEY, M_NEWEMAIL, M_PWKEY, M_SHA256 "
strSql = strSql & " FROM " & strMemberTablePrefix & "MEMBERS"
& _
" <td bgColor=""#9FAFDF"" align=""center"">" & vbNewLine & _
" <p><font face=""Verdana, Arial, Helvetica"" size=""2"">" & vbNewLine
if CustomCode = 1 then
Response.Write " The database could not be opened !!<br />" & vbNewLine & _
" Controlla se nel tuo config.asp la stringa <br /><b>strConnString</b> è settata con l'esatto percorso del database.<br />" & vbNewLine & _
" Controlla anche che la stringa <b>strDBType</b> sia settata sul tipo di database esatto.<br />" & vbNewLine & _
" <br />" & vbNewLine
elseif CustomCode = 2 then
Response.Write " Impossibile leggere da una o più tabelle del database.<br /> Assicuratiche nessuna tabella sia stata chiusa da un altro utente.<br /><br />" & vbNewLine
elseif CustomCode = 3 then
Response.Write " Impossibile aprire il database.<br /> Assicurati di inserire correttamente Nome Utente e password.<br /><br />" & vbNewLine
else
Response.Write " Il database non può essere aperto!!<br />" & vbNewLine & _
" <br />" & vbNewLine
end if
if ErrorCode <> "" and ErrorCode < "0" then
Response.Write(" <p>Codice : " & Hex(ErrorCode) & "</p>" & vbNewLine)
if ErrorDesc <> "" then
Response.Write(" <p><b>Descrizione errore</b> : <br />" & ErrorDesc & "</p>" & vbNewLine)
end if
elseif ErrorCode <> "" then
Response.Write(" <p>Codice : " & ErrorCode & "</p>" & vbNewLine)
if ErrorDesc <> "" then
Response.Write(" <p><b>Descrizione errore</b> : <br />" & ErrorDesc & "</p>" & vbNewLine)
end if