CREATE TABLE IF NOT EXISTS `${MAIN_DBPREFIX}_users` (
  `u_id` int(11) NOT NULL AUTO_INCREMENT,
  `u_login` varchar(64) DEFAULT NULL,
  `u_pass` varchar(32) NOT NULL,
  `u_name` varchar(100) NOT NULL,
  `u_points` smallint(6) DEFAULT '0',
  `u_last_name` varchar(150) DEFAULT NULL,
  `u_time_reg` int(11) NOT NULL,
  `u_active` enum('0','1','2','3') NOT NULL DEFAULT '0',
  `u_act_code` varchar(5) NOT NULL,
  `u_avatar` varchar(50) NOT NULL,
  `u_dob` varchar(10) DEFAULT NULL,
  `u_type` enum('1','2') DEFAULT '1',
  `u_cache` text NOT NULL,
  `u_email` varchar(150) NOT NULL,
  `u_count_posts` smallint(4) NOT NULL DEFAULT '0',
  `u_rank` tinyint(2) NOT NULL,
  `u_blog_name` varchar(150) NOT NULL,
  `u_blog_desc` text NOT NULL,
  `u_count_blog_posts` smallint(6) NOT NULL,
  `u_interests` text NOT NULL,
  `g_id` int(1) NOT NULL,
  `u_count_comments` smallint(6) NOT NULL DEFAULT '0',
  `u_spam` enum('0','1') NOT NULL DEFAULT '0',
  `u_ban` enum('0','1') NOT NULL DEFAULT '0',
  `u_icq` varchar(20) NOT NULL,
  `u_skype` varchar(100) NOT NULL,
  `u_phone` varchar(150) NOT NULL,
  PRIMARY KEY (`u_id`),
  UNIQUE KEY `u_email` (`u_email`),
  UNIQUE KEY `u_login` (`u_login`)
) ENGINE=MyISAM  DEFAULT CHARSET=${MAIN_ENCODING} AUTO_INCREMENT=1 ;




CREATE TABLE IF NOT EXISTS `${MAIN_DBPREFIX}_users_ban` (
  `u_id` int(11) NOT NULL,
  `b_time_add` int(11) NOT NULL,
  `b_time_end` int(11) NOT NULL,
  `b_reason` varchar(255) NOT NULL,
  KEY `u_id` (`u_id`)
) ENGINE=MyISAM DEFAULT CHARSET=${MAIN_ENCODING};




