--
-- Table structure for table `#__fb_announcement`
--

CREATE TABLE  IF NOT EXISTS `#__fb_announcement` (
  `id` int(3) NOT NULL auto_increment,
  `title` tinytext,
  `sdescription` text NOT NULL,
  `description` text NOT NULL,
  `created` datetime NOT NULL default '0000-00-00 00:00:00',
  `published` tinyint(1) NOT NULL default '0',
  `ordering` tinyint(4) NOT NULL default '0',
  `showdate` tinyint(1) NOT NULL default '1',
  PRIMARY KEY  (`id`)
);

-- --------------------------------------------------------

--
-- Table structure for table `#__fb_attachments`
--

CREATE TABLE IF NOT EXISTS `#__fb_attachments` (
  `mesid` int(11) NOT NULL default '0',
  `filelocation` text NOT NULL,
  KEY `mesid` (`mesid`)
);

-- --------------------------------------------------------

--
-- Table structure for table `#__fb_categories`
--

CREATE TABLE IF NOT EXISTS `#__fb_categories` (
  `id` int(11) NOT NULL auto_increment,
  `parent` int(11) default '0',
  `name` tinytext,
  `cat_emoticon` tinyint(4) NOT NULL default '0',
  `locked` tinyint(4) NOT NULL default '0',
  `alert_admin` tinyint(4) NOT NULL default '0',
  `moderated` tinyint(4) NOT NULL default '0',
  `moderators` varchar(15) default NULL,
  `pub_access` tinyint(4) default '1',
  `pub_recurse` tinyint(4) default '1',
  `admin_access` tinyint(4) default '0',
  `admin_recurse` tinyint(4) default '1',
  `ordering` tinyint(4) NOT NULL default '0',
  `future2` int(11) default '0',
  `published` tinyint(4) NOT NULL default '0',
  `checked_out` tinyint(4) NOT NULL default '0',
  `checked_out_time` datetime NOT NULL default '0000-00-00 00:00:00',
  `review` tinyint(4) NOT NULL default '0',
  `hits` int(11) NOT NULL default '0',
  `description` text NOT NULL,
  `headerdesc` text NOT NULL,
  `class_sfx` varchar(20) NOT NULL,
  `id_last_msg` int(10) NOT NULL default '0',
  `numTopics` mediumint(8) NOT NULL default '0',
  `numPosts` mediumint(8) NOT NULL default '0',
  `time_last_msg` int(11) default NULL,
  PRIMARY KEY  (`id`),
  KEY `parent` (`parent`),
  KEY `published_pubaccess_id` (`published`,`pub_access`,`id`),
  KEY `msg_id` (`id_last_msg`)
);

-- --------------------------------------------------------

--
-- Table structure for table `#__fb_favorites`
--

CREATE TABLE IF NOT EXISTS `#__fb_favorites` (
  `thread` int(11) NOT NULL default '0',
  `userid` int(11) NOT NULL default '0',
  KEY `thread` (`thread`),
  KEY `userid` (`userid`)
);

-- --------------------------------------------------------

--
-- Table structure for table `#__fb_groups`
--

CREATE TABLE IF NOT EXISTS `#__fb_groups` (
  `id` int(4) NOT NULL auto_increment,
  `title` varchar(255) default NULL,
  PRIMARY KEY  (`id`)
);

-- --------------------------------------------------------

--
-- Table structure for table `#__fb_messages`
--

CREATE TABLE IF NOT EXISTS `#__fb_messages` (
  `id` int(11) NOT NULL auto_increment,
  `parent` int(11) default '0',
  `thread` int(11) default '0',
  `catid` int(11) NOT NULL default '0',
  `name` tinytext,
  `userid` int(11) NOT NULL default '0',
  `email` tinytext,
  `subject` tinytext,
  `time` int(11) NOT NULL default '0',
  `ip` varchar(15) default NULL,
  `topic_emoticon` int(11) NOT NULL default '0',
  `locked` tinyint(4) NOT NULL default '0',
  `hold` tinyint(4) NOT NULL default '0',
  `ordering` int(11) default '0',
  `hits` int(11) default '0',
  `moved` tinyint(4) default '0',
  `modified_by` int(7) default NULL,
  `modified_time` int(11) default NULL,
  `modified_reason` tinytext,
  PRIMARY KEY  (`id`),
  KEY `thread` (`thread`),
  KEY `parent` (`parent`),
  KEY `catid` (`catid`),
  KEY `ip` (`ip`),
  KEY `userid` (`userid`),
  KEY `time` (`time`),
  KEY `locked` (`locked`),
  KEY `hold_time` (`hold`,`time`)
);

-- --------------------------------------------------------

--
-- Table structure for table `#__fb_messages_text`
--

CREATE TABLE IF NOT EXISTS `#__fb_messages_text` (
  `mesid` int(11) NOT NULL default '0',
  `message` text NOT NULL,
  PRIMARY KEY  (`mesid`)
);

-- --------------------------------------------------------

--
-- Table structure for table `#__fb_moderation`
--

CREATE TABLE  IF NOT EXISTS `#__fb_moderation` (
  `catid` int(11) NOT NULL default '0',
  `userid` int(11) NOT NULL default '0',
  `future1` tinyint(4) default '0',
  `future2` int(11) default '0',
  PRIMARY KEY  (`catid`,`userid`)
);

CREATE TABLE `#__fb_ranks` (
  `rank_id` mediumint(8) unsigned NOT NULL auto_increment,
  `rank_title` varchar(255) NOT NULL default '',
  `rank_min` mediumint(8) unsigned NOT NULL default '0',
  `rank_special` tinyint(1) unsigned NOT NULL default '0',
  `rank_image` varchar(255) NOT NULL default '',
  PRIMARY KEY  (`rank_id`)
);

-- --------------------------------------------------------

--
-- Table structure for table `#__fb_sessions`
--

CREATE TABLE  IF NOT EXISTS `#__fb_sessions` (
  `userid` int(11) NOT NULL default '0',
  `allowed` text,
  `lasttime` int(11) NOT NULL default '0',
  `readtopics` text,
  PRIMARY KEY  (`userid`)
);

-- --------------------------------------------------------

--
-- Table structure for table `#__fb_smileys`
--

CREATE TABLE  IF NOT EXISTS `#__fb_smileys` (
  `id` int(4) NOT NULL auto_increment,
  `code` varchar(12) NOT NULL default '',
  `location` varchar(50) NOT NULL default '',
  `greylocation` varchar(60) NOT NULL default '',
  `emoticonbar` tinyint(4) NOT NULL default '0',
  PRIMARY KEY  (`id`)
);

-- --------------------------------------------------------

--
-- Table structure for table `#__fb_subscriptions`
--

CREATE TABLE  IF NOT EXISTS `#__fb_subscriptions` (
  `thread` int(11) NOT NULL default '0',
  `userid` int(11) NOT NULL default '0',
  `future1` int(11) default '0',
  KEY `thread` (`thread`),
  KEY `userid` (`userid`)
);

-- --------------------------------------------------------

--
-- Table structure for table `#__fb_users`
--

CREATE TABLE  IF NOT EXISTS `#__fb_users` (
  `userid` int(11) NOT NULL default '0',
  `view` varchar(8) NOT NULL default 'flat',
  `signature` text,
  `moderator` int(11) default '0',
  `ordering` int(11) default '0',
  `posts` int(11) default '0',
  `avatar` varchar(50) default NULL,
  `karma` int(11) default '0',
  `karma_time` int(11) default '0',
  `group_id` int(4) default '1',
  `uhits` int(11) default '0',
  `personalText` tinytext,
  `gender` tinyint(4) NOT NULL default '0',
  `birthdate` date NOT NULL default '0001-01-01',
  `location` varchar(50) default NULL,
  `ICQ` varchar(50) default NULL,
  `AIM` varchar(50) default NULL,
  `YIM` varchar(50) default NULL,
  `MSN` varchar(50) default NULL,
  `SKYPE` varchar(50) default NULL,
  `GTALK` varchar(50) default NULL,
  `websitename` varchar(50) default NULL,
  `websiteurl` varchar(50) default NULL,
  `rank` tinyint(4) NOT NULL default '0',
  `hideEmail` tinyint(1) NOT NULL default '1',
  `showOnline` tinyint(1) NOT NULL default '1',
  PRIMARY KEY  (`userid`),
  KEY `group_id` (`group_id`)
);

-- --------------------------------------------------------

--
-- Table structure for table `#__fb_whoisonline`
--

CREATE TABLE  IF NOT EXISTS `#__fb_whoisonline` (
  `id` int(6) NOT NULL auto_increment,
  `userid` int(7) NOT NULL default '0',
  `time` varchar(14) NOT NULL default '0',
  `item` int(6) default '0',
  `what` varchar(255) default '0',
  `func` varchar(50) default NULL,
  `do` varchar(50) default NULL,
  `task` varchar(50) default NULL,
  `link` text,
  `userip` varchar(20) NOT NULL default '',
  `user` tinyint(2) NOT NULL default '0',
  PRIMARY KEY  (`id`),
  KEY `userid` (`userid`)
);

-- ----------------------------
-- Records
-- ----------------------------
INSERT INTO `#__groups` VALUES ('1', 'Registered User');

INSERT INTO `#__smileys` VALUES ('1', 'B)', 'cool.png', 'cool-grey.png', '1');
INSERT INTO `#__smileys` VALUES ('2', ':(', 'sad.png', 'sad-grey.png', '1');
INSERT INTO `#__smileys` VALUES ('3', ':)', 'smile.png', 'smile-grey.png', '1');
INSERT INTO `#__smileys` VALUES ('4', ':-)', 'smile.png', 'smile-grey.png', '0');
INSERT INTO `#__smileys` VALUES ('5', ':-(', 'sad.png', 'sad-grey.png', '0');
INSERT INTO `#__smileys` VALUES ('6', ':laugh:', 'laughing.png', 'laughing-grey.png', '1');
INSERT INTO `#__smileys` VALUES ('7', ':cheer:', 'cheerful.png', 'cheerful-grey.png', '1');
INSERT INTO `#__smileys` VALUES ('8', ';)', 'wink.png', 'wink-grey.png', '1');
INSERT INTO `#__smileys` VALUES ('9', ';-)', 'wink.png', 'wink-grey.png', '0');
INSERT INTO `#__smileys` VALUES ('10', ':P', 'tongue.png', 'tongue-grey.png', '1');
INSERT INTO `#__smileys` VALUES ('12', ':X', 'sick.png', 'sick-grey.png', '0');
INSERT INTO `#__smileys` VALUES ('13', ':x', 'sick.png', 'sick-grey.png', '0');
INSERT INTO `#__smileys` VALUES ('14', ':angry:', 'angry.png', 'angry-grey.png', '1');
INSERT INTO `#__smileys` VALUES ('15', ':mad:', 'angry.png', 'angry-grey.png', '0');
INSERT INTO `#__smileys` VALUES ('16', ':unsure:', 'unsure.png', 'unsure-grey.png', '1');
INSERT INTO `#__smileys` VALUES ('17', ':ohmy:', 'shocked.png', 'shocked-grey.png', '1');
INSERT INTO `#__smileys` VALUES ('18', ':huh:', 'wassat.png', 'wassat-grey.png', '1');
INSERT INTO `#__smileys` VALUES ('19', ':dry:', 'ermm.png', 'ermm-grey.png', '1');
INSERT INTO `#__smileys` VALUES ('20', ':ermm:', 'ermm.png', 'ermm-grey.png', '0');
INSERT INTO `#__smileys` VALUES ('21', ':lol:', 'grin.png', 'grin-grey.png', '1');
INSERT INTO `#__smileys` VALUES ('22', ':sick:', 'sick.png', 'sick-grey.png', '1');
INSERT INTO `#__smileys` VALUES ('23', ':silly:', 'silly.png', 'silly-grey.png', '1');
INSERT INTO `#__smileys` VALUES ('24', ':y32b4:', 'silly.png', 'silly-grey.png', '0');
INSERT INTO `#__smileys` VALUES ('25', ':blink:', 'blink.png', 'blink-grey.png', '1');
INSERT INTO `#__smileys` VALUES ('26', ':blush:', 'blush.png', 'blush-grey.png', '1');
INSERT INTO `#__smileys` VALUES ('27', ':kiss:', 'kissing.png', 'kissing-grey.png', '1');
INSERT INTO `#__smileys` VALUES ('28', ':rolleyes:', 'blink.png', 'blink-grey.png', '0');
INSERT INTO `#__smileys` VALUES ('29', ':woohoo:', 'w00t.png', 'w00t-grey.png', '1');
INSERT INTO `#__smileys` VALUES ('30', ':side:', 'sideways.png', 'sideways-grey.png', '1');
INSERT INTO `#__smileys` VALUES ('31', ':S', 'dizzy.png', 'dizzy-grey.png', '1');
INSERT INTO `#__smileys` VALUES ('32', ':s', 'dizzy.png', 'dizzy-grey.png', '0');
INSERT INTO `#__smileys` VALUES ('33', ':evil:', 'devil.png', 'devil-grey.png', '1');
INSERT INTO `#__smileys` VALUES ('34', ':whistle:', 'whistling.png', 'whistling-grey.png', '1');
INSERT INTO `#__smileys` VALUES ('35', ':pinch:', 'pinch.png', 'pinch-grey.png', '1');
INSERT INTO `#__smileys` VALUES ('36', ':p', 'tongue.png', 'tongue-grey.png', '0');
INSERT INTO `#__smileys` VALUES ('37', ':D', 'laughing.png', 'laughing-grey.png', '0');

INSERT INTO `#__fb_ranks` (`rank_id`, `rank_title`, `rank_min`, `rank_special`, `rank_image`) VALUES
(1, 0x467265736820426f6172646572, 0, 0, 0x72616e6b312e676966),
(2, 0x4a756e696f7220426f6172646572, 20, 0, 0x72616e6b322e676966),
(3, 0x53656e696f7220426f6172646572, 40, 0, 0x72616e6b332e676966),
(4, 0x45787065727420426f6172646572, 80, 0, 0x72616e6b342e676966),
(5, 0x476f6c6420426f6172646572, 160, 0, 0x72616e6b352e676966),
(6, 0x506c6174696e756d20426f6172646572, 320, 0, 0x72616e6b362e676966),
(7, 0x41646d696e6973747261746f72, 0, 1, 0x72616e6b61646d696e2e676966),
(8, 0x4d6f64657261746f72, 0, 1, 0x72616e6b6d6f642e676966),
(9, 0x5370616d6d6572, 0, 1, 0x72616e6b7370616d6d65722e676966);
