mirror of https://github.com/helloxz/imgurl.git
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.
35 lines
1.1 KiB
35 lines
1.1 KiB
7 years ago
|
<?php
|
||
|
$title = "探索发现 - ImgURL";
|
||
|
include_once("./tpl/user/header.php");
|
||
|
// 载入类
|
||
|
include_once("config.php");
|
||
|
|
||
|
|
||
|
//初始化
|
||
|
$domain = $config['domain'];
|
||
|
$userdir = $config['userdir'];
|
||
|
$sql = "SELECT `id`,`path` FROM `imginfo` WHERE (`dir` = '$userdir' AND `level` < 3) 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"></i> 此页面随机显示12张图片,刷新页面可重新随机。</div>
|
||
|
<div id = "found-img" class = "layui-col-space20">
|
||
|
<?php foreach ($datas as $img) {
|
||
|
$imgurl = $domain.$img['path'];
|
||
|
$imgid = $img['id'];
|
||
|
?>
|
||
|
<div class="layui-col-lg4">
|
||
|
<a href="javascript:;" onclick = "userpreview('<?php echo $imgurl ?>',<?php echo $imgid; ?>)"><img src="<?php echo $imgurl ?>"></a>
|
||
|
</div>
|
||
|
<?php } ?>
|
||
|
</div>
|
||
|
|
||
|
</div>
|
||
|
</div>
|
||
|
|
||
|
<?php
|
||
|
include_once("./tpl/user/footer.php");
|
||
|
?>
|