CREATE TABLE IF NOT EXISTS `a_ads_manager_areas` (
`area_id` int(11) NOT NULL auto_increment,
`title` varchar(50) NOT NULL,
`ident` varchar(50) NOT NULL,
PRIMARY KEY (`area_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=3 ;
//=====================================//
INSERT INTO `a_ads_manager_areas` (`area_id`, `title`, `ident`) VALUES
(1, 'Верх всех страниц', 'all_pages_up'),
(2, 'Низ всех страниц', 'all_pages_down');
//=====================================//
CREATE TABLE IF NOT EXISTS `a_ads_manager_links` (
`link_id` int(11) NOT NULL auto_increment,
`area_id` int(11) NOT NULL,
`area_ident` varchar(50) NOT NULL,
`title` varchar(50) NOT NULL,
`url` varchar(255) NOT NULL,
`names` text NOT NULL,
`position` int(11) NOT NULL,
`count_all` int(11) NOT NULL,
PRIMARY KEY (`link_id`),
KEY `area_id` (`area_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=4 ;
//=====================================//
INSERT INTO `a_ads_manager_links` (`link_id`, `area_id`, `area_ident`, `title`, `url`, `names`, `position`, `count_all`) VALUES
(1, 1, 'all_pages_up', 'Ссылка вверху', 'http://jaze.ru', '[red]Бесплатная эротика![/red]', 1, 1),
(3, 2, 'all_pages_down', 'Ссылка снизу', 'http://mobilecms.ru', '[red]Первое название[/red]\r\n[green]Второе название[/green]\r\n[blue]Третье название[/blue]', 1, 0);
//=====================================//
CREATE TABLE IF NOT EXISTS `a_chat_messages` (
`message_id` int(11) NOT NULL auto_increment,
`user_id` int(11) NOT NULL,
`room_id` tinyint(3) NOT NULL,
`message` text NOT NULL,
`time` int(11) NOT NULL,
PRIMARY KEY (`message_id`),
KEY `user_id` (`user_id`,`room_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Модуль чата, таблица сообщений' AUTO_INCREMENT=1 ;
//=====================================//
CREATE TABLE IF NOT EXISTS `a_chat_rooms` (
`room_id` tinyint(3) NOT NULL auto_increment,
`position` tinyint(2) NOT NULL,
`name` varchar(50) NOT NULL,
PRIMARY KEY (`room_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Модуль чата таблица разделов' AUTO_INCREMENT=2 ;
//=====================================//
INSERT INTO `a_chat_rooms` (`room_id`, `position`, `name`) VALUES
(1, 1, 'Тестовая комната');
//=====================================//
CREATE TABLE IF NOT EXISTS `a_comments_posts` (
`comment_id` int(11) NOT NULL auto_increment,
`module` varchar(30) NOT NULL,
`item_id` int(11) NOT NULL,
`user_id` int(11) NOT NULL,
`text` varchar(300) NOT NULL,
`time` int(11) NOT NULL,
PRIMARY KEY (`comment_id`),
KEY `item_id` (`item_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
//=====================================//
CREATE TABLE IF NOT EXISTS `a_config` (
`id` int(11) NOT NULL auto_increment,
`module` varchar(30) NOT NULL,
`key` varchar(30) NOT NULL,
`value` varchar(255) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=57 ;
//=====================================//
INSERT INTO `a_config` (`id`, `module`, `key`, `value`) VALUES
(1, 'system', 'system_title', 'MobileCMS'),
(2, 'system', 'system_email', '[email protected]'),
(3, 'system', 'default_module', 'index_page'),
(4, 'system', 'ext', '.php'),
(5, 'system', 'main_menu', 'user/profile'),
(6, 'system', 'pin_code_time', '72'),
(7, 'system', 'antiflud_time', '20'),
(8, 'system', 'profiler', 'off'),
(9, 'system', 'display_errors', '0'),
(10, 'system', 'admin_theme', 'admin'),
(44, 'downloads', 'files_prefix', ''),
(45, 'downloads', 'files_per_page', '7'),
(46, 'downloads', 'directories_per_page', '50'),
(47, 'downloads', 'make_screens_from_video', '1'),
(48, 'chat', 'online_time', '10'),
(49, 'chat', 'messages_per_page', '7'),
(50, 'chat', 'message_max_len', '300'),
(51, 'chat', 'guests_in_chat', '0'),
(52, 'forum', 'show_forums_in_list_sections', '0'),
(53, 'forum', 'messages_per_page', '7'),
(54, 'forum', 'topics_per_page', '7'),
(55, 'forum', 'guests_create_topics', '0'),
(56, 'forum', 'guests_write_messages', '0'),
(11, 'system', 'default_theme', 'default');
//=====================================//
CREATE TABLE IF NOT EXISTS `a_downloads_directories` (
`directory_id` int(11) NOT NULL auto_increment,
`parent_id` int(11) default '0',
`name` varchar(30) NOT NULL,
`images` enum('yes','no') NOT NULL default 'no',
`user_files` enum('yes','no') NOT NULL default 'no',
`position` int(11) default '0',
PRIMARY KEY (`directory_id`),
KEY `parent_id` (`parent_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=6 ;
//=====================================//
INSERT INTO `a_downloads_directories` (`directory_id`, `parent_id`, `name`, `images`, `user_files`, `position`) VALUES
(1, 0, 'Картинки', 'yes', 'no', 1),
(2, 0, 'Мелодии', 'no', 'no', 2),
(3, 0, 'Игры', 'no', 'no', 3),
(4, 0, 'Анимация', 'yes', 'no', 4),
(5, 0, 'Видео', 'no', 'no', 5);
//=====================================//
CREATE TABLE IF NOT EXISTS `a_downloads_files` (
`file_id` int(11) NOT NULL auto_increment,
`user_id` int(11) NOT NULL,
`directory_id` int(11) default '0',
`time` int(11) NOT NULL,
`name` varchar(50) NOT NULL,
`real_name` varchar(50) NOT NULL,
`path_to_file` varchar(100) NOT NULL,
`filesize` float NOT NULL,
`file_ext` varchar(10) NOT NULL,
`about` varchar(1000) NOT NULL,
`downloads` int(11) default '0',
`screen1` varchar(50) NOT NULL,
`screen2` varchar(50) NOT NULL,
`screen3` varchar(50) NOT NULL,
`add_file_real_name_1` varchar(50) NOT NULL,
`add_file_view_name_1` varchar(50) NOT NULL,
`add_file_real_name_2` varchar(50) NOT NULL,
`add_file_view_name_2` varchar(50) NOT NULL,
`add_file_real_name_3` varchar(50) NOT NULL,
`add_file_view_name_3` varchar(50) NOT NULL,
`add_file_real_name_4` varchar(50) NOT NULL,
`add_file_view_name_4` varchar(50) NOT NULL,
`add_file_real_name_5` varchar(50) NOT NULL,
`add_file_view_name_5` varchar(50) NOT NULL,
`status` enum('active','moderate') NOT NULL default 'active',
`previews` enum('yes','no') NOT NULL default 'no',
`file_info` varchar(1000) NOT NULL,
PRIMARY KEY (`file_id`),
KEY `dirrectory_id` (`directory_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1000 ;
//=====================================//
CREATE TABLE IF NOT EXISTS `a_forum_forums` (
`forum_id` int(11) NOT NULL auto_increment,
`section_id` int(11) NOT NULL,
`position` int(11) NOT NULL,
`name` varchar(255) NOT NULL,
`topics` int(11) NOT NULL,
`messages` int(11) NOT NULL,
PRIMARY KEY (`forum_id`),
KEY `section_id` (`section_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=2 ;
//=====================================//
INSERT INTO `a_forum_forums` (`forum_id`, `section_id`, `position`, `name`, `topics`, `messages`) VALUES
(1, 1, 1, 'Тестовый форум', 0, 0);
//=====================================//
CREATE TABLE IF NOT EXISTS `a_forum_messages` (
`message_id` int(11) NOT NULL auto_increment,
`topic_id` int(11) NOT NULL,
`section_id` int(11) NOT NULL,
`forum_id` int(11) NOT NULL,
`user_id` int(11) NOT NULL,
`message` varchar(1000) NOT NULL,
`is_first_message` tinyint(1) NOT NULL default '0',
`is_last_message` tinyint(1) NOT NULL,
`time` int(11) NOT NULL,
`edit_editor` varchar(30) NOT NULL,
`edit_time` int(11) NOT NULL,
`edit_count` int(11) NOT NULL,
PRIMARY KEY (`message_id`),
KEY `topic_id` (`topic_id`),
KEY `forum_id` (`forum_id`),
KEY `section_id` (`section_id`),
FULLTEXT KEY `message` (`message`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
//=====================================//
CREATE TABLE IF NOT EXISTS `a_forum_sections` (
`section_id` int(11) NOT NULL auto_increment,
`position` int(11) NOT NULL,
`name` varchar(255) NOT NULL,
PRIMARY KEY (`section_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=2 ;
//=====================================//
INSERT INTO `a_forum_sections` (`section_id`, `position`, `name`) VALUES
(1, 1, 'Тестовый раздел');
//=====================================//
CREATE TABLE IF NOT EXISTS `a_forum_topics` (
`topic_id` int(11) NOT NULL auto_increment,
`section_id` int(11) NOT NULL,
`forum_id` int(11) NOT NULL,
`user_id` int(11) NOT NULL,
`name` varchar(30) NOT NULL,
`time` int(11) NOT NULL,
`last_message_time` int(11) NOT NULL,
`last_user_id` int(11) NOT NULL,
`messages` int(11) NOT NULL,
`is_top_topic` tinyint(1) default '0',
`is_close_topic` tinyint(1) default '0',
PRIMARY KEY (`topic_id`),
KEY `forum_id` (`forum_id`),
KEY `user_id` (`user_id`),
KEY `section_id` (`section_id`),
KEY `last_user_id` (`last_user_id`),
FULLTEXT KEY `name` (`name`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
//=====================================//
CREATE TABLE IF NOT EXISTS `a_guestbook` (
`message_id` int(11) NOT NULL auto_increment,
`user_id` int(11) NOT NULL,
`username` varchar(50) NOT NULL,
`message` varchar(300) NOT NULL,
`time` int(11) NOT NULL,
PRIMARY KEY (`message_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
//=====================================//
CREATE TABLE IF NOT EXISTS `a_index_page_blocks` (
`block_id` smallint(6) NOT NULL auto_increment,
`title` varchar(30) NOT NULL,
`position` smallint(6) NOT NULL,
PRIMARY KEY (`block_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=6 ;
//=====================================//
INSERT INTO `a_index_page_blocks` (`block_id`, `title`, `position`) VALUES
(1, 'Общение', 3),
(4, 'Бесплатные загрузки', 2),
(3, 'Новости', 1),
(5, 'Другое', 4);
//=====================================//
CREATE TABLE IF NOT EXISTS `a_index_page_widgets` (
`widget_id` int(11) NOT NULL auto_increment,
`block_id` int(11) NOT NULL,
`title` varchar(30) NOT NULL,
`module` varchar(20) NOT NULL,
`config` varchar(1000) NOT NULL,
`position` int(11) NOT NULL,
PRIMARY KEY (`widget_id`),
KEY `block_id` (`block_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=18 ;
//=====================================//
INSERT INTO `a_index_page_widgets` (`widget_id`, `block_id`, `title`, `module`, `config`, `position`) VALUES
(1, 1, 'Гостевая книга', 'guestbook', '', 3),
(17, 5, 'Пользователи', 'user', '', 2),
(6, 1, 'Чат', 'chat', '', 4),
(5, 3, 'Последняя новость', 'news', 'view_last_news = "1"', 1),
(7, 1, 'Форум', 'forum', '', 5),
(10, 4, 'Картинки', 'downloads', 'directory_id = "1"\r\ndirectory_name = "Картинки"', 1),
(11, 4, 'Мелодии', 'downloads', 'directory_id = "2"\r\ndirectory_name = "Мелодии"', 2),
(12, 4, 'Игры', 'downloads', 'directory_id = "3"\r\ndirectory_name = "Игры"', 3),
(13, 4, 'Анимация', 'downloads', 'directory_id = "4"\r\ndirectory_name = "Анимация"', 4),
(14, 4, 'Видео', 'downloads', 'directory_id = "5"\r\ndirectory_name = "Видео"', 5);
//=====================================//
CREATE TABLE IF NOT EXISTS `a_modules` (
`id` int(11) NOT NULL auto_increment,
`name` varchar(30) NOT NULL,
`title` varchar(30) NOT NULL,
`admin_link` varchar(30) NOT NULL,
`description` varchar(100) NOT NULL,
`installed` tinyint(1) NOT NULL,
`status` enum('on','off') NOT NULL default 'off',
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=22 ;
//=====================================//
INSERT INTO `a_modules` (`id`, `name`, `title`, `admin_link`, `description`, `installed`, `status`) VALUES
(5, 'downloads', 'Загрузки', 'downloads/admin', 'Модуль загрузок', 1, 'on'),
(6, 'chat', 'Чат', 'chat/admin', 'Модуль чата', 1, 'on'),
(7, 'forum', 'Форум', 'forum/admin', 'Модуль форума', 1, 'on'),
(8, 'smiles', 'Смайлы', 'smiles/admin', 'Модуль смайлов и управления ими', 1, 'on'),
(9, 'pages', 'Страницы', 'pages/admin', 'Модуль управления пользовательскими страницами', 1, 'on'),
(12, 'comments', 'Комментарии', '', 'Модуль комментариев', 1, 'on'),
(13, 'news', 'Новости', 'news/admin', 'Модуль новостей', 1, 'on'),
(14, 'guestbook', 'Гостевая книга', '', 'Модуль гостевый книги', 1, 'on'),
(18, 'ads_manager', 'Менеджер продажи рекламы', 'ads_manager/admin', '', 1, 'on'),
(20, 'private', 'Личные сообщения', '', 'Модуль личных сообщений', 1, 'on'),
(21, 'html', 'HTML/текстовые вставки', '', 'HTML/текстовые вставки в главную страницу', 1, 'on');
//=====================================//
CREATE TABLE IF NOT EXISTS `a_news` (
`news_id` int(11) NOT NULL auto_increment,
`subject` varchar(100) NOT NULL,
`text` text NOT NULL,
`time` int(11) NOT NULL,
PRIMARY KEY (`news_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=2 ;
//=====================================//
INSERT INTO `a_news` (`news_id`, `subject`, `text`, `time`) VALUES
(1, 'Тестовая новость', 'Тест', 1277469809);
//=====================================//
CREATE TABLE IF NOT EXISTS `a_pages` (
`page_id` int(11) NOT NULL auto_increment,
`user_id` int(11) NOT NULL,
`title` varchar(50) NOT NULL,
`content` text NOT NULL,
PRIMARY KEY (`page_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
//=====================================//
CREATE TABLE IF NOT EXISTS `a_private_messages` (
`message_id` int(11) NOT NULL auto_increment,
`user_id` int(11) NOT NULL,
`user_from_id` int(11) NOT NULL,
`user_to_id` int(11) NOT NULL,
`message` varchar(300) NOT NULL,
`folder` enum('new','inbox','outbox','saved') NOT NULL default 'new',
`time` int(11) NOT NULL,
PRIMARY KEY (`message_id`),
KEY `user_id` (`user_id`,`user_from_id`,`user_to_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
//=====================================//
CREATE TABLE IF NOT EXISTS `a_smiles` (
`smile_id` int(11) NOT NULL auto_increment,
`code` varchar(50) NOT NULL,
`image` varchar(50) NOT NULL,
`status` enum('enable','desable') NOT NULL default 'enable',
PRIMARY KEY (`smile_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=66 ;
//=====================================//
INSERT INTO `a_smiles` (`smile_id`, `code`, `image`, `status`) VALUES
(1, 'O:-)', 'aa.gif', 'enable'),
(2, 'O=)', 'aa.gif', 'enable'),
(3, ':-)', 'ab.gif', 'enable'),
(4, ':)', 'ab.gif', 'enable'),
(5, '=)', 'ab.gif', 'enable'),
(6, ':-(', 'ac.gif', 'enable'),
(7, ':(', 'ac.gif', 'enable'),
(8, ';(', 'ac.gif', 'enable'),
(9, ';-)', 'ad.gif', 'enable'),
(10, ';)', 'ad.gif', 'enable'),
(11, ':-P', 'ae.gif', 'enable'),
(12, '8-)', 'af.gif', 'enable'),
(13, ':-D', 'ag.gif', 'enable'),
(14, ':-[', 'ah.gif', 'enable'),
(15, '=-O', 'ai.gif', 'enable'),
(16, ':-*', 'aj.gif', 'enable'),
(17, ':-X', 'al.gif', 'enable'),
(18, ':-x', 'al.gif', 'enable'),
(19, '>:o', 'am.gif', 'enable'),
(20, ':-|', 'an.gif', 'enable'),
(21, ':-/', 'ao.gif', 'enable'),
(22, '*JOKINGLY*', 'ap.gif', 'enable'),
(23, ']:->', 'aq.gif', 'enable'),
(24, '[:-}', 'ar.gif', 'enable'),
(25, '*KISSED*', 'as.gif', 'enable'),
(26, ':-!', 'at.gif', 'enable'),
(27, '*TIRED*', 'au.gif', 'enable'),
(28, '*STOP*', 'av.gif', 'enable'),
(29, '*KISSING*', 'aw.gif', 'enable'),
(31, '*THUMBS UP*', 'ay.gif', 'enable'),
(32, '*DRINK*', 'az.gif', 'enable'),
(33, '*IN LOVE*', 'ba.gif', 'enable'),
(34, '@=', 'bb.gif', 'enable'),
(35, '*HELP*', 'bc.gif', 'enable'),
(37, '%)', 'be.gif', 'enable'),
(38, '*OK*', 'bf.gif', 'enable'),
(39, '*WASSUP*', 'bg.gif', 'enable'),
(40, '*SUP*', 'bg.gif', 'enable'),
(41, '*SORRY*', 'bh.gif', 'enable'),
(42, '*BRAVO*', 'bi.gif', 'enable'),
(43, '*ROFL*', 'bj.gif', 'enable'),
(44, '*LOL*', 'bj.gif', 'enable'),
(45, '*PARDON*', 'bk.gif', 'enable'),
(46, '*NO*', 'bl.gif', 'enable'),
(47, '*CRAZY*', 'bm.gif', 'enable'),
(48, '*DONT_KNOW*', 'bn.gif', 'enable'),
(49, '*UNKNOWN*', 'bn.gif', 'enable'),
(50, '*DANCE*', 'bo.gif', 'enable'),
(51, '*YAHOO*', 'bp.gif', 'enable'),
(52, '*YAHOO!*', 'bp.gif', 'enable'),
(53, '*NEW_PACK*', 'bq.gif', 'enable'),
(54, '*TEASE*', 'br.gif', 'enable'),
(55, '*SALIVA*', 'bs.gif', 'enable'),
(56, '*DASH*', 'bt.gif', 'enable'),
(57, '*WILD*', 'bu.gif', 'enable'),
(58, '*TRAINING*', 'bv.gif', 'enable'),
(59, '*FOCUS*', 'bw.gif', 'enable'),
(60, '*HANG*', 'bx.gif', 'enable'),
(61, '*DANCE*', 'by.gif', 'enable'),
(62, '*DANCE2*', 'bz.gif', 'enable'),
(63, '*MEGA_SHOK*', 'ca.gif', 'enable'),
(64, '*TO_PICK_ONES_NOSE*', 'cb.gif', 'enable'),
(65, '*YU*', 'cc.gif', 'enable');
//=====================================//
CREATE TABLE IF NOT EXISTS `a_users` (
`user_id` int(11) NOT NULL auto_increment,
`username` varchar(50) NOT NULL,
`password` varchar(32) NOT NULL,
`email` varchar(255) NOT NULL,
`reg_time` bigint(20) NOT NULL,
`last_visit` bigint(20) NOT NULL,
`pin_code` varchar(32) default NULL,
`pin_code_time` bigint(20) NOT NULL,
`balance` float NOT NULL,
`chat_room_id` tinyint(4) NOT NULL,
`chat_last_time` int(11) NOT NULL,
`chat_update` tinyint(4) NOT NULL,
`status` enum('guest','banned','user','moder','admin') NOT NULL default 'user',
PRIMARY KEY (`user_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=2 ;
//=====================================//
INSERT INTO `a_users` (`user_id`, `username`, `password`, `email`, `reg_time`, `last_visit`, `pin_code`, `pin_code_time`, `balance`, `chat_room_id`, `chat_last_time`, `chat_update`, `status`) VALUES
(-1, 'Guest', '', '', 1243421222, 0, '12462c1ac3bdf5f0673611834b405ec7', 1243430310, 10, 0, 0, 0, 'guest'),
(1, '{ADMIN_LOGIN}', '{ADMIN_PASSWORD}', '{ADMIN_EMAIL}', UNIX_TIMESTAMP(), UNIX_TIMESTAMP(), NULL, 0, 0, 1, 1280425058, 0, 'admin');
//=====================================//
CREATE TABLE IF NOT EXISTS `a_users_ban` (
`ban_id` bigint(20) NOT NULL auto_increment,
`user_id` int(11) NOT NULL,
`to_time` int(11) NOT NULL,
`description` varchar(1000) NOT NULL,
`status` enum('enable','disable') default 'enable',
PRIMARY KEY (`ban_id`),
KEY `user_id` (`user_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
//=====================================//
CREATE TABLE IF NOT EXISTS `a_users_profiles` (
`id` int(11) NOT NULL auto_increment,
`user_id` int(11) NOT NULL,
`real_name` varchar(20) NOT NULL,
`birthday_time` int(11) NOT NULL,
`about` varchar(500) NOT NULL,
`avatar` tinyint(1) NOT NULL,
PRIMARY KEY (`id`),
KEY `user_id` (`user_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=2 ;
//=====================================//
INSERT INTO `a_users_profiles` (`id`, `user_id`, `real_name`, `birthday_time`, `about`, `avatar`) VALUES
(1, 1, 'Админ', -10800, 'О себе', 1);