mirror of https://github.com/helloxz/imgurl.git
xiaoz
7 years ago
9 changed files with 242 additions and 54 deletions
@ -1,51 +1,32 @@
@@ -1,51 +1,32 @@
|
||||
<!DOCTYPE html> |
||||
<html lang="en" xmlns="http://www.w3.org/1999/xhtml"> |
||||
<head> |
||||
<meta charset="utf-8" /> |
||||
<title>ImgURL后台管理</title> |
||||
<meta name="generator" content="EverEdit" /> |
||||
<meta name="author" content="" /> |
||||
<meta name="keywords" content="" /> |
||||
<meta name="description" content="" /> |
||||
<link rel="stylesheet" href="../static/layui/css/layui.css"> |
||||
<link rel="stylesheet" href="../static/admin.css"> |
||||
<script src = "../static/layui/layui.js"></script> |
||||
<script src = "../static/admin.js"></script> |
||||
</head> |
||||
<body> |
||||
<!--导航栏--> |
||||
<div id="menu"> |
||||
<div class="layui-container"> |
||||
<div class="layui-row"> |
||||
<div class="layui-col-lg9 layui-col-md-offset1"> |
||||
<div style = "float: left;"> |
||||
<ul class="layui-nav" lay-filter=""> |
||||
<li class="layui-nav-item"><a href="">首页</a></li> |
||||
<li class="layui-nav-item layui-this"><a href="">探索发现</a></li> |
||||
<li class="layui-nav-item"><a href="">捐赠版</a></li> |
||||
<li class="layui-nav-item"><a href="">帮助文档</a></li> |
||||
<li class="layui-nav-item"><a href="">关于</a></li> |
||||
</ul> |
||||
<?php |
||||
include_once('../tpl/admin/header.php'); |
||||
?> |
||||
<!--内容区域--> |
||||
<div class="layui-col-lg9" id = "showpic"> |
||||
<table class = "layui-table"> |
||||
<tbody> |
||||
<tr> |
||||
<td>人生就像是一场修行</td> |
||||
<td>人生就像是一场修行</td> |
||||
<td>人生就像是一场修行</td> |
||||
<td>人生就像是一场修行</td> |
||||
</tr> |
||||
<tr> |
||||
<td>人生就像是一场修行</td> |
||||
<td>人生就像是一场修行</td> |
||||
<td>人生就像是一场修行</td> |
||||
<td>人生就像是一场修行</td> |
||||
</tr> |
||||
<tr> |
||||
<td>人生就像是一场修行</td> |
||||
<td>人生就像是一场修行</td> |
||||
<td>人生就像是一场修行</td> |
||||
<td>人生就像是一场修行</td> |
||||
</tr> |
||||
</tbody> |
||||
</table> |
||||
</div> |
||||
<div style = "float: right;"> |
||||
<ul class="layui-nav"> |
||||
<li class="layui-nav-item"> |
||||
<a href="">回收站<span class="layui-badge">9</span></a> |
||||
</li> |
||||
<li class="layui-nav-item"> |
||||
<a href=""><img src="http://t.cn/RCzsdCq" class="layui-nav-img">后台管理</a> |
||||
<dl class="layui-nav-child"> |
||||
<dd><a href="javascript:;">修改信息</a></dd> |
||||
<dd><a href="javascript:;">安全管理</a></dd> |
||||
<dd><a href="javascript:;">退出</a></dd> |
||||
</dl> |
||||
</li> |
||||
</ul> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
<!--导航栏END--> |
||||
</body> |
||||
</html> |
||||
<!--内容区域END--> |
||||
<?php |
||||
include_once('../tpl/admin/footer.php'); |
||||
?> |
@ -0,0 +1,72 @@
@@ -0,0 +1,72 @@
|
||||
<?php |
||||
include_once('../tpl/admin/header.php'); |
||||
$type = $_GET['type']; |
||||
|
||||
switch ( $type ) |
||||
{ |
||||
case 'user': |
||||
$listpic = $database->select("uploads",["id","dir","date"],["user" => "user","ORDER" => ["id" => "DESC"],"LIMIT" => 12]); |
||||
break; |
||||
case 'admin': |
||||
$listpic = $database->select("uploads",["id","dir","date"],["user" => "admin","ORDER" => ["id" => "DESC"],"LIMIT" => 12]); |
||||
break; |
||||
default: |
||||
; |
||||
break; |
||||
} |
||||
|
||||
?> |
||||
<!--内容区域--> |
||||
<div class="layui-col-lg8 layui-col-md-offset1" id = "showpic"> |
||||
<table class = "layui-table"> |
||||
<thead> |
||||
<tr> |
||||
<th width = "60%">图片路径</th> |
||||
<th width = "20%">上传时间</th> |
||||
<th width = "20%">选项</th> |
||||
</tr> |
||||
</thead> |
||||
<tbody> |
||||
<?php for($i = 0;$i < 12;$i++){ |
||||
$imgurl = $config['domain'].$listpic[$i]['dir']; |
||||
?> |
||||
<tr> |
||||
<td><a href="javascript:;" onclick = "showimg('<?php echo $imgurl ?>');"><?php echo $listpic[$i]['dir']; ?></a></td> |
||||
<td><a href="javascript:;"><?php echo $listpic[$i]['date']; ?></td> |
||||
<td><a href="javascript:;" class = "layui-btn layui-btn-danger layui-btn-xs" onclick = "delimg();">删除</a></td> |
||||
</tr> |
||||
<?php } ?> |
||||
</tbody> |
||||
</table> |
||||
</div> |
||||
<!--内容区域END--> |
||||
<?php |
||||
include_once('../tpl/admin/footer.php'); |
||||
?> |
||||
<script> |
||||
function showimg(imgurl){ |
||||
layui.use('layer', function(){ |
||||
var layer = layui.layer; |
||||
layer.open({ |
||||
type: 1, |
||||
title:"图片预览", |
||||
area: ['600px', '400px'], |
||||
content: "<img width = '100%' src = '" + imgurl + "' />" |
||||
}); |
||||
}); |
||||
} |
||||
//删除图片 |
||||
function delimg(){ |
||||
layer.confirm('纳尼?', { |
||||
btn: ['按钮一', '按钮二', '按钮三'] //可以无限个按钮 |
||||
,btn3: function(index, layero){ |
||||
//按钮【按钮三】的回调 |
||||
} |
||||
}, function(index, layero){ |
||||
//按钮【按钮一】的回调 |
||||
}, function(index){ |
||||
//按钮【按钮二】的回调 |
||||
}); |
||||
} |
||||
|
||||
</script> |
@ -0,0 +1,19 @@
@@ -0,0 +1,19 @@
|
||||
</div> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
<!--侧边栏END--> |
||||
<!----> |
||||
<!--页脚--> |
||||
<div id="footer"> |
||||
<div class="layui-container"> |
||||
<div class="layui-row"> |
||||
<div class="layui-col-lg10 layui-col-md-offset1"> |
||||
<p>Copyright Ⓒ 2017 Powered by ImgURL. Author: xiaoz.me. 请勿上传违反中国大陆法律的图片,违者后果自负。</p> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
<!--页脚--> |
||||
</body> |
||||
</html> |
@ -0,0 +1,77 @@
@@ -0,0 +1,77 @@
|
||||
<?php |
||||
error_reporting(E_ALL^E_NOTICE^E_WARNING^E_DEPRECATED); |
||||
include_once('../config.php'); |
||||
$uid = $_COOKIE['uid']; |
||||
$loginid = md5($config['username'].$config['password']); |
||||
if($uid != $loginid) { |
||||
echo '权限不足'; |
||||
exit; |
||||
} |
||||
?> |
||||
<!DOCTYPE html> |
||||
<html lang="en" xmlns="http://www.w3.org/1999/xhtml"> |
||||
<head> |
||||
<meta charset="utf-8" /> |
||||
<title>ImgURL后台管理</title> |
||||
<meta name="generator" content="EverEdit" /> |
||||
<meta name="author" content="" /> |
||||
<meta name="keywords" content="" /> |
||||
<meta name="description" content="" /> |
||||
<link rel="stylesheet" href="../static/layui/css/layui.css"> |
||||
<link rel="stylesheet" href="../static/admin.css"> |
||||
<script src = "../static/layui/layui.js"></script> |
||||
<script src = "../static/admin.js"></script> |
||||
</head> |
||||
<body> |
||||
<!--导航栏--> |
||||
<div id="menu"> |
||||
<div class="layui-container"> |
||||
<div class="layui-row"> |
||||
<div class="layui-col-lg10 layui-col-md-offset1"> |
||||
<div style = "float: left;"> |
||||
<ul class="layui-nav" lay-filter=""> |
||||
<li class="layui-nav-item"><a href="">首页</a></li> |
||||
<li class="layui-nav-item"><a href="">探索发现</a></li> |
||||
<li class="layui-nav-item"><a href="">捐赠版</a></li> |
||||
<li class="layui-nav-item"><a href="">帮助文档</a></li> |
||||
<li class="layui-nav-item"><a href="">关于</a></li> |
||||
</ul> |
||||
</div> |
||||
<div style = "float: right;"> |
||||
<ul class="layui-nav"> |
||||
<li class="layui-nav-item"> |
||||
<a href="">回收站<span class="layui-badge">9</span></a> |
||||
</li> |
||||
<li class="layui-nav-item"> |
||||
<a href="">后台管理</a> |
||||
<dl class="layui-nav-child"> |
||||
<dd><a href="javascript:;">修改信息</a></dd> |
||||
<dd><a href="javascript:;">安全管理</a></dd> |
||||
<dd><a href="javascript:;">退出</a></dd> |
||||
</dl> |
||||
</li> |
||||
</ul> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
<div style = "clear:both;"></div> |
||||
<!--导航栏END--> |
||||
|
||||
<!--侧边栏--> |
||||
<div id = "sidebar"> |
||||
<div class="layui-container"> |
||||
<div class="layui-row"> |
||||
<div class="layui-col-lg10 layui-col-md-offset1"> |
||||
<div class="layui-col-lg3"> |
||||
<div class = "left-menu"> |
||||
<ul> |
||||
<li><h2>后台管理</h2></li> |
||||
<li><a href="./pics.php?type=user">游客上传</a></li> |
||||
<li><a href="./pics.php?type=admin">管理员上传</a></li> |
||||
<li><a href="">API上传</a></li> |
||||
<li><a href="">API管理</a></li> |
||||
</ul> |
||||
</div> |
||||
</div> |
Loading…
Reference in new issue