| | |
| | | $PermissionModules = array( |
| | | array( |
| | | "ModuleID" => "ServerRep", |
| | | "Name" => \Lang\gettext("报表"), |
| | | "Name" => \Lang\gettext("全服报表"), |
| | | "PList" => array( |
| | | Permission::P_REP_AllView => array("Name" => \Lang\gettext("全服总览")), |
| | | Permission::P_REP_DailyUser => array("Name" => \Lang\gettext("全服每日用户")), |
| | | Permission::P_REP_KeepLogin => array("Name" => \Lang\gettext("全服留存")), |
| | | Permission::P_REP_LTV => array("Name" => \Lang\gettext("全服LTV")), |
| | | Permission::P_REP_FirstLoginFirstPayCnt => array("Name" => \Lang\gettext("首登首充人数")), |
| | | Permission::P_REP_XPayPaycnt => array("Name" => \Lang\gettext("购买X礼包再付人数")), |
| | | ) |
| | | ), |
| | | array( |
| | |
| | | Permission::P_PlayerLV => array("Name" => \Lang\gettext("等级分布")), |
| | | Permission::P_Chatmonitor => array("Name" => \Lang\gettext("聊天监控")), |
| | | Permission::P_BugReport => array("Name" => \Lang\gettext("Bug反馈")), |
| | | Permission::P_Serverview => array("Name" => \Lang\gettext("本服总览")), |
| | | Permission::P_PayOverview => array("Name" => \Lang\gettext("充值总览")), |
| | | Permission::P_PayOrder => array("Name" => \Lang\gettext("充值订单")), |
| | | Permission::P_PayRank => array("Name" => \Lang\gettext("充值排行")), |
| | |
| | | "Name" => \Lang\gettext("运维管理"), |
| | | "PList" => array( |
| | | Permission::P_OPSPackBranch => array("Name" => \Lang\gettext("打包分支管理")), |
| | | Permission::P_OPSVersionState => array("Name" => \Lang\gettext("版本状态管理")), |
| | | Permission::P_OPSGameVersion => array("Name" => \Lang\gettext("内容版本管理")), |
| | | Permission::P_OPSServerList => array("Name" => \Lang\gettext("服务器列表")), |
| | | Permission::P_OPSServerStateMgr => array("Name" => \Lang\gettext("服务器状态管理"), "Log" => array("1")), |
| | |
| | | const GroupAdmin = "admin"; |
| | | const P_System = "P_System"; |
| | | |
| | | //报表 |
| | | //全服报表 |
| | | const P_REP_AllView = "P_REP_AllView"; |
| | | const P_REP_DailyUser = "P_REP_DailyUser"; |
| | | const P_REP_KeepLogin = "P_REP_KeepLogin"; |
| | | const P_REP_LTV = "P_REP_LTV"; |
| | | const P_REP_FirstLoginFirstPayCnt = "P_REP_FirstLoginFirstPayCnt"; |
| | | const P_REP_XPayPaycnt = "P_REP_XPayPaycnt"; |
| | | |
| | | //服务器 |
| | | const P_Online = "P_Online"; |
| | | const P_PlayerLV = "P_PlayerLV"; |
| | | const P_Chatmonitor = "P_Chatmonitor"; |
| | | const P_BugReport = "P_BugReport"; |
| | | const P_Serverview = "P_Serverview"; |
| | | const P_PayOverview = "P_PayOverview"; |
| | | const P_PayOrder = "P_PayOrder"; |
| | | const P_PayRank = "P_PayRank"; |
| | |
| | | |
| | | //运维权限 |
| | | const P_OPSPackBranch = "P_OPSPackBranch"; |
| | | const P_OPSVersionState = "P_OPSVersionState"; |
| | | const P_OPSGameVersion = "P_OPSGameVersion"; |
| | | const P_OPSServerList = "P_OPSServerList"; |
| | | const P_OPSServerStateMgr = "P_OPSServerStateMgr"; |
| | |
| | | } |
| | | |
| | | //根据指定的spid获取对应服务器列表配置 |
| | | public function GetServersCfg($spid) |
| | | public function GetServersCfg($spid, $checkSpecial = true) |
| | | { |
| | | $ConfigFile = dirname(__FILE__) . "\Server\Server_" . $spid . ".ini"; |
| | | if (file_exists($ConfigFile)) { |
| | | $serversCfg = parse_ini_file($ConfigFile, true); |
| | | |
| | | if (!$checkSpecial) { |
| | | return $serversCfg; |
| | | } |
| | | $UserAccount = $this->userData["UserAccount"]; |
| | | \CommFunc\GetConfig("ServerInfo", "SpecialServerIDStart", $SpecialServerIDStart); |
| | | \CommFunc\GetConfig("ServerInfo", "SpecialAccountList", $SpecialAccountList); |
| | |
| | | return $this->serversArray; |
| | | } |
| | | $spid = $this->GetSPID(); |
| | | $serversCfg = $this->GetServersCfg($spid); |
| | | $serversCfg = $this->GetServersCfg($spid, false); |
| | | if (!count($serversCfg)) { |
| | | return $serversCfg; |
| | | } |
| | | $this->serversArray = $serversCfg; |
| | | |
| | | $UserAccount = $this->userData["UserAccount"]; |
| | | \CommFunc\GetConfig("ServerInfo", "SpecialServerIDStart", $SpecialServerIDStart); |
| | | \CommFunc\GetConfig("ServerInfo", "SpecialAccountList", $SpecialAccountList); |
| | | $SpecialAccountList = explode(",", $SpecialAccountList); |
| | | $SpecialServerIDStart = intval($SpecialServerIDStart); |
| | | $isSpecialUser = in_array($UserAccount, $SpecialAccountList); |
| | | $specialServerID = 270; // 270服特殊处理,被合到270以前的服了 |
| | | $specialMainServerID = 0; // 特殊服所属主服 |
| | | if ($isSpecialUser) { |
| | | foreach ($serversCfg as $info) { |
| | | $ServerID = intval($info["ServerID"]); |
| | | if ($ServerID == $specialServerID && $info["MainServer"]) { |
| | | $specialMainServerID = intval($info["MainServer"]); |
| | | break; |
| | | } |
| | | } |
| | | } |
| | | |
| | | # 统计合服列表 |
| | | $mixServerArray = array(); |
| | |
| | | $mixServerArray[$mainServerID] = array("MixServerIDList" => array(), "MixServerStr" => ""); |
| | | } |
| | | array_push($mixServerArray[$mainServerID]["MixServerIDList"], intval($serverInfo["ServerID"])); |
| | | } |
| | | |
| | | if ($isSpecialUser) { |
| | | if ($specialMainServerID) { |
| | | // 特殊服只显示这两个服 |
| | | $mixServerArray[$specialMainServerID] = array("MixServerIDList" => array($specialMainServerID, $specialServerID), "MixServerStr" => ""); |
| | | } |
| | | } |
| | | |
| | | # 翻译合服字符串信息 |
| | |
| | | $this->serversArray[$serverName]["MixServerIDList"] = $mixServerInfo["MixServerIDList"]; |
| | | $this->serversArray[$serverName]["MixServerStr"] = $mixServerInfo["MixServerStr"]; |
| | | } |
| | | |
| | | // 特殊账号,只能看指定服及以上 |
| | | if ($isSpecialUser) { |
| | | foreach ($this->serversArray as $key => $info) { |
| | | $serverID = intval($info["ServerID"]); |
| | | if ($serverID < $SpecialServerIDStart && $serverID != $specialMainServerID) { |
| | | unset($this->serversArray[$key]); |
| | | } |
| | | } |
| | | } |
| | | return $this->serversArray; |
| | | } |
| | | |