10162 后台优化(等级分布、在线人数子服查询默认否;在线人数支持勾选查询单服历史;)
| | |
| | | } |
| | | unset($pack_data[$postServerName]); |
| | | |
| | | if ($serverInfo['MainServer'] && !$onlyServerID) { |
| | | if ($serverInfo['MainServer'] && !$onlyServerID && $serverInfo['MainServer'] != $serverInfo['ServerID']) { |
| | | # 有主服的代表是合服的,只发主服;因为子服是同一台服务器,没必要重复发送 |
| | | continue; |
| | | } |
| | |
| | | continue; |
| | | } |
| | | |
| | | if ($serverInfo['MainServer'] && !$onlyServerID) { |
| | | if ($serverInfo['MainServer'] && !$onlyServerID && $serverInfo['MainServer'] != $serverInfo['ServerID']) { |
| | | # 有主服的代表是合服的,只允许主服发送, 除非标明了只往某个服发送 |
| | | # 单服发送消息,如混(合)服情况下只给其中一个服务器玩家发邮件 |
| | | continue; |
| | |
| | | logging.info("queryOnlinePlayerInfo %s" % str(argvDict)) |
| | | startDate = argvDict.get("startDate", "") |
| | | endDate = argvDict.get("endDate", "") |
| | | onlyServerIDHis = argvDict.get("onlyServerIDHis", "") # 只查备档单服数据 |
| | | |
| | | # 查询中心备份的 |
| | | if CommFunc.isQueryCenterbak(argvDict): |
| | |
| | | return |
| | | |
| | | drInfo = {} |
| | | needQueryCenterbak = CommFunc.loopMainServerDR(cfg, startDate, endDate, argvDict, checkDrFileNeedParseFunc_OnlinePlayerInfo, |
| | | parseLineFunc_OnlinePlayerInfo, drInfo, drNameList=DRNameList) |
| | | if not onlyServerIDHis: |
| | | needQueryCenterbak = CommFunc.loopMainServerDR(cfg, startDate, endDate, argvDict, checkDrFileNeedParseFunc_OnlinePlayerInfo, |
| | | parseLineFunc_OnlinePlayerInfo, drInfo, drNameList=DRNameList) |
| | | else: |
| | | logging.info("onlyServerIDHis %s" % argvDict.get("OnlyServerID", "")) |
| | | needQueryCenterbak = True |
| | | logging.info("needQueryCenterbak=%s" % needQueryCenterbak) |
| | | if needQueryCenterbak: |
| | | bakDataInfo = CommFunc.queryBackupCenterDR(cfg, argvDict) |
| | |
| | | } |
| | | unset($pack_data[$postServerName]); |
| | | |
| | | if ($serverInfo['MainServer'] && !$onlyServerID) { |
| | | if ($serverInfo['MainServer'] && !$onlyServerID && $serverInfo['MainServer'] != $serverInfo['ServerID']) { |
| | | # 有主服的代表是合服的,只发主服;因为子服是同一台服务器,没必要重复发送 |
| | | continue; |
| | | } |
| | |
| | | // 默认当天 |
| | | $startDate = array_key_exists("startDate", $_POST) ? $_POST["startDate"] : date("Y-m-d"); |
| | | $endDate = array_key_exists("endDate", $_POST) ? $_POST["endDate"] : date("Y-m-d"); |
| | | $onlyServerIDHis = $_POST["onlyServerIDHis"]; |
| | | $OnlyServerID = null; |
| | | if ($onlyServerIDHis == "on") { |
| | | $OnlyServerID = 1; // 默认只查指定服 |
| | | } |
| | | |
| | | $OnlyServerID = 1; // 默认只查指定服 |
| | | // 设置默认数据,开界面默认查选中服 |
| | | $_POST["startDate"] = $startDate; |
| | | $_POST["endDate"] = $endDate; |
| | |
| | | ~ |
| | | <input type="text" name="endDate" id="endDate" onclick="new Calendar().show(this);" readonly value="<?php echo $endDate; ?>" size="8" /> |
| | | <input type="submit" value="<?php echo \Lang\gettext("查询本服"); ?>" onclick="onCurSubmit()" /> |
| | | <?php |
| | | echo " "; |
| | | echo '<input type="checkbox" name="onlyServerIDHis" id="onlyServerIDHis" ' . ($onlyServerIDHis == "on" ? "checked" : "") . ' onchange="onOnlyServerIDHisChange()" />' . \Lang\gettext("查询单服历史"); |
| | | ?> |
| | | <div id="OnlinePlayerInfo"></div> |
| | | <hr /> |
| | | <?php |
| | |
| | | } |
| | | } |
| | | |
| | | function onOnlyServerIDHisChange() { |
| | | if (document.getElementById("onlyServerIDHis").checked) { |
| | | document.getElementById("OnlyServerID").selectedIndex = 1; |
| | | } else { |
| | | document.getElementById("OnlyServerID").selectedIndex = 0; |
| | | } |
| | | } |
| | | |
| | | function drawChartLine(chartID, serverName, drData) { |
| | | |
| | | var backgroundColors = [ |
| | |
| | | |
| | | $serversArray = $user->GetServers(); |
| | | |
| | | $OnlyServerID = 1; // 默认只查指定服 |
| | | // 设置默认数据,开界面默认查选中服 |
| | | $_POST["eventType"] = "PlayerLVInfo"; |
| | | \CommFunc\QueryEventData($user, $retInfo); |
| | |
| | | <form id="online" action="playerlv.php" method="post"> |
| | | <input type="submit" value="<?php echo \Lang\gettext("查询本服"); ?>" onclick="onCurSubmit()" /> |
| | | <input type="button" value="<?php echo \Lang\gettext("复制数据"); ?>" onclick="onCopyData()" /> |
| | | 注:本数据仅为物理服数据,如果是合服则为合服数据,不包含合服后被删除的角色 |
| | | <div id="OnlinePlayerInfo"></div> |
| | | <hr /> |
| | | <?php |