<?php
if(!defined('MOD'))  die("access die");
$sid = intval($_GET['sid']);
$_output = qdb::queryFirst("select * from ".TABLEPRE."special where sid = '{$sid}' ");
if(empty($_output)) qbase::showmsg("request error");
if($_POST['myFormAc'] == 'update'){
	$qmecms = qbase::get_object('qmecms');
	$qmecms->related($sid, 's', 'modify');
	qbase::showmsg("专题内容更改成功","default","system.php?sys=special&action=manage&channelid={$channelid}");
}else{
	$_output['id'] = $_output['sid'];
	$_output['channelid'] = 0;
	$qmecms = qbase::get_object('qmecms');
	$related_arr = $qmecms ->get_related('s-'.$_output['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);
}
?>
