Файл: core/data/tables.php
Строк: 720
<?php
if (!defined('COLLATE')) define('COLLATE', 'utf8');
function create_table( $login, $email, $passwd, $manual = 0 ) {
global $db, $config;
$passwd = md5(md5($passwd));
$query = '';
$time = time();
$thistime = date( 'Y-m-d H:i:s', time() );
$tbl[] = array();
$tbl[] = "DROP TABLE IF EXISTS `?_ads`;";
$tbl[] = "CREATE TABLE IF NOT EXISTS `?_ads` (
`ads_id` int(11) NOT NULL AUTO_INCREMENT,
`ads_url` varchar(255) NOT NULL,
`ads_name` varchar(255) NOT NULL,
`ads_color` varchar(7) NOT NULL DEFAULT '',
`ads_bold` int(1) NOT NULL DEFAULT '0',
`ads_time` int(11) NOT NULL DEFAULT '0',
`ads_count` int(11) NOT NULL DEFAULT '0',
`ads_position` varchar(1) NOT NULL,
PRIMARY KEY (`ads_id`),
KEY `time` (`ads_time`),
KEY `position` (`ads_position`)
) ENGINE=MyISAM /*!40101 DEFAULT CHARACTER SET " . COLLATE . " COLLATE " . COLLATE . "_general_ci */;";
$tbl[] = "DROP TABLE IF EXISTS `?_blog_category`;";
$tbl[] = "CREATE TABLE IF NOT EXISTS `?_blog_category` (
`cats_id` smallint(4) unsigned NOT NULL AUTO_INCREMENT,
`cats_order` smallint(4) unsigned NOT NULL DEFAULT '0',
`cats_name` varchar(100) NOT NULL DEFAULT '',
`cats_text` VARCHAR( 555 ) NOT NULL DEFAULT '',
`cats_count` mediumint(8) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`cats_id`)
) ENGINE=MyISAM /*!40101 DEFAULT CHARACTER SET " . COLLATE . " COLLATE " . COLLATE . "_general_ci */;";
$tbl[] = "DROP TABLE IF EXISTS `?_blog_posts`;";
$tbl[] = "CREATE TABLE IF NOT EXISTS `?_blog_posts` (
`blog_id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`blog_cats_id` int(11) unsigned NOT NULL DEFAULT '0',
`blog_user` varchar(25) NOT NULL DEFAULT '',
`blog_guest` varchar(25) NOT NULL DEFAULT '',
`blog_title` varchar(100) NOT NULL DEFAULT '',
`blog_text` text NOT NULL DEFAULT '',
`blog_tags` varchar(100) NOT NULL DEFAULT '',
`blog_rating` int(11) NOT NULL DEFAULT '0',
`blog_read` int(11) unsigned NOT NULL DEFAULT '0',
`blog_comments` mediumint(8) unsigned NOT NULL DEFAULT '0',
`blog_time` int(11) unsigned NOT NULL DEFAULT '0',
`blog_is_xxx` smallint(1) NOT NULL DEFAULT '0',
`blog_moders` smallint(1) NOT NULL DEFAULT '0',
PRIMARY KEY (`blog_id`),
KEY `blog_cats_id` (`blog_cats_id`),
KEY `blog_user` (`blog_user`),
KEY `blog_time` (`blog_time`),
KEY `blog_is_xxx` (`blog_is_xxx`),
KEY `blog_moders` (`blog_moders`),
FULLTEXT KEY `search` (`blog_title`,`blog_text`)
) ENGINE=MyISAM /*!40101 DEFAULT CHARACTER SET " . COLLATE . " COLLATE " . COLLATE . "_general_ci */;";
$tbl[] = "DROP TABLE IF EXISTS `?_blog_rated`;";
$tbl[] = "CREATE TABLE IF NOT EXISTS `?_blog_rated` (
`rated_id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`rated_blog` int(11) unsigned NOT NULL,
`rated_user` varchar(20) NOT NULL,
`rated_time` int(11) unsigned NOT NULL,
PRIMARY KEY (`rated_id`)
) ENGINE=MyISAM /*!40101 DEFAULT CHARACTER SET " . COLLATE . " COLLATE " . COLLATE . "_general_ci */;";
$tbl[] = "DROP TABLE IF EXISTS `?_blog_files`;";
$tbl[] = "CREATE TABLE IF NOT EXISTS `?_blog_files` (
`files_id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`files_post` int(11) unsigned NOT NULL DEFAULT '0',
`files_name` varchar(50) NOT NULL DEFAULT '',
`files_path` varchar(255) NOT NULL DEFAULT '',
`files_size` int(11) unsigned NOT NULL DEFAULT '0',
`files_added` int(11) unsigned NOT NULL DEFAULT '0',
`files_count` int(11) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`files_id`),
KEY `files_post` (`files_post`)
) ENGINE=MyISAM /*!40101 DEFAULT CHARACTER SET " . COLLATE . " COLLATE " . COLLATE . "_general_ci */;";
$tbl[] = "DROP TABLE IF EXISTS `?_chat`;";
$tbl[] = "CREATE TABLE IF NOT EXISTS `?_chat` (
`chat_id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`chat_user` varchar(20) NOT NULL,
`chat_text` text NOT NULL,
`chat_ip` varchar(20) NOT NULL,
`chat_brow` varchar(25) NOT NULL,
`chat_time` int(11) unsigned NOT NULL,
`chat_edit` varchar(20) NOT NULL DEFAULT '',
`chat_edit_time` int(11) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`chat_id`),
KEY `chat_time` (`chat_time`)
) ENGINE=MyISAM /*!40101 DEFAULT CHARACTER SET " . COLLATE . " COLLATE " . COLLATE . "_general_ci */;";
$tbl[] = "DROP TABLE IF EXISTS `?_chat_post`;";
$tbl[] = "CREATE TABLE IF NOT EXISTS `?_chat_post` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`room` int(11) NOT NULL DEFAULT '0',
`user` varchar(25) NOT NULL DEFAULT '',
`guest` varchar(25) NOT NULL DEFAULT '',
`time` int(11) NOT NULL DEFAULT '0',
`msg` varchar(1024) NOT NULL DEFAULT '',
`privat` int(11) NOT NULL DEFAULT '0',
`ip` varchar(15) NOT NULL DEFAULT '',
`ua` varchar(25) NOT NULL DEFAULT '',
PRIMARY KEY (`id`),
KEY `room` (`room`),
KEY `user` (`user`)
) ENGINE=MyISAM /*!40101 DEFAULT CHARACTER SET " . COLLATE . " COLLATE " . COLLATE . "_general_ci */;";
$tbl[] = "DROP TABLE IF EXISTS `?_chat_rooms`;";
$tbl[] = "CREATE TABLE IF NOT EXISTS `?_chat_rooms` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`pos` int(11) NOT NULL DEFAULT '0',
`name` varchar(32) NOT NULL DEFAULT '',
`umnik` set('0','1') DEFAULT '0',
`shutnik` set('0','1') DEFAULT '0',
`about` varchar(255) NOT NULL DEFAULT '',
`user` varchar(25) NOT NULL DEFAULT '',
`pass` varchar(32) NOT NULL DEFAULT '',
`time` INT( 11 ) UNSIGNED NOT NULL DEFAULT '0',
`type` smallint(1) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
KEY `pos` (`pos`,`umnik`,`shutnik`)
) ENGINE=MyISAM /*!40101 DEFAULT CHARACTER SET " . COLLATE . " COLLATE " . COLLATE . "_general_ci */;";
$tbl[] = "INSERT INTO `?_chat_rooms` (`id`, `pos`, `name`, `umnik`, `shutnik`, `about`, `user`, `pass`, `type`) VALUES
(1, 1, 'Общение', '0', '0', '', '', '', 0),
(2, 2, 'Беспредел', '0', '0', '', '', '', 0),
(3, 3, 'Знакомства', '0', '0', '', '', '', 0),
(4, 4, 'Для взрослых', '0', '0', '', '', '', 1);";
$tbl[] = "DROP TABLE IF EXISTS `?_chat_who`;";
$tbl[] = "CREATE TABLE IF NOT EXISTS `?_chat_who` (
`user` varchar(25) NOT NULL DEFAULT '',
`room` int(5) NOT NULL DEFAULT '0',
`time` int(11) NOT NULL DEFAULT '0',
`ip` varchar(15) NOT NULL DEFAULT '',
`ua` varchar(25) NOT NULL DEFAULT '',
KEY `user` (`room`),
KEY `room` (`room`),
KEY `time` (`time`)
) ENGINE=MyISAM /*!40101 DEFAULT CHARACTER SET " . COLLATE . " COLLATE " . COLLATE . "_general_ci */;";
$tbl[] = "DROP TABLE IF EXISTS `?_comments`;";
$tbl[] = "CREATE TABLE IF NOT EXISTS `?_comments` (
`comm_id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`comm_cats` smallint(4) unsigned NOT NULL DEFAULT '0',
`comm_post` int(11) unsigned NOT NULL DEFAULT '0',
`comm_text` text NOT NULL,
`comm_author` varchar(20) NOT NULL DEFAULT '',
`comm_type` varchar(20) NOT NULL DEFAULT '',
`comm_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`comm_ip` varchar(20) NOT NULL DEFAULT '',
`comm_ua` varchar(25) NOT NULL DEFAULT '',
PRIMARY KEY (`comm_id`),
KEY `comm_post` (`comm_post`),
KEY `comm_type` (`comm_type`),
KEY `comm_date` (`comm_date`)
) ENGINE=MyISAM /*!40101 DEFAULT CHARACTER SET " . COLLATE . " COLLATE " . COLLATE . "_general_ci */;";
$tbl[] = "DROP TABLE IF EXISTS `?_country`;";
$tbl[] = "CREATE TABLE IF NOT EXISTS `?_country` (
`id` int(5) unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(70) NOT NULL DEFAULT '',
`tld` varchar(5) NOT NULL DEFAULT '',
PRIMARY KEY (`id`),
KEY `tld` (`tld`)
) ENGINE=MyISAM /*!40101 DEFAULT CHARACTER SET " . COLLATE . " COLLATE " . COLLATE . "_general_ci */;";
$tbl[] = "DROP TABLE IF EXISTS `?_pages`;";
$tbl[] = "CREATE TABLE IF NOT EXISTS `?_pages` (
`id` MEDIUMINT(8) NOT NULL auto_increment,
`name` varchar(100) NOT NULL default '',
`title` varchar(255) NOT NULL default '',
`desc` varchar(255) NOT NULL default '',
`keys` varchar(255) NOT NULL default '',
`text` text NOT NULL default '',
`active` tinyint(1) NOT NULL default '0',
`allow_br` tinyint(1) NOT NULL default '0',
`is_index` tinyint(1) NOT NULL DEFAULT '0',
`date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`views` mediumint(8) NOT NULL default '0',
PRIMARY KEY (`id`),
KEY `name` (`name`),
KEY `active` (`active`),
FULLTEXT KEY `text` (`text`)
) ENGINE=MyISAM /*!40101 DEFAULT CHARACTER SET " . COLLATE . " COLLATE " . COLLATE . "_general_ci */;";
// Silver coins
// Gold Coins
$tbl[] = "DROP TABLE IF EXISTS ?_users;";
$tbl[] = "CREATE TABLE IF NOT EXISTS ?_users (
`users_id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`users_login` varchar(25) NOT NULL DEFAULT '',
`users_pass` varchar(33) NOT NULL DEFAULT '',
`users_email` varchar(70) NOT NULL DEFAULT '',
`users_joined` int(11) unsigned NOT NULL,
`users_reg_ip` varchar( 15 ) NOT NULL DEFAULT '',
`users_level` smallint(4) unsigned NOT NULL DEFAULT '107',
`users_nickname` text NOT NULL DEFAULT '',
`users_first_name` varchar(25) NOT NULL DEFAULT '',
`users_last_name` varchar(55) NOT NULL DEFAULT '',
`users_country` varchar(15) NOT NULL DEFAULT '',
`users_region` varchar(70) NOT NULL DEFAULT '',
`users_city` varchar(70) NOT NULL DEFAULT '',
`users_info` text NOT NULL DEFAULT '',
`users_site` varchar(50) NOT NULL DEFAULT '',
`users_icq` int(10) unsigned NOT NULL DEFAULT '0',
`users_skype` varchar(32) NOT NULL DEFAULT '',
`users_jabber` varchar(50) NOT NULL DEFAULT '',
`users_gender` tinyint(1) unsigned NOT NULL DEFAULT '0',
`users_birthday` varchar(10) NOT NULL DEFAULT '',
`users_visits` int(11) unsigned NOT NULL DEFAULT '0',
`users_newprivat` smallint(4) unsigned NOT NULL DEFAULT '0',
`users_newwall` smallint(4) unsigned NOT NULL DEFAULT '0',
`users_allchat` int(11) NOT NULL DEFAULT '0',
`users_allforum` int(11) unsigned NOT NULL DEFAULT '0',
`users_allguest` int(11) unsigned NOT NULL DEFAULT '0',
`users_allcomments` int(11) unsigned NOT NULL DEFAULT '0',
`users_themes` varchar(20) NOT NULL DEFAULT '',
`users_setting` varchar(555) NOT NULL DEFAULT '0',
`users_point` int(11) unsigned NOT NULL DEFAULT '0',
`users_money` DECIMAL( 12, 2 ) NOT NULL DEFAULT '0.00',
`users_ban` tinyint(1) unsigned NOT NULL DEFAULT '0',
`users_timeban` int(11) unsigned NOT NULL DEFAULT '0',
`users_timelastban` int(11) unsigned NOT NULL DEFAULT '0',
`users_reasonban` text NOT NULL,
`users_loginsendban` varchar(20) NOT NULL DEFAULT '',
`users_totalban` tinyint(2) unsigned NOT NULL DEFAULT '0',
`users_explainban` tinyint(1) unsigned NOT NULL DEFAULT '0',
`users_status` varchar(50) NOT NULL DEFAULT '',
`users_avatar` varchar(50) NOT NULL DEFAULT '',
`users_picture` varchar(50) NOT NULL DEFAULT '',
`users_rating` mediumint(8) NOT NULL DEFAULT '0',
`users_posrating` mediumint(8) unsigned NOT NULL DEFAULT '0',
`users_negrating` mediumint(8) unsigned NOT NULL DEFAULT '0',
`users_keypasswd` varchar(20) NOT NULL DEFAULT '',
`users_timepasswd` int(11) unsigned NOT NULL DEFAULT '0',
`users_timelastlogin` int(11) unsigned NOT NULL DEFAULT '0',
`users_confirmreg` tinyint(1) unsigned NOT NULL DEFAULT '0',
`users_confirmregkey` varchar(30) NOT NULL DEFAULT '',
`users_secquest` varchar(50) NOT NULL DEFAULT '',
`users_secanswer` varchar(40) NOT NULL DEFAULT '',
`users_sumcredit` int(11) unsigned NOT NULL DEFAULT '0',
`users_timecredit` int(11) unsigned NOT NULL DEFAULT '0',
`users_timeaddlist` int(11) unsigned NOT NULL DEFAULT '0',
`users_timenickname` int(11) unsigned NOT NULL DEFAULT '0',
`users_uploads` INT( 11 ) UNSIGNED NOT NULL DEFAULT '0',
`users_navigation` tinyint(1) unsigned NOT NULL DEFAULT '0',
`users_person` tinyint(1) unsigned NOT NULL DEFAULT '0',
`users_newchat` int(11) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`users_id`),
UNIQUE KEY `users_login` (`users_login`),
KEY `users_level` (`users_level`),
KEY `users_email` (`users_email`),
KEY `users_themes` (`users_themes`),
KEY `users_point` (`users_point`),
KEY `users_money` (`users_money`),
KEY `users_rating` (`users_rating`)
) ENGINE=MyISAM /*!40101 DEFAULT CHARACTER SET " . COLLATE . " COLLATE " . COLLATE . "_general_ci */;";
$tbl[] = "DROP TABLE IF EXISTS `?_users_ban`;";
$tbl[] = "CREATE TABLE IF NOT EXISTS `?_users_ban` (
`ban_id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`ban_ip` varchar(15) NOT NULL,
`ban_user` varchar(20) NOT NULL DEFAULT '',
`ban_time` int(11) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`ban_id`),
UNIQUE KEY `ban_ip` (`ban_ip`)
) ENGINE=MyISAM /*!40101 DEFAULT CHARACTER SET " . COLLATE . " COLLATE " . COLLATE . "_general_ci */;";
$tbl[] = "DROP TABLE IF EXISTS `?_users_dialog`;";
$tbl[] = "CREATE TABLE IF NOT EXISTS `?_users_dialog` (
`dialog_id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`dialog_group` varchar(100) NOT NULL DEFAULT '',
`dialog_user` varchar(25) NOT NULL DEFAULT '',
`dialog_message` text NOT NULL,
`dialog_time` int(11) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`dialog_id`),
KEY `dialog_group` (`dialog_group`)
) ENGINE=MyISAM /*!40101 DEFAULT CHARACTER SET " . COLLATE . " COLLATE " . COLLATE . "_general_ci */;";
$tbl[] = "DROP TABLE IF EXISTS `?_users_ban_history`;";
$tbl[] = "CREATE TABLE IF NOT EXISTS `?_users_ban_history` (
`ban_id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`ban_user` varchar(20) NOT NULL,
`ban_send` varchar(20) NOT NULL,
`ban_type` tinyint(1) unsigned NOT NULL DEFAULT '0',
`ban_reason` text NOT NULL,
`ban_term` int(11) unsigned NOT NULL DEFAULT '0',
`ban_time` int(11) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`ban_id`),
KEY `ban_user` (`ban_user`),
KEY `ban_time` (`ban_time`)
) ENGINE=MyISAM /*!40101 DEFAULT CHARACTER SET " . COLLATE . " COLLATE " . COLLATE . "_general_ci */;";
$tbl[] = "DROP TABLE IF EXISTS `?_users_black_list`;";
$tbl[] = "CREATE TABLE IF NOT EXISTS `?_users_black_list` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`login` varchar(100) NOT NULL DEFAULT '',
`email` varchar(100) NOT NULL DEFAULT '',
`site` varchar(255) NOT NULL DEFAULT '',
`time` int(11) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
KEY `login` (`login`),
KEY `email` (`email`),
KEY `site` (`site`)
) ENGINE=MyISAM /*!40101 DEFAULT CHARACTER SET " . COLLATE . " COLLATE " . COLLATE . "_general_ci */;";
$tbl[] = "DROP TABLE IF EXISTS `?_users_change_mail`;";
$tbl[] = "CREATE TABLE IF NOT EXISTS `?_users_change_mail` (
`change_id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`change_user` varchar(20) NOT NULL,
`change_mail` varchar(50) NOT NULL,
`change_key` varchar(25) NOT NULL,
`change_time` int(11) unsigned NOT NULL,
PRIMARY KEY (`change_id`)
) ENGINE=MyISAM /*!40101 DEFAULT CHARACTER SET " . COLLATE . " COLLATE " . COLLATE . "_general_ci */;";
$tbl[] = "DROP TABLE IF EXISTS `?_users_flood`;";
$tbl[] = "CREATE TABLE IF NOT EXISTS `?_users_flood` (
`flood_id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`flood_user` varchar(20) NOT NULL,
`flood_page` varchar(30) NOT NULL,
`flood_time` int(11) unsigned NOT NULL,
PRIMARY KEY (`flood_id`),
KEY `flood_user` (`flood_user`)
) ENGINE=MyISAM /*!40101 DEFAULT CHARACTER SET " . COLLATE . " COLLATE " . COLLATE . "_general_ci */;";
$tbl[] = "DROP TABLE IF EXISTS `?_users_inbox`;";
$tbl[] = "CREATE TABLE IF NOT EXISTS `?_users_inbox` (
`inbox_id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`inbox_user` varchar(25) NOT NULL DEFAULT '',
`inbox_author` varchar(25) NOT NULL DEFAULT '',
`inbox_text` text NOT NULL DEFAULT '',
`inbox_time` int(11) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`inbox_id`),
KEY `inbox_user` (`inbox_user`),
KEY `inbox_time` (`inbox_time`)
) ENGINE=MyISAM /*!40101 DEFAULT CHARACTER SET " . COLLATE . " COLLATE " . COLLATE . "_general_ci */;";
$tbl[] = "DROP TABLE IF EXISTS `?_users_login`;";
$tbl[] = "CREATE TABLE IF NOT EXISTS `?_users_login` (
`login_id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`login_user` varchar(20) NOT NULL,
`login_ip` varchar(15) NOT NULL,
`login_brow` varchar(25) NOT NULL,
`login_time` int(11) unsigned NOT NULL,
`login_type` tinyint(1) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`login_id`),
KEY `login_user` (`login_user`),
KEY `login_time` (`login_time`)
) ENGINE=MyISAM /*!40101 DEFAULT CHARACTER SET " . COLLATE . " COLLATE " . COLLATE . "_general_ci */;";
$tbl[] = "DROP TABLE IF EXISTS `?_users_online`;";
$tbl[] = "CREATE TABLE IF NOT EXISTS `?_users_online` (
`online_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`online_ip` varchar(15) NOT NULL,
`online_brow` varchar(25) NOT NULL,
`online_time` int(11) unsigned NOT NULL,
`online_uid` int(11) unsigned NOT NULL DEFAULT '0',
`online_user` varchar(25) NOT NULL DEFAULT '',
`online_path` varchar(100) NOT NULL DEFAULT '',
`online_title` varchar(100) NOT NULL DEFAULT '',
PRIMARY KEY (`online_id`),
KEY `online_user` (`online_user`),
KEY `online_ip` (`online_ip`)
) ENGINE=MyISAM /*!40101 DEFAULT CHARACTER SET " . COLLATE . " COLLATE " . COLLATE . "_general_ci */;";
$tbl[] = "DROP TABLE IF EXISTS `?_users_outbox`;";
$tbl[] = "CREATE TABLE IF NOT EXISTS `?_users_outbox` (
`outbox_id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`outbox_user` varchar(25) NOT NULL DEFAULT '',
`outbox_author` varchar(25) NOT NULL DEFAULT '',
`outbox_text` text NOT NULL DEFAULT '',
`outbox_time` int(11) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`outbox_id`),
KEY `outbox_user` (`outbox_user`),
KEY `outbox_time` (`outbox_time`)
) ENGINE=MyISAM /*!40101 DEFAULT CHARACTER SET " . COLLATE . " COLLATE " . COLLATE . "_general_ci */;";
$tbl[] = "DROP TABLE IF EXISTS `?_users_trash`;";
$tbl[] = "CREATE TABLE IF NOT EXISTS `?_users_trash` (
`trash_id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`trash_user` varchar(25) NOT NULL DEFAULT '',
`trash_author` varchar(25) NOT NULL DEFAULT '',
`trash_text` text NOT NULL,
`trash_time` int(11) unsigned NOT NULL DEFAULT '0',
`trash_del` int(11) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`trash_id`),
KEY `trash_user` (`trash_user`),
KEY `trash_time` (`trash_time`)
) ENGINE=MyISAM /*!40101 DEFAULT CHARACTER SET " . COLLATE . " COLLATE " . COLLATE . "_general_ci */;";
$tbl[] = "DROP TABLE IF EXISTS `?_users_rating`;";
$tbl[] = "CREATE TABLE IF NOT EXISTS `?_users_rating` (
`rating_id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`rating_user` varchar(20) NOT NULL,
`rating_login` varchar(20) NOT NULL,
`rating_text` text NOT NULL,
`rating_vote` tinyint(1) unsigned NOT NULL DEFAULT '0',
`rating_time` int(11) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`rating_id`),
KEY `rating_user` (`rating_user`)
) ENGINE=MyISAM /*!40101 DEFAULT CHARACTER SET " . COLLATE . " COLLATE " . COLLATE . "_general_ci */;";
$tbl[] = "DROP TABLE IF EXISTS `?_users_status`;";
$tbl[] = "CREATE TABLE IF NOT EXISTS `?_users_status` (
`status_id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`status_topoint` mediumint(8) unsigned NOT NULL,
`status_point` mediumint(8) unsigned NOT NULL,
`status_name` varchar(50) NOT NULL,
`status_color` varchar(10) NOT NULL DEFAULT '',
PRIMARY KEY (`status_id`),
KEY `status_topoint` (`status_topoint`),
KEY `status_point` (`status_point`)
) ENGINE=MyISAM /*!40101 DEFAULT CHARACTER SET " . COLLATE . " COLLATE " . COLLATE . "_general_ci */;";
$tbl[] = "DROP TABLE IF EXISTS `?_users_visit`;";
$tbl[] = "CREATE TABLE IF NOT EXISTS `?_users_visit` (
`visit_id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`visit_user` varchar(25) NOT NULL DEFAULT '',
`visit_path` varchar(255) NOT NULL DEFAULT '',
`visit_ip` varchar(16) NOT NULL DEFAULT '',
`visit_count` int(11) unsigned NOT NULL DEFAULT '0',
`visit_allcount` int(11) unsigned NOT NULL DEFAULT '0',
`visit_nowtime` int(11) unsigned NOT NULL DEFAULT '0',
`visit_alltime` int(11) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`visit_id`),
UNIQUE KEY `visit_user` (`visit_user`),
KEY `visit_nowtime` (`visit_nowtime`),
KEY `visit_alltime` (`visit_alltime`)
) ENGINE=MyISAM /*!40101 DEFAULT CHARACTER SET " . COLLATE . " COLLATE " . COLLATE . "_general_ci */;";
$tbl[] = "DROP TABLE IF EXISTS `?_users_wall`;";
$tbl[] = "CREATE TABLE IF NOT EXISTS `?_users_wall` (
`wall_id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`wall_user` varchar(20) NOT NULL,
`wall_login` varchar(20) NOT NULL,
`wall_text` text NOT NULL,
`wall_time` int(11) unsigned NOT NULL,
PRIMARY KEY (`wall_id`),
KEY `wall_user` (`wall_user`)
) ENGINE=MyISAM /*!40101 DEFAULT CHARACTER SET " . COLLATE . " COLLATE " . COLLATE . "_general_ci */;";
$tbl[] = "INSERT INTO `?_users_status` (`status_id`, `status_topoint`, `status_point`, `status_name`, `status_color`) VALUES
(1, 0, 249, 'Новичок', ''),
(2, 250, 499, 'Местный', ''),
(3, 500, 999, 'Продвинутый', ''),
(4, 1000, 1999, 'Бывалый', ''),
(5, 2000, 3999, 'Специалист', '#FF8800'),
(6, 4000, 5999, 'Знаток', '#DC143C'),
(7, 6000, 7999, 'Мастер', '#0080FF'),
(8, 8000, 9999, 'Профессионал', '#000000'),
(9, 10000, 14999, 'Гуру', '#32608A'),
(10, 15000, 100000, 'Легенда', '#ff0000');";
$info = "Ну а Я это Я, занимаюсь тем, чем обычно занимаюсь, живу там, где я живу.nИнтересуюсь только тем,чем интересуюсь.nНу а мое имя- Имя :DnЛюблю сыграть на ПК в сталкера, на psp в gta chinatown wars, на смартфоне в call of champions. Хожу в спорт клубы, некурю, непью, неюзаю наркоту и т.д работаю охранником.nЯ так же создатель сайта [url=http://dwap.in]http://dwap.in[/url]";
$tbl[] = "INSERT INTO ?_users (`users_id`, `users_login`, `users_pass`, `users_email`, `users_joined`, `users_level`, `users_nickname`, `users_first_name`, `users_last_name`, `users_country`, `users_city`, `users_info`, `users_site`, `users_icq`, `users_skype`, `users_jabber`, `users_gender`, `users_birthday`, `users_visits`, `users_newprivat`, `users_newwall`, `users_allforum`, `users_allguest`, `users_allcomments`, `users_themes`, `users_point`, `users_money`, `users_ban`, `users_timeban`, `users_timelastban`, `users_reasonban`, `users_loginsendban`, `users_totalban`, `users_explainban`, `users_status`, `users_avatar`, `users_picture`, `users_rating`, `users_posrating`, `users_negrating`, `users_keypasswd`, `users_timepasswd`, `users_timelastlogin`, `users_confirmreg`, `users_confirmregkey`, `users_secquest`, `users_secanswer`, `users_sumcredit`, `users_timecredit`, `users_timeaddlist`, `users_timenickname`, `users_uploads`, `users_navigation`, `users_person`, `users_newchat`) VALUES
(1, '$login', '$passwd', '$email', '$time', 101, 'nick', 'Макс', 'Белецкий', 'RU', 'Красноармейск', '$info', '', '317090', '', '', 1, '', 1, 0, 0, 0, 0, 0, 'default', 500, 10000, 0, 0, 0, '', '', 0, 0, 'Администратор', '', '', 0, 0, 0, '', 0, '$time', 0, '', '', '', 0, 0, 0, 0, 10000, 0, 0, 0);";
$tbl[] = "INSERT INTO `?_country` (`id`, `name`, `tld`) VALUESn(1, 'Абхазия', 'AH'),n(2, 'Армения', 'AM'),n(3, 'Азербайджан', 'AZ'),n(4, 'Беларусь', 'BY'),n(5, 'Германия', 'DE'),n(6, 'Эстония', 'EE'),n(7, 'Грузия', 'GE'),n(8, 'Израиль', 'IL'),n(9, 'Кыргызстан', 'KG'),n(10, 'Казахстан', 'KZ'),n(11, 'Литва', 'LT'),n(12, 'Латвия', 'LV'),n(13, 'Молдавия', 'MD'),n(14, 'Россия', 'RU'),n(15, 'Таджикистан', 'TJ'),n(16, 'Украина', 'UA'),n(17, 'Великобритания', 'UK'),n(18, 'Объединенные Арабские Эмираты', 'AE'),n(19, 'Афганистан', 'AF'),n(20, 'Ангола', 'AO'),n(21, 'Аргентина', 'AR'),n(22, 'Австрия', 'AT'),n(23, 'Австралия', 'AU'),n(24, 'Босния и Герцеговина', 'BA'),n(25, 'Бангладеш', 'BD'),n(26, 'Бельгия', 'BE'),n(27, 'Болгария', 'BG'),n(28, 'Бахрейн', 'BH'),n(29, 'Бруней-Даруссалам', 'BN'),n(30, 'Боливия', 'BO'),n(31, 'Канада', 'CA'),n(32, 'Демократическая Республика Конго', 'CD'),n(33, 'Швейцария', 'CH'),n(34, 'Китай', 'CN'),n(35, 'Сербия и Черногория', 'CS'),n(36, 'Кипр', 'CY'),n(37, 'Чехия', 'CZ'),n(38, 'Дания', 'DK'),n(39, 'Алжир', 'DZ'),n(40, 'Эквадор', 'EC'),n(41, 'Египет', 'EG'),n(42, 'Испания', 'ES'),n(43, 'Финляндия', 'FI'),n(44, 'Франция', 'FR'),n(45, 'Греция', 'GR'),n(46, 'Хорватия', 'HR'),n(47, 'Венгрия', 'HU'),n(48, 'Индонезия', 'ID'),n(49, 'Ирландия', 'IE'),n(50, 'Индия', 'IN'),n(51, 'Ирак', 'IQ'),n(52, 'Иран', 'IR'),n(53, 'Италия', 'IT'),n(54, 'Иордания', 'JO'),n(55, 'Япония', 'JP'),n(56, 'Кения', 'KE'),n(57, 'Камбоджа', 'KH'),n(58, 'Кувейт', 'KW'),n(59, 'Лаос', 'LA'),n(60, 'Шри-Ланка', 'LK'),n(61, 'Люксембург', 'LU'),n(62, 'Ливия', 'LY'),n(63, 'Марокко', 'MA'),n(64, 'Монако', 'MC'),n(65, 'Черногория', 'ME'),n(66, 'Македония', 'MK'),n(67, 'Монголия', 'MN'),n(68, 'Мексика', 'MX'),n(69, 'Малайзия', 'MY'),n(70, 'Намбия', 'NA'),n(71, 'Нигерия', 'NG'),n(72, 'Нидерланды', 'NL'),n(73, 'Норвегия', 'NO'),n(74, 'Непал', 'NP'),n(75, 'Новая Зеландия', 'NZ'),n(76, 'Оман', 'OM'),n(77, 'Панама', 'PA'),n(78, 'Перу', 'PE'),n(79, 'Филиппины', 'PH'),n(80, 'Пакистан', 'PK'),n(81, 'Польша', 'PL'),n(82, 'Пуэрто-Рико', 'PR'),n(83, 'Палестинская территория', 'PS'),n(84, 'Португалия', 'PT'),n(85, 'Парагвай', 'PY'),n(86, 'Катар', 'QA'),n(87, 'Румыния', 'RO'),n(88, 'Сербия', 'RS'),n(89, 'Саудовская Аравия', 'SA'),n(90, 'Судан', 'SD'),n(91, 'Швеция', 'SE'),n(92, 'Сингапур', 'SG'),n(93, 'Словения', 'SI'),n(94, 'Словакия', 'SK'),n(95, 'Сальвадор', 'SV'),n(96, 'Сирия', 'SY'),n(97, 'Таиланд', 'TH'),n(98, 'Туркменистан', 'TM'),n(99, 'Турция', 'TR'),n(100, 'Тайвань', 'TW'),n(101, 'Танзания', 'TZ'),n(102, 'США', 'US'),n(103, 'Узбекистан', 'UZ'),n(104, 'Венесуэла', 'VE'),n(105, 'Вьетнам', 'VN'),n(106, 'Йемен', 'YE'),n(107, 'Югославия', 'YU'),n(108, 'Южная Африка', 'ZA'),n(109, 'Не определена', 'OT');";
$tbl[] = "INSERT INTO ?_pages (`id`, `name`, `title`, `desc`, `keys`, `text`, `active`, `allow_br`, `is_index`, `date`, `views`) VALUES
(1, 'rules', 'Правила сайта', '', '', 'Правила в написании.....', 1, 1, 0, '$thistime', 0);";
for ( $i = 0; $i < count( $tbl ); ++$i ) {
if ( empty($tbl[$i]) ) continue;
$tbl[$i] = str_replace('?_', $config['db_prefix'], $tbl[$i]);
if ( $manual === 0 ) {
$db->query( $tbl[$i] );
}
else
{
$query .= $tbl[$i]."nn";
}
}
return $query;
}
?>