<% '################################################################################# '## 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 '################################################################################# '################################################################################# strNewVersion = "Snitz Forums 2000 Version 3.3.03" '################################################################################# Dim NewConfig ResponseCode = Request.QueryString("RC") if ResponseCode <> "" then 'No parameter blnSetup = "Y" else strCookieURL = Left(Request.ServerVariables("Path_Info"), InstrRev(Request.ServerVariables("Path_Info"), "/")) Application(strCookieURL & "ConfigLoaded")= "" end if if blnSetup <> "Y" then NewConfig = 1 %> <% Response.Buffer = True %> Forum-Setup Page <% if ResponseCode = "" then 'No parameter ' 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 = my_Conn.Errors(counter).Number if ConnErrorNumber <> 0 then my_Conn.Errors.Clear Response.Redirect "setup.asp?RC=1&EC=" & ConnErrorNumber end if next my_Conn.Errors.Clear strSql = "SELECT CAT_ID, FORUM_ID, F_STATUS, F_MAIL, F_SUBJECT, F_URL, F_DESCRIPTION, F_TOPICS, F_COUNT, " strSql = strSql & "F_LAST_POST, F_PASSWORD_NEW, F_PRIVATEFORUMS, F_TYPE, F_IP, F_LAST_POST_AUTHOR, " strSQL = strSQL & "F_SUBSCRIPTION, F_MODERATION, F_ARCHIVE_SCHED, F_DELETE_SCHED" strSql = strSql & " FROM " & strTablePrefix & "FORUM" my_Conn.Execute strSql Call CheckSqlError() my_Conn.Errors.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_LAST_POST_AUTHOR, T_ARCHIVE_FLAG " strSql = strSql & " FROM " & strTablePrefix & "TOPICS" my_Conn.Execute strSql Call CheckSqlError() my_Conn.Errors.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_YAHOO, M_ICQ, M_POSTS, M_DATE, " strSql = strSql & "M_LASTHEREDATE, M_LASTPOSTDATE, M_TITLE, M_SUBSCRIPTION, M_HIDE_EMAIL, " strSql = strSql & "M_RECEIVE_EMAIL, M_LAST_IP, M_IP, M_FIRSTNAME, M_LASTNAME, M_OCCUPATION, " strSql = strSql & "M_SEX, M_AGE, M_HOBBIES, M_LNEWS, M_QUOTE, M_BIO, M_MARSTATUS, " strSql = strSql & "M_LINK1, M_LINK2, M_CITY, M_STATE, M_PHOTO_URL FROM " & strMemberTablePrefix & "MEMBERS" my_Conn.Execute strSql Call CheckSqlError() my_Conn.Errors.Clear on error goto 0 if strVersion <> strNewVersion then Response.Redirect "setup.asp?RC=3&MAIL=" & Server.UrlEncode(strSender) & "&VER=" & Server.URLEncode(strVersion) & "&EC=" & Server.UrlEncode("Different or New Version-ID detected") end if '## This part of the code is only reached if all is ok !! %>

Forum setup has been completed.

<% if strDBType <> "access" then %> <% end if %>

Congratulations!!
The forum setup has been completed succesfully.
You can now start using Snitz Forums 2000.

Remember to change the default Admin password !!

If you have questions or remarks you can visit us at: http://forum.snitz.com

You can also post the address of your forum there
so others can come and visit you.

Click here to go to the forum.
Upgrade the database.
(shouldn't be needed for this database!)
Create the databasetables.
(shouldn't be needed for this database!)
<% elseif ResponseCode = 1 then '## cannot open database ErrorCode = Request.QueryString("EC") CustomCode = Request.QueryString("CC") %>

There has been an error !!

<% if CustomCode = 1 then %> The database could not be opened !!
Check your config.asp file and set the
strConnString so it points to the database.
Also check if strDBType is set to the right databasetype.

<% elseif CustomCode = 2 then %> Couldn't read from one or more tables in the database.
Make sure none of the tables are exclusively locked by another user.

<% elseif CustomCode = 3 then %> Couldn't open the database.
Make sure you supplied a correct username and password.

<% else %> The database could not be opened !!

<% end if if ErrorCode <> "" and ErrorCode < 0 then Response.Write("

Code : " & Hex(ErrorCode) & "

") elseif ErrorCode <> "" then Response.Write("

Code : " & ErrorCode & "

") end if %>

<% if Request.QueryString("RET") <> "" then %> " target="_top">Click here to return to the previous screen. <% else %> Click here to retry. <% end if %>
<% elseif ResponseCode = 2 then '## cannot find all the fields in the database strSender = Request.QueryString("MAIL") strVersion = Request.QueryString("VER") ErrorCode = Request.QueryString("EC") CustomCode = Request.QueryString("CC") if ErrorCode = "-2147467259" then Response.Redirect "setup.asp?RC=5&EC=" & ErrorCode Response.End elseif ErrorCode = "-2147217865" then if strDBType = "access" then Response.Redirect "setup.asp?RC=1&EC=" & server.URLEncode("The Access database has missing tables !!") Response.End else Session(strCookieURL & "Approval") = "15916941253" %>

The database needs to be installed !!

You need to create all the tables in the database before you can start using the forum.

Click here to create the tables in the database.

Click here to retry.
<% end if else %>

The database needs to be upgraded !!

The database you are using needs to be upgraded !!
<% if MAIL <> ""then %> If you are not a Administrator at this forum
please report this error here: <% =strSender %>.

<% end if if ErrorCode <> "" and ErrorCode < 0 then Response.Write("

Code : " & Hex(ErrorCode) & "

" ) elseif ErrorCode <> "" then Response.Write("

Code : " & ErrorCode & "

" ) end if %>

Click here to upgrade the database.

Click here to retry.
<% end if elseif ResponseCode = 3 then '## upgrade database if strVersion = "" then strVersion = Request.QueryString("VER") end if if Session(strCookieURL & "Approval") = "15916941253" Then '## logon was ok proceed with upgrade %>
<% if strDBType = "sqlserver" then %>

Select the SQL-Server upgrade options.

<% elseif strDBType = "mysql" then %>

MySql database upgrade.

<% else %>

Access 97 database upgrade

<% end if %>
>

Select the version you want to upgrade from:

Current database versionstring =
<% =strVersion %>

<% if strDBType = "sqlserver" then %>

Select the SQL-server version you are using:

SQL-Server 6.5
SQL-Server 7

<% end if %> <% if strDBType <> "access" then %>

To upgrade the database you need to provide a username and password of a user that has table creation/modification rights at the database you use.
This might not be the same user as you use in your connectionstring !

Name:     
Password:

<% end if %>
<% else strSender = Request.QueryString("MAIL") %>

You need to logon first.

<% end if elseif ResponseCode = 4 then '## start upgrading database if Session(strCookieURL & "Approval") = "15916941253" Then '## logon was ok proceed with upgrade %>

Please Wait until the upgrade has been completed !

<% strUpgradeString = strConnString strSQL_Server = Request.Form("Sql_Server") if strDBType <> "access" then strUpgradeString = CreateConnectionString(strConnString, Request.Form("DBUserName"), Request.Form("DBPassword")) end if on error resume next set my_Conn = Server.CreateObject("ADODB.Connection") my_Conn.Open strUpgradeString for counter = 0 to my_Conn.Errors.Count -1 ConnErrorNumber = my_Conn.Errors(counter).Number if ConnErrorNumber <> 0 then my_Conn.Errors.Clear Response.Redirect "setup.asp?RC=1&EC=" & ConnErrorNumber & "&RET=" & Server.URLEncode("setup.asp?RC=3") end if next on error goto 0 dim intCriticalErrors, intWarnings, Prefix, FieldName, TableName, DataType intCriticalErrors = 0 intWarnings = 0 Prefix = 1 FieldName = 2 TableName = 3 DataType_Access = 4 DataType_SQL6 = 5 DataType_SQL7 = 6 DataType_MySQL = 7 ConstraintAccess = 8 ConstraintSQL6 = 9 ConstraintSQL7 = 10 ConstraintMySQL = 11 Access = 1 SQL6 = 2 SQL7 = 3 MySql = 4 if not(IsNull(Request.Form("OldVersion"))) then OldVersion = Request.Form("OldVersion") else OldVersion = Request.QueryString("OldVersion") end if if OldVersion = 0 then Dim NewColumns(8,11) NewColumns(0, Prefix) = strTablePrefix NewColumns(0, FieldName) = "C_STRSHOWSTATISTICS" NewColumns(0, TableName) = "CONFIG" NewColumns(0, DataType_Access) = "SMALLINT" NewColumns(0, DataType_SQL6) = "SMALLINT" NewColumns(0, DataType_SQL7) = "SMALLINT" NewColumns(0, DataType_MySQL) = "SMALLINT" NewColumns(0, ConstraintAccess) = "NULL" NewColumns(0, ConstraintSQL6) = "NULL CONSTRAINT " & strTablePrefix & "SnitzC0362 DEFAULT 1" NewColumns(0, ConstraintSQL7) = "NULL CONSTRAINT " & strTablePrefix & "SnitzC0362 DEFAULT 1" NewColumns(0, ConstraintMySQL) = "DEFAULT 1 NULL" NewColumns(1, Prefix) = strTablePrefix NewColumns(1, FieldName) = "C_STRSHOWIMAGEPOWEREDBY" NewColumns(1, TableName) = "CONFIG" NewColumns(1, DataType_Access) = "SMALLINT" NewColumns(1, DataType_SQL6) = "SMALLINT" NewColumns(1, DataType_SQL7) = "SMALLINT" NewColumns(1, DataType_MySQL) = "SMALLINT" NewColumns(1, ConstraintAccess) = "NULL" NewColumns(1, ConstraintSQL6) = "NULL CONSTRAINT " & strTablePrefix & "SnitzC0363 DEFAULT 1" NewColumns(1, ConstraintSQL7) = "NULL CONSTRAINT " & strTablePrefix & "SnitzC0363 DEFAULT 1" NewColumns(1, ConstraintMySQL) = "DEFAULT 1 NULL" NewColumns(2, Prefix) = strTablePrefix NewColumns(2, FieldName) = "C_STRLOGONFORMAIL" NewColumns(2, TableName) = "CONFIG" NewColumns(2, DataType_Access) = "SMALLINT" NewColumns(2, DataType_SQL6) = "SMALLINT" NewColumns(2, DataType_SQL7) = "SMALLINT" NewColumns(2, DataType_MySQL) = "SMALLINT" NewColumns(2, ConstraintAccess) = "NULL" NewColumns(2, ConstraintSQL6) = "NULL CONSTRAINT " & strTablePrefix & "SnitzC0364 DEFAULT 1" NewColumns(2, ConstraintSQL7) = "NULL CONSTRAINT " & strTablePrefix & "SnitzC0364 DEFAULT 1" NewColumns(2, ConstraintMySQL) = "DEFAULT 1 NULL" NewColumns(3, Prefix) = strTablePrefix NewColumns(3, FieldName) = "C_STRSHOWPAGING" NewColumns(3, TableName) = "CONFIG" NewColumns(3, DataType_Access) = "SMALLINT" NewColumns(3, DataType_SQL6) = "SMALLINT" NewColumns(3, DataType_SQL7) = "SMALLINT" NewColumns(3, DataType_MySQL) = "SMALLINT" NewColumns(3, ConstraintAccess) = "NULL" NewColumns(3, ConstraintSQL6) = "NULL CONSTRAINT " & strTablePrefix & "SnitzC0365 DEFAULT 0" NewColumns(3, ConstraintSQL7) = "NULL CONSTRAINT " & strTablePrefix & "SnitzC0365 DEFAULT 0" NewColumns(3, ConstraintMySQL) = "DEFAULT 0 NULL" NewColumns(4, Prefix) = strTablePrefix NewColumns(4, FieldName) = "C_STRSHOWTOPICNAV" NewColumns(4, TableName) = "CONFIG" NewColumns(4, DataType_Access) = "SMALLINT" NewColumns(4, DataType_SQL6) = "SMALLINT" NewColumns(4, DataType_SQL7) = "SMALLINT" NewColumns(4, DataType_MySQL) = "SMALLINT" NewColumns(4, ConstraintAccess) = "NULL" NewColumns(4, ConstraintSQL6) = "NULL CONSTRAINT " & strTablePrefix & "SnitzC0366 DEFAULT 0" NewColumns(4, ConstraintSQL7) = "NULL CONSTRAINT " & strTablePrefix & "SnitzC0366 DEFAULT 0" NewColumns(4, ConstraintMySQL) = "DEFAULT 0 NULL" NewColumns(5, Prefix) = strTablePrefix NewColumns(5, FieldName) = "C_STRPAGESIZE" NewColumns(5, TableName) = "CONFIG" NewColumns(5, DataType_Access) = "SMALLINT" NewColumns(5, DataType_SQL6) = "SMALLINT" NewColumns(5, DataType_SQL7) = "SMALLINT" NewColumns(5, DataType_MySQL) = "SMALLINT" NewColumns(5, ConstraintAccess) = "NULL" NewColumns(5, ConstraintSQL6) = "NULL CONSTRAINT " & strTablePrefix & "SnitzC0367 DEFAULT 15" NewColumns(5, ConstraintSQL7) = "NULL CONSTRAINT " & strTablePrefix & "SnitzC0367 DEFAULT 15" NewColumns(5, ConstraintMySQL) = "DEFAULT 15 NULL" NewColumns(6, Prefix) = strTablePrefix NewColumns(6, FieldName) = "C_STRPAGENUMBERSIZE" NewColumns(6, TableName) = "CONFIG" NewColumns(6, DataType_Access) = "SMALLINT" NewColumns(6, DataType_SQL6) = "SMALLINT" NewColumns(6, DataType_SQL7) = "SMALLINT" NewColumns(6, DataType_MySQL) = "SMALLINT" NewColumns(6, ConstraintAccess) = "NULL" NewColumns(6, ConstraintSQL6) = "NULL CONSTRAINT " & strTablePrefix & "SnitzC0368 DEFAULT 10" NewColumns(6, ConstraintSQL7) = "NULL CONSTRAINT " & strTablePrefix & "SnitzC0368 DEFAULT 10" NewColumns(6, ConstraintMySQL) = "DEFAULT 10 NULL" NewColumns(7, Prefix) = strTablePrefix NewColumns(7, FieldName) = "F_LAST_POST_AUTHOR" NewColumns(7, TableName) = "FORUM" NewColumns(7, DataType_Access) = "INT" NewColumns(7, DataType_SQL6) = "INT" NewColumns(7, DataType_SQL7) = "INT" NewColumns(7, DataType_MySQL) = "INT" NewColumns(7, ConstraintAccess) = "NULL" NewColumns(7, ConstraintSQL6) = "NULL" NewColumns(7, ConstraintSQL7) = "NULL" NewColumns(7, ConstraintMySQL) = "NULL" NewColumns(8, Prefix) = strTablePrefix NewColumns(8, FieldName) = "T_LAST_POST_AUTHOR" NewColumns(8, TableName) = "TOPICS" NewColumns(8, DataType) = "INT" NewColumns(8, DataType_Access) = "INT" NewColumns(8, DataType_SQL6) = "INT" NewColumns(8, DataType_SQL7) = "INT" NewColumns(8, DataType_MySQL) = "INT" NewColumns(8, ConstraintAccess) = "NULL" NewColumns(8, ConstraintSQL6) = "NULL" NewColumns(8, ConstraintSQL7) = "NULL" NewColumns(8, ConstraintMySQL) = "NULL" call AddColumns(NewColumns, intCriticalErrors, intWarnings) '## Forum_SQL strSql = "UPDATE " & strTablePrefix & "CONFIG " strSql = strSql & " SET C_STRSHOWSTATISTICS = " & 1 strSql = strSql & " , C_STRSHOWIMAGEPOWEREDBY = " & 1 strSql = strSql & " , C_STRLOGONFORMAIL = " & 1 strSql = strSql & " , C_STRSHOWPAGING = " & 0 strSql = strSql & " , C_STRSHOWTOPICNAV = " & 0 strSql = strSql & " , C_STRPAGESIZE = " & 15 strSql = strSql & " , C_STRPAGENUMBERSIZE = " & 10 strSql = strSql & " , C_STRVERSION = '" & strNewVersion & "'" strSql = strSql & " WHERE CONFIG_ID = " & 1 on error resume next my_Conn.Errors.Clear my_Conn.Execute (strSql) Response.Write("

To upgrade the database you need to be logged on as a forum administrator.
<% if strSender <> "" then %> If you are not the Administrator of this forum
please report this error here: <% =strSender %>.

<% end if %>

Admin Login
UserName:
Password:
") UpdateErrorCode = UpdateErrorCheck() on error goto 0 if UpdateErrorCode = 0 then Response.Write("") elseif UpdateErrorCode = 2 then Response.Write("") intCriticalErrors = intCriticalErrors + 1 else Response.Write("") intCriticalErrors = intCriticalErrors + 1 end if Response.Write("
Upgraded: Added default values for new fields in CONFIG table
Critical error: Can't add default values for new fields in CONFIG table!
Critical error: code: " & Hex(UpdateErrorCode) & " while trying to add default values to the CONFIG table
") Response.Flush end if if (OldVersion <= 2) then Dim NewColumns2(29,11) NewColumns2(0, Prefix) = strMemberTablePrefix NewColumns2(0, FieldName) = "M_FIRSTNAME" NewColumns2(0, TableName) = "MEMBERS" NewColumns2(0, DataType_Access) = "TEXT (100)" NewColumns2(0, DataType_SQL6) = "VARCHAR (100)" NewColumns2(0, DataType_SQL7) = "NVARCHAR (100)" NewColumns2(0, DataType_MYSQL) = "VARCHAR (100)" NewColumns2(0, ConstraintSQL6) = "NULL CONSTRAINT " & strTablePrefix & "SnitzC0369 DEFAULT ''" NewColumns2(0, ConstraintSQL7) = "NULL CONSTRAINT " & strTablePrefix & "SnitzC0369 DEFAULT ''" NewColumns2(0, ConstraintMySQL) = "DEFAULT '' NULL" NewColumns2(1, Prefix) = strMemberTablePrefix NewColumns2(1, FieldName) = "M_LASTNAME" NewColumns2(1, TableName) = "MEMBERS" NewColumns2(1, DataType_Access) = "TEXT (100)" NewColumns2(1, DataType_SQL6) = "VARCHAR (100)" NewColumns2(1, DataType_SQL7) = "NVARCHAR (100)" NewColumns2(1, DataType_MYSQL) = "VARCHAR (100)" NewColumns2(1, ConstraintAccess) = "NULL" NewColumns2(1, ConstraintSQL6) = "NULL CONSTRAINT " & strTablePrefix & "SnitzC0370 DEFAULT ''" NewColumns2(1, ConstraintSQL7) = "NULL CONSTRAINT " & strTablePrefix & "SnitzC0370 DEFAULT ''" NewColumns2(1, ConstraintMySQL) = "DEFAULT '' NULL" NewColumns2(2, Prefix) = strMemberTablePrefix NewColumns2(2, FieldName) = "M_OCCUPATION" NewColumns2(2, TableName) = "MEMBERS" NewColumns2(2, DataType_Access) = "TEXT (255)" NewColumns2(2, DataType_SQL6) = "VARCHAR (255)" NewColumns2(2, DataType_SQL7) = "NVARCHAR (255)" NewColumns2(2, DataType_MYSQL) = "VARCHAR (255)" NewColumns2(2, ConstraintAccess) = "NULL" NewColumns2(2, ConstraintSQL6) = "NULL CONSTRAINT " & strTablePrefix & "SnitzC0371 DEFAULT ''" NewColumns2(2, ConstraintSQL7) = "NULL CONSTRAINT " & strTablePrefix & "SnitzC0371 DEFAULT ''" NewColumns2(2, ConstraintMySQL) = "DEFAULT '' NULL" NewColumns2(3, Prefix) = strMemberTablePrefix NewColumns2(3, FieldName) = "M_SEX" NewColumns2(3, TableName) = "MEMBERS" NewColumns2(3, DataType_Access) = "TEXT (50)" NewColumns2(3, DataType_SQL6) = "VARCHAR (50)" NewColumns2(3, DataType_SQL7) = "NVARCHAR (50)" NewColumns2(3, DataType_MYSQL) = "VARCHAR (50)" NewColumns2(3, ConstraintAccess) = "NULL" NewColumns2(3, ConstraintSQL6) = "NULL CONSTRAINT " & strTablePrefix & "SnitzC0372 DEFAULT ''" NewColumns2(3, ConstraintSQL7) = "NULL CONSTRAINT " & strTablePrefix & "SnitzC0372 DEFAULT ''" NewColumns2(3, ConstraintMySQL) = "DEFAULT '' NULL" NewColumns2(4, Prefix) = strMemberTablePrefix NewColumns2(4, FieldName) = "M_AGE" NewColumns2(4, TableName) = "MEMBERS" NewColumns2(4, DataType_Access) = "TEXT (10)" NewColumns2(4, DataType_SQL6) = "VARCHAR (10)" NewColumns2(4, DataType_SQL7) = "NVARCHAR (10)" NewColumns2(4, DataType_MYSQL) = "VARCHAR (10)" NewColumns2(4, ConstraintAccess) = "NULL" NewColumns2(4, ConstraintSQL6) = "NULL CONSTRAINT " & strTablePrefix & "SnitzC0373 DEFAULT ''" NewColumns2(4, ConstraintSQL7) = "NULL CONSTRAINT " & strTablePrefix & "SnitzC0373 DEFAULT ''" NewColumns2(4, ConstraintMySQL) = "DEFAULT '' NULL" NewColumns2(5, Prefix) = strMemberTablePrefix NewColumns2(5, FieldName) = "M_HOBBIES" NewColumns2(5, TableName) = "MEMBERS" NewColumns2(5, DataType_Access) = "MEMO" NewColumns2(5, DataType_SQL6) = "TEXT" NewColumns2(5, DataType_SQL7) = "NTEXT" NewColumns2(5, DataType_MYSQL) = "TEXT" NewColumns2(5, ConstraintAccess) = "NULL" NewColumns2(5, ConstraintSQL6) = "NULL" NewColumns2(5, ConstraintSQL7) = "NULL" NewColumns2(5, ConstraintMySQL) = "NULL" NewColumns2(6, Prefix) = strMemberTablePrefix NewColumns2(6, FieldName) = "M_LNEWS" NewColumns2(6, TableName) = "MEMBERS" NewColumns2(6, DataType_Access) = "MEMO" NewColumns2(6, DataType_SQL6) = "TEXT" NewColumns2(6, DataType_SQL7) = "NTEXT" NewColumns2(6, DataType_MYSQL) = "TEXT" NewColumns2(6, ConstraintAccess) = "NULL" NewColumns2(6, ConstraintSQL6) = "NULL" NewColumns2(6, ConstraintSQL7) = "NULL" NewColumns2(6, ConstraintMySQL) = "NULL" NewColumns2(7, Prefix) = strMemberTablePrefix NewColumns2(7, FieldName) = "M_QUOTE" NewColumns2(7, TableName) = "MEMBERS" NewColumns2(7, DataType_Access) = "MEMO" NewColumns2(7, DataType_SQL6) = "TEXT" NewColumns2(7, DataType_SQL7) = "NTEXT" NewColumns2(7, DataType_MYSQL) = "TEXT" NewColumns2(7, ConstraintAccess) = "NULL" NewColumns2(7, ConstraintSQL6) = "NULL" NewColumns2(7, ConstraintSQL7) = "NULL" NewColumns2(7, ConstraintMySQL) = "NULL" NewColumns2(8, Prefix) = strMemberTablePrefix NewColumns2(8, FieldName) = "M_BIO" NewColumns2(8, TableName) = "MEMBERS" NewColumns2(8, DataType_Access) = "MEMO" NewColumns2(8, DataType_SQL6) = "TEXT" NewColumns2(8, DataType_SQL7) = "NTEXT" NewColumns2(8, DataType_MYSQL) = "TEXT" NewColumns2(8, ConstraintAccess) = "NULL" NewColumns2(8, ConstraintSQL6) = "NULL" NewColumns2(8, ConstraintSQL7) = "NULL" NewColumns2(8, ConstraintMySQL) = "NULL" NewColumns2(9, Prefix) = strMemberTablePrefix NewColumns2(9, FieldName) = "M_MARSTATUS" NewColumns2(9, TableName) = "MEMBERS" NewColumns2(9, DataType_Access) = "TEXT (100)" NewColumns2(9, DataType_SQL6) = "VARCHAR (100)" NewColumns2(9, DataType_SQL7) = "NVARCHAR (100)" NewColumns2(9, DataType_MYSQL) = "VARCHAR (100)" NewColumns2(9, ConstraintSQL6) = "NULL CONSTRAINT " & strTablePrefix & "SnitzC0374 DEFAULT ''" NewColumns2(9, ConstraintSQL7) = "NULL CONSTRAINT " & strTablePrefix & "SnitzC0374 DEFAULT ''" NewColumns2(9, ConstraintMySQL) = "DEFAULT '' NULL" NewColumns2(10, Prefix) = strMemberTablePrefix NewColumns2(10, FieldName) = "M_LINK1" NewColumns2(10, TableName) = "MEMBERS" NewColumns2(10, DataType_Access) = "TEXT (255)" NewColumns2(10, DataType_SQL6) = "VARCHAR (255)" NewColumns2(10, DataType_SQL7) = "NVARCHAR (255)" NewColumns2(10, DataType_MYSQL) = "VARCHAR (255)" NewColumns2(10, ConstraintSQL6) = "NULL CONSTRAINT " & strTablePrefix & "SnitzC0375 DEFAULT ''" NewColumns2(10, ConstraintSQL7) = "NULL CONSTRAINT " & strTablePrefix & "SnitzC0375 DEFAULT ''" NewColumns2(10, ConstraintMySQL) = "DEFAULT '' NULL" NewColumns2(11, Prefix) = strMemberTablePrefix NewColumns2(11, FieldName) = "M_LINK2" NewColumns2(11, TableName) = "MEMBERS" NewColumns2(11, DataType_Access) = "TEXT (255)" NewColumns2(11, DataType_SQL6) = "VARCHAR (255)" NewColumns2(11, DataType_SQL7) = "NVARCHAR (255)" NewColumns2(11, DataType_MYSQL) = "VARCHAR (255)" NewColumns2(11, ConstraintSQL6) = "NULL CONSTRAINT " & strTablePrefix & "SnitzC0376 DEFAULT ''" NewColumns2(11, ConstraintSQL7) = "NULL CONSTRAINT " & strTablePrefix & "SnitzC0376 DEFAULT ''" NewColumns2(11, ConstraintMySQL) = "DEFAULT '' NULL" NewColumns2(12, Prefix) = strMemberTablePrefix NewColumns2(12, FieldName) = "M_CITY" NewColumns2(12, TableName) = "MEMBERS" NewColumns2(12, DataType_Access) = "TEXT (100)" NewColumns2(12, DataType_SQL6) = "VARCHAR (100)" NewColumns2(12, DataType_SQL7) = "NVARCHAR (100)" NewColumns2(12, DataType_MYSQL) = "VARCHAR (100)" NewColumns2(12, ConstraintSQL6) = "NULL CONSTRAINT " & strTablePrefix & "SnitzC0377 DEFAULT ''" NewColumns2(12, ConstraintSQL7) = "NULL CONSTRAINT " & strTablePrefix & "SnitzC0377 DEFAULT ''" NewColumns2(12, ConstraintMySQL) = "DEFAULT '' NULL" NewColumns2(13, Prefix) = strMemberTablePrefix NewColumns2(13, FieldName) = "M_PHOTO_URL" NewColumns2(13, TableName) = "MEMBERS" NewColumns2(13, DataType_Access) = "TEXT (255)" NewColumns2(13, DataType_SQL6) = "VARCHAR (255)" NewColumns2(13, DataType_SQL7) = "NVARCHAR (255)" NewColumns2(13, DataType_MYSQL) = "VARCHAR (255)" NewColumns2(13, ConstraintSQL6) = "NULL CONSTRAINT " & strTablePrefix & "SnitzC0378 DEFAULT ''" NewColumns2(13, ConstraintSQL7) = "NULL CONSTRAINT " & strTablePrefix & "SnitzC0378 DEFAULT ''" NewColumns2(13, ConstraintMySQL) = "DEFAULT '' NULL" NewColumns2(14, Prefix) = strMemberTablePrefix NewColumns2(14, FieldName) = "M_STATE" NewColumns2(14, TableName) = "MEMBERS" NewColumns2(14, DataType_Access) = "TEXT (100)" NewColumns2(14, DataType_SQL6) = "VARCHAR (100)" NewColumns2(14, DataType_SQL7) = "NVARCHAR (100)" NewColumns2(14, DataType_MYSQL) = "VARCHAR (100)" NewColumns2(14, ConstraintSQL6) = "NULL CONSTRAINT " & strTablePrefix & "SnitzC0379 DEFAULT ''" NewColumns2(14, ConstraintSQL7) = "NULL CONSTRAINT " & strTablePrefix & "SnitzC0379 DEFAULT ''" NewColumns2(14, ConstraintMySQL) = "DEFAULT '' NULL" NewColumns2(15, Prefix) = strTablePrefix NewColumns2(15, FieldName) = "C_STRFULLNAME" NewColumns2(15, TableName) = "CONFIG" NewColumns2(15, DataType_Access) = "SMALLINT" NewColumns2(15, DataType_SQL6) = "SMALLINT" NewColumns2(15, DataType_SQL7) = "SMALLINT" NewColumns2(15, DataType_MySQL) = "SMALLINT" NewColumns2(15, ConstraintAccess) = "NULL" NewColumns2(15, ConstraintSQL6) = "NULL CONSTRAINT " & strTablePrefix & "SnitzC1000 DEFAULT 0" NewColumns2(15, ConstraintSQL7) = "NULL CONSTRAINT " & strTablePrefix & "SnitzC1000 DEFAULT 0" NewColumns2(15, ConstraintMySQL) = "DEFAULT 0 NULL" NewColumns2(16, Prefix) = strTablePrefix NewColumns2(16, FieldName) = "C_STRPICTURE" NewColumns2(16, TableName) = "CONFIG" NewColumns2(16, DataType_Access) = "SMALLINT" NewColumns2(16, DataType_SQL6) = "SMALLINT" NewColumns2(16, DataType_SQL7) = "SMALLINT" NewColumns2(16, DataType_MySQL) = "SMALLINT" NewColumns2(16, ConstraintAccess) = "NULL" NewColumns2(16, ConstraintSQL6) = "NULL CONSTRAINT " & strTablePrefix & "SnitzC1001 DEFAULT 0" NewColumns2(16, ConstraintSQL7) = "NULL CONSTRAINT " & strTablePrefix & "SnitzC1001 DEFAULT 0" NewColumns2(16, ConstraintMySQL) = "DEFAULT 0 NULL" NewColumns2(17, Prefix) = strTablePrefix NewColumns2(17, FieldName) = "C_STRSEX" NewColumns2(17, TableName) = "CONFIG" NewColumns2(17, DataType_Access) = "SMALLINT" NewColumns2(17, DataType_SQL6) = "SMALLINT" NewColumns2(17, DataType_SQL7) = "SMALLINT" NewColumns2(17, DataType_MySQL) = "SMALLINT" NewColumns2(17, ConstraintAccess) = "NULL" NewColumns2(17, ConstraintSQL6) = "NULL CONSTRAINT " & strTablePrefix & "SnitzC1002 DEFAULT 0" NewColumns2(17, ConstraintSQL7) = "NULL CONSTRAINT " & strTablePrefix & "SnitzC1002 DEFAULT 0" NewColumns2(17, ConstraintMySQL) = "DEFAULT 0 NULL" NewColumns2(18, Prefix) = strTablePrefix NewColumns2(18, FieldName) = "C_STRCITY" NewColumns2(18, TableName) = "CONFIG" NewColumns2(18, DataType_Access) = "SMALLINT" NewColumns2(18, DataType_SQL6) = "SMALLINT" NewColumns2(18, DataType_SQL7) = "SMALLINT" NewColumns2(18, DataType_MySQL) = "SMALLINT" NewColumns2(18, ConstraintAccess) = "NULL" NewColumns2(18, ConstraintSQL6) = "NULL CONSTRAINT " & strTablePrefix & "SnitzC1003 DEFAULT 0" NewColumns2(18, ConstraintSQL7) = "NULL CONSTRAINT " & strTablePrefix & "SnitzC1003 DEFAULT 0" NewColumns2(18, ConstraintMySQL) = "DEFAULT 0 NULL" NewColumns2(19, Prefix) = strTablePrefix NewColumns2(19, FieldName) = "C_STRSTATE" NewColumns2(19, TableName) = "CONFIG" NewColumns2(19, DataType_Access) = "SMALLINT" NewColumns2(19, DataType_SQL6) = "SMALLINT" NewColumns2(19, DataType_SQL7) = "SMALLINT" NewColumns2(19, DataType_MySQL) = "SMALLINT" NewColumns2(19, ConstraintAccess) = "NULL" NewColumns2(19, ConstraintSQL6) = "NULL CONSTRAINT " & strTablePrefix & "SnitzC1004 DEFAULT 0" NewColumns2(19, ConstraintSQL7) = "NULL CONSTRAINT " & strTablePrefix & "SnitzC1004 DEFAULT 0" NewColumns2(19, ConstraintMySQL) = "DEFAULT 0 NULL" NewColumns2(20, Prefix) = strTablePrefix NewColumns2(20, FieldName) = "C_STRAGE" NewColumns2(20, TableName) = "CONFIG" NewColumns2(20, DataType_Access) = "SMALLINT" NewColumns2(20, DataType_SQL6) = "SMALLINT" NewColumns2(20, DataType_SQL7) = "SMALLINT" NewColumns2(20, DataType_MySQL) = "SMALLINT" NewColumns2(20, ConstraintAccess) = "NULL" NewColumns2(20, ConstraintSQL6) = "NULL CONSTRAINT " & strTablePrefix & "SnitzC1005 DEFAULT 0" NewColumns2(20, ConstraintSQL7) = "NULL CONSTRAINT " & strTablePrefix & "SnitzC1005 DEFAULT 0" NewColumns2(20, ConstraintMySQL) = "DEFAULT 0 NULL" NewColumns2(21, Prefix) = strTablePrefix NewColumns2(21, FieldName) = "C_STRCOUNTRY" NewColumns2(21, TableName) = "CONFIG" NewColumns2(21, DataType_Access) = "SMALLINT" NewColumns2(21, DataType_SQL6) = "SMALLINT" NewColumns2(21, DataType_SQL7) = "SMALLINT" NewColumns2(21, DataType_MySQL) = "SMALLINT" NewColumns2(21, ConstraintAccess) = "NULL" NewColumns2(21, ConstraintSQL6) = "NULL CONSTRAINT " & strTablePrefix & "SnitzC1006 DEFAULT 0" NewColumns2(21, ConstraintSQL7) = "NULL CONSTRAINT " & strTablePrefix & "SnitzC1006 DEFAULT 0" NewColumns2(21, ConstraintMySQL) = "DEFAULT 0 NULL" NewColumns2(22, Prefix) = strTablePrefix NewColumns2(22, FieldName) = "C_STROCCUPATION" NewColumns2(22, TableName) = "CONFIG" NewColumns2(22, DataType_Access) = "SMALLINT" NewColumns2(22, DataType_SQL6) = "SMALLINT" NewColumns2(22, DataType_SQL7) = "SMALLINT" NewColumns2(22, DataType_MySQL) = "SMALLINT" NewColumns2(22, ConstraintAccess) = "NULL" NewColumns2(22, ConstraintSQL6) = "NULL CONSTRAINT " & strTablePrefix & "SnitzC1007 DEFAULT 0" NewColumns2(22, ConstraintSQL7) = "NULL CONSTRAINT " & strTablePrefix & "SnitzC1007 DEFAULT 0" NewColumns2(22, ConstraintMySQL) = "DEFAULT 0 NULL" NewColumns2(23, Prefix) = strTablePrefix NewColumns2(23, FieldName) = "C_STRBIO" NewColumns2(23, TableName) = "CONFIG" NewColumns2(23, DataType_Access) = "SMALLINT" NewColumns2(23, DataType_SQL6) = "SMALLINT" NewColumns2(23, DataType_SQL7) = "SMALLINT" NewColumns2(23, DataType_MySQL) = "SMALLINT" NewColumns2(23, ConstraintAccess) = "NULL" NewColumns2(23, ConstraintSQL6) = "NULL CONSTRAINT " & strTablePrefix & "SnitzC1008 DEFAULT 0" NewColumns2(23, ConstraintSQL7) = "NULL CONSTRAINT " & strTablePrefix & "SnitzC1008 DEFAULT 0" NewColumns2(23, ConstraintMySQL) = "DEFAULT 0 NULL" NewColumns2(24, Prefix) = strTablePrefix NewColumns2(24, FieldName) = "C_STRHOBBIES" NewColumns2(24, TableName) = "CONFIG" NewColumns2(24, DataType_Access) = "SMALLINT" NewColumns2(24, DataType_SQL6) = "SMALLINT" NewColumns2(24, DataType_SQL7) = "SMALLINT" NewColumns2(24, DataType_MySQL) = "SMALLINT" NewColumns2(24, ConstraintAccess) = "NULL" NewColumns2(24, ConstraintSQL6) = "NULL CONSTRAINT " & strTablePrefix & "SnitzC1009 DEFAULT 0" NewColumns2(24, ConstraintSQL7) = "NULL CONSTRAINT " & strTablePrefix & "SnitzC1009 DEFAULT 0" NewColumns2(24, ConstraintMySQL) = "DEFAULT 0 NULL" NewColumns2(25, Prefix) = strTablePrefix NewColumns2(25, FieldName) = "C_STRLNEWS" NewColumns2(25, TableName) = "CONFIG" NewColumns2(25, DataType_Access) = "SMALLINT" NewColumns2(25, DataType_SQL6) = "SMALLINT" NewColumns2(25, DataType_SQL7) = "SMALLINT" NewColumns2(25, DataType_MySQL) = "SMALLINT" NewColumns2(25, ConstraintAccess) = "NULL" NewColumns2(25, ConstraintSQL6) = "NULL CONSTRAINT " & strTablePrefix & "SnitzC1010 DEFAULT 0" NewColumns2(25, ConstraintSQL7) = "NULL CONSTRAINT " & strTablePrefix & "SnitzC1010 DEFAULT 0" NewColumns2(25, ConstraintMySQL) = "DEFAULT 0 NULL" NewColumns2(26, Prefix) = strTablePrefix NewColumns2(26, FieldName) = "C_STRQUOTE" NewColumns2(26, TableName) = "CONFIG" NewColumns2(26, DataType_Access) = "SMALLINT" NewColumns2(26, DataType_SQL6) = "SMALLINT" NewColumns2(26, DataType_SQL7) = "SMALLINT" NewColumns2(26, DataType_MySQL) = "SMALLINT" NewColumns2(26, ConstraintAccess) = "NULL" NewColumns2(26, ConstraintSQL6) = "NULL CONSTRAINT " & strTablePrefix & "SnitzC1011 DEFAULT 0" NewColumns2(26, ConstraintSQL7) = "NULL CONSTRAINT " & strTablePrefix & "SnitzC1011 DEFAULT 0" NewColumns2(26, ConstraintMySQL) = "DEFAULT 0 NULL" NewColumns2(27, Prefix) = strTablePrefix NewColumns2(27, FieldName) = "C_STRMARSTATUS" NewColumns2(27, TableName) = "CONFIG" NewColumns2(27, DataType_Access) = "SMALLINT" NewColumns2(27, DataType_SQL6) = "SMALLINT" NewColumns2(27, DataType_SQL7) = "SMALLINT" NewColumns2(27, DataType_MySQL) = "SMALLINT" NewColumns2(27, ConstraintAccess) = "NULL" NewColumns2(27, ConstraintSQL6) = "NULL CONSTRAINT " & strTablePrefix & "SnitzC1012 DEFAULT 0" NewColumns2(27, ConstraintSQL7) = "NULL CONSTRAINT " & strTablePrefix & "SnitzC1012 DEFAULT 0" NewColumns2(27, ConstraintMySQL) = "DEFAULT 0 NULL" NewColumns2(28, Prefix) = strTablePrefix NewColumns2(28, FieldName) = "C_STRFAVLINKS" NewColumns2(28, TableName) = "CONFIG" NewColumns2(28, DataType_Access) = "SMALLINT" NewColumns2(28, DataType_SQL6) = "SMALLINT" NewColumns2(28, DataType_SQL7) = "SMALLINT" NewColumns2(28, DataType_MySQL) = "SMALLINT" NewColumns2(28, ConstraintAccess) = "NULL" NewColumns2(28, ConstraintSQL6) = "NULL CONSTRAINT " & strTablePrefix & "SnitzC1013 DEFAULT 0" NewColumns2(28, ConstraintSQL7) = "NULL CONSTRAINT " & strTablePrefix & "SnitzC1013 DEFAULT 0" NewColumns2(28, ConstraintMySQL) = "DEFAULT 0 NULL" NewColumns2(29, Prefix) = strTablePrefix NewColumns2(29, FieldName) = "C_STRRECENTTOPICS" NewColumns2(29, TableName) = "CONFIG" NewColumns2(29, DataType_Access) = "SMALLINT" NewColumns2(29, DataType_SQL6) = "SMALLINT" NewColumns2(29, DataType_SQL7) = "SMALLINT" NewColumns2(29, DataType_MySQL) = "SMALLINT" NewColumns2(29, ConstraintAccess) = "NULL" NewColumns2(29, ConstraintSQL6) = "NULL CONSTRAINT " & strTablePrefix & "SnitzC1014 DEFAULT 0" NewColumns2(29, ConstraintSQL7) = "NULL CONSTRAINT " & strTablePrefix & "SnitzC1014 DEFAULT 0" NewColumns2(29, ConstraintMySQL) = "DEFAULT 0 NULL" call AddColumns(NewColumns2, intCriticalErrors, intWarnings) '## Forum_SQL strSql = "UPDATE " & strTablePrefix & "CONFIG " strSql = strSql & " SET C_STRVERSION = '" & strNewVersion & "'" strSql = strSql & " , C_STRFULLNAME = " & 0 strSql = strSql & " , C_STRPICTURE = " & 0 strSql = strSql & " , C_STRSEX = " & 0 strSql = strSql & " , C_STRCITY = " & 0 strSql = strSql & " , C_STRSTATE = " & 0 strSql = strSql & " , C_STRAGE = " & 0 strSql = strSql & " , C_STRCOUNTRY = " & 1 strSql = strSql & " , C_STROCCUPATION = " & 0 strSql = strSql & " , C_STRHOMEPAGE = " & 1 strSql = strSql & " , C_STRFAVLINKS = " & 1 strSql = strSql & " , C_STRICQ = " & 1 strSql = strSql & " , C_STRYAHOO = " & 1 strSql = strSql & " , C_STRAIM = " & 1 strSql = strSql & " , C_STRBIO = " & 0 strSql = strSql & " , C_STRHOBBIES = " & 0 strSql = strSql & " , C_STRLNEWS = " & 0 strSql = strSql & " , C_STRQUOTE = " & 0 strSql = strSql & " , C_STRMARSTATUS = " & 0 strSql = strSql & " , C_STRRECENTTOPICS = " & 0 strSql = strSql & " WHERE CONFIG_ID = " & 1 on error resume next my_Conn.Errors.Clear my_Conn.Execute (strSql) Response.Write("") UpdateErrorCode = UpdateErrorCheck() on error goto 0 if UpdateErrorCode = 0 then Response.Write("") elseif UpdateErrorCode = 2 then Response.Write("") intCriticalErrors = intCriticalErrors + 1 else Response.Write("") intCriticalErrors = intCriticalErrors + 1 end if Response.Write("
Upgraded: Added default values for new fields in CONFIG table
Critical error: Can't add default values for new fields in CONFIG table!
Critical error: code: " & Hex(UpdateErrorCode) & " while trying to add default values to the CONFIG table
") Response.Flush end if '########################################################################### '## '## Set up for update 3 '## '## Database updates needed '## '## FORUM_FORUM '## Need F_PASSWORD set to 255 Char's to handle NT Group Names. '## '########################################################################### if (OldVersion <= 3) then Dim NewColumns3(2,11) NewColumns3(0, Prefix) = strTablePrefix NewColumns3(0, FieldName) = "C_STRAUTOLOGON" NewColumns3(0, TableName) = "CONFIG" NewColumns3(0, DataType_Access) = "SMALLINT" NewColumns3(0, DataType_SQL6) = "SMALLINT" NewColumns3(0, DataType_SQL7) = "SMALLINT" NewColumns3(0, DataType_MySQL) = "SMALLINT" NewColumns3(0, ConstraintAccess) = "NULL" NewColumns3(0, ConstraintSQL6) = "NULL CONSTRAINT " & strTablePrefix & "SnitzC1015 DEFAULT 0" NewColumns3(0, ConstraintSQL7) = "NULL CONSTRAINT " & strTablePrefix & "SnitzC1015 DEFAULT 0" NewColumns3(0, ConstraintMySQL) = "DEFAULT '0' NULL" NewColumns3(1, Prefix) = strTablePrefix NewColumns3(1, FieldName) = "C_STRNTGROUPS" NewColumns3(1, TableName) = "CONFIG" NewColumns3(1, DataType_Access) = "SMALLINT" NewColumns3(1, DataType_SQL6) = "SMALLINT" NewColumns3(1, DataType_SQL7) = "SMALLINT" NewColumns3(1, DataType_MySQL) = "SMALLINT" NewColumns3(1, ConstraintAccess) = "NULL" NewColumns3(1, ConstraintSQL6) = "NULL CONSTRAINT " & strTablePrefix & "SnitzC1016 DEFAULT 0" NewColumns3(1, ConstraintSQL7) = "NULL CONSTRAINT " & strTablePrefix & "SnitzC1016 DEFAULT 0" NewColumns3(1, ConstraintMySQL) = "DEFAULT '0' NULL" NewColumns3(2, Prefix) = strTablePrefix NewColumns3(2, FieldName) = "F_PASSWORD_NEW" NewColumns3(2, TableName) = "FORUM" NewColumns3(2, DataType_Access) = "TEXT (255)" NewColumns3(2, DataType_SQL6) = "VARCHAR (255)" NewColumns3(2, DataType_SQL7) = "NVARCHAR (255)" NewColumns3(2, DataType_MYSQL) = "VARCHAR (255)" NewColumns3(2, ConstraintAccess) = "NULL" NewColumns3(2, ConstraintSQL6) = "NULL CONSTRAINT " & strTablePrefix & "SnitzC1017 DEFAULT ''" NewColumns3(2, ConstraintSQL7) = "NULL CONSTRAINT " & strTablePrefix & "SnitzC1017 DEFAULT ''" NewColumns3(2, ConstraintMySQL) = "DEFAULT '' NULL" call AddColumns(NewColumns3, intCriticalErrors, intWarnings) Dim SpecialSql3(4) SpecialSql3(Access) = "UPDATE " & strTablePrefix & "FORUM SET F_PASSWORD_NEW = F_PASSWORD" SpecialSql3(SQL6) = "UPDATE " & strTablePrefix & "FORUM SET F_PASSWORD_NEW = F_PASSWORD" SpecialSql3(SQL7) = "UPDATE " & strTablePrefix & "FORUM SET F_PASSWORD_NEW = F_PASSWORD" SpecialSql3(MySql) = "UPDATE " & strTablePrefix & "FORUM SET F_PASSWORD_NEW = F_PASSWORD" strOkMessage = "Password field conversion step 1 of 2 completed" call SpecialUpdates(SpecialSql3, strOkMessage) SpecialSql3(Access) = "ALTER TABLE " & strTablePrefix & "FORUM DROP COLUMN F_PASSWORD" SpecialSql3(SQL6) = "SELECT * FROM " & strTablePrefix & "CONFIG " '## dummy sql-statement SQL6.5 doesn't allow DROP !! SpecialSql3(SQL7) = "ALTER TABLE " & strTablePrefix & "FORUM DROP COLUMN F_PASSWORD" SpecialSql3(MySql) = "ALTER TABLE " & strTablePrefix & "FORUM DROP COLUMN F_PASSWORD" strOkMessage = "Password field conversion step 2 of 2 completed" call SpecialUpdates(SpecialSql3, strOkMessage) '## Forum_SQL strSql = "UPDATE " & strTablePrefix & "CONFIG " strSql = strSql & " SET C_STRVERSION = '" & strNewVersion & "'" strSql = strSql & " , C_STRAUTOLOGON = " & 0 strSql = strSql & " , C_STRNTGROUPS = " & 0 strSql = strSql & " WHERE CONFIG_ID = " & 1 on error resume next my_Conn.Errors.Clear my_Conn.Execute (strSql) Response.Write("") UpdateErrorCode = UpdateErrorCheck() on error goto 0 if UpdateErrorCode = 0 then Response.Write("") elseif UpdateErrorCode = 2 then Response.Write("") intCriticalErrors = intCriticalErrors + 1 else Response.Write("") intCriticalErrors = intCriticalErrors + 1 end if Response.Write("
Upgraded: Added default values for new fields in CONFIG table
Critical error: Can't add default values for new fields in CONFIG table!
Critical error: code: " & Hex(UpdateErrorCode) & " while trying to add default values to the CONFIG table
") Response.Flush end if '########################################################################### '## '## Setup for update 4 '## '########################################################################### if (OldVersion <= 4) then Dim SpecialSql4(4) SpecialSql4(Access) = "CREATE TABLE " & strTablePrefix & "ALLOWED_MEMBERS (" SpecialSql4(Access) = SpecialSql4(Access) & "MEMBER_ID INT NOT NULL, FORUM_ID INT NOT NULL, " SpecialSql4(Access) = SpecialSql4(Access) & "CONSTRAINT " & strTablePrefix & "SnitzC373 PRIMARY KEY (MEMBER_ID, FORUM_ID) ) " SpecialSql4(SQL6) = "CREATE TABLE " & strTablePrefix & "ALLOWED_MEMBERS (" SpecialSql4(SQL6) = SpecialSql4(SQL6) & "MEMBER_ID INT NOT NULL, FORUM_ID INT NOT NULL , " SpecialSql4(SQL6) = SpecialSql4(SQL6) & "CONSTRAINT " & strTablePrefix & "SnitzC373 PRIMARY KEY NONCLUSTERED (MEMBER_ID, FORUM_ID) )" SpecialSql4(SQL7) = "CREATE TABLE " & strTablePrefix & "ALLOWED_MEMBERS (" SpecialSql4(SQL7) = SpecialSql4(SQL7) & "MEMBER_ID INT NOT NULL, FORUM_ID INT NOT NULL , " SpecialSql4(SQL7) = SpecialSql4(SQL7) & "CONSTRAINT " & strTablePrefix & "SnitzC373 PRIMARY KEY NONCLUSTERED (MEMBER_ID, FORUM_ID) )" SpecialSql4(MySql) = "CREATE TABLE " & strTablePrefix & "ALLOWED_MEMBERS (" SpecialSql4(MySql) = SpecialSql4(MySql) & "MEMBER_ID INT (11) NOT NULL, FORUM_ID smallint (6) NOT NULL , " SpecialSql4(MySql) = SpecialSql4(MySql) & "PRIMARY KEY (MEMBER_ID, FORUM_ID) ) " strOkMessage = "Table ALLOWED_MEMBER created " call SpecialUpdates(SpecialSql4, strOkMessage) Response.Flush Response.Write("") Response.Write("") Response.Write("") intTransferErrors = 0 strSql = "SELECT FORUM_ID,F_USERLIST FROM " & strTablePrefix & "FORUM " on error resume next my_Conn.Errors.Clear set rsForum = my_Conn.execute(strSql) UpdateErrorCode = UpdateErrorCheck() on error goto 0 if UpdateErrorCode = 0 then Response.Write("") else Response.Write("") intCriticalErrors = intCriticalErrors + 1 intTransferErrors = 1 end if if intTransferErrors = 0 then do while not rsForum.EOF if Instr(rsForum("F_USERLIST"),",") > 0 then Users = split(rsForum("F_USERLIST"),",") for count = Lbound(Users) to Ubound(Users) strSql = "INSERT INTO " & strTablePrefix & "ALLOWED_MEMBERS (" strSql = strSql & " MEMBER_ID, FORUM_ID) VALUES ( "& Users(count) & ", " & rsForum("FORUM_ID") & ")" on error resume next my_Conn.Errors.Clear my_Conn.Execute (strSql) UpdateErrorCode = UpdateErrorCheck() on error goto 0 if UpdateErrorCode = 0 then Response.Write("") elseif UpdateErrorCode = 2 then Response.Write("") intCriticalErrors = intCriticalErrors + 1 infTransferErrors = 1 end if next end if rsForum.movenext loop end if on error resume next rsForum.close set rsForum = nothing on error goto 0 if intTransferErrors = 0 then Response.Write("") Response.Write("") else Response.Write("") Response.Write("") end if '## Forum_SQL strSql = "UPDATE " & strTablePrefix & "CONFIG " strSql = strSql & " SET C_STRVERSION = '" & strNewVersion & "'" strSql = strSql & " WHERE CONFIG_ID = " & 1 on error resume next my_Conn.Errors.Clear my_Conn.Execute (strSql) Response.Write("
Upgrading: Starting transferring Member List to ALLOWED_MEMBERS table
Upgraded: Table opened
Critical error: Error while getting Memberlist for transfer
Upgraded: Added default values for new fields in CONFIG table
Critical error: Error while adding record ( " & Users(count) & ", " & rsForum("FORUM_ID") & ") to ALLOWED_MEMBER table!
Upgrading: Finished transferring Member List to ALLOWED_MEMBERS table
Upgrading: Transferring of Member List to ALLOWED_MEMBERS table was NOT succesfull !
") UpdateErrorCode = UpdateErrorCheck() on error goto 0 if UpdateErrorCode = 0 then Response.Write("") elseif UpdateErrorCode = 2 then Response.Write("") intCriticalErrors = intCriticalErrors + 1 else Response.Write("") intCriticalErrors = intCriticalErrors + 1 end if Response.Write("
Upgraded: Added default values for new fields in CONFIG table
Critical error: Can't add default values for new fields in CONFIG table!
Critical error: code: " & Hex(UpdateErrorCode) & " while trying to add default values to the CONFIG table
") Response.Flush end if '########################################################################### '## '## Setup for update 5 / to version 3.3 '## '########################################################################### if (OldVersion <= 5) then Dim SpecialSql5(4) if strDBType = "access" then SpecialSql5(Access) = "CREATE TABLE " & strTablePrefix & "CONFIG_NEW ( " SpecialSql5(Access) = SpecialSql5(Access) & "ID COUNTER NOT NULL , " SpecialSql5(Access) = SpecialSql5(Access) & "C_VARIABLE varchar (255) NULL , " SpecialSql5(Access) = SpecialSql5(Access) & "C_VALUE varchar (255) NULL )" strOkMessage = "Table CONFIG_NEW created " call SpecialUpdates(SpecialSql5, strOkMessage) end if SpecialSql5(Access) = "CREATE TABLE " & strTablePrefix & "SUBSCRIPTIONS (" SpecialSql5(Access) = SpecialSql5(Access) & "SUBSCRIPTION_ID COUNTER CONSTRAINT PrimaryKey PRIMARY KEY, MEMBER_ID INT NOT NULL, " SpecialSql5(Access) = SpecialSql5(Access) & "CAT_ID INT NOT NULL, TOPIC_ID INT NOT NULL, FORUM_ID INT NOT NULL) " SpecialSql5(SQL6) = "CREATE TABLE " & strTablePrefix & "SUBSCRIPTIONS (" SpecialSql5(SQL6) = SpecialSql5(SQL6) & "SUBSCRIPTION_ID INT IDENTITY NOT NULL, MEMBER_ID INT NOT NULL, " SpecialSql5(SQL6) = SpecialSql5(SQL6) & "CAT_ID INT NOT NULL, TOPIC_ID INT NOT NULL, FORUM_ID INT NOT NULL) " SpecialSql5(SQL7) = "CREATE TABLE " & strTablePrefix & "SUBSCRIPTIONS (" SpecialSql5(SQL7) = SpecialSql5(SQL7) & "SUBSCRIPTION_ID INT IDENTITY NOT NULL, MEMBER_ID INT NOT NULL, " SpecialSql5(SQL7) = SpecialSql5(SQL7) & "CAT_ID INT NOT NULL, TOPIC_ID INT NOT NULL, FORUM_ID INT NOT NULL) " SpecialSql5(MySql) = "CREATE TABLE " & strTablePrefix & "SUBSCRIPTIONS (" SpecialSql5(MySql) = SpecialSql5(MySql) & "SUBSCRIPTION_ID INT (11) DEFAULT '' NOT NULL autoincrement, MEMBER_ID INT NOT NULL, " SpecialSql5(MySql) = SpecialSql5(MySql) & "CAT_ID INT NOT NULL, TOPIC_ID INT NOT NULL, FORUM_ID INT NOT NULL, " SpecialSql5(MySql) = SpecialSql5(MySql) & "KEY " & strTablePrefix & "SUBSCRIPTIONS_SUB_ID(SUBSCRIPTION_ID)) " strOkMessage = "Table SUBSCRIPTIONS created " call SpecialUpdates(SpecialSql5, strOkMessage) Response.Flush SpecialSql5(Access) = "CREATE TABLE " & strTablePrefix & "A_TOPICS ( " SpecialSql5(Access) = SpecialSql5(Access) & "CAT_ID int NOT NULL , " SpecialSql5(Access) = SpecialSql5(Access) & "FORUM_ID int NOT NULL , " SpecialSql5(Access) = SpecialSql5(Access) & "TOPIC_ID COUNTER CONSTRAINT PrimaryKey PRIMARY KEY , " SpecialSql5(Access) = SpecialSql5(Access) & "T_STATUS smallint NULL , " SpecialSql5(Access) = SpecialSql5(Access) & "T_MAIL smallint NULL , " SpecialSql5(Access) = SpecialSql5(Access) & "T_SUBJECT varchar (100) NULL , " SpecialSql5(Access) = SpecialSql5(Access) & "T_MESSAGE text NULL , " SpecialSql5(Access) = SpecialSql5(Access) & "T_AUTHOR int NULL , " SpecialSql5(Access) = SpecialSql5(Access) & "T_REPLIES int NULL , " SpecialSql5(Access) = SpecialSql5(Access) & "T_VIEW_COUNT int NULL , " SpecialSql5(Access) = SpecialSql5(Access) & "T_LAST_POST varchar (50) NULL , " SpecialSql5(Access) = SpecialSql5(Access) & "T_DATE varchar (50) NULL, " SpecialSql5(Access) = SpecialSql5(Access) & "T_LAST_POSTER int NULL, " SpecialSql5(Access) = SpecialSql5(Access) & "T_IP varchar (50) NULL, " SpecialSql5(Access) = SpecialSql5(Access) & "T_LAST_POST_AUTHOR int NULL ) " SpecialSql5(SQL6) = "CREATE TABLE " & strTablePrefix & "A_TOPICS ( " SpecialSql5(SQL6) = SpecialSql5(SQL6) & "CAT_ID int NOT NULL , " SpecialSql5(SQL6) = SpecialSql5(SQL6) & "FORUM_ID int NOT NULL , " SpecialSql5(SQL6) = SpecialSql5(SQL6) & "TOPIC_ID int IDENTITY (1, 1) NOT NULL , " SpecialSql5(SQL6) = SpecialSql5(SQL6) & "T_STATUS smallint NULL , " SpecialSql5(SQL6) = SpecialSql5(SQL6) & "T_MAIL smallint NULL , " SpecialSql5(SQL6) = SpecialSql5(SQL6) & "T_SUBJECT varchar (100) NULL , " SpecialSql5(SQL6) = SpecialSql5(SQL6) & "T_MESSAGE text NULL , " SpecialSql5(SQL6) = SpecialSql5(SQL6) & "T_AUTHOR int NULL , " SpecialSql5(SQL6) = SpecialSql5(SQL6) & "T_REPLIES int NULL , " SpecialSql5(SQL6) = SpecialSql5(SQL6) & "T_VIEW_COUNT int NULL , " SpecialSql5(SQL6) = SpecialSql5(SQL6) & "T_LAST_POST varchar (50) NULL , " SpecialSql5(SQL6) = SpecialSql5(SQL6) & "T_DATE varchar (50) NULL, " SpecialSql5(SQL6) = SpecialSql5(SQL6) & "T_LAST_POSTER int NULL, " SpecialSql5(SQL6) = SpecialSql5(SQL6) & "T_IP varchar (50) NULL, " SpecialSql5(SQL6) = SpecialSql5(SQL6) & "T_LAST_POST_AUTHOR int NULL ) " SpecialSql5(SQL7) = "CREATE TABLE " & strTablePrefix & "A_TOPICS ( " SpecialSql5(SQL7) = SpecialSql5(SQL7) & "CAT_ID int NOT NULL , " SpecialSql5(SQL7) = SpecialSql5(SQL7) & "FORUM_ID int NOT NULL , " SpecialSql5(SQL7) = SpecialSql5(SQL7) & "TOPIC_ID int IDENTITY (1, 1) NOT NULL , " SpecialSql5(SQL7) = SpecialSql5(SQL7) & "T_STATUS smallint NULL , " SpecialSql5(SQL7) = SpecialSql5(SQL7) & "T_MAIL smallint NULL , " SpecialSql5(SQL7) = SpecialSql5(SQL7) & "T_SUBJECT varchar (100) NULL , " SpecialSql5(SQL7) = SpecialSql5(SQL7) & "T_MESSAGE text NULL , " SpecialSql5(SQL7) = SpecialSql5(SQL7) & "T_AUTHOR int NULL , " SpecialSql5(SQL7) = SpecialSql5(SQL7) & "T_REPLIES int NULL , " SpecialSql5(SQL7) = SpecialSql5(SQL7) & "T_VIEW_COUNT int NULL , " SpecialSql5(SQL7) = SpecialSql5(SQL7) & "T_LAST_POST varchar (50) NULL , " SpecialSql5(SQL7) = SpecialSql5(SQL7) & "T_DATE varchar (50) NULL, " SpecialSql5(SQL7) = SpecialSql5(SQL7) & "T_LAST_POSTER int NULL, " SpecialSql5(SQL7) = SpecialSql5(SQL7) & "T_IP varchar (50) NULL, " SpecialSql5(SQL7) = SpecialSql5(SQL7) & "T_LAST_POST_AUTHOR int NULL ) " SpecialSql5(MySql) = "CREATE TABLE " & strTablePrefix & "A_TOPICS ( " SpecialSql5(MySql) = SpecialSql5(MySql) & "CAT_ID int (11) DEFAULT '1' NOT NULL , " SpecialSql5(MySql) = SpecialSql5(MySql) & "FORUM_ID int (11) DEFAULT '1' NOT NULL , " SpecialSql5(MySql) = SpecialSql5(MySql) & "TOPIC_ID int (11) DEFAULT '' NOT NULL auto_increment, " SpecialSql5(MySql) = SpecialSql5(MySql) & "T_STATUS smallint (6) DEFAULT '1' , " SpecialSql5(MySql) = SpecialSql5(MySql) & "T_MAIL smallint (6) DEFAULT '0' , " SpecialSql5(MySql) = SpecialSql5(MySql) & "T_SUBJECT VARCHAR (100) DEFAULT '' , " SpecialSql5(MySql) = SpecialSql5(MySql) & "T_MESSAGE text , " SpecialSql5(MySql) = SpecialSql5(MySql) & "T_AUTHOR int (11) DEFAULT '1' , " SpecialSql5(MySql) = SpecialSql5(MySql) & "T_REPLIES int (11) DEFAULT '0' , " SpecialSql5(MySql) = SpecialSql5(MySql) & "T_VIEW_COUNT int (11) DEFAULT '0' , " SpecialSql5(MySql) = SpecialSql5(MySql) & "T_LAST_POST VARCHAR (50) DEFAULT '' , " SpecialSql5(MySql) = SpecialSql5(MySql) & "T_DATE VARCHAR (50) DEFAULT '', " SpecialSql5(MySql) = SpecialSql5(MySql) & "T_LAST_POSTER int (11) DEFAULT '1', " SpecialSql5(MySql) = SpecialSql5(MySql) & "T_IP VARCHAR (50) DEFAULT '000.000.000.000', " SpecialSql5(MySql) = SpecialSql5(MySql) & "T_LAST_POST_AUTHOR int (11) DEFAULT '1', " SpecialSql5(MySql) = SpecialSql5(MySql) & "PRIMARY KEY (CAT_ID, FORUM_ID, TOPIC_ID), " SpecialSql5(MySql) = SpecialSql5(MySql) & "KEY " & strTablePrefix & "A_TOPIC_CATFORTOP(CAT_ID,FORUM_ID,TOPIC_ID), " SpecialSql5(MySql) = SpecialSql5(MySql) & "KEY " & strTablePrefix & "A_TOPIC_CAT_ID(CAT_ID), " SpecialSql5(MySql) = SpecialSql5(MySql) & "KEY " & strTablePrefix & "A_TOPIC_FORUM_ID(FORUM_ID), " SpecialSql5(MySql) = SpecialSql5(MySql) & "KEY " & strTablePrefix & "A_TOPIC_TOPIC_ID (TOPIC_ID) )" strOkMessage = "Table A_TOPICS created " call SpecialUpdates(SpecialSql5, strOkMessage) Response.Flush SpecialSql5(Access) = "CREATE TABLE " & strTablePrefix & "A_REPLY ( " SpecialSql5(Access) = SpecialSql5(Access) & "CAT_ID int NOT NULL , " SpecialSql5(Access) = SpecialSql5(Access) & "FORUM_ID int NOT NULL , " SpecialSql5(Access) = SpecialSql5(Access) & "TOPIC_ID int NOT NULL , " SpecialSql5(Access) = SpecialSql5(Access) & "REPLY_ID COUNTER CONSTRAINT PrimaryKey PRIMARY KEY , " SpecialSql5(Access) = SpecialSql5(Access) & "R_STATUS smallint NULL , " SpecialSql5(Access) = SpecialSql5(Access) & "R_MAIL smallint NULL , " SpecialSql5(Access) = SpecialSql5(Access) & "R_AUTHOR int NULL , " SpecialSql5(Access) = SpecialSql5(Access) & "R_MESSAGE text NULL , " SpecialSql5(Access) = SpecialSql5(Access) & "R_DATE varchar (50) NULL , " SpecialSql5(Access) = SpecialSql5(Access) & "R_IP varchar (50) NULL ) " SpecialSql5(SQL6) = "CREATE TABLE " & strTablePrefix & "A_REPLY ( " SpecialSql5(SQL6) = SpecialSql5(SQL6) & "CAT_ID int NOT NULL , " SpecialSql5(SQL6) = SpecialSql5(SQL6) & "FORUM_ID int NOT NULL , " SpecialSql5(SQL6) = SpecialSql5(SQL6) & "TOPIC_ID int NOT NULL , " SpecialSql5(SQL6) = SpecialSql5(SQL6) & "REPLY_ID int IDENTITY (1, 1) NOT NULL , " SpecialSql5(SQL6) = SpecialSql5(SQL6) & "R_MAIL smallint NULL , " SpecialSql5(SQL6) = SpecialSql5(SQL6) & "R_STATUS smallint NULL , " SpecialSql5(SQL6) = SpecialSql5(SQL6) & "R_AUTHOR int NULL , " SpecialSql5(SQL6) = SpecialSql5(SQL6) & "R_MESSAGE text NULL , " SpecialSql5(SQL6) = SpecialSql5(SQL6) & "R_DATE varchar (50) NULL , " SpecialSql5(SQL6) = SpecialSql5(SQL6) & "R_IP varchar (50) NULL ) " SpecialSql5(SQL7) = "CREATE TABLE " & strTablePrefix & "A_REPLY ( " SpecialSql5(SQL7) = SpecialSql5(SQL7) & "CAT_ID int NOT NULL , " SpecialSql5(SQL7) = SpecialSql5(SQL7) & "FORUM_ID int NOT NULL , " SpecialSql5(SQL7) = SpecialSql5(SQL7) & "TOPIC_ID int NOT NULL , " SpecialSql5(SQL7) = SpecialSql5(SQL7) & "REPLY_ID int IDENTITY (1, 1) NOT NULL , " SpecialSql5(SQL7) = SpecialSql5(SQL7) & "R_STATUS smallint NULL , " SpecialSql5(SQL7) = SpecialSql5(SQL7) & "R_MAIL smallint NULL , " SpecialSql5(SQL7) = SpecialSql5(SQL7) & "R_AUTHOR int NULL , " SpecialSql5(SQL7) = SpecialSql5(SQL7) & "R_MESSAGE text NULL , " SpecialSql5(SQL7) = SpecialSql5(SQL7) & "R_DATE varchar (50) NULL , " SpecialSql5(SQL7) = SpecialSql5(SQL7) & "R_IP varchar (50) NULL ) " SpecialSql5(MySql) = "CREATE TABLE " & strTablePrefix & "A_REPLY ( " SpecialSql5(MySql) = SpecialSql5(MySql) & "CAT_ID int (11) DEFAULT '1' NOT NULL , " SpecialSql5(MySql) = SpecialSql5(MySql) & "FORUM_ID int (11) DEFAULT '1' NOT NULL , " SpecialSql5(MySql) = SpecialSql5(MySql) & "TOPIC_ID int (11) DEFAULT '1' NOT NULL , " SpecialSql5(MySql) = SpecialSql5(MySql) & "REPLY_ID int (11) DEFAULT '' NOT NULL auto_increment, " SpecialSql5(MySql) = SpecialSql5(MySql) & "R_STATUS smallint (6) DEFAULT '1' , " SpecialSql5(MySql) = SpecialSql5(MySql) & "R_AUTHOR int (11) DEFAULT '1' , " SpecialSql5(MySql) = SpecialSql5(MySql) & "R_MESSAGE text , " SpecialSql5(MySql) = SpecialSql5(MySql) & "R_DATE VARCHAR (50) DEFAULT '' , " SpecialSql5(MySql) = SpecialSql5(MySql) & "R_IP VARCHAR (50) DEFAULT '000.000.000.000', " SpecialSql5(MySql) = SpecialSql5(MySql) & "PRIMARY KEY (CAT_ID, FORUM_ID, TOPIC_ID, REPLY_ID), " SpecialSql5(MySql) = SpecialSql5(MySql) & "KEY " & strTablePrefix & "A_REPLY_CATFORTOPREPL(CAT_ID,FORUM_ID,TOPIC_ID, REPLY_ID), " SpecialSql5(MySql) = SpecialSql5(MySql) & "KEY " & strTablePrefix & "A_REPLY_REP_ID(REPLY_ID), " SpecialSql5(MySql) = SpecialSql5(MySql) & "KEY " & strTablePrefix & "A_REPLY_CAT_ID(CAT_ID), " SpecialSql5(MySql) = SpecialSql5(MySql) & "KEY " & strTablePrefix & "A_REPLY_FORUM_ID(FORUM_ID), " SpecialSql5(MySql) = SpecialSql5(MySql) & "KEY " & strTablePrefix & "A_REPLY_TOPIC_ID (TOPIC_ID) )" strOkMessage = "Table A_REPLY created " call SpecialUpdates(SpecialSql5, strOkMessage) Response.Flush Dim NewColumns5(13,11) NewColumns5(0, Prefix) = strTablePrefix NewColumns5(0, FieldName) = "R_STATUS" NewColumns5(0, TableName) = "REPLY" NewColumns5(0, DataType_Access) = "SMALLINT" NewColumns5(0, DataType_SQL6) = "SMALLINT" NewColumns5(0, DataType_SQL7) = "SMALLINT" NewColumns5(0, DataType_MySQL) = "SMALLINT" NewColumns5(0, ConstraintAccess) = "NOT NULL" NewColumns5(0, ConstraintSQL6) = "NOT NULL CONSTRAINT " & strTablePrefix & "SnitzC1017 DEFAULT 0" NewColumns5(0, ConstraintSQL7) = "NOT NULL CONSTRAINT " & strTablePrefix & "SnitzC1017 DEFAULT 0" NewColumns5(0, ConstraintMySQL) = "DEFAULT '0' NOT NULL" NewColumns5(1, Prefix) = strTablePrefix NewColumns5(1, FieldName) = "F_MODERATION" NewColumns5(1, TableName) = "FORUM" NewColumns5(1, DataType_Access) = "INT" NewColumns5(1, DataType_SQL6) = "INT" NewColumns5(1, DataType_SQL7) = "INT" NewColumns5(1, DataType_MySQL) = "INT" NewColumns5(1, ConstraintAccess) = "NOT NULL" NewColumns5(1, ConstraintSQL6) = "NOT NULL CONSTRAINT " & strTablePrefix & "SnitzC1018 DEFAULT 0" NewColumns5(1, ConstraintSQL7) = "NOT NULL CONSTRAINT " & strTablePrefix & "SnitzC1018 DEFAULT 0" NewColumns5(1, ConstraintMySQL) = "DEFAULT '0' NOT NULL" NewColumns5(2, Prefix) = strTablePrefix NewColumns5(2, FieldName) = "F_SUBSCRIPTION" NewColumns5(2, TableName) = "FORUM" NewColumns5(2, DataType_Access) = "INT" NewColumns5(2, DataType_SQL6) = "INT" NewColumns5(2, DataType_SQL7) = "INT" NewColumns5(2, DataType_MySQL) = "INT" NewColumns5(2, ConstraintAccess) = "NOT NULL" NewColumns5(2, ConstraintSQL6) = "NOT NULL CONSTRAINT " & strTablePrefix & "SnitzC1019 DEFAULT 0" NewColumns5(2, ConstraintSQL7) = "NOT NULL CONSTRAINT " & strTablePrefix & "SnitzC1019 DEFAULT 0" NewColumns5(2, ConstraintMySQL) = "DEFAULT '0' NOT NULL" NewColumns5(3, Prefix) = strTablePrefix NewColumns5(3, FieldName) = "F_ORDER" NewColumns5(3, TableName) = "FORUM" NewColumns5(3, DataType_Access) = "INT" NewColumns5(3, DataType_SQL6) = "INT" NewColumns5(3, DataType_SQL7) = "INT" NewColumns5(3, DataType_MySQL) = "INT" NewColumns5(3, ConstraintAccess) = "NOT NULL" NewColumns5(3, ConstraintSQL6) = "NOT NULL CONSTRAINT " & strTablePrefix & "SnitzC1031 DEFAULT 1" NewColumns5(3, ConstraintSQL7) = "NOT NULL CONSTRAINT " & strTablePrefix & "SnitzC1031 DEFAULT 1" NewColumns5(3, ConstraintMySQL) = "DEFAULT '1' NOT NULL" NewColumns5(4, Prefix) = strTablePrefix NewColumns5(4, FieldName) = "CAT_MODERATION" NewColumns5(4, TableName) = "CATEGORY" NewColumns5(4, DataType_Access) = "SMALLINT" NewColumns5(4, DataType_SQL6) = "SMALLINT" NewColumns5(4, DataType_SQL7) = "SMALLINT" NewColumns5(4, DataType_MySQL) = "SMALLINT" NewColumns5(4, ConstraintAccess) = "NOT NULL" NewColumns5(4, ConstraintSQL6) = "NOT NULL CONSTRAINT " & strTablePrefix & "SnitzC1021 DEFAULT 0" NewColumns5(4, ConstraintSQL7) = "NOT NULL CONSTRAINT " & strTablePrefix & "SnitzC1021 DEFAULT 0" NewColumns5(4, ConstraintMySQL) = "DEFAULT '0' NOT NULL" NewColumns5(5, Prefix) = strTablePrefix NewColumns5(5, FieldName) = "CAT_SUBSCRIPTION" NewColumns5(5, TableName) = "CATEGORY" NewColumns5(5, DataType_Access) = "SMALLINT" NewColumns5(5, DataType_SQL6) = "SMALLINT" NewColumns5(5, DataType_SQL7) = "SMALLINT" NewColumns5(5, DataType_MySQL) = "SMALLINT" NewColumns5(5, ConstraintAccess) = "NOT NULL" NewColumns5(5, ConstraintSQL6) = "NOT NULL CONSTRAINT " & strTablePrefix & "SnitzC1022 DEFAULT 0" NewColumns5(5, ConstraintSQL7) = "NOT NULL CONSTRAINT " & strTablePrefix & "SnitzC1022 DEFAULT 0" NewColumns5(5, ConstraintMySQL) = "DEFAULT '0' NOT NULL" NewColumns5(6, Prefix) = strTablePrefix NewColumns5(6, FieldName) = "CAT_ORDER" NewColumns5(6, TableName) = "CATEGORY" NewColumns5(6, DataType_Access) = "SMALLINT" NewColumns5(6, DataType_SQL6) = "SMALLINT" NewColumns5(6, DataType_SQL7) = "SMALLINT" NewColumns5(6, DataType_MySQL) = "SMALLINT" NewColumns5(6, ConstraintAccess) = "NOT NULL" NewColumns5(6, ConstraintSQL6) = "NOT NULL CONSTRAINT " & strTablePrefix & "SnitzC1023 DEFAULT 1" NewColumns5(6, ConstraintSQL7) = "NOT NULL CONSTRAINT " & strTablePrefix & "SnitzC1023 DEFAULT 1" NewColumns5(6, ConstraintMySQL) = "DEFAULT '1' NOT NULL" NewColumns5(7, Prefix) = strTablePrefix NewColumns5(7, FieldName) = "T_ARCHIVE_FLAG" NewColumns5(7, TableName) = "TOPICS" NewColumns5(7, DataType_Access) = "SMALLINT" NewColumns5(7, DataType_SQL6) = "SMALLINT" NewColumns5(7, DataType_SQL7) = "SMALLINT" NewColumns5(7, DataType_MySQL) = "SMALLINT" NewColumns5(7, ConstraintAccess) = "NOT NULL" NewColumns5(7, ConstraintSQL6) = "NOT NULL CONSTRAINT " & strTablePrefix & "SnitzC1029 DEFAULT 1" NewColumns5(7, ConstraintSQL7) = "NOT NULL CONSTRAINT " & strTablePrefix & "SnitzC1029 DEFAULT 1" NewColumns5(7, ConstraintMySQL) = "DEFAULT '1' NOT NULL" NewColumns5(8, Prefix) = strTablePrefix NewColumns5(8, FieldName) = "F_L_ARCHIVE" NewColumns5(8, TableName) = "FORUM" NewColumns5(8, DataType_Access) = "TEXT (20)" NewColumns5(8, DataType_SQL6) = "VARCHAR (20)" NewColumns5(8, DataType_SQL7) = "NVARCHAR (20)" NewColumns5(8, DataType_MYSQL) = "VARCHAR (20)" NewColumns5(8, ConstraintAccess) = "NOT NULL" NewColumns5(8, ConstraintSQL6) = "NOT NULL CONSTRAINT " & strTablePrefix & "SnitzC1024 DEFAULT ''" NewColumns5(8, ConstraintSQL7) = "NOT NULL CONSTRAINT " & strTablePrefix & "SnitzC1024 DEFAULT ''" NewColumns5(8, ConstraintMySQL) = "DEFAULT '' NOT NULL" NewColumns5(9, Prefix) = strTablePrefix NewColumns5(9, FieldName) = "F_ARCHIVE_SCHED" NewColumns5(9, TableName) = "FORUM" NewColumns5(9, DataType_Access) = "INT" NewColumns5(9, DataType_SQL6) = "INT" NewColumns5(9, DataType_SQL7) = "INT" NewColumns5(9, DataType_MySQL) = "INT" NewColumns5(9, ConstraintAccess) = "NOT NULL" NewColumns5(9, ConstraintSQL6) = "NOT NULL CONSTRAINT " & strTablePrefix & "SnitzC1025 DEFAULT 30" NewColumns5(9, ConstraintSQL7) = "NOT NULL CONSTRAINT " & strTablePrefix & "SnitzC1025 DEFAULT 30" NewColumns5(9, ConstraintMySQL) = "DEFAULT '30' NOT NULL" NewColumns5(10, Prefix) = strTablePrefix NewColumns5(10, FieldName) = "F_L_DELETE" NewColumns5(10, TableName) = "FORUM" NewColumns5(10, DataType_Access) = "TEXT (20)" NewColumns5(10, DataType_SQL6) = "VARCHAR (20)" NewColumns5(10, DataType_SQL7) = "NVARCHAR (20)" NewColumns5(10, DataType_MYSQL) = "VARCHAR (20)" NewColumns5(10, ConstraintAccess) = "NOT NULL" NewColumns5(10, ConstraintSQL6) = "NOT NULL CONSTRAINT " & strTablePrefix & "SnitzC1027 DEFAULT ''" NewColumns5(10, ConstraintSQL7) = "NOT NULL CONSTRAINT " & strTablePrefix & "SnitzC1027 DEFAULT ''" NewColumns5(10, ConstraintMySQL) = "DEFAULT '' NOT NULL" NewColumns5(12, Prefix) = strTablePrefix NewColumns5(12, FieldName) = "F_DELETE_SCHED" NewColumns5(12, TableName) = "FORUM" NewColumns5(12, DataType_Access) = "INT" NewColumns5(12, DataType_SQL6) = "INT" NewColumns5(12, DataType_SQL7) = "INT" NewColumns5(12, DataType_MySQL) = "INT" NewColumns5(12, ConstraintAccess) = "NOT NULL" NewColumns5(12, ConstraintSQL6) = "NOT NULL CONSTRAINT " & strTablePrefix & "SnitzC1028 DEFAULT 365" NewColumns5(12, ConstraintSQL7) = "NOT NULL CONSTRAINT " & strTablePrefix & "SnitzC1028 DEFAULT 365" NewColumns5(12, ConstraintMySQL) = "DEFAULT '365' NOT NULL" call AddColumns(NewColumns5, intCriticalErrors, intWarnings) '## for Access we need to update the existing records ! if strDBType = "access" then UpDateAccessFields(OldVersion) '## now transfer the config info from CONFIG to CONFIG_NEW TransferOldConfig end if '########################################################################### '## '## Setup for update 6 / to version 3.3.03 '## '########################################################################### if (OldVersion <= 6) then Dim NewColumns6(4,11) NewColumns6(1, Prefix) = strTablePrefix NewColumns6(1, FieldName) = "F_A_COUNT" NewColumns6(1, TableName) = "FORUM" NewColumns6(1, DataType_Access) = "INT" NewColumns6(1, DataType_SQL6) = "INT" NewColumns6(1, DataType_SQL7) = "INT" NewColumns6(1, DataType_MySQL) = "INT" NewColumns6(1, ConstraintAccess) = " NULL" NewColumns6(1, ConstraintSQL6) = " NULL" NewColumns6(1, ConstraintSQL7) = " NULL" NewColumns6(1, ConstraintMySQL) = " NULL" NewColumns6(2, Prefix) = strTablePrefix NewColumns6(2, FieldName) = "F_A_TOPICS" NewColumns6(2, TableName) = "FORUM" NewColumns6(2, DataType_Access) = "INT" NewColumns6(2, DataType_SQL6) = "INT" NewColumns6(2, DataType_SQL7) = "INT" NewColumns6(2, DataType_MySQL) = "INT" NewColumns6(2, ConstraintAccess) = " NULL" NewColumns6(2, ConstraintSQL6) = " NULL" NewColumns6(2, ConstraintSQL7) = " NULL" NewColumns6(2, ConstraintMySQL) = " NULL" NewColumns6(3, Prefix) = strTablePrefix NewColumns6(3, FieldName) = "T_A_COUNT" NewColumns6(3, TableName) = "TOTALS" NewColumns6(3, DataType_Access) = "INT" NewColumns6(3, DataType_SQL6) = "INT" NewColumns6(3, DataType_SQL7) = "INT" NewColumns6(3, DataType_MySQL) = "INT" NewColumns6(3, ConstraintAccess) = " NULL" NewColumns6(3, ConstraintSQL6) = " NULL" NewColumns6(3, ConstraintSQL7) = " NULL" NewColumns6(3, ConstraintMySQL) = " NULL" NewColumns6(4, Prefix) = strTablePrefix NewColumns6(4, FieldName) = "P_A_COUNT" NewColumns6(4, TableName) = "TOTALS" NewColumns6(4, DataType_Access) = "INT" NewColumns6(4, DataType_SQL6) = "INT" NewColumns6(4, DataType_SQL7) = "INT" NewColumns6(4, DataType_MySQL) = "INT" NewColumns6(4, ConstraintAccess) = " NULL" NewColumns6(4, ConstraintSQL6) = " NULL" NewColumns6(4, ConstraintSQL7) = " NULL" NewColumns6(4, ConstraintMySQL) = " NULL" call AddColumns(NewColumns6, intCriticalErrors, intWarnings) '## Drop FORUM_A_TOPICS and recreate if needed '## Drop FORUM_A_REPLY and recreate if needed Dim SpecialSql6(4) strSql = "SELECT * FROM " & strTablePrefix & "A_TOPICS" set rs = my_Conn.Execute(strSql) if rs.eof then rs.close my_Conn.Execute("DROP TABLE " & strTablePrefix & "A_TOPICS") SpecialSql6(Access) = "CREATE TABLE " & strTablePrefix & "A_TOPICS ( " SpecialSql6(Access) = SpecialSql6(Access) & "CAT_ID int NOT NULL , " SpecialSql6(Access) = SpecialSql6(Access) & "FORUM_ID int NOT NULL , " SpecialSql6(Access) = SpecialSql6(Access) & "TOPIC_ID int NOT NULL , " SpecialSql6(Access) = SpecialSql6(Access) & "T_STATUS smallint NULL , " SpecialSql6(Access) = SpecialSql6(Access) & "T_MAIL smallint NULL , " SpecialSql6(Access) = SpecialSql6(Access) & "T_SUBJECT varchar (100) NULL , " SpecialSql6(Access) = SpecialSql6(Access) & "T_MESSAGE text NULL , " SpecialSql6(Access) = SpecialSql6(Access) & "T_AUTHOR int NULL , " SpecialSql6(Access) = SpecialSql6(Access) & "T_REPLIES int NULL , " SpecialSql6(Access) = SpecialSql6(Access) & "T_VIEW_COUNT int NULL , " SpecialSql6(Access) = SpecialSql6(Access) & "T_LAST_POST varchar (50) NULL , " SpecialSql6(Access) = SpecialSql6(Access) & "T_DATE varchar (50) NULL, " SpecialSql6(Access) = SpecialSql6(Access) & "T_LAST_POSTER int NULL, " SpecialSql6(Access) = SpecialSql6(Access) & "T_IP varchar (50) NULL, " SpecialSql6(Access) = SpecialSql6(Access) & "T_LAST_POST_AUTHOR int NULL ) " SpecialSql6(SQL6) = "CREATE TABLE " & strTablePrefix & "A_TOPICS ( " SpecialSql6(SQL6) = SpecialSql6(SQL6) & "CAT_ID int NOT NULL , " SpecialSql6(SQL6) = SpecialSql6(SQL6) & "FORUM_ID int NOT NULL , " SpecialSql6(SQL6) = SpecialSql6(SQL6) & "TOPIC_ID int NOT NULL , " SpecialSql6(SQL6) = SpecialSql6(SQL6) & "T_STATUS smallint NULL , " SpecialSql6(SQL6) = SpecialSql6(SQL6) & "T_MAIL smallint NULL , " SpecialSql6(SQL6) = SpecialSql6(SQL6) & "T_SUBJECT varchar (100) NULL , " SpecialSql6(SQL6) = SpecialSql6(SQL6) & "T_MESSAGE text NULL , " SpecialSql6(SQL6) = SpecialSql6(SQL6) & "T_AUTHOR int NULL , " SpecialSql6(SQL6) = SpecialSql6(SQL6) & "T_REPLIES int NULL , " SpecialSql6(SQL6) = SpecialSql6(SQL6) & "T_VIEW_COUNT int NULL , " SpecialSql6(SQL6) = SpecialSql6(SQL6) & "T_LAST_POST varchar (50) NULL , " SpecialSql6(SQL6) = SpecialSql6(SQL6) & "T_DATE varchar (50) NULL, " SpecialSql6(SQL6) = SpecialSql6(SQL6) & "T_LAST_POSTER int NULL, " SpecialSql6(SQL6) = SpecialSql6(SQL6) & "T_IP varchar (50) NULL, " SpecialSql6(SQL6) = SpecialSql6(SQL6) & "T_LAST_POST_AUTHOR int NULL ) " SpecialSql6(SQL7) = "CREATE TABLE " & strTablePrefix & "A_TOPICS ( " SpecialSql6(SQL7) = SpecialSql6(SQL7) & "CAT_ID int NOT NULL , " SpecialSql6(SQL7) = SpecialSql6(SQL7) & "FORUM_ID int NOT NULL , " SpecialSql6(SQL7) = SpecialSql6(SQL7) & "TOPIC_ID int NOT NULL , " SpecialSql6(SQL7) = SpecialSql6(SQL7) & "T_STATUS smallint NULL , " SpecialSql6(SQL7) = SpecialSql6(SQL7) & "T_MAIL smallint NULL , " SpecialSql6(SQL7) = SpecialSql6(SQL7) & "T_SUBJECT varchar (100) NULL , " SpecialSql6(SQL7) = SpecialSql6(SQL7) & "T_MESSAGE text NULL , " SpecialSql6(SQL7) = SpecialSql6(SQL7) & "T_AUTHOR int NULL , " SpecialSql6(SQL7) = SpecialSql6(SQL7) & "T_REPLIES int NULL , " SpecialSql6(SQL7) = SpecialSql6(SQL7) & "T_VIEW_COUNT int NULL , " SpecialSql6(SQL7) = SpecialSql6(SQL7) & "T_LAST_POST varchar (50) NULL , " SpecialSql6(SQL7) = SpecialSql6(SQL7) & "T_DATE varchar (50) NULL, " SpecialSql6(SQL7) = SpecialSql6(SQL7) & "T_LAST_POSTER int NULL, " SpecialSql6(SQL7) = SpecialSql6(SQL7) & "T_IP varchar (50) NULL, " SpecialSql6(SQL7) = SpecialSql6(SQL7) & "T_LAST_POST_AUTHOR int NULL ) " SpecialSql6(MySql) = "CREATE TABLE " & strTablePrefix & "A_TOPICS ( " SpecialSql6(MySql) = SpecialSql6(MySql) & "CAT_ID int (11) DEFAULT '1' NOT NULL , " SpecialSql6(MySql) = SpecialSql6(MySql) & "FORUM_ID int (11) DEFAULT '1' NOT NULL , " SpecialSql6(MySql) = SpecialSql6(MySql) & "TOPIC_ID int (11) DEFAULT '' NOT NULL, " SpecialSql6(MySql) = SpecialSql6(MySql) & "T_STATUS smallint (6) DEFAULT '1' , " SpecialSql6(MySql) = SpecialSql6(MySql) & "T_MAIL smallint (6) DEFAULT '0' , " SpecialSql6(MySql) = SpecialSql6(MySql) & "T_SUBJECT VARCHAR (100) DEFAULT '' , " SpecialSql6(MySql) = SpecialSql6(MySql) & "T_MESSAGE text , " SpecialSql6(MySql) = SpecialSql6(MySql) & "T_AUTHOR int (11) DEFAULT '1' , " SpecialSql6(MySql) = SpecialSql6(MySql) & "T_REPLIES int (11) DEFAULT '0' , " SpecialSql6(MySql) = SpecialSql6(MySql) & "T_VIEW_COUNT int (11) DEFAULT '0' , " SpecialSql6(MySql) = SpecialSql6(MySql) & "T_LAST_POST VARCHAR (50) DEFAULT '' , " SpecialSql6(MySql) = SpecialSql6(MySql) & "T_DATE VARCHAR (50) DEFAULT '', " SpecialSql6(MySql) = SpecialSql6(MySql) & "T_LAST_POSTER int (11) DEFAULT '1', " SpecialSql6(MySql) = SpecialSql6(MySql) & "T_IP VARCHAR (50) DEFAULT '000.000.000.000', " SpecialSql6(MySql) = SpecialSql6(MySql) & "T_LAST_POST_AUTHOR int (11) DEFAULT '1', " SpecialSql6(MySql) = SpecialSql6(MySql) & "PRIMARY KEY (CAT_ID, FORUM_ID, TOPIC_ID), " SpecialSql6(MySql) = SpecialSql6(MySql) & "KEY " & strTablePrefix & "A_TOPIC_CATFORTOP(CAT_ID,FORUM_ID,TOPIC_ID), " SpecialSql6(MySql) = SpecialSql6(MySql) & "KEY " & strTablePrefix & "A_TOPIC_CAT_ID(CAT_ID), " SpecialSql6(MySql) = SpecialSql6(MySql) & "KEY " & strTablePrefix & "A_TOPIC_FORUM_ID(FORUM_ID), " SpecialSql6(MySql) = SpecialSql6(MySql) & "KEY " & strTablePrefix & "A_TOPIC_TOPIC_ID (TOPIC_ID) )" strOkMessage = "Table A_TOPICS re-created " call SpecialUpdates(SpecialSql6, strOkMessage) Response.Flush else rs.close end if strSql = "SELECT * FROM " & strTablePrefix & "A_REPLY" set rs = my_Conn.Execute(strSql) if rs.eof then rs.close my_Conn.Execute("DROP TABLE " & strTablePrefix & "A_REPLY") SpecialSql6(Access) = "CREATE TABLE " & strTablePrefix & "A_REPLY ( " SpecialSql6(Access) = SpecialSql6(Access) & "CAT_ID int NOT NULL , " SpecialSql6(Access) = SpecialSql6(Access) & "FORUM_ID int NOT NULL , " SpecialSql6(Access) = SpecialSql6(Access) & "TOPIC_ID int NOT NULL , " SpecialSql6(Access) = SpecialSql6(Access) & "REPLY_ID int NOT NULL , " SpecialSql6(Access) = SpecialSql6(Access) & "R_STATUS smallint NULL , " SpecialSql6(Access) = SpecialSql6(Access) & "R_MAIL smallint NULL , " SpecialSql6(Access) = SpecialSql6(Access) & "R_AUTHOR int NULL , " SpecialSql6(Access) = SpecialSql6(Access) & "R_MESSAGE text NULL , " SpecialSql6(Access) = SpecialSql6(Access) & "R_DATE varchar (50) NULL , " SpecialSql6(Access) = SpecialSql6(Access) & "R_IP varchar (50) NULL ) " SpecialSql6(SQL6) = "CREATE TABLE " & strTablePrefix & "A_REPLY ( " SpecialSql6(SQL6) = SpecialSql6(SQL6) & "CAT_ID int NOT NULL , " SpecialSql6(SQL6) = SpecialSql6(SQL6) & "FORUM_ID int NOT NULL , " SpecialSql6(SQL6) = SpecialSql6(SQL6) & "TOPIC_ID int NOT NULL , " SpecialSql6(SQL6) = SpecialSql6(SQL6) & "REPLY_ID int NOT NULL , " SpecialSql6(SQL6) = SpecialSql6(SQL6) & "R_MAIL smallint NULL , " SpecialSql6(SQL6) = SpecialSql6(SQL6) & "R_STATUS smallint NULL , " SpecialSql6(SQL6) = SpecialSql6(SQL6) & "R_AUTHOR int NULL , " SpecialSql6(SQL6) = SpecialSql6(SQL6) & "R_MESSAGE text NULL , " SpecialSql6(SQL6) = SpecialSql6(SQL6) & "R_DATE varchar (50) NULL , " SpecialSql6(SQL6) = SpecialSql6(SQL6) & "R_IP varchar (50) NULL ) " SpecialSql6(SQL7) = "CREATE TABLE " & strTablePrefix & "A_REPLY ( " SpecialSql6(SQL7) = SpecialSql6(SQL7) & "CAT_ID int NOT NULL , " SpecialSql6(SQL7) = SpecialSql6(SQL7) & "FORUM_ID int NOT NULL , " SpecialSql6(SQL7) = SpecialSql6(SQL7) & "TOPIC_ID int NOT NULL , " SpecialSql6(SQL7) = SpecialSql6(SQL7) & "REPLY_ID int NOT NULL , " SpecialSql6(SQL7) = SpecialSql6(SQL7) & "R_STATUS smallint NULL , " SpecialSql6(SQL7) = SpecialSql6(SQL7) & "R_MAIL smallint NULL , " SpecialSql6(SQL7) = SpecialSql6(SQL7) & "R_AUTHOR int NULL , " SpecialSql6(SQL7) = SpecialSql6(SQL7) & "R_MESSAGE text NULL , " SpecialSql6(SQL7) = SpecialSql6(SQL7) & "R_DATE varchar (50) NULL , " SpecialSql6(SQL7) = SpecialSql6(SQL7) & "R_IP varchar (50) NULL ) " SpecialSql6(MySql) = "CREATE TABLE " & strTablePrefix & "A_REPLY ( " SpecialSql6(MySql) = SpecialSql6(MySql) & "CAT_ID int (11) DEFAULT '1' NOT NULL , " SpecialSql6(MySql) = SpecialSql6(MySql) & "FORUM_ID int (11) DEFAULT '1' NOT NULL , " SpecialSql6(MySql) = SpecialSql6(MySql) & "TOPIC_ID int (11) DEFAULT '1' NOT NULL , " SpecialSql6(MySql) = SpecialSql6(MySql) & "REPLY_ID int (11) DEFAULT '' NOT NULL , " SpecialSql6(MySql) = SpecialSql6(MySql) & "R_STATUS smallint (6) DEFAULT '1' , " SpecialSql6(MySql) = SpecialSql6(MySql) & "R_AUTHOR int (11) DEFAULT '1' , " SpecialSql6(MySql) = SpecialSql6(MySql) & "R_MESSAGE text , " SpecialSql6(MySql) = SpecialSql6(MySql) & "R_DATE VARCHAR (50) DEFAULT '' , " SpecialSql6(MySql) = SpecialSql6(MySql) & "R_IP VARCHAR (50) DEFAULT '000.000.000.000', " SpecialSql6(MySql) = SpecialSql6(MySql) & "PRIMARY KEY (CAT_ID, FORUM_ID, TOPIC_ID, REPLY_ID), " SpecialSql6(MySql) = SpecialSql6(MySql) & "KEY " & strTablePrefix & "A_REPLY_CATFORTOPREPL(CAT_ID,FORUM_ID,TOPIC_ID, REPLY_ID), " SpecialSql6(MySql) = SpecialSql6(MySql) & "KEY " & strTablePrefix & "A_REPLY_REP_ID(REPLY_ID), " SpecialSql6(MySql) = SpecialSql6(MySql) & "KEY " & strTablePrefix & "A_REPLY_CAT_ID(CAT_ID), " SpecialSql6(MySql) = SpecialSql6(MySql) & "KEY " & strTablePrefix & "A_REPLY_FORUM_ID(FORUM_ID), " SpecialSql6(MySql) = SpecialSql6(MySql) & "KEY " & strTablePrefix & "A_REPLY_TOPIC_ID (TOPIC_ID) )" strOkMessage = "Table A_REPLY re-created " call SpecialUpdates(SpecialSql6, strOkMessage) Response.Flush else rs.close '## Add the missing R_STATUS field to the Access database if strDBType = "access" then strSql = "ALTER TABLE " & strTablePrefix & "A_REPLY " strSql = strSql & "ADD R_STATUS smallint NULL " on error resume next my_Conn.Errors.Clear my_Conn.Execute (strSql) Response.Write("") UpdateErrorCode = UpdateErrorCheck() on error goto 0 if UpdateErrorCode = 0 then Response.Write("") elseif UpdateErrorCode = 1 then Response.Write("") intWarnings = intWarnings + 1 elseif UpdateErrorCode = 2 then Response.Write("") intCriticalErrors = intCriticalErrors + 1 else Response.Write("") intCriticalErrors = intCriticalErrors + 1 end if Response.Write("
Upgraded: R_STATUS field added to " & strTablePrefix & "A_REPLY
Noncritical error: R_STATUS allready existed in " & strTablePrefix & "A_REPLY
Critical error: No write access to the table " & strTablePrefix & "A_REPLY
R_STATUS not added to database!
Critical error: code: " & Hex(UpdateErrorCode) & " in statement [" & strUpdateSql & "] while trying to add R_STATUS to " & strTablePrefix & "A_REPLY
") end if end if set rs = nothing '## Add the missing config-values to the database if needed strDummy = SetConfigValue(0,"STRSUBSCRIPTION", "1") strDummy = SetConfigValue(0,"STRMODERATION", "1") '## update the status of archived replies... strSql = "UPDATE " & strTablePrefix & "A_REPLY " strSql = strSql & " SET R_STATUS = 0 " strSql = strSql & " WHERE (R_STATUS IS NULL)" on error resume next my_Conn.Errors.Clear my_Conn.Execute (strSql) Response.Write("") UpdateErrorCode = UpdateErrorCheck() on error goto 0 if UpdateErrorCode = 0 then Response.Write("") else Response.Write("") intCriticalErrors = intCriticalErrors + 1 end if Response.Write("
Upgraded: Status of archived replies updated
Critical error: code: " & Hex(UpdateErrorCode) & " while trying to update the status of the archived replies
") '## update the version info... strDummy = SetConfigValue(1,"strVersion", strNewVersion) '## make sure the string is there strSql = "UPDATE " & strTablePrefix & "CONFIG_NEW " strSql = strSql & " SET C_VALUE = '" & strNewVersion & "'" strSql = strSql & " WHERE C_VARIABLE = 'STRVERSION'" on error resume next my_Conn.Errors.Clear my_Conn.Execute (strSql) Response.Write("") UpdateErrorCode = UpdateErrorCheck() on error goto 0 if UpdateErrorCode = 0 then Response.Write("") elseif UpdateErrorCode = 2 then Response.Write("") intCriticalErrors = intCriticalErrors + 1 else Response.Write("") intCriticalErrors = intCriticalErrors + 1 end if Response.Write("
Upgraded: Added default values for new fields in CONFIG table
Critical error: Can't add default values for new fields in CONFIG table!
Critical error: code: " & false & " while trying to add default values to the CONFIG table
") Response.Flush end if my_Conn.Close set my_Conn = nothing if intCriticalErrors = 0 then %>

The Upgrade has been completed without errors !

<% else %>

The Upgrade has NOT been completed without errors !

There were <%=intCriticalErrors %> Critical Errors...

<% if intWarnings > 0 then %>

There were <%=intWarnings %> noncritical errors...

<% end if end if if intCriticalErrors > 0 then %>

Click here to retry....

<% end if %>

Click here to return to the forum....

<% Application(strCookieURL & "ConfigLoaded")= "" else Response.Redirect "setup_login.asp" end if elseif ResponseCode = 5 then '## install a new database if strDBType = "access" then '## install is not available for Access ! Response.Redirect "setup.asp" else %>

Installation of forum-tables in the database.

<% if strDBType = "sqlserver" then %>

Select the SQL-server version you are using:

SQL-Server 6.5
SQL-Server 7 / 2000   

<% end if %>

To install the tables in the database you need to create the empty database on the server first.
Then you have to provide a username and password of a user that has table creation/modification rights at the database you use.
This might not be the same user as you use in your connectionstring !

Name:     
Password:

<% end if elseif ResponseCode = 6 then '## start installing the tables in the database if strDBType = "access" Then '## install is not available for access ! Response.Redirect "setup.asp" else 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 = my_Conn.Errors(counter).Number if ConnErrorNumber <> 0 then my_Conn.Errors.Clear Response.Redirect "Setup.asp?RC=1&EC=" & ConnErrorNumber end if next my_Conn.Errors.Clear '## Forum_SQL strSql = "SELECT MEMBER_ID " strSql = strSql & " FROM " & strMemberTablePrefix & "MEMBERS " strSql = strSql & " WHERE M_LEVEL = 3" Set rs = my_Conn.Execute(strSql) blnError = FALSE for counter = 0 to my_Conn.Errors.Count -1 ConnErrorNumber = my_Conn.Errors(counter).Number if ConnErrorNumber <> 0 then my_Conn.Errors.Clear blnError = TRUE end if next If not(blnError) then if (not(rs.BOF or rs.EOF) and (Session(strCookieURL & "Approval") <> "15916941253") ) then %>

You need to logon first.

<% Response.end end if end if rs.close Set rs = nothing my_Conn.Errors.Clear on error goto 0 %>

Please Wait until the installation has been completed !

<% strInstallString = CreateConnectionString(strConnString, Request.Form("DBUserName"), Request.Form("DBPassword")) on error resume next set my_Conn = Server.CreateObject("ADODB.Connection") my_Conn.Open strInstallString for counter = 0 to my_Conn.Errors.Count -1 ConnErrorNumber = my_Conn.Errors(counter).Number if ConnErrorNumber <> 0 then my_Conn.Errors.Clear Response.Redirect "setup.asp?RC=1&EC=" & ConnErrorNumber & "&RET=" & Server.URLEncode("setup.asp?RC=5") end if next on error goto 0 intCriticalErrors = 0 %>

To Re-install the tables you need to be logged on as a forum administrator.
<% if strSender <> "" then %> If you are not the Administrator of this forum
please report this error here: <% =strSender %>.

<% end if %>

Admin Login
UserName:
Password:
<% strSQL_Server = Request.Form("Sql_Server") if strDBType = "mysql" then %> <% elseif strDBType = "sqlserver" then if strSQL_Server = "SQL6" then %> <% else %> <% end if end if %>
<% my_Conn.Close set my_Conn = nothing if intCriticalErrors = 0 then %>

The Installation has been completed !

<% else %>

The Installation has NOT been completed !

There were <%=intCriticalErrors %> Critical Errors...

<% end if if intCriticalErrors > 0 then %>

Click here to retry....

<% end if %>

Click here to check the Database....

<% end if else %> Setup page
There has been an error !!
<% Response.Write(HEX(Err.number) & ", " & Err.description) %>
Click here to retry.
<% End if %> <% sub CheckSqlError() dim ChkConnErrorNumber for counter = 0 to my_Conn.Errors.Count -1 ChkConnErrorNumber = my_Conn.Errors(counter).Number if ChkConnErrorNumber <> 0 or Err.number > 0 then my_Conn.Errors.Clear Err.Clear strSql = "SELECT " & strTablePrefix & "CONFIG.C_STRVERSION, " strSql = strSql & strTablePrefix & "CONFIG.C_STRSENDER " strSql = strSql & " FROM " & strTablePrefix & "CONFIG " set rsInfo = my_Conn.Execute (StrSql) strVersion = rsInfo("C_STRVERSION") strSender = rsInfo("C_STRSENDER") rsInfo.Close set rsInfo = nothing my_Conn.Close set my_Conn = nothing Response.Redirect "setup.asp?RC=2&MAIL=" & Server.UrlEncode(strSender) & "&VER=" & Server.URLEncode(strVersion) & "&EC=" & ChkConnErrorNumber end if next end sub function UpdateErrorCheck() dim intErrorNumber dim counter intErrorNumber = 0 for counter = 0 to my_Conn.Errors.Count -1 intErrorNumber = my_Conn.Errors(counter).Number if intErrorNumber <> 0 then select case intErrorNumber case -2147217900 UpdateErrorCheck = 1 counter = my_Conn.Errors.Count -1 case -2147467259 UpdateErrorCheck = 2 counter = my_Conn.Errors.Count -1 case else UpdateErrorCheck = intErrorNumber end select end if next end function Sub AddColumns(Columns, intCriticalErrors, intWarnings) Dim colCounter Response.Write("") For colCounter = 0 to Ubound(Columns, 1) on error resume next my_Conn.Errors.Clear strUpdateSql = "ALTER TABLE " & Columns(colCounter, Prefix) & Columns(colCounter, TableName) & " " strUpdateSql = strUpdateSql & " ADD " & Columns(colCounter, FieldName) & " " if strDBType = "access" then strUpdateSql = strUpdateSql & " " & Columns(colCounter, DataType_Access) & " " & Columns(colCounter, ConstraintAccess) & " ; " elseif strDBType = "sqlserver" then if strSQL_Server = "SQL7" then strUpdateSql = strUpdateSql & " " & Columns(colCounter, DataType_SQL7) & " " & Columns(colCounter, ConstraintSQL7) & " ; " else strUpdateSql = strUpdateSql & " " & Columns(colCounter, DataType_SQL6) & " " & Columns(colCounter, ConstraintSQL6) & " ; " end if elseif strDBType = "mysql" then strUpdateSql = strUpdateSql & " " & Columns(colCounter, DataType_MySql) & " " & Columns(colCounter, ConstraintMySql) & " " end if my_Conn.Execute strUpdateSql UpdateErrorCode = UpdateErrorCheck() on error goto 0 if UpdateErrorCode = 0 then Response.Write("") elseif UpdateErrorCode = 1 then Response.Write("") intWarnings = intWarnings + 1 elseif UpdateErrorCode = 2 then Response.Write("") intCriticalErrors = intCriticalErrors + 1 else Response.Write("") intCriticalErrors = intCriticalErrors + 1 end if Response.Flush Next Response.Write("
Upgraded:" & Columns(colCounter, FieldName) & " has been added to the " & Columns(colCounter, TableName) & " table
Noncritical error: " & Columns(colCounter, Fieldname) & " allready existed in the " & Columns(colCounter, TableName) & " table
Critical error: No write access to the table " & Columns(colCounter, TableName) & "
" & Columns(colCounter, Fieldname) & " not added to database!
Critical error: code: " & Hex(UpdateErrorCode) & " in statement [" & strUpdateSql & "] while trying to add " & Columns(colCounter, Fieldname) & " to the " & Columns(colCounter, TableName) & " table
") end sub sub SpecialUpdates(strSql, strOkMessage) dim strUpdateSql dim SpecialErrors on error resume next my_Conn.Errors.Clear if strDBType = "access" then strUpdateSql = strSql(Access) elseif strDBType = "sqlserver" then if strSQL_Server = "SQL7" then strUpdateSql = strSql(SQL7) else strUpdateSql = strSql(SQL6) end if elseif strDBType = "mysql" then strUpdateSql = strSql(MySql) end if my_Conn.Execute strUpdateSql SpecialErrors = 0 Response.Write("") for counter = 0 to my_Conn.Errors.Count -1 ConnErrorNumber = my_Conn.Errors(counter).Number ConnErrorDescription = my_Conn.Errors(counter).Description if ConnErrorNumber <> 0 then if ConnErrorNumber = -2147217900 then Response.Write("") Response.Write("") Response.Write("") Response.Write("") intWarnings = intWarnings + 1 SpecialErrors = 1 else Response.Write("") Response.Write("") Response.Write("") Response.Write("") intCriticalErrors = intCriticalErrors + 1 SpecialErrors = 1 end if end if next if SpecialErrors = 0 then Response.Write("") Response.Write("") end if Response.Write("
Error: " & Hex(ConnErrorNumber) & "" & ConnErrorDescription & "
strUpdateSql: " & strUpdateSql & "
Error: " & Hex(ConnErrorNumber) & "" & ConnErrorDescription & "
strUpdateSql: " & strUpdateSql & "
Upgraded: " & strOkMessage & "
") Response.Flush my_Conn.Errors.Clear on error goto 0 end sub Function CreateConnectionString(strConn, UserName, Password) '## strConnString = "driver={SQL Server};server=YYYY;uid=XX;pwd=XXXX;database=ZZZZZZ" '## strConnString = "driver={SQL Server};server=YYYY;USER ID=XX;PASSWORD=XXXX;database=ZZZZZZ" Dim TempConnString Dim uidTagStart(1), uidTagEnd Dim pwdTagStart(1), pwdTagEnd Dim uidTagStartPos, uidTagEndPos Dim pwdTagStartPos, pwdTagEndPos Dim blnUIDok, blnPWDok uidTagStart(0) = "UID=" uidTagStart(1) = "USER ID=" uidTagEnd = ";" pwdTagStart(0) = "PWD=" pwdTagStart(1) = "PASSWORD=" pwdTagEnd = ";" TempConnString = strConn blnUIDok = FALSE blnPWDok = FALSE for Counter = 0 to Ubound(uidTagStart) uidTagStartPos = InStr(1, UCase(TempConnString), UCase(uidTagStart(Counter)), 1) if uidTagStartPos > 0 then uidTagEndPos = InStr(uidTagStartPos, UCase(TempConnString), UCase(uidTagEnd), 1) else uidTagEndPos = 0 end if if (uidTagStartpos > 0) and (uidTagEndPos > 0) then TempConnString = Left(TempConnString, (uidTagStartPos + len(uidTagStart(Counter))-1)) & UserName & Right(TempConnString, (len(TempConnString) - uidTagEndPos) + 1) blnUIDok = TRUE end if pwdTagStartPos = InStr(1, TempConnString, pwdTagStart(Counter), 1) if pwdTagStartPos > 0 then pwdTagEndPos = InStr(pwdTagStartPos, TempConnString, pwdTagEnd, 1) else pwdTagEndPos = 0 end if if (pwdTagStartpos > 0) and (pwdTagEndPos > 0) then TempConnString = Left(TempConnString, (pwdTagStartPos + len(pwdTagStart(Counter))-1)) & Password & Right(TempConnString, (len(TempConnString) - pwdTagEndPos) + 1) blnPWDok = TRUE end if next if blnUIDok and blnPWDok then CreateConnectionString = TempConnString else CreateConnectionString = "" end if end function Sub TransferOldConfig on error resume next strSql = "SELECT * FROM " & strTablePrefix & "CONFIG WHERE CONFIG_ID = " & 1 set rs = my_Conn.Execute(strSql) Response.Write("") UpdateErrorCode = UpdateErrorCheck() if UpdateErrorCode = 0 then if not(rs.eof) then strDummy = SetConfigValue(0,"STRVERSION", rs("C_STRVERSION")) strDummy = SetConfigValue(0,"STRFORUMTITLE", rs("C_STRFORUMTITLE")) strDummy = SetConfigValue(0,"STRCOPYRIGHT" , rs("C_STRCOPYRIGHT")) strDummy = SetConfigValue(0,"STRTITLEIMAGE", rs("C_STRTITLEIMAGE")) strDummy = SetConfigValue(0,"STRHOMEURL", rs("C_STRHOMEURL")) strDummy = SetConfigValue(0,"STRFORUMURL", rs("C_STRFORUMURL")) strDummy = SetConfigValue(0,"STRAUTHTYPE", rs("C_STRAUTHTYPE")) strDummy = SetConfigValue(0,"STRSETCOOKIETOFORUM", rs("C_STRSETCOOKIETOFORUM")) strDummy = SetConfigValue(0,"STREMAIL", rs("C_STREMAIL")) strDummy = SetConfigValue(0,"STRUNIQUEEMAIL", rs("C_STRUNIQUEEMAIL")) strDummy = SetConfigValue(0,"STRMAILMODE", rs("C_STRMAILMODE")) strDummy = SetConfigValue(0,"STRMAILSERVER", rs("C_STRMAILSERVER")) strDummy = SetConfigValue(0,"STRSENDER", rs("C_STRSENDER")) strDummy = SetConfigValue(0,"STRDATETYPE", rs("C_STRDATETYPE")) strDummy = SetConfigValue(0,"STRTIMETYPE", rs("C_STRTIMETYPE")) strDummy = SetConfigValue(0,"STRTIMEADJUSTLOCATION", rs("C_STRTIMEADJUSTLOCATION")) strDummy = SetConfigValue(0,"STRTIMEADJUST", rs("C_STRTIMEADJUST")) strDummy = SetConfigValue(0,"STRMOVETOPICMODE", rs("C_STRMOVETOPICMODE")) strDummy = SetConfigValue(0,"STRPRIVATEFORUMS", rs("C_STRPRIVATEFORUMS")) strDummy = SetConfigValue(0,"STRHOWMODERATORS", rs("C_STRSHOWMODERATORS")) strDummy = SetConfigValue(0,"STRSHOWRANK", rs("C_STRSHOWRANK")) strDummy = SetConfigValue(0,"STRHIDEEMAIL", rs("C_STRHIDEEMAIL")) strDummy = SetConfigValue(0,"STRIPLOGGING", rs("C_STRIPLOGGING")) strDummy = SetConfigValue(0,"STRALLOWFORUMCODE", rs("C_STRALLOWFORUMCODE")) strDummy = SetConfigValue(0,"STRIMGINPOST", rs("C_STRIMGINPOSTS") ) strDummy = SetConfigValue(0,"STRALLOWHTML", rs("C_STRALLOWHTML")) strDummy = SetConfigValue(0,"STRSECUREADMIN", rs("C_STRSECUREADMIN")) strDummy = SetConfigValue(0,"STRNOCOOKIES", rs("C_STRNOCOOKIES")) strDummy = SetConfigValue(0,"STREDITEDBYDATE", rs("C_STREDITEDBYDATE")) strDummy = SetConfigValue(0,"STRHOTTOPIC", rs("C_STRHOTTOPIC")) strDummy = SetConfigValue(0,"INTHOTTOPICNUM", rs("C_INTHOTTOPICNUM")) strDummy = SetConfigValue(0,"STRHOMEPAGE", rs("C_STRHOMEPAGE")) strDummy = SetConfigValue(0,"STRAIM", rs("C_STRAIM")) strDummy = SetConfigValue(0,"STRYAHOO", rs("C_STRYAHOO")) strDummy = SetConfigValue(0,"STRICQ", rs("C_STRICQ")) strDummy = SetConfigValue(0,"STRICONS", rs("C_STRICONS")) strDummy = SetConfigValue(0,"STRGFXBUTTONS", rs("C_STRGFXBUTTONS")) strDummy = SetConfigValue(0,"STRBADWODFILTER", rs("C_STRBADWORDFILTER")) strDummy = SetConfigValue(0,"STRBADWORDS", rs("C_STRBADWORDS")) strDummy = SetConfigValue(0,"STRDEFAULTFONTFACE", rs("C_STRDEFAULTFONTFACE")) strDummy = SetConfigValue(0,"STRDEFAULTFONTSIZE ", rs("C_STRDEFAULTFONTSIZE")) strDummy = SetConfigValue(0,"STRHEADERFONTSIZE", rs("C_STRHEADERFONTSIZE")) strDummy = SetConfigValue(0,"STRFOOTERFONTSIZE", rs("C_STRFOOTERFONTSIZE")) strDummy = SetConfigValue(0,"STRPAGEBGCOLOR", rs("C_STRPAGEBGCOLOR")) strDummy = SetConfigValue(0,"STRDEFAULTFONTCOLOR", rs("C_STRDEFAULTFONTCOLOR")) strDummy = SetConfigValue(0,"STRLINKCOLOR", rs("C_STRLINKCOLOR")) strDummy = SetConfigValue(0,"STRLINKTEXTDECORATION", rs("C_STRLINKTEXTDECORATION")) strDummy = SetConfigValue(0,"STRVISITEDLINKCOLOR", rs("C_STRVISITEDLINKCOLOR")) strDummy = SetConfigValue(0,"STRVISITEDTEXTDECORATION", rs("C_STRVISITEDTEXTDECORATION")) strDummy = SetConfigValue(0,"STRACTIVELINKCOLOR", rs("C_STRACTIVELINKCOLOR")) strDummy = SetConfigValue(0,"STRHOVERFONTCOLOR", rs("C_STRHOVERFONTCOLOR")) strDummy = SetConfigValue(0,"STRHOVERTEXTDECORATION", rs("C_STRHOVERTEXTDECORATION")) strDummy = SetConfigValue(0,"STRHEADCELLCOLOR", rs("C_STRHEADCELLCOLOR")) strDummy = SetConfigValue(0,"STRHEADFONTCOLOR", rs("C_STRHEADFONTCOLOR")) strDummy = SetConfigValue(0,"STRCATEGORYCELLCOLOR", rs("C_STRCATEGORYCELLCOLOR")) strDummy = SetConfigValue(0,"STRCATEGORYFONTCOLOR", rs("C_STRCATEGORYFONTCOLOR")) strDummy = SetConfigValue(0,"STRFORUMFIRSTCELLCOLOR", rs("C_STRFORUMFIRSTCELLCOLOR")) strDummy = SetConfigValue(0,"STRFORUMCELLCOLOR", rs("C_STRFORUMCELLCOLOR")) strDummy = SetConfigValue(0,"STRALTFORUMCELLCOLOR", rs("C_STRALTFORUMCELLCOLOR")) strDummy = SetConfigValue(0,"STRFORUMFONTCOLOR", rs("C_STRFORUMFONTCOLOR")) strDummy = SetConfigValue(0,"STRFORUMLINKCOLOR", rs("C_STRFORUMLINKCOLOR")) strDummy = SetConfigValue(0,"STRTABLEBORDERCOLOR", rs("C_STRTABLEBORDERCOLOR")) strDummy = SetConfigValue(0,"STRPOPUPTABLECOLOR", rs("C_STRPOPUPTABLECOLOR")) strDummy = SetConfigValue(0,"STRPOPUPBORDERCOLOR", rs("C_STRPOPUPBORDERCOLOR")) strDummy = SetConfigValue(0,"STRNEWFONTCOLOR", rs("C_STRNEWFONTCOLOR")) strDummy = SetConfigValue(0,"STRTOPICWIDTHLEFT", rs("C_STRTOPICWIDTHLEFT")) strDummy = SetConfigValue(0,"STRTOPICWIDTHRIGHT", rs("C_STRTOPICWIDTHRIGHT")) strDummy = SetConfigValue(0,"STRTOPICNOWRAPLEFT", rs("C_STRTOPICNOWRAPLEFT")) strDummy = SetConfigValue(0,"STRTOPICNOWRAPRIGHT", rs("C_STRTOPICNOWRAPRIGHT")) strDummy = SetConfigValue(0,"STRRANKADMIN", rs("C_STRRANKADMIN")) strDummy = SetConfigValue(0,"STRRANKMOD", rs("C_STRRANKMOD")) strDummy = SetConfigValue(0,"STRRANKLEVEL0", rs("C_STRRANKLEVEL0")) strDummy = SetConfigValue(0,"STRRANKLEVEL1", rs("C_STRRANKLEVEL1")) strDummy = SetConfigValue(0,"STRRANKLEVEL2", rs("C_STRRANKLEVEL2")) strDummy = SetConfigValue(0,"STRRANKLEVEL3", rs("C_STRRANKLEVEL3")) strDummy = SetConfigValue(0,"STRRANKLEVEL4", rs("C_STRRANKLEVEL4")) strDummy = SetConfigValue(0,"STRRANKLEVEL5", rs("C_STRRANKLEVEL5")) strDummy = SetConfigValue(0,"STRRANKCOLORADMIN", rs("C_STRRANKCOLORADMIN")) strDummy = SetConfigValue(0,"STRRANKCOLORMOD", rs("C_STRRANKCOLORMOD")) strDummy = SetConfigValue(0,"STRRANKCOLOR0", rs("C_STRRANKCOLOR0")) strDummy = SetConfigValue(0,"STRRANKCOLOR1", rs("C_STRRANKCOLOR1")) strDummy = SetConfigValue(0,"STRRANKCOLOR2", rs("C_STRRANKCOLOR2")) strDummy = SetConfigValue(0,"STRRANKCOLOR3", rs("C_STRRANKCOLOR3")) strDummy = SetConfigValue(0,"STRRANKCOLOR4", rs("C_STRRANKCOLOR4")) strDummy = SetConfigValue(0,"STRRANKCOLOR5", rs("C_STRRANKCOLOR5")) strDummy = SetConfigValue(0,"INTRRANKLEVEL0", rs("C_INTRANKLEVEL0")) strDummy = SetConfigValue(0,"INTRRANKLEVEL1", rs("C_INTRANKLEVEL1")) strDummy = SetConfigValue(0,"INTRRANKLEVEL2", rs("C_INTRANKLEVEL2")) strDummy = SetConfigValue(0,"INTRRANKLEVEL3", rs("C_INTRANKLEVEL3")) strDummy = SetConfigValue(0,"INTRRANKLEVEL4", rs("C_INTRANKLEVEL4")) strDummy = SetConfigValue(0,"INTRRANKLEVEL5", rs("C_INTRANKLEVEL5")) strDummy = SetConfigValue(0,"STRSIGNATURES", rs("C_STRSIGNATURES") ) strDummy = SetConfigValue(0,"STRSHOWSTATISTICS", rs("C_STRSHOWSTATISTICS")) strDummy = SetConfigValue(0,"STRSHOWIMAGEPOWEREDBY", rs("C_STRSHOWIMAGEPOWEREDBY")) strDummy = SetConfigValue(0,"STRLOGONFORMAIL", rs("C_STRLOGONFORMAIL")) strDummy = SetConfigValue(0,"STRSHOWPAGING", rs("C_STRSHOWPAGING")) strDummy = SetConfigValue(0,"STRSHOWTOPICNAV", rs("C_STRSHOWTOPICNAV")) strDummy = SetConfigValue(0,"STRPAGESIZE", rs("C_STRPAGESIZE")) strDummy = SetConfigValue(0,"STRPAGENUMBERSIZE", rs("C_STRPAGENUMBERSIZE")) strDummy = SetConfigValue(0,"STRFULLNAME", rs("C_STRFULLNAME")) strDummy = SetConfigValue(0,"STRPICTURE", rs("C_STRPICTURE")) strDummy = SetConfigValue(0,"STRSEX", rs("C_STRSEX")) strDummy = SetConfigValue(0,"STRCITY", rs("C_STRCITY")) strDummy = SetConfigValue(0,"STRSTATE", rs("C_STRSTATE")) strDummy = SetConfigValue(0,"STRAGE", rs("C_STRAGE")) strDummy = SetConfigValue(0,"STRCOUNTRY", rs("C_STRCOUNTRY")) strDummy = SetConfigValue(0,"STROCCUPATION", rs("C_STROCCUPATION")) strDummy = SetConfigValue(0,"STRHOMEPAGE", rs("C_STRHOMEPAGE")) strDummy = SetConfigValue(0,"STRFAVLINKS", rs("C_STRFAVLINKS")) strDummy = SetConfigValue(0,"STRBIO", rs("C_STRBIO")) strDummy = SetConfigValue(0,"STRHOBBIES", rs("C_STRHOBBIES")) strDummy = SetConfigValue(0,"STRLNEW", rs("C_STRLNEWS")) strDummy = SetConfigValue(0,"STRQUOTE", rs("C_STRQUOTE")) strDummy = SetConfigValue(0,"STRMARSTATUS", rs("C_STRMARSTATUS")) strDummy = SetConfigValue(0,"STRRECENTTOPICS", rs("C_STRRECENTTOPICS")) strDummy = SetConfigValue(0,"STRNTGROUPS", rs("C_STRNTGROUPS")) strDummy = SetConfigValue(0,"STRAUTOLOGON", rs("C_STRAUTOLOGON")) strDummy = SetConfigValue(0,"STRMOVENOTIFY", "1") strDummy = SetConfigValue(0,"STRSUBSCRIPTION", "1") strDummy = SetConfigValue(0,"STRMODERATION", "1") Response.Write("") else Response.Write("") end if else Response.Write("") intCriticalErrors = intCriticalErrors + 1 end if Response.Write("
Upgraded: Config values transferred to new table
Upgraded: No existing config values found
Critical error: code: " & Hex(UpdateErrorCode) & " while trying to tranfer the existing config values to the new table
") rs.close set rs = nothing on error goto 0 end sub Sub UpDateAccessFields(pOldversion) if pOldversion <= 5 then my_Conn.execute ("UPDATE " & strTablePrefix & "CATEGORY SET CAT_MODERATION = 0 WHERE (CAT_MODERATION Is Null)") my_Conn.execute ("UPDATE " & strTablePrefix & "CATEGORY SET CAT_SUBSCRIPTION = 0 WHERE (CAT_SUBSCRIPTION Is Null)") my_Conn.execute ("UPDATE " & strTablePrefix & "CATEGORY SET CAT_ORDER = 1 WHERE (CAT_ORDER Is Null)") my_Conn.execute ("UPDATE " & strTablePrefix & "FORUM SET F_L_ARCHIVE = '' WHERE (F_L_ARCHIVE Is Null)") my_Conn.execute ("UPDATE " & strTablePrefix & "FORUM SET F_ARCHIVE_SCHED = 30 WHERE (F_ARCHIVE_SCHED Is Null)") my_Conn.execute ("UPDATE " & strTablePrefix & "FORUM SET F_L_DELETE = '' WHERE (F_L_DELETE Is Null)") my_Conn.execute ("UPDATE " & strTablePrefix & "FORUM SET F_DELETE_SCHED = 365 WHERE (F_DELETE_SCHED Is Null)") my_Conn.execute ("UPDATE " & strTablePrefix & "FORUM SET F_MODERATION = 0 WHERE (F_MODERATION Is Null)") my_Conn.execute ("UPDATE " & strTablePrefix & "FORUM SET F_SUBSCRIPTION = 0 WHERE (F_SUBSCRIPTION Is Null)") my_Conn.execute ("UPDATE " & strTablePrefix & "FORUM SET F_ORDER = 1 WHERE (F_ORDER Is Null)") my_Conn.execute ("UPDATE " & strTablePrefix & "TOPICS SET T_ARCHIVE_FLAG = 1 WHERE (T_ARCHIVE_FLAG Is Null)") my_Conn.execute ("UPDATE " & strTablePrefix & "REPLY SET R_STATUS = 0 WHERE (R_STATUS Is Null)") on error resume next my_Conn.execute("ALTER TABLE " & strTablePrefix & "TOPICS DROP COLUMN C_STRMOVERNOTIFY") on error goto 0 end if end sub Function SetConfigValue(bUpdate, fVariable, fValue) ' bUpdate = 1 : if it exists then overwrite with new values ' bUpdate = 0 : if it exists then leave unchanged Dim strSql strSql = "SELECT C_VARIABLE FROM " & strTablePrefix & "CONFIG_NEW " &_ " WHERE C_VARIABLE = '" & fVariable & "' " Set rs = Server.CreateObject("ADODB.Recordset") rs.open strSql, my_Conn if (rs.EOF or rs.BOF) then '## New config-value SetConfigValue = "added" my_conn.execute ("INSERT INTO " & strTablePrefix & "CONFIG_NEW (C_VALUE,C_VARIABLE) VALUES ('" & fValue & "' , '" & fVariable & "')") else if bUpdate <> 0 then SetConfigValue = "updated" my_conn.execute ("UPDATE " & strTablePrefix & "CONFIG_NEW SET C_VALUE = '" & fValue & "' WHERE C_VARIABLE = '" & fVariable &"'") else ' not changed SetConfigValue = "unchanged" end if end if rs.close set rs = nothing end function %>