diff --git a/app/common.php b/app/common.php index d833b2b..8d87b95 100644 --- a/app/common.php +++ b/app/common.php @@ -1,6 +1,7 @@ column('name'); + config(['domains'=>$domains], 'temp'); + } + foreach ($domains as $domain) { + if (str_ends_with($host, $domain)) { + return $domain; + } + } $domain_root = file_get_contents(app()->getBasePath() . 'data' . DIRECTORY_SEPARATOR . 'domain_root.txt'); $domain_root = explode("\r\n", $domain_root); $data = explode('.', $host); diff --git a/app/controller/Cert.php b/app/controller/Cert.php index fe4cb7f..5f69e54 100644 --- a/app/controller/Cert.php +++ b/app/controller/Cert.php @@ -483,7 +483,6 @@ class Cert extends BaseController foreach($domains as $domain){ if (!$wildcard && strpos($domain, '*') !== false) return ['code' => -1, 'msg' => '该证书账户类型不支持泛域名']; - if (preg_match('/[\x{4e00}-\x{9fa5}]/u', $domain) && !function_exists('idn_to_ascii')) return ['code' => -1, 'msg' => '域名包含中文,请开启intl扩展']; $mainDomain = getMainDomain($domain); $drow = Db::name('domain')->where('name', $mainDomain)->find(); if (!$drow) { diff --git a/app/controller/Domain.php b/app/controller/Domain.php index de117f0..6eab4d5 100644 --- a/app/controller/Domain.php +++ b/app/controller/Domain.php @@ -449,7 +449,7 @@ class Domain extends BaseController if (!checkPermission(0, $drow['name'])) return json(['code' => -1, 'msg' => '无权限']); $dns = DnsHelper::getModel($drow['aid'], $drow['name'], $drow['thirdid']); - $domainRecords = $dns->getSubDomainRecords($rr, 1, 99); + $domainRecords = $dns->getSubDomainRecords($rr, 1, 100); if (!$domainRecords) return json(['code' => -1, 'msg' => '获取记录列表失败,' . $dns->getError()]); list($recordLine, $minTTL) = $this->get_line_and_ttl($drow); @@ -846,7 +846,7 @@ class Domain extends BaseController $line = DnsHelper::$line_name[$dnstype]['DEF']; $dns = DnsHelper::getModel($drow['aid'], $drow['name'], $drow['thirdid']); - $domainRecords = $dns->getSubDomainRecords($name, 1, 99); + $domainRecords = $dns->getSubDomainRecords($name, 1, 100); if (!$domainRecords) return json(['code' => -1, 'msg' => '获取记录列表失败,' . $dns->getError()]); if (empty($domainRecords['list'])) return json(['code' => -1, 'msg' => '没有可修改的记录']); diff --git a/app/lib/deploy/aliyun.php b/app/lib/deploy/aliyun.php index 0f638c0..4a255e4 100644 --- a/app/lib/deploy/aliyun.php +++ b/app/lib/deploy/aliyun.php @@ -190,6 +190,7 @@ class aliyun implements DeployInterface $cert_id = null; $cert_name = null; + $casid = null; foreach ($data['Result'] as $cert) { $domains = explode(',', $cert['SAN']); $flag = true; @@ -202,6 +203,7 @@ class aliyun implements DeployInterface if ($flag) { $cert_id = $cert['Id']; $cert_name = $cert['CommonName']; + $casid = $cert['CasId']; break; } } @@ -215,6 +217,10 @@ class aliyun implements DeployInterface if ($cert_id) { $param['Update'] = 'true'; $param['Id'] = $cert_id; + if ($casid == $cas_id) { + $this->log('ESA站点 ' . $sitename . ' 证书已配置,无需重复操作'); + return; + } } $client->request($param); if ($cert_id) { diff --git a/app/lib/dns/jdcloud.php b/app/lib/dns/jdcloud.php index f877b29..5ba52db 100644 --- a/app/lib/dns/jdcloud.php +++ b/app/lib/dns/jdcloud.php @@ -68,6 +68,7 @@ class jdcloud implements DnsInterface //获取解析记录列表 public function getDomainRecords($PageNumber = 1, $PageSize = 20, $KeyWord = null, $SubDomain = null, $Value = null, $Type = null, $Line = null, $Status = null) { + if ($PageSize > 99) $PageSize = 99; $query = ['pageNumber' => $PageNumber, 'pageSize' => $PageSize]; if (!isNullOrEmpty($SubDomain)) { $SubDomain = strtolower($SubDomain); diff --git a/app/view/dmonitor/noticeset.html b/app/view/dmonitor/noticeset.html deleted file mode 100644 index 107ea70..0000000 --- a/app/view/dmonitor/noticeset.html +++ /dev/null @@ -1,222 +0,0 @@ -{extend name="common/layout" /} -{block name="title"}容灾切换通知设置{/block} -{block name="main"} -
-
-
-

容灾切换通知设置

-
-
-
- -
-
-
- -
-
-
- -
-
-
-
-
-
-
-
-
-

发信邮箱设置

-
-
-
- -
-
-
-
- -
-
-
- -
-
-
- -
-
-
- -
-
-
-
-
- -
-
-
- -
-
-
- -
-
-
-
- -
-
-
- -
-
-
- -
-
-

微信公众号消息接口设置

-
-
-
- -
-
-
- -
-
-
-
-
-
-
- -
-
-

Telegram机器人接口设置

-
-
-
- -
-
-
- -
-
-
- -
-
-
- -
-
-
- -
-
-
-{/block} -{block name="script"} - - -{/block} \ No newline at end of file diff --git a/app/view/dmonitor/proxyset.html b/app/view/dmonitor/proxyset.html deleted file mode 100644 index 083d817..0000000 --- a/app/view/dmonitor/proxyset.html +++ /dev/null @@ -1,110 +0,0 @@ -{extend name="common/layout" /} -{block name="title"}容灾切换代理设置{/block} -{block name="main"} -
-
-
-

代理服务器设置

-
-
-
- -
-

-
- -
-

-
- -
-

-
- -
-

-
- -
-

- -
-
-
-
-
-{/block} -{block name="script"} - - -{/block} \ No newline at end of file diff --git a/app/view/index/index.html b/app/view/index/index.html index 4529629..917b9c7 100644 --- a/app/view/index/index.html +++ b/app/view/index/index.html @@ -183,6 +183,11 @@ $(document).ready(function(){ $('#certdeploy_status_0').html(data.certdeploy_status_0); $('#certdeploy_status_1').html(data.certdeploy_status_1); $('#certdeploy_status_2').html(data.certdeploy_status_2); + $('.badge').each(function() { + if ($(this).text().trim() === '0') { + $(this).css('opacity', '0.4'); + } + }); $.ajax({ url: '{$checkupdate}', type: 'get', diff --git a/composer.json b/composer.json index a891706..ba0cb78 100644 --- a/composer.json +++ b/composer.json @@ -38,10 +38,17 @@ "ext-pdo": "*", "ext-gd": "*", "ext-curl": "*", + "ext-openssl": "*", + "ext-sockets": "*", + "ext-mbstring": "*", + "ext-ssh2": "*", + "ext-ftp": "*", "topthink/framework": "^6.0.0", "topthink/think-orm": "^2.0", "topthink/think-view": "^1.0", - "cccyun/think-captcha": "^3.0" + "cccyun/think-captcha": "^3.0", + "symfony/polyfill-intl-idn": "^1.31", + "symfony/polyfill-php80": "^1.31" }, "require-dev": { "symfony/var-dumper": "^4.2",