<?php
if (!defined('MOD')) die("access die");
$id = intval($_GET['id']);
if($_POST['myFormAc'] == 'update'){
	$cms->formatUrl($id);
	echo qbase::xmlPrint("success");
}else{
	$_output = $cms->get_item($id);
	if($_output['type'] == 0){
		$data = qdb::fetchAll("select * from ".TABLEPRE."{$mod}s_{$channelid} where id = '{$id}' order by ordering asc ");
	}else{
		$downInfo = qdb::QueryFirst("select * from ".TABLEPRE."{$mod}s_{$channelid} where id='$id' limit 1");
		$nowServer = array();
		$nowServer = @explode(',', $downInfo['serverid']);
	}
	$serverlists = qdb::fetchAll("select name,id from `".TABLEPRE."downserver` where `channelid` IN(".$channelid.",0) and `is_lock`=0");
	include qbase::template($path . $mod . '/extra');
}
?>