git-svn-id: file:///svn/phpbb/branches/phpBB-2_0_0@2733 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Paul S. Owen 2002-07-24 21:58:04 +00:00
parent 337dd98fd4
commit f6799a7f55
4 changed files with 0 additions and 1523 deletions

View file

@ -1,186 +0,0 @@
/*
* Basic DB data for phpBB2 devel
*
* $Id$
*/
-- Config
INSERT INTO phpbb_config VALUES ('board_disable','0');
INSERT INTO phpbb_config VALUES ('board_startdate','994190324');
INSERT INTO phpbb_config VALUES ('sitename','yourdomain.com');
INSERT INTO phpbb_config VALUES ('cookie_name','phpbb2oracle');
INSERT INTO phpbb_config VALUES ('cookie_path','/');
INSERT INTO phpbb_config VALUES ('cookie_domain','');
INSERT INTO phpbb_config VALUES ('cookie_secure','0');
INSERT INTO phpbb_config VALUES ('session_length','900');
INSERT INTO phpbb_config VALUES ('allow_html','0');
INSERT INTO phpbb_config VALUES ('allow_html_tags','b,i,u,pre');
INSERT INTO phpbb_config VALUES ('allow_bbcode','1');
INSERT INTO phpbb_config VALUES ('allow_smilies','1');
INSERT INTO phpbb_config VALUES ('allow_sig','1');
INSERT INTO phpbb_config VALUES ('allow_namechange','0');
INSERT INTO phpbb_config VALUES ('allow_theme_create','0');
INSERT INTO phpbb_config VALUES ('allow_avatar_local','0');
INSERT INTO phpbb_config VALUES ('allow_avatar_remote','1');
INSERT INTO phpbb_config VALUES ('allow_avatar_upload','1');
INSERT INTO phpbb_config VALUES ('override_user_style','0');
INSERT INTO phpbb_config VALUES ('posts_per_page','15');
INSERT INTO phpbb_config VALUES ('topics_per_page','50');
INSERT INTO phpbb_config VALUES ('hot_threshold','25');
INSERT INTO phpbb_config VALUES ('max_poll_options','10');
INSERT INTO phpbb_config VALUES ('max_sig_chars','255');
INSERT INTO phpbb_config VALUES ('max_inbox_privmsgs','50');
INSERT INTO phpbb_config VALUES ('max_sentbox_privmsgs','25');
INSERT INTO phpbb_config VALUES ('max_savebox_privmsgs','50');
INSERT INTO phpbb_config VALUES ('board_email_sig','Thanks, The Management');
INSERT INTO phpbb_config VALUES ('board_email','youraddress@yourdomain.com');
INSERT INTO phpbb_config VALUES ('smtp_delivery','0');
INSERT INTO phpbb_config VALUES ('smtp_host','');
INSERT INTO phpbb_config VALUES ('require_activation','0');
INSERT INTO phpbb_config VALUES ('require_admin_activation','0');
INSERT INTO phpbb_config VALUES ('flood_interval','15');
INSERT INTO phpbb_config VALUES ('avatar_filesize','6144');
INSERT INTO phpbb_config VALUES ('avatar_max_width','80');
INSERT INTO phpbb_config VALUES ('avatar_max_height','80');
INSERT INTO phpbb_config VALUES ('avatar_path','images/avatars');
INSERT INTO phpbb_config VALUES ('smilies_path','images/smiles');
INSERT INTO phpbb_config VALUES ('default_style','8');
INSERT INTO phpbb_config VALUES ('default_admin_style','2');
INSERT INTO phpbb_config VALUES ('default_lang','english');
INSERT INTO phpbb_config VALUES ('default_dateformat','D M d, Y g:i a');
INSERT INTO phpbb_config VALUES ('board_timezone','0');
INSERT INTO phpbb_config VALUES ('prune_enable','1');
INSERT INTO phpbb_config VALUES ('gzip_compress','1');
INSERT INTO phpbb_config VALUES ('record_online_users','0');
INSERT INTO phpbb_config VALUES ('record_online_date','0');
INSERT INTO phpbb_config VALUES ('script_path', '/phpBB2/');
INSERT INTO phpbb_config VALUES ('version', 'RC-4');
INSERT INTO phpbb_config VALUES ('server_name', 'www.yourdomain.tld');
INSERT INTO phpbb_config VALUES ('server_port', '80');
-- Categories
INSERT INTO phpbb_categories (cat_id, cat_title, cat_order) VALUES (1, 'Test category 1', 1);
-- Forums
INSERT INTO phpbb_forums (forum_id, forum_name, forum_desc, cat_id, forum_order, forum_posts, forum_topics, forum_last_post_id, auth_view, auth_read, auth_post, auth_reply, auth_edit, auth_delete, auth_announce, auth_sticky, auth_pollcreate, auth_vote, auth_attachments) VALUES (1, 'Test Forum 1', 'This is just a test forum, nothing special here.', 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 3, 3, 3, 3, 3);
-- Users
INSERT INTO phpbb_users (user_id, username, user_level, user_regdate, user_password, user_autologin_key, user_email, user_icq, user_website, user_occ, user_from, user_interests, user_sig, user_viewemail, user_style, user_aim, user_yim, user_msnm, user_posts, user_attachsig, user_allowsmile, user_allowhtml, user_allowbbcode, user_allow_pm, user_notify_pm, user_allow_viewonline, user_rank, user_avatar, user_lang, user_timezone, user_dateformat, user_actkey, user_newpasswd, user_notify, user_active, user_template) VALUES
( '-1', 'Anonymous', '0', '972086460', '1', '', '', '', '', '', '', '', '', '0', '0', '', '', '', '0', '', '', '', '0', '0', '1', '1', '', '', '', '-8', 'D M d, Y g:i a', '', '', '0', '0');
-- username: admin password: admin (change this or remove it once everything is working!)
INSERT INTO phpbb_users (user_id, username, user_level, user_regdate, user_password, user_autologin_key, user_email, user_icq, user_website, user_occ, user_from, user_interests, user_sig, user_viewemail, user_style, user_aim, user_yim, user_msnm, user_posts, user_attachsig, user_allowsmile, user_allowhtml, user_allowbbcode, user_allow_pm, user_notify_pm, user_allow_viewonline, user_rank, user_avatar, user_lang, user_timezone, user_dateformat, user_actkey, user_newpasswd, user_notify, user_active) VALUES ( '2', 'Admin', '1', '972086460', '21232f297a57a5a743894a0e4a801fc3', '', 'admin@yourdomain.com', '', '', '', '', '', 'A Signature', '1', '2', '', '', '', '0', '0', '1', '0', '1', '1', '1', '1', '1', '', 'english', '-8', 'd M Y h:i a', '', '', '0', '1');
-- Ranks
INSERT INTO phpbb_ranks (rank_id, rank_title, rank_min, rank_special, rank_image) VALUES ( '1', 'Site Admin', '-1', '1', '');
INSERT INTO phpbb_ranks (rank_id, rank_title, rank_min, rank_special, rank_image) VALUES ( '2', 'Newbie', '0', '0', '');
INSERT INTO phpbb_ranks (rank_id, rank_title, rank_min, rank_special, rank_image) VALUES ( '5', 'Here Often', '10', '0', '');
INSERT INTO phpbb_ranks (rank_id, rank_title, rank_min, rank_special, rank_image) VALUES ( '6', 'Should Get Out More', '50', '0', '');
INSERT INTO phpbb_ranks (rank_id, rank_title, rank_min, rank_special, rank_image) VALUES ( '7', 'Has No Life', '200', '0', '');
-- Groups
INSERT INTO phpbb_groups (group_id, group_name, group_description, group_single_user) VALUES (1, 'Anonymous', 'Personal User', 1);
INSERT INTO phpbb_groups (group_id, group_name, group_description, group_single_user) VALUES (2, 'Admin', 'Personal User', 1);
-- User -> Group
INSERT INTO phpbb_user_group (group_id, user_id, user_pending) VALUES (1, -1, 0);
INSERT INTO phpbb_user_group (group_id, user_id, user_pending) VALUES (2, 2, 0);
-- User Access (admin is set as ... an admin)
INSERT INTO phpbb_auth_access (group_id, forum_id, auth_view, auth_read, auth_post, auth_reply, auth_edit, auth_delete, auth_announce, auth_sticky, auth_pollcreate, auth_vote, auth_mod) VALUES (2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1);
-- Demo Topic
INSERT INTO phpbb_topics (topic_id, topic_title, topic_poster, topic_time, topic_views, topic_replies, forum_id, topic_status, topic_type, topic_last_post_id) VALUES (1, 'Demo Topic', 2, 972086460, 0, 0, 1, 0, 0, 1);
-- Demo Post
INSERT INTO phpbb_posts (post_id, topic_id, forum_id, poster_id, post_time, post_username, poster_ip) VALUES (1, 1, 1, 2, 972086460, '', '7F000001');
INSERT INTO phpbb_posts_text (post_id, post_subject, post_text) VALUES (1, 'This is the subject', 'This is a demo post in the demo topic, what do you think of it?');
-- Themes
INSERT INTO phpbb_themes (themes_id, style_name, template_name, head_stylesheet, body_background, body_bgcolor, body_text, body_link, body_vlink, body_alink, body_hlink, tr_color1, tr_color2, tr_color3, tr_class1, tr_class2, tr_class3, th_color1, th_color2, th_color3, th_class1, th_class2, th_class3, td_color1, td_color2, td_color3, td_class1, td_class2, td_class3, fontface1, fontface2, fontface3, fontsize1, fontsize2, fontsize3, fontcolor1, fontcolor2, fontcolor3, span_class1, span_class2, span_class3) VALUES (1,'Original default','Default','','','','','','','','','','','','','','','','','','','','','CCCCCC','DDDDDD','','','','','','','',NULL,NULL,NULL,'','','','','','');
INSERT INTO phpbb_themes (themes_id, style_name, template_name, head_stylesheet, body_background, body_bgcolor, body_text, body_link, body_vlink, body_alink, body_hlink, tr_color1, tr_color2, tr_color3, tr_class1, tr_class2, tr_class3, th_color1, th_color2, th_color3, th_class1, th_class2, th_class3, td_color1, td_color2, td_color3, td_class1, td_class2, td_class3, fontface1, fontface2, fontface3, fontsize1, fontsize2, fontsize3, fontcolor1, fontcolor2, fontcolor3, span_class1, span_class2, span_class3) VALUES (2,'PSO [ Grey ]','PSO', '','','FFFFFF','000000','002266','004411','','','','','','','','','000000','D2D2D2','BCBCBC','','','','EDEDED','DEDEDE','','row1','row2','','verdana,serif','arial,helvetica','courier',1,2,3,'','','','','','');
INSERT INTO phpbb_themes (themes_id, style_name, template_name, head_stylesheet, body_background, body_bgcolor, body_text, body_link, body_vlink, body_alink, body_hlink, tr_color1, tr_color2, tr_color3, tr_class1, tr_class2, tr_class3, th_color1, th_color2, th_color3, th_class1, th_class2, th_class3, td_color1, td_color2, td_color3, td_class1, td_class2, td_class3, fontface1, fontface2, fontface3, fontsize1, fontsize2, fontsize3, fontcolor1, fontcolor2, fontcolor3, span_class1, span_class2, span_class3) VALUES (3,'PSO [ Wheat ] ','PSO','','','FFFFFF','000000','002266','004411','','','','','','','','','001100','E5CCA5','D4A294','','','','EBE4D9','DAD1C4','','row1','row2','','verdana,serif','arial,helvetica','courier',1,2,3,'000000','','','','','');
INSERT INTO phpbb_themes (themes_id, style_name, template_name, head_stylesheet, body_background, body_bgcolor, body_text, body_link, body_vlink, body_alink, body_hlink, tr_color1, tr_color2, tr_color3, tr_class1, tr_class2, tr_class3, th_color1, th_color2, th_color3, th_class1, th_class2, th_class3, td_color1, td_color2, td_color3, td_class1, td_class2, td_class3, fontface1, fontface2, fontface3, fontsize1, fontsize2, fontsize3, fontcolor1, fontcolor2, fontcolor3, span_class1, span_class2, span_class3) VALUES (4,'PSO [ Ocean ]','PSO','','','DFF5FF','000000','011001','2100cc','','','','','','','','','000000','A7C1CB','7897A8','','','','83D7CC','A0CCE0','','row1','row2','','verdana,serif','arial,helvetica','courier',1,2,3,'','','','','','');
INSERT INTO phpbb_themes (themes_id, style_name, template_name, head_stylesheet, body_background, body_bgcolor, body_text, body_link, body_vlink, body_alink, body_hlink, tr_color1, tr_color2, tr_color3, tr_class1, tr_class2, tr_class3, th_color1, th_color2, th_color3, th_class1, th_class2, th_class3, td_color1, td_color2, td_color3, td_class1, td_class2, td_class3, fontface1, fontface2, fontface3, fontsize1, fontsize2, fontsize3, fontcolor1, fontcolor2, fontcolor3, span_class1, span_class2, span_class3) VALUES (6,'PSO [ Blue ]','PSO','','','FFFFFF','000000','417FB9','4E6172','0000AA','','','','','','','','000000','90BAE2','5195D4','','','','cde3f2','daedFd','','row1','row2','','verdana,serif','arial,helvetica','courier',1,2,3,'000000','','','','','');
INSERT INTO phpbb_themes (themes_id, style_name, template_name, head_stylesheet, body_background, body_bgcolor, body_text, body_link, body_vlink, body_alink, body_hlink, tr_color1, tr_color2, tr_color3, tr_class1, tr_class2, tr_class3, th_color1, th_color2, th_color3, th_class1, th_class2, th_class3, td_color1, td_color2, td_color3, td_class1, td_class2, td_class3, fontface1, fontface2, fontface3, fontsize1, fontsize2, fontsize3, fontcolor1, fontcolor2, fontcolor3, span_class1, span_class2, span_class3) VALUES (7,'PSO [ Cool Midnight ]','PSO', '','','444444','ECECEC','EDF2F2','DDEDED','FFFFFF','EDF2F2','','','','','','','000000','80707F','66555F','','','','60707D','667A80','','row1','row2','','Verdana,serif','Arial,Helvetica,sans-serif','courier',NULL,NULL,NULL,'ECECEC','ECECEC','ECECEC','','','');
INSERT INTO phpbb_themes (themes_id, style_name, template_name, head_stylesheet, body_background, body_bgcolor, body_text, body_link, body_vlink, body_alink, body_hlink, tr_color1, tr_color2, tr_color3, tr_class1, tr_class2, tr_class3, th_color1, th_color2, th_color3, th_class1, th_class2, th_class3, td_color1, td_color2, td_color3, td_class1, td_class2, td_class3, fontface1, fontface2, fontface3, fontsize1, fontsize2, fontsize3, fontcolor1, fontcolor2, fontcolor3, span_class1, span_class2, span_class3) VALUES (8,'PSO [ Pastel Purple ]','PSO','','','FFFFFF','000000','445588','337744','','','','','','','','','CCCCDD','CCCCDD','DDDDEE','','','','EFEFEF','FEFEFE','','row1','row2','','Verdana,serif','Arial,Helvetica,sans-serif','courier',1,2,3,'','','0000EE','','','');
INSERT INTO phpbb_themes (themes_id, template_name, style_name, head_stylesheet, body_background, body_bgcolor, body_text, body_link, body_vlink, body_alink, body_hlink, tr_color1, tr_color2, tr_color3, tr_class1, tr_class2, tr_class3, th_color1, th_color2, th_color3, th_class1, th_class2, th_class3, td_color1, td_color2, td_color3, td_class1, td_class2, td_class3, fontface1, fontface2, fontface3, fontsize1, fontsize2, fontsize3, fontcolor1, fontcolor2, fontcolor3, span_class1, span_class2, span_class3) VALUES (9,'subSilver','subSilver','subSilver','','E5E5E5','000000','006699','5584AA','FF9933','EDF2F2','EFEFEF','DEE3E7','c2cdd6','','','','CBD3D9','BCBCBC','1B7CAD','','','','AEBDC4','006699','FFFFFF','row1','row2','','Verdana,Arial,Helvetica,sans-serif','Verdana,Arial,Helvetica,sans-serif','courier','','','','004c75','004c75','004c75','','','');
-- Smilies
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( '1', ':D', 'icon_biggrin.gif', 'Very Happy');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( '2', ':-D', 'icon_biggrin.gif', 'Very Happy');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( '3', ':grin:', 'icon_biggrin.gif', 'Very Happy');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( '4', ':)', 'icon_smile.gif', 'Smile');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( '5', ':-)', 'icon_smile.gif', 'Smile');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( '6', ':smile:', 'icon_smile.gif', 'Smile');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( '7', ':(', 'icon_sad.gif', 'Sad');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( '8', ':-(', 'icon_sad.gif', 'Sad');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( '9', ':sad:', 'icon_sad.gif', 'Sad');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( '10', ':o', 'icon_eek.gif', 'Surprised');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( '11', ':-o', 'icon_eek.gif', 'Surprised');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( '12', ':eek:', 'icon_eek.gif', 'Surprised');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( '13', ':?', 'icon_confused.gif', 'Confused');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( '14', ':-?', 'icon_confused.gif', 'Confused');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( '15', ':???:', 'icon_confused.gif', 'Confused');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( '16', '8)', 'icon_cool.gif', 'Cool');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( '17', '8-)', 'icon_cool.gif', 'Cool');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( '18', ':cool:', 'icon_cool.gif', 'Cool');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( '19', ':lol:', 'icon_lol.gif', 'Laughing');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( '20', ':x', 'icon_mad.gif', 'Mad');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( '21', ':-x', 'icon_mad.gif', 'Mad');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( '22', ':mad:', 'icon_mad.gif', 'Mad');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( '23', ':P', 'icon_razz.gif', 'Razz');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( '24', ':-P', 'icon_razz.gif', 'Razz');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( '25', ':razz:', 'icon_razz.gif', 'Razz');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( '26', ':oops:', 'icon_redface.gif', 'Embarassed');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( '27', ':cry:', 'icon_cry.gif', 'Crying or Very sad');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( '28', ':evil:', 'icon_evil.gif', 'Evil or Very Mad');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( '29', ':roll:', 'icon_rolleyes.gif', 'Rolling Eyes');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( '30', ':wink:', 'icon_wink.gif', 'Wink');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( '31', ';)', 'icon_wink.gif', 'Wink');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( '32', ';-)', 'icon_wink.gif', 'Wink');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( '33', ':!:', 'icon_exclaim.gif', 'Exclamation');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( '34', ':?:', 'icon_question.gif', 'Question');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( '35', ':idea:', 'icon_idea.gif', 'Idea');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( '36', ':arrow:', 'icon_arrow.gif', 'Arrow');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( '37', ':|', 'icon_neutral.gif', 'Neutral');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( '38', ':-|', 'icon_neutral.gif', 'Neutral');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( '39', ':neutral:', 'icon_neutral.gif', 'Neutral');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( '40', ':mrgreen:', 'icon_mrgreen.gif', 'Mr. Green');
-- Words
INSERT INTO phpbb_words (word_id, word, replacement) VALUES ( '1', 'asshole', '*beep*');
INSERT INTO phpbb_words (word_id, word, replacement) VALUES ( '2', 'assram*', '*beep*');
INSERT INTO phpbb_words (word_id, word, replacement) VALUES ( '3', 'asswipe', '*beep*');
INSERT INTO phpbb_words (word_id, word, replacement) VALUES ( '4', 'asstool*', '*beep*');
INSERT INTO phpbb_words (word_id, word, replacement) VALUES ( '5', 'bastard', '*beep*');
INSERT INTO phpbb_words (word_id, word, replacement) VALUES ( '6', 'bitch', '*beep*');
INSERT INTO phpbb_words (word_id, word, replacement) VALUES ( '7', 'bollock*', '*beep*');
INSERT INTO phpbb_words (word_id, word, replacement) VALUES ( '8', 'crap*', '*beep*');
INSERT INTO phpbb_words (word_id, word, replacement) VALUES ( '9', '*crap', '*beep*');
INSERT INTO phpbb_words (word_id, word, replacement) VALUES ( '10', 'cunt*', '*beep*');
INSERT INTO phpbb_words (word_id, word, replacement) VALUES ( '11', 'dickweed', '*beep*');
INSERT INTO phpbb_words (word_id, word, replacement) VALUES ( '12', 'dickwad', '*beep*');
INSERT INTO phpbb_words (word_id, word, replacement) VALUES ( '13', 'dickhead', '*beep*');
INSERT INTO phpbb_words (word_id, word, replacement) VALUES ( '14', '*fuck*', '*beep*');
INSERT INTO phpbb_words (word_id, word, replacement) VALUES ( '15', 'fuk*', '*beep*');
INSERT INTO phpbb_words (word_id, word, replacement) VALUES ( '16', 'masturbat*', '*beep*');
INSERT INTO phpbb_words (word_id, word, replacement) VALUES ( '17', 'piss*', '*beep*');
INSERT INTO phpbb_words (word_id, word, replacement) VALUES ( '18', 'prick', '*beep*');
INSERT INTO phpbb_words (word_id, word, replacement) VALUES ( '19', 'pussy', '*beep*');
INSERT INTO phpbb_words (word_id, word, replacement) VALUES ( '20', '*shit*', '*beep*');
INSERT INTO phpbb_words (word_id, word, replacement) VALUES ( '21', 'slut', '*beep*');
INSERT INTO phpbb_words (word_id, word, replacement) VALUES ( '22', 'tits', '*beep*');
INSERT INTO phpbb_words (word_id, word, replacement) VALUES ( '23', '*wank*', '*beep*');
COMMIT;

View file

@ -1,521 +0,0 @@
/*
phpBB2 Oracle 8i DB schema - (c) 2001 The phpBB Group
$Id$
*/
/*
This first section is optional, however its probably the best method
of running phpBB on Oracle. If you already have a tablespace and user created
for phpBB you can leave this section commented out!
The first set of statements create a phpBB tablespace and a phpBB user,
make sure you change the password of the phpBB user befor you run this script!!
*/
/*
CREATE TABLESPACE phpbb
DATAFILE 'E:/web/Oracle8i/ORADATA/phpbb01.dbf'
SIZE 10M
AUTOEXTEND ON NEXT 10M
MAXSIZE 100M;
CREATE USER phpbb
IDENTIFIED BY phpbb_password
DEFAULT TABLESPACE phpbb
TEMPORARY TABLESPACE temp;
GRANT CREATE SESSION TO phpbb;
GRANT CREATE TABLE TO phpbb;
GRANT CREATE SEQUENCE TO phpbb;
GRANT CREATE TRIGGER TO phpbb;
ALTER USER phpbb QUOTA unlimited ON phpbb;
COMMIT;
DISCONNECT;
CONNECT phpbb/phpbb_password;
*/
CREATE SEQUENCE phpbb_banlist_id_seq increment by 1 start with 2 minvalue 0;
CREATE SEQUENCE phpbb_categories_id_seq increment by 1 start with 2 minvalue 0;
CREATE SEQUENCE phpbb_config_id_seq increment by 1 start with 2 minvalue 0;
CREATE SEQUENCE phpbb_disallow_id_seq increment by 1 start with 2 minvalue 0;
CREATE SEQUENCE phpbb_forums_id_seq increment by 1 start with 2 minvalue 0;
CREATE SEQUENCE phpbb_posts_id_seq increment by 1 start with 2 minvalue 0;
CREATE SEQUENCE phpbb_privmsgs_id_seq increment by 1 start with 2 minvalue 0;
CREATE SEQUENCE phpbb_ranks_id_seq increment by 1 start with 2 minvalue 0;
CREATE SEQUENCE phpbb_smilies_id_seq increment by 1 start with 2 minvalue 0;
CREATE SEQUENCE phpbb_themes_id_seq increment by 1 start with 2 minvalue 0;
CREATE SEQUENCE phpbb_topics_id_seq increment by 1 start with 2 minvalue 0;
CREATE SEQUENCE phpbb_users_id_seq increment by 1 start with 2 minvalue 0;
CREATE SEQUENCE phpbb_words_id_seq increment by 1 start with 2 minvalue 0;
CREATE SEQUENCE phpbb_groups_id_seq increment by 1 start with 2 minvalue 0;
CREATE SEQUENCE phpbb_forum_prune_id_seq increment by 1 start with 2 minvalue 0;
CREATE SEQUENCE phpbb_vote_desc_id_seq increment by 1 start with 2 minvalue 0;
/* --------------------------------------------------------
Table structure for table phpbb_auth_access
-------------------------------------------------------- */
CREATE TABLE phpbb_auth_access (
group_id number(4) DEFAULT '0' NOT NULL,
forum_id number(4) DEFAULT '0' NOT NULL,
auth_view number(4) DEFAULT '0' NOT NULL,
auth_read number(4) DEFAULT '0' NOT NULL,
auth_post number(4) DEFAULT '0' NOT NULL,
auth_reply number(4) DEFAULT '0' NOT NULL,
auth_edit number(4) DEFAULT '0' NOT NULL,
auth_delete number(4) DEFAULT '0' NOT NULL,
auth_announce number(4) DEFAULT '0' NOT NULL,
auth_sticky number(4) DEFAULT '0' NOT NULL,
auth_pollcreate number(4) DEFAULT '0' NOT NULL,
auth_attachments number(4) DEFAULT '0' NOT NULL,
auth_vote number(4) DEFAULT '0' NOT NULL,
auth_mod number(4) DEFAULT '0' NOT NULL,
CONSTRAINT phpbb_auth_access_pkey PRIMARY KEY (group_id)
);
CREATE INDEX group_phpbb_auth_access_index ON phpbb_auth_access (forum_id);
/* --------------------------------------------------------
Table structure for table phpbb_groups
-------------------------------------------------------- */
CREATE TABLE phpbb_groups (
group_id number(4) NOT NULL,
group_name varchar(40) NOT NULL,
group_type number(2) DEFAULT '1' NOT NULL,
group_description varchar(255) NOT NULL,
group_moderator number(4) DEFAULT '0' NOT NULL,
group_single_user number(4) DEFAULT '0' NOT NULL,
CONSTRAINT phpbb_groups_pkey PRIMARY KEY (group_id)
);
/* --------------------------------------------------------
Table structure for table phpbb_banlist
-------------------------------------------------------- */
CREATE TABLE phpbb_banlist (
ban_id number(4) NOT NULL,
ban_userid number(4),
ban_ip char(8),
ban_email varchar(255),
CONSTRAINT phpbb_banlist_pkey PRIMARY KEY (ban_id)
);
CREATE INDEX ban_userid_phpbb_banlist_index ON phpbb_banlist (ban_userid);
/* --------------------------------------------------------
Table structure for table phpbb_categories
-------------------------------------------------------- */
CREATE TABLE phpbb_categories (
cat_id number(4) NOT NULL,
cat_title varchar(100),
cat_order number(4),
CONSTRAINT phpbb_categories_pkey PRIMARY KEY (cat_id)
);
/* --------------------------------------------------------
Table structure for table phpbb_config
-------------------------------------------------------- */
CREATE TABLE phpbb_config (
config_name varchar(255) NOT NULL,
config_value varchar(255),
CONSTRAINT phpbb_config_pkey PRIMARY KEY (config_name)
);
/* --------------------------------------------------------
Table structure for table phpbb_disallow
-------------------------------------------------------- */
CREATE TABLE phpbb_disallow (
disallow_id number(4) NOT NULL,
disallow_username varchar(25),
CONSTRAINT phpbb_disallow_pkey PRIMARY KEY (disallow_id)
);
/* --------------------------------------------------------
Table structure for table phpbb_forums
-------------------------------------------------------- */
CREATE TABLE phpbb_forums (
forum_id number(4) NOT NULL,
cat_id number(4),
forum_name varchar(150),
forum_desc varchar(2000),
forum_status number(4) DEFAULT '0' NOT NULL,
forum_order number(4) DEFAULT '1' NOT NULL,
forum_posts number(4) DEFAULT '0' NOT NULL,
forum_topics number(4) DEFAULT '0' NOT NULL,
forum_last_post_id number(4) DEFAULT '0' NOT NULL,
prune_enable number(4) DEFAULT '0' NOT NULL,
prune_next number(4),
auth_view number(4) DEFAULT '0' NOT NULL,
auth_read number(4) DEFAULT '0' NOT NULL,
auth_post number(4) DEFAULT '0' NOT NULL,
auth_reply number(4) DEFAULT '0' NOT NULL,
auth_edit number(4) DEFAULT '0' NOT NULL,
auth_delete number(4) DEFAULT '0' NOT NULL,
auth_announce number(4) DEFAULT '0' NOT NULL,
auth_sticky number(4) DEFAULT '0' NOT NULL,
auth_pollcreate number(4) DEFAULT '0' NOT NULL,
auth_vote number(4) DEFAULT '0' NOT NULL,
auth_attachments number(4) DEFAULT '0' NOT NULL,
CONSTRAINT phpbb_forums_pkey PRIMARY KEY (forum_id)
);
CREATE INDEX cat_id_phpbb_forums_index ON phpbb_forums (cat_id);
CREATE INDEX forums_order_phpbb_forums ON phpbb_forums (forum_order);
/* --------------------------------------------------------
Table structure for table phpbb_forum_prune
-------------------------------------------------------- */
CREATE TABLE phpbb_forum_prune (
prune_id number(4) NOT NULL,
forum_id number(4) NOT NULL,
prune_days number(4) NOT NULL,
prune_freq number(4) NOT NULL,
CONSTRAINT phpbb_forum_prune_pkey PRIMARY KEY (prune_id)
);
CREATE INDEX forum_id_phpbb_forum_prune ON phpbb_forum_prune (forum_id);
/* --------------------------------------------------------
Table structure for table phpbb_posts
-------------------------------------------------------- */
CREATE TABLE phpbb_posts (
post_id number(4) NOT NULL,
topic_id number(4) DEFAULT '0' NOT NULL,
forum_id number(4) DEFAULT '0' NOT NULL,
poster_id number(4) DEFAULT '0' NOT NULL,
post_time number(11) DEFAULT '0' NOT NULL,
post_username varchar(30),
poster_ip char(8) DEFAULT '' NOT NULL,
enable_bbcode number(4) DEFAULT '1' NOT NULL,
enable_html number(4) DEFAULT '0' NOT NULL,
enable_smilies number(4) DEFAULT '1' NOT NULL,
enable_sig number(4) DEFAULT '1' NOT NULL,
post_edit_time number(11),
post_edit_count number(4) DEFAULT '0' NOT NULL,
CONSTRAINT phpbb_posts_pkey PRIMARY KEY (post_id)
);
CREATE INDEX forum_id_phpbb_posts_index ON phpbb_posts (forum_id);
CREATE INDEX post_time_phpbb_posts_index ON phpbb_posts (post_time);
CREATE INDEX poster_id_phpbb_posts_index ON phpbb_posts (poster_id);
CREATE INDEX topic_id_phpbb_posts_index ON phpbb_posts (topic_id);
/* --------------------------------------------------------
Table structure for table phpbb_posts_text
-------------------------------------------------------- */
CREATE TABLE phpbb_posts_text (
post_id number(4) DEFAULT '0' NOT NULL,
bbcode_uid varchar(10) DEFAULT '',
post_subject varchar(255),
post_text varchar(2000),
CONSTRAINT phpbb_posts_text_pkey PRIMARY KEY (post_id)
);
/* --------------------------------------------------------
Table structure for table phpbb_privmsgs
-------------------------------------------------------- */
CREATE TABLE phpbb_privmsgs (
privmsgs_id number(4) NOT NULL,
privmsgs_type number(4) DEFAULT '0' NOT NULL,
privmsgs_subject varchar(255) DEFAULT '0' NOT NULL,
privmsgs_from_userid number(4) DEFAULT '0' NOT NULL,
privmsgs_to_userid number(4) DEFAULT '0' NOT NULL,
privmsgs_date number(4) DEFAULT '0' NOT NULL,
privmsgs_ip char(8) NOT NULL,
privmsgs_enable_bbcode number(1) DEFAULT '1' NOT NULL,
privmsgs_enable_html number(1) DEFAULT '0' NOT NULL,
privmsgs_enable_smilies number(1) DEFAULT '1' NOT NULL,
privmsgs_attach_sig number(1) DEFAULT '1' NOT NULL,
CONSTRAINT phpbb_privmsgs_pkey PRIMARY KEY (privmsgs_id)
);
CREATE INDEX privmsgs_from_userid_index ON phpbb_privmsgs (privmsgs_from_userid);
CREATE INDEX privmsgs_to_userid_index ON phpbb_privmsgs (privmsgs_to_userid);
/* --------------------------------------------------------
Table structure for table phpbb_privmsgs_text
-------------------------------------------------------- */
CREATE TABLE phpbb_privmsgs_text (
privmsgs_text_id number(4) DEFAULT '0' NOT NULL,
privmsgs_bbcode_uid char(10) DEFAULT '0' NOT NULL,
privmsgs_text varchar(2000),
CONSTRAINT phpbb_privmsgs_text_pkey PRIMARY KEY (privmsgs_text_id)
);
/* --------------------------------------------------------
Table structure for table phpbb_ranks
-------------------------------------------------------- */
CREATE TABLE phpbb_ranks (
rank_id number(4) NOT NULL,
rank_title varchar(50) DEFAULT '' NOT NULL,
rank_min number(4) DEFAULT '0' NOT NULL,
rank_special number(4) DEFAULT '0',
rank_image varchar(255),
CONSTRAINT phpbb_ranks_pkey PRIMARY KEY (rank_id)
);
CREATE INDEX rank_max_phpbb_ranks_index ON phpbb_ranks (rank_max);
CREATE INDEX rank_min_phpbb_ranks_index ON phpbb_ranks (rank_min);
/* --------------------------------------------------------
Table structure for table phpbb_session
-------------------------------------------------------- */
CREATE TABLE phpbb_sessions (
session_id char(32) DEFAULT '0' NOT NULL,
session_user_id number(11) DEFAULT '0' NOT NULL,
session_start number(11) DEFAULT '0' NOT NULL,
session_time number(11) DEFAULT '0' NOT NULL,
session_last_visit number(11) DEFAULT '0' NOT NULL,
session_ip char(8) DEFAULT '0' NOT NULL,
session_page number(11) DEFAULT '0' NOT NULL,
session_logged_in number(11) DEFAULT '0' NOT NULL,
CONSTRAINT phpbb_sessions_pkey PRIMARY KEY (session_id)
);
CREATE INDEX session_id_ip_user_id ON phpbb_sessions (session_id, session_ip, session_user_id);
/* --------------------------------------------------------
Table structure for table phpbb_smilies
-------------------------------------------------------- */
CREATE TABLE phpbb_smilies (
smilies_id number(4) NOT NULL,
code varchar(50),
smile_url varchar(100),
emoticon varchar(75),
CONSTRAINT phpbb_smilies_pkey PRIMARY KEY (smilies_id)
);
/* --------------------------------------------------------
Table structure for table phpbb_themes
-------------------------------------------------------- */
CREATE TABLE phpbb_themes (
themes_id number(4) NOT NULL,
style_name varchar(30),
template_name varchar(30) DEFAULT '' NOT NULL,
head_stylesheet varchar(100),
body_background varchar(100),
body_bgcolor char(6),
body_text char(6),
body_link char(6),
body_vlink char(6),
body_alink char(6),
body_hlink char(6),
tr_color1 char(6),
tr_color2 char(6),
tr_color3 char(6),
tr_class1 varchar(25),
tr_class2 varchar(25),
tr_class3 varchar(25),
th_color1 char(6),
th_color2 char(6),
th_color3 char(6),
th_class1 varchar(25),
th_class2 varchar(25),
th_class3 varchar(25),
td_color1 char(6),
td_color2 char(6),
td_color3 char(6),
td_class1 varchar(25),
td_class2 varchar(25),
td_class3 varchar(25),
fontface1 varchar(25),
fontface2 varchar(25),
fontface3 varchar(25),
fontsize1 number(4),
fontsize2 number(4),
fontsize3 number(4),
fontcolor1 char(6),
fontcolor2 char(6),
fontcolor3 char(6),
span_class1 varchar(25),
span_class2 varchar(25),
span_class3 varchar(25),
CONSTRAINT phpbb_themes_pkey PRIMARY KEY (themes_id)
);
/* --------------------------------------------------------
Table structure for table phpbb_themes_name
-------------------------------------------------------- */
CREATE TABLE phpbb_themes_name (
themes_id number(4) DEFAULT '0' NOT NULL,
tr_color1_name varchar(50),
tr_color2_name varchar(50),
tr_color3_name varchar(50),
tr_class1_name varchar(50),
tr_class2_name varchar(50),
tr_class3_name varchar(50),
th_color1_name varchar(50),
th_color2_name varchar(50),
th_color3_name varchar(50),
th_class1_name varchar(50),
th_class2_name varchar(50),
th_class3_name varchar(50),
td_color1_name varchar(50),
td_color2_name varchar(50),
td_color3_name varchar(50),
td_class1_name varchar(50),
td_class2_name varchar(50),
td_class3_name varchar(50),
fontface1_name varchar(50),
fontface2_name varchar(50),
fontface3_name varchar(50),
fontsize1_name varchar(50),
fontsize2_name varchar(50),
fontsize3_name varchar(50),
fontcolor1_name varchar(50),
fontcolor2_name varchar(50),
fontcolor3_name varchar(50),
span_class1_name varchar(50),
span_class2_name varchar(50),
span_class3_name varchar(50),
CONSTRAINT phpbb_themes_name_pkey PRIMARY KEY (themes_id)
);
/* --------------------------------------------------------
Table structure for table phpbb_topics
-------------------------------------------------------- */
CREATE TABLE phpbb_topics (
topic_id number(4) NOT NULL,
topic_title varchar(100) DEFAULT '' NOT NULL,
topic_poster number(4) DEFAULT '0' NOT NULL,
topic_time number(11) DEFAULT '0' NOT NULL,
topic_views number(4) DEFAULT '0' NOT NULL,
topic_replies number(4) DEFAULT '0' NOT NULL,
forum_id number(4) DEFAULT '0' NOT NULL,
topic_status number(4) DEFAULT '0' NOT NULL,
topic_vote number(4) DEFAULT '0' NOT NULL,
topic_type number(4) DEFAULT '0' NOT NULL,
topic_moved_id number(4),
topic_last_post_id number(4) DEFAULT '0' NOT NULL,
CONSTRAINT phpbb_topics_pkey PRIMARY KEY (topic_id)
);
CREATE INDEX phpbb_topics_index ON phpbb_topics (forum_id, topic_id);
CREATE INDEX forum_id_phpbb_topics_index ON phpbb_topics (forum_id);
/* --------------------------------------------------------
Table structure for table phpbb_topics_watch
-------------------------------------------------------- */
CREATE TABLE phpbb_topics_watch (
topic_id number(4),
user_id number(4),
notify_status number(4) DEFAULT '0' NOT NULL
);
CREATE INDEX phpbb_topics_watch_index ON phpbb_topics_watch (topic_id, user_id);
/* --------------------------------------------------------
Table structure for table phpbb_user_group
-------------------------------------------------------- */
CREATE TABLE phpbb_user_group (
group_id number(4) DEFAULT '0' NOT NULL,
user_id number(4) DEFAULT '0' NOT NULL,
user_pending number(4)
);
CREATE INDEX group_id_phpbb_user_group ON phpbb_user_group (group_id);
CREATE INDEX user_id_phpbb_user_group_index ON phpbb_user_group (user_id);
/* --------------------------------------------------------
Table structure for table phpbb_users
-------------------------------------------------------- */
CREATE TABLE phpbb_users (
user_id number(4) NOT NULL,
user_active number(4),
username varchar(25) DEFAULT '' NOT NULL,
user_regdate number(11) DEFAULT '0' NOT NULL,
user_password varchar(32) DEFAULT '' NOT NULL,
user_autologin_key varchar(32),
user_email varchar(255),
user_icq varchar(15),
user_website varchar(100),
user_occ varchar(100),
user_from varchar(100),
user_interests varchar(255),
user_sig varchar(2000),
user_sig_bbcode_uid char(10),
user_style number(4),
user_aim varchar(255),
user_yim varchar(255),
user_msnm varchar(255),
user_posts number(4) DEFAULT '0' NOT NULL,
user_viewemail number(4),
user_attachsig number(4),
user_allowhtml number(4) DEFAULT '1',
user_allowbbcode number(4) DEFAULT '1',
user_allowsmile number(4) DEFAULT '1',
user_allow_pm number(4) DEFAULT '1' NOT NULL,
user_allowavatar number(4) DEFAULT '1' NOT NULL,
user_allow_viewonline number(4) DEFAULT '1' NOT NULL,
user_rank number(4) DEFAULT '0',
user_avatar varchar(100),
user_level number(4) DEFAULT '1',
user_lang varchar(255),
user_timezone number(4) DEFAULT '0' NOT NULL,
user_dateformat varchar(14) DEFAULT 'd M Y H:m' NOT NULL,
user_notify_pm number(4) DEFAULT '1' NOT NULL,
user_notify number(4),
user_actkey varchar(32),
user_newpasswd varchar(32),
CONSTRAINT phpbb_users_pkey PRIMARY KEY (user_id)
);
/* --------------------------------------------------------
Table structure for table phpbb_vote_desc
-------------------------------------------------------- */
CREATE TABLE phpbb_vote_desc (
vote_id number(4) NOT NULL,
topic_id number(4) DEFAULT '0' NOT NULL,
vote_text varchar2(4000) NOT NULL,
vote_start number(4) DEFAULT '0' NOT NULL,
vote_length number(4) DEFAULT '0' NOT NULL,
CONSTRAINT phpbb_vote_dsc_pkey PRIMARY KEY (vote_id)
);
CREATE INDEX topic_id_phpbb_vote_desc_index ON phpbb_vote_desc (topic_id);
/* --------------------------------------------------------
Table structure for table phpbb_vote_results
-------------------------------------------------------- */
CREATE TABLE phpbb_vote_results (
vote_id number(4) DEFAULT '0' NOT NULL,
vote_option_id number(4) DEFAULT '0' NOT NULL,
vote_option_text varchar(255) NOT NULL,
vote_result number(4) DEFAULT '0' NOT NULL
);
CREATE INDEX option_id_vote_results_index ON phpbb_vote_results (vote_option_id);
/* --------------------------------------------------------
Table structure for table phpbb_vote_voters
-------------------------------------------------------- */
CREATE TABLE phpbb_vote_voters (
vote_id number(4) DEFAULT '0' NOT NULL,
vote_user_id number(4) DEFAULT '0' NOT NULL,
vote_user_ip char(8) NOT NULL
);
CREATE INDEX vote_id_vote_voters_index ON phpbb_vote_voters (vote_id);
CREATE INDEX vote_user_id_vote_voters_index ON phpbb_vote_voters (vote_user_id);
CREATE INDEX vote_user_ip_vote_voters_index ON phpbb_vote_voters (vote_user_ip);
/* --------------------------------------------------------
Table structure for table phpbb_words
-------------------------------------------------------- */
CREATE TABLE phpbb_words (
word_id number(4) NOT NULL,
word varchar(100) DEFAULT '' NOT NULL,
replacement varchar(100) DEFAULT '' NOT NULL,
CONSTRAINT phpbb_words_pkey PRIMARY KEY (word_id)
);
COMMIT;

View file

@ -1,217 +0,0 @@
/*
phpBB2 Oracle 8i Triggers File - (c) 2001 The phpBB Group
$Id$
*/
/* --------------------------------------------------------
Trigger structure for table phpbb_groups
-------------------------------------------------------- */
CREATE OR REPLACE TRIGGER "PHPBB"."SET_PHPBB_GROUPS_ID_SEQ"
BEFORE INSERT OR UPDATE OF "GROUP_ID" ON "PHPBB"."PHPBB_GROUPS"
REFERENCING OLD AS OLD NEW AS NEW
FOR EACH ROW
BEGIN
SELECT PHPBB_GROUPS_ID_SEQ.NEXTVAL
INTO :NEW.group_id
FROM DUAL;
END;
/
/* --------------------------------------------------------
Trigger structure for table phpbb_banlist
-------------------------------------------------------- */
CREATE OR REPLACE TRIGGER "PHPBB"."SET_PHPBB_BANLIST_ID_SEQ"
BEFORE INSERT OR UPDATE OF "BAN_ID" ON "PHPBB"."PHPBB_BANLIST"
REFERENCING OLD AS OLD NEW AS NEW
FOR EACH ROW
BEGIN
SELECT PHPBB_BANLIST_ID_SEQ.NEXTVAL
INTO :NEW.ban_id
FROM DUAL;
END;
/
/* --------------------------------------------------------
Trigger structure for table phpbb_categories
-------------------------------------------------------- */
CREATE OR REPLACE TRIGGER "PHPBB"."SET_CATEGORIES_ID_SEQ"
BEFORE INSERT OR UPDATE OF "CAT_ID" ON "PHPBB"."PHPBB_CATEGORIES"
REFERENCING OLD AS OLD NEW AS NEW
FOR EACH ROW
BEGIN
SELECT PHPBB_CATEGORIES_ID_SEQ.NEXTVAL
INTO :NEW.cat_id
FROM DUAL;
END;
/
/* --------------------------------------------------------
Trigger structure for table phpbb_disallow
-------------------------------------------------------- */
CREATE OR REPLACE TRIGGER "PHPBB"."SET_DISALLOW_ID_SEQ"
BEFORE INSERT OR UPDATE OF "DISALLOW_ID" ON "PHPBB"."PHPBB_DISALLOW"
REFERENCING OLD AS OLD NEW AS NEW
FOR EACH ROW
BEGIN
SELECT PHPBB_DISALLOW_ID_SEQ.NEXTVAL
INTO :NEW.disallow_id
FROM DUAL;
END;
/
/* --------------------------------------------------------
Trigger structure for table phpbb_forums
-------------------------------------------------------- */
CREATE OR REPLACE TRIGGER "PHPBB"."SET_FORUMS_ID_SEQ"
BEFORE INSERT OR UPDATE OF "FORUM_ID" ON "PHPBB"."PHPBB_FORUMS"
REFERENCING OLD AS OLD NEW AS NEW
FOR EACH ROW
BEGIN
SELECT PHPBB_FORUMS_ID_SEQ.NEXTVAL
INTO :NEW.forum_id
FROM DUAL;
END;
/
/* --------------------------------------------------------
Trigger structure for table phpbb_forum_prune
-------------------------------------------------------- */
CREATE OR REPLACE TRIGGER "PHPBB"."SET_FORUM_PRUNE_ID_SEQ"
BEFORE INSERT OR UPDATE OF "PRUNE_ID" ON "PHPBB"."PHPBB_FORUM_PRUNE"
REFERENCING OLD AS OLD NEW AS NEW
FOR EACH ROW
BEGIN
SELECT PHPBB_FORUM_PRUNE_ID_SEQ.NEXTVAL
INTO :NEW.prune_id
FROM DUAL;
END;
/
/* --------------------------------------------------------
Trigger structure for table phpbb_posts
-------------------------------------------------------- */
CREATE OR REPLACE TRIGGER "PHPBB"."SET_POSTS_ID_SEQ"
BEFORE INSERT OR UPDATE OF "POST_ID" ON "PHPBB"."PHPBB_POSTS"
REFERENCING OLD AS OLD NEW AS NEW
FOR EACH ROW
BEGIN
SELECT PHPBB_POSTS_ID_SEQ.NEXTVAL
INTO :NEW.post_id
FROM DUAL;
END;
/
/* --------------------------------------------------------
Trigger structure for table phpbb_privmsgs
-------------------------------------------------------- */
CREATE OR REPLACE TRIGGER "PHPBB"."SET_PRIVMSGS_ID_SEQ"
BEFORE INSERT OR UPDATE OF "PRIVMSGS_ID" ON "PHPBB"."PHPBB_PRIVMSGS"
REFERENCING OLD AS OLD NEW AS NEW
FOR EACH ROW
BEGIN
SELECT PHPBB_PRIVMSGS_ID_SEQ.NEXTVAL
INTO :NEW.privmsgs_id
FROM DUAL;
END;
/
/* --------------------------------------------------------
Trigger structure for table phpbb_ranks
-------------------------------------------------------- */
CREATE OR REPLACE TRIGGER "PHPBB"."SET_RANK_ID_SEQ"
BEFORE INSERT OR UPDATE OF "RANK_ID" ON "PHPBB"."PHPBB_RANKS"
REFERENCING OLD AS OLD NEW AS NEW
FOR EACH ROW
BEGIN
SELECT PHPBB_RANKS_ID_SEQ.NEXTVAL
INTO :NEW.rank_id
FROM DUAL;
END;
/
/* --------------------------------------------------------
Trigger structure for table phpbb_smilies
-------------------------------------------------------- */
CREATE OR REPLACE TRIGGER "PHPBB"."SET_SMILIES_ID_SEQ"
BEFORE INSERT OR UPDATE OF "SMILIES_ID" ON "PHPBB"."PHPBB_SMILIES"
REFERENCING OLD AS OLD NEW AS NEW
FOR EACH ROW
BEGIN
SELECT PHPBB_SMILIES_ID_SEQ.NEXTVAL
INTO :NEW.smilies_id
FROM DUAL;
END;
/
/* --------------------------------------------------------
Trigger structure for table phpbb_themes
-------------------------------------------------------- */
CREATE OR REPLACE TRIGGER "PHPBB"."SET_THEMES_ID_SEQ"
BEFORE INSERT OR UPDATE OF "THEMES_ID" ON "PHPBB"."PHPBB_THEMES"
REFERENCING OLD AS OLD NEW AS NEW
FOR EACH ROW
BEGIN
SELECT PHPBB_THEMES_ID_SEQ.NEXTVAL
INTO :NEW.themes_id
FROM DUAL;
END;
/
/* --------------------------------------------------------
Trigger structure for table phpbb_topics
-------------------------------------------------------- */
CREATE OR REPLACE TRIGGER "PHPBB"."SET_TOPICS_ID_SEQ"
BEFORE INSERT OR UPDATE OF "TOPIC_ID" ON "PHPBB"."PHPBB_TOPICS"
REFERENCING OLD AS OLD NEW AS NEW
FOR EACH ROW
BEGIN
SELECT PHPBB_TOPICS_ID_SEQ.NEXTVAL
INTO :NEW.topic_id
FROM DUAL;
END;
/
/* --------------------------------------------------------
Trigger structure for table phpbb_users
-------------------------------------------------------- */
CREATE OR REPLACE TRIGGER "PHPBB"."SET_USERS_ID_SEQ"
BEFORE INSERT OR UPDATE OF "USER_ID" ON "PHPBB"."PHPBB_USERS"
REFERENCING OLD AS OLD NEW AS NEW
FOR EACH ROW
BEGIN
SELECT PHPBB_USERS_ID_SEQ.NEXTVAL
INTO :NEW.user_id
FROM DUAL;
END;
/
/* --------------------------------------------------------
Trigger structure for table phpbb_vote_desc
-------------------------------------------------------- */
CREATE OR REPLACE TRIGGER "PHPBB"."SET_VOTE_DESC_ID_SEQ"
BEFORE INSERT OR UPDATE OF "VOTE_ID" ON "PHPBB"."PHPBB_VOTE_DESC"
REFERENCING OLD AS OLD NEW AS NEW
FOR EACH ROW
BEGIN
SELECT PHPBB_VOTE_DESC_ID_SEQ.NEXTVAL
INTO :NEW.vote_id
FROM DUAL;
END;
/
/* --------------------------------------------------------
Trigger structure for table phpbb_words
-------------------------------------------------------- */
CREATE OR REPLACE TRIGGER "PHPBB"."SET_WORDS_ID_SEQ"
BEFORE INSERT OR UPDATE OF "WORD_ID" ON "PHPBB"."PHPBB_WORDS"
REFERENCING OLD AS OLD NEW AS NEW
FOR EACH ROW
BEGIN
SELECT PHPBB_WORDS_ID_SEQ.NEXTVAL
INTO :NEW.word_id
FROM DUAL;
END;
/
COMMIT;

View file

@ -1,599 +0,0 @@
<?php
/***************************************************************************
* update_to_xxx.php
* -------------------
* begin : Wednesday, May 16, 2002
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
* $Id$
*
***************************************************************************/
/***************************************************************************
*
* 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.
*
***************************************************************************/
function _sql($sql, &$errored, &$error_ary, $echo_dot = true)
{
global $db;
if( !($result = $db->sql_query($sql)) )
{
$errored = true;
$error_ary['sql'][] = ( is_array($sql) ) ? $sql[$i] : $sql;
$error_ary['error_code'][] = $db->sql_error();
}
if ( $echo_dot )
{
echo ".";
flush();
}
return $result;
}
define('IN_PHPBB', 1);
$phpbb_root_path = './';
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'config.'.$phpEx);
include($phpbb_root_path . 'includes/constants.'.$phpEx);
include($phpbb_root_path . 'includes/functions.'.$phpEx);
include($phpbb_root_path . 'includes/functions_admin.'.$phpEx);
include($phpbb_root_path . 'includes/db.'.$phpEx);
//
//
//
$updates_to_version = ".0.1";
//
//
//
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;">
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css">
<!--
font,th,td,p,body { font-family: "Courier New", courier; font-size: 11pt }
a:link,a:active,a:visited { color : #006699; }
a:hover { text-decoration: underline; color : #DD6900;}
hr { height: 0px; border: solid #D1D7DC 0px; border-top-width: 1px;}
.maintitle,h1,h2 {font-weight: bold; font-size: 22px; font-family: "Trebuchet MS",Verdana, Arial, Helvetica, sans-serif; text-decoration: none; line-height : 120%; color : #000000;}
.ok {color:green}
/* Import the fancy styles for IE only (NS4.x doesn't use the @import function) */
@import url("templates/subSilver/formIE.css");
-->
</style>
</head>
<body bgcolor="#FFFFFF" text="#000000" link="#006699" vlink="#5584AA">
<table width="100%" border="0" cellspacing="0" cellpadding="10" align="center">
<tr>
<td><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><img src="templates/subSilver/images/logo_phpBB.gif" border="0" alt="Forum Home" vspace="1" /></td>
<td align="center" width="100%" valign="middle"><span class="maintitle">Updating to latest stable release</span></td>
</tr>
</table></td>
</tr>
</table>
<br clear="all" />
<h2>Information</h2>
<?php
echo '<p>Database type &nbsp; &nbsp;:: <b>' . SQL_LAYER . '</b><br />';
$sql = "SELECT config_value
FROM " . CONFIG_TABLE . "
WHERE config_name = 'version'";
if ( !($result = $db->sql_query($sql)) )
{
die("Couldn't obtain version info");
}
$row = $db->sql_fetchrow($result);
$sql = array();
switch ( $row['config_value'] )
{
case '':
echo 'Previous version :: <b>&lt; RC-3</b></p><br />';
break;
case 'RC-3':
echo 'Previous version :: <b>RC-3</b></p><br />';
break;
case 'RC-4':
echo 'Previous version :: <b>RC-4</b></p><br />';
break;
default:
echo 'Previous version :: <b>2' . $row['config_value'] . '</b><br />';
break;
}
echo 'Updated version &nbsp;:: <b>2' . $updates_to_version . '</b></p>' ."\n";
switch ( $row['config_value'] )
{
case '':
switch ( SQL_LAYER )
{
case 'mysql':
case 'mysql4':
$sql[] = "ALTER TABLE " . USERS_TABLE . " DROP
COLUMN user_autologin_key";
$sql[] = "ALTER TABLE " . RANKS_TABLE . " DROP
COLUMN rank_max";
$sql[] = "ALTER TABLE " . USERS_TABLE . "
ADD COLUMN user_session_time int(11) DEFAULT '0' NOT NULL,
ADD COLUMN user_session_page smallint(5) DEFAULT '0' NOT NULL,
ADD INDEX (user_session_time)";
$sql[] = "ALTER TABLE " . SEARCH_TABLE . "
MODIFY search_id int(11) NOT NULL";
$sql[] = "ALTER TABLE " . TOPICS_TABLE . "
MODIFY topic_moved_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
ADD COLUMN topic_first_post_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
ADD INDEX (topic_first_post_id)";
$sql[] = "ALTER TABLE " . THEMES_NAME_TABLE . "
ADD COLUMN tr_class1_name varchar(50) NULL,
ADD COLUMN tr_class2_name varchar(50) NULL,
ADD COLUMN tr_class3_name varchar(50) NULL,
ADD COLUMN th_class1_name varchar(50) NULL,
ADD COLUMN th_class2_name varchar(50) NULL,
ADD COLUMN th_class3_name varchar(50) NULL,
ADD COLUMN td_class1_name varchar(50) NULL,
ADD COLUMN td_class2_name varchar(50) NULL,
ADD COLUMN td_class3_name varchar(50) NULL,
ADD COLUMN span_class1_name varchar(50) NULL,
ADD COLUMN span_class2_name varchar(50) NULL,
ADD COLUMN span_class3_name varchar(50) NULL";
break;
case 'postgresql':
$sql[] = "ALTER TABLE " . USERS_TABLE . "
ADD COLUMN user_session_time int4";
$sql[] = "ALTER TABLE " . USERS_TABLE . "
ADD COLUMN user_session_page int2";
$sql[] = "ALTER TABLE " . USERS_TABLE . "
ALTER COLUMN user_session_time SET DEFAULT '0'";
$sql[] = "ALTER TABLE " . USERS_TABLE . "
ALTER COLUMN user_session_page SET DEFAULT '0'";
$sql[] = "CREATE INDEX user_session_time_" . $table_prefix . "users_index
ON " . USERS_TABLE . " (user_session_time)";
$sql[] = "ALTER TABLE " . TOPICS_TABLE . "
ADD COLUMN topic_first_post_id int4";
$sql[] = "CREATE INDEX topic_first_post_id_" . $table_prefix . "topics_index
ON " . TOPICS_TABLE . " (topic_first_post_id)";
$sql[] = "ALTER TABLE " . THEMES_NAME_TABLE . "
ADD COLUMN tr_class1_name varchar(50) NULL";
$sql[] = "ALTER TABLE " . THEMES_NAME_TABLE . "
ADD COLUMN tr_class2_name varchar(50) NULL";
$sql[] = "ALTER TABLE " . THEMES_NAME_TABLE . "
ADD COLUMN tr_class3_name varchar(50) NULL";
$sql[] = "ALTER TABLE " . THEMES_NAME_TABLE . "
ADD COLUMN th_class1_name varchar(50) NULL";
$sql[] = "ALTER TABLE " . THEMES_NAME_TABLE . "
ADD COLUMN th_class2_name varchar(50) NULL";
$sql[] = "ALTER TABLE " . THEMES_NAME_TABLE . "
ADD COLUMN th_class3_name varchar(50) NULL";
$sql[] = "ALTER TABLE " . THEMES_NAME_TABLE . "
ADD COLUMN td_class1_name varchar(50) NULL";
$sql[] = "ALTER TABLE " . THEMES_NAME_TABLE . "
ADD COLUMN td_class2_name varchar(50) NULL";
$sql[] = "ALTER TABLE " . THEMES_NAME_TABLE . "
ADD COLUMN td_class3_name varchar(50) NULL";
$sql[] = "ALTER TABLE " . THEMES_NAME_TABLE . "
ADD COLUMN span_class1_name varchar(50) NULL";
$sql[] = "ALTER TABLE " . THEMES_NAME_TABLE . "
ADD COLUMN span_class2_name varchar(50) NULL";
$sql[] = "ALTER TABLE " . THEMES_NAME_TABLE . "
ADD COLUMN span_class3_name varchar(50) NULL";
break;
case 'mssql-odbc':
case 'mssql':
$sql[] = "ALTER TABLE " . USERS_TABLE . " DROP
COLUMN user_autologin_key";
$sql[] = "ALTER TABLE " . USERS_TABLE . " ADD
user_session_time int NOT NULL,
user_session_page smallint NOT NULL,
CONSTRAINT [DF_" . $table_prefix . "users_user_session_time] DEFAULT (0) FOR [user_session_time],
CONSTRAINT [DF_" . $table_prefix . "users_user_session_page] DEFAULT (0) FOR [user_session_page]";
$sql[] = "CREATE INDEX [IX_" . $table_prefix . "users]
ON [" . USERS_TABLE . "]([user_session_time]) ON [PRIMARY]";
/* ---------------------------------------------------------------------
DROP FORUM TABLE -- if this may cause you problems you can safely
comment it out, remember to manually remove the IDENTITY setting on
the forum_id column
--------------------------------------------------------------------- */
$sql [] = "ALTER TABLE " . FORUMS_TABLE . " DROP
CONSTRAINT [DF_" . $table_prefix . "forums_forum_posts],
CONSTRAINT [DF_" . $table_prefix . "forums_forum_topics],
CONSTRAINT [DF_" . $table_prefix . "forums_forum_last_post_id],
CONSTRAINT [DF_" . $table_prefix . "forums_prune_enable],
CONSTRAINT [DF_" . $table_prefix . "forums_auth_view],
CONSTRAINT [DF_" . $table_prefix . "forums_auth_read],
CONSTRAINT [DF_" . $table_prefix . "forums_auth_post],
CONSTRAINT [DF_" . $table_prefix . "forums_auth_reply],
CONSTRAINT [DF_" . $table_prefix . "forums_auth_edit],
CONSTRAINT [DF_" . $table_prefix . "forums_auth_delete],
CONSTRAINT [DF_" . $table_prefix . "forums_auth_sticky],
CONSTRAINT [DF_" . $table_prefix . "forums_auth_announce],
CONSTRAINT [DF_" . $table_prefix . "forums_auth_vote],
CONSTRAINT [DF_" . $table_prefix . "forums_auth_pollcreate],
CONSTRAINT [DF_" . $table_prefix . "forums_auth_attachments]";
$sql[] = "CREATE TABLE Tmp_" . FORUMS_TABLE . "
(forum_id int NOT NULL, cat_id int NOT NULL, forum_name varchar(100) NOT NULL, forum_desc varchar(255) NULL, forum_status smallint NOT NULL, forum_order int NOT NULL, forum_posts int NOT NULL, forum_topics smallint NOT NULL, forum_last_post_id int NOT NULL, prune_next int NULL, prune_enable smallint NOT NULL, auth_view smallint NOT NULL, auth_read smallint NOT NULL, auth_post smallint NOT NULL, auth_reply smallint NOT NULL, auth_edit smallint NOT NULL, auth_delete smallint NOT NULL, auth_sticky smallint NOT NULL, auth_announce smallint NOT NULL, auth_vote smallint NOT NULL, auth_pollcreate smallint NOT NULL, auth_attachments smallint NOT NULL) ON [PRIMARY]";
$sql[] = "ALTER TABLE [Tmp_" . FORUMS_TABLE . "] WITH NOCHECK ADD
CONSTRAINT [DF_" . $table_prefix . "forums_forum_posts] DEFAULT (0) FOR [forum_posts],
CONSTRAINT [DF_" . $table_prefix . "forums_forum_topics] DEFAULT (0) FOR [forum_topics],
CONSTRAINT [DF_" . $table_prefix . "forums_forum_last_post_id] DEFAULT (0) FOR [forum_last_post_id],
CONSTRAINT [DF_" . $table_prefix . "forums_prune_enable] DEFAULT (0) FOR [prune_enable],
CONSTRAINT [DF_" . $table_prefix . "forums_auth_view] DEFAULT (0) FOR [auth_view],
CONSTRAINT [DF_" . $table_prefix . "forums_auth_read] DEFAULT (0) FOR [auth_read],
CONSTRAINT [DF_" . $table_prefix . "forums_auth_post] DEFAULT (0) FOR [auth_post],
CONSTRAINT [DF_" . $table_prefix . "forums_auth_reply] DEFAULT (0) FOR [auth_reply],
CONSTRAINT [DF_" . $table_prefix . "forums_auth_edit] DEFAULT (0) FOR [auth_edit],
CONSTRAINT [DF_" . $table_prefix . "forums_auth_delete] DEFAULT (0) FOR [auth_delete],
CONSTRAINT [DF_" . $table_prefix . "forums_auth_sticky] DEFAULT (0) FOR [auth_sticky],
CONSTRAINT [DF_" . $table_prefix . "forums_auth_announce] DEFAULT (0) FOR [auth_announce],
CONSTRAINT [DF_" . $table_prefix . "forums_auth_vote] DEFAULT (0) FOR [auth_vote],
CONSTRAINT [DF_" . $table_prefix . "forums_auth_pollcreate] DEFAULT (0) FOR [auth_pollcreate],
CONSTRAINT [DF_" . $table_prefix . "forums_auth_attachments] DEFAULT (0) FOR [auth_attachments]";
$sql[] = "INSERT INTO Tmp_" . FORUMS_TABLE . " (forum_id, cat_id, forum_name, forum_desc, forum_status, forum_order, forum_posts, forum_topics, forum_last_post_id, prune_next, prune_enable, auth_view, auth_read, auth_post, auth_reply, auth_edit, auth_delete, auth_sticky, auth_announce, auth_vote, auth_pollcreate, auth_attachments)
SELECT forum_id, cat_id, forum_name, forum_desc, forum_status, forum_order, forum_posts, forum_topics, forum_last_post_id, prune_next, prune_enable, auth_view, auth_read, auth_post, auth_reply, auth_edit, auth_delete, auth_sticky, auth_announce, auth_vote, auth_pollcreate, auth_attachments FROM " . FORUMS_TABLE . " TABLOCKX";
$sql[] = "DROP TABLE " . FORUMS_TABLE;
$sql[] = "EXECUTE sp_rename N'Tmp_" . FORUMS_TABLE . "', N'" . FORUMS_TABLE . "', 'OBJECT'";
$sql[] = "ALTER TABLE " . FORUMS_TABLE . " ADD
CONSTRAINT [PK_" . $table_prefix . "forums] PRIMARY KEY CLUSTERED (forum_id) ON [PRIMARY]";
$sql[] = "CREATE NONCLUSTERED INDEX [IX_" . $table_prefix . "forums]
ON " . FORUMS_TABLE . " (cat_id, forum_order, forum_last_post_id) ON [PRIMARY]";
/* --------------------------------------------------------------
END OF DROP FORUM -- don't remove anything after this point!
-------------------------------------------------------------- */
$sql[] = "DROP INDEX " . RANKS_TABLE . ".IX_" . $table_prefix . "ranks";
$sql[] = "ALTER TABLE " . RANKS_TABLE . " DROP
COLUMN rank_max";
$sql[] = "CREATE INDEX [IX_" . $table_prefix . "ranks]
ON [" . RANKS_TABLE . "]([rank_min], [rank_special]) ON [PRIMARY]";
$sql[] = "DROP INDEX " . TOPICS_TABLE . ".IX_" . $table_prefix . "topics";
$sql[] = "ALTER TABLE " . TOPICS_TABLE . " ADD
topic_first_post_id int NULL,
CONSTRAINT [DF_" . $table_prefix . "topics_topic_first_post_id] FOR [topic_first_post_id]";
$sql[] = "CREATE INDEX [IX_" . $table_prefix . "topics]
ON [" . TOPICS_TABLE . "]([forum_id], [topic_type], [topic_first_post_id], [topic_last_post_id]) ON [PRIMARY]";
$sql[] = "ALTER TABLE " . SEARCH_WORD_TABLE . " DROP
CONSTRAINT [PK_" . $table_prefix . "search_wordlist]";
$sql[] = "CREATE UNIQUE INDEX [IX_" . $table_prefix . "search_wordlist]
ON [" . SEARCH_WORD_TABLE . "]([word_text]) WITH IGNORE_DUP_KEY ON [PRIMARY]";
$sql[] = "CREATE INDEX [IX_" . $table_prefix . "search_wordlist_1]
ON [" . SEARCH_WORD_TABLE . "]([word_common]) ON [PRIMARY]";
$sql[] = "CREATE INDEX [IX_" . $table_prefix . "search_wordmatch_1]
ON [" . SEARCH_MATCH_TABLE . "]([word_id]) ON [PRIMARY]";
$sql[] = "ALTER TABLE " . THEMES_NAME_TABLE . " ADD
tr_class1_name varchar(50) NULL,
tr_class2_name varchar(50) NULL,
tr_class3_name varchar(50) NULL,
th_class1_name varchar(50) NULL,
th_class2_name varchar(50) NULL,
th_class3_name varchar(50) NULL,
td_class1_name varchar(50) NULL,
td_class2_name varchar(50) NULL,
td_class3_name varchar(50) NULL,
span_class1_name varchar(50) NULL,
span_class2_name varchar(50) NULL,
span_class3_name varchar(50) NULL";
break;
case 'msaccess':
$sql[] = "ALTER TABLE " . USERS_TABLE . " DROP
COLUMN user_autologin_key";
$sql[] = "ALTER TABLE " . USERS_TABLE . " ADD
user_session_time int NOT NULL,
user_session_page smallint NOT NULL";
$sql[] = "CREATE INDEX user_session_time
ON " . USERS_TABLE . " (user_session_time)";
$sql[] = "ALTER TABLE " . TOPICS_TABLE . " ADD
topic_first_post_id int NULL";
$sql[] = "CREATE INDEX topic_first_post_id
ON " . TOPICS_TABLE . " (topic_first_post_id)";
$sql[] = "ALTER TABLE " . THEMES_NAME_TABLE . " ADD
tr_class1_name varchar(50) NULL,
tr_class2_name varchar(50) NULL,
tr_class3_name varchar(50) NULL,
th_class1_name varchar(50) NULL,
th_class2_name varchar(50) NULL,
th_class3_name varchar(50) NULL,
td_class1_name varchar(50) NULL,
td_class2_name varchar(50) NULL,
td_class3_name varchar(50) NULL,
span_class1_name varchar(50) NULL,
span_class2_name varchar(50) NULL,
span_class3_name varchar(50) NULL";
break;
default:
die("No DB LAYER found!");
break;
}
case 'RC-3':
case 'RC-4':
case '.0.0':
switch ( SQL_LAYER )
{
case 'mysql':
case 'mysql4':
$sql[] = "ALTER TABLE " . USERS_TABLE . "
MODIFY COLUMN user_id mediumint(8) NOT NULL,
MODIFY COLUMN user_timezone decimal(4,2) DEFAULT '0' NOT NULL";
$sql[] = "ALTER TABLE " . GROUPS_TABLE . "
MODIFY COLUMN group_id mediumint(8) NOT NULL";
break;
case 'postgresql':
$sql[] = "ALTER TABLE " . USERS_TABLE . "
RENAME COLUMN user_timezone TO user_timezone_old";
$sql[] = "ALTER TABLE " . USERS_TABLE . "
ADD COLUMN user_timezone decimal(4)";
break;
case 'mssql':
case 'mssql-odbc':
$sql[] = "ALTER TABLE " . USERS_TABLE . "
ALTER COLUMN [user_timezone] [decimal] (4,2) NOT NULL";
break;
}
}
echo "<h2>Updating database schema</h2>\n";
echo "<p>Progress :: <b>";
flush();
$error_ary = array();
$errored = false;
if ( count($sql) )
{
for($i = 0; $i < count($sql); $i++)
{
_sql($sql[$i], $errored, $error_ary);
}
echo "</b> <b class=\"ok\">Done</b><br />Result &nbsp; :: \n";
if ( $errored )
{
echo " <b>Some queries failed, the statements and errors are listing below</b>\n<ul>";
for($i = 0; $i < count($error_ary['sql']); $i++)
{
echo "<li>Error :: <b>" . $error_ary['error_code'][$i]['message'] . "</b><br />";
echo "SQL &nbsp; :: <b>" . $error_ary['sql'][$i] . "</b><br /><br /></li>";
}
echo "</ul>\n<p>This is probably nothing to worry about, update will continue. Should this fail to complete you may need to seek help at our development board. See <a href=\"docs\README.html\">README</a> for details on how to obtain advice.</p>\n";
}
else
{
echo "<b>No errors</b>\n";
}
}
else
{
echo " No updates required</b></p>\n";
}
//
//
//
unset($sql);
$error_ary = array();
$errored = false;
echo "<h2>Updating data</h2>\n";
echo "<p>Progress :: <b>";
flush();
switch ( $row['config_value'] )
{
case '':
$sql = "SELECT themes_id
FROM " . THEMES_TABLE . "
WHERE template_name = 'subSilver'";
$result = _sql($sql, $errored, $error_ary);
if( $row = $db->sql_fetchrow($result) )
{
$theme_id = $row['themes_id'];
$sql = "UPDATE " . THEMES_TABLE . "
SET head_stylesheet = 'subSilver.css', body_background = '', body_bgcolor = 'E5E5E5', body_text = '000000', body_link = '006699', body_vlink = '5493B4', body_alink = '', body_hlink = 'DD6900', tr_color1 = 'EFEFEF', tr_color2 = 'DEE3E7', tr_color3 = 'D1D7DC', tr_class1 = '', tr_class2 = '', tr_class3 = '', th_color1 = '98AAB1', th_color2 = '006699', th_color3 = 'FFFFFF', th_class1 = 'cellpic1.gif', th_class2 = 'cellpic3.gif', th_class3 = 'cellpic2.jpg', td_color1 = 'FAFAFA', td_color2 = 'FFFFFF', td_color3 = '', td_class1 = 'row1', td_class2 = 'row2', td_class3 = '', fontface1 = 'Verdana, Arial, Helvetica, sans-serif', fontface2 = 'Trebuchet MS', fontface3 = 'Courier, ''Courier New'', sans-serif', fontsize1 = 10, fontsize2 = 11, fontsize3 = 12, fontcolor1 = '444444', fontcolor2 = '006600', fontcolor3 = 'FFA34F', span_class1 = '', span_class2 = '', span_class3 = ''
WHERE themes_id = $theme_id";
_sql($sql, $errored, $error_ary);
$sql = "DELETE FROM " . THEMES_NAME_TABLE . "
WHERE themes_id = $theme_id";
_sql($sql, $errored, $error_ary);
$sql = "INSERT INTO " . THEMES_NAME_TABLE . " (themes_id, tr_color1_name, tr_color2_name, tr_color3_name, tr_class1_name, tr_class2_name, tr_class3_name, th_color1_name, th_color2_name, th_color3_name, th_class1_name, th_class2_name, th_class3_name, td_color1_name, td_color2_name, td_color3_name, td_class1_name, td_class2_name, td_class3_name, fontface1_name, fontface2_name, fontface3_name, fontsize1_name, fontsize2_name, fontsize3_name, fontcolor1_name, fontcolor2_name, fontcolor3_name, span_class1_name, span_class2_name, span_class3_name)
VALUES ($theme_id, 'The lightest row colour', 'The medium row color', 'The darkest row colour', '', '', '', 'Border round the whole page', 'Outer table border', 'Inner table border', 'Silver gradient picture', 'Blue gradient picture', 'Fade-out gradient on index', 'Background for quote boxes', 'All white areas', '', 'Background for topic posts', '2nd background for topic posts', '', 'Main fonts', 'Additional topic title font', 'Form fonts', 'Smallest font size', 'Medium font size', 'Normal font size (post body etc)', 'Quote & copyright text', 'Code text colour', 'Main table header text colour', '', '', '')";
_sql($sql, $errored, $error_ary);
}
$sql = "SELECT MIN(post_id) AS first_post_id, topic_id
FROM " . POSTS_TABLE . "
GROUP BY topic_id
ORDER BY topic_id ASC";
$result = _sql($sql, $errored, $error_ary);
if ( $row = $db->sql_fetchrow($result) )
{
do
{
$sql = "UPDATE " . TOPICS_TABLE . "
SET topic_first_post_id = " . $row['first_post_id'] . "
WHERE topic_id = " . $row['topic_id'];
_sql($sql, $errored, $error_ary);
}
while ( $row = $db->sql_fetchrow($result) );
}
$sql = "SELECT DISTINCT u.user_id
FROM " . USERS_TABLE . " u, " . USER_GROUP_TABLE . " ug, " . AUTH_ACCESS_TABLE . " aa
WHERE aa.auth_mod = 1
AND ug.group_id = aa.group_id
AND u.user_id = ug.user_id
AND u.user_level <> " . ADMIN;
$result = _sql($sql, $errored, $error_ary);
$mod_user = array();
while ( $row = $db->sql_fetchrow($result) )
{
$mod_user[] = $row['user_id'];
}
if ( count($mod_user) )
{
$sql = "UPDATE " . USERS_TABLE . "
SET user_level = " . MOD . "
WHERE user_id IN (" . implode(', ', $mod_user) . ")";
_sql($sql, $errored, $error_ary);
}
$sql = "INSERT INTO " . CONFIG_TABLE . " (config_name, config_value)
VALUES ('server_name', 'www.myserver.tld')";
_sql($sql, $errored, $error_ary);
$sql = "INSERT INTO " . CONFIG_TABLE . " (config_name, config_value)
VALUES ('script_path', '/phpBB2/')";
_sql($sql, $errored, $error_ary);
$sql = "INSERT INTO " . CONFIG_TABLE . " (config_name, config_value)
VALUES ('server_port', '80')";
_sql($sql, $errored, $error_ary);
$sql = "INSERT INTO " . CONFIG_TABLE . " (config_name, config_value)
VALUES ('record_online_users', '1')";
_sql($sql, $errored, $error_ary);
$sql = "INSERT INTO " . CONFIG_TABLE . " (config_name, config_value)
VALUES ('record_online_date', '" . time() . "')";
_sql($sql, $errored, $error_ary);
case 'RC-3':
case 'RC-4':
case '.0.0':
if ( SQL_LAYER == 'postgresql' )
{
$sql = "SELECT user_id, user_timezone_old
FROM " . USERS_TABLE;
$result = _sql($sql, $errored, $error_ary);
while ( $row = $db->sql_fetchrow($result) )
{
$sql = "UPDATE " . USERS_TABLE . "
SET user_timezone = " . $row['user_timezone_old'] . "
WHERE user_id = " . $row['user_id'];
_sql($sql, $errored, $error_ary);
}
}
$sql = "SELECT topic_id, topic_moved_id
FROM " . TOPICS_TABLE . "
WHERE topic_moved_id <> 0";
$result = _sql($sql, $errored, $error_ary);
$topic_ary = array();
while ( $row = $db->sql_fetchrow($result) )
{
$topic_ary[$row['topic_id']] = $row['topic_moved_id'];
}
while ( list($topic_id, $topic_moved_id) = each($topic_ary) )
{
$sql = "SELECT MAX(post_id) AS last_post, MIN(post_id) AS first_post, COUNT(post_id) AS total_posts
FROM " . POSTS_TABLE . "
WHERE topic_id = $topic_moved_id";
$result = _sql($sql, $errored, $error_ary);
$sql = ( $row = $db->sql_fetchrow($result) ) ? "UPDATE " . TOPICS_TABLE . " SET topic_replies = " . ( $row['total_posts'] - 1 ) . ", topic_first_post_id = " . $row['first_post'] . ", topic_last_post_id = " . $row['last_post'] . " WHERE topic_id = $topic_id" : "DELETE FROM " . TOPICS_TABLE . " WHERE topic_id = " . $row['topic_id'];
_sql($sql, $errored, $error_ary);
}
unset($sql);
$sql = "UPDATE " . CONFIG_TABLE . "
SET config_value = '$updates_to_version'
WHERE config_name = 'version'";
_sql($sql, $errored, $error_ary);
sync('all forums');
echo "</b> <b class=\"ok\">Done</b><br />Result &nbsp; :: \n";
if ( $errored )
{
echo " <b>Some queries failed, the statements and errors are listing below</b>\n<ul>";
for($i = 0; $i < count($error_ary['sql']); $i++)
{
echo "<li>Error :: <b>" . $error_ary['error_code'][$i]['message'] . "</b><br />";
echo "SQL &nbsp; :: <b>" . $error_ary['sql'][$i] . "</b><br /><br /></li>";
}
echo "</ul>\n<p>This is probably nothing to worry about, update will continue. Should this fail to complete you may need to seek help at our development board. See <a href=\"docs\README.html\">README</a> for details on how to obtain advice.</p>\n";
}
else
{
echo "<b>No errors</b>\n";
}
break;
default:
echo " No updates where required</b></p>\n";
break;
}
echo "<h2>Update completed</h2>\n";
echo "\n<p>You should now visit the General Configuration settings page in the <a href=\"admin/\">Administration Panel</a> and check the General Configuration of the board. If you updated from versions prior to RC-3 you <b>must</b> update some entries. If you do not do this emails sent from the board will contain incorrect information. Don't forget to delete this file!</p>\n";
?>
<br clear="all" />
</body>
</html>