<?php
class server{
	function cache(){
		$server_result = $this->get();
		$server_config = array();
		foreach($server_result as $server) {
			$server_config[$server['id']] = array('server_channelid'=>$server['channelid'] ,'server_name'=>$server['name'], 'server_serverpath'=>$server['serverpath'] ,'server_islock'=>$server['is_lock'] );
		} 
		cache::set('sys_server', $server_config, 86400 * 365);
		return $server_config;
	}

	function get(){
		return qdb::fetchAll("select * from ".TABLEPRE."downserver");
	}
}
?>