|
|
|
@ -5899,7 +5899,121 @@ class ExportController extends Controller
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$this->exportAddOperationLog('Server/lists','游戏-区服管理-区服列表-导出');
|
|
|
|
|
$this->exportExcel($xlsName, $xlsCell, $xlsData);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
/**
|
|
|
|
|
* 区服预告
|
|
|
|
|
* @author 鹿文学
|
|
|
|
|
*/
|
|
|
|
|
public function server_notice_list() {
|
|
|
|
|
|
|
|
|
|
$xlsName = $_REQUEST['xlsname'];
|
|
|
|
|
|
|
|
|
|
if(isset($_REQUEST['show_status'])){
|
|
|
|
|
$map['show_status']=$_REQUEST['show_status'];
|
|
|
|
|
}
|
|
|
|
|
if(isset($_REQUEST['server_version'])){
|
|
|
|
|
$map['server_version']=$_REQUEST['server_version'];
|
|
|
|
|
}
|
|
|
|
|
if(isset($_REQUEST['timestart']) && isset($_REQUEST['timeend'])){
|
|
|
|
|
$map['start_time'] = array('BETWEEN',array(strtotime($_REQUEST['timestart']),strtotime($_REQUEST['timeend'])+24*60*60-1));
|
|
|
|
|
}elseif(isset($_REQUEST['timestart'])){
|
|
|
|
|
$map['start_time']=array('EGT',strtotime($_REQUEST['timestart']));
|
|
|
|
|
}elseif(isset($_REQUEST['timeend'])){
|
|
|
|
|
$map['start_time']=array('ELT',strtotime($_REQUEST['timeend']));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if(isset($_REQUEST['game_name'])){
|
|
|
|
|
if($_REQUEST['game_name']=='全部'){
|
|
|
|
|
unset($_REQUEST['game_name']);
|
|
|
|
|
}else{
|
|
|
|
|
$map['server_version']=$_REQUEST['server_version'];
|
|
|
|
|
$map['game_name']=['like', "{$_REQUEST['game_name']}%"];
|
|
|
|
|
unset($_REQUEST['game_name']);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if(isset($_REQUEST['server_name'])){
|
|
|
|
|
$map['server_name']=$_REQUEST['server_name'];
|
|
|
|
|
unset($_REQUEST['server_name']);
|
|
|
|
|
}
|
|
|
|
|
$model = M('ServerNotice','tab_');
|
|
|
|
|
|
|
|
|
|
if($_REQUEST['type']==2) {
|
|
|
|
|
|
|
|
|
|
$xlsCell = array(
|
|
|
|
|
array('developer_account','开发者账号'),
|
|
|
|
|
array('game_name','游戏名称'),
|
|
|
|
|
array('server_name','区服名称'),
|
|
|
|
|
array('server_version','运营平台'),
|
|
|
|
|
array('show_status','显示状态'),
|
|
|
|
|
array('start_time','开服时间'),
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$map['developers'] = array('NEQ',0);
|
|
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
|
|
$xlsCell = array(
|
|
|
|
|
array('game_name','游戏名称'),
|
|
|
|
|
array('server_name','区服名称'),
|
|
|
|
|
array('server_version','运营平台'),
|
|
|
|
|
array('show_status','显示状态'),
|
|
|
|
|
array('start_time','开服时间'),
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
$map['developers'] = 0;
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$page = intval($_REQUEST['p']);
|
|
|
|
|
|
|
|
|
|
$page = $page?$page:1;
|
|
|
|
|
|
|
|
|
|
$row = $_REQUEST['row']?$_REQUEST['row']:10;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$data=$model
|
|
|
|
|
->where($map)
|
|
|
|
|
->order('id desc')
|
|
|
|
|
->select();
|
|
|
|
|
|
|
|
|
|
$xlsData = [];
|
|
|
|
|
|
|
|
|
|
if(is_array($data)){
|
|
|
|
|
if($_REQUEST['type']==2) {
|
|
|
|
|
foreach($data as $k => $v) {
|
|
|
|
|
$v['start_time'] = date('Y-m-d H:i:s',$v['start_time']);
|
|
|
|
|
|
|
|
|
|
$v['show_status'] = $v['show_status']==1?'已开启':'已关闭';
|
|
|
|
|
$v['developer_account'] = get_developer_account($v['developers']);
|
|
|
|
|
$v['server_version'] = get_systems_name($v['server_version']);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$xlsData[] = $v;
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
foreach($data as $k => $v) {
|
|
|
|
|
|
|
|
|
|
$v['start_time'] = date('Y-m-d H:i:s',$v['start_time']);
|
|
|
|
|
|
|
|
|
|
$v['show_status'] = $v['show_status']==1?'已开启':'已关闭';
|
|
|
|
|
$v['server_version'] = get_systems_name($v['server_version']);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$xlsData[] = $v;
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$this->exportAddOperationLog('Server/lists','游戏-区服管理-区服预告-导出');
|
|
|
|
|
$this->exportExcel($xlsName, $xlsCell, $xlsData);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|