diff --git a/admin/index.php b/admin/index.php
index 2fb5a77..de0ac6e 100644
--- a/admin/index.php
+++ b/admin/index.php
@@ -16,14 +16,17 @@
+
数据统计
-
-
+
+
+
+ 累积上传 |
本月上传数量 |
今日上传 |
可疑图片 |
@@ -31,6 +34,7 @@
+ |
|
|
|
diff --git a/admin/senioradmin.php b/admin/senioradmin.php
index 09c4194..e1e7c34 100644
--- a/admin/senioradmin.php
+++ b/admin/senioradmin.php
@@ -8,14 +8,32 @@
$type = $_GET['type'];
//获取页数
$page = $_GET['page'];
+ //获取时间
+ @$date = $_GET['date'];
+ //如果时间不为空
+ if($date != ''){
+ $thedate = explode("|",$date);
+ $starttime = $thedate[0];
+ $endtime = $thedate[1];
+ //翻页选项
+ $thepage = '&date='.$date;
+ }
+ else{
+ $starttime = '';
+ //获取当前日期
+ $endtime = date("Y-m-d",time());
+ //翻页选项
+ $thepage = '';
+ }
//查询图片
- $imgs = $pic->querypic($type,$page);
+ $imgs = $pic->querypic($type,$page,$date);
$up = (int)$page - 1;
if($up <= 0){
$up = 1;
}
$down = (int)$page +1;
+
?>
@@ -27,6 +45,21 @@
+
+
+
@@ -100,8 +133,8 @@
diff --git a/functions/class/class.admin.php b/functions/class/class.admin.php
index 0ca211a..bc1df81 100644
--- a/functions/class/class.admin.php
+++ b/functions/class/class.admin.php
@@ -25,7 +25,15 @@
}
}
//查询图片
- function querypic($type,$page){
+ function querypic($type,$page,$date = null){
+ //对时间进行拆分
+ if($date != null){
+ $date = explode("|",$date);
+
+ $starttime = $date[0];
+ $endttime = $date[1];
+ }
+
$config = $this->config;
$database = $this->database;
@@ -78,7 +86,10 @@
return $datas;
break;
default:
- echo 'dsddsd';
+ $sql = "SELECT * FROM imginfo WHERE date(date) BETWEEN '$starttime' AND '$endttime' ORDER BY `id` DESC LIMIT $num OFFSET $start";
+
+ $datas = $database->query($sql);
+ return $datas;
break;
}
}
@@ -125,12 +136,15 @@
$level = $this->database->count("imginfo",[
"level" => 3
]);
+ //统计全部图片
+ $all = $this->database->count("imginfo");
//返回数据
$redata = array(
"month" => $month,
"day" => $day,
- "level" => $level
+ "level" => $level,
+ "all" => $all
);
return $redata;
}
diff --git a/functions/version.txt b/functions/version.txt
index 4435ba7..75ca56c 100644
--- a/functions/version.txt
+++ b/functions/version.txt
@@ -1 +1 @@
-v1.20(20180811)
\ No newline at end of file
+v1.21(20180831)
\ No newline at end of file
diff --git a/static/embed.js b/static/embed.js
index aa9ac4c..f67ab5f 100644
--- a/static/embed.js
+++ b/static/embed.js
@@ -451,4 +451,21 @@ function urlup(){
layer.msg(re.msg);
}
});
+}
+
+//时间筛选
+function screen(){
+ var starttime = $("#starttime").val();
+ var endtime = $("#endtime").val();
+
+ if((starttime == '') || (endtime == '')){
+ layui.use('layer', function(){
+ var layer = layui.layer;
+ layer.msg('请选择时间!');
+ });
+ }
+
+ else{
+ window.location.href = "./senioradmin.php?page=1&date=" + starttime + '|' + endtime;
+ }
}
\ No newline at end of file
diff --git a/tpl/admin/footer.php b/tpl/admin/footer.php
index 55f7543..5962776 100644
--- a/tpl/admin/footer.php
+++ b/tpl/admin/footer.php
@@ -13,6 +13,19 @@
-
+
+