Browse Source

优化

pull/5/head
xiaoz 7 years ago
parent
commit
e0e337d122
  1. 8
      admin/about.php
  2. 6
      found.php
  3. 1
      functions/version.txt
  4. 12
      static/embed.js
  5. 2
      tpl/admin/footer.php
  6. 7
      tpl/admin/left.php

8
admin/about.php

@ -0,0 +1,8 @@ @@ -0,0 +1,8 @@
<?php
include_once("../config.php");
$year = date('Y',time());
$version = file_get_contents(APP."functions/version.txt");
echo "当前版本:".$version."<br />";
?>

6
found.php

@ -4,18 +4,20 @@ @@ -4,18 +4,20 @@
// 载入类
include_once("config.php");
//获取当前时间
$thetime = date('Y-m',time());
//初始化
$domain = $config['domain'];
$userdir = $config['userdir'];
$sql = "SELECT `id`,`path` FROM `imginfo` WHERE (`dir` = '$userdir' AND `level` < 3) ORDER BY random() LIMIT 12";
$sql = "SELECT `id`,`path` FROM `imginfo` WHERE (`dir` = '$userdir' AND `level` < 3 AND `date` LIKE '$thetime%') ORDER BY random() LIMIT 12";
$datas = $database->query($sql)->fetchAll();
?>
<div class="layui-container" style = "margin-bottom:6em;">
<div class="layui-row">
<div class="msg"><i class="layui-icon">&#xe645;</i> 此页面随机显示12张图片,刷新页面可重新随机。</div>
<div class="msg"><i class="layui-icon">&#xe645;</i> 此页面随机显示本月12张图片,刷新页面可重新随机,如果不显示说明本月暂未上传图片</div>
<div id = "found-img" class = "layui-col-space20">
<?php foreach ($datas as $img) {
$imgurl = $domain.$img['path'];

1
functions/version.txt

@ -0,0 +1 @@ @@ -0,0 +1 @@
v1.0(20180502)

12
static/embed.js

@ -184,3 +184,15 @@ function ipquery(ip){ @@ -184,3 +184,15 @@ function ipquery(ip){
}
});
}
//关于
function about(){
url = window.location.protocol + '//';
url = url + window.location.host + '/';
layer.open({
title: '关于',
type: 2,
area: ['240px', '100px'],
content: "./about.php"
});
}

2
tpl/admin/footer.php

@ -13,6 +13,6 @@ @@ -13,6 +13,6 @@
<script src="https://cdn.bootcss.com/jquery/2.2.4/jquery.min.js"></script>
<script src="../static/layui/layui.js"></script>
<script src="../static/embed.js?v=1.0"></script>
<script src="../static/embed.js?v=1.0.1"></script>
</body>
</html>

7
tpl/admin/left.php

@ -17,7 +17,12 @@ @@ -17,7 +17,12 @@
<dd><a href="senioradmin.php?type=dubious&page=1">可疑图片</a></dd>
</dl>
</li>
<li class="layui-nav-item"><a href="javascript:;">系统设置</a></li>
<li class="layui-nav-item layui-nav-itemed">
<a href="javascript:;">系统设置<span class="layui-nav-more"></span></a>
<dl class="layui-nav-child">
<dd><a href="javascript:;" onclick = "about()">关于</a></dd>
</dl>
</li>
<span class="layui-nav-bar" style="top: 157.5px; height: 0px; opacity: 0;"></span></ul>
</div>
<!-- 左边导航栏END -->
Loading…
Cancel
Save