ImgURL是一个简单、纯粹的图床程序,让个人图床多一个选择。
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

39 lines
1.5 KiB

7 years ago
<?php
$title = "探索发现 - ImgURL";
include_once("./tpl/user/header.php");
// 载入类
include_once("config.php");
7 years ago
//获取当前时间
$thetime = date('Y-m',time());
7 years ago
//初始化
$domain = $config['domain'];
$userdir = $config['userdir'];
6 years ago
//$sql = "SELECT `id`,`path` FROM `imginfo` WHERE (`dir` = '$userdir' AND `level` < 3 AND `date` LIKE '$thetime%') ORDER BY random() LIMIT 12";
$sql = "SELECT `id`,`path` FROM `imginfo` WHERE (`dir` = '$userdir' AND `level` < 3 AND `date` LIKE '$thetime%') ORDER BY `id` DESC";
7 years ago
$datas = $database->query($sql)->fetchAll();
?>
<div class="layui-container" style = "margin-bottom:6em;">
6 years ago
<div class="layui-row" >
6 years ago
<div class="msg"><i class="layui-icon">&#xe645;</i> 此页面显示本月上传图片,如果不显示说明本月暂未上传图片。</div>
7 years ago
<div id = "found-img" class = "layui-col-space20">
<?php foreach ($datas as $img) {
$imgurl = $domain.$img['path'];
$imgid = $img['id'];
?>
6 years ago
<div class="layui-col-lg4" style = "height:220px;border:1px solid #ECECEC;margin-top:1em;">
7 years ago
<!-- <a href="javascript:;" onclick = "userpreview('<?php echo $imgurl ?>',<?php echo $imgid; ?>)"></a> -->
6 years ago
<img lay-src="<?php echo $imgurl ?>" layer-src="<?php echo $imgurl ?>" src = "./static/loading32.gif">
7 years ago
</div>
<?php } ?>
</div>
</div>
</div>
<?php
include_once("./tpl/user/footer.php");
?>