[Shuttlebb-svn] SF.net SVN: shuttlebb: [77] branch
Brought to you by:
afterlife69,
danb00
From: <aft...@us...> - 2006-12-05 07:55:36
|
Revision: 77 http://svn.sourceforge.net/shuttlebb/?rev=77&view=rev Author: afterlife69 Date: 2006-12-04 23:55:32 -0800 (Mon, 04 Dec 2006) Log Message: ----------- added basic structure for installer Modified Paths: -------------- branch/index.php branch/require/configuration.php Added Paths: ----------- branch/install/ branch/install/index.php branch/install/sources/ branch/install/sources/functions_install.php branch/install/sources/index.html branch/install/sql/ branch/install/sql/index.html branch/install/sql/mysql_data.sql branch/install/sql/mysql_schema.sql Removed Paths: ------------- branch/db_schema.sql Deleted: branch/db_schema.sql =================================================================== --- branch/db_schema.sql 2006-12-04 13:29:48 UTC (rev 76) +++ branch/db_schema.sql 2006-12-05 07:55:32 UTC (rev 77) @@ -1,39 +0,0 @@ -CREATE TABLE `sbb_users` ( - `user_id` int(255) NOT NULL auto_increment, - `username` varchar(255) NOT NULL, - `password` varchar(32) NOT NULL, - `user_email` text NOT NULL, - `user_active` tinyint(1) NOT NULL, - `user_code` varchar(12) NOT NULL, - `user_msn` varchar(255) default NULL, - `user_icq` int(255) default NULL, - `user_yim` varchar(255) default NULL, - `user_aim` varchar(255) default NULL, - `user_sig` text collate latin1_general_ci, - `user_rank` int(255) NOT NULL, - `user_web` varchar(255) default NULL, - `user_ip` varchar(255) NOT NULL, - PRIMARY KEY (`user_id`) -); - -CREATE TABLE `sbb_config` ( - `config_key` varchar(90) NOT NULL, - `config_value` text NOT NULL, - PRIMARY KEY (`config_key`) -); - -CREATE TABLE `sbb_session_keys` ( - `key_name` varchar(16) NOT NULL, - `key_expire` int(90) NOT NULL, - `user_id` int(255) NOT NULL, - PRIMARY KEY (`key_name`) -); - -CREATE TABLE `sbb_sessions` ( - `session_id` varchar(32) NOT NULL, - `session_ip` varchar(15) NOT NULL, - `session_agent` varchar(255) NOT NULL, - `session_time` int(20) NOT NULL, - `session_page` int(10) NOT NULL, - `user_id` int(255) NOT NULL -); \ No newline at end of file Modified: branch/index.php =================================================================== --- branch/index.php 2006-12-04 13:29:48 UTC (rev 76) +++ branch/index.php 2006-12-05 07:55:32 UTC (rev 77) @@ -23,12 +23,22 @@ ob_start(); // Include required sources -require ( REQ_PATH . 'configuration' . PHPEX ); -require ( REQ_PATH . 'constants' . PHPEX ); -require ( REQ_PATH . 'extensions' . PHPEX ); -require ( INC_PATH . 'functions_general' . PHPEX ); -require ( INC_PATH . 'functions_handlers' . PHPEX ); +require (REQ_PATH . 'configuration' . PHPEX); +require (REQ_PATH . 'constants' . PHPEX); +require (REQ_PATH . 'extensions' . PHPEX); +// Check for valid installation +if ( ! define ('SBB_INSTALLED') ) +{ + // If config not found, start installer + require (ROOT_PATH . 'install/index' . PHPEX); + exit; +} + +// Include basic functions +require (INC_PATH . 'functions_general' . PHPEX); +require (INC_PATH . 'functions_handlers' . PHPEX); + // Load required classes handler_load('class_session', 'session'); handler_load('class_user', 'user'); @@ -38,9 +48,6 @@ handler_load('class_access_control', 'acl_core'); handler_load('class_language', 'language'); -// Construct required objects - - // Construct the dbal $db = new dbal(DB_LAYER); $db->sql_connect(DB_USER, DB_PASS, DB_NAME, DB_SERVER, DB_PERSISTANT); Added: branch/install/index.php =================================================================== --- branch/install/index.php (rev 0) +++ branch/install/index.php 2006-12-05 07:55:32 UTC (rev 77) @@ -0,0 +1,25 @@ +<?php +/** + * ShuttleBB Installer + * + * $Id$ + * $Rev$ + * $Date$ + */ + +if ( ! defined ( 'IN_SBB' ) ) +{ + return; +} + +if ( defined ( 'SBB_INSTALLED' ) ) +{ + return; +} + +// Get installer functions +require (ROOT_PATH . 'install/sources/functions_install' . PHPEX); + +echo 'Placeholder'; + +?> \ No newline at end of file Property changes on: branch/install/index.php ___________________________________________________________________ Name: svn:keywords + Author Date Id Revision Name: svn:eol-style + native Added: branch/install/sources/functions_install.php =================================================================== --- branch/install/sources/functions_install.php (rev 0) +++ branch/install/sources/functions_install.php 2006-12-05 07:55:32 UTC (rev 77) @@ -0,0 +1,22 @@ +<?php +/** + * Required functions for installer + * + * $Id$ + * $Rev$ + * $Date$ + */ + +if ( ! defined ( 'IN_SBB' ) ) +{ + return; +} + +if ( defined ( 'SBB_INSTALLED' ) ) +{ + return; +} + +echo 'Placeholder'; + +?> \ No newline at end of file Property changes on: branch/install/sources/functions_install.php ___________________________________________________________________ Name: svn:keywords + Author Date Id Revision Name: svn:eol-style + native Added: branch/install/sources/index.html =================================================================== Property changes on: branch/install/sources/index.html ___________________________________________________________________ Name: svn:keywords + Author Date Id Revision Name: svn:eol-style + native Added: branch/install/sql/index.html =================================================================== Property changes on: branch/install/sql/index.html ___________________________________________________________________ Name: svn:keywords + Author Date Id Revision Name: svn:eol-style + native Added: branch/install/sql/mysql_data.sql =================================================================== Property changes on: branch/install/sql/mysql_data.sql ___________________________________________________________________ Name: svn:keywords + Author Date Id Revision Name: svn:eol-style + native Added: branch/install/sql/mysql_schema.sql =================================================================== --- branch/install/sql/mysql_schema.sql (rev 0) +++ branch/install/sql/mysql_schema.sql 2006-12-05 07:55:32 UTC (rev 77) @@ -0,0 +1,39 @@ +CREATE TABLE `sbb_users` ( + `user_id` int(255) NOT NULL auto_increment, + `username` varchar(255) NOT NULL, + `password` varchar(32) NOT NULL, + `user_email` text NOT NULL, + `user_active` tinyint(1) NOT NULL, + `user_code` varchar(12) NOT NULL, + `user_msn` varchar(255) default NULL, + `user_icq` int(255) default NULL, + `user_yim` varchar(255) default NULL, + `user_aim` varchar(255) default NULL, + `user_sig` text collate latin1_general_ci, + `user_rank` int(255) NOT NULL, + `user_web` varchar(255) default NULL, + `user_ip` varchar(255) NOT NULL, + PRIMARY KEY (`user_id`) +); + +CREATE TABLE `sbb_config` ( + `config_key` varchar(90) NOT NULL, + `config_value` text NOT NULL, + PRIMARY KEY (`config_key`) +); + +CREATE TABLE `sbb_session_keys` ( + `key_name` varchar(16) NOT NULL, + `key_expire` int(90) NOT NULL, + `user_id` int(255) NOT NULL, + PRIMARY KEY (`key_name`) +); + +CREATE TABLE `sbb_sessions` ( + `session_id` varchar(32) NOT NULL, + `session_ip` varchar(15) NOT NULL, + `session_agent` varchar(255) NOT NULL, + `session_time` int(20) NOT NULL, + `session_page` int(10) NOT NULL, + `user_id` int(255) NOT NULL +); \ No newline at end of file Property changes on: branch/install/sql/mysql_schema.sql ___________________________________________________________________ Name: svn:keywords + Author Date Id Revision Name: svn:eol-style + native Modified: branch/require/configuration.php =================================================================== --- branch/require/configuration.php 2006-12-04 13:29:48 UTC (rev 76) +++ branch/require/configuration.php 2006-12-05 07:55:32 UTC (rev 77) @@ -9,6 +9,8 @@ * $Rev$ */ +define('SBB_INSTALLED', 1); + define('DB_USER', 'root'); define('DB_PASS', ''); define('DB_NAME', 'sbb'); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |