From ecc3290117ef7cab11919acd7da0fb4c90710417 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期三, 09 四月 2025 15:54:51 +0800
Subject: [PATCH] 10367 【越南】【英语】【BT】【砍树】仙盟攻城战-服务端(查询区服仙盟;跨服仙盟攻城战相关榜单;)

---
 Common/CommFunc.php |   38 ++++++++++++++++++++++++++++++++++++++
 1 files changed, 38 insertions(+), 0 deletions(-)

diff --git a/Common/CommFunc.php b/Common/CommFunc.php
index cca777b..43aa0f0 100644
--- a/Common/CommFunc.php
+++ b/Common/CommFunc.php
@@ -1494,3 +1494,41 @@
 	}
 	// \Logging\LogInfo("find:" . json_encode($find));
 }
+
+// 缁勫悎鏈嶅姟鍣↖D鍒楄〃锛屾惌閰� 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));
+	}
+}

--
Gitblit v1.8.0