<script type="text/javascript">$(window).resize(function(){ldelim}dinamicSizeSetFunction_menu();{rdelim});$(function(){ldelim}dinamicSizeSetFunction_menu();$("#uploader").pluploadQueue({ldelim}runtimes:'html5,html4',url:'{$main_url}/{href_entry key="uploader"}?u={$user_key}&t={$smarty.get.t|sanitize}{if $smarty.get.r ne ""}&r={$smarty.get.r|sanitize}{/if}',multipart: true,multipart_params: {ldelim}'UFUID': '{$smarty.session.USER_ID}','UFSUID': '{$user_key}'{rdelim},max_files: {$multiple_file_uploads},chunk_size: '1024kb',rename : false,prevent_duplicates: true,dragdrop: true,max_file_size : '{if $paid_memberships eq "1"}{if $subscription_bw lt $subscription_space and $subscription_bw gt 0}{$subscription_bw}{elseif $subscription_space gt 0}{$subscription_space}{else}{$file_limit}{/if}{else}{$file_limit}{/if}mb',filters : [{ldelim}title : "{lang_entry key="frontend.global.v.p.c"}", extensions : "{$allowed_file_cfg}"{rdelim}],views : {ldelim}list: true,thumbs: true,active: 'thumbs'{rdelim}{rdelim});var uploader = $('#uploader').pluploadQueue();uploader.bind('Init', function() {ldelim}{rdelim});uploader.bind('UploadComplete', function() {ldelim}$.post("?t={$smarty.get.t}&do=form-update", $('.c-entry-form-edit').serialize(), function(data){ldelim}$('#cb-response-wrap-no').html(data);{rdelim});uploader.splice();$('#cb-response-wrap').show();$("#dobrowse .start").addClass("off");$("#uploader_browse").removeClass("set");$(document).keyup(function(e) {ldelim}if(e.keyCode === 27)return{rdelim});{rdelim});uploader.bind('FilesAdded', function(up, files) {ldelim}if (up.settings.max_files > 0 && up.files.length >= up.settings.max_files) {ldelim}up.splice(up.settings.max_files);{rdelim}if (up.files.length > 0) {ldelim}$(".plupload_filelist_header").show();$("#dobrowse .start").removeClass("off").addClass("set");{rdelim}{rdelim});uploader.bind('FilesRemoved', function(up, files) {ldelim}if (up.files.length < up.settings.max_files) {ldelim}{rdelim}if (up.files.length == 0) {ldelim}$(".plupload_filelist_header").hide();$("#dobrowse .start").addClass("off");$("#uploader_browse").removeClass("set");{rdelim}{rdelim});uploader.bind('BeforeUpload', function(up, files) {ldelim}var uploader = $('#uploader').pluploadQueue();$("#UFNAME").val(files.name);$("#UFSIZE").val(files.size);$(document).keyup(function(e) {ldelim}if(e.keyCode === 27)uploader.stop();{rdelim});{rdelim});uploader.bind('Error', function(up, err) {ldelim}$("#notice-message").detach();var ht = '<div class="error-message" id="error-message"><p class="error-message-text">Error #' + err.code + ': ' + err.message + '</p></div>';$(ht).insertBefore("#upload-wrapper");var uploader = $('#uploader').pluploadQueue();uploader.stop();uploader.splice();{rdelim});uploader.bind('UploadProgress', function(up) {ldelim}$(".plupload_total_file_size").html(parseFloat(up.total.bytesPerSec/(1024)).toFixed(2) + " (KiB/s)");{rdelim});uploader.bind('FileUploaded', function(up,file) {ldelim}var the_form = "#upload-form";var the_url = $(the_form).attr("action");$.post(the_url, $(the_form).serialize(), function(data) {ldelim}$("#form-response").html(data);if($("#total-uploads").val() == '0'){ldelim}$("#fsUploadStats").load(the_url+"&do=reload-stats");{rdelim}{rdelim});{rdelim});SelectList.init("file_category_sel");{rdelim});window.addEventListener("offline",function(){ldelim}uploader.stop();{rdelim},false);window.addEventListener("online",function(){ldelim}uploader.start();{rdelim},false);</script>
