37 lines
1.1 KiB
PHP
37 lines
1.1 KiB
PHP
<?php
|
|
/*****************************************************************************
|
|
* MediaUploader.php
|
|
* Contains the media uploading template.
|
|
*
|
|
* Kabuki CMS (C) 2013-2015, Aaron van Geffen
|
|
*****************************************************************************/
|
|
|
|
class MediaUploader extends SubTemplate
|
|
{
|
|
protected function html_content()
|
|
{
|
|
echo '
|
|
<form action="" class="admin_box" method="post" enctype="multipart/form-data">
|
|
<h2>Upload new photos</h2>
|
|
<div>
|
|
<h3>Select files</h3>
|
|
<input type="file" id="upload_queue" name="uploads[]" multiple>
|
|
</div>
|
|
<div id="upload_preview_area">
|
|
</div>
|
|
<div>
|
|
<input name="save" type="submit" value="Upload the lot">
|
|
</div>
|
|
</form>
|
|
<script type="text/javascript" src="', BASEURL, '/js/upload_queue.js" defer="defer"></script>
|
|
<script type="text/javascript" defer="defer">
|
|
setTimeout(function() {
|
|
var upload_queue = new UploadQueue({
|
|
queue_element: document.getElementById("upload_queue"),
|
|
preview_area: document.getElementById("upload_preview_area"),
|
|
});
|
|
}, 100);
|
|
</script>';
|
|
}
|
|
}
|