<?php
if (  ! defined( 'MOD' )) die("access die");
purviewCheck( $channelid, 'channel' );
$action = trim( $_GET['action'] ) ? trim( $_GET['action'] ):'manage';
$channelid = intval($_GET['channelid']);
$channelselect = intval($_GET['channelselect']);
require_once(R_P . "/include/class.setting.php");
$setting = new setting($channelid, $channelselect);
$items = $setting->op_get();
switch ( $action )
{
	case 'manage':
		$data = $setting->op_manage();
 		include qbase::template($path .  'setting' );
	break;

	case 'cache':
		$setting->op_cache();
		qbase::purviewCheckDie( "更新缓存完毕" );
	break;


	case 'set':
		$setting->op_set();
		qbase::get_object('event', 'setting', array('channelid'=>$channelid));
		qbase::purviewCheckDie( "设置成功" );
	break;
}
?>
