10367 【越南】【英语】【BT】【砍树】仙盟攻城战-服务端(查询区服仙盟;跨服仙盟攻城战相关榜单;)
| | |
| | | Permission::P_GetPlayerForbid => array("Name" => \Lang\gettext("查询玩家封禁状态"), "GMTKey1" => array("GMT_GetPlayerForbid")), |
| | | Permission::P_GetForbidInfo => array("Name" => \Lang\gettext("查询全服封禁名单"), "GMTKey1" => array("GMT_GetForbidInfo")), |
| | | Permission::P_GetPlayerInfo => array("Name" => \Lang\gettext("查询玩家"), "GMTKey1" => array("GMT_GetPlayerInfo", "GMT_PlayerItemInfo")), |
| | | Permission::P_GetFamilyByServerID => array("Name" => \Lang\gettext("查询区服仙盟"), "GMTKey1" => array("GMT_GetFamilyByServerID")), |
| | | Permission::P_GetFamilyInfo => array("Name" => \Lang\gettext("查询仙盟"), "GMTKey1" => array("GMT_GetFamilyInfo")), |
| | | Permission::P_FamilyTransfer => array("Name" => \Lang\gettext("转让仙盟"), "GMTKey1" => array("GMT_FamilyTransfer"), "Log" => array("GMT_FamilyTransfer")), |
| | | Permission::P_FamilyDismiss => array("Name" => \Lang\gettext("解散仙盟"), "GMTKey1" => array("GMT_FamilyDismiss"), "Log" => array("GMT_FamilyDismiss")), |
| | |
| | | const P_GetForbidInfo = "P_GetForbidInfo"; |
| | | const P_GetPlayerInfo = "P_GetPlayerInfo"; |
| | | const P_GetFamilyInfo = "P_GetFamilyInfo"; |
| | | const P_GetFamilyByServerID = "P_GetFamilyByServerID"; |
| | | const P_FamilyTransfer = "P_FamilyTransfer"; |
| | | const P_FamilyDismiss = "P_FamilyDismiss"; |
| | | const P_QueryBillboard = "P_QueryBillboard"; |
| | |
| | | } |
| | | // \Logging\LogInfo("find:" . json_encode($find)); |
| | | } |
| | | |
| | | // 组合服务器ID列表,搭配 common.js AddServerIDCondition 使用 |
| | | function MatchServerIDList(&$serverIDCondArray, &$serverIDList) |
| | | { |
| | | if (!isset($serverIDCondArray)) { |
| | | $serverIDCondArray = array(); |
| | | } |
| | | if (!isset($serverIDList)) { |
| | | $serverIDList = array(); |
| | | } |
| | | $serverIDCondNumMax = 20; |
| | | for ($i = 1; $i < $serverIDCondNumMax + 1; $i++) { |
| | | if (!array_key_exists("ServerIDGTE" . $i, $_POST)) { |
| | | continue; |
| | | } |
| | | $eValue = intval($_POST["ServerIDE" . $i]); |
| | | $gteValue = intval($_POST["ServerIDGTE" . $i]); |
| | | $lteValue = intval($_POST["ServerIDLTE" . $i]); |
| | | // \Logging\LogInfo("serverIDCond." . $i . " : eValue:" . $eValue . " gteValue:" . $gteValue . " lteValue:" . $lteValue); |
| | | if ($eValue <= 0 && $gteValue <= 0 && $lteValue <= 0) { |
| | | continue; |
| | | } |
| | | if ($gteValue > 0 && $lteValue > 0 && $gteValue > $lteValue) { |
| | | continue; |
| | | } |
| | | if ($eValue > 0) { |
| | | array_push($serverIDList, array($eValue, $eValue)); |
| | | } |
| | | if ($gteValue > 0 && $lteValue > 0) { |
| | | array_push($serverIDList, array($gteValue, $lteValue)); |
| | | } else if ($gteValue > 0) { |
| | | array_push($serverIDList, array($gteValue, 10000)); |
| | | } else if ($lteValue > 0) { |
| | | array_push($serverIDList, array(1, $lteValue)); |
| | | } |
| | | array_push($serverIDCondArray, array($eValue, $gteValue, $lteValue)); |
| | | } |
| | | } |
| | |
| | | } |
| | | return $msg; |
| | | } |
| | | |
| | | function ParseResult($ret, &$retMsg) |
| | | { |
| | | if (!isset($ret)) { |
| | | return "错误 => 返回空"; |
| | | } |
| | | if (array_key_exists("ResultType", $ret)) { |
| | | if ($ret["ResultType"] != 0) { |
| | | return "ResultType错误 => " . GetResultTypeMsg($ret["ResultType"]) . " (" . $ret["ResultType"] . ")"; |
| | | } |
| | | $retMsg = $ret["ResultMsg"]; |
| | | return ""; |
| | | } else if (array_key_exists("ErrorNo", $ret)) { |
| | | return "ErrorNo错误 => " . GetErrorNoMsg($ret["ErrorNo"]) . " (" . $ret["ErrorNo"] . ")"; |
| | | } |
| | | return "未知错误"; |
| | | } |
| | |
| | | } |
| | | return ($a[1] < $b[1]) ? -1 : 1; |
| | | } |
| | | usort($groupList, 'cmp'); |
| | | if ($groupList) { |
| | | usort($groupList, 'cmp'); |
| | | } |
| | | ?> |
| | | |
| | | <br /> |
| | |
| | | '164' => array('BBName' => \Lang\gettext('跨服骑宠养成'), 'CmpValue' => \Lang\gettext('积分')), |
| | | '165' => array('BBName' => \Lang\gettext('跨服竞技场'), 'CmpValue' => \Lang\gettext('积分'), 'Value2' => \Lang\gettext('段位')), |
| | | '166' => array('BBName' => \Lang\gettext('跨服炼器大会'), 'CmpValue' => \Lang\gettext('积分'), 'CmpValue2' => \Lang\gettext('最高等级')), |
| | | '167' => array('BBName' => \Lang\gettext('仙盟攻城战仙盟积分'), 'CmpValue' => \Lang\gettext('积分')), |
| | | '168' => array('BBName' => \Lang\gettext('仙盟攻城战玩家伤害'), 'CmpValue' => \Lang\gettext('伤害亿部分'), 'CmpValue2' => \Lang\gettext('伤害')), |
| | | '169' => array( |
| | | 'BBName' => \Lang\gettext('仙盟攻城战轮次伤害'), 'CmpValue' => \Lang\gettext('伤害亿部分'), 'CmpValue2' => \Lang\gettext('伤害'), |
| | | 'Name1' => \Lang\gettext('仙盟名'), 'ID2' => \Lang\gettext('盟主ID'), 'Name2' => \Lang\gettext('盟主'), 'Value5' => \Lang\gettext('盟服务器ID') |
| | | ), |
| | | ); |
| | | return $billboardCh; |
| | | } |
New file |
| | |
| | | <?php |
| | | include_once "/Account/User.php"; |
| | | include_once "/language/lang.php"; |
| | | include_once "/Common/CommFunc.php"; |
| | | include_once "/Common/Logging.php"; |
| | | include_once "/Common/GMTRetCode.php"; |
| | | |
| | | \Logging\CreateLogging("queryFamilyByServerID.php"); |
| | | $Permission = \User\Permission::P_GetFamilyByServerID; |
| | | $spid = $_SESSION['spid']; |
| | | $serverID = $_SESSION['serverID']; |
| | | $user = new \User\User($_SESSION['UserAccount']); |
| | | if (!$user->HavePermission($Permission)) { |
| | | exit; |
| | | } |
| | | \Logging\LogInfo("_SESSION:" . print_r($_SESSION, true)); |
| | | \Logging\LogInfo("_POST:" . print_r($_POST, true)); |
| | | |
| | | \CommFunc\MatchServerIDList($serverIDCondArray, $serverIDList); |
| | | \Logging\LogInfo("serverIDCondArray:" . print_r($serverIDCondArray, true)); |
| | | \Logging\LogInfo("serverIDList:" . print_r($serverIDList, true)); |
| | | |
| | | $dataArray = null; |
| | | $totalCnt = 0; |
| | | if ($_POST["submit"]) { |
| | | $queryCnt = $_POST["queryCnt"]; |
| | | $packData = array( |
| | | "serverIDList" => json_encode($serverIDList), |
| | | "queryCnt" => $queryCnt, |
| | | ); |
| | | $retList = \CommFunc\SendGMTToGameServers(False, "GMT_GetFamilyByServerID", $packData, $spid, array($serverID)); |
| | | \Logging\LogInfo("retList:" . print_r($retList, true)); |
| | | if (!is_array($retList)) { |
| | | echo "返回错误,没有返回信息"; |
| | | exit; |
| | | } |
| | | |
| | | $ret = json_decode($retList[$serverID], true); |
| | | $errStr = ParseResult($ret, $retMsg); |
| | | if ($errStr != "") { |
| | | echo $errStr; |
| | | exit; |
| | | } |
| | | $dataArray = $retMsg["familyList"]; |
| | | $totalCnt = $retMsg["totalCnt"]; |
| | | } |
| | | |
| | | //显示表格字段配置 key-参数名,value-说明 |
| | | $tableArray = array( |
| | | "Num" => array(\Lang\gettext("排名"), "3%", "center"), |
| | | "ID" => array(\Lang\gettext("仙盟ID"), "5%", "center"), |
| | | "Name" => array(\Lang\gettext("仙盟名"), "9%", "center"), |
| | | "FightPower" => array(\Lang\gettext("总战力"), "9%", "center"), |
| | | "LeaderID" => array(\Lang\gettext("盟主ID"), "5%", "center"), |
| | | "LeaderName" => array(\Lang\gettext("盟主名"), "9%", "center"), |
| | | "LV" => array(\Lang\gettext("仙盟等级"), "3%", "center"), |
| | | "MemberCnt" => array(\Lang\gettext("成员数"), "3%", "center"), |
| | | "OnLineCnt" => array(\Lang\gettext("在线数"), "3%", "center"), |
| | | "ServerID" => array(\Lang\gettext("区服ID"), "5%", "center"), |
| | | ); |
| | | |
| | | ?> |
| | | |
| | | <!DOCTYPE html> |
| | | <html> |
| | | |
| | | <head> |
| | | <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> |
| | | <title><?php echo \Lang\gettext("查询区服仙盟"); ?></title> |
| | | <link rel="stylesheet" type="text/css" href="/css/table.css"> |
| | | <link rel="stylesheet" type="text/css" href="/css/button.css"> |
| | | <link rel="gettext" type="application/x-po" href="../language/<?php echo \Lang\getLang(); ?>/LC_MESSAGES/<?php echo \Lang\getjspodomain(); ?>.po" /> |
| | | </head> |
| | | |
| | | <body> |
| | | |
| | | <form method="post"> |
| | | |
| | | <center> |
| | | <dt><b><?php echo \Lang\gettext("查询区服仙盟"); ?></b></dt> |
| | | </center> |
| | | <input type="button" value="添加服务器ID条件" onclick="AddServerIDCondition('', '', '')" /> |
| | | <input type="button" value="重置条件" onclick="ResetServerIDCondition()" /> |
| | | <input type="number" name="queryCnt" value="100" /> |
| | | <input type="submit" name="submit" value="<?php echo \Lang\gettext("查询"); ?>" /> |
| | | <div id="ServerIDCondition"></div> |
| | | <hr /> |
| | | <?php |
| | | if (isset($dataArray)) { |
| | | echo "仙盟总数: " . $totalCnt; |
| | | echo '<table width="100%">'; |
| | | echo "<thead><tr>"; |
| | | foreach ($tableArray as $value) { |
| | | echo "<th width=\"" . $value[1] . "\">" . $value[0] . "</td>"; |
| | | } |
| | | echo "</tr></thead>"; |
| | | $Num = $skip; |
| | | foreach ($dataArray as $info) { |
| | | $Num += 1; |
| | | echo "<tr class='trc'>"; |
| | | foreach ($tableArray as $key => $value) { |
| | | if (!$key) { |
| | | continue; |
| | | } |
| | | $tdContent = $info[$key]; |
| | | if ($key == "Num") { |
| | | $tdContent = $Num; |
| | | } |
| | | echo "<td align='" . $value[2] . "' style=\"display:table-cell; vertical-align:middle\">"; |
| | | echo "<div id='" . $key . "_" . $Num . "'>" . $tdContent . "</div>"; |
| | | echo "</td>"; |
| | | } |
| | | echo "</tr>"; |
| | | } |
| | | echo '</table>'; |
| | | echo '<hr />'; |
| | | } else if ($_POST["submit"]) { |
| | | echo \Lang\gettext("暂无数据"), "<br/>"; |
| | | } |
| | | ?> |
| | | </form> |
| | | |
| | | <script type='text/javascript' src='/language/gettext.js'></script> |
| | | <script type='text/javascript' src="/js/common.js"></script> |
| | | <script type="text/javascript"> |
| | | window.onload = function() { |
| | | LoadServerIDCondition('<?php echo json_encode($serverIDCondArray); ?>'); |
| | | |
| | | } |
| | | </script> |
| | | </body> |
| | | |
| | | </html> |
| | |
| | | array(\User\Permission::P_GetPlayerForbid, "GMToolClient/queryPunishInfo.php", \Lang\gettext("查询玩家封禁状态")), |
| | | array(\User\Permission::P_GetForbidInfo, "GMToolClient/queryServerPunishInfo.php", \Lang\gettext("查询全服封禁名单")), |
| | | array(\User\Permission::P_GetPlayerInfo, "GMToolClient/queryPlayerInfo.php", \Lang\gettext("查询玩家")), |
| | | array(\User\Permission::P_GetFamilyByServerID, "GMToolClient/queryFamilyByServerID.php", \Lang\gettext("查询区服仙盟")), |
| | | array(\User\Permission::P_GetFamilyInfo, "GMToolClient/queryFamilyInfo.php", \Lang\gettext("查询仙盟")), |
| | | array(\User\Permission::P_FamilyTransfer, "GMToolClient/familyTransfer.php", \Lang\gettext("转让仙盟")), |
| | | array(\User\Permission::P_FamilyDismiss, "GMToolClient/familyDismiss.php", \Lang\gettext("解散仙盟")), |