HavePermission($Permission)) { exit; } if ( !\CfgReader\ReadConfig() || !\CfgReader\GetConfigData("report_server", "game_id", $gameIDInfo) || !\CfgReader\GetConfigData("report_server", "jsonbranch", $jsonbranch) ) { echo "没有推送SP相关配置"; exit; } \Logging\LogInfo("gameIDInfo" . $gameIDInfo); $gameIDInfo = json_decode($gameIDInfo, true); if (!isset($gameIDInfo) || !array_key_exists($channel, $gameIDInfo) || !$jsonbranch) { echo "不需要推送SP"; exit; } $game_id = $gameIDInfo[$channel]; $jsonbranch = intval($jsonbranch); $isSearch = false; $find = array( "Channel" => $channel, "Statue" => array('$in' => array(\ServerOPS\ServerStatue::Open, \ServerOPS\ServerStatue::InternalOpen)), "JsonBranch" => $jsonbranch ); $limit = 50; // 单页条数 $page = 1; if (array_key_exists("topage", $_POST) && intval($_POST["topage"]) > 1) { $page = intval($_POST["topage"]); } else if (array_key_exists("page", $_POST) && intval($_POST["page"]) > 1) { $page = intval($_POST["page"]); } $skip = ($page - 1) * $limit; \DBOper\Find("GameServers", $find, $serverList, null, array("JsonBranch" => 1, "ServerID" => -1), $limit, $skip); $totalCount = count($serverList); if ($totalCount >= $limit || $page > 1) { $totalCount = \DBOper\Count("GameServers", $find); } //显示表格字段配置 key-参数名,value-说明 $tableArray = array( "ServerID" => array("区服", "5%", "center"), "ServerName" => array("名称", "10%", "center"), "StartDate" => array("开服时间", "11%", "center"), "ClearState" => array("清档状态", "5%", "center"), "Statue" => array("开放状态", "5%", "center"), "RunningStatus" => array("运行状态", "5%", "center"), "Recommend" => array("推荐", "3%", "center"), "ReportSPTime" => array("推送时间", "11%", "center"), "" => array("操作", "5%"), ); ?>
服务器推送SP