diff --git a/install/database_tables.sql b/install/database_tables.sql deleted file mode 100755 index bbf50021..00000000 --- a/install/database_tables.sql +++ /dev/null @@ -1,88 +0,0 @@ -CREATE TABLE IF NOT EXISTS `categories` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `name` tinytext COLLATE utf8_unicode_ci NOT NULL, - `description` text COLLATE utf8_unicode_ci NOT NULL, - `ideas` int(11) NOT NULL, - PRIMARY KEY (`id`), - KEY `id` (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; - -CREATE TABLE IF NOT EXISTS `comments` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `content` text COLLATE utf8_unicode_ci NOT NULL, - `ideaid` int(11) NOT NULL, - `userid` int(11) NOT NULL, - `date` tinytext COLLATE utf8_unicode_ci NOT NULL, - PRIMARY KEY (`id`), - KEY `id` (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; - -CREATE TABLE IF NOT EXISTS `flags` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `toflagid` int(11) NOT NULL, - `userid` int(11) NOT NULL, - `date` tinytext COLLATE utf8_unicode_ci NOT NULL, - PRIMARY KEY (`id`), - KEY `id` (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; - -CREATE TABLE IF NOT EXISTS `ideas` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `title` tinytext COLLATE utf8_unicode_ci NOT NULL, - `content` text COLLATE utf8_unicode_ci NOT NULL, - `authorid` int(11) NOT NULL, - `date` tinytext COLLATE utf8_unicode_ci NOT NULL, - `votes` int(11) NOT NULL, - `comments` int(11) NOT NULL, - `status` tinytext COLLATE utf8_unicode_ci NOT NULL, - `categoryid` int(11) NOT NULL, - PRIMARY KEY (`id`), - KEY `id` (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; - -CREATE TABLE IF NOT EXISTS `logs` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `content` tinytext COLLATE utf8_unicode_ci NOT NULL, - `date` tinytext COLLATE utf8_unicode_ci NOT NULL, - `type` tinytext COLLATE utf8_unicode_ci NOT NULL, - `toid` int(11) NOT NULL, - PRIMARY KEY (`id`), - KEY `id` (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; - -CREATE TABLE IF NOT EXISTS `settings` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `name` tinytext COLLATE utf8_unicode_ci NOT NULL, - `value` tinytext COLLATE utf8_unicode_ci NOT NULL, - PRIMARY KEY (`id`), - KEY `id` (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; - -CREATE TABLE IF NOT EXISTS `users` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `name` tinytext COLLATE utf8_unicode_ci NOT NULL, - `email` tinytext COLLATE utf8_unicode_ci NOT NULL, - `pass` tinytext COLLATE utf8_unicode_ci NOT NULL, - `votes` int(11) NOT NULL, - `isadmin` tinyint(1) NOT NULL, - `banned` int(11) NOT NULL, - PRIMARY KEY (`id`), - KEY `id` (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; - -CREATE TABLE IF NOT EXISTS `votes` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `ideaid` int(11) NOT NULL, - `userid` int(11) NOT NULL, - `number` int(11) NOT NULL, - PRIMARY KEY (`id`), - KEY `id` (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; - -CREATE TABLE IF NOT EXISTS `_sessions` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `userid` int(11) NOT NULL, - `token` tinytext COLLATE utf8_unicode_ci NOT NULL, - PRIMARY KEY (`id`), - KEY `id` (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; diff --git a/install/index.php b/install/index.php deleted file mode 100755 index 846bae96..00000000 --- a/install/index.php +++ /dev/null @@ -1,132 +0,0 @@ - - - - PHPBack Installation - - - - - - - - - - - - - - - - -
-
-
- -
PHPBack installation
- -
- -
- - -
-
- - -
-
- - -
-
- - -
- * Left in blank for automatic database creation -
- -
- - -
-
- - -
-
- - -
-
- - -
- - - -
- -
-
Please, create a config file
- - PHPBack could not create the configuration file for the database.
- Go to /application/config/ and create a database.php file with the fallowing content:
-
- - <?php
- $active_group = 'default';
- $active_record = TRUE;
-
- $db['default']['hostname'] = 'YOUR_MYSQL_SERVER';
- $db['default']['username'] = 'YOUR_USERNAME';
- $db['default']['password'] = 'YOUR_PASSWORD';
- $db['default']['database'] = 'YOUT_DATABASE_NAME';
- $db['default']['dbdriver'] = 'mysql';
- $db['default']['dbprefix'] = '';
- $db['default']['pconnect'] = TRUE;
- $db['default']['db_debug'] = TRUE;
- $db['default']['cache_on'] = FALSE;
- $db['default']['cachedir'] = '';
- $db['default']['char_set'] = 'utf8';
- $db['default']['dbcollat'] = 'utf8_general_ci';
- $db['default']['swap_pre'] = '';
- $db['default']['autoinit'] = TRUE;
- $db['default']['stricton'] = FALSE;
-
-
-
-
- -
-
- - - diff --git a/install/index2.php b/install/index2.php deleted file mode 100755 index 04a8560d..00000000 --- a/install/index2.php +++ /dev/null @@ -1,75 +0,0 @@ - - - - PHPBack Installation - - - - - - - - - - - - - - - - -
-
-
- -
PHPBack installation
-
- - -
-
- -
-
- -
-
- -
- *Left in blank if you do not want to use recaptcha -
- - -
-
- - -
-
- - -
-
- - -
- - -
-
-
- - \ No newline at end of file diff --git a/install/install1.php b/install/install1.php deleted file mode 100755 index 39df3a04..00000000 --- a/install/install1.php +++ /dev/null @@ -1,120 +0,0 @@ - -Copyright (c) 2014 PHPBack -http://www.phpback.org -Released under the GNU General Public License WITHOUT ANY WARRANTY. -See LICENSE.TXT for details. -**********************************************************************/ - -error_reporting(E_ALL); -ini_set('display_errors', 1); - -function redirectpost($url, array $data){ - - echo ' - - - Please Wait... - - - Please Wait...
-
'; - if ( !is_null($data) ) { - foreach ($data as $k => $v) { - echo ' '; - } - } - echo "
"; - ""; - ""; - exit; -} - -function exit_error($string){ - $data['error'] = $string; - redirectpost('index.php', $data); -} - -function create_file($hostname, $username, $password, $database){ - chmod('../application/config', 0777); - if(($file = fopen('../application/config/database.php', 'w')) == FALSE){ - $data['error'] == "Could not create the config file"; - $data['configfile'] == 1; - redirectpost('index.php', $data); - } - $content = 'connect_error) exit_error('Connection Error (' . $server->connect_errno . ') ' . $server->connect_error); - -if($_POST['database'] != ""){ - if(!file_exists('../application/config/database.php')) - create_file($_POST['hostname'], $_POST['username'], $_POST['password'], $_POST['database']); - include '../application/config/database.php'; - if(!($_POST['hostname'] == $db['default']['hostname'] && $_POST['username'] == $db['default']['username'] - && $_POST['password'] == $db['default']['password'] && $_POST['database'] == $db['default']['database'])) exit_error('Config file does not match with the given information'); - if ($server->select_db($_POST['database']) === FALSE) exit_error("Couldn't connect to database"); - $query = file_get_contents('database_tables.sql'); - if($server->multi_query($query) === FALSE) exit_error("Couldn't create the tables"); -}else{ - if(!file_exists('../application/config/database.php')) - create_file($_POST['hostname'], $_POST['username'], $_POST['password'], 'phpback'); - if(!$server->query("CREATE DATABASE IF NOT EXISTS phpback")){ - exit_error("Could not create database"); - } - if ($server->select_db('phpback') === FALSE) exit_error("Couldn't connect to database"); - $sql = file_get_contents('database_tables.sql'); - if($server->multi_query($sql) === FALSE) exit_error("Couldn't create the tables"); -} -do{ - if($r = $server->store_result()) $r->free(); -}while($server->next_result()); - -unlink('index.php'); -unlink('install1.php'); -unlink('database_tables.sql'); -$result = $server->query("SELECT id FROM settings WHERE name='title'"); -if($result->num_rows == 1){ - unlink('index2.php'); - unlink('install2.php'); - header('Location: ../admin'); - exit; -} -$server->query("INSERT INTO users(id,name,email,pass,votes,isadmin,banned) VALUES('','". $_POST['adminname'] ."','". $_POST['adminemail'] ."','". crypt($_POST['adminpass']) ."', 20, 3,0)"); -header('Location: index2.php'); -exit; diff --git a/install/install2.php b/install/install2.php deleted file mode 100755 index b9be4468..00000000 --- a/install/install2.php +++ /dev/null @@ -1,34 +0,0 @@ - -Copyright (c) 2014 PHPBack -http://www.phpback.org -Released under the GNU General Public License WITHOUT ANY WARRANTY. -See LICENSE.TXT for details. -**********************************************************************/ - -include "../application/config/database.php"; - -$mysql = new mysqli($db['default']['hostname'], $db['default']['username'], $db['default']['password'], $db['default']['database']); - -if ($server->connect_error) echo('Connection Error (' . $server->connect_errno . ') ' . $server->connect_error . '
'); - -$mysql->multi_query("INSERT INTO `settings` (`id`, `name`, `value`) VALUES -('', 'recaptchapublic', '". $_POST['rpublic'] ."'), -('', 'recaptchaprivate', '". $_POST['rprivate'] ."'), -('', 'maxvotes', '20'), -('', 'mainmail', '". $_POST['mainmail'] ."'), -('', 'title', '". $_POST['title'] ."'), -('', 'max_results', '10'), -('', 'language', 'english'), -('', 'smtp-host', '". $_POST['smtp-host'] ."'), -('', 'smtp-port', '". $_POST['smtp-port'] ."'), -('', 'smtp-user', '". $_POST['smtp-user'] ."'), -('', 'smtp-pass', '". $_POST['smtp-password'] ."');"); - -unlink('index2.php'); -unlink('install2.php'); - -header('Location: ../admin'); -exit; \ No newline at end of file