| | |
| | | } |
| | | $insArray = array_merge($editArray); |
| | | $insArray["ServerID"] = $tServerID; |
| | | $insArray["ServerName"] = $testServerName . $tServerID; |
| | | $insArray["ServerName"] = "s" . $tServerID; |
| | | array_push($batchInsArray, $insArray); |
| | | } |
| | | if (DBOper\BatchInsert("GameServers", $batchInsArray)) { |
| | |
| | | else if (array_key_exists("submitSetMainServerID", $_POST)) { |
| | | $SetMainServerID = intval($_POST["SetMainServerID"]); |
| | | $set = array("MainServerID" => $SetMainServerID); |
| | | if ($_POST["SetMainServerDomain"]) { |
| | | \DBOper\FindOne("GameServers", array("Channel" => $channel, "ServerID" => $SetMainServerID), $mainServerInfo, null, false); |
| | | if (isset($mainServerInfo)) { |
| | | $set = array( |
| | | "MainServerID" => $SetMainServerID, |
| | | "RegionDomain" => $mainServerInfo["RegionDomain"], |
| | | "LoginPort" => $mainServerInfo["LoginPort"], |
| | | "GamePort" => $mainServerInfo["GamePort"] |
| | | ); |
| | | } |
| | | } |
| | | if (!\DBOper\Update("GameServers", $find, $set, false, false, true)) { |
| | | $alertMsg = "批量更新合服主服失败!"; |
| | | \Logging\LogError($alertMsg . " find=" . json_encode($find) . " set=" . json_encode($set)); |
| | |
| | | |
| | | <input type="submit" name="submitSetMainServerID" value="批量设置主服ID" onclick="return CheckUpdMulti(this)" /> |
| | | <input type="number" name="SetMainServerID" id="SetMainServerID" value="" placeholder="填入合服主服ID" /> |
| | | <input type="checkbox" name="SetMainServerDomain" id="SetMainServerDomain" <?php echo $_POST["SetMainServerDomain"] ? "checked" : "" ?> />同步修改为主服地址 |
| | | <hr /> |
| | | <table width="100%"> |
| | | <?php |
| | |
| | | } |
| | | |
| | | function CheckUpdMulti(obj) { |
| | | var br = getbr(); |
| | | var setStr = ""; |
| | | if (obj.name == "updSelect") { |
| | | var value = obj.value; |
| | |
| | | return false; |
| | | } |
| | | setStr = "合服主服ID: " + SetMainServerID; |
| | | if (document.getElementById("SetMainServerDomain").checked) { |
| | | setStr += "?" + br + "并同步修改为主服地址"; |
| | | } |
| | | } else { |
| | | alert("未知批量更新操作控件: " + obj.name + " type:" + obj.type); |
| | | return false; |
| | | } |
| | | |
| | | var br = getbr(); |
| | | let gteValue, lteValue; |
| | | var serverCondStr = ""; |
| | | var numMax = parseInt("<?php echo $serverIDCondNumMax ?>"); |