2019-05-23 15:12:06 +00:00
|
|
|
|
<?php
|
2021-11-09 03:43:23 +00:00
|
|
|
|
require_once 'application/header.php';
|
2021-05-04 12:54:59 +00:00
|
|
|
|
// 检查登录
|
|
|
|
|
mustLogin();
|
2019-05-23 15:12:06 +00:00
|
|
|
|
?>
|
2022-01-27 09:25:46 +00:00
|
|
|
|
<div class="col-md-12">
|
2022-02-13 08:14:46 +00:00
|
|
|
|
<!-- 公告 -->
|
|
|
|
|
<div class="marquee">
|
|
|
|
|
<div class="wrap">
|
|
|
|
|
<div id="marquee2">
|
|
|
|
|
<?php if (!empty($config['tips'])) echo $config['tips']; ?>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2022-02-04 16:25:19 +00:00
|
|
|
|
<div id='upShowID' class="uploader col-md-10 col-md-offset-1 clo-xs-12" data-ride="uploader" data-url="/application/upload.php">
|
2022-01-27 09:25:46 +00:00
|
|
|
|
<div class="uploader-message text-center">
|
|
|
|
|
<div class="content"></div>
|
|
|
|
|
<button type="button" class="close">x</button>
|
|
|
|
|
</div>
|
2022-02-04 16:25:19 +00:00
|
|
|
|
<div class="uploader-files file-list file-list-lg file-rename-by-click" data-drag-placeholder="Ctrl+V粘贴/选择文件/将图片直接拖拽至此处" style="min-height: 160px; border-style: dashed;"></div>
|
2022-01-27 09:25:46 +00:00
|
|
|
|
<div class="uploader-actions">
|
|
|
|
|
<div class="uploader-status pull-right text-muted"></div>
|
2022-02-04 16:25:19 +00:00
|
|
|
|
<button type="button" class="btn btn-link uploader-btn-browse"><i class="icon icon-plus"></i> 选择文件</button>
|
|
|
|
|
<button type="button" class="btn btn-link uploader-btn-start"><i class="icon icon-cloud-upload"></i> 开始上传</button>
|
|
|
|
|
<button type="button" class="btn btn-link uploader-btn-stop"><i class="icon icon-pause"></i>暂停上传</button>
|
2022-01-27 09:25:46 +00:00
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2022-02-04 16:25:19 +00:00
|
|
|
|
<div class="col-md-10 col-md-offset-1 clo-xs-12">
|
2022-01-27 09:25:46 +00:00
|
|
|
|
<ul class="nav nav-tabs">
|
|
|
|
|
<li <?php if ($config['upload_first_show'] == 1) echo 'class="active"'; ?>>
|
|
|
|
|
<a href="#" data-target="#tab2Content1" data-toggle="tab"><i class="icon icon-link"></i> 直链</a>
|
|
|
|
|
</li>
|
|
|
|
|
<li <?php if ($config['upload_first_show'] == 2) echo 'class="active"'; ?>>
|
|
|
|
|
<a href="#" data-target="#tab2Content2" data-toggle="tab"><i class="icon icon-chat"></i> 论坛代码</a>
|
|
|
|
|
</li>
|
|
|
|
|
<li <?php if ($config['upload_first_show'] == 3) echo 'class="active"'; ?>>
|
|
|
|
|
<a href="#" data-target="#tab2Content3" data-toggle="tab"><i class="icon icon-code"></i> MarkDown</a>
|
|
|
|
|
</li>
|
|
|
|
|
<li <?php if ($config['upload_first_show'] == 4) echo 'class="active"'; ?>>
|
|
|
|
|
<a href="#" data-target="#tab2Content4" data-toggle="tab"><i class="icon icon-html5"></i> HTML</a>
|
|
|
|
|
</li>
|
|
|
|
|
<li <?php if ($config['upload_first_show'] == 5) echo 'class="active"'; ?>>
|
|
|
|
|
<a href="#" data-target="#tab2Content5" data-toggle="tab"><i class="icon icon-trash"></i> 删除</a>
|
|
|
|
|
</li>
|
|
|
|
|
</ul>
|
|
|
|
|
<div class="tab-content" style="text-align:right;">
|
|
|
|
|
<div class="tab-pane fade <?php if ($config['upload_first_show'] == 1) echo 'active in'; ?>" id="tab2Content1">
|
|
|
|
|
<textarea class="form-control" rows="5" id="links" readonly></textarea>
|
2022-02-04 17:18:15 +00:00
|
|
|
|
<button class="btn btn-primary" style="margin-top:10px;" onclick="location.reload()"><i class="icon icon-undo"></i> 刷新</button>
|
|
|
|
|
<button id="btnLinks" class="btn btn-primary copyBtn1" data-loading-text="已经复制链接..." style="margin-top:10px;"><i class="icon icon-copy"></i> 复制</button>
|
2021-05-04 12:54:59 +00:00
|
|
|
|
</div>
|
2022-01-27 09:25:46 +00:00
|
|
|
|
<div class="tab-pane fade <?php if ($config['upload_first_show'] == 2) echo 'active in'; ?>" id="tab2Content2">
|
|
|
|
|
<textarea class="form-control" rows="5" id="bbscode" readonly></textarea>
|
2022-02-04 17:18:15 +00:00
|
|
|
|
<button class="btn btn-primary" style="margin-top:10px;" onclick="location.reload()"><i class="icon icon-undo"></i> 刷新</button>
|
|
|
|
|
<button id="btnBbscode" class="btn btn-primary copyBtn2" data-loading-text="已经复制链接..." style="margin-top:10px;"><i class="icon icon-copy"></i> 复制</button>
|
2021-05-04 12:54:59 +00:00
|
|
|
|
</div>
|
2022-01-27 09:25:46 +00:00
|
|
|
|
<div class="tab-pane fade <?php if ($config['upload_first_show'] == 3) echo 'active in'; ?>" id="tab2Content3">
|
|
|
|
|
<textarea class="form-control" rows="5" id="markdown" readonly></textarea>
|
2022-02-04 17:18:15 +00:00
|
|
|
|
<button class="btn btn-primary" style="margin-top:10px;" onclick="location.reload()"><i class="icon icon-undo"></i> 刷新</button>
|
|
|
|
|
<button id="btnMarkDown" class="btn btn-primary copyBtn3" data-loading-text="已经复制链接..." style="margin-top:10px;"><i class="icon icon-copy"></i> 复制</button>
|
2022-01-27 09:25:46 +00:00
|
|
|
|
</div>
|
|
|
|
|
<div class="tab-pane fade <?php if ($config['upload_first_show'] == 4) echo 'active in'; ?>" id="tab2Content4">
|
|
|
|
|
<textarea class="form-control" rows="5" id="html" readonly></textarea>
|
2022-02-04 17:18:15 +00:00
|
|
|
|
<button class="btn btn-primary" style="margin-top:10px;" onclick="location.reload()"><i class="icon icon-undo"></i> 刷新</button>
|
|
|
|
|
<button id="btnHtml" class="btn btn-primary copyBtn4" data-loading-text="已经复制链接..." style="margin-top:10px;"><i class="icon icon-copy"></i> 复制</button>
|
2022-01-27 09:25:46 +00:00
|
|
|
|
</div>
|
|
|
|
|
<div class="tab-pane fade <?php if ($config['upload_first_show'] == 5) echo 'active in'; ?>" id="tab2Content5">
|
|
|
|
|
<pre><textarea class="form-control" rows="5" id="del" readonly></textarea></pre>
|
2022-02-04 17:18:15 +00:00
|
|
|
|
<button class="btn btn-primary" style="margin-top:10px;" onclick="location.reload()"><i class="icon icon-undo"></i> 刷新</button>
|
|
|
|
|
<button id="btndel" class="btn btn-primary copyBtn5" data-loading-text="已经复制链接..." style="margin-top:10px;"><i class="icon icon-copy"></i> 复制</button>
|
2019-05-23 15:12:06 +00:00
|
|
|
|
</div>
|
2021-05-04 12:54:59 +00:00
|
|
|
|
</div>
|
2019-05-23 15:12:06 +00:00
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2021-05-04 12:54:59 +00:00
|
|
|
|
</table>
|
2022-01-27 09:25:46 +00:00
|
|
|
|
<link href="<?php static_cdn(); ?>/public/static/marquee/marquee.css" rel="stylesheet">
|
|
|
|
|
<link href="<?php static_cdn(); ?>/public/static/zui/lib/uploader/zui.uploader.min.css" rel="stylesheet">
|
|
|
|
|
<script src="<?php static_cdn(); ?>/public/static/zui/lib/uploader/zui.uploader.min.js"></script>
|
|
|
|
|
<script src="<?php static_cdn(); ?>/public/static/marquee/marquee.min.js"></script>
|
2022-01-03 18:40:33 +00:00
|
|
|
|
<script src="<?php static_cdn(); ?>/public/static/EasyImage.js"></script>
|
2021-05-04 12:54:59 +00:00
|
|
|
|
<script>
|
|
|
|
|
$('#upShowID').uploader({
|
2021-05-08 07:35:27 +00:00
|
|
|
|
// 自动上传
|
2021-05-04 12:54:59 +00:00
|
|
|
|
autoUpload: false,
|
|
|
|
|
// 文件上传提交地址
|
2022-02-04 12:28:33 +00:00
|
|
|
|
url: '/application/upload.php',
|
2021-05-04 12:54:59 +00:00
|
|
|
|
// 最大支持的上传文件
|
|
|
|
|
max_file_size: <?php echo $config['maxSize']; ?>,
|
2021-05-08 07:35:27 +00:00
|
|
|
|
// 分片上传 0为不分片 分片容易使图片上传失败
|
2021-05-04 12:54:59 +00:00
|
|
|
|
chunk_size: 0,
|
2022-01-02 21:43:03 +00:00
|
|
|
|
// 点击文件列表上传文件
|
2021-05-04 12:54:59 +00:00
|
|
|
|
browseByClickList: true,
|
2022-02-05 08:23:57 +00:00
|
|
|
|
// flash 上传组件地址
|
2022-02-06 07:39:57 +00:00
|
|
|
|
flash_swf_url: '<?php static_cdn(); ?>/public/static/zui/lib/uploader/Moxie.swf',
|
2022-02-05 08:23:57 +00:00
|
|
|
|
// silverlight 上传组件地址
|
2022-02-06 07:39:57 +00:00
|
|
|
|
flash_swf_url: '<?php static_cdn(); ?>/public/static/zui/lib/uploader/Moxie.xap',
|
2022-01-02 21:43:03 +00:00
|
|
|
|
// 预览图尺寸
|
2022-01-03 18:40:33 +00:00
|
|
|
|
previewImageSize: {
|
|
|
|
|
'width': 80,
|
|
|
|
|
'height': 80
|
|
|
|
|
},
|
2021-05-04 12:54:59 +00:00
|
|
|
|
// 上传格式过滤
|
|
|
|
|
filters: { // 只允许上传图片或图标(.ico)
|
2022-01-03 18:40:33 +00:00
|
|
|
|
mime_types: [{
|
|
|
|
|
title: '图片',
|
|
|
|
|
extensions: '<?php echo $config['extensions']; ?>'
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: '图标',
|
|
|
|
|
extensions: 'ico'
|
|
|
|
|
}
|
2021-05-22 03:27:53 +00:00
|
|
|
|
],
|
2021-05-04 12:54:59 +00:00
|
|
|
|
prevent_duplicates: true
|
|
|
|
|
},
|
|
|
|
|
// 限制文件上传数目
|
|
|
|
|
limitFilesCount: <?php echo $config['maxUploadFiles']; ?>,
|
2022-02-05 08:23:57 +00:00
|
|
|
|
// 重置上传失败的文件
|
2021-05-04 12:54:59 +00:00
|
|
|
|
autoResetFails: true,
|
2022-01-01 07:40:23 +00:00
|
|
|
|
<?php echo imgRatio(); ?>,
|
2022-01-03 18:40:33 +00:00
|
|
|
|
responseHandler: function(responseObject, file) {
|
2021-05-08 07:35:27 +00:00
|
|
|
|
var obj = JSON.parse(responseObject.response); //由JSON字符串转换为JSON对象
|
2022-01-02 21:43:03 +00:00
|
|
|
|
console.log(obj); // 输出log
|
2022-02-06 07:39:57 +00:00
|
|
|
|
console.log(file); // 输出log
|
2021-05-08 07:35:27 +00:00
|
|
|
|
if (obj.result === 'success') {
|
2022-02-06 07:39:57 +00:00
|
|
|
|
document.getElementById("links").innerHTML += obj.url + "\r\n";
|
|
|
|
|
document.getElementById("bbscode").innerHTML += "[img]" + obj.url + "[/img]\r\n";
|
|
|
|
|
document.getElementById("markdown").innerHTML += "![" + obj.srcName + "](" + obj.url + ")\r\n";
|
|
|
|
|
document.getElementById("html").innerHTML += '<img src="' + obj.url + '" alt="' + obj.srcName + '" />\r\n';
|
|
|
|
|
document.getElementById("del").innerHTML += obj.del + "\r\n";
|
2021-05-04 12:54:59 +00:00
|
|
|
|
} else {
|
2022-02-06 07:39:57 +00:00
|
|
|
|
return '上传失败,错误信息:' + obj.message;
|
2021-05-04 12:54:59 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
});
|
2022-01-27 09:25:46 +00:00
|
|
|
|
// 公告
|
|
|
|
|
(function() {
|
|
|
|
|
new Marquee({
|
|
|
|
|
// 要滚动的元素
|
|
|
|
|
elem: document.getElementById("marquee2"),
|
|
|
|
|
// 每次滚动的步长(px),默认0
|
|
|
|
|
step: 30,
|
|
|
|
|
// 滚动效果执行时间(ms),默认400
|
|
|
|
|
stepInterval: 400,
|
|
|
|
|
// 每次滚动间隔时间(ms),默认3000
|
|
|
|
|
interval: 3000,
|
|
|
|
|
// 滚动方向,up、down、left、right,默认为"left" 当前只支持上下
|
|
|
|
|
dir: 'up',
|
|
|
|
|
// 是否自动滚动,默认为true
|
|
|
|
|
autoPlay: true,
|
|
|
|
|
// 是否在鼠标滑过低级元素时暂停滚动,默认为true
|
|
|
|
|
hoverPause: true
|
|
|
|
|
});
|
|
|
|
|
})();
|
2021-05-04 12:54:59 +00:00
|
|
|
|
</script>
|
|
|
|
|
<?php
|
2021-11-09 03:43:23 +00:00
|
|
|
|
require_once APP_ROOT . '/application/footer.php';
|