From e5f2b7e3bd067feb2c76ed592f43b376481549fa Mon Sep 17 00:00:00 2001 From: hxp <ale99527@vip.qq.com> Date: 星期五, 08 十一月 2024 17:57:51 +0800 Subject: [PATCH] 10162 后台优化(增加特殊账号区服权限) --- serverinfo/payorderlist.php | 18 ++++++++++++++---- Account/Server/Server_test.ini | 16 ++++++++++++---- InterfaceConfig.php | 3 +++ Account/User.php | 19 ++++++++++++++++++- 4 files changed, 47 insertions(+), 9 deletions(-) diff --git a/Account/Server/Server_test.ini b/Account/Server/Server_test.ini index d843223..d0931ec 100644 --- a/Account/Server/Server_test.ini +++ b/Account/Server/Server_test.ini @@ -9,16 +9,24 @@ Page=http://mobile.secondworld.net.cn:20080/Server/Tool.php ServerID=87 -[ale 8701] +[ale 89] Page=http://mobile.secondworld.net.cn:20080/Server/Tool.php -ServerID=8701 +ServerID=89 MainServer=87 -[ale 8702] +[ale 90] Page=http://mobile.secondworld.net.cn:20080/Server/Tool.php -ServerID=8702 +ServerID=90 MainServer=87 +[ale 100] +Page=http://mobile.secondworld.net.cn:20080/Server/Tool.php +ServerID=100 + +[ale 187] +Page=http://mobile.secondworld.net.cn:20080/Server/Tool.php +ServerID=187 + [鍏叡鏈峕 Page=http://mobile.173on.com:30080/Server/Tool.php diff --git a/Account/User.php b/Account/User.php index 0ed32d6..1c8911d 100644 --- a/Account/User.php +++ b/Account/User.php @@ -402,7 +402,24 @@ { $ConfigFile = dirname(__FILE__) . "\Server\Server_" . $spid . ".ini"; if (file_exists($ConfigFile)) { - return parse_ini_file($ConfigFile, true); + $serversCfg = parse_ini_file($ConfigFile, true); + + $UserAccount = $this->userData["UserAccount"]; + \CommFunc\GetConfig("ServerInfo", "SpecialServerIDStart", $SpecialServerIDStart); + \CommFunc\GetConfig("ServerInfo", "SpecialAccountList", $SpecialAccountList); + $SpecialAccountList = explode(",", $SpecialAccountList); + $SpecialServerIDStart = intval($SpecialServerIDStart); + // 鐗规畩璐﹀彿锛屽彧鑳界湅鎸囧畾鏈嶅強浠ヤ笂 + if (in_array($UserAccount, $SpecialAccountList)) { + foreach ($serversCfg as $key => $info) { + $ServerID = intval($info["ServerID"]); + if ($ServerID < $SpecialServerIDStart) { + unset($serversCfg[$key]); + } + } + return $serversCfg; + } + return $serversCfg; } if ($spid) { echo "file is not exist: " . "Server_" . $spid . ".ini" . "<br/>"; diff --git a/InterfaceConfig.php b/InterfaceConfig.php index ff24009..cedcd4d 100644 --- a/InterfaceConfig.php +++ b/InterfaceConfig.php @@ -11,6 +11,9 @@ ;閰嶇疆缁勭粐瀵瑰簲鍙鐞嗙殑娓犻亾appID Channel_secondworld=qkbt7game,qkbt8game,sohagame Channel_sohagame=sohagame +;鐗规畩鏉冮檺璐﹀彿鍒楄〃锛岃繖浜涜处鍙峰彧鑳界湅鏈嶅姟鍣↖D澶т簬绛変簬閰嶇疆SpecialServerIDStart +SpecialAccountList=hxp0 +SpecialServerIDStart=100 ;娓告垙鏈嶅姟鍣╳eb绔彛锛屾病鏈夐厤缃殑appID锛岄粯璁�80绔彛 GameServerWebPort_qkbt7game=55080 diff --git a/serverinfo/payorderlist.php b/serverinfo/payorderlist.php index bb18faa..75fcfb2 100644 --- a/serverinfo/payorderlist.php +++ b/serverinfo/payorderlist.php @@ -15,6 +15,14 @@ } $server_id = $_SESSION['server_id']; +$isSpecialAccount = False; +\CommFunc\GetConfig("ServerInfo", "SpecialAccountList", $SpecialAccountList); +$SpecialAccountList = explode(",", $SpecialAccountList); +// 鐗规畩璐﹀彿锛屽彧鑳界湅鏈湇 +if (in_array($UserAccount, $SpecialAccountList)) { + $isSpecialAccount = True; +} + $onlyServerID = "on"; if (array_key_exists("search", $_POST)) { $onlyServerID = $_POST["onlyServerID"]; @@ -24,7 +32,7 @@ $queryOrderIDSDK = $_POST["OrderIDSDK"]; $find = array("Channel" => $spid); -if ($onlyServerID == 'on') { +if ($onlyServerID == 'on' || $isSpecialAccount) { $serversCfg = $user->GetServersCfg($spid); if (array_key_exists($server_id, $serversCfg)) { $find["ServerID"] = intval($serversCfg[$server_id]["ServerID"]); @@ -102,9 +110,11 @@ 璁㈠崟ID: <input type="input" name="OrderID" id="OrderID" value="<?php echo $queryOrderID ?>" /> SDK璁㈠崟ID: <input type="input" name="OrderIDSDK" id="OrderIDSDK" value="<?php echo $queryOrderIDSDK ?>" /> <?php - // 浠呮樉绀烘湰鏈� - echo " "; - echo '<input type="checkbox" name="onlyServerID" id="onlyServerID" ' . ($onlyServerID == "on" ? "checked" : "") . ' />' . \Lang\gettext("浠呮樉绀烘湰鏈�"); + if (!$isSpecialAccount) { + // 浠呮樉绀烘湰鏈� + echo " "; + echo '<input type="checkbox" name="onlyServerID" id="onlyServerID" ' . ($onlyServerID == "on" ? "checked" : "") . ' />' . \Lang\gettext("浠呮樉绀烘湰鏈�"); + } ?> <input type="submit" name="submit" value="<?php echo \Lang\gettext("鎼滅储"); ?>" class="button green medium" /> <hr /> -- Gitblit v1.8.0