|
|
|
@ -10,7 +10,12 @@ use Admin\Event\BatchImportExcelEvent;
|
|
|
|
|
class ServerController extends ThinkController {
|
|
|
|
|
const model_name = 'Server';
|
|
|
|
|
|
|
|
|
|
public function lists(){
|
|
|
|
|
public function lists($p=0){
|
|
|
|
|
$page = intval($p);
|
|
|
|
|
$page = $page ? $page : 1; //默认显示第一页数据
|
|
|
|
|
$arraypage = $page; //默认显示第一页数据
|
|
|
|
|
if(isset($_REQUEST['row'])) {$row = $_REQUEST['row'];}else{$row = 10;}
|
|
|
|
|
|
|
|
|
|
if(isset($_REQUEST['show_status'])){
|
|
|
|
|
$extend['show_status']=$_REQUEST['show_status'];
|
|
|
|
|
unset($_REQUEST['show_status']);
|
|
|
|
@ -53,8 +58,16 @@ class ServerController extends ThinkController {
|
|
|
|
|
$this->m_title = '区服列表';
|
|
|
|
|
$this->assign('commonset',M('Kuaijieicon')->where(['url'=>'Server/lists','status'=>1])->find());
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
parent::order_lists(self::model_name,$_GET["p"],$extend);
|
|
|
|
|
$data = M("Server","tab_")->field("id,game_name,server_name,server_id,show_status,start_time,server_version,developers")->where($extend)->page($page,$row)->select();
|
|
|
|
|
foreach($data as $k=>&$v){
|
|
|
|
|
$v["start_time"] = set_show_time($v["start_time"]);
|
|
|
|
|
$v["server_version"] = get_systems_name($v["server_version"]);
|
|
|
|
|
}
|
|
|
|
|
$count = M("Server","tab_")->where($extend)->count("id");
|
|
|
|
|
$this->assign('list_data', $data);
|
|
|
|
|
$page = set_pagination($count,$row);
|
|
|
|
|
if($page) {$this->assign('_page', $page);}
|
|
|
|
|
$this->display();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function add(){
|
|
|
|
|