From 6fa39457b067d5fe22fa6ef1e7333be68515294d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9Cwanyongkang=E2=80=9D?= <“937888580@qq.com”> Date: Mon, 23 Oct 2023 17:10:36 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9C=8D=E5=8A=A1=E5=99=A8=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E9=A1=BA=E5=BA=8F=E5=8F=96=E6=B6=88=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- script/linedata/auto_format.php | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/script/linedata/auto_format.php b/script/linedata/auto_format.php index 3847202..249d7b9 100644 --- a/script/linedata/auto_format.php +++ b/script/linedata/auto_format.php @@ -343,16 +343,15 @@ function ip_repeat(&$record, $ip, $dns = '') function city_exist($citys, $city) { - return $city; - // for ($i = 2; $i < 100; $i++) { - // if (in_array($city, $citys)) { - // if (in_array($city . $i, $citys)) { - // continue; - // } else { - // return $city . $i; - // } - // } else { - // return $city; - // } - // } + for ($i = 1; $i < 100; $i++) { + if (in_array($city, $citys)) { + if (in_array($city . $i, $citys)) { + continue; + } else { + return $city . $i; + } + } else { + return $city; + } + } }