<?php
if (!defined('R_P')) die("access die");
$sql['add'][] = "
CREATE TABLE IF NOT EXISTS `".TABLEPRE."pic__channelid__` (
	  `id` int(11) NOT NULL AUTO_INCREMENT,
	  `cid` int(11) NOT NULL DEFAULT '0',
	  `channelid` int(11) NOT NULL DEFAULT '0',
	  `subject_pre` varchar(6) NOT NULL,
	  `subject` varchar(100) NOT NULL DEFAULT '',
	  `thumb` varchar(255) NOT NULL DEFAULT '',
	  `subject_color` varchar(7) NOT NULL DEFAULT '',
	  `author` varchar(30) NOT NULL DEFAULT '',
	  `source` varchar(100) NOT NULL DEFAULT '',
	  `description` mediumtext NOT NULL,
	  `is_comend` tinyint(1) NOT NULL DEFAULT '0',
	  `nocoment` tinyint(1) NOT NULL DEFAULT '0',
	  `editor` varchar(30) NOT NULL DEFAULT '',
	  `edit_time` int(10) unsigned NOT NULL DEFAULT '0',
	  `keyword` varchar(64) NOT NULL,
	  `uid` int(10) unsigned NOT NULL DEFAULT '0',
	  `username` varchar(20) NOT NULL,
	  `dateline` int(10) NOT NULL DEFAULT '0',
	  `dview` mediumint(6) unsigned NOT NULL DEFAULT '0',
	  `mview` mediumint(6) unsigned NOT NULL DEFAULT '0',
	  `wview` mediumint(6) unsigned NOT NULL DEFAULT '0',
	  `views` mediumint(6) unsigned NOT NULL DEFAULT '0',
	  `viewtime` int(10) unsigned NOT NULL DEFAULT '0',
	  `filter` set('0','1','2','3','4','5','6','7','8','9','10','11','12','13','14','15','16','17','18','19','20','21','22','23','24','25','26','27','28','29','30','31','32') NOT NULL DEFAULT '0',
	  `filename` varchar(64) NOT NULL,
	  `showphp` varchar(30) NOT NULL DEFAULT '',
	  `showtype` tinyint(1) unsigned NOT NULL,
	  `ver` mediumint(8) unsigned NOT NULL,
	  `ordering` int(10) unsigned NOT NULL,
	  `pay` tinyint(1) unsigned NOT NULL DEFAULT '0',
	  `stars` tinyint(1) NOT NULL DEFAULT '3',
	  `postip` int(11) NOT NULL DEFAULT '0',
	  `page` smallint(3) unsigned NOT NULL DEFAULT '1',
	  `extdata` text NOT NULL,
	  PRIMARY KEY (`id`),
	  KEY `views` (`views`),
	  KEY `cid` (`cid`)
) ENGINE=MyISAM;
";

$sql['add'][] = "
	CREATE TABLE IF NOT EXISTS `".TABLEPRE."pics__channelid__` (
	  `pid` int(10) unsigned NOT NULL AUTO_INCREMENT,
	  `id` int(10) unsigned NOT NULL,
	  `ordering` int(10) unsigned NOT NULL,
	  `url` varchar(120) NOT NULL,
	  `ext` varchar(5) NOT NULL,
	  `is_thumb` tinyint(1) NOT NULL,
	  PRIMARY KEY (`pid`),
	  KEY `id` (`id`)
	) ENGINE=MyISAM ;
";

$sql['drop'][] = " DROP TABLE `".TABLEPRE."pic__channelid__` ";
$sql['drop'][] = " DROP TABLE `".TABLEPRE."pics__channelid__` ";
?>