% '################################################################################# '## Snitz Forums 2000 v3.4.05 '################################################################################# '## Copyright (C) 2000-05 Michael Anderson, Pierre Gorissen, '## Huw Reddick and Richard Kinser '## '## This program is free software; you can redistribute it and/or '## modify it under the terms of the GNU General Public License '## as published by the Free Software Foundation; either version 2 '## of the License, or (at your option) any later version. '## '## All copyright notices regarding Snitz Forums 2000 '## must remain intact in the scripts and in the outputted HTML '## The "powered by" text/logo with a link back to '## http://forum.snitz.com in the footer of the pages MUST '## remain visible when the pages are viewed on the internet or intranet. '## '## This program is distributed in the hope that it will be useful, '## but WITHOUT ANY WARRANTY; without even the implied warranty of '## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the '## GNU General Public License for more details. '## '## You should have received a copy of the GNU General Public License '## along with this program; if not, write to the Free Software '## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. '## '## Support can be obtained from our support forums at: '## http://forum.snitz.com '## '## Correspondence and Marketing Questions can be sent to: '## manderson@snitz.com '## '################################################################################# if (strDBType = "access") then my_Conn.Errors.Clear on error resume next strSql = "CREATE TABLE " & strTablePrefix & "CONFIG_NEW ( " if strDBMSName = "ms jet" then strSql = strSql & "ID int IDENTITY (1, 1) PRIMARY KEY NOT NULL , " else strSql = strSql & "ID COUNTER CONSTRAINT PrimaryKey PRIMARY KEY , " end if strSql = strSql & "C_VARIABLE " & strN & "varchar (255) NULL , " strSql = strSql & "C_VALUE " & strN & "varchar (255) NULL )" my_Conn.Execute (strSql),,adCmdText + adExecuteNoRecords 'ChkDBInstall() '##################################################### '## Insert Default Configuration Data Into Database ## '##################################################### %> <% '####################################### '## Insert Default Data Into Database ## '####################################### strSql = "SELECT CAT_ID FROM " & strTablePrefix & "CATEGORY" set rs = my_Conn.Execute(strSql) if rs.EOF then strSql = "INSERT INTO " & strTablePrefix & "CATEGORY(CAT_STATUS, CAT_NAME) VALUES(1, 'פורום סניץ 2000')" my_Conn.Execute (strSql),,adCmdText + adExecuteNoRecords 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 INTO " & strMemberTablePrefix & "MEMBERS (M_STATUS, M_NAME, M_USERNAME, M_PASSWORD, M_EMAIL, M_COUNTRY, " strSql = strSql & "M_HOMEPAGE, M_LINK1, M_LINK2, M_PHOTO_URL, M_SIG, M_VIEW_SIG, M_SIG_DEFAULT, M_DEFAULT_VIEW, M_LEVEL, M_AIM, M_ICQ, M_MSN, M_YAHOO, " 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, '" & strAdminName & "', '" & strAdminName & "', '" & strAdminPassword & "', 'yourmail@server.com', ' ', ' ', ' ', ' ', ' ', ' ', 1, 1, 1, 3, ' ', ' ', ' ', ' ', " strSql = strSql & "1, '" & strCurrentDateTime & "', '" & strlhDateTime & "', '" & strCurrentDateTime & "', 'מנהל ראשי של הפורום', 0, 0, 1, '000.000.000.000', '000.000.000.000')" my_Conn.Execute (strSql),,adCmdText + adExecuteNoRecords 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 INTO " & 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_PRIVATEFORUMS, F_TYPE, F_IP, F_LAST_POST_AUTHOR, F_LAST_POST_TOPIC_ID, F_LAST_POST_REPLY_ID) " strSql = strSql & "VALUES(1, 1, 0, 'פורומים לבדיקה', '', 'פורום זה נותן לך אפשרות לערוך היכרות מעמיקה יותר עם הדרך בה הפורומים מגיבים לאפשרויות שונות ולבצע את כל הנסיונות במקום אחד במקום לשלוח הודעות בדיקה על פני כל הפורום. שליחה נעימה![:)]', " strSql = strSql & "1, 1, '" & strCurrentDateTime & "', '', 0, 0, '000.000.000.000', 1, 1, 0) " my_Conn.Execute (strSql),,adCmdText + adExecuteNoRecords 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 INTO " & strTablePrefix & "TOPICS (CAT_ID, FORUM_ID, T_STATUS, T_MAIL, T_SUBJECT, T_MESSAGE, T_AUTHOR, " strSql = strSql & "T_REPLIES, T_UREPLIES, T_VIEW_COUNT, T_LAST_POST, T_DATE, T_LAST_POSTER, T_IP, T_LAST_POST_AUTHOR, T_LAST_POST_REPLY_ID, T_ARCHIVE_FLAG) " strSql = strSql & "VALUES(1, 1, 1, 0, 'ברוכים הבאים לפורום סניץ 2000', 'תודה שהורדתם את פורום סניץ 2000. אנו מקוים שתהנו מהתמיכה שכלי מצוין זה יעניק לארגון שלכם! " & chr(13) & chr(10) & chr(13) & chr(10) & " רב תודות לג''ון פנפולד <asp@asp-dev.com> וטים טיל<tteal@tealnet.com>על קוד המקור ולכל האנשים בפורום סניץ 2000 בכתובת http://forum.snitz.com על תמיכתם המתמשכת במוצר זה.', " strSql = strSql & "1, 0, 0, 0, '" & strCurrentDateTime & "', '" & strCurrentDateTime & "', 0, '000.000.000.000', 1, 0, 1)" my_Conn.Execute (strSql),,adCmdText + adExecuteNoRecords 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 INTO " & strTablePrefix & "TOTALS (COUNT_ID, P_COUNT, T_COUNT, U_COUNT) " strSql = strSql & "VALUES(1,1,1,1)" my_Conn.Execute (strSql),,adCmdText + adExecuteNoRecords ChkDBInstall() end if rs.close set rs = nothing strSql = "SELECT B_ID FROM " & strFilterTablePrefix & "BADWORDS " set rs = my_Conn.Execute(strSql) if rs.EOF then strSql = "INSERT INTO " & strFilterTablePrefix & "BADWORDS (B_BADWORD, B_REPLACE) VALUES ('זין','***')" my_Conn.Execute (strSql),,adCmdText + adExecuteNoRecords ChkDBInstall() strSql = "INSERT INTO " & strFilterTablePrefix & "BADWORDS (B_BADWORD, B_REPLACE) VALUES ('לאונן','*****')" my_Conn.Execute (strSql),,adCmdText + adExecuteNoRecords ChkDBInstall() strSql = "INSERT INTO " & strFilterTablePrefix & "BADWORDS (B_BADWORD, B_REPLACE) VALUES ('חרא','***')" my_Conn.Execute (strSql),,adCmdText + adExecuteNoRecords ChkDBInstall() strSql = "INSERT INTO " & strFilterTablePrefix & "BADWORDS (B_BADWORD, B_REPLACE) VALUES ('כוס','***')" my_Conn.Execute (strSql),,adCmdText + adExecuteNoRecords ChkDBInstall() strSql = "INSERT INTO " & strFilterTablePrefix & "BADWORDS (B_BADWORD, B_REPLACE) VALUES ('לזיין','*****')" my_Conn.Execute (strSql),,adCmdText + adExecuteNoRecords ChkDBInstall() end if rs.close set rs = nothing strSql = "SELECT GROUP_ID FROM " & strTablePrefix & "GROUP_NAMES " set rs = my_Conn.Execute(strSql) if rs.EOF then strSql = "INSERT INTO " & strTablePrefix & "GROUP_NAMES (GROUP_NAME,GROUP_DESCRIPTION) VALUES ('כל הקטגוריות שיש לך הרשאות גישה אליהן','כל הקטגוריות שיש לך הרשאות גישה אליהן')" my_Conn.Execute (strSql),,adCmdText + adExecuteNoRecords ChkDBInstall() strSql = "INSERT INTO " & strTablePrefix & "GROUP_NAMES (GROUP_NAME,GROUP_DESCRIPTION) VALUES ('קטגוריות ברירת מחדל','קטגוריות ברירת מחדל')" my_Conn.Execute (strSql),,adCmdText + adExecuteNoRecords ChkDBInstall() end if rs.close set rs = nothing strSql = "SELECT GROUP_ID FROM " & strTablePrefix & "GROUPS " set rs = my_Conn.Execute(strSql) if rs.EOF then strSql = "INSERT INTO " & strTablePrefix & "GROUPS (GROUP_ID, GROUP_CATID) VALUES (2,1)" my_Conn.Execute (strSql),,adCmdText + adExecuteNoRecords ChkDBInstall() end if rs.close set rs = nothing on error goto 0 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 = "