You've already forked EasyImages2.0
mirror of
https://github.com/icret/EasyImages2.0.git
synced 2025-12-13 11:43:58 +08:00
fix bugs
This commit is contained in:
@@ -1,25 +1,44 @@
|
||||
<?php
|
||||
defined('APP_ROOT') ?: exit; // 禁止访问
|
||||
if ($config['ad_bot']) echo $config['ad_bot_info']; // 底部广告
|
||||
?>
|
||||
<footer class="container text-muted small navbar-fixed-bottom" style="text-align: center;background-color:rgba(255,255,255,0.7);">
|
||||
<hr>
|
||||
<!-- 对话框HTML -->
|
||||
<div class="modal fade" id="myModal">
|
||||
<div class="modal-dialog modal-sm">
|
||||
// 禁止直接访问
|
||||
defined('APP_ROOT') ?: exit;
|
||||
// 底部广告
|
||||
if ($config['ad_bot']) echo $config['ad_bot_info'];
|
||||
// 弹窗公告
|
||||
if ($config['notice_status'] == 1 && !empty($config['notice'])) : ?>
|
||||
<div class="modal fade" id="notice">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal">
|
||||
<span aria-hidden="true">x</span>
|
||||
<span class="sr-only">关闭</span></button>
|
||||
<p class="modal-title icon icon-mobile" style="text-align: center">扫描二维码使用手机上传</p>
|
||||
<p class="modal-title icon icon-bell" style="text-align: center"> 网站公告</p>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<p id="qrcode"></p>
|
||||
<?php echo $config['notice']; ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<!-- 二维码 -->
|
||||
<div class="modal fade" id="qr">
|
||||
<div class="modal-dialog modal-sm">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal">
|
||||
<span aria-hidden="true">x</span>
|
||||
<span class="sr-only">关闭</span></button>
|
||||
<p class="modal-title icon icon-mobile" style="text-align: center">扫描二维码使用手机上传</p>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<p id="qrcode"></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<footer class="container text-muted small navbar-fixed-bottom" style="text-align: center;background-color:rgba(255,255,255,0.7);">
|
||||
<hr>
|
||||
<?php /** 页脚信息 */ if (!empty($config['footer'])) echo $config['footer']; ?>
|
||||
<p>
|
||||
© 2018-<?php echo date("Y"); ?>
|
||||
@@ -27,8 +46,8 @@ if ($config['ad_bot']) echo $config['ad_bot_info']; // 底部广告
|
||||
<a href="https://github.com/icret/EasyImages2.0" target="_blank" rel="nofollow"><?php echo $config['version']; ?></a> By
|
||||
<a href="https://blog.png.cm" target="_blank">Icret</a>
|
||||
<a href="/admin/terms.php" target="_blank"> DMCA</a>
|
||||
<!-- 二维码对话框触发按钮 -->
|
||||
<a href="#" data-position="center" data-moveable="inside" data-moveable="true" data-toggle="modal" data-target="#myModal" title="使用手机扫描二维码访问"><i class="icon icon-qrcode hidden-xs inline-block"></i></a>
|
||||
<!-- 二维码按钮 -->
|
||||
<a data-toggle="modal" href="#qr" title="使用手机扫描二维码访问"><i class="icon icon-qrcode hidden-xs inline-block"></i></a>
|
||||
<?php
|
||||
// 登录与退出
|
||||
if (is_who_login('admin') || is_who_login('guest')) {
|
||||
@@ -64,6 +83,30 @@ if ($config['ad_bot']) echo $config['ad_bot_info']; // 底部广告
|
||||
correctLevel: QRCode.CorrectLevel.H
|
||||
});
|
||||
|
||||
// 二维码对话框属性
|
||||
$('#qr').modal({
|
||||
moveable: "inside",
|
||||
backdrop: false,
|
||||
show: false,
|
||||
})
|
||||
|
||||
<?php /** 弹窗公告控制 */ if ($config['notice_status'] == 1 && !empty($config['notice'])) : ?>
|
||||
if (document.cookie.indexOf("noticed=") == -1) {
|
||||
$('#notice').modal({
|
||||
backdrop: false,
|
||||
loadingIcon: "icon-spin",
|
||||
scrollInside: true,
|
||||
moveable: "inside",
|
||||
rememberPos: true,
|
||||
scrollInside: true
|
||||
}).on('hidden.zui.modal', function() {
|
||||
// 只有用户手动关闭才会存储cookie,避免不看公告直接刷新
|
||||
document.cookie = "noticed =1";
|
||||
console.log('网站公告已显示完毕')
|
||||
})
|
||||
}
|
||||
<?php endif; ?>
|
||||
|
||||
<?php /** 简繁转换 */ if ($config['language'] == 1) : ?>
|
||||
$.getScript("<?php static_cdn(); ?>/public/static/i18n/jquery.s2t.js", function() { //加载成功后,并执行回调函数
|
||||
$('*').s2t();
|
||||
|
||||
Reference in New Issue
Block a user