% '################################################################################# '## Copyright (C) 2000-01 Michael Anderson and Pierre Gorissen '## '## This program is free software; you can redistribute it and/or '## modify it under the terms of the GNU General Public License '## as published by the Free Software Foundation; either version 2 '## of the License, or any later version. '## '## All copyright notices regarding Snitz Forums 2000 '## must remain intact in the scripts and in the outputted HTML '## The "powered by" text/logo with a link back to '## http://forum.snitz.com in the footer of the pages MUST '## remain visible when the pages are viewed on the internet or intranet. '## '## This program is distributed in the hope that it will be useful, '## but WITHOUT ANY WARRANTY; without even the implied warranty of '## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the '## GNU General Public License for more details. '## '## You should have received a copy of the GNU General Public License '## along with this program; if not, write to the Free Software '## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. '## '## Support can be obtained from support forums at: '## http://forum.snitz.com '## '## Correspondence and Marketing Questions can be sent to: '## reinhold@bigfoot.com '## '## or '## '## Snitz Communications '## C/O: Michael Anderson '## PO Box 200 '## Harpswell, ME 04079 '################################################################################# if (strDBType = "sqlserver") then my_Conn.Errors.Clear on error resume next strSql = "CREATE TABLE " & strTablePrefix & "CATEGORY ( " strSql = strSql & "CAT_ID int IDENTITY (1, 1) NOT NULL , " strSql = strSql & "CAT_STATUS smallint NULL , " strSql = strSql & "CAT_NAME varchar (100) NULL, " strSql = strSql & "CAT_MODERATION int NULL CONSTRAINT " & strTablePrefix & "SnitzC1020 DEFAULT 0, " strSql = strSql & "CAT_SUBSCRIPTION int NULL CONSTRAINT " & strTablePrefix & "SnitzC1021 DEFAULT 0, " strSql = strSql & "CAT_ORDER int NULL CONSTRAINT " & strTablePrefix & "SnitzC1022 DEFAULT 1 )" my_Conn.Execute strSql ChkDBInstall() strSql = "CREATE TABLE " & strTablePrefix & "CONFIG_NEW ( " strSql = strSql & "ID int IDENTITY (1, 1) NOT NULL , " strSql = strSql & "C_VARIABLE varchar (255) NULL , " strSql = strSql & "C_VALUE varchar (255) NULL )" my_Conn.Execute strSql 'ChkDBInstall() strSql = "CREATE TABLE " & strTablePrefix & "FORUM ( " strSql = strSql & "CAT_ID int NOT NULL , " strSql = strSql & "FORUM_ID int IDENTITY (1, 1) NOT NULL , " strSql = strSql & "F_STATUS smallint NULL , " strSql = strSql & "F_MAIL smallint NULL , " strSql = strSql & "F_SUBJECT varchar (100) NULL , " strSql = strSql & "F_URL varchar (255) NULL , " strSql = strSql & "F_DESCRIPTION varchar (255) NULL , " strSql = strSql & "F_TOPICS int NULL , " strSql = strSql & "F_COUNT int NULL , " strSql = strSql & "F_LAST_POST varchar (50) NULL , " strSql = strSql & "F_PASSWORD_NEW varchar (255) NULL , " strSql = strSql & "F_USERLIST varchar (255) NULL , " strSql = strSql & "F_PRIVATEFORUMS int NULL , " strSql = strSql & "F_TYPE smallint NULL , " strSql = strSql & "F_IP varchar (50) NULL, " strSql = strSql & "F_LAST_POST_AUTHOR int NULL, " strSql = strSql & "F_A_TOPICS int NULL , " strSql = strSql & "F_A_COUNT int NULL , " strSql = strSql & "F_MODERATION int NOT NULL CONSTRAINT " & strTablePrefix & "SnitzC1018 DEFAULT 0, " strSql = strSql & "F_SUBSCRIPTION int NOT NULL CONSTRAINT " & strTablePrefix & "SnitzC1019 DEFAULT 0, " strSql = strSql & "F_ORDER int NOT NULL CONSTRAINT " & strTablePrefix & "SnitzC1025 DEFAULT 1, " strSql = strSql & "F_L_ARCHIVE varchar (20) NOT NULL CONSTRAINT " & strTablePrefix & "SnitzC1026 DEFAULT '', " strSql = strSql & "F_ARCHIVE_SCHED int NOT NULL CONSTRAINT " & strTablePrefix & "SnitzC1027 DEFAULT 30, " strSql = strSql & "F_L_DELETE varchar (20) NOT NULL CONSTRAINT " & strTablePrefix & "SnitzC1028 DEFAULT '', " strSql = strSql & "F_DELETE_SCHED int NOT NULL CONSTRAINT " & strTablePrefix & "SnitzC1029 DEFAULT 365 ) " my_Conn.Execute strSql ChkDBInstall() strSql = "CREATE TABLE " & strMemberTablePrefix & "MEMBERS ( " strSql = strSql & "MEMBER_ID int IDENTITY (1, 1) NOT NULL , " strSql = strSql & "M_STATUS smallint NULL , " strSql = strSql & "M_NAME varchar (75) NULL , " strSql = strSql & "M_USERNAME varchar (150) NULL , " strSql = strSql & "M_PASSWORD varchar (25) NULL , " strSql = strSql & "M_EMAIL varchar (50) NULL , " strSql = strSql & "M_COUNTRY varchar (20) NULL , " strSql = strSql & "M_HOMEPAGE varchar (50) NULL , " strSql = strSql & "M_SIG varchar (255) NULL , " strSql = strSql & "M_DEFAULT_VIEW int NULL , " strSql = strSql & "M_LEVEL smallint NULL , " strSql = strSql & "M_AIM varchar (150) NULL , " strSql = strSql & "M_YAHOO varchar (150) NULL , " strSql = strSql & "M_ICQ varchar (150) NULL , " strSql = strSql & "M_POSTS int NULL , " strSql = strSql & "M_DATE varchar (50) NULL , " strSql = strSql & "M_LASTHEREDATE varchar (50) NULL , " strSql = strSql & "M_LASTPOSTDATE varchar (50) NULL , " strSql = strSql & "M_TITLE varchar (50) NULL , " strSql = strSql & "M_SUBSCRIPTION smallint NULL , " strSql = strSql & "M_HIDE_EMAIL smallint NULL , " strSql = strSql & "M_RECEIVE_EMAIL smallint NULL , " strSql = strSql & "M_LAST_IP varchar (50) NULL , " strSql = strSql & "M_IP varchar (50) NULL , " strSql = strSql & "M_FIRSTNAME varchar (100) NULL CONSTRAINT " & strTablePrefix & "SnitzC0369 DEFAULT '' ," strSql = strSql & "M_LASTNAME varchar (100) NULL CONSTRAINT " & strTablePrefix & "SnitzC0370 DEFAULT '' ," strSql = strSql & "M_OCCUPATION varchar (255) NULL CONSTRAINT " & strTablePrefix & "SnitzC0371 DEFAULT '' ," strSql = strSql & "M_SEX varchar (50) NULL CONSTRAINT " & strTablePrefix & "SnitzC0372 DEFAULT '' , " strSql = strSql & "M_AGE varchar (10) NULL CONSTRAINT " & strTablePrefix & "SnitzC0373 DEFAULT '' , " strSql = strSql & "M_HOBBIES text NULL , " strSql = strSql & "M_LNEWS text NULL , " strSql = strSql & "M_QUOTE text NULL , " strSql = strSql & "M_BIO text NULL , " strSql = strSql & "M_MARSTATUS varchar (100) NULL CONSTRAINT " & strTablePrefix & "SnitzC0374 DEFAULT '' ," strSql = strSql & "M_LINK1 varchar (255) NULL CONSTRAINT " & strTablePrefix & "SnitzC0375 DEFAULT '' ," strSql = strSql & "M_LINK2 varchar (255) NULL CONSTRAINT " & strTablePrefix & "SnitzC0376 DEFAULT '' , " strSql = strSql & "M_CITY varchar (100) NULL CONSTRAINT " & strTablePrefix & "SnitzC0377 DEFAULT '' , " strSql = strSql & "M_STATE varchar (100) NULL CONSTRAINT " & strTablePrefix & "SnitzC0379 DEFAULT '' , " strSql = strSql & "M_PHOTO_URL varchar (255) NULL CONSTRAINT " & strTablePrefix & "SnitzC0378 DEFAULT '' )" my_Conn.Execute strSql ChkDBInstall() strSql = "CREATE TABLE " & strTablePrefix & "MODERATOR ( " strSql = strSql & "MOD_ID int IDENTITY (1, 1) NOT NULL , " strSql = strSql & "FORUM_ID int NULL , " strSql = strSql & "MEMBER_ID int NULL , " strSql = strSql & "MOD_TYPE smallint NULL )" my_Conn.Execute strSql ChkDBInstall() strSql = "CREATE TABLE " & strTablePrefix & "REPLY ( " strSql = strSql & "CAT_ID int NOT NULL , " strSql = strSql & "FORUM_ID int NOT NULL , " strSql = strSql & "TOPIC_ID int NOT NULL , " strSql = strSql & "REPLY_ID int IDENTITY (1, 1) NOT NULL , " strSql = strSql & "R_MAIL smallint NULL , " strSql = strSql & "R_AUTHOR int NULL , " strSql = strSql & "R_MESSAGE text NULL , " strSql = strSql & "R_DATE varchar (50) NULL , " strSql = strSql & "R_IP varchar (50) NULL, " strSql = strSql & "R_STATUS smallint NULL CONSTRAINT " & strTablePrefix & "SnitzC1017 DEFAULT 0)" my_Conn.Execute strSql ChkDBInstall() strSql = "CREATE TABLE " & strTablePrefix & "TOPICS ( " strSql = strSql & "CAT_ID int NOT NULL , " strSql = strSql & "FORUM_ID int NOT NULL , " strSql = strSql & "TOPIC_ID int IDENTITY (1, 1) NOT NULL , " strSql = strSql & "T_STATUS smallint NULL , " strSql = strSql & "T_MAIL smallint NULL , " strSql = strSql & "T_SUBJECT varchar (100) NULL , " strSql = strSql & "T_MESSAGE text NULL , " strSql = strSql & "T_AUTHOR int NULL , " strSql = strSql & "T_REPLIES int NULL , " strSql = strSql & "T_VIEW_COUNT int NULL , " strSql = strSql & "T_LAST_POST varchar (50) NULL , " strSql = strSql & "T_DATE varchar (50) NULL, " strSql = strSql & "T_LAST_POSTER int NULL, " strSql = strSql & "T_IP varchar (50) NULL, " strSql = strSql & "T_ARCHIVE_FLAG int NULL, " strSql = strSql & "T_LAST_POST_AUTHOR int NULL ) " my_Conn.Execute strSql ChkDBInstall() strSql = "CREATE TABLE " & strTablePrefix & "TOTALS ( " strSql = strSql & "COUNT_ID smallint NOT NULL , " strSql = strSql & "P_COUNT int NULL , " strSql = strSql & "T_COUNT int NULL , " strSql = strSql & "P_A_COUNT int NULL , " strSql = strSql & "T_A_COUNT int NULL , " strSql = strSql & "U_COUNT int NULL ) " my_Conn.Execute strSql ChkDBInstall() strSql = "CREATE TABLE " & strTablePrefix & "ALLOWED_MEMBERS (" strSql = strSql & "MEMBER_ID INT NOT NULL, FORUM_ID INT NOT NULL, " strSql = strSql & "CONSTRAINT " & strTablePrefix & "SnitzC373 PRIMARY KEY NONCLUSTERED (MEMBER_ID, FORUM_ID)) " my_Conn.Execute strSql ChkDBInstall() strSql = "CREATE TABLE " & strTablePrefix & "SUBSCRIPTIONS (" strSql = strSql & "SUBSCRIPTION_ID INT IDENTITY NOT NULL, MEMBER_ID INT NOT NULL, " strSql = strSql & "CAT_ID INT NOT NULL, TOPIC_ID INT NOT NULL, FORUM_ID INT NOT NULL) " my_Conn.Execute strSql ChkDBInstall() strSql = "CREATE TABLE " & strTablePrefix & "A_TOPICS ( " strSql = strSql & "CAT_ID int NOT NULL , " strSql = strSql & "FORUM_ID int NOT NULL , " strSql = strSql & "TOPIC_ID int NOT NULL , " strSql = strSql & "T_STATUS smallint NULL , " strSql = strSql & "T_MAIL smallint NULL , " strSql = strSql & "T_SUBJECT varchar (100) NULL , " strSql = strSql & "T_MESSAGE text NULL , " strSql = strSql & "T_AUTHOR int NULL , " strSql = strSql & "T_REPLIES int NULL , " strSql = strSql & "T_VIEW_COUNT int NULL , " strSql = strSql & "T_LAST_POST varchar (50) NULL , " strSql = strSql & "T_DATE varchar (50) NULL, " strSql = strSql & "T_LAST_POSTER int NULL, " strSql = strSql & "T_IP varchar (50) NULL, " strSql = strSql & "T_LAST_POST_AUTHOR int NULL ) " my_Conn.Execute strSql ChkDBInstall() strSql = "CREATE TABLE " & strTablePrefix & "A_REPLY ( " strSql = strSql & "CAT_ID int NOT NULL , " strSql = strSql & "FORUM_ID int NOT NULL , " strSql = strSql & "TOPIC_ID int NOT NULL , " strSql = strSql & "REPLY_ID int NOT NULL , " strSql = strSql & "R_STATUS smallint NULL , " strSql = strSql & "R_MAIL smallint NULL , " strSql = strSql & "R_AUTHOR int NULL , " strSql = strSql & "R_MESSAGE text NULL , " strSql = strSql & "R_DATE varchar (50) NULL , " strSql = strSql & "R_IP varchar (50) NULL ) " my_Conn.Execute strSql ChkDBInstall() strSql = "ALTER TABLE " & strTablePrefix & "CATEGORY WITH NOCHECK ADD " strSql = strSql & "CONSTRAINT " & strTablePrefix & "SnitzC1 DEFAULT 1 FOR CAT_STATUS, " strSql = strSql & "CONSTRAINT " & strTablePrefix & "SnitzC2 PRIMARY KEY NONCLUSTERED " strSql = strSql & " (CAT_ID)" my_Conn.Execute strSql ChkDBInstall() strSql = "ALTER TABLE " & strTablePrefix & "CONFIG_NEW WITH NOCHECK ADD " strSql = strSql & "CONSTRAINT " & strTablePrefix & "SnitzC38 PRIMARY KEY NONCLUSTERED " strSql = strSql & " (ID)" my_Conn.Execute strSql ChkDBInstall() strSql = "ALTER TABLE " & strTablePrefix & "FORUM WITH NOCHECK ADD " strSql = strSql & "CONSTRAINT " & strTablePrefix & "SnitzC39 DEFAULT 0 FOR CAT_ID, " strSql = strSql & "CONSTRAINT " & strTablePrefix & "SnitzC40 DEFAULT 1 FOR F_STATUS, " strSql = strSql & "CONSTRAINT " & strTablePrefix & "SnitzC41 DEFAULT 0 FOR F_MAIL, " strSql = strSql & "CONSTRAINT " & strTablePrefix & "SnitzC42 DEFAULT 0 FOR F_TOPICS, " strSql = strSql & "CONSTRAINT " & strTablePrefix & "SnitzC43 DEFAULT 0 FOR F_COUNT, " strSql = strSql & "CONSTRAINT " & strTablePrefix & "SnitzC44 DEFAULT '' FOR F_LAST_POST, " strSql = strSql & "CONSTRAINT " & strTablePrefix & "SnitzC45 DEFAULT 0 FOR F_PRIVATEFORUMS, " strSql = strSql & "CONSTRAINT " & strTablePrefix & "SnitzC46 DEFAULT 0 FOR F_TYPE, " strSql = strSql & "CONSTRAINT " & strTablePrefix & "SnitzC47 DEFAULT '000.000.000.000' FOR F_IP, " strSql = strSql & "CONSTRAINT " & strTablePrefix & "SnitzC48 PRIMARY KEY NONCLUSTERED " strSql = strSql & "(CAT_ID, FORUM_ID )" my_Conn.Execute strSql ChkDBInstall() strSql = "ALTER TABLE " & strMemberTablePrefix & "MEMBERS WITH NOCHECK ADD " strSql = strSql & "CONSTRAINT " & strTablePrefix & "SnitzC49 DEFAULT 1 FOR M_STATUS, " strSql = strSql & "CONSTRAINT " & strTablePrefix & "SnitzC50 DEFAULT 1 FOR M_DEFAULT_VIEW, " strSql = strSql & "CONSTRAINT " & strTablePrefix & "SnitzC51 DEFAULT 1 FOR M_LEVEL, " strSql = strSql & "CONSTRAINT " & strTablePrefix & "SnitzC52 DEFAULT '' FOR M_DATE, " strSql = strSql & "CONSTRAINT " & strTablePrefix & "SnitzC53 DEFAULT 0 FOR M_SUBSCRIPTION, " strSql = strSql & "CONSTRAINT " & strTablePrefix & "SnitzC54 DEFAULT 0 FOR M_HIDE_EMAIL, " strSql = strSql & "CONSTRAINT " & strTablePrefix & "SnitzC55 DEFAULT 1 FOR M_RECEIVE_EMAIL, " strSql = strSql & "CONSTRAINT " & strTablePrefix & "SnitzC56 DEFAULT '000.000.000.000' FOR M_LAST_IP, " strSql = strSql & "CONSTRAINT " & strTablePrefix & "SnitzC57 DEFAULT '000.000.000.000' FOR M_IP, " strSql = strSql & "CONSTRAINT " & strTablePrefix & "SnitzC58 PRIMARY KEY NONCLUSTERED " strSql = strSql & "(MEMBER_ID)" my_Conn.Execute strSql ChkDBInstall() strSql = "ALTER TABLE " & strTablePrefix & "MODERATOR WITH NOCHECK ADD " strSql = strSql & "CONSTRAINT " & strTablePrefix & "SnitzC59 DEFAULT 0 FOR FORUM_ID, " strSql = strSql & "CONSTRAINT " & strTablePrefix & "SnitzC60 DEFAULT 0 FOR MEMBER_ID, " strSql = strSql & "CONSTRAINT " & strTablePrefix & "SnitzC61 DEFAULT 0 FOR MOD_TYPE, " strSql = strSql & "CONSTRAINT " & strTablePrefix & "SnitzC62 PRIMARY KEY NONCLUSTERED " strSql = strSql & " (MOD_ID)" my_Conn.Execute strSql ChkDBInstall() strSql = "ALTER TABLE " & strTablePrefix & "REPLY WITH NOCHECK ADD " strSql = strSql & "CONSTRAINT " & strTablePrefix & "SnitzC63 DEFAULT 0 FOR CAT_ID, " strSql = strSql & "CONSTRAINT " & strTablePrefix & "SnitzC64 DEFAULT 0 FOR FORUM_ID, " strSql = strSql & "CONSTRAINT " & strTablePrefix & "SnitzC65 DEFAULT 0 FOR TOPIC_ID, " strSql = strSql & "CONSTRAINT " & strTablePrefix & "SnitzC66 DEFAULT 0 FOR R_MAIL, " strSql = strSql & "CONSTRAINT " & strTablePrefix & "SnitzC67 DEFAULT 0 FOR R_AUTHOR, " strSql = strSql & "CONSTRAINT " & strTablePrefix & "SnitzC68 DEFAULT '' FOR R_DATE, " strSql = strSql & "CONSTRAINT " & strTablePrefix & "SnitzC69 DEFAULT '000.000.000.000' FOR R_IP, " strSql = strSql & "CONSTRAINT " & strTablePrefix & "SnitzC70 PRIMARY KEY NONCLUSTERED " strSql = strSql & "(CAT_ID, FORUM_ID, TOPIC_ID, REPLY_ID )" my_Conn.Execute strSql ChkDBInstall() strSql = "ALTER TABLE " & strTablePrefix & "TOPICS WITH NOCHECK ADD " strSql = strSql & "CONSTRAINT " & strTablePrefix & "SnitzC71 DEFAULT 0 FOR CAT_ID, " strSql = strSql & "CONSTRAINT " & strTablePrefix & "SnitzC72 DEFAULT 0 FOR FORUM_ID, " strSql = strSql & "CONSTRAINT " & strTablePrefix & "SnitzC73 DEFAULT 1 FOR T_STATUS, " strSql = strSql & "CONSTRAINT " & strTablePrefix & "SnitzC74 DEFAULT 0 FOR T_MAIL, " strSql = strSql & "CONSTRAINT " & strTablePrefix & "SnitzC75 DEFAULT 0 FOR T_AUTHOR, " strSql = strSql & "CONSTRAINT " & strTablePrefix & "SnitzC76 DEFAULT 0 FOR T_REPLIES, " strSql = strSql & "CONSTRAINT " & strTablePrefix & "SnitzC77 DEFAULT 0 FOR T_VIEW_COUNT, " strSql = strSql & "CONSTRAINT " & strTablePrefix & "SnitzC78 DEFAULT '' FOR T_LAST_POST, " strSql = strSql & "CONSTRAINT " & strTablePrefix & "SnitzC79 DEFAULT '' FOR T_DATE, " strSql = strSql & "CONSTRAINT " & strTablePrefix & "SnitzC80 DEFAULT 0 FOR T_LAST_POSTER, " strSql = strSql & "CONSTRAINT " & strTablePrefix & "SnitzC81 DEFAULT '000.000.000.000' FOR T_IP, " strSql = strSql & "CONSTRAINT " & strTablePrefix & "SnitzC82 DEFAULT 1 FOR T_ARCHIVE_FLAG, " strSql = strSql & "CONSTRAINT " & strTablePrefix & "SnitzC83 PRIMARY KEY NONCLUSTERED " strSql = strSql & "(CAT_ID, FORUM_ID, TOPIC_ID )" my_Conn.Execute strSql ChkDBInstall() strSql = "ALTER TABLE " & strTablePrefix & "TOTALS WITH NOCHECK ADD " strSql = strSql & "CONSTRAINT " & strTablePrefix & "SnitzC84 DEFAULT 0 FOR COUNT_ID, " strSql = strSql & "CONSTRAINT " & strTablePrefix & "SnitzC85 DEFAULT 0 FOR P_COUNT, " strSql = strSql & "CONSTRAINT " & strTablePrefix & "SnitzC86 DEFAULT 0 FOR T_COUNT, " strSql = strSql & "CONSTRAINT " & strTablePrefix & "SnitzC87 DEFAULT 0 FOR U_COUNT, " strSql = strSql & "CONSTRAINT " & strTablePrefix & "SnitzC88 PRIMARY KEY NONCLUSTERED " strSql = strSql & "(COUNT_ID) " my_Conn.Execute strSql ChkDBInstall() strSql = "CREATE INDEX " & strTablePrefix & "CATEGORY_CAT_ID ON " & strTablePrefix & "CATEGORY(CAT_ID)" my_Conn.Execute strSql ChkDBInstall() strSql = "CREATE INDEX " & strTablePrefix & "CATEGORY_CAT_STATUS ON " & strTablePrefix & "CATEGORY(CAT_STATUS)" my_Conn.Execute strSql ChkDBInstall() strSql = "CREATE INDEX " & strTablePrefix & "CAT_ID ON " & strTablePrefix & "FORUM(CAT_ID)" my_Conn.Execute strSql ChkDBInstall() strSql = "CREATE INDEX " & strTablePrefix & "F_CAT ON " & strTablePrefix & "FORUM(CAT_ID)" my_Conn.Execute strSql ChkDBInstall() strSql = "CREATE INDEX " & strTablePrefix & "FORUM_ID ON " & strTablePrefix & "FORUM(FORUM_ID)" my_Conn.Execute strSql ChkDBInstall() strSql = "CREATE INDEX " & strMemberTablePrefix & "MEMBERS_MEMBER_ID ON " &strMemberTablePrefix & "MEMBERS(MEMBER_ID)" my_Conn.Execute strSql ChkDBInstall() strSql = "CREATE INDEX " & strTablePrefix & "MODERATOR_FORUM_ID ON " & strTablePrefix & "MODERATOR(FORUM_ID)" my_Conn.Execute strSql ChkDBInstall() strSql = "CREATE INDEX " & strTablePrefix & "MODERATORS_MEMBER_ID ON " & strTablePrefix & "MODERATOR(MEMBER_ID)" my_Conn.Execute strSql ChkDBInstall() strSql = "CREATE INDEX " & strTablePrefix & "REPLY_R_AUTHOR ON " & strTablePrefix & "REPLY(R_AUTHOR)" my_Conn.Execute strSql ChkDBInstall() strSql = "CREATE INDEX " & strTablePrefix & "REPLY_CATFORTOP_ID ON " & strTablePrefix & "REPLY(CAT_ID, FORUM_ID, TOPIC_ID)" my_Conn.Execute strSql ChkDBInstall() strSql = "CREATE INDEX " & strTablePrefix & "FORUM_ID ON " & strTablePrefix & "REPLY(FORUM_ID)" my_Conn.Execute strSql ChkDBInstall() strSql = "CREATE INDEX " & strTablePrefix & "REPLY_ID ON " & strTablePrefix & "REPLY(REPLY_ID)" my_Conn.Execute strSql ChkDBInstall() strSql = "CREATE INDEX " & strTablePrefix & "REPLY_TOPIC_ID ON " & strTablePrefix & "REPLY(TOPIC_ID)" my_Conn.Execute strSql ChkDBInstall() strSql = "CREATE INDEX " & strTablePrefix & "TOPICS_CAT_ID_FORUM_ID ON " & strTablePrefix & "TOPICS(CAT_ID, FORUM_ID)" my_Conn.Execute strSql ChkDBInstall() strSql = "CREATE INDEX " & strTablePrefix & "TOPICS_T_AUTHOR ON " & strTablePrefix & "TOPICS(T_AUTHOR)" my_Conn.Execute strSql ChkDBInstall() strSql = "CREATE INDEX " & strTablePrefix & "TOPICS_CAT_ID ON " & strTablePrefix & "TOPICS(CAT_ID)" my_Conn.Execute strSql ChkDBInstall() strSql = "CREATE INDEX " & strTablePrefix & "FORUM_ID ON " & strTablePrefix & "TOPICS(FORUM_ID)" my_Conn.Execute strSql ChkDBInstall() strSql = "CREATE INDEX " & strTablePrefix & "TOPICS_TOPIC_ID ON " & strTablePrefix & "TOPICS(TOPIC_ID)" my_Conn.Execute strSql ChkDBInstall() strSql = "CREATE INDEX " & strTablePrefix & "TOPICS_CAT_FOR_TOP ON " & strTablePrefix & "TOPICS(CAT_ID, FORUM_ID, TOPIC_ID)" my_Conn.Execute strSql ChkDBInstall() '## Set the default config-values strDummy = SetConfigValue(1,"STRVERSION", strNewVersion) strDummy = SetConfigValue(1,"STRFORUMTITLE","Snitz Forums 2000") strDummy = SetConfigValue(1,"STRCOPYRIGHT","© 2000-01 Snitz Communications") strDummy = SetConfigValue(1,"STRTITLEIMAGE","logo_snitz_forums_2000.gif") strDummy = SetConfigValue(1,"STRHOMEURL","../") strDummy = SetConfigValue(1,"STRFORUMURL","http://forum.snitz.com/forum/") strDummy = SetConfigValue(1,"STRAUTHTYPE","db") strDummy = SetConfigValue(1,"STRSETCOOKIETOFORUM","1") strDummy = SetConfigValue(1,"STREMAIL","0") strDummy = SetConfigValue(1,"STRUNIQUEEMAIL","1") strDummy = SetConfigValue(1,"STRMAILMODE","cdonts") strDummy = SetConfigValue(1,"STRMAILSERVER","your.mailserver.com") strDummy = SetConfigValue(1,"STRSENDER","your.email@yourserver.com") strDummy = SetConfigValue(1,"STRDATETYPE","mdy") strDummy = SetConfigValue(1,"STRTIMETYPE","24") strDummy = SetConfigValue(1,"STRTIMEADJUSTLOCATION","0") strDummy = SetConfigValue(1,"STRTIMEADJUST","0") strDummy = SetConfigValue(1,"STRMOVETOPICMODE","1") strDummy = SetConfigValue(1,"STRPRIVATEFORUMS","0") strDummy = SetConfigValue(1,"STRSHOWMODERATORS","1") strDummy = SetConfigValue(1,"STRSHOWRANK","0") strDummy = SetConfigValue(1,"STRHIDEEMAIL","0") strDummy = SetConfigValue(1,"STRIPLOGGING","1") strDummy = SetConfigValue(1,"STRALLOWFORUMCODE","1") strDummy = SetConfigValue(1,"STRIMGINPOSTS","0") strDummy = SetConfigValue(1,"STRALLOWHTML","0") strDummy = SetConfigValue(1,"STRSECUREADMIN","1") strDummy = SetConfigValue(1,"STRNOCOOKIES","0") strDummy = SetConfigValue(1,"STREDITEDBYDATE", "1") strDummy = SetConfigValue(1,"STRHOTTOPIC","1") strDummy = SetConfigValue(1,"INTHOTTOPICNUM","20") strDummy = SetConfigValue(1,"STRHOMEPAGE","1") strDummy = SetConfigValue(1,"STRAIM","1") strDummy = SetConfigValue(1,"STRYAHOO","1") strDummy = SetConfigValue(1,"STRICQ","1") strDummy = SetConfigValue(1,"STRICONS","1") strDummy = SetConfigValue(1,"STRGFXBUTTONS","1") strDummy = SetConfigValue(1,"STRBADWORDFILTER","1") strDummy = SetConfigValue(1,"STRBADWORDS","fuck|wank|shit|pussy|cunt") strDummy = SetConfigValue(1,"STRDEFAULTFONTFACE","Verdana, Arial, Helvetica") strDummy = SetConfigValue(1,"STRDEFAULTFONTSIZE","2") strDummy = SetConfigValue(1,"STRHEADERFONTSIZE","4") strDummy = SetConfigValue(1,"STRFOOTERFONTSIZE","1") strDummy = SetConfigValue(1,"STRPAGEBGCOLOR","white") strDummy = SetConfigValue(1,"STRDEFAULTFONTCOLOR","midnightblue") strDummy = SetConfigValue(1,"STRLINKCOLOR","darkblue") strDummy = SetConfigValue(1,"STRLINKTEXTDECORATION","underline") strDummy = SetConfigValue(1,"STRVISITEDLINKCOLOR","blue") strDummy = SetConfigValue(1,"STRVISITEDTEXTDECORATION","underline") strDummy = SetConfigValue(1,"STRACTIVELINKCOLOR","red") strDummy = SetConfigValue(1,"STRHOVERFONTCOLOR","red") strDummy = SetConfigValue(1,"STRHOVERTEXTDECORATION","underline") strDummy = SetConfigValue(1,"STRHEADCELLCOLOR","midnightblue") strDummy = SetConfigValue(1,"STRHEADFONTCOLOR","mintcream") strDummy = SetConfigValue(1,"STRCATEGORYCELLCOLOR","slateblue") strDummy = SetConfigValue(1,"STRCATEGORYFONTCOLOR","mintcream") strDummy = SetConfigValue(1,"STRFORUMFIRSTCELLCOLOR","whitesmoke") strDummy = SetConfigValue(1,"STRFORUMCELLCOLOR","whitesmoke") strDummy = SetConfigValue(1,"STRALTFORUMCELLCOLOR","gainsboro") strDummy = SetConfigValue(1,"STRFORUMFONTCOLOR","midnightblue") strDummy = SetConfigValue(1,"STRFORUMLINKCOLOR","darkblue") strDummy = SetConfigValue(1,"STRTABLEBORDERCOLOR","black") strDummy = SetConfigValue(1,"STRPOPUPTABLECOLOR","lightsteelblue") strDummy = SetConfigValue(1,"STRPOPUPBORDERCOLOR","black") strDummy = SetConfigValue(1,"STRNEWFONTCOLOR","blue") strDummy = SetConfigValue(1,"STRTOPICWIDTHLEFT","100") strDummy = SetConfigValue(1,"STRTOPICWIDTHRIGHT","100%") strDummy = SetConfigValue(1,"STRTOPICNOWRAPLEFT","1") strDummy = SetConfigValue(1,"STRTOPICNOWRAPRIGHT","0") strDummy = SetConfigValue(1,"STRRANKADMIN","Administrator") strDummy = SetConfigValue(1,"STRRANKMOD","Moderator") strDummy = SetConfigValue(1,"STRRANKLEVEL0","Starting Member") strDummy = SetConfigValue(1,"STRRANKLEVEL1","New Member") strDummy = SetConfigValue(1,"STRRANKLEVEL2","Junior Member") strDummy = SetConfigValue(1,"STRRANKLEVEL3","Average Member") strDummy = SetConfigValue(1,"STRRANKLEVEL4","Senior Member") strDummy = SetConfigValue(1,"STRRANKLEVEL5","Advanced Member") strDummy = SetConfigValue(1,"STRRANKCOLORADMIN","gold") strDummy = SetConfigValue(1,"STRRANKCOLORMOD","silver") strDummy = SetConfigValue(1,"STRRANKCOLOR0","bronze") strDummy = SetConfigValue(1,"STRRANKCOLOR1","bronze") strDummy = SetConfigValue(1,"STRRANKCOLOR2","bronze") strDummy = SetConfigValue(1,"STRRANKCOLOR3","bronze") strDummy = SetConfigValue(1,"STRRANKCOLOR4","bronze") strDummy = SetConfigValue(1,"STRRANKCOLOR5","bronze") strDummy = SetConfigValue(1,"INTRANKLEVEL0","0") strDummy = SetConfigValue(1,"INTRANKLEVEL1","50") strDummy = SetConfigValue(1,"INTRANKLEVEL2","100") strDummy = SetConfigValue(1,"INTRANKLEVEL3","500") strDummy = SetConfigValue(1,"INTRANKLEVEL4","1000") strDummy = SetConfigValue(1,"INTRANKLEVEL5","2000") strDummy = SetConfigValue(1,"STRSIGNATURES","1") strDummy = SetConfigValue(1,"STRSHOWSTATISTICS","1") strDummy = SetConfigValue(1,"STRSHOWIMAGEPOWEREDBY","1") strDummy = SetConfigValue(1,"STRLOGONFORMAIL","1") strDummy = SetConfigValue(1,"STRSHOWPAGING","1") strDummy = SetConfigValue(1,"STRSHOWTOPICNAV","1") strDummy = SetConfigValue(1,"STRPAGESIZE","15") strDummy = SetConfigValue(1,"STRPAGENUMBERSIZE","10") strDummy = SetConfigValue(1,"STRFULLNAME","1") strDummy = SetConfigValue(1,"STRPICTURE","0") strDummy = SetConfigValue(1,"STRSEX","0") strDummy = SetConfigValue(1,"STRCITY","0") strDummy = SetConfigValue(1,"STRSTATE","0") strDummy = SetConfigValue(1,"STRAGE","0") strDummy = SetConfigValue(1,"STRCOUNTRY","1") strDummy = SetConfigValue(1,"STROCCUPATION","0") strDummy = SetConfigValue(1,"STRHOMEPAGE","1") strDummy = SetConfigValue(1,"STRFAVLINKS","1") strDummy = SetConfigValue(1,"STRBIO","0") strDummy = SetConfigValue(1,"STRHOBBIES","0") strDummy = SetConfigValue(1,"STRLNEWS","0") strDummy = SetConfigValue(1,"STRQUOTE","0") strDummy = SetConfigValue(1,"STRMARSTATUS","0") strDummy = SetConfigValue(1,"STRRECENTTOPICS","1") strDummy = SetConfigValue(1,"STRNTGROUPS","0") strDummy = SetConfigValue(1,"STRAUTOLOGON","0") strDummy = SetConfigValue(1,"STRMOVENOTIFY","1") strDummy = SetConfigValue(1,"STRSUBSCRIPTION", "1") strDummy = SetConfigValue(1,"STRMODERATION", "1") strSql = "SELECT CAT_ID FROM " & strTablePrefix & "CATEGORY" set rs = my_Conn.Execute(strSql) if rs.EOF then strSql = "INSERT " & strTablePrefix & "CATEGORY(CAT_STATUS, CAT_NAME) VALUES(1, 'Snitz Forums 2000')" my_Conn.Execute strSql ChkDBInstall() end if rs.close set rs = nothing strSql = "SELECT MEMBER_ID FROM " & strMemberTablePrefix & "MEMBERS " strSql = strSql & " WHERE M_LEVEL = 3" set rs = my_Conn.Execute(strSql) if rs.EOF then strSql = "INSERT " & strMemberTablePrefix & "MEMBERS (M_STATUS, M_NAME, M_USERNAME, M_PASSWORD, M_EMAIL, M_COUNTRY, " strSql = strSql & "M_HOMEPAGE, M_SIG, M_DEFAULT_VIEW, M_LEVEL, M_AIM, M_YAHOO, M_ICQ, " strSql = strSql & "M_POSTS, M_DATE, M_LASTHEREDATE, M_LASTPOSTDATE, M_TITLE, M_SUBSCRIPTION, " strSql = strSql & "M_HIDE_EMAIL, M_RECEIVE_EMAIL, M_LAST_IP, M_IP) " strSql = strSql & " VALUES(1, 'Admin', 'Admin', 'admin', 'yourmail@server.com', ' ', ' ', ' ', 1, 3, ' ', ' ', ' ', " strSql = strSql & " 1, '20010215000000', '20010215000000', '20010215000000', 'Forum Admin', 0, 0, 1, '000.000.000.000', '000.000.000.000')" my_Conn.Execute strSql ChkDBInstall() end if rs.close set rs = nothing strSql = "SELECT FORUM_ID FROM " & strTablePrefix & "FORUM " set rs = my_Conn.Execute(strSql) if rs.EOF then strSql = "INSERT " & strTablePrefix & "FORUM(CAT_ID, F_STATUS, F_MAIL, F_SUBJECT, F_URL, F_DESCRIPTION, F_TOPICS, F_COUNT, F_LAST_POST, " strSql = strSql & " F_PASSWORD_NEW, F_USERLIST, F_PRIVATEFORUMS, F_TYPE, F_IP, F_LAST_POST_AUTHOR) " strSql = strSql & "VALUES(1, 1, 0, 'Testing Forums', '', 'This forum gives you a chance to become more familiar with how this product responds to different features and keeps testing in one place instead of posting tests all over. Happy Posting! ', " strSql = strSql & " 1, 1, '20010215000000', '', '', 0, 0, '000.000.000.000', 1) " my_Conn.Execute strSql ChkDBInstall() end if rs.close set rs = nothing strSql = "SELECT TOPIC_ID FROM " & strTablePrefix & "TOPICS " set rs = my_Conn.Execute(strSql) if rs.EOF then strSql = "INSERT " & strTablePrefix & "TOPICS (CAT_ID, FORUM_ID, T_STATUS, T_MAIL, T_SUBJECT, T_MESSAGE, T_AUTHOR, " strSql = strSql & "T_REPLIES, T_VIEW_COUNT, T_LAST_POST, T_DATE, T_LAST_POSTER, T_IP, T_LAST_POST_AUTHOR, T_ARCHIVE_FLAG) " strSql = strSql & "VALUES(1, 1, 1, 0, 'Welcome to Snitz Forums 2000', 'Thank you for downloading the Snitz Forums 2000. We hope you enjoy this great tool to support your organization!" & CHR(13) & CHR(10) & CHR(13) & CHR(10) &"Many thanks go out to John Penfold <asp@asp-dev.com> and Tim Teal <tteal@tealnet.com> for the original source code and to all the people of Snitz Forums 2000 at http://forum.snitz.com for continued support of this product.', " strSql = strSql & "1, 0, 0, '20010215000000', '20010215000000', 0, '000.000.000.000', 1, 1)" my_Conn.Execute strSql ChkDBInstall() end if rs.close set rs = nothing strSql = "SELECT COUNT_ID FROM " & strTablePrefix & "TOTALS " set rs = my_Conn.Execute(strSql) if rs.EOF then strSql = "INSERT " & strTablePrefix & "TOTALS (COUNT_ID, P_COUNT, T_COUNT, U_COUNT) " strSql = strSql & "VALUES(1,1,1,1)" my_Conn.Execute strSql ChkDBInstall() end if rs.close set rs = nothing end if sub ChkDBInstall() 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 Err_Msg = "