<?php
if (!defined('R_P')) die("access die");
$sql['add'][] = "
	CREATE TABLE IF NOT EXISTS `".TABLEPRE."movie__channelid__` (
		  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
		  `cid` int(10) unsigned NOT NULL DEFAULT '0',
		  `channelid` int(10) unsigned NOT NULL DEFAULT '0',
		  `subject_pre` varchar(6) NOT NULL DEFAULT '',
		  `subject` varchar(100) NOT NULL DEFAULT '',
		  `subject_ot` varchar(128) NOT NULL,
		  `play_year` char(10) NOT NULL,
		  `play_area` varchar(20) NOT NULL,
		  `description` text NOT NULL,
		  `play_word` varchar(64) NOT NULL,
		  `play_leader` varchar(128) NOT NULL,
		  `play_actor` varchar(128) NOT NULL,
		  `play_status` tinyint(1) unsigned NOT NULL DEFAULT '0' ,
		  `keyword` varchar(64) NOT NULL,
		  `subject_color` char(7) NOT NULL DEFAULT '''''',
		  `dateline` int(10) unsigned NOT NULL DEFAULT '0',
		  `dview` mediumint(6) unsigned NOT NULL DEFAULT '0',
		  `wview` mediumint(6) unsigned NOT NULL DEFAULT '0',
		  `mview` 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',
		  `is_comend` tinyint(1) NOT NULL DEFAULT '0',
		  `stars` tinyint(1) unsigned NOT NULL DEFAULT '0',
		  `thumb` varchar(255) DEFAULT NULL,
		  `editor` varchar(30) NOT NULL DEFAULT '''''',
		  `edit_time` int(10) NOT NULL DEFAULT '0',
		  `uid` int(10) NOT NULL,
		  `username` varchar(20) NOT NULL,
		  `postip` int(11) NOT NULL DEFAULT '0',
		  `nocoment` tinyint(1) NOT NULL DEFAULT '0',
		  `pay` tinyint(1) unsigned NOT NULL DEFAULT '0',
		  `showphp` varchar(30) DEFAULT NULL,
		  `ver` mediumint(8) unsigned NOT NULL,
		  `ordering` int(10) unsigned NOT NULL,
		  `filename` varchar(64) NOT NULL,
		  `extdata` text NOT NULL,
		  PRIMARY KEY (`id`),
		  KEY `views` (`views`),
		  KEY `cid` (`cid`),
		  KEY `is_comend` (`is_comend`)
	) ENGINE=MyISAM ;
";
$sql['add'][] = "
	CREATE TABLE IF NOT EXISTS `".TABLEPRE."movies__channelid__` (
		`pid` int(10) unsigned NOT NULL AUTO_INCREMENT,
		`id` int(10) unsigned NOT NULL DEFAULT '0',
		`pname` varchar(64) NOT NULL,
		`url` varchar(250) NOT NULL,
		`type` varchar(20) DEFAULT NULL,
		`ordering` int(10) unsigned NOT NULL DEFAULT '0',
		PRIMARY KEY (`pid`),
		UNIQUE KEY `id` (`id`,`url`,`type`)
	) ENGINE=MyISAM;
";
$sql['drop'][] = " DROP TABLE `".TABLEPRE."movie__channelid__` ";
$sql['drop'][] = " DROP TABLE `".TABLEPRE."movies__channelid__` ";
?>