|
|
|
@ -36,8 +36,8 @@ class PromoteController extends BaseController
|
|
|
|
|
public function index($p = 1)
|
|
|
|
|
{
|
|
|
|
|
$this->meta_title = "首页";
|
|
|
|
|
$this->display('prepare');
|
|
|
|
|
exit(0);
|
|
|
|
|
// $this->display('prepare');
|
|
|
|
|
// exit(0);
|
|
|
|
|
|
|
|
|
|
header("Content-type:text/html;charset=utf-8");
|
|
|
|
|
$user = D('Promote')->isLogin();
|
|
|
|
@ -56,6 +56,20 @@ class PromoteController extends BaseController
|
|
|
|
|
$game_list = M("game", "tab_")->field("id,game_name")->order("id desc")->select();
|
|
|
|
|
$gg_list = M("document", "sys_")->limit('0,5')->where("category_id=56 and status=1")->order("update_time desc")->select(); //游戏公告
|
|
|
|
|
$zx_list = M("document", "sys_")->limit('0,5')->where("category_id=51 and status=1")->order("update_time desc")->select(); //游戏咨询
|
|
|
|
|
|
|
|
|
|
$field = 'id,game_name,server_name,user_account,nickname,promote_account,detail,create_time as update_time';
|
|
|
|
|
$rz_list = M("protect_log","tab_")->field($field)->limit('0,5')->order("create_time desc")->select(); //日志管理
|
|
|
|
|
|
|
|
|
|
$promote_id = get_pid();
|
|
|
|
|
$logCount = M('protect_log','tab_')->count();
|
|
|
|
|
$readLogCount = M('protect_log_read','tab_')->where("promote_id = {$promote_id}")->count();
|
|
|
|
|
|
|
|
|
|
$gg_Count = M("document", "sys_")->where("category_id=56 and status=1")->count();
|
|
|
|
|
$gg_ReadDocument = M("document_read", "sys_")->where("promote_id = {$promote_id} and category_id=56")->count();
|
|
|
|
|
|
|
|
|
|
$zx_Count = M("document", "sys_")->where("category_id=51 and status=1")->count();
|
|
|
|
|
$zx_ReadDocument = M("document_read", "sys_")->where("promote_id = {$promote_id} and category_id=51")->count();
|
|
|
|
|
|
|
|
|
|
$xx_list = null;
|
|
|
|
|
|
|
|
|
|
$today_start = mktime(0, 0, 0, date('m'), date('d'), date('Y'));
|
|
|
|
@ -107,8 +121,12 @@ class PromoteController extends BaseController
|
|
|
|
|
|
|
|
|
|
$this->assign("menu_list", $quick_menu_list);
|
|
|
|
|
$this->assign("gg_list", $gg_list);
|
|
|
|
|
$this->assign("gg_count", $gg_Count-$gg_ReadDocument);
|
|
|
|
|
$this->assign("zx_list", $zx_list);
|
|
|
|
|
$this->assign("zx_count", $zx_Count-$zx_ReadDocument);
|
|
|
|
|
$this->assign("xx_list", $xx_list);
|
|
|
|
|
$this->assign('rz_list', $rz_list);
|
|
|
|
|
$this->assign("rz_count", $logCount-$readLogCount);
|
|
|
|
|
$this->assign("today_open_server_list", $today_open_server_list);
|
|
|
|
|
$this->assign("game_list", $game_list);
|
|
|
|
|
$this->meta_title = "首页";
|
|
|
|
@ -317,10 +335,29 @@ class PromoteController extends BaseController
|
|
|
|
|
} elseif ($type == 50) {
|
|
|
|
|
$data_list = null;
|
|
|
|
|
$count = 0;
|
|
|
|
|
} else if($type == 0) {
|
|
|
|
|
$field = 'id,game_name,server_name,user_account,nickname,promote_account,detail,create_time as update_time';
|
|
|
|
|
$data_list = M("protect_log","tab_")->field($field)->limit('0,5')->order("create_time desc")->select();
|
|
|
|
|
|
|
|
|
|
foreach($data_list as $key => $value) {
|
|
|
|
|
$data_list[$key]['title'] = '账号:'.$value['user_account'].','.$value['detail'];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$count = M("protect_log","tab_")->field($field)->count();
|
|
|
|
|
} else {
|
|
|
|
|
$data_list = M("document", "sys_")->limit('0,50')->where("category_id=56 and status=1")->order("update_time desc")->page($page, $row)->select(); //游戏公告
|
|
|
|
|
$count = M("document", "sys_")->where("category_id=56 and status=1")->count();
|
|
|
|
|
}
|
|
|
|
|
$promote_id = get_pid();
|
|
|
|
|
$logCount = M('protect_log','tab_')->count();
|
|
|
|
|
$readLogCount = M('protect_log_read','tab_')->where("promote_id = {$promote_id}")->count();
|
|
|
|
|
|
|
|
|
|
$gg_Count = M("document", "sys_")->where("category_id=56 and status=1")->count();
|
|
|
|
|
$gg_ReadDocument = M("document_read", "sys_")->where("promote_id = {$promote_id} and category_id=56")->count();
|
|
|
|
|
|
|
|
|
|
$zx_Count = M("document", "sys_")->where("category_id=51 and status=1")->count();
|
|
|
|
|
$zx_ReadDocument = M("document_read", "sys_")->where("promote_id = {$promote_id} and category_id=51")->count();
|
|
|
|
|
|
|
|
|
|
$parameter['p'] = I('get.p', 1);
|
|
|
|
|
$parameter['row'] = I('get.row');
|
|
|
|
|
$page = set_pagination($count, $row, $parameter);
|
|
|
|
@ -331,6 +368,9 @@ class PromoteController extends BaseController
|
|
|
|
|
$this->meta_title = "公告列表";
|
|
|
|
|
$this->assign("type", $type);
|
|
|
|
|
$this->assign("data_list", $data_list);
|
|
|
|
|
$this->assign("gg_count", $gg_Count-$gg_ReadDocument);
|
|
|
|
|
$this->assign("zx_count", $zx_Count-$zx_ReadDocument);
|
|
|
|
|
$this->assign("rz_count", $logCount-$readLogCount);
|
|
|
|
|
$this->display();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|