/install/index.php
PHP | 959 lines | 744 code | 188 blank | 27 comment | 84 complexity | bedfb2dd8e78f758ebc66ddbddba7549 MD5 | raw file
Possible License(s): AGPL-3.0
Large files files are truncated, but you can click here to view the full file
- <?php
- /**
- * @link http://www.cms2u.pl/ www.cms2u.pl
- * @author Rafal Wolak <kontakt@rafalwolak.pl>
- * @license http://creativecommons.org/licenses/by/3.0/
- * Creative Commons License: Attribution 3.0 Unported
- * @package cms2u
- */
-
- /**
- * @ignore
- */
- define('IN_SITE', true);
- $phpEx = substr(strrchr(__FILE__, '.'), 1);
-
- function chmodr($path, $filemode) {
- if (!is_dir($path))
- return @chmod($path, $filemode);
- $dh = opendir($path);
- while (($file = readdir($dh)) !== false) {
- if ($file != '.' && $file != '..') {
- $fullpath = $path.'/'.$file;
- if (is_link($fullpath))
- return false;
- else if (!is_dir($fullpath) && !@chmod($fullpath, $filemode))
- return false;
- else if (!chmodr($fullpath, $filemode))
- return false;
- }
- }
- closedir($dh);
- if (@chmod($path, $filemode))
- return true;
- else
- return false;
- }
-
- if (!defined('IS_INSTALLED')) {
- chmodr(str_replace('install/index.php', '', $_SERVER['SCRIPT_FILENAME']) . 'template_c/', 0777);
- chmodr(str_replace('install/index.php', '', $_SERVER['SCRIPT_FILENAME']) . 'inc/', 0777);
- chmodr(str_replace('install/index.php', '', $_SERVER['SCRIPT_FILENAME']) . 'cache/', 0777);
- chmodr(str_replace('install/index.php', '', $_SERVER['SCRIPT_FILENAME']) . 'img/upload/', 0777);
- @setcookie("componentcheck", "", time() - 60*60);
- @setcookie("modulecheck", "", time() - 60*60);
- @setcookie("langcheck", "", time() - 60*60);
-
- if (isset($_GET['step'])) {
- $step = (int) $_GET['step'];
-
- switch ($step) {
- case 1:
-
- include '../inc/init.' . $phpEx;
-
- if (request_var('go', 'false') == 'true') {
- $_error = false;
- $sqlhost = request_var('sqlhost', '');
- $sqlport = request_var('sqlport', '');
- $sqlname = request_var('sqlname', '');
- $sqllogin = request_var('sqllogin', '');
- $sqlpassword = request_var('sqlpass', '');
- $prefix = request_var('prefix', '');
- $absolute_path = request_var('absolute_path', '');
- $site_url = request_var('site_url', '');
- $username = request_var('username', '');
- $email = request_var('email', '');
- $email_re = request_var('email-re', '');
- $password = request_var('password', '');
- $password_re = request_var('password-re', '');
- $question = request_var('question', '');
- $answer = request_var('answer', '');
- $lang = request_var('lang', 'en');
-
- if ($sqlhost == '' || $sqlname == '' || $sqllogin == '' || $sqlpassword == '' || $prefix == '' || $absolute_path == '' || $site_url == '' || $username == '' || $email == '' || $email_re == '' || $password == '' || $password_re == '' || $question == '' || $answer == '') {
- $msg = lang('INSTALL: FILL IN ALL FIELDS');
- $_error = true;
- }
- else if ($password != $password_re) {
- $msg = lang('INSTALL: ENTERED PASSWORDS ARE DIFFERENT');
- $_error = true;
- }
- else if (!eregi("^[_a-zA-Z0-9-]+(\.[_a-zA-Z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,6})$", $email)) {
- $msg = lang('INSTALL: PLEASE ENTER A VALID E-MAIL ADDRESS');
- $_error = true;
- }
- else if ($email != $email_re) {
- $msg = lang('INSTALL: ENTERED EMAIL ADDRESSES ARE DIFFERENT');
- $_error = true;
- }
- else if (strlen($prefix) < 2 || strlen($prefix) > 7 || !eregi("[a-z]", $prefix)) {
- $msg = lang('INSTALL: THE CORRECT PREFIX MUST CONSIST SOLELY OF 2 TO 7 SMALL LETTERS');
- $_error = true;
- }
-
- if ($_error) {
- $smarty->assign('msg', $msg);
- }
- else if (!$_error) {
- $filename = '../inc/config.php';
-
- if (strrpos($site_url, '/') != (strlen($site_url)-1))
- $site_url .= '/';
-
- if (strrpos($absolute_path, '/') != (strlen($absolute_path)-1))
- $absolute_path .= '/';
-
- if ($fp = @fopen($filename, 'w')) {
- @flock($fp, LOCK_EX);
- $file = "<?php\n";
- $file .= "if (!defined('IN_SITE'))\n{\n header(\"Location: " . $site_url . "\");\nexit;\n}\n";
- $file .= "\n/* ----------------------- */\n";
- $file .= "\$sql_host = '" . $sqlhost . "';\n";
- $file .= "\$sql_port = '" . $sqlport . "';\n";
- $file .= "\$sql_login = '" . $sqllogin . "';\n";
- $file .= "\$sql_password = '" . $sqlpassword . "';\n";
- $file .= "\$sql_name = '" . $sqlname . "';\n";
- $file .= "\$sql_prefix = '" . $prefix . "';\n";
- $file .= "\n/* ----------------------- */\n";
- $file .= "\$prefix = '" . $prefix . "';\n";
- $file .= "\n/* ----------------------- */\n";
- $file .= "\$absolute_path = '" . $absolute_path . "';\n";
- $file .= "\$site_url = '" . $site_url . "';\n";
- $file .= "\$lang = '" . $lang . "';\n";
- $file .= "\n/* ----------------------- */\n";
- $file .= "\$admin_name = '" . $username . "';\n";
- $file .= "\$admin_pass = '" . md5($password) . "';\n";
- $file .= "\$admin_email = '" . $email . "';\n";
- $file .= "\$admin_question = '" . $question . "';\n";
- $file .= "\$admin_answer = '" . $answer . "';\n";
- $file .= "\n?>";
- @fwrite($fp, $file);
- @flock($fp, LOCK_UN);
- @fclose($fp);
- @chmod($filename, 0666);
-
- header('Location: index.' . $phpEx . ((isset($_GET['lang'])) ? '?lang=' . request_var('lang', 'en') . '&' : '?') . 'step=2');
- exit;
- }
- }
- }
-
- break;
-
- case 2:
-
- include '../inc/init.' . $phpEx;
-
- if (require_once '../inc/config.' . $phpEx) {
- $sql_host = $sql_host . (($sql_port) ? ':' . $sql_port : '');
- $db = @mysql_pconnect($sql_host, $sql_login, $sql_password);
-
- if ($db && $sql_name != '') {
- if (mysql_select_db($sql_name, $db)) {
- mysql_query('SET NAMES "utf8"', $db);
-
- $_error = 0;
- $msg = '<dl><dt>' . lang('INSTALL: ERASE ARRAY') . ' ' . $prefix . '_config</dt><dd>';
-
- $sql = 'DROP TABLE IF EXISTS ' . $prefix . '_config';
- $result = mysql_query($sql);
-
- $msg .= ($result ? '<span class="green">' . lang('INSTALL: SUCCESS') . '</span>' : '<span class="red">' . lang('INSTALL: FAILURE') . '</span>') . '</dd></dl>';
- $result ? $_error = $_error : $_error = $_error + 1;
-
- $msg .= '<dl><dt>' . lang('INSTALL: I ASSUME AN ARRAY') . ' ' . $prefix . '_config</dt><dd>';
-
- $sql = "CREATE TABLE IF NOT EXISTS " . $prefix . "_config (
- `config_id` int(10) NULL DEFAULT NULL AUTO_INCREMENT,
- `config_meta_title` varchar(255) NULL DEFAULT NULL,
- `config_meta_description` varchar(255) NULL DEFAULT NULL,
- `config_meta_keywords` varchar(255) NULL DEFAULT NULL,
- `config_active` tinyint(1) NULL DEFAULT '0',
- `config_name` varchar(255) NULL DEFAULT NULL,
- `config_email` varchar(50) NULL DEFAULT NULL,
- `config_tpl_dir` varchar(50) NULL DEFAULT NULL,
- `config_sql_cache` tinyint(1) NULL DEFAULT '0',
- `config_smarty_cache` tinyint(1) NULL DEFAULT '0',
- `config_smarty_cache_lifetime` int(10) NULL DEFAULT '0',
- `config_google_analytics` varchar(30) NULL DEFAULT NULL,
- `config_lang` char(2) NULL DEFAULT 'en',
- `config_lang_admin` char(2) NULL DEFAULT 'en',
- `config_register` tinyint(1) NULL DEFAULT '0',
- PRIMARY KEY (`config_id`)
- ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci AUTO_INCREMENT=2;";
- $result = mysql_query($sql);
-
- $msg .= ($result ? '<span class="green">' . lang('INSTALL: SUCCESS') . '</span>' : '<span class="red">' . lang('INSTALL: FAILURE') . '</span>') . '</dd></dl>';
- $result ? $_error = $_error : $_error = $_error + 1;
-
-
- $msg .= '<dl><dt>' . lang('INSTALL: I PUT A DATA IN AN ARRAY') . ' ' . $prefix . '_config</dt><dd>';
-
- $sql = "INSERT
- INTO " . $prefix . "_config
- (config_id, config_meta_title, config_meta_description, config_meta_keywords, config_active, config_name, config_email, config_tpl_dir, config_lang, config_lang_admin, config_register)
- VALUES
- (1, 'cms2u', 'Content Management System', 'cms, content management system', 1, 'cms2u', '" . $admin_email . "', 'default', '" . $lang . "', '" . $lang . "', 1);";
- $result = mysql_query($sql);
-
- $msg .= ($result ? '<span class="green">' . lang('INSTALL: SUCCESS') . '</span>' : '<span class="red">' . lang('INSTALL: FAILURE') . '</span>') . '</dd></dl>';
- $result ? $_error = $_error : $_error = $_error + 1;
-
-
- // LOCALIZATION
- $msg .= '<dl><dt>' . lang('INSTALL: ERASE ARRAY') . ' ' . $prefix . '_continent</dt><dd>';
-
- $sql = 'DROP TABLE IF EXISTS ' . $prefix . '_continent';
- $result = mysql_query($sql);
-
- $msg .= ($result ? '<span class="green">' . lang('INSTALL: SUCCESS') . '</span>' : '<span class="red">' . lang('INSTALL: FAILURE') . '</span>') . '</dd></dl>';
- $result ? $_error = $_error : $_error = $_error + 1;
-
- $msg .= '<dl><dt>' . lang('INSTALL: I ASSUME AN ARRAY') . ' ' . $prefix . '_continent</dt><dd>';
-
- $sql = "CREATE TABLE IF NOT EXISTS " . $prefix . "_continent (
- `continent_id` int(10) NULL DEFAULT NULL AUTO_INCREMENT,
- `continent_name` varchar(255) NULL DEFAULT NULL,
- `continent_logo` varchar(255) NULL DEFAULT NULL,
- `continent_active` tinyint(1) NULL DEFAULT '0',
- PRIMARY KEY (`continent_id`)
- ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci AUTO_INCREMENT=1;";
- $result = mysql_query($sql);
-
- $msg .= ($result ? '<span class="green">' . lang('INSTALL: SUCCESS') . '</span>' : '<span class="red">' . lang('INSTALL: FAILURE') . '</span>') . '</dd></dl>';
- $result ? $_error = $_error : $_error = $_error + 1;
-
- $msg .= '<dl><dt>' . lang('INSTALL: ERASE ARRAY') . ' ' . $prefix . '_country</dt><dd>';
-
- $sql = 'DROP TABLE IF EXISTS ' . $prefix . '_country';
- $result = mysql_query($sql);
-
- $msg .= ($result ? '<span class="green">' . lang('INSTALL: SUCCESS') . '</span>' : '<span class="red">' . lang('INSTALL: FAILURE') . '</span>') . '</dd></dl>';
- $result ? $_error = $_error : $_error = $_error + 1;
-
- $msg .= '<dl><dt>' . lang('INSTALL: I ASSUME AN ARRAY') . ' ' . $prefix . '_country</dt><dd>';
-
- $sql = "CREATE TABLE IF NOT EXISTS " . $prefix . "_country (
- `country_id` int(10) NULL DEFAULT NULL AUTO_INCREMENT,
- `country_continentid` int(10) NULL DEFAULT '0',
- `country_name` varchar(255) NULL DEFAULT NULL,
- `country_logo` varchar(255) NULL DEFAULT NULL,
- `country_active` tinyint(1) NULL DEFAULT '0',
- PRIMARY KEY (`country_id`)
- ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci AUTO_INCREMENT=1;";
- $result = mysql_query($sql);
-
- $msg .= ($result ? '<span class="green">' . lang('INSTALL: SUCCESS') . '</span>' : '<span class="red">' . lang('INSTALL: FAILURE') . '</span>') . '</dd></dl>';
- $result ? $_error = $_error : $_error = $_error + 1;
-
-
- $msg .= '<dl><dt>' . lang('INSTALL: ERASE ARRAY') . ' ' . $prefix . '_region</dt><dd>';
-
- $sql = 'DROP TABLE IF EXISTS ' . $prefix . '_region';
- $result = mysql_query($sql);
-
- $msg .= ($result ? '<span class="green">' . lang('INSTALL: SUCCESS') . '</span>' : '<span class="red">' . lang('INSTALL: FAILURE') . '</span>') . '</dd></dl>';
- $result ? $_error = $_error : $_error = $_error + 1;
-
- $msg .= '<dl><dt>' . lang('INSTALL: I ASSUME AN ARRAY') . ' ' . $prefix . '_region</dt><dd>';
-
- $sql = "CREATE TABLE IF NOT EXISTS " . $prefix . "_region (
- `region_id` int(10) NULL DEFAULT NULL AUTO_INCREMENT,
- `region_countryid` int(10) NULL DEFAULT '0',
- `region_continentid` int(10) NULL DEFAULT '0',
- `region_name` varchar(255) NULL DEFAULT NULL,
- `region_logo` varchar(255) NULL DEFAULT NULL,
- `region_active` tinyint(1) NULL DEFAULT '0',
- PRIMARY KEY (`region_id`)
- ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci AUTO_INCREMENT=1;";
- $result = mysql_query($sql);
-
- $msg .= ($result ? '<span class="green">' . lang('INSTALL: SUCCESS') . '</span>' : '<span class="red">' . lang('INSTALL: FAILURE') . '</span>') . '</dd></dl>';
- $result ? $_error = $_error : $_error = $_error + 1;
-
- $msg .= '<dl><dt>' . lang('INSTALL: ERASE ARRAY') . ' ' . $prefix . '_city</dt><dd>';
-
- $sql = 'DROP TABLE IF EXISTS ' . $prefix . '_city';
- $result = mysql_query($sql);
-
- $msg .= ($result ? '<span class="green">' . lang('INSTALL: SUCCESS') . '</span>' : '<span class="red">' . lang('INSTALL: FAILURE') . '</span>') . '</dd></dl>';
- $result ? $_error = $_error : $_error = $_error + 1;
-
- $msg .= '<dl><dt>' . lang('INSTALL: I ASSUME AN ARRAY') . ' ' . $prefix . '_city</dt><dd>';
-
- $sql = "CREATE TABLE IF NOT EXISTS " . $prefix . "_city (
- `city_id` int(10) NULL DEFAULT NULL AUTO_INCREMENT,
- `city_regionid` int(10) NULL DEFAULT '0',
- `city_countryid` int(10) NULL DEFAULT '0',
- `city_continentid` int(10) NULL DEFAULT '0',
- `city_geo` tinyint(1) NULL DEFAULT '0',
- `city_localization` varchar(255) NULL DEFAULT '19,52',
- `city_name` varchar(255) NULL DEFAULT NULL,
- `city_logo` varchar(255) NULL DEFAULT NULL,
- `city_active` tinyint(1) NULL DEFAULT '0',
- PRIMARY KEY (`city_id`)
- ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci AUTO_INCREMENT=1;";
- $result = mysql_query($sql);
-
- $msg .= ($result ? '<span class="green">' . lang('INSTALL: SUCCESS') . '</span>' : '<span class="red">' . lang('INSTALL: FAILURE') . '</span>') . '</dd></dl>';
- $result ? $_error = $_error : $_error = $_error + 1;
-
-
- // LANG
- $msg .= '<dl><dt>' . lang('INSTALL: ERASE ARRAY') . ' ' . $prefix . '_lang</dt><dd>';
-
- $sql = 'DROP TABLE IF EXISTS ' . $prefix . '_lang';
- $result = mysql_query($sql);
-
- $msg .= ($result ? '<span class="green">' . lang('INSTALL: SUCCESS') . '</span>' : '<span class="red">' . lang('INSTALL: FAILURE') . '</span>') . '</dd></dl>';
- $result ? $_error = $_error : $_error = $_error + 1;
-
- $msg .= '<dl><dt>' . lang('INSTALL: I ASSUME AN ARRAY') . ' ' . $prefix . '_lang</dt><dd>';
-
- $sql = "CREATE TABLE IF NOT EXISTS " . $prefix . "_lang (
- `lang_id` int(10) NULL DEFAULT NULL AUTO_INCREMENT,
- `lang_name` varchar(255) NULL DEFAULT '',
- `lang_identify` char(2) NULL DEFAULT '',
- `lang_logo` varchar(255) NULL DEFAULT '',
- `lang_charset` char(20) NULL DEFAULT 'utf-8',
- `lang_currency` tinyint(2) NULL DEFAULT '0',
- `lang_active` tinyint(1) NULL DEFAULT '0',
- `lang_delate` tinyint(1) NULL DEFAULT '1',
- PRIMARY KEY (`lang_id`)
- ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci AUTO_INCREMENT=3;";
- $result = mysql_query($sql);
-
- $msg .= ($result ? '<span class="green">' . lang('INSTALL: SUCCESS') . '</span>' : '<span class="red">' . lang('INSTALL: FAILURE') . '</span>') . '</dd></dl>';
- $result ? $_error = $_error : $_error = $_error + 1;
-
- $msg .= '<dl><dt>' . lang('INSTALL: I PUT A DATA IN AN ARRAY') . ' ' . $prefix . '_lang</dt><dd>';
-
- $sql = "INSERT
- INTO " . $prefix . "_lang
- (lang_id, lang_name, lang_identify, lang_logo, lang_charset, lang_currency, lang_active, lang_delate)
- VALUES
- (1, 'English (English)', 'en', 'img/lang/en.gif', 'utf-8', 1, 1, 0),
- (2, 'Polish (Polski)', 'pl', 'img/lang/pl.gif', 'utf-8', 2, 1, 1);";
- $result = mysql_query($sql);
-
- $msg .= ($result ? '<span class="green">' . lang('INSTALL: SUCCESS') . '</span>' : '<span class="red">' . lang('INSTALL: FAILURE') . '</span>') . '</dd></dl>';
- $result ? $_error = $_error : $_error = $_error + 1;
-
- // CURRENCY
- $msg .= '<dl><dt>' . lang('INSTALL: ERASE ARRAY') . ' ' . $prefix . '_currency</dt><dd>';
-
- $sql = 'DROP TABLE IF EXISTS ' . $prefix . '_currency';
- $result = mysql_query($sql);
-
- $msg .= ($result ? '<span class="green">' . lang('INSTALL: SUCCESS') . '</span>' : '<span class="red">' . lang('INSTALL: FAILURE') . '</span>') . '</dd></dl>';
- $result ? $_error = $_error : $_error = $_error + 1;
-
- $msg .= '<dl><dt>' . lang('INSTALL: I ASSUME AN ARRAY') . ' ' . $prefix . '_currency</dt><dd>';
-
- $sql = "CREATE TABLE IF NOT EXISTS " . $prefix . "_currency (
- `currency_id` int(10) NULL DEFAULT NULL AUTO_INCREMENT,
- `currency_name` varchar(255) NULL DEFAULT '',
- `currency_symbol` char(20) NULL DEFAULT '',
- `currency_show` varchar(255) NULL DEFAULT '',
- `currency_rate` char(20) NULL DEFAULT '1',
- `currency_position` tinyint(2) NULL DEFAULT '0',
- `currency_default` tinyint(1) NULL DEFAULT '0',
- `currency_active` tinyint(1) NULL DEFAULT '0',
- `currency_delate` tinyint(1) NULL DEFAULT '1',
- PRIMARY KEY (`currency_id`)
- ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci AUTO_INCREMENT=3;";
- $result = mysql_query($sql);
-
- $msg .= ($result ? '<span class="green">' . lang('INSTALL: SUCCESS') . '</span>' : '<span class="red">' . lang('INSTALL: FAILURE') . '</span>') . '</dd></dl>';
- $result ? $_error = $_error : $_error = $_error + 1;
-
- $msg .= '<dl><dt>' . lang('INSTALL: I PUT A DATA IN AN ARRAY') . ' ' . $prefix . '_currency</dt><dd>';
-
- $sql = "INSERT
- INTO " . $prefix . "_currency
- (currency_id, currency_name, currency_symbol, currency_show, currency_rate, currency_position, currency_default, currency_active, currency_delate)
- VALUES
- (1, 'USD', 'USD', '$', '1', 1, 1, 1, 0),
- (2, 'PLN', 'PLN', 'z?', '1', 2, 0, 1, 1);";
- $result = mysql_query($sql);
-
- $msg .= ($result ? '<span class="green">' . lang('INSTALL: SUCCESS') . '</span>' : '<span class="red">' . lang('INSTALL: FAILURE') . '</span>') . '</dd></dl>';
- $result ? $_error = $_error : $_error = $_error + 1;
-
-
- // LOG
- $msg .= '<dl><dt>' . lang('INSTALL: ERASE ARRAY') . ' ' . $prefix . '_log</dt><dd>';
-
- $sql = 'DROP TABLE IF EXISTS ' . $prefix . '_log';
- $result = mysql_query($sql);
-
- $msg .= ($result ? '<span class="green">' . lang('INSTALL: SUCCESS') . '</span>' : '<span class="red">' . lang('INSTALL: FAILURE') . '</span>') . '</dd></dl>';
- $result ? $_error = $_error : $_error = $_error + 1;
-
- $msg .= '<dl><dt>' . lang('INSTALL: I ASSUME AN ARRAY') . ' ' . $prefix . '_log</dt><dd>';
-
- $sql = "CREATE TABLE IF NOT EXISTS " . $prefix . "_log (
- `log_id` int(10) NULL DEFAULT NULL AUTO_INCREMENT,
- `log_userid` int(10) NULL DEFAULT '0',
- `log_ip` varchar(50) NULL DEFAULT NULL,
- `log_adddate` int(10) NULL DEFAULT '0',
- `log_description` text NULL DEFAULT NULL,
- `log_options` text NULL DEFAULT NULL,
- PRIMARY KEY (`log_id`)
- ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci AUTO_INCREMENT=1;";
- $result = mysql_query($sql);
-
- $msg .= ($result ? '<span class="green">' . lang('INSTALL: SUCCESS') . '</span>' : '<span class="red">' . lang('INSTALL: FAILURE') . '</span>') . '</dd></dl>';
- $result ? $_error = $_error : $_error = $_error + 1;
-
-
- // GROUP
- $msg .= '<dl><dt>' . lang('INSTALL: ERASE ARRAY') . ' ' . $prefix . '_group</dt><dd>';
-
- $sql = 'DROP TABLE IF EXISTS ' . $prefix . '_group';
- $result = mysql_query($sql);
-
- $msg .= ($result ? '<span class="green">' . lang('INSTALL: SUCCESS') . '</span>' : '<span class="red">' . lang('INSTALL: FAILURE') . '</span>') . '</dd></dl>';
- $result ? $_error = $_error : $_error = $_error + 1;
-
- $msg .= '<dl><dt>' . lang('INSTALL: I ASSUME AN ARRAY') . ' ' . $prefix . '_group</dt><dd>';
-
- $sql = "CREATE TABLE IF NOT EXISTS " . $prefix . "_group (
- `group_id` int(10) NULL DEFAULT NULL AUTO_INCREMENT,
- `group_name` varchar(255) NULL DEFAULT NULL,
- `group_identify` varchar(32) NULL DEFAULT NULL,
- `group_description` longtext NULL DEFAULT NULL,
- `group_permissions` text NULL DEFAULT NULL,
- `group_delate` tinyint(1) NULL DEFAULT '1',
- PRIMARY KEY (`group_id`)
- ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci AUTO_INCREMENT=6;";
- $result = mysql_query($sql);
-
- $msg .= ($result ? '<span class="green">' . lang('INSTALL: SUCCESS') . '</span>' : '<span class="red">' . lang('INSTALL: FAILURE') . '</span>') . '</dd></dl>';
- $result ? $_error = $_error : $_error = $_error + 1;
-
- $msg .= '<dl><dt>' . lang('INSTALL: I PUT A DATA IN AN ARRAY') . ' ' . $prefix . '_group</dt><dd>';
-
- $sql = "INSERT
- INTO " . $prefix . "_group
- (group_id, group_name, group_identify, group_description, group_delate)
- VALUES
- (1, '" .lang('INSTALL: USER') . "', 'user', '" . lang('INSTALL: CAN LOG ON TO THE SITE, COMMENT ON AND RATE') . "', 0),
- (2, '" .lang('INSTALL: ADMIN') . "', 'admin', '" . lang('INSTALL: IT HAS ALL THE PRIVILEGES') . "', 0),
- (3, '" .lang('INSTALL: DEMO USER') . "', 'demo', '" . lang('INSTALL: DEMO USER') . "', 1),
- (4, '" .lang('INSTALL: EDITOR') . "', 'news', '" . lang('INSTALL: CAN ADD, EDIT AND DELETE NEWS') . "', 1),
- (5, '" .lang('INSTALL: GALLERY EDITOR') . "', 'gallery', '" . lang('INSTALL: CAN ADD, EDIT AND DELETE GALLERY') . "', 1);";
- $result = mysql_query($sql);
-
- $msg .= ($result ? '<span class="green">' . lang('INSTALL: SUCCESS') . '</span>' : '<span class="red">' . lang('INSTALL: FAILURE') . '</span>') . '</dd></dl>';
- $result ? $_error = $_error : $_error = $_error + 1;
-
-
- // CONTENT
- $msg .= '<dl><dt>' . lang('INSTALL: ERASE ARRAY') . ' ' . $prefix . '_content</dt><dd>';
-
- $sql = 'DROP TABLE IF EXISTS ' . $prefix . '_content';
- $result = mysql_query($sql);
-
- $msg .= ($result ? '<span class="green">' . lang('INSTALL: SUCCESS') . '</span>' : '<span class="red">' . lang('INSTALL: FAILURE') . '</span>') . '</dd></dl>';
- $result ? $_error = $_error : $_error = $_error + 1;
-
- $msg .= '<dl><dt>' . lang('INSTALL: I ASSUME AN ARRAY') . ' ' . $prefix . '_content</dt><dd>';
-
- $sql = "CREATE TABLE IF NOT EXISTS " . $prefix . "_content (
- `content_id` int(10) NULL DEFAULT NULL AUTO_INCREMENT,
- `content_type` tinyint(2) NULL DEFAULT '0',
- `content_title` varchar(255) NULL DEFAULT NULL,
- `content_metatitle` varchar(255) NULL DEFAULT NULL,
- `content_metadescription` text NULL DEFAULT NULL,
- `content_metakeywords` varchar(255) NULL DEFAULT NULL,
- `content_modidentify` varchar(32) NULL DEFAULT NULL,
- `content_modoptions` text NULL DEFAULT NULL,
- `content_text` text NULL DEFAULT NULL,
- `content_url` varchar(255) NULL DEFAULT NULL,
- `content_tpl` varchar(255) NULL DEFAULT NULL,
- `content_active` tinyint(1) NULL DEFAULT '1',
- `content_position` tinyint(4) NULL DEFAULT '0',
- `content_permission` varchar(255) NULL DEFAULT NULL,
- `content_delate` tinyint(1) NULL DEFAULT '0',
- `content_start` tinyint(1) NULL DEFAULT '0',
- PRIMARY KEY (`content_id`),
- FULLTEXT `content_title` (`content_title`,`content_metatitle`,`content_metadescription`,`content_metakeywords`,`content_text`)
- ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci AUTO_INCREMENT=1;";
- $result = mysql_query($sql);
-
- $msg .= ($result ? '<span class="green">' . lang('INSTALL: SUCCESS') . '</span>' : '<span class="red">' . lang('INSTALL: FAILURE') . '</span>') . '</dd></dl>';
- $result ? $_error = $_error : $_error = $_error + 1;
-
- $msg .= '<dl><dt>' . lang('INSTALL: I PUT A DATA IN AN ARRAY') . ' ' . $prefix . '_content</dt><dd>';
-
- $sql = "INSERT
- INTO " . $prefix . "_content
- (content_id, content_type, content_title, content_modidentify, content_position, content_start)
- VALUES
- (1, 1, 'Front site', 'frontsite', 1, 1),
- (2, 1, 'Register', 'register', 2, 0),
- (3, 1, 'Login', 'login', 3, 0),
- (4, 1, 'Error', 'content', 4, 0),
- (5, 1, 'Localization', 'content', 5, 0);";
- $result = mysql_query($sql);
-
- $msg .= ($result ? '<span class="green">' . lang('INSTALL: SUCCESS') . '</span>' : '<span class="red">' . lang('INSTALL: FAILURE') . '</span>') . '</dd></dl>';
- $result ? $_error = $_error : $_error = $_error + 1;
-
- // MODULE
- $msg .= '<dl><dt>' . lang('INSTALL: ERASE ARRAY') . ' ' . $prefix . '_module</dt><dd>';
-
- $sql = 'DROP TABLE IF EXISTS ' . $prefix . '_module';
- $result = mysql_query($sql);
-
- $msg .= ($result ? '<span class="green">' . lang('INSTALL: SUCCESS') . '</span>' : '<span class="red">' . lang('INSTALL: FAILURE') . '</span>') . '</dd></dl>';
- $result ? $_error = $_error : $_error = $_error + 1;
-
- $msg .= '<dl><dt>' . lang('INSTALL: I ASSUME AN ARRAY') . ' ' . $prefix . '_module</dt><dd>';
-
- $sql = "CREATE TABLE IF NOT EXISTS " . $prefix . "_module (
- `module_id` int(10) NULL DEFAULT NULL AUTO_INCREMENT,
- `module_name` varchar(100) NULL DEFAULT NULL,
- `module_description` text NULL DEFAULT NULL,
- `module_identify` varchar(30) NULL DEFAULT NULL,
- `module_ver` float(3,2) NULL DEFAULT '0.00',
- `module_adddate` int(10) NULL DEFAULT '0',
- `module_moddate` int(10) NULL DEFAULT '0',
- `module_active` tinyint(1) NULL DEFAULT '0',
- `module_delate` tinyint(1) NULL DEFAULT '0',
- PRIMARY KEY (`module_id`),
- UNIQUE `module_identify` (`module_identify`)
- ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci AUTO_INCREMENT=7;";
- $result = mysql_query($sql);
-
- $msg .= ($result ? '<span class="green">' . lang('INSTALL: SUCCESS') . '</span>' : '<span class="red">' . lang('INSTALL: FAILURE') . '</span>') . '</dd></dl>';
- $result ? $_error = $_error : $_error = $_error + 1;
-
-
- // COMPONENT
- $msg .= '<dl><dt>' . lang('INSTALL: ERASE ARRAY') . ' ' . $prefix . '_component</dt><dd>';
-
- $sql = 'DROP TABLE IF EXISTS ' . $prefix . '_component';
- $result = mysql_query($sql);
-
- $msg .= ($result ? '<span class="green">' . lang('INSTALL: SUCCESS') . '</span>' : '<span class="red">' . lang('INSTALL: FAILURE') . '</span>') . '</dd></dl>';
- $result ? $_error = $_error : $_error = $_error + 1;
-
- $msg .= '<dl><dt>' . lang('INSTALL: I ASSUME AN ARRAY') . ' ' . $prefix . '_component</dt><dd>';
-
- $sql = "CREATE TABLE IF NOT EXISTS " . $prefix . "_component (
- `component_id` int(10) NULL DEFAULT NULL AUTO_INCREMENT,
- `component_name` varchar(100) NULL DEFAULT NULL,
- `component_description` text NULL DEFAULT NULL,
- `component_identify` varchar(32) NULL DEFAULT NULL,
- `component_ver` float(3,2) NULL DEFAULT '0.00',
- `component_modrequire` varchar(255) NULL DEFAULT NULL,
- `component_adddate` int(10) NULL DEFAULT '0',
- `component_moddate` int(10) NULL DEFAULT '0',
- `component_options` text NULL DEFAULT NULL,
- `component_active` tinyint(1) NULL DEFAULT '0',
- `component_delate` tinyint(1) NULL DEFAULT '0',
- PRIMARY KEY (`component_id`),
- UNIQUE `component_identify` (`component_identify`)
- ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci AUTO_INCREMENT=1;";
- $result = mysql_query($sql);
-
- $msg .= ($result ? '<span class="green">' . lang('INSTALL: SUCCESS') . '</span>' : '<span class="red">' . lang('INSTALL: FAILURE') . '</span>') . '</dd></dl>';
- $result ? $_error = $_error : $_error = $_error + 1;
-
-
- // BLOCK
- $msg .= '<dl><dt>' . lang('INSTALL: ERASE ARRAY') . ' ' . $prefix . '_block</dt><dd>';
-
- $sql = 'DROP TABLE IF EXISTS ' . $prefix . '_block';
- $result = mysql_query($sql);
-
- $msg .= ($result ? '<span class="green">' . lang('INSTALL: SUCCESS') . '</span>' : '<span class="red">' . lang('INSTALL: FAILURE') . '</span>') . '</dd></dl>';
- $result ? $_error = $_error : $_error = $_error + 1;
-
- $msg .= '<dl><dt>' . lang('INSTALL: I ASSUME AN ARRAY') . ' ' . $prefix . '_block</dt><dd>';
-
- $sql = "CREATE TABLE IF NOT EXISTS " . $prefix . "_block (
- `block_id` int(10) NULL DEFAULT NULL AUTO_INCREMENT,
- `block_name` varchar(100) NULL DEFAULT NULL,
- `block_identify` varchar(100) NULL DEFAULT NULL,
- `block_description` text NULL DEFAULT NULL,
- `block_type` tinyint(1) NULL DEFAULT '0',
- `block_code` text NULL DEFAULT NULL,
- `block_text` text NULL DEFAULT NULL,
- `block_comidentify` varchar(100) NULL DEFAULT NULL,
- `block_options` text NULL DEFAULT NULL,
- `block_permission` varchar(255) NULL DEFAULT NULL,
- `block_active` tinyint(1) NULL DEFAULT '0',
- `block_position` tinyint(4) NULL DEFAULT '0',
- PRIMARY KEY (`block_id`)
- ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci AUTO_INCREMENT=1;";
- $result = mysql_query($sql);
-
- $msg .= ($result ? '<span class="green">' . lang('INSTALL: SUCCESS') . '</span>' : '<span class="red">' . lang('INSTALL: FAILURE') . '</span>') . '</dd></dl>';
- $result ? $_error = $_error : $_error = $_error + 1;
-
-
- $msg .= '<dl><dt>' . lang('INSTALL: I PUT A DATA IN AN ARRAY') . ' ' . $prefix . '_block</dt><dd>';
-
- $sql = "INSERT
- INTO " . $prefix . "_block
- (block_id, block_name, block_identify, block_description, block_type, block_comidentify, block_options, block_active, block_position)
- VALUES
- (1, '" . lang('INSTALL: BASIC LINKS') . "', 'header', '" . lang('INSTALL: BASIC LINKS') . "', 3, 'primary_links', '{\"menu_id\":\"navbarMenu\",\"menu_class\":\"navbarMenu\",\"menu_show_title\":\"0\",\"menu_title\":\"Menu\"}', 1, 1),
- (2, '" . lang('INSTALL: ADMIN LINKS') . "', 'admin_links', '" . lang('INSTALL: ADMIN LINKS INFO') . "', 3, 'admin_links', '{\"menu_id\":\"\",\"menu_class\":\"\",\"menu_show_title\":\"1\",\"menu_title\":\"Menu\"}', 1, 1),
- (3, '" . lang('INSTALL: ADMIN MODULES') . "', 'admin_modules', '" . lang('INSTALL: ADMIN MODULES INFO') . "', 3, 'admin_modules', '{\"menu_id\":\"\",\"menu_class\":\"\",\"menu_show_title\":\"1\",\"menu_title\":\"Menu\"}', 1, 1);";
- $result = mysql_query($sql);
-
- $msg .= ($result ? '<span class="green">' . lang('INSTALL: SUCCESS') . '</span>' : '<span class="red">' . lang('INSTALL: FAILURE') . '</span>') . '</dd></dl>';
- $result ? $_error = $_error : $_error = $_error + 1;
-
- // MENU
- $msg .= '<dl><dt>' . lang('INSTALL: ERASE ARRAY') . ' ' . $prefix . '_menu</dt><dd>';
-
- $sql = "DROP TABLE IF EXISTS " . $prefix . "_menu";
- $result = mysql_query($sql);
-
- $msg .= ($result ? '<span class="green">' . lang('INSTALL: SUCCESS') . '</span>' : '<span class="red">' . lang('INSTALL: FAILURE') . '</span>') . '</dd></dl>';
- $result ? $_error = $_error : $_error = $_error + 1;
-
- $msg .= '<dl><dt>' . lang('INSTALL: I ASSUME AN ARRAY') . ' ' . $prefix . '_menu</dt><dd>';
-
- $sql = "CREATE TABLE IF NOT EXISTS " . $prefix . "_menu (
- `menu_id` int(11) NULL DEFAULT NULL AUTO_INCREMENT,
- `menu_identify` varchar(32) NULL DEFAULT NULL,
- `menu_name` varchar(32) NULL DEFAULT NULL,
- `menu_description` text NULL DEFAULT NULL,
- `menu_active` tinyint(1) NULL DEFAULT '0',
- `menu_delate` tinyint(1) NULL DEFAULT '1',
- PRIMARY KEY (`menu_id`)
- ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci AUTO_INCREMENT=1;";
- $result = mysql_query($sql);
-
- $msg .= ($result ? '<span class="green">' . lang('INSTALL: SUCCESS') . '</span>' : '<span class="red">' . lang('INSTALL: FAILURE') . '</span>') . '</dd></dl>';
- $result ? $_error = $_error : $_error = $_error + 1;
-
-
- $msg .= '<dl><dt>' . lang('INSTALL: I PUT A DATA IN AN ARRAY') . ' ' . $prefix . '_menu</dt><dd>';
-
- $sql = "INSERT
- INTO " . $prefix . "_menu
- (menu_id, menu_identify, menu_name, menu_description, menu_active, menu_delate)
- VALUES
- (1, 'primary_links', '" . lang('INSTALL: BASIC LINKS') . "', '" . lang('INSTALL: BASIC LINKS') . "', 1, 0),
- (2, 'secendary_links', '" . lang('INSTALL: ADDITIONAL LINKS') . "', '" . lang('INSTALL: ADDITIONAL LINKS INFO') . "', 1, 0),
- (3, 'navigation', '" . lang('INSTALL: NAVIGATION') . "', '" . lang('INSTALL: NAVIGATION INFO') . "', 1, 0),
- (4, 'admin_links', '" . lang('INSTALL: ADMIN LINKS') . "', '" . lang('INSTALL: ADMIN LINKS INFO') . "', 1, 0),
- (5, 'admin_modules', '" . lang('INSTALL: ADMIN MODULES') . "', '" . lang('INSTALL: ADMIN MODULES INFO') . "', 1, 0),
- (6, 'admin_components', '" . lang('INSTALL: ADMIN COMPONENTS') . "', '" . lang('INSTALL: ADMIN COMPONENTS INFO') . "', 1, 0);";
- $result = mysql_query($sql);
-
- $msg .= ($result ? '<span class="green">' . lang('INSTALL: SUCCESS') . '</span>' : '<span class="red">' . lang('INSTALL: FAILURE') . '</span>') . '</dd></dl>';
- $result ? $_error = $_error : $_error = $_error + 1;
-
-
- $msg .= '<dl><dt>' . lang('INSTALL: ERASE ARRAY') . ' ' . $prefix . '_menuelements</dt><dd>';
-
- $sql = "DROP TABLE IF EXISTS " . $prefix . "_menuelements";
- $result = mysql_query($sql);
-
- $msg .= ($result ? '<span class="green">' . lang('INSTALL: SUCCESS') . '</span>' : '<span class="red">' . lang('INSTALL: FAILURE') . '</span>') . '</dd></dl>';
- $result ? $_error = $_error : $_error = $_error + 1;
-
- $msg .= '<dl><dt>' . lang('INSTALL: I ASSUME AN ARRAY') . ' ' . $prefix . '_menuelements</dt><dd>';
-
- $sql = "CREATE TABLE IF NOT EXISTS " . $prefix . "_menuelements (
- `element_id` int(11) NULL DEFAULT NULL AUTO_INCREMENT,
- `element_menu` varchar(32) NULL DEFAULT NULL,
- `element_parentid` int(10) NULL DEFAULT '0',
- `element_patch` varchar(255) NULL DEFAULT NULL,
- `element_seolink` varchar(255) NULL DEFAULT NULL,
- `element_name` varchar(255) NULL DEFAULT NULL,
- `element_title` varchar(255) NULL DEFAULT NULL,
- `element_options` text NULL DEFAULT NULL,
- `element_module` varchar(255) NULL DEFAULT NULL,
- `element_include` varchar(255) NULL DEFAULT NULL,
- `element_active` tinyint(1) NULL DEFAULT '0',
- `element_notlink` tinyint(1) NULL DEFAULT '0',
- `element_notmenu` tinyint(1) NULL DEFAULT '0',
- `element_external` tinyint(1) NULL DEFAULT '0',
- `element_expanded` tinyint(1) NULL DEFAULT '0',
- `element_position` tinyint(4) NULL DEFAULT '0',
- `element_depht` tinyint(4) NULL DEFAULT '0',
- `element_p1` int(10) NULL DEFAULT '0',
- `element_p2` int(10) NULL DEFAULT '0',
- `element_p3` int(10) NULL DEFAULT '0',
- `element_p4` int(10) NULL DEFAULT '0',
- `element_p5` int(10) NULL DEFAULT '0',
- `element_p6` int(10) NULL DEFAULT '0',
- `element_p7` int(10) NULL DEFAULT '0',
- `element_p8` int(10) NULL DEFAULT '0',
- `element_p9` int(10) NULL DEFAULT '0',
- `element_delate` tinyint(1) NULL DEFAULT '0',
- `element_clone` int(10) NULL DEFAULT '0',
- `element_cache` int(10) NULL DEFAULT '0',
- `element_permission` varchar(255) NULL DEFAULT NULL,
- PRIMARY KEY (`element_id`)
- ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci AUTO_INCREMENT=8;";
- $result = mysql_query($sql);
-
- $msg .= ($result ? '<span class="green">' . lang('INSTALL: SUCCESS') . '</span>' : '<span class="red">' . lang('INSTALL: FAILURE') . '</span>') . '</dd></dl>';
- $result ? $_error = $_error : $_error = $_error + 1;
-
-
- $msg .= '<dl><dt>' . lang('INSTALL: I PUT A DATA IN AN ARRAY') . ' ' . $prefix . '_menuelements</dt><dd>';
-
- $sql = "INSERT
- INTO " . $prefix . "_menuelements
- (element_id, element_menu, element_patch, element_seolink, element_name, element_title, element_module, element_include, element_active, element_position, element_depht, element_p1, element_permission)
- VALUES
- (1, 'primary_links', 'node/1', '<front>', 'Front site', 'Front site', 'frontsite', 'module/frontsite/frontsite.display.php', 1, 1, 1, 1, ''),
- (2, 'navigation', 'node/2', 'register', 'Register', 'Register', 'register', 'module/register/register.display.php', 1, 2, 1, 2, ''),
- (3, 'navigation', 'node/3', 'login', 'Login', 'Login', 'login', 'module/login/login.display.php', 1, 1, 1, 3, ''),
- (4, 'navigation', 'node/4', 'error', 'Error', 'Error', 'content', 'module/content/content.display.php', 1, 1, 1, 4, ''),
- (5, 'navigation', 'node/5', 'localization', 'Localization', 'Localization', 'content', 'module/content/content.display.php', 1, 1, 1, 5, ''),
- (6, 'admin_links', 'admin/settings', 'admin/settings', 'Ustawienia serwisu', 'Ustawienia serwisu', 'admin', 'module/admin/admin.display.php', 1, 1, 1, 6, 'admin,demo'),
- (7, 'admin_links', 'admin/group', 'admin/group', 'Grupy u?ytkowników', 'Grupy u?ytkowników', 'admin', 'module/admin/admin.display.php', 1, 2, 1, 7, 'admin,demo'),
- (8, 'admin_links', 'admin/user', 'admin/user', 'U?ytkownicy', 'U?ytkownicy', 'admin', 'module/admin/admin.display.php', 1, 3, 1, 8, 'admin,demo'),
- (9, 'admin_links', 'admin/module', 'admin/module', 'Modu?y', 'Modu?y', 'admin', 'module/admin/admin.display.php', 1, 4, 1, 9, 'admin,demo'),
- (10, 'admin_links', 'admin/component', 'admin/component', 'Komponenty', 'Komponenty', 'admin', 'module/admin/admin.display.php', 1, 5, 1, 10, 'admin,demo'),
- (11, 'admin_links', 'admin/content', 'admin/content', 'Zawarto??', 'Zawarto??', 'admin', 'module/admin/admin.display.php', 1, 6, 1, 11, 'admin,demo'),
- (12, 'admin_links', 'admin/menubuilder', 'admin/menubuilder', 'Menu', 'Menu', 'admin', 'module/admin/admin.display.php', 1, 7, 1, 12, 'admin,demo'),
- (13, 'admin_links', 'admin/block', 'admin/block', 'Bloki', 'Bloki', 'admin', 'module/admin/admin.display.php', 1, 8, 1, 13, 'admin,demo'),
- (14, 'admin_links', 'admin/lang', 'admin/lang', 'J?zyk', 'J?zyk', 'admin', 'module/admin/admin.display.php', 1, 9, 1, 14, 'admin,demo'),
- (15, 'admin_links', 'admin/ban', 'admin/ban', 'Bany', 'Bany', 'admin', 'module/admin/admin.display.php', 1, 10, 1, 15, 'admin,demo');";
- $result = mysql_query($sql);
-
- $msg .= ($result ? '<span class="green">' . lang('INSTALL: SUCCESS') . '</span>' : '<span class="red">' . lang('INSTALL: FAILURE') . '</span>') . '</dd></dl>';
- $result ? $_error = $_error : $_error = $_error + 1;
-
-
- // USERS
- $msg .= '<dl><dt>' . lang('INSTALL: ERASE ARRAY') . ' ' . $prefix . '_user</dt><dd>';
-
- $sql = "DROP TABLE IF EXISTS " . $prefix . "_user";
- $result = mysql_query($sql);
-
- $msg .= ($result ? '<span class="green">' . lang('INSTALL: SUCCESS') . '</span>' : '<span class="red">' . lang('INSTALL: FAILURE') . '</span>') . '</dd></dl>';
- $result ? $_error = $_error : $_error = $_error + 1;
-
- $msg .= '<dl><dt>' . lang('INSTALL: I ASSUME AN ARRAY') . ' ' . $prefix . '_user</dt><dd>';
-
- $sql = "CREATE TABLE IF NOT EXISTS " . $prefix . "_user (
- `user_id` mediumint(8) NULL DEFAULT NULL AUTO_INCREMENT,
- `username` varchar(255) NULL DEFAULT NULL,
- `user_email` varchar(100) NULL DEFAULT NULL,
- `user_password` varchar(40) NULL DEFAULT NULL,
- `user_lastchanges` int(11) NULL DEFAULT '0',
- `user_regdate` int(11) NULL DEFAULT '0',
- `user_lastvisit` int(11) NULL DEFAULT '0',
- `user_online` tinyint(1) NULL DEFAULT '0',
- `user_actkey` varchar(32) NULL DEFAULT NULL,
- `user_ip` varchar(40) NULL DEFAULT NULL,
- `user_question` varchar(255) NULL DEFAULT NULL,
- `user_answer` varchar(255) NULL DEFAULT NULL,
- `user_permissions` varchar(255) NULL DEFAULT '0',
- `user_lastpage` text NULL DEFAULT NULL,
- `user_style` varchar(255) NULL DEFAULT '0',
- `user_birthday` int(10) NULL DEFAULT '0',
- `user_name` varchar(100) NULL DEFAULT NULL,
- `user_name_show` tinyint(1) NULL DEFAULT '0',
- `user_surname` varchar(100) NULL DEFAULT NULL,
- `user_surname_show` tinyint(1) NULL DEFAULT '0',
- `user_sex` tinyint(1) NULL DEFAULT '0',
- `user_city_name` varchar(100) NULL DEFAULT NULL,
- `user_ads` tinyint(1) NULL DEFAULT '0',
- `user_status` tinyint(1) NULL DEFAULT '0',
- PRIMARY KEY (`user_id`),
- UNIQUE `user_email` (`user_email`),
- UNIQUE `username` (`username`)
- ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci AUTO_INCREMENT=2;";
- $result = mysql_query($sql);
-
- $msg .= ($result ? '<span class="green">' . lang('INSTALL: SUCCESS') . '</span>' : '<span class="red">' . lang('INSTALL: FAILURE') . '</span>') . '</dd></dl>';
- $result ? $_error = $_error : $_error = $_error + 1;
-
-
- // BANLIST
- $msg .= '<dl><dt>' . lang('INSTALL: ERASE ARRAY') . ' ' . $prefix . '_banlist</dt><dd>';
-
- $sql = "DROP TABLE IF EXISTS " . $prefix . "_banlist";
- $result = mysql_query($sql);
-
- $msg .= ($result ? '<span class="green">' . lang('INSTALL: SUCCESS') . '</span>' : '<span class="red">' . lang('INSTALL: FAILURE') . '</span>') . '</dd></dl>';
- $result ? $_error = $_error : $_error = $_error + 1;
-
- $msg .= '<dl><dt>' . lang('INSTALL: I ASSUME AN ARRAY') . ' ' . $prefix . '_banlist</dt><dd>';
-
- $sql = "CREATE TABLE IF NOT EXISTS " . $prefix . "_banlist (
- `ban_id` int(10) NULL DEFAULT NULL AUTO_INCREMENT,
- `ban_userid` int(10) NULL DEFAULT '0',
- `ban_ip` varchar(255) NULL DEFAULT NULL,
- `ban_email` varchar(255) NULL DEFAULT NULL,
- `ban_start` int(10) NULL DEFAULT '0',
- `ban_end` int(10) NULL DEFAULT '0',
- `ban_rea…
Large files files are truncated, but you can click here to view the full file