DROP TABLE IF EXISTS phpcolor_barmaudit;
CREATE TABLE `phpcolor_barmaudit` (
  `id` mediumint(8) NOT NULL AUTO_INCREMENT,
  `bid`  mediumint(8) NOT NULL,
  `domain` varchar(20) DEFAULT NULL,
  `keyword` varchar(255) DEFAULT NULL,
  `description` varchar(255) DEFAULT NULL,
  `introduction` text,
  `picture` varchar(255) DEFAULT NULL,
  `usernc` varchar(255) DEFAULT NULL,
  `baruserp` mediumint(1) NOT NULL DEFAULT '0',
  `apply` mediumint(1) NOT NULL DEFAULT '0',
  `visitor` mediumint(1) NOT NULL DEFAULT '9',
  `verify` mediumint(1) NOT NULL DEFAULT '9',
  `way` text,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS phpcolor_ad;
CREATE TABLE `phpcolor_ad` (
  `id` mediumint(8) NOT NULL AUTO_INCREMENT,
  `name` varchar(30) NOT NULL,
  `site` mediumint(1) NOT NULL,
  `type` mediumint(1) NOT NULL,
  `theme` varchar(100) DEFAULT NULL,
  `picture` varchar(255) DEFAULT NULL,
  `link` varchar(255) DEFAULT NULL,
  `code` text,
  PRIMARY KEY (`id`),
  KEY `type` (`type`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS phpcolor_admin;
CREATE TABLE `phpcolor_admin` (
  `id` mediumint(8) NOT NULL AUTO_INCREMENT,
  `uid` mediumint(8) NOT NULL,
  `purview` text,
  PRIMARY KEY (`id`),
  KEY `uid` (`uid`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS phpcolor_apply_master;
CREATE TABLE `phpcolor_apply_master` (
  `id` mediumint(8) NOT NULL AUTO_INCREMENT,
  `username` varchar(30) NOT NULL,
  `barname` varchar(30) NOT NULL,
  `why` text NOT NULL,
  `time` timestamp NULL DEFAULT '0000-00-00 00:00:00',
  `email` varchar(50) NOT NULL,
  `type` mediumint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `type` (`type`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS phpcolor_apply_sort;
CREATE TABLE `phpcolor_apply_sort` (
  `id` mediumint(8) NOT NULL AUTO_INCREMENT,
  `username` varchar(30) NOT NULL,
  `barname` varchar(30) NOT NULL,
  `why` text,
  `sort` mediumint(8) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS phpcolor_apply_user;
CREATE TABLE `phpcolor_apply_user` (
  `id` mediumint(8) NOT NULL AUTO_INCREMENT,
  `username` varchar(30) NOT NULL,
  `object` varchar(30) NOT NULL,
  `why` varchar(255) NOT NULL,
  `type` mediumint(1) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS phpcolor_bar;
CREATE TABLE `phpcolor_bar` (
  `id` mediumint(8) NOT NULL AUTO_INCREMENT,
  `barname` varchar(30) NOT NULL,
  `domain` varchar(20) DEFAULT NULL,
  `keyword` varchar(255) DEFAULT NULL,
  `description` varchar(255) DEFAULT NULL,
  `introduction` text,
  `picture` varchar(255) DEFAULT NULL,
  `barmaster` varchar(255) DEFAULT NULL,
  `sbarmaster` varchar(255) DEFAULT NULL,
  `friendbar` varchar(255) DEFAULT NULL,
  `barclass` mediumint(8) NOT NULL DEFAULT '0',
  `usernc` varchar(255) DEFAULT NULL,
  `baruserp` mediumint(1) NOT NULL DEFAULT '0',
  `apply` mediumint(1) NOT NULL DEFAULT '0',
  `style` varchar(30) NOT NULL DEFAULT '9',
  `visitor` mediumint(1) NOT NULL DEFAULT '9',
  `verify` mediumint(1) NOT NULL DEFAULT '9',
  `state` mediumint(1) NOT NULL DEFAULT '1',
  `recommend` mediumint(1) NOT NULL DEFAULT '0',
  `merge` varchar(30) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `barclass` (`barclass`),
  KEY `recommend` (`recommend`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS phpcolor_bar_user;
CREATE TABLE `phpcolor_bar_user` (
  `id` mediumint(8) NOT NULL AUTO_INCREMENT,
  `uid` mediumint(8) NOT NULL,
  `bid` mediumint(8) NOT NULL,
  `integral` mediumint(8) NOT NULL,
  `accesstime` timestamp NULL DEFAULT '0000-00-00 00:00:00',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS phpcolor_block;
CREATE TABLE `phpcolor_block` (
  `id` mediumint(8) NOT NULL AUTO_INCREMENT,
  `username` varchar(30) NOT NULL,
  `barid` mediumint(8) NOT NULL DEFAULT '0',
  `blocktime` timestamp NULL DEFAULT '0000-00-00 00:00:00',
  `removetime` timestamp NULL DEFAULT '0000-00-00 00:00:00',
  `operate` varchar(30) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `barname` (`barid`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS phpcolor_class;
CREATE TABLE `phpcolor_class` (
  `id` mediumint(8) NOT NULL AUTO_INCREMENT,
  `classname` varchar(30) NOT NULL,
  `belong` mediumint(8) NOT NULL DEFAULT '0',
  `keyword` varchar(255) DEFAULT NULL,
  `description` varchar(255) DEFAULT NULL,
  `introduction` text,
  `queue` mediumint(8) NOT NULL DEFAULT '0',
  `base` mediumint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `belong` (`belong`),
  KEY `queue` (`queue`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS phpcolor_filter;
CREATE TABLE `phpcolor_filter` (
  `id` mediumint(8) NOT NULL AUTO_INCREMENT,
  `content` varchar(30) NOT NULL,
  `type` mediumint(1) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS phpcolor_flash;
CREATE TABLE `phpcolor_flash` (
  `id` mediumint(8) NOT NULL AUTO_INCREMENT,
  `flashname` varchar(30) NOT NULL,
  `belong` mediumint(1) NOT NULL DEFAULT '1',
  `flashurl` varchar(255) NOT NULL,
  `flashimg` varchar(255) NOT NULL,
  `introduction` text NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS phpcolor_indexpic;
CREATE TABLE `phpcolor_indexpic` (
  `id` mediumint(8) NOT NULL AUTO_INCREMENT,
  `theme` varchar(100) NOT NULL,
  `picture` varchar(255) NOT NULL,
  `link` varchar(255) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS phpcolor_link;
CREATE TABLE `phpcolor_link` (
  `id` mediumint(8) NOT NULL AUTO_INCREMENT,
  `name` varchar(30) NOT NULL,
  `link` varchar(255) NOT NULL,
  `picture` varchar(255) DEFAULT NULL,
  `type` mediumint(1) NOT NULL,
  `queue` mediumint(8) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS phpcolor_log;
CREATE TABLE `phpcolor_log` (
  `id` mediumint(8) NOT NULL AUTO_INCREMENT,
  `operate` text NOT NULL,
  `username` varchar(30) NOT NULL,
  `operatetime` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
  `ip` varchar(15) NOT NULL,
  `type` mediumint(1) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS phpcolor_message;
CREATE TABLE `phpcolor_message` (
  `id` mediumint(8) NOT NULL AUTO_INCREMENT,
  `theme` varchar(100) NOT NULL,
  `content` text NOT NULL,
  `addresser` varchar(30) NOT NULL,
  `addressee` varchar(30) NOT NULL,
  `sent` timestamp NULL DEFAULT '0000-00-00 00:00:00',
  `isread` mediumint(1) NOT NULL DEFAULT '0',
  `type` mediumint(1) NOT NULL DEFAULT '1',
  PRIMARY KEY (`id`),
  KEY `addressee` (`addressee`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS phpcolor_postclass;
CREATE TABLE `phpcolor_postclass` (
  `id` mediumint(8) NOT NULL AUTO_INCREMENT,
  `name` varchar(30) NOT NULL,
  `belong` mediumint(8) NOT NULL,
  `queue` mediumint(8) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `queue` (`queue`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS phpcolor_qiandao;
CREATE TABLE `phpcolor_qiandao` (
  `id` mediumint(8) NOT NULL AUTO_INCREMENT,
  `biaoqing` mediumint(2) NOT NULL,
  `content` text NOT NULL,
  `published` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
  `belong` mediumint(8) NOT NULL,
  `type` mediumint(1) NOT NULL DEFAULT '1',
  PRIMARY KEY (`id`),
  KEY `belong` (`belong`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS phpcolor_recover;
CREATE TABLE `phpcolor_recover` (
  `id` mediumint(8) NOT NULL AUTO_INCREMENT,
  `tid` mediumint(8) NOT NULL,
  `operate` varchar(30) NOT NULL,
  `operatetime` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
  `ip` varchar(15) NOT NULL,
  `type` mediumint(1) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS phpcolor_repost;
CREATE TABLE `phpcolor_repost` (
  `id` mediumint(8) NOT NULL AUTO_INCREMENT,
  `content` text NOT NULL,
  `file` varchar(255) DEFAULT NULL,
  `author` varchar(30) NOT NULL,
  `ip` varchar(15) NOT NULL,
  `published` timestamp NULL DEFAULT '0000-00-00 00:00:00',
  `belong` mediumint(8) NOT NULL,
  `floor` mediumint(8) NOT NULL,
  `state` mediumint(1) NOT NULL DEFAULT '1',
  `ismobile` mediumint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `belong` (`belong`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS phpcolor_topic;
CREATE TABLE `phpcolor_topic` (
  `id` mediumint(8) NOT NULL AUTO_INCREMENT,
  `theme` varchar(100) NOT NULL,
  `content` text NOT NULL,
  `file` varchar(255) DEFAULT NULL,
  `author` varchar(30) NOT NULL,
  `ip` varchar(15) NOT NULL,
  `published` timestamp NULL DEFAULT '0000-00-00 00:00:00',
  `reauthor` varchar(30) DEFAULT NULL,
  `republished` timestamp NULL DEFAULT '0000-00-00 00:00:00',
  `belong` mediumint(8) NOT NULL,
  `postclass` mediumint(8) NOT NULL DEFAULT '0',
  `click` mediumint(8) NOT NULL DEFAULT '0',
  `reply` mediumint(8) NOT NULL DEFAULT '0',
  `top` mediumint(1) NOT NULL DEFAULT '0',
  `boutique` mediumint(1) NOT NULL DEFAULT '0',
  `locks` mediumint(1) NOT NULL DEFAULT '0',
  `vote` mediumint(1) NOT NULL DEFAULT '0',
  `recommend` mediumint(1) NOT NULL DEFAULT '0',
  `state` mediumint(1) NOT NULL DEFAULT '1',
  `ismobile` mediumint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `theme` (`theme`),
  KEY `republished` (`republished`),
  KEY `belong` (`belong`),
  KEY `top` (`top`),
  KEY `boutique` (`boutique`),
  KEY `recommend` (`recommend`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS phpcolor_upload;
CREATE TABLE `phpcolor_upload` (
  `id` mediumint(8) NOT NULL AUTO_INCREMENT,
  `oldfilename` varchar(255) NOT NULL,
  `filename` varchar(30) NOT NULL,
  `filesize` varchar(30) NOT NULL,
  `filetype` mediumint(1) NOT NULL,
  `username` varchar(30) NOT NULL,
  `uptime` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
  `type` mediumint(1) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS phpcolor_user;
CREATE TABLE `phpcolor_user` (
  `id` mediumint(8) NOT NULL AUTO_INCREMENT,
  `username` varchar(30) NOT NULL,
  `passwd` varchar(32) NOT NULL,
  `email` varchar(50) DEFAULT NULL,
  `safemail` varchar(50) DEFAULT NULL,
  `question` varchar(50) DEFAULT NULL,
  `answer` varchar(50) DEFAULT NULL,
  `picture` varchar(255) DEFAULT NULL,
  `userfrom` varchar(50) DEFAULT NULL,
  `sex` varchar(50) DEFAULT NULL,
  `age` varchar(50) DEFAULT NULL,
  `birthday` varchar(50) DEFAULT NULL,
  `zodiac` varchar(50) DEFAULT NULL,
  `constellation` varchar(50) DEFAULT NULL,
  `blood` varchar(50) DEFAULT NULL,
  `school` varchar(50) DEFAULT NULL,
  `profession` varchar(50) DEFAULT NULL,
  `qq` varchar(50) DEFAULT NULL,
  `mobile` varchar(50) DEFAULT NULL,
  `phone` varchar(50) DEFAULT NULL,
  `signature` text,
  `introduction` text,
  `topic` mediumint(8) NOT NULL DEFAULT '0',
  `reply` mediumint(8) NOT NULL DEFAULT '0',
  `integral` mediumint(8) NOT NULL DEFAULT '0',
  `money` mediumint(8) NOT NULL DEFAULT '0',
  `registered` timestamp NULL DEFAULT '0000-00-00 00:00:00',
  `logintime` timestamp NULL DEFAULT '0000-00-00 00:00:00',
  `loginip` varchar(15) NOT NULL,
  `istyle` mediumint(2) NOT NULL DEFAULT '0',
  `userfriendp` mediumint(1) NOT NULL DEFAULT '0',
  `rank` mediumint(1) NOT NULL DEFAULT '0',
  `usergroup` mediumint(1) NOT NULL DEFAULT '1',
  `state` mediumint(1) NOT NULL DEFAULT '1',
  PRIMARY KEY (`username`),
  KEY `id` (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS phpcolor_user_barfavorite;
CREATE TABLE `phpcolor_user_barfavorite` (
  `id` mediumint(8) NOT NULL AUTO_INCREMENT,
  `bid` mediumint(8) NOT NULL,
  `uid` mediumint(8) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS phpcolor_user_friends;
CREATE TABLE `phpcolor_user_friends` (
  `id` mediumint(8) NOT NULL AUTO_INCREMENT,
  `uid` mediumint(8) NOT NULL,
  `did` mediumint(8) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS phpcolor_user_postfavorite;
CREATE TABLE `phpcolor_user_postfavorite` (
  `id` mediumint(8) NOT NULL AUTO_INCREMENT,
  `pid` mediumint(8) NOT NULL,
  `uid` mediumint(8) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS phpcolor_vote;
CREATE TABLE `phpcolor_vote` (
  `id` mediumint(8) NOT NULL AUTO_INCREMENT,
  `tid` mediumint(8) NOT NULL,
  `options` text NOT NULL,
  `result` varchar(255) NOT NULL,
  `type` mediumint(1) NOT NULL DEFAULT '0',
  `state` mediumint(1) NOT NULL DEFAULT '0',
  `qita` mediumint(1) NOT NULL DEFAULT '0',
  `zdhf` mediumint(1) NOT NULL DEFAULT '0',
  `already` text NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;