77 lines
2.1 KiB
HTML
77 lines
2.1 KiB
HTML
{php include pubTemplate("header")}
|
|
|
|
<link href="{SITE_URL}public/js/dropzone/dropzone.css" type="text/css" rel="stylesheet" />
|
|
<script src="{SITE_URL}public/js/dropzone/dropzone.js"></script>
|
|
|
|
<div class="container">
|
|
|
|
|
|
|
|
<nav aria-label="breadcrumb">
|
|
<ol class="breadcrumb">
|
|
<li class="breadcrumb-item"><a href="{SITE_URL}">首页</a></li>
|
|
<li class="breadcrumb-item"><a href="{tsUrl('photo')}">{$TS_APP['appname']}</a></li>
|
|
<li class="breadcrumb-item"><a href="{tsUrl('photo','album',array('id'=>$strAlbum['albumid']))}">{$strAlbum['albumname']}</a></li>
|
|
<li class="breadcrumb-item active" aria-current="page">上传图片</li>
|
|
</ol>
|
|
</nav>
|
|
|
|
|
|
<div class="card">
|
|
<div class="card-body">
|
|
|
|
|
|
|
|
|
|
<div class="alert alert-info">上传文件只支持:jpg,gif,png格式。</div>
|
|
|
|
|
|
|
|
<form id ="myAwesomeDropzone" style="width:100%;border:dashed;" action="{SITE_URL}index.php?app=photo&ac=upload&ts=do" class="dropzone">
|
|
<input type="hidden" name="albumid" value="{$albumid}">
|
|
<input type="hidden" name="addtime" value="{$addtime}"/>
|
|
</form>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="clear"></div>
|
|
|
|
|
|
<div class="mt-3">
|
|
|
|
<a class="btn btn-sm btn-outline-secondary" href="{tsUrl('photo','album',array('id'=>$strAlbum['albumid']))}">返回相册</a>
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
</div>
|
|
<script>
|
|
Dropzone.options.myAwesomeDropzone = {
|
|
paramName: "file", // The name that will be used to transfer the file
|
|
maxFilesize: "{$GLOBALS['TS_SITE']['photo_size']}", // MB
|
|
{if isMobile()}
|
|
acceptedFiles:"image/jpeg,image/png,image/gif",
|
|
{else}
|
|
acceptedFiles:".jpg,.png,.jpeg,.gif",
|
|
{/if}
|
|
dictDefaultMessage:'点击选择图片上传',
|
|
accept: function(file, done) {
|
|
if (file.name == "justinbieber.jpg") {
|
|
done("Naha, you don't.");
|
|
} else {
|
|
done();
|
|
}
|
|
},
|
|
queuecomplete:function (file) {
|
|
window.location = siteUrl+"index.php?app=photo&ac=album&ts=info&albumid={$albumid}&addtime={$addtime}";
|
|
}
|
|
|
|
};
|
|
</script>
|
|
{php include pubTemplate("footer")} |