<?php
if(!defined( 'R_P')) die("access die");
$id = intval($_GET['id']);
$_output = $cms->get_item($id);
if(empty($_output)) qbase::showmsg("没有找到相关数据");
if ($admin_info[groupid] > 3 && !in_array($_output[cid], $manage_category[$channelid])) {
	qbase::purviewCheckDie();
} 
$_output = array_merge($_output, $cms->getExtendData($channelid, $id));
$_output['subject'] = htmlspecialchars($_output['subject']);
$_output['filter'] = explode(",", $_output['filter']);
$extends = $cms->getExtend($channelselect);
$keywords_array = getTag($channelid, $id);

$ppcid = $_output[cid];
$strall = str_replace("value=\"{$ppcid}-", " selected value=\"{$ppcid}-", $menuTree);

if($channel[$channelid]['show_related']){
	$related_arr = $cms ->get_related($channelid.'-'.$id);
	foreach($related_arr as &$val){
		foreach($val['data'] as &$v){
			$v['channelname'] = $channel[$v['channelid']]['channelname'];
		}
	}
	unset($val, $v);
	$related_json = qbase::jsonencode($related_arr);
}else{
	$related_json = "";
}

$player_result = qdb::fetchAll("select * from `".TABLEPRE."movies_{$channelid}`   where id='{$id}' order by ordering asc");
$players = array();
$number = 0;
foreach ($player_result as $item) {
	$number++;
	$players[] = $item;
} 
include qbase::template($path . 'movie/add');
?>