Browse Source

修改PHP7兼容

tags/6.1.7
xushubieli 2 years ago
parent
commit
65055b108f
3 changed files with 3 additions and 53 deletions
  1. +1
    -8
      src/admin/js/indexbody.js
  2. +0
    -44
      src/admin/templets/index_body.htm
  3. +2
    -1
      src/system/libraries/agent.class.php

+ 1
- 8
src/admin/js/indexbody.js View File

@@ -18,11 +18,4 @@ function ListAll(){
function ShowWaitDiv(){
$DE('loaddiv').style.display = 'block';
return true;
}

window.onload = function()
{
fetch('index_body.php?dopost=getRightSide').then(resp=>resp.text()).then((d)=>{
$DE('listCount').innerHTML = d;
});
};
}

+ 0
- 44
src/admin/templets/index_body.htm View File

@@ -100,14 +100,6 @@ table.stattable td.today {
<div class="card-body" id="_systeminfo">正在载入</div>
</div>
</div>
<div class="col-md-6 mt-3">
<div class="card">
<div class="card-header">信息统计</div>
<div class="card-body">
<dd id='listCount'>正在载入</dd>
</div>
</div>
</div>
<div class="col-md-6 mt-3">
<div class="card">
<div class="card-header">基本信息</div>
@@ -137,42 +129,6 @@ table.stattable td.today {
</div>
</div>
</div>
<div class="col-md-6 mt-3">
<div class="card">
<div class="card-header">最新文档</div>
<div class="card-body">
<table width="100%" class="table table-borderless">
<?php
$query = "SELECT arc.id, arc.arcrank, arc.title, arc.typeid, arc.pubdate, arc.channel, ch.editcon, tp.typename FROM `#@__archives` arc LEFT JOIN `#@__channeltype` ch ON ch.id = arc.channel LEFT JOIN `#@__arctype` tp ON arc.typeid=tp.id WHERE arc.arcrank<>-2 ORDER BY arc.id DESC LIMIT 0,5";
$arcArr = array();
$dsql->Execute('m', $query);
while($row = $dsql->GetArray('m'))
{
$arcArr[] = $row;
}
?>
<?php
if(count($arcArr) > 1)
{
foreach($arcArr as $row)
{
if(trim($row['editcon'])==''){
$row['editcon'] = 'archives_edit.php';
}
$rowarcrank = $row['arcrank']==-1? "<small>[未审核]</small>":"";
$pubdate = GetDateMk($row['pubdate']);
echo "<tr><td><a href='{$row['editcon']}?aid={$row['id']}&channelid={$row['channel']}'>{$row['title']}</a>{$rowarcrank}</td><td width='90'>{$pubdate}</td></tr>";
}
} else {
?>
<tr><td class="nline" colspan="2">暂无文档</td></tr>
<?php
}
?>
</table>
</div>
</div>
</div>
<div class="col-md-6 mt-3">
<div class="card">
<div class="card-header"><a name="statChart">流量统计图</a></div>


+ 2
- 1
src/system/libraries/agent.class.php View File

@@ -213,7 +213,8 @@ class Agent extends Mobile_Detect

// Check match
if ($this->match($regex, $userAgent)) {
return $key ?: reset((array)$this->matchesArray);
$val = (array)$this->matchesArray;
return $key ?: reset($val);
}
}



Loading…
Cancel
Save