mirror of
https://github.com/netcccyun/dnsmgr.git
synced 2026-02-21 15:31:12 +08:00
优化代码格式
This commit is contained in:
parent
4a4cdd059c
commit
3587db2b53
@ -12,12 +12,12 @@ class CheckUtils
|
||||
if (!$urlarr) {
|
||||
return ['status' => false, 'errmsg' => 'Invalid URL', 'usetime' => 0];
|
||||
}
|
||||
if (str_starts_with($urlarr['host'], '[') && str_ends_with($urlarr['host'], ']')) {
|
||||
$urlarr['host'] = substr($urlarr['host'], 1, -1);
|
||||
}
|
||||
if (str_starts_with($urlarr['host'], '[') && str_ends_with($urlarr['host'], ']')) {
|
||||
$urlarr['host'] = substr($urlarr['host'], 1, -1);
|
||||
}
|
||||
if (!empty($ip) && !filter_var($urlarr['host'], FILTER_VALIDATE_IP) && filter_var($ip, FILTER_VALIDATE_IP)) {
|
||||
$port = $urlarr['port'] ?? ($urlarr['scheme'] == 'https' ? 443 : 80);
|
||||
$resolve = $urlarr['host'] . ':' . $port . ':' . $ip;
|
||||
$port = $urlarr['port'] ?? ($urlarr['scheme'] == 'https' ? 443 : 80);
|
||||
$resolve = $urlarr['host'] . ':' . $port . ':' . $ip;
|
||||
}
|
||||
$ch = curl_init();
|
||||
if ($proxy) {
|
||||
|
||||
@ -71,25 +71,25 @@
|
||||
</div>
|
||||
<!-- /.row -->
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div id="browser-notice">
|
||||
{if $info.no_https}
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-body">
|
||||
<b style='color:#CC3022;'><i class='fa fa-info-circle fa-fw'></i></b>当前正在使用HTTP访问,可能存在被窃取敏感信息风险,请使用HTTPS访问!
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
{if $info.old_browser}
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-body">
|
||||
当前浏览器是兼容模式,为确保后台功能正常使用,请切换到<b style='color:#51b72f'>极速模式</b>!<br>
|
||||
操作方法:点击浏览器地址栏右侧的IE符号<b style='color:#51b72f;'><i class='fa fa-internet-explorer fa-fw'></i></b>→选择“<b style='color:#51b72f;'><i class='fa fa-flash fa-fw'></i></b><b style='color:#51b72f;'>极速模式</b>”
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-12">
|
||||
<div id="browser-notice">
|
||||
{if $info.no_https}
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-body">
|
||||
<b style='color:#CC3022;'><i class='fa fa-info-circle fa-fw'></i></b>当前正在使用HTTP访问,可能存在被窃取敏感信息风险,请使用HTTPS访问!
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
{if $info.old_browser}
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-body">
|
||||
当前浏览器是兼容模式,为确保后台功能正常使用,请切换到<b style='color:#51b72f'>极速模式</b>!<br>
|
||||
操作方法:点击浏览器地址栏右侧的IE符号<b style='color:#51b72f;'><i class='fa fa-internet-explorer fa-fw'></i></b>→选择“<b style='color:#51b72f;'><i class='fa fa-flash fa-fw'></i></b><b style='color:#51b72f;'>极速模式</b>”
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4 col-sm-12">
|
||||
<div class="box box-primary">
|
||||
<div class="box-header with-border">
|
||||
@ -145,10 +145,10 @@
|
||||
</div>
|
||||
<table class="table table-bordered">
|
||||
<tbody>
|
||||
<tr>
|
||||
<tr>
|
||||
<td class="query-title">框架版本</td>
|
||||
<td class="query-result">{$info.framework_version}</td>
|
||||
</tr>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="query-title">PHP版本</td>
|
||||
<td class="query-result">{$info.php_version}</td>
|
||||
@ -157,10 +157,10 @@
|
||||
<td class="query-title">数据库版本</td>
|
||||
<td class="query-result">{$info.mysql_version}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<tr>
|
||||
<td class="query-title">Web服务器</td>
|
||||
<td class="query-result">{$info.software}</td>
|
||||
</tr>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="query-title">服务器时间</td>
|
||||
<td class="query-result">{$info.date}</td>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user