DROP TABLE IF EXISTS `dede_addonarticle`;

CREATE TABLE `dede_addonarticle` (
  `aid` int(11) NOT NULL default '0',
  `typeid` int(11) NOT NULL default '0',
  `body` mediumtext NOT NULL,
  PRIMARY KEY  (`aid`),
  KEY `typeid` (`typeid`)
) ENGINE=MyISAM DEFAULT CHARSET=gbk;

DROP TABLE IF EXISTS `dede_addonflash`;

CREATE TABLE `dede_addonflash` (
  `aid` int(11) NOT NULL default '0',
  `typeid` int(11) NOT NULL default '0',
  `filesize` varchar(10) NOT NULL default '',
  `playtime` varchar(10) NOT NULL default '',
  `flashtype` varchar(10) NOT NULL default '',
  `flashrank` smallint(6) NOT NULL default '0',
  `width` smallint(6) NOT NULL default '0',
  `height` smallint(6) NOT NULL default '0',
  `flashurl` varchar(80) NOT NULL default '',
  PRIMARY KEY  (`aid`),
  KEY `flashMain` (`typeid`,`filesize`,`flashrank`)
) ENGINE=MyISAM DEFAULT CHARSET=gbk;

DROP TABLE IF EXISTS `dede_addonimages`;

CREATE TABLE `dede_addonimages` (
  `aid` int(11) NOT NULL default '0',
  `typeid` int(11) NOT NULL default '0',
  `pagestyle` smallint(6) NOT NULL default '1',
  `maxwidth` smallint(6) NOT NULL default '600',
  `imgurls` text NOT NULL,
  `row` smallint(6) NOT NULL default '0',
  `col` smallint(6) NOT NULL default '0',
  `isrm` smallint(6) NOT NULL default '0',
  `ddmaxwidth` smallint(6) NOT NULL default '200',
  PRIMARY KEY  (`aid`),
  KEY `imagesMain` (`typeid`,`pagestyle`,`maxwidth`,`row`,`col`,`isrm`,`ddmaxwidth`)
) ENGINE=MyISAM DEFAULT CHARSET=gbk;

DROP TABLE IF EXISTS `dede_addoninfos`;

CREATE TABLE `dede_addoninfos` (
  `aid` int(11) NOT NULL default '0',
  `typeid` int(11) NOT NULL default '0',
  `message` mediumtext NOT NULL,
  `contact` varchar(50) NOT NULL default '',
  `phone` varchar(15) NOT NULL default '',
  `fax` varchar(15) NOT NULL default '',
  `email` varchar(50) NOT NULL default '',
  `qq` varchar(50) NOT NULL default '',
  `msn` varchar(50) NOT NULL default '',
  `address` varchar(255) NOT NULL default '',
  PRIMARY KEY  (`aid`),
  KEY `typeid` (`typeid`)
) ENGINE=MyISAM DEFAULT CHARSET=gbk;

DROP TABLE IF EXISTS `dede_addonproduct`;

CREATE TABLE `dede_addonproduct` (
  `aid` int(11) NOT NULL default '0',
  `typeid` int(11) NOT NULL default '0',
  `assprice` float NOT NULL default '0',
  `msg` mediumtext NOT NULL,
  `bigpic` varchar(200) NOT NULL default '',
  `model` varchar(100) NOT NULL default '',
  `sptype` varchar(10) NOT NULL default '',
  `cometime` int(11) NOT NULL default '0',
  `brand` varchar(30) NOT NULL default '',
  `size` varchar(50) NOT NULL default '',
  `stuff` varchar(100) NOT NULL default '',
  PRIMARY KEY  (`aid`),
  KEY `dede_addonproduct_index` (`typeid`)
) ENGINE=MyISAM DEFAULT CHARSET=gbk;

DROP TABLE IF EXISTS `dede_addonsoft`;

CREATE TABLE `dede_addonsoft` (
  `aid` int(11) NOT NULL default '0',
  `typeid` int(11) NOT NULL default '0',
  `filetype` varchar(10) NOT NULL default '',
  `language` varchar(10) NOT NULL default '',
  `softtype` varchar(10) NOT NULL default '',
  `accredit` varchar(10) NOT NULL default '',
  `os` varchar(30) NOT NULL default '',
  `softrank` int(11) NOT NULL default '0',
  `officialUrl` varchar(30) NOT NULL default '',
  `officialDemo` varchar(50) NOT NULL default '',
  `softsize` varchar(10) NOT NULL default '',
  `softlinks` text NOT NULL,
  `introduce` text NOT NULL,
  PRIMARY KEY  (`aid`),
  KEY `softMain` (`typeid`,`filetype`,`language`,`os`,`softrank`,`softsize`)
) ENGINE=MyISAM DEFAULT CHARSET=gbk;

DROP TABLE IF EXISTS `dede_addonspec`;

CREATE TABLE `dede_addonspec` (
  `aid` int(11) NOT NULL default '0',
  `typeid` int(11) NOT NULL default '0',
  `note` text NOT NULL,
  PRIMARY KEY  (`aid`),
  KEY `typeid` (`typeid`)
) ENGINE=MyISAM DEFAULT CHARSET=gbk;

DROP TABLE IF EXISTS `dede_addonvote`;

CREATE TABLE `dede_addonvote` (
  `aid` int(11) NOT NULL default '0',
  `typeid` int(11) NOT NULL default '0',
  `bigpic` varchar(200) NOT NULL default '',
  `upload` varchar(200) NOT NULL default '',
  `votecount` int(11) NOT NULL default '0',
  PRIMARY KEY  (`aid`),
  KEY `dede_addonvote_index` (`typeid`)
) ENGINE=MyISAM DEFAULT CHARSET=gbk;

DROP TABLE IF EXISTS `dede_admin`;

CREATE TABLE `dede_admin` (
  `ID` int(10) unsigned NOT NULL auto_increment,
  `usertype` int(10) unsigned NOT NULL default '0',
  `userid` varchar(30) NOT NULL default '',
  `pwd` varchar(50) NOT NULL default '',
  `uname` varchar(20) NOT NULL default '',
  `tname` varchar(30) NOT NULL default '',
  `email` varchar(30) NOT NULL default '',
  `typeid` text,
  `logintime` datetime NOT NULL default '0000-00-00 00:00:00',
  `loginip` varchar(20) NOT NULL default '',
  PRIMARY KEY  (`ID`)
) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=gbk;

DROP TABLE IF EXISTS `dede_admintype`;

CREATE TABLE `dede_admintype` (
  `rank` smallint(6) NOT NULL default '1',
  `typename` varchar(30) NOT NULL default '',
  `system` smallint(6) NOT NULL default '0',
  `purviews` text NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=gbk;

DROP TABLE IF EXISTS `dede_arcatt`;

CREATE TABLE `dede_arcatt` (
  `att` smallint(6) NOT NULL default '0',
  `attname` varchar(30) NOT NULL default '',
  PRIMARY KEY  (`att`)
) ENGINE=MyISAM DEFAULT CHARSET=gbk;

DROP TABLE IF EXISTS `dede_archives`;

CREATE TABLE `dede_archives` (
  `ID` int(11) unsigned NOT NULL auto_increment,
  `typeid` int(11) unsigned NOT NULL default '0',
  `typeid2` int(11) unsigned NOT NULL default '0',
  `sortrank` int(11) NOT NULL default '0',
  `iscommend` smallint(6) NOT NULL default '0',
  `ismake` smallint(6) NOT NULL default '0',
  `channel` int(11) NOT NULL default '1',
  `arcrank` smallint(6) NOT NULL default '0',
  `click` int(11) unsigned NOT NULL default '0',
  `money` smallint(6) NOT NULL default '0',
  `title` varchar(80) NOT NULL default '',
  `shorttitle` varchar(36) NOT NULL default '',
  `color` varchar(10) NOT NULL default '',
  `writer` varchar(30) NOT NULL default '',
  `source` varchar(50) NOT NULL default '',
  `litpic` varchar(100) NOT NULL default '',
  `pubdate` int(11) NOT NULL default '0',
  `senddate` int(11) NOT NULL default '0',
  `arcatt` smallint(6) NOT NULL default '0',
  `adminID` int(11) NOT NULL default '0',
  `memberID` int(11) unsigned NOT NULL default '0',
  `description` varchar(250) NOT NULL default '',
  `keywords` varchar(60) NOT NULL default '',
  `templet` varchar(60) NOT NULL default '',
  `lastpost` int(11) NOT NULL default '0',
  `postnum` int(11) NOT NULL default '0',
  `redirecturl` varchar(150) NOT NULL default '',
  `mtype` int(11) NOT NULL default '0',
  `userip` varchar(20) NOT NULL default '',
  `locklikeid` smallint(6) NOT NULL default '0',
  `likeid` varchar(240) default '',
  `digg` int(11) NOT NULL default '0',
  `diggtime` int(11) default '0',
  `addtable` varchar(30) default NULL,
  PRIMARY KEY  (`ID`),
  KEY `arcrank` (`arcrank`),
  KEY `channel` (`channel`),
  KEY `digg` (`diggtime`,`digg`),
  KEY `typeid` (`typeid`,`typeid2`),
  KEY `timekey` (`pubdate`,`sortrank`,`senddate`),
  KEY `click` (`click`),
  KEY `adminID` (`adminID`,`memberID`)
) ENGINE=MyISAM AUTO_INCREMENT=1868 DEFAULT CHARSET=gbk;

DROP TABLE IF EXISTS `dede_arcrank`;

CREATE TABLE `dede_arcrank` (
  `ID` int(10) unsigned NOT NULL auto_increment,
  `rank` smallint(10) NOT NULL default '0',
  `membername` varchar(20) NOT NULL default '',
  `adminrank` smallint(6) NOT NULL default '0',
  `money` int(11) NOT NULL default '500',
  PRIMARY KEY  (`ID`)
) ENGINE=MyISAM AUTO_INCREMENT=6 DEFAULT CHARSET=gbk;

DROP TABLE IF EXISTS `dede_arctype`;

CREATE TABLE `dede_arctype` (
  `ID` int(10) unsigned NOT NULL auto_increment,
  `reID` int(10) unsigned NOT NULL default '0',
  `topID` int(10) unsigned NOT NULL default '0',
  `sortrank` smallint(6) NOT NULL default '50',
  `typename` varchar(30) NOT NULL default '',
  `typedir` varchar(100) NOT NULL default '',
  `isdefault` smallint(6) NOT NULL default '0',
  `defaultname` varchar(20) NOT NULL default 'index.html',
  `issend` smallint(6) NOT NULL default '0',
  `channeltype` smallint(6) NOT NULL default '1',
  `maxpage` int(11) NOT NULL default '-1',
  `ispart` smallint(6) NOT NULL default '0',
  `corank` smallint(6) NOT NULL default '0',
  `tempindex` varchar(60) NOT NULL default '',
  `templist` varchar(60) NOT NULL default '',
  `temparticle` varchar(60) NOT NULL default '',
  `tempone` varchar(60) NOT NULL default '',
  `namerule` varchar(50) NOT NULL default '',
  `namerule2` varchar(50) NOT NULL default '',
  `modname` varchar(30) NOT NULL default '',
  `description` varchar(200) NOT NULL default '',
  `keywords` varchar(100) NOT NULL default '',
  `moresite` smallint(6) NOT NULL default '0',
  `siterefer` smallint(6) NOT NULL default '0',
  `sitepath` varchar(60) NOT NULL default '',
  `siteurl` varchar(60) NOT NULL default '',
  `ishidden` smallint(6) NOT NULL default '0',
  `smalltypes` varchar(250) NOT NULL default '',
  PRIMARY KEY  (`ID`),
  KEY `reID` (`reID`,`topID`,`sortrank`,`issend`,`channeltype`,`moresite`,`ishidden`,`ispart`)
) ENGINE=MyISAM AUTO_INCREMENT=105 DEFAULT CHARSET=gbk;

DROP TABLE IF EXISTS `dede_area`;

CREATE TABLE `dede_area` (
  `id` int(10) unsigned NOT NULL auto_increment,
  `name` varchar(20) NOT NULL default '',
  `reid` int(10) unsigned NOT NULL default '0',
  `disorder` int(10) unsigned NOT NULL default '0',
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=3118 DEFAULT CHARSET=gbk;

DROP TABLE IF EXISTS `dede_ask`;

CREATE TABLE `dede_ask` (
  `id` int(10) unsigned NOT NULL auto_increment,
  `tid` mediumint(8) unsigned NOT NULL default '0',
  `tidname` char(50) NOT NULL default '',
  `tid2` mediumint(8) unsigned NOT NULL default '0',
  `tid2name` char(50) NOT NULL default '',
  `uid` mediumint(8) unsigned NOT NULL default '0',
  `anonymous` tinyint(1) NOT NULL default '0',
  `title` char(80) NOT NULL default '',
  `digest` tinyint(1) NOT NULL default '0',
  `reward` smallint(6) unsigned NOT NULL default '0',
  `dateline` int(10) unsigned NOT NULL default '0',
  `expiredtime` int(10) unsigned NOT NULL default '0',
  `solvetime` int(10) unsigned NOT NULL default '0',
  `bestanswer` int(10) unsigned NOT NULL default '0',
  `status` tinyint(1) NOT NULL default '0',
  `disorder` smallint(6) NOT NULL default '0',
  `views` int(10) unsigned NOT NULL default '0',
  `replies` mediumint(8) unsigned NOT NULL default '0',
  `ip` char(15) NOT NULL default '',
  `content` mediumtext NOT NULL,
  `extra` mediumtext NOT NULL,
  PRIMARY KEY  (`id`),
  KEY `disorder` (`tid`,`tid2`,`status`,`dateline`),
  KEY `digest` (`digest`),
  KEY `expiredtime` (`expiredtime`),
  KEY `reward` (`reward`),
  KEY `uid` (`uid`)
) ENGINE=MyISAM DEFAULT CHARSET=gbk;

DROP TABLE IF EXISTS `dede_askanswer`;

CREATE TABLE `dede_askanswer` (
  `id` int(10) unsigned NOT NULL auto_increment,
  `askid` mediumint(8) unsigned NOT NULL default '0',
  `ifanswer` tinyint(1) NOT NULL default '0',
  `tid` smallint(6) unsigned NOT NULL default '0',
  `tid2` smallint(6) unsigned NOT NULL default '0',
  `uid` mediumint(8) unsigned NOT NULL default '0',
  `username` char(32) NOT NULL default '',
  `anonymous` tinyint(1) NOT NULL default '0',
  `goodrate` smallint(6) unsigned NOT NULL default '0',
  `badrate` smallint(6) unsigned NOT NULL default '0',
  `userip` char(15) NOT NULL default '',
  `dateline` int(10) unsigned NOT NULL default '0',
  `brief` char(200) NOT NULL default '',
  `content` mediumtext NOT NULL,
  PRIMARY KEY  (`id`),
  KEY `askid` (`askid`),
  KEY `uid` (`uid`),
  KEY `dateline` (`askid`,`dateline`)
) ENGINE=MyISAM DEFAULT CHARSET=gbk;

DROP TABLE IF EXISTS `dede_asktype`;

CREATE TABLE `dede_asktype` (
  `id` mediumint(8) unsigned NOT NULL auto_increment,
  `name` char(50) NOT NULL default '',
  `reid` int(10) unsigned NOT NULL default '0',
  `disorder` int(10) unsigned NOT NULL default '0',
  `asknum` mediumint(8) unsigned NOT NULL default '0',
  PRIMARY KEY  (`id`),
  KEY `disorder` (`disorder`)
) ENGINE=MyISAM AUTO_INCREMENT=137 DEFAULT CHARSET=gbk;

DROP TABLE IF EXISTS `dede_cache_feedbackurl`;

CREATE TABLE `dede_cache_feedbackurl` (
  `id` int(11) NOT NULL auto_increment,
  `url` varchar(80) NOT NULL default '',
  `title` varchar(80) NOT NULL default '',
  `postnum` int(11) NOT NULL default '0',
  `posttime` int(11) NOT NULL default '0',
  `feedid` int(11) NOT NULL default '0',
  PRIMARY KEY  (`id`),
  KEY `url` (`url`),
  KEY `postnum` (`postnum`,`posttime`,`feedid`)
) ENGINE=MyISAM AUTO_INCREMENT=217 DEFAULT CHARSET=gbk;

DROP TABLE IF EXISTS `dede_cache_keyword`;

CREATE TABLE `dede_cache_keyword` (
  `id` smallint(6) NOT NULL auto_increment,
  `keywords` varchar(50) NOT NULL default '',
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=gbk;

DROP TABLE IF EXISTS `dede_cache_tagindex`;

CREATE TABLE `dede_cache_tagindex` (
  `id` int(11) NOT NULL auto_increment,
  `typeid` smallint(6) NOT NULL default '0',
  `row` smallint(6) NOT NULL default '10',
  `channelid` smallint(6) NOT NULL default '0',
  `titlelen` smallint(6) NOT NULL default '30',
  `att` int(11) NOT NULL default '0',
  `templets` smallint(6) NOT NULL default '0',
  `listtype` char(8) default 'all',
  `orderby` char(10) NOT NULL default 'default',
  `order` char(4) NOT NULL default 'desc',
  `limit` char(10) NOT NULL default '',
  `subday` smallint(6) NOT NULL default '0',
  `uptime` int(11) NOT NULL default '0',
  `ismember` smallint(6) NOT NULL default '0',
  `col` smallint(6) NOT NULL default '1',
  `keyword` smallint(6) NOT NULL default '0',
  `infolen` smallint(6) NOT NULL default '160',
  `imgwidth` smallint(6) NOT NULL default '120',
  `imgheight` smallint(6) NOT NULL default '90',
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=gbk;

DROP TABLE IF EXISTS `dede_cache_templets`;

CREATE TABLE `dede_cache_templets` (
  `id` smallint(6) NOT NULL auto_increment,
  `templets` varchar(50) NOT NULL default '',
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=gbk;

DROP TABLE IF EXISTS `dede_cache_value`;

CREATE TABLE `dede_cache_value` (
  `cid` int(11) NOT NULL default '0',
  `value` text NOT NULL,
  KEY `cid` (`cid`)
) ENGINE=MyISAM DEFAULT CHARSET=gbk;

DROP TABLE IF EXISTS `dede_channeltype`;

CREATE TABLE `dede_channeltype` (
  `ID` smallint(6) NOT NULL default '0',
  `nid` varchar(10) NOT NULL default '',
  `typename` varchar(30) NOT NULL default '',
  `maintable` varchar(20) NOT NULL default 'dede_archives ',
  `addtable` varchar(30) NOT NULL default '',
  `addcon` varchar(30) NOT NULL default '',
  `mancon` varchar(30) NOT NULL default '',
  `editcon` varchar(30) NOT NULL default '',
  `useraddcon` varchar(30) NOT NULL default '',
  `usermancon` varchar(30) NOT NULL default '',
  `usereditcon` varchar(30) NOT NULL default '',
  `fieldset` text NOT NULL,
  `listadd` varchar(250) NOT NULL default '',
  `issystem` smallint(6) NOT NULL default '0',
  `isshow` smallint(6) NOT NULL default '1',
  `issend` smallint(6) NOT NULL default '0',
  `arcsta` smallint(6) NOT NULL default '-1',
  `sendrank` smallint(6) NOT NULL default '10',
  `sendmember` int(11) NOT NULL default '0',
  PRIMARY KEY  (`ID`),
  KEY `channelIndex` (`nid`,`typename`,`addtable`,`isshow`,`arcsta`,`sendrank`)
) ENGINE=MyISAM DEFAULT CHARSET=gbk;

DROP TABLE IF EXISTS `dede_co_dataswitch`;

CREATE TABLE `dede_co_dataswitch` (
  `aid` int(11) NOT NULL auto_increment,
  `notename` varchar(100) NOT NULL default '',
  `channelid` int(11) NOT NULL default '0',
  `description` varchar(250) NOT NULL default '',
  `addtime` int(11) NOT NULL default '0',
  `notes` text NOT NULL,
  PRIMARY KEY  (`aid`),
  KEY `notename` (`notename`,`channelid`,`description`,`addtime`)
) ENGINE=MyISAM DEFAULT CHARSET=gbk;

DROP TABLE IF EXISTS `dede_co_exrule`;

CREATE TABLE `dede_co_exrule` (
  `aid` int(11) NOT NULL auto_increment,
  `channelid` int(11) NOT NULL default '0',
  `rulename` varchar(100) NOT NULL default '',
  `etype` varchar(10) NOT NULL default '',
  `dtime` int(11) NOT NULL default '0',
  `ruleset` text NOT NULL,
  PRIMARY KEY  (`aid`),
  KEY `rulename` (`rulename`,`etype`,`dtime`,`channelid`)
) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=gbk;

DROP TABLE IF EXISTS `dede_co_listenurl`;

CREATE TABLE `dede_co_listenurl` (
  `nid` int(11) NOT NULL default '0',
  `url` varchar(150) NOT NULL default ''
) ENGINE=MyISAM DEFAULT CHARSET=gbk;

DROP TABLE IF EXISTS `dede_co_mediaurl`;

CREATE TABLE `dede_co_mediaurl` (
  `aid` int(11) NOT NULL auto_increment,
  `nid` int(11) NOT NULL default '0',
  `rurl` varchar(150) NOT NULL default '',
  `nurl` varchar(80) NOT NULL default '',
  PRIMARY KEY  (`aid`),
  KEY `nurl` (`nurl`)
) ENGINE=MyISAM DEFAULT CHARSET=gbk;

DROP TABLE IF EXISTS `dede_conote`;

CREATE TABLE `dede_conote` (
  `nid` int(11) NOT NULL auto_increment,
  `typeid` int(11) NOT NULL default '0',
  `gathername` varchar(50) NOT NULL default '',
  `language` varchar(10) NOT NULL default 'gb2312',
  `savetime` int(11) NOT NULL default '0',
  `lasttime` int(11) NOT NULL default '0',
  `noteinfo` text NOT NULL,
  PRIMARY KEY  (`nid`),
  KEY `conote` (`typeid`,`gathername`,`lasttime`,`savetime`)
) ENGINE=MyISAM DEFAULT CHARSET=gbk;

DROP TABLE IF EXISTS `dede_courl`;

CREATE TABLE `dede_courl` (
  `aid` int(11) NOT NULL auto_increment,
  `nid` int(11) NOT NULL default '0',
  `title` varchar(60) NOT NULL default '',
  `url` varchar(150) NOT NULL default '',
  `dtime` int(11) NOT NULL default '0',
  `isdown` smallint(6) NOT NULL default '0',
  `isex` smallint(6) NOT NULL default '0',
  `result` mediumtext NOT NULL,
  PRIMARY KEY  (`aid`),
  KEY `nid` (`nid`)
) ENGINE=MyISAM DEFAULT CHARSET=gbk;

DROP TABLE IF EXISTS `dede_error`;

CREATE TABLE `dede_error` (
  `aid` int(11) NOT NULL auto_increment,
  `title` varchar(100) NOT NULL default '',
  `ip` varchar(20) NOT NULL default '',
  `dtime` int(11) NOT NULL default '0',
  `url` varchar(100) NOT NULL default '',
  `info` mediumtext NOT NULL,
  PRIMARY KEY  (`aid`),
  KEY `errIndex` (`title`,`ip`,`dtime`,`url`)
) ENGINE=MyISAM DEFAULT CHARSET=gbk;

DROP TABLE IF EXISTS `dede_feedback`;

CREATE TABLE `dede_feedback` (
  `ID` int(11) unsigned NOT NULL auto_increment,
  `aid` int(11) unsigned NOT NULL default '0',
  `typeid` int(11) NOT NULL default '0',
  `username` varchar(30) NOT NULL default '',
  `arctitle` varchar(60) NOT NULL default '',
  `urlindex` int(11) NOT NULL default '0',
  `url` varchar(80) NOT NULL default '',
  `ip` varchar(20) NOT NULL default '',
  `msg` text NOT NULL,
  `ischeck` smallint(6) NOT NULL default '0',
  `dtime` int(11) NOT NULL default '0',
  `email` varchar(60) NOT NULL default '',
  `mid` int(11) NOT NULL default '0',
  `rank` smallint(6) NOT NULL default '0',
  `good` int(11) NOT NULL default '0',
  `bad` int(11) NOT NULL default '0',
  `face` smallint(6) NOT NULL default '0',
  PRIMARY KEY  (`ID`),
  KEY `mid` (`mid`),
  KEY `feedbackindex` (`aid`,`typeid`,`urlindex`,`ischeck`,`dtime`)
) ENGINE=MyISAM AUTO_INCREMENT=30 DEFAULT CHARSET=gbk;

DROP TABLE IF EXISTS `dede_flink`;

CREATE TABLE `dede_flink` (
  `ID` int(11) NOT NULL auto_increment,
  `sortrank` int(11) NOT NULL default '0',
  `url` varchar(100) NOT NULL default '',
  `webname` varchar(30) NOT NULL default '',
  `msg` varchar(250) NOT NULL default '',
  `email` varchar(100) NOT NULL default '',
  `logo` varchar(100) NOT NULL default '',
  `dtime` datetime NOT NULL default '0000-00-00 00:00:00',
  `typeid` int(11) NOT NULL default '0',
  `ischeck` smallint(6) NOT NULL default '1',
  PRIMARY KEY  (`ID`)
) ENGINE=MyISAM AUTO_INCREMENT=30 DEFAULT CHARSET=gbk;

DROP TABLE IF EXISTS `dede_flinktype`;

CREATE TABLE `dede_flinktype` (
  `ID` int(11) NOT NULL auto_increment,
  `typename` varchar(50) NOT NULL default '',
  PRIMARY KEY  (`ID`)
) ENGINE=MyISAM AUTO_INCREMENT=9 DEFAULT CHARSET=gbk;

DROP TABLE IF EXISTS `dede_freelist`;

CREATE TABLE `dede_freelist` (
  `aid` int(11) NOT NULL auto_increment,
  `title` varchar(50) NOT NULL default '',
  `namerule` varchar(50) NOT NULL default '',
  `listdir` varchar(60) NOT NULL default '',
  `defaultpage` varchar(20) NOT NULL default '',
  `nodefault` smallint(6) NOT NULL default '0',
  `templet` varchar(50) NOT NULL default '',
  `edtime` int(11) NOT NULL default '0',
  `click` int(11) NOT NULL default '1',
  `listtag` mediumtext NOT NULL,
  `keyword` varchar(100) NOT NULL default '',
  `description` varchar(250) NOT NULL default '',
  PRIMARY KEY  (`aid`)
) ENGINE=MyISAM AUTO_INCREMENT=3 DEFAULT CHARSET=gbk;

DROP TABLE IF EXISTS `dede_friends`;

CREATE TABLE `dede_friends` (
  `friend_id` int(11) NOT NULL auto_increment,
  `friend_from` bigint(20) NOT NULL default '0',
  `friend_to` bigint(20) NOT NULL default '0',
  PRIMARY KEY  (`friend_id`),
  UNIQUE KEY `friends_from_to` (`friend_from`,`friend_to`)
) ENGINE=MyISAM DEFAULT CHARSET=gbk;

DROP TABLE IF EXISTS `dede_group_guestbook`;

CREATE TABLE `dede_group_guestbook` (
  `bid` int(11) unsigned NOT NULL auto_increment,
  `title` varchar(80) NOT NULL default '',
  `uname` char(15) NOT NULL default '',
  `userid` int(11) unsigned NOT NULL default '0',
  `gid` int(11) unsigned NOT NULL default '0',
  `stime` int(10) unsigned NOT NULL default '0',
  `message` text NOT NULL,
  `ip` varchar(15) NOT NULL default '',
  PRIMARY KEY  (`bid`),
  KEY `userid` (`userid`,`gid`),
  KEY `sitme` (`stime`)
) ENGINE=MyISAM DEFAULT CHARSET=gbk;

DROP TABLE IF EXISTS `dede_group_notice`;

CREATE TABLE `dede_group_notice` (
  `id` smallint(6) unsigned NOT NULL auto_increment,
  `uname` char(15) NOT NULL default '',
  `userid` int(11) unsigned NOT NULL default '0',
  `title` varchar(80) NOT NULL default '',
  `notice` text NOT NULL,
  `stime` int(10) unsigned NOT NULL default '0',
  `gid` mediumint(8) unsigned NOT NULL default '0',
  `ip` varchar(15) NOT NULL default '',
  PRIMARY KEY  (`id`),
  KEY `stime` (`stime`),
  KEY `userid` (`userid`),
  KEY `gid` (`gid`)
) ENGINE=MyISAM DEFAULT CHARSET=gbk;

DROP TABLE IF EXISTS `dede_group_posts`;

CREATE TABLE `dede_group_posts` (
  `pid` int(10) unsigned NOT NULL auto_increment,
  `gid` smallint(6) unsigned NOT NULL default '0',
  `tid` mediumint(8) unsigned NOT NULL default '0',
  `first` tinyint(1) NOT NULL default '0',
  `author` char(15) NOT NULL default '',
  `subject` varchar(80) NOT NULL default '',
  `dateline` int(10) unsigned NOT NULL default '0',
  `message` mediumtext NOT NULL,
  `useip` varchar(15) NOT NULL default '',
  `anonymous` tinyint(1) unsigned NOT NULL default '0',
  `status` tinyint(1) unsigned NOT NULL default '0',
  `authorid` mediumint(8) unsigned NOT NULL default '0',
  PRIMARY KEY  (`pid`),
  KEY `gid` (`gid`,`tid`,`author`),
  KEY `dateline` (`dateline`)
) ENGINE=MyISAM DEFAULT CHARSET=gbk;

DROP TABLE IF EXISTS `dede_group_threads`;

CREATE TABLE `dede_group_threads` (
  `tid` mediumint(8) unsigned NOT NULL auto_increment,
  `gid` smallint(6) unsigned NOT NULL default '0',
  `smalltype` smallint(6) unsigned NOT NULL default '0',
  `subject` char(80) NOT NULL default '',
  `displayorder` tinyint(1) unsigned NOT NULL default '0',
  `author` char(15) NOT NULL default '',
  `authorid` mediumint(8) unsigned NOT NULL default '0',
  `views` int(10) unsigned NOT NULL default '0',
  `dateline` int(10) unsigned NOT NULL default '0',
  `lastpost` int(10) unsigned NOT NULL default '0',
  `lastposter` char(15) NOT NULL default '',
  `replies` mediumint(8) unsigned NOT NULL default '0',
  `digest` tinyint(1) unsigned NOT NULL default '0',
  `closed` mediumint(8) NOT NULL default '0',
  PRIMARY KEY  (`tid`),
  KEY `digest` (`digest`),
  KEY `authorid` (`authorid`,`dateline`),
  KEY `displayorder` (`gid`,`lastpost`,`displayorder`,`smalltype`)
) ENGINE=MyISAM DEFAULT CHARSET=gbk;

DROP TABLE IF EXISTS `dede_group_user`;

CREATE TABLE `dede_group_user` (
  `id` int(11) unsigned NOT NULL auto_increment,
  `uid` int(11) unsigned NOT NULL default '0',
  `username` varchar(15) NOT NULL default '',
  `gid` int(11) unsigned NOT NULL default '0',
  `posts` int(10) unsigned NOT NULL default '0',
  `replies` int(10) unsigned NOT NULL default '0',
  `jointime` int(10) unsigned NOT NULL default '0',
  `isjoin` tinyint(1) unsigned NOT NULL default '0',
  PRIMARY KEY  (`id`),
  KEY `uid` (`uid`,`gid`),
  KEY `jointime` (`jointime`),
  KEY `posts` (`posts`),
  KEY `replies` (`replies`)
) ENGINE=MyISAM DEFAULT CHARSET=gbk;

DROP TABLE IF EXISTS `dede_groups`;

CREATE TABLE `dede_groups` (
  `groupid` int(10) unsigned NOT NULL auto_increment,
  `groupname` varchar(75) NOT NULL default '',
  `des` text,
  `groupimg` varchar(200) NOT NULL default '0',
  `rootstoreid` int(10) unsigned NOT NULL default '0',
  `storeid` int(10) unsigned NOT NULL default '0',
  `smalltype` text,
  `uid` int(10) unsigned NOT NULL default '0',
  `creater` char(15) NOT NULL default '',
  `ismaster` text,
  `issystem` tinyint(1) unsigned NOT NULL default '0',
  `isindex` tinyint(1) unsigned NOT NULL default '0',
  `ishidden` tinyint(1) unsigned NOT NULL default '0',
  `hits` int(13) unsigned NOT NULL default '0',
  `threads` int(13) unsigned NOT NULL default '0',
  `members` int(13) unsigned NOT NULL default '0',
  `stime` int(10) unsigned NOT NULL default '0',
  PRIMARY KEY  (`groupid`),
  KEY `uid` (`uid`),
  KEY `stime` (`stime`),
  KEY `storeid` (`storeid`,`rootstoreid`),
  KEY `hits` (`hits`),
  KEY `threads` (`threads`,`members`)
) ENGINE=MyISAM DEFAULT CHARSET=gbk;

DROP TABLE IF EXISTS `dede_guestbook`;

CREATE TABLE `dede_guestbook` (
  `ID` int(11) NOT NULL auto_increment,
  `uname` varchar(30) NOT NULL default '',
  `email` varchar(80) NOT NULL default '',
  `homepage` varchar(80) NOT NULL default '',
  `qq` varchar(20) NOT NULL default '',
  `face` varchar(10) NOT NULL default '',
  `msg` text NOT NULL,
  `ip` varchar(20) NOT NULL default '',
  `dtime` datetime NOT NULL default '0000-00-00 00:00:00',
  `ischeck` smallint(6) NOT NULL default '1',
  PRIMARY KEY  (`ID`)
) ENGINE=MyISAM DEFAULT CHARSET=gbk;

DROP TABLE IF EXISTS `dede_homepageset`;

CREATE TABLE `dede_homepageset` (
  `templet` varchar(100) NOT NULL default '',
  `position` varchar(50) NOT NULL default ''
) ENGINE=MyISAM DEFAULT CHARSET=gbk;

DROP TABLE IF EXISTS `dede_infos`;

CREATE TABLE `dede_infos` (
  `ID` int(11) unsigned NOT NULL auto_increment,
  `typeid` int(11) unsigned NOT NULL default '0',
  `smalltypeid` int(10) unsigned NOT NULL default '0',
  `areaid` int(10) unsigned NOT NULL default '0',
  `areaid2` int(10) unsigned NOT NULL default '0',
  `sectorid` int(10) unsigned NOT NULL default '0',
  `sectorid2` int(10) unsigned NOT NULL default '0',
  `endtime` int(10) unsigned NOT NULL default '0',
  `typeid2` int(11) unsigned NOT NULL default '0',
  `sortrank` int(11) NOT NULL default '0',
  `iscommend` smallint(6) NOT NULL default '0',
  `ismake` smallint(6) NOT NULL default '-1',
  `channel` int(11) NOT NULL default '-2',
  `arcrank` smallint(6) NOT NULL default '0',
  `click` int(11) unsigned NOT NULL default '0',
  `money` smallint(6) NOT NULL default '0',
  `title` varchar(80) NOT NULL default '',
  `shorttitle` varchar(36) NOT NULL default '',
  `color` varchar(10) NOT NULL default '',
  `writer` varchar(30) NOT NULL default '',
  `source` varchar(50) NOT NULL default '',
  `litpic` varchar(100) NOT NULL default '',
  `pubdate` int(11) NOT NULL default '0',
  `senddate` int(11) NOT NULL default '0',
  `arcatt` smallint(6) NOT NULL default '0',
  `adminID` int(11) NOT NULL default '0',
  `memberID` int(11) unsigned NOT NULL default '0',
  `description` varchar(250) NOT NULL default '0',
  `keywords` varchar(60) NOT NULL default '',
  `templet` varchar(60) NOT NULL default '',
  `lastpost` int(11) NOT NULL default '0',
  `postnum` int(11) NOT NULL default '0',
  `redirecturl` varchar(150) NOT NULL default '',
  `mtype` int(11) NOT NULL default '0',
  `userip` varchar(20) NOT NULL default '',
  `locklikeid` smallint(6) NOT NULL default '0',
  `likeid` varchar(240) NOT NULL default '',
  `digg` int(11) NOT NULL default '0',
  `diggtime` int(10) unsigned NOT NULL default '0',
  PRIMARY KEY  (`ID`),
  KEY `click` (`click`),
  KEY `pubdate` (`pubdate`),
  KEY `typeid` (`typeid`),
  KEY `typeid2` (`typeid2`),
  KEY `sortrank` (`sortrank`),
  KEY `arcrank` (`arcrank`),
  KEY `senddate` (`senddate`),
  KEY `adminID` (`adminID`),
  KEY `channel` (`channel`),
  KEY `digg` (`digg`)
) ENGINE=MyISAM DEFAULT CHARSET=gbk;

DROP TABLE IF EXISTS `dede_jobs`;

CREATE TABLE `dede_jobs` (
  `id` int(10) unsigned NOT NULL auto_increment,
  `name` varchar(100) NOT NULL default '0',
  `job` varchar(100) NOT NULL default '0',
  `nums` int(10) NOT NULL default '0',
  `department` varchar(100) NOT NULL default '0',
  `address` varchar(200) NOT NULL default '0',
  `pubdate` int(10) NOT NULL default '0',
  `endtime` int(10) NOT NULL default '0',
  `salaries` int(10) unsigned NOT NULL default '0',
  `message` mediumtext NOT NULL,
  `memberID` int(10) unsigned NOT NULL default '0',
  PRIMARY KEY  (`id`),
  KEY `memberID` (`memberID`)
) ENGINE=MyISAM DEFAULT CHARSET=gbk;

DROP TABLE IF EXISTS `dede_keywords`;

CREATE TABLE `dede_keywords` (
  `aid` int(11) NOT NULL auto_increment,
  `keyword` varchar(20) NOT NULL default '',
  `rank` int(11) NOT NULL default '0',
  `sta` smallint(6) NOT NULL default '1',
  `rpurl` varchar(60) NOT NULL default '',
  PRIMARY KEY  (`aid`),
  KEY `keyword` (`keyword`,`rank`,`sta`)
) ENGINE=MyISAM DEFAULT CHARSET=gbk;

DROP TABLE IF EXISTS `dede_log`;

CREATE TABLE `dede_log` (
  `lid` int(11) NOT NULL auto_increment,
  `adminid` int(11) NOT NULL default '0',
  `filename` varchar(100) NOT NULL default '',
  `method` varchar(10) NOT NULL default '',
  `query` varchar(250) NOT NULL default '',
  `cip` varchar(20) NOT NULL default '',
  `dtime` int(11) NOT NULL default '0',
  PRIMARY KEY  (`lid`)
) ENGINE=MyISAM DEFAULT CHARSET=gbk;

DROP TABLE IF EXISTS `dede_member`;

CREATE TABLE `dede_member` (
  `ID` int(10) unsigned NOT NULL auto_increment,
  `userid` varchar(32) NOT NULL default '',
  `pwd` varchar(64) NOT NULL default '0',
  `type` tinyint(3) unsigned NOT NULL default '0',
  `uname` varchar(20) NOT NULL default '',
  `sex` char(2) NOT NULL default '',
  `membertype` int(11) NOT NULL default '0',
  `uptime` int(11) NOT NULL default '0',
  `exptime` smallint(6) NOT NULL default '0',
  `money` int(11) NOT NULL default '0',
  `email` varchar(50) NOT NULL default '',
  `jointime` int(11) NOT NULL default '0',
  `joinip` varchar(20) NOT NULL default '',
  `logintime` int(11) NOT NULL default '0',
  `loginip` varchar(20) NOT NULL default '',
  `c1` int(11) NOT NULL default '0',
  `c2` int(11) NOT NULL default '0',
  `c3` int(11) NOT NULL default '0',
  `matt` smallint(6) NOT NULL default '0',
  `guestbook` int(11) NOT NULL default '0',
  `spaceshow` int(11) NOT NULL default '0',
  `pageshow` int(11) NOT NULL default '0',
  `spacestyle` varchar(20) NOT NULL default '',
  `spacename` varchar(60) NOT NULL default '',
  `spaceimage` varchar(120) NOT NULL default '',
  `news` text NOT NULL,
  `mybb` varchar(250) NOT NULL default '',
  `listnum` smallint(6) NOT NULL default '20',
  `scores` int(10) NOT NULL default '0',
  `newpm` smallint(6) NOT NULL default '0',
  PRIMARY KEY  (`ID`),
  KEY `userid` (`sex`,`userid`),
  KEY `setype` (`type`,`membertype`),
  KEY `pagetj` (`money`,`spaceshow`,`pageshow`,`scores`,`newpm`)
) ENGINE=MyISAM DEFAULT CHARSET=gbk;

DROP TABLE IF EXISTS `dede_member_arctype`;

CREATE TABLE `dede_member_arctype` (
  `aid` int(11) NOT NULL auto_increment,
  `typename` varchar(50) NOT NULL default '',
  `memberid` int(11) NOT NULL default '0',
  `channelid` smallint(6) NOT NULL default '0',
  `rank` smallint(6) NOT NULL default '0',
  PRIMARY KEY  (`aid`)
) ENGINE=MyISAM DEFAULT CHARSET=gbk;

DROP TABLE IF EXISTS `dede_member_cominfo`;

CREATE TABLE `dede_member_cominfo` (
  `id` mediumint(8) unsigned NOT NULL default '0',
  `truename` varchar(20) NOT NULL default '0',
  `business` varchar(40) NOT NULL default '0',
  `phone` varchar(12) NOT NULL default '0',
  `fax` varchar(12) NOT NULL default '0',
  `mobi` varchar(11) NOT NULL default '0',
  `comname` varchar(100) NOT NULL default '0',
  `regyear` varchar(4) NOT NULL default '0',
  `areaid` smallint(6) unsigned NOT NULL default '0',
  `areaid2` smallint(6) unsigned NOT NULL default '0',
  `service` varchar(255) NOT NULL default '0',
  `typeid1` smallint(6) unsigned NOT NULL default '0',
  `typeid2` smallint(6) unsigned NOT NULL default '0',
  `comaddr` varchar(100) NOT NULL default '0',
  `cominfo` mediumtext,
  `postid` varchar(6) NOT NULL default '0',
  `website` varchar(100) NOT NULL default '0',
  `culture` mediumtext,
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=gbk;

DROP TABLE IF EXISTS `dede_member_flink`;

CREATE TABLE `dede_member_flink` (
  `aid` int(11) NOT NULL auto_increment,
  `mid` int(11) NOT NULL default '0',
  `title` varchar(30) NOT NULL default '',
  `url` varchar(100) NOT NULL default '',
  `linktype` smallint(6) NOT NULL default '0',
  `imgurl` varchar(100) NOT NULL default '',
  `imgwidth` smallint(6) NOT NULL default '0',
  `imgheight` smallint(6) NOT NULL default '0',
  PRIMARY KEY  (`aid`)
) ENGINE=MyISAM DEFAULT CHARSET=gbk;

DROP TABLE IF EXISTS `dede_member_guestbook`;

CREATE TABLE `dede_member_guestbook` (
  `aid` int(11) NOT NULL auto_increment,
  `mid` int(11) NOT NULL default '0',
  `gid` varchar(20) NOT NULL default '0',
  `title` varchar(60) NOT NULL default '',
  `msg` text NOT NULL,
  `uname` varchar(50) NOT NULL default '',
  `email` varchar(50) NOT NULL default '',
  `qq` varchar(50) NOT NULL default '',
  `tel` varchar(50) NOT NULL default '',
  `ip` varchar(20) NOT NULL default '',
  `dtime` int(11) NOT NULL default '0',
  PRIMARY KEY  (`aid`)
) ENGINE=MyISAM DEFAULT CHARSET=gbk;

DROP TABLE IF EXISTS `dede_member_operation`;

CREATE TABLE `dede_member_operation` (
  `aid` int(11) NOT NULL auto_increment,
  `buyid` varchar(30) NOT NULL default '',
  `pname` varchar(50) NOT NULL default '',
  `product` varchar(10) NOT NULL default '',
  `money` int(11) NOT NULL default '0',
  `mtime` int(11) NOT NULL default '0',
  `pid` int(11) NOT NULL default '0',
  `mid` int(11) NOT NULL default '0',
  `sta` int(11) NOT NULL default '0',
  `oldinfo` varchar(200) NOT NULL default '',
  PRIMARY KEY  (`aid`),
  KEY `buyid` (`buyid`),
  KEY `pid` (`pid`,`mid`,`sta`)
) ENGINE=MyISAM DEFAULT CHARSET=gbk;

DROP TABLE IF EXISTS `dede_member_perinfo`;

CREATE TABLE `dede_member_perinfo` (
  `id` int(11) NOT NULL default '0',
  `uname` varchar(20) NOT NULL default '',
  `sex` char(2) NOT NULL default '1',
  `birthday` date NOT NULL default '0000-00-00',
  `weight` varchar(10) NOT NULL default '',
  `height` varchar(10) NOT NULL default '',
  `job` varchar(10) NOT NULL default '',
  `province` smallint(5) unsigned NOT NULL default '1',
  `city` smallint(6) NOT NULL default '0',
  `myinfo` varchar(250) NOT NULL default '',
  `tel` varchar(30) NOT NULL default '',
  `oicq` varchar(15) NOT NULL default '',
  `email` varchar(50) NOT NULL default '',
  `homepage` varchar(50) NOT NULL default '',
  `showaddr` smallint(6) NOT NULL default '0',
  `address` varchar(100) NOT NULL default '',
  `fullinfo` mediumtext,
  PRIMARY KEY  (`id`),
  KEY `sex` (`sex`),
  KEY `birthday` (`birthday`)
) ENGINE=MyISAM DEFAULT CHARSET=gbk;

DROP TABLE IF EXISTS `dede_member_time`;

CREATE TABLE `dede_member_time` (
  `mday` smallint(6) NOT NULL default '0',
  `tname` varchar(30) NOT NULL default ''
) ENGINE=MyISAM DEFAULT CHARSET=gbk;

DROP TABLE IF EXISTS `dede_member_type`;

CREATE TABLE `dede_member_type` (
  `aid` int(11) NOT NULL auto_increment,
  `rank` int(11) NOT NULL default '0',
  `pname` varchar(50) NOT NULL default '',
  `money` int(11) NOT NULL default '0',
  `exptime` int(11) NOT NULL default '30',
  PRIMARY KEY  (`aid`)
) ENGINE=MyISAM DEFAULT CHARSET=gbk;

DROP TABLE IF EXISTS `dede_memberstow`;

CREATE TABLE `dede_memberstow` (
  `aid` int(11) NOT NULL auto_increment,
  `uid` int(11) NOT NULL default '0',
  `arcid` int(11) NOT NULL default '0',
  `title` varchar(60) NOT NULL default '',
  `url` varchar(60) NOT NULL,
  `addtime` int(11) NOT NULL default '0',
  PRIMARY KEY  (`aid`)
) ENGINE=MyISAM DEFAULT CHARSET=gbk;

DROP TABLE IF EXISTS `dede_moneycard_record`;

CREATE TABLE `dede_moneycard_record` (
  `aid` int(11) NOT NULL auto_increment,
  `ctid` int(11) NOT NULL default '0',
  `cardid` varchar(50) NOT NULL default '',
  `uid` int(11) NOT NULL default '0',
  `isexp` smallint(6) NOT NULL default '0',
  `mtime` int(11) NOT NULL default '0',
  `utime` int(11) NOT NULL default '0',
  `money` int(11) NOT NULL default '0',
  `num` int(11) NOT NULL default '0',
  PRIMARY KEY  (`aid`),
  KEY `ctid` (`ctid`),
  KEY `cardid` (`cardid`),
  KEY `uid` (`uid`)
) ENGINE=MyISAM DEFAULT CHARSET=gbk;

DROP TABLE IF EXISTS `dede_moneycard_type`;

CREATE TABLE `dede_moneycard_type` (
  `tid` int(11) NOT NULL auto_increment,
  `num` int(11) NOT NULL default '500',
  `money` int(11) NOT NULL default '50',
  `pname` varchar(50) NOT NULL default '',
  PRIMARY KEY  (`tid`)
) ENGINE=MyISAM DEFAULT CHARSET=gbk;

DROP TABLE IF EXISTS `dede_moneyrecord`;

CREATE TABLE `dede_moneyrecord` (
  `ID` int(11) NOT NULL auto_increment,
  `aid` int(11) NOT NULL default '0',
  `uid` int(11) NOT NULL default '0',
  `title` varchar(60) NOT NULL default '',
  `money` int(11) NOT NULL default '0',
  `dtime` int(11) NOT NULL default '0',
  PRIMARY KEY  (`ID`)
) ENGINE=MyISAM DEFAULT CHARSET=gbk;

DROP TABLE IF EXISTS `dede_myad`;

CREATE TABLE `dede_myad` (
  `aid` int(11) NOT NULL auto_increment,
  `typeid` int(11) NOT NULL default '0',
  `tagname` varchar(30) NOT NULL default '',
  `adname` varchar(100) NOT NULL default '',
  `timeset` smallint(6) NOT NULL default '0',
  `starttime` int(11) NOT NULL default '0',
  `endtime` int(11) NOT NULL default '0',
  `normbody` text NOT NULL,
  `expbody` text NOT NULL,
  PRIMARY KEY  (`aid`),
  KEY `tagname` (`tagname`,`adname`,`typeid`,`timeset`,`endtime`,`starttime`)
) ENGINE=MyISAM AUTO_INCREMENT=9 DEFAULT CHARSET=gbk;

DROP TABLE IF EXISTS `dede_mynews`;

CREATE TABLE `dede_mynews` (
  `aid` int(11) NOT NULL auto_increment,
  `typeid` int(11) NOT NULL default '0',
  `title` varchar(60) NOT NULL default '',
  `writer` varchar(50) NOT NULL default '',
  `senddate` int(11) NOT NULL default '0',
  `body` text NOT NULL,
  PRIMARY KEY  (`aid`),
  KEY `mynewsindex` (`typeid`,`title`,`writer`,`senddate`)
) ENGINE=MyISAM DEFAULT CHARSET=gbk;

DROP TABLE IF EXISTS `dede_mytag`;

CREATE TABLE `dede_mytag` (
  `aid` int(11) NOT NULL auto_increment,
  `typeid` int(11) NOT NULL default '0',
  `tagname` varchar(30) NOT NULL default '',
  `timeset` smallint(6) NOT NULL default '0',
  `starttime` int(11) NOT NULL default '0',
  `endtime` int(11) NOT NULL default '0',
  `normbody` text NOT NULL,
  `expbody` text NOT NULL,
  PRIMARY KEY  (`aid`),
  KEY `tagname` (`tagname`,`typeid`,`timeset`,`endtime`,`starttime`)
) ENGINE=MyISAM DEFAULT CHARSET=gbk;

DROP TABLE IF EXISTS `dede_orders`;

CREATE TABLE `dede_orders` (
  `orderid` int(10) unsigned NOT NULL auto_increment,
  `touid` mediumint(8) unsigned NOT NULL default '0',
  `company` varchar(100) NOT NULL default '',
  `username` varchar(20) NOT NULL default '',
  `phone` varchar(12) NOT NULL default '',
  `fax` varchar(12) NOT NULL default '',
  `email` varchar(50) NOT NULL default '',
  `qq` varchar(50) NOT NULL default '',
  `msn` varchar(50) NOT NULL default '',
  `address` varchar(200) NOT NULL default '',
  `products` varchar(200) NOT NULL default '',
  `nums` int(10) unsigned NOT NULL default '0',
  `content` mediumtext NOT NULL,
  `ip` varchar(15) NOT NULL default '',
  `dateline` int(10) unsigned NOT NULL default '0',
  `status` tinyint(1) unsigned NOT NULL default '0',
  `homepage` varchar(50) NOT NULL default '',
  PRIMARY KEY  (`orderid`)
) ENGINE=MyISAM DEFAULT CHARSET=gbk;

DROP TABLE IF EXISTS `dede_plus`;

CREATE TABLE `dede_plus` (
  `aid` int(11) NOT NULL auto_increment,
  `plusname` varchar(30) NOT NULL default '',
  `menustring` varchar(150) NOT NULL default '',
  `writer` varchar(60) NOT NULL default '',
  `isshow` smallint(6) NOT NULL default '1',
  `filelist` text NOT NULL,
  PRIMARY KEY  (`aid`)
) ENGINE=MyISAM AUTO_INCREMENT=11 DEFAULT CHARSET=gbk;

DROP TABLE IF EXISTS `dede_pms`;

CREATE TABLE `dede_pms` (
  `pmid` int(10) unsigned NOT NULL auto_increment,
  `msgfrom` varchar(15) NOT NULL default '',
  `msgfromid` mediumint(8) unsigned NOT NULL default '0',
  `msgtoid` mediumint(8) unsigned NOT NULL default '0',
  `folder` enum('inbox','outbox','track') NOT NULL default 'inbox',
  `new` tinyint(1) NOT NULL default '0',
  `subject` varchar(75) NOT NULL default '',
  `dateline` int(10) unsigned NOT NULL default '0',
  `message` text NOT NULL,
  `delstatus` tinyint(1) unsigned NOT NULL default '0',
  `isadmin` tinyint(1) NOT NULL default '0',
  PRIMARY KEY  (`pmid`),
  KEY `msgtoid` (`msgtoid`,`folder`,`dateline`),
  KEY `msgfromid` (`msgfromid`,`folder`,`dateline`)
) ENGINE=MyISAM DEFAULT CHARSET=gbk;

DROP TABLE IF EXISTS `dede_scores`;

CREATE TABLE `dede_scores` (
  `id` int(11) unsigned NOT NULL auto_increment,
  `titles` char(15) NOT NULL default '',
  `icon` smallint(6) unsigned default '0',
  `integral` int(10) NOT NULL default '0',
  `isdefault` tinyint(1) unsigned NOT NULL default '0',
  PRIMARY KEY  (`id`),
  KEY `integral` (`integral`)
) ENGINE=MyISAM AUTO_INCREMENT=7 DEFAULT CHARSET=gbk;

DROP TABLE IF EXISTS `dede_search_keywords`;

CREATE TABLE `dede_search_keywords` (
  `aid` int(11) NOT NULL auto_increment,
  `keyword` varchar(50) NOT NULL default '',
  `spwords` varchar(100) NOT NULL default '',
  `count` int(11) NOT NULL default '1',
  `result` int(11) NOT NULL default '0',
  `lasttime` int(11) NOT NULL default '0',
  `istag` smallint(6) NOT NULL default '0',
  `weekcc` int(11) NOT NULL default '0',
  `monthcc` int(11) NOT NULL default '0',
  `starttime` int(11) NOT NULL default '0',
  `weekup` int(11) NOT NULL default '0',
  `monthup` int(11) NOT NULL default '0',
  PRIMARY KEY  (`aid`),
  KEY `count` (`count`,`result`,`lasttime`,`istag`)
) ENGINE=MyISAM AUTO_INCREMENT=374 DEFAULT CHARSET=gbk;

DROP TABLE IF EXISTS `dede_sectors`;

CREATE TABLE `dede_sectors` (
  `id` int(10) unsigned NOT NULL auto_increment,
  `name` varchar(100) NOT NULL default '',
  `reid` int(10) unsigned NOT NULL default '0',
  `disorder` int(10) unsigned NOT NULL default '0',
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=31 DEFAULT CHARSET=gbk;

DROP TABLE IF EXISTS `dede_sgpage`;

CREATE TABLE `dede_sgpage` (
  `aid` int(11) NOT NULL auto_increment,
  `title` varchar(60) NOT NULL default '',
  `ismake` smallint(6) NOT NULL default '1',
  `filename` varchar(150) NOT NULL default '',
  `uptime` int(11) NOT NULL default '0',
  `body` text NOT NULL,
  PRIMARY KEY  (`aid`),
  KEY `title` (`title`,`ismake`,`filename`,`uptime`)
) ENGINE=MyISAM DEFAULT CHARSET=gbk;

DROP TABLE IF EXISTS `dede_smalltypes`;

CREATE TABLE `dede_smalltypes` (
  `id` smallint(6) unsigned NOT NULL auto_increment,
  `name` varchar(255) NOT NULL default '0',
  `disorder` tinyint(3) unsigned NOT NULL default '0',
  `description` varchar(255) NOT NULL default '0',
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=17 DEFAULT CHARSET=gbk;

DROP TABLE IF EXISTS `dede_softconfig`;

CREATE TABLE `dede_softconfig` (
  `downtype` smallint(6) NOT NULL default '0',
  `ismoresite` smallint(6) NOT NULL default '0',
  `gotojump` smallint(6) NOT NULL default '0',
  `sites` text NOT NULL,
  KEY `downtype` (`downtype`,`ismoresite`,`gotojump`)
) ENGINE=MyISAM DEFAULT CHARSET=gbk;

DROP TABLE IF EXISTS `dede_store_groups`;

CREATE TABLE `dede_store_groups` (
  `storeid` mediumint(8) unsigned NOT NULL auto_increment,
  `storename` char(20) NOT NULL default '',
  `tops` mediumint(8) unsigned NOT NULL default '0',
  `orders` smallint(6) unsigned NOT NULL default '0',
  `nums` int(13) unsigned NOT NULL default '0',
  PRIMARY KEY  (`storeid`),
  KEY `orders` (`orders`,`tops`),
  KEY `nums` (`nums`)
) ENGINE=MyISAM AUTO_INCREMENT=114 DEFAULT CHARSET=gbk;

DROP TABLE IF EXISTS `dede_story_books`;

CREATE TABLE `dede_story_books` (
  `id` int(11) unsigned NOT NULL auto_increment,
  `catid` smallint(6) default '0',
  `bcatid` smallint(6) NOT NULL default '0',
  `ischeck` smallint(6) NOT NULL default '1',
  `booktype` smallint(6) NOT NULL default '0',
  `iscommend` smallint(6) NOT NULL default '0',
  `click` int(11) unsigned NOT NULL default '0',
  `freenum` smallint(6) NOT NULL default '0',
  `bookname` varchar(40) NOT NULL default '',
  `author` varchar(30) NOT NULL default '',
  `memberid` int(11) unsigned NOT NULL default '0',
  `adminid` int(11) NOT NULL default '0',
  `litpic` varchar(100) NOT NULL default '',
  `pubdate` int(11) NOT NULL default '0',
  `lastpost` int(11) NOT NULL default '0',
  `postnum` int(11) NOT NULL default '0',
  `lastfeedback` int(11) NOT NULL default '0',
  `feedbacknum` int(11) NOT NULL default '0',
  `weekcc` int(11) NOT NULL default '0',
  `monthcc` int(11) NOT NULL default '0',
  `weekup` int(11) NOT NULL default '0',
  `monthup` int(11) NOT NULL default '0',
  `description` varchar(250) NOT NULL default '',
  `body` mediumtext,
  `keywords` varchar(60) NOT NULL default '',
  `userip` varchar(20) NOT NULL default '',
  `senddate` int(11) NOT NULL default '0',
  PRIMARY KEY  (`id`),
  KEY `catid` (`catid`,`bcatid`,`ischeck`),
  KEY `click` (`click`,`weekcc`,`monthcc`,`weekup`,`monthup`),
  KEY `booktype` (`booktype`,`iscommend`,`freenum`,`bookname`,`memberid`,`litpic`,`pubdate`,`lastpost`,`postnum`,`senddate`,`adminid`,`author`)
) ENGINE=MyISAM DEFAULT CHARSET=gbk;

DROP TABLE IF EXISTS `dede_story_catalog`;

CREATE TABLE `dede_story_catalog` (
  `id` int(11) NOT NULL auto_increment,
  `classname` varchar(30) NOT NULL default '',
  `pid` int(11) NOT NULL default '0',
  `rank` smallint(6) NOT NULL default '0',
  `listrule` varchar(30) NOT NULL default '',
  `viewrule` varchar(30) NOT NULL default '',
  `booktype` smallint(6) NOT NULL default '0',
  `keywords` varchar(50) NOT NULL default '',
  `description` varchar(200) NOT NULL default '',
  PRIMARY KEY  (`id`),
  KEY `classname` (`classname`,`pid`,`rank`,`booktype`)
) ENGINE=MyISAM DEFAULT CHARSET=gbk;

DROP TABLE IF EXISTS `dede_story_chapter`;

CREATE TABLE `dede_story_chapter` (
  `id` int(11) NOT NULL auto_increment,
  `bookid` int(11) NOT NULL default '0',
  `catid` int(11) NOT NULL default '0',
  `chapnum` smallint(6) NOT NULL default '1',
  `postnum` smallint(6) NOT NULL default '0',
  `memberid` int(11) NOT NULL default '0',
  `chaptername` varchar(40) NOT NULL default '',
  `bookname` varchar(40) NOT NULL default '',
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=gbk;

DROP TABLE IF EXISTS `dede_story_content`;

CREATE TABLE `dede_story_content` (
  `id` int(11) NOT NULL auto_increment,
  `title` varchar(40) NOT NULL default '0',
  `bookname` varchar(40) NOT NULL default '',
  `chapterid` int(11) NOT NULL default '0',
  `bookid` int(11) NOT NULL default '0',
  `catid` smallint(6) NOT NULL default '0',
  `bcatid` smallint(6) NOT NULL default '0',
  `booktype` int(11) NOT NULL default '0',
  `memberid` int(11) NOT NULL default '0',
  `adminid` smallint(6) NOT NULL default '0',
  `addtime` int(11) NOT NULL default '0',
  `sortid` smallint(6) NOT NULL default '0',
  `sortbook` smallint(6) NOT NULL default '0',
  `ischeck` smallint(6) NOT NULL default '1',
  `bigpic` varchar(80) NOT NULL default '',
  `body` mediumtext NOT NULL,
  PRIMARY KEY  (`id`),
  KEY `title` (`sortbook`,`chapterid`,`bookid`,`catid`,`bcatid`,`memberid`,`adminid`,`addtime`,`ischeck`)
) ENGINE=MyISAM DEFAULT CHARSET=gbk;

DROP TABLE IF EXISTS `dede_story_viphistory`;

CREATE TABLE `dede_story_viphistory` (
  `cid` int(11) NOT NULL default '0',
  `mid` int(11) NOT NULL default '0'
) ENGINE=MyISAM DEFAULT CHARSET=gbk;

DROP TABLE IF EXISTS `dede_sysconfig`;

CREATE TABLE `dede_sysconfig` (
  `aid` int(11) NOT NULL default '0',
  `varname` varchar(20) NOT NULL default '',
  `info` varchar(100) NOT NULL default '',
  `value` varchar(250) NOT NULL default '',
  `type` varchar(10) NOT NULL default 'string',
  `group` int(11) NOT NULL default '1',
  PRIMARY KEY  (`varname`)
) ENGINE=MyISAM DEFAULT CHARSET=gbk;

DROP TABLE IF EXISTS `dede_syspassport`;

CREATE TABLE `dede_syspassport` (
  `varname` varchar(30) NOT NULL default '0',
  `value` varchar(100) NOT NULL default '0',
  PRIMARY KEY  (`varname`)
) ENGINE=MyISAM DEFAULT CHARSET=gbk;

DROP TABLE IF EXISTS `dede_tags_user`;

CREATE TABLE `dede_tags_user` (
  `aid` int(11) NOT NULL auto_increment,
  `mid` int(11) NOT NULL default '0',
  `tagname` varchar(50) NOT NULL default '',
  PRIMARY KEY  (`aid`)
) ENGINE=MyISAM DEFAULT CHARSET=gbk;

DROP TABLE IF EXISTS `dede_uploads`;

CREATE TABLE `dede_uploads` (
  `aid` int(11) NOT NULL auto_increment,
  `title` varchar(100) NOT NULL default '',
  `url` varchar(100) NOT NULL default '',
  `mediatype` smallint(6) NOT NULL default '1',
  `width` varchar(10) NOT NULL default '',
  `height` varchar(10) NOT NULL default '',
  `playtime` varchar(10) NOT NULL default '',
  `filesize` int(11) NOT NULL default '0',
  `uptime` int(11) NOT NULL default '0',
  `adminid` int(11) NOT NULL default '0',
  `memberid` int(11) NOT NULL default '0',
  PRIMARY KEY  (`aid`),
  KEY `memberid` (`memberid`,`filesize`)
) ENGINE=MyISAM AUTO_INCREMENT=2320 DEFAULT CHARSET=gbk;

DROP TABLE IF EXISTS `dede_vote`;

CREATE TABLE `dede_vote` (
  `aid` int(11) NOT NULL auto_increment,
  `votename` varchar(50) NOT NULL default '',
  `starttime` int(11) NOT NULL default '0',
  `endtime` int(11) NOT NULL default '0',
  `totalcount` int(11) NOT NULL default '0',
  `ismore` smallint(6) NOT NULL default '0',
  `votenote` text NOT NULL,
  PRIMARY KEY  (`aid`)
) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=gbk;

