<?php
if(!defined( 'R_P')) die("access die");
if(empty($menus)) qbase::showmsg("当前频道还没有建立栏目", 'default', "system.php?sys=acategory&channelid={$channelid}&action=add");
$addtype  = intval($_GET['addtype']);
if( $addtype == 1){
	$serverlist = qdb::fetchAll("select name,id from `".TABLEPRE."downserver` where `channelid` IN(".$channelid.",0) and `is_lock`=0");
	if( !is_array( $serverlist)) qbase::purviewCheckDie("选择镜像模式添加{$channeltitle}，必须添加镜像服务器");
}
$extends = $cms->getExtend($channelselect);
$cid = intval($_GET['cid']);
if($cid > 0) $strall = str_replace("value=\"{$cid}-"," selected value=\"{$cid}-", $strall);
include qbase::template($path . 'download/add');
?>
