<?php
if (!defined('IN_DISCUZ') || !defined('IN_ADMINCP')) {
	exit('Access Denied');
}

$sql1 = <<<EOF

CREATE TABLE IF NOT EXISTS `pre_zhiwu55cn_news` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `title` varchar(500) DEFAULT NULL,
  `forum_portal` varchar(50) DEFAULT NULL,
  `fid` int(11) DEFAULT NULL,
  `threadtypeid` int(11) DEFAULT NULL,
  `portal_catid` int(11) DEFAULT NULL,
  `first_uid` varchar(500) DEFAULT NULL,
  `reply_uid` varchar(500) DEFAULT NULL,
  `display_link` int(11) DEFAULT NULL,
  `replaynum` int(11) DEFAULT '0',
  `intval_time` int(11) DEFAULT NULL,
  `image_center` int(11) DEFAULT NULL,
  `filter_image` int(11) DEFAULT NULL,
  `hzw_remotefile` int(11) DEFAULT NULL,
  `pseudo_original` int(11) DEFAULT NULL,
  `chinese_encoding` int(11) DEFAULT NULL,
  `views` int(11) DEFAULT NULL,
  `source_link` varchar(500) DEFAULT NULL,
  `del` int(11) DEFAULT '0',  
  `group_fid` int(11) DEFAULT NULL,
  `tid_aid` int(11) DEFAULT '0',
  `send_datetime` int(11) DEFAULT '0',
  `release_now` varchar(50) DEFAULT NULL,
  `push_date` int(11) DEFAULT '0',
  `catch_way` varchar(255) DEFAULT NULL,
  `browse_url` varchar(500) DEFAULT NULL,
  PRIMARY KEY (`ID`),
  UNIQUE KEY `source_link` (`source_link`(250))
) ENGINE=MyISAM;

EOF;

runquery($sql1);

$sql2 = <<<EOF

CREATE TABLE IF NOT EXISTS `pre_zhiwu55cn_reguser` (

  `uid` int(11) NOT NULL DEFAULT '0',
  `username` varchar(200) DEFAULT NULL,
  `username_pwd` varchar(50) DEFAULT NULL,
  `username_mail` varchar(200) DEFAULT NULL,
  PRIMARY KEY (`uid`)

) ENGINE=MyISAM;

EOF;

runquery($sql2);

$sql3 = <<<EOF

CREATE TABLE IF NOT EXISTS `pre_zhiwu55cn_weiyanchang` (

  `ID` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `word1` varchar(255) DEFAULT NULL,
  `word2` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`ID`),
  UNIQUE KEY `word1` (`word1`)

) ENGINE=MyISAM;

EOF;

runquery($sql3);

$sql4 = <<<EOF
CREATE TABLE IF NOT EXISTS `pre_zhiwu55cn_update` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `title` varchar(500) DEFAULT NULL,
  `send_datetime` int(11) DEFAULT NULL,
  `source_link` varchar(500) DEFAULT NULL,
  `preview_url` varchar(500) DEFAULT NULL,
  `push_date` int(11) DEFAULT NULL,
  `is_hot` int(11) DEFAULT NULL,  
  PRIMARY KEY (`ID`),
  UNIQUE KEY `source_link` (`source_link`(250))
) ENGINE=MyISAM;
EOF;
runquery($sql4);

$sql5 = <<<EOF
CREATE TABLE IF NOT EXISTS `pre_zhiwu55cn_cron` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `keyword` varchar(500) DEFAULT NULL,
  `forum_portal` varchar(50) DEFAULT NULL,
  `fid` int(11) DEFAULT NULL,
  `threadtypeid` int(11) DEFAULT NULL,
  `portal_catid` int(11) DEFAULT NULL,
  `first_uid` varchar(500) DEFAULT NULL,
  `reply_uid` varchar(500) DEFAULT NULL,
  `display_link` int(11) DEFAULT NULL,
  `replaynum` int(11) DEFAULT '0',
  `intval_time` int(11) DEFAULT NULL,
  `image_center` int(11) DEFAULT NULL,
  `hzw_remotefile` int(11) DEFAULT NULL,
  `filter_image` int(11) DEFAULT NULL,
  `pseudo_original` int(11) DEFAULT NULL,
  `chinese_encoding` int(11) DEFAULT NULL,
  `min_views` int(11) DEFAULT NULL,
  `max_views` int(11) DEFAULT NULL,
  `source_link` varchar(500) DEFAULT NULL,
  `group_fid` int(11) DEFAULT NULL,
  `tid_aid` int(11) DEFAULT '0',
  `sendtime` int(11) DEFAULT '0',
  `release_now` varchar(50) DEFAULT NULL,
  `catchnum` int(11) DEFAULT '0',
  `catchtime` int(11) DEFAULT '0',
  PRIMARY KEY (`ID`)
) ENGINE=MyISAM;
EOF;
runquery($sql5);

$finish = TRUE;