Файл: install/db_tables/user.sql
Строк: 278
CREATE TABLE IF NOT EXISTS `user` (
`id` int(11) NOT NULL
AUTO_INCREMENT,
`nick` varchar(32) NOT NULL,
`pass` varchar(32) NOT
NULL,
`pass_time` int(11) DEFAULT '0',
`sess` varchar(32) DEFAULT
NULL,
`activation` varchar(32) DEFAULT NULL,
`ban` int(11) NOT NULL
DEFAULT '0',
`ban_pr` varchar(64) DEFAULT NULL,
`ip` bigint(20) NOT
NULL DEFAULT '0',
`ip_cl` bigint(20) NOT NULL DEFAULT '0',
`ip_xff`
bigint(20) NOT NULL DEFAULT '0',
`ua` varchar(32) DEFAULT NULL,
`browser` varchar(3) DEFAULT 'wap',
`region` varchar(32) NOT NULL,
`add_konts` enum('0','1','2') NOT NULL default '1',
`date_reg` int(11)
NOT NULL DEFAULT '0',
`date_aut` int(11) NOT NULL DEFAULT '0',
`date_last` int(11) NOT NULL DEFAULT '0',
`sort` int(1) DEFAULT '0',
`forum_url` varchar(100) not null,
`diary_desc` text,
`diary_time`
int(11) DEFAULT NULL,
`diary_text` varchar(10024) DEFAULT NULL,
`ncolor` varchar(10) NOT NULL,
`ncolor2` varchar(10) NOT NULL,
`set_news` enum('1','2') DEFAULT '1',
`adm_set` enum('1','2') DEFAULT
'1',
`do_cmpl` enum('1','0') DEFAULT '1',
`do_cmpl_diary` enum('1','0')
DEFAULT '1',
`online` varchar(7) DEFAULT 'online',
`write_diary`
enum('1','0') DEFAULT '1',
`money` int(11) NOT NULL DEFAULT '0',
`activity` int(11) NOT NULL DEFAULT '0',
`rating` int(11) NOT NULL
DEFAULT '0',
`viewing` int(11) NOT NULL DEFAULT '0',
`wall_password`
mediumtext,
`wall_access` enum('all','only_me','friends','pass','auth')
DEFAULT 'all',
`wall_komm` enum('all','only_me','friends') DEFAULT
'all',
`wall_nokomm` enum('0','1') NOT NULL DEFAULT '1',
`profile_access` enum('all','only_me','friends','pass') DEFAULT 'all',
`profile_password` varchar(128) DEFAULT NULL,
`anketa_password`
varchar(128) DEFAULT NULL,
`anketa_access`
enum('all','only_me','friends','pass') DEFAULT 'all',
`friends_access`
enum('all','only_me','friends','pass') DEFAULT 'all',
`friends_password`
varchar(128) DEFAULT NULL,
`friendship` enum('0','1') NOT NULL DEFAULT
'0',
`level` enum('0','1','2','3','4') NOT NULL DEFAULT '0',
`group_access` int(10) unsigned NOT NULL DEFAULT '0',
`foot_sit`
enum('left','center','right') DEFAULT 'left',
`sex` enum('0','1') NOT
NULL DEFAULT '1',
`url` varchar(64) NOT NULL DEFAULT '/',
`show_foot`
enum('on','off') DEFAULT 'on',
`show_foot_type` enum('icons','text')
DEFAULT 'text',
`ank_iq` int(11) NOT NULL,
`ank_g_r` int(4) DEFAULT
NULL,
`ank_m_r` int(2) DEFAULT NULL,
`ank_d_r` int(2) DEFAULT NULL,
`ank_city` varchar(32) DEFAULT NULL,
`ank_about_me` varchar(512) DEFAULT
NULL,
`ank_icq` int(9) DEFAULT NULL,
`ank_mail` varchar(32) DEFAULT
NULL,
`ank_n_tel` varchar(12) DEFAULT NULL,
`ank_n_tel_home`
varchar(12) DEFAULT NULL,
`welcome` varchar(150) NOT NULL DEFAULT '',
`ank_name` varchar(32) default NULL,
`ank_surname` varchar(50) DEFAULT
NULL,
`ank_patronymic` varchar(50) DEFAULT NULL,
`ank_goal_dating`
enum('0','1') NOT NULL DEFAULT '0',
`ank_goal_dating2` enum('0','1') NOT
NULL DEFAULT '0',
`ank_goal_dating3` enum('0','1') NOT NULL DEFAULT '0',
`ank_goal_dating4` enum('0','1') NOT NULL DEFAULT '0',
`ank_goal_dating5` enum('0','1') NOT NULL DEFAULT '0',
`ank_goal_dating6`
enum('0','1') NOT NULL DEFAULT '0',
`ank_goal_dating7` enum('0','1') NOT
NULL DEFAULT '0',
`ank_goal_dating8` enum('0','1') NOT NULL DEFAULT '0',
`ank_political` enum('0','1','2','3','4','5','6','7','8','9') NOT NULL
DEFAULT '0',
`ank_world_view`
enum('0','1','2','3','4','5','6','7','8','9') NOT NULL DEFAULT '0',
`ank_important_life` enum('0','1','2','3','4','5','6','7','8') NOT NULL
DEFAULT '0',
`ank_important_people` enum('0','1','2','3','4','5','6') NOT
NULL DEFAULT '0',
`ank_smoking` enum('0','1','2','3','4','5') NOT NULL
DEFAULT '0',
`ank_alcohol` enum('0','1','2','3','4','5') NOT NULL DEFAULT
'0',
`ank_inspiration` varchar(512) NOT NULL,
`ank_marriage`
enum('0','1','2','3','4','5','6','7','8','9','10','11','12') NOT NULL
DEFAULT '0',
`ank_orientation` enum('0','1','2','3') NOT NULL DEFAULT
'0',
`ank_hair` varchar(512) NOT NULL,
`ank_eye` varchar(512) NOT
NULL,
`ank_height` varchar(512) NOT NULL,
`ank_weight` varchar(512) NOT
NULL,
`ank_physique` enum('0','1','2','3','4','5','6') NOT NULL DEFAULT
'0',
`ank_activities` varchar(32) NOT NULL,
`ank_music` varchar(512)
NOT NULL,
`ank_teleshow` varchar(512) NOT NULL,
`ank_games`
varchar(512) NOT NULL,
`ank_citates` varchar(512) NOT NULL,
`ank_films`
varchar(512) NOT NULL,
`ank_books` varchar(512) NOT NULL,
`ank_course`
varchar(512) NOT NULL,
`ank_passion` varchar(512) NOT NULL,
`ank_profession` varchar(512) NOT NULL,
`country` varchar(32) NOT NULL,
`time_on` int(11) NOT NULL,
`set_time_chat` int(11) DEFAULT '30',
`set_news_comments` enum('0','1') DEFAULT '1',
`set_online`
enum('0','1','2','3','4','5') DEFAULT '1',
`set_online_view`
enum('1','2','3','4','5') DEFAULT '1',
`set_mail` enum('1','2') DEFAULT
'1',
`set_p_str` int(11) DEFAULT '7',
`set_times` enum('1','0') NOT
NULL DEFAULT '1',
`set_files` enum('0','1') NOT NULL DEFAULT '0',
`set_timesdvig` int(11) NOT NULL DEFAULT '0',
`set_news_to_mail`
enum('0','1') NOT NULL DEFAULT '0',
`set_show_mail` enum('0','1') NOT
NULL DEFAULT '0',
`meteo_country` int(11) NOT NULL DEFAULT '0',
`autorization` enum('0','1') NOT NULL DEFAULT '0',
`time` int(11) NOT
NULL,
`perehodu` int(11) NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY
`nick` (`nick`),
KEY `url` (`url`)
) ENGINE=MYISAM DEFAULT
CHARSET=utf8;
CREATE TABLE `user_collision` (
`id_user` int(11) NOT
NULL,
`id_user2` int(11) NOT NULL,
`type` set('sess','ip_ua_time') NOT
NULL default 'sess',
KEY `id_user` (`id_user`,`id_user2`)
) ENGINE=MyISAM
DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `user_group` (
`id`
int(10) unsigned NOT NULL auto_increment,
`name` varchar(32) NOT NULL,
`level` int(10) unsigned NOT NULL default '0',
PRIMARY KEY (`id`)
)
ENGINE=MyISAM DEFAULT CHARSET=utf8 ;
INSERT INTO `user_group` (`id`,
`name`, `level`) VALUES
(1, 'Пользователь', 0),
(2,
'Модератор форума', 1),
(3, 'Модератор
загруз-центра', 1),
(4, 'Модератор блогов',
1),
(5, 'Модератор фотогалереи', 1),
(6,
'Супермодератор', 2),
(7, 'Администратор',
3),
(8, 'Главный администратор', 9),
(15,
'Создатель', 10);
CREATE TABLE IF NOT EXISTS `user_group_access`
(
`id_group` int(10) unsigned NOT NULL,
`id_access` varchar(32) NOT
NULL,
KEY `id_group` (`id_group`,`id_access`)
) ENGINE=MyISAM DEFAULT
CHARSET=utf8;
INSERT INTO `user_group_access` (`id_group`, `id_access`)
VALUES
(15, 'adm_accesses'),
(15, 'adm_banlist'),
(15, 'adm_ban_ip'),
(15,
'adm_changelog'),
(15, 'adm_chmod'),
(15, 'adm_conf_server'),
(15,
'adm_forum_sinc'),
(15, 'adm_info'),
(15, 'adm_ip_edit'),
(15,
'adm_log_delete'),
(15, 'adm_log_read'),
(15, 'adm_menu'),
(15,
'adm_mysql'),
(15, 'adm_news'),
(15, 'adm_news_add'),
(15,
'adm_news_delete'),
(15, 'adm_news_delete_comments'),
(15,
'adm_news_edit'),
(15, 'adm_panel_show'),
(15, 'adm_profile'),
(15,
'adm_ref'),
(15, 'adm_rekl'),
(15, 'adm_send_mess'),
(15,
'adm_send_money'),
(15, 'adm_send_not'),
(15, 'adm_set_bb'),
(15,
'adm_set_bb_admin'),
(15, 'adm_set_bb_moder'),
(15,
'adm_set_bb_super_moder'),
(15, 'adm_set_foto'),
(15,
'adm_set_loads'),
(15, 'adm_set_sys'),
(15, 'adm_set_user'),
(15,
'adm_show_adm'),
(15, 'adm_statistic'),
(15, 'adm_themes'),
(15,
'adm_umenu'),
(15, 'forum_for_create'),
(15, 'forum_for_delete'),
(15,
'forum_for_edit'),
(15, 'forum_post_close'),
(15, 'forum_post_ed'),
(15,
'forum_razd_create'),
(15, 'forum_razd_edit'),
(15, 'forum_them_del'),
(15,
'forum_them_edit'),
(15, 'foto_alb_del'),
(15, 'foto_foto_edit'),
(15,
'guest_show_ip'),
(15, 'obmen_dir_create'),
(15, 'obmen_dir_delete'),
(15,
'obmen_dir_edit'),
(15, 'obmen_file_delete'),
(15, 'obmen_komm_del'),
(15,
'user_ban_set'),
(15, 'user_ban_set_h'),
(15, 'user_ban_unset'),
(15,
'user_change_group'),
(15, 'user_change_nick'),
(15,
'user_collisions'),
(15, 'user_delete'),
(15, 'user_mass_delete'),
(15,
'user_prof_edit'),
(15, 'user_show_add_info'),
(15, 'user_show_ip'),
(15,
'user_show_ua');
CREATE TABLE IF NOT EXISTS `user_ref` (
`id` int(10)
unsigned NOT NULL auto_increment,
`time` int(10) unsigned NOT NULL,
`id_user` int(10) unsigned NOT NULL,
`url` varchar(1024) default NULL,
`type_input` varchar(12) default 'cookie',
PRIMARY KEY (id),
KEY `time`
(`time`,id_user),
KEY `type_input` (type_input)
) ENGINE=MyISAM DEFAULT
CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `user_log` (
`id` int(11) NOT
NULL auto_increment,
`id_user` int(11) NOT NULL ,
`method` set('1','0')
NOT NULL default '0',
`time` int(11) NOT NULL ,
`ip` bigint(20) NOT
NULL default '0',
`ua` varchar(32) default NULL,
PRIMARY KEY (`id`),
KEY `id_user` (`id_user`),
KEY `time` (`time`)
) ENGINE=MyISAM DEFAULT
CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `user_voice2` (
`id_user`
int(11) NOT NULL,
`id_kont` int(11) NOT NULL,
`rating` int(11) NOT NULL
default '0',
KEY `id_user` (`id_user`,`id_kont`),
KEY `rating`
(`rating`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT
EXISTS `user_blacklist` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`id_user` int(11) NOT NULL,
`id_ank` int(11) NOT NULL,
`time` int(11)
NOT NULL,
`time_to` int(11) NOT NULL,
`msg` varchar(1024) NOT NULL,
`forever` set('0','1') NOT NULL DEFAULT '0',
PRIMARY KEY (`id`)
)
ENGINE=MyISAM DEFAULT CHARSET=utf8;