_decodeProperties($_smarty_tpl, array ( 'version' => '3.1.39', 'unifunc' => 'content_6494329f39e988_35182846', 'has_nocache_code' => false, 'file_dependency' => array ( '29d9ca8c20b59f367915b53bec1ed8115af9df02' => array ( 0 => 'C:\\xampp\\htdocs\\hotelcommerce\\admin\\themes\\default\\template\\helpers\\uploader\\simple.tpl', 1 => 1687433793, 2 => 'file', ), ), 'includes' => array ( ), ),false)) { function content_6494329f39e988_35182846 (Smarty_Internal_Template $_smarty_tpl) { if ((isset($_smarty_tpl->tpl_vars['files']->value)) && count($_smarty_tpl->tpl_vars['files']->value) > 0) {?> _assignInScope('show_thumbnail', false);?> smarty->ext->_foreach->init($_smarty_tpl, $_smarty_tpl->tpl_vars['files']->value, 'file'); $_smarty_tpl->tpl_vars['file']->do_else = true; if ($_from !== null) foreach ($_from as $_smarty_tpl->tpl_vars['file']->value) { $_smarty_tpl->tpl_vars['file']->do_else = false; ?> tpl_vars['file']->value['image'])) && $_smarty_tpl->tpl_vars['file']->value['type'] == 'image') {?> _assignInScope('show_thumbnail', true);?> smarty->ext->_foreach->restore($_smarty_tpl, 1); if ($_smarty_tpl->tpl_vars['show_thumbnail']->value) {?>
smarty->ext->_foreach->init($_smarty_tpl, $_smarty_tpl->tpl_vars['files']->value, 'file'); $_smarty_tpl->tpl_vars['file']->do_else = true; if ($_from !== null) foreach ($_from as $_smarty_tpl->tpl_vars['file']->value) { $_smarty_tpl->tpl_vars['file']->do_else = false; ?> tpl_vars['file']->value['image'])) && $_smarty_tpl->tpl_vars['file']->value['type'] == 'image') {?>
tpl_vars['file']->value['image'];?> tpl_vars['file']->value['size']))) {?>

smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['l'][0], array( array('s'=>'File size'),$_smarty_tpl ) );?> tpl_vars['file']->value['size'];?> kb

tpl_vars['file']->value['delete_url']))) {?>

smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['l'][0], array( array('s'=>'Delete'),$_smarty_tpl ) );?>

smarty->ext->_foreach->restore($_smarty_tpl, 1);?>
tpl_vars['max_files']->value)) && count($_smarty_tpl->tpl_vars['files']->value) >= $_smarty_tpl->tpl_vars['max_files']->value) {?>
smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['l'][0], array( array('s'=>'You have reached the limit (%s) of files to upload, please remove files to continue uploading','sprintf'=>$_smarty_tpl->tpl_vars['max_files']->value),$_smarty_tpl ) );?>
tpl_vars['multiple']->value)) && $_smarty_tpl->tpl_vars['multiple']->value) {?> multiple="multiple" class="hide" />
tpl_vars['multiple']->value)) || !$_smarty_tpl->tpl_vars['multiple']->value) && (isset($_smarty_tpl->tpl_vars['files']->value)) && count($_smarty_tpl->tpl_vars['files']->value) == 1 && (isset($_smarty_tpl->tpl_vars['files']->value[0]['download_url']))) {?> tpl_vars['size']->value))) { echo call_user_func_array( $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['l'][0], array( array('s'=>'Download current file (%skb)','sprintf'=>$_smarty_tpl->tpl_vars['size']->value),$_smarty_tpl ) ); } else { echo call_user_func_array( $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['l'][0], array( array('s'=>'Download current file'),$_smarty_tpl ) ); }?>
type="text/javascript"> tpl_vars['multiple']->value)) && (isset($_smarty_tpl->tpl_vars['max_files']->value))) {?> var tpl_vars['id']->value, ENT_QUOTES, 'UTF-8', true);?> _max_files = tpl_vars['max_files']->value-count($_smarty_tpl->tpl_vars['files']->value);?> ; $(document).ready(function(){ $('#tpl_vars['id']->value, ENT_QUOTES, 'UTF-8', true);?> -selectbutton').click(function(e) { $('#tpl_vars['id']->value, ENT_QUOTES, 'UTF-8', true);?> ').trigger('click'); }); $('#tpl_vars['id']->value, ENT_QUOTES, 'UTF-8', true);?> -name').click(function(e) { $('#tpl_vars['id']->value, ENT_QUOTES, 'UTF-8', true);?> ').trigger('click'); }); $('#tpl_vars['id']->value, ENT_QUOTES, 'UTF-8', true);?> -name').on('dragenter', function(e) { e.stopPropagation(); e.preventDefault(); }); $('#tpl_vars['id']->value, ENT_QUOTES, 'UTF-8', true);?> -name').on('dragover', function(e) { e.stopPropagation(); e.preventDefault(); }); $('#tpl_vars['id']->value, ENT_QUOTES, 'UTF-8', true);?> -name').on('drop', function(e) { e.preventDefault(); var files = e.originalEvent.dataTransfer.files; $('#tpl_vars['id']->value, ENT_QUOTES, 'UTF-8', true);?> ')[0].files = files; $(this).val(files[0].name); }); $('#tpl_vars['id']->value, ENT_QUOTES, 'UTF-8', true);?> ').change(function(e) { if ($(this)[0].files !== undefined) { var files = $(this)[0].files; var name = ''; $.each(files, function(index, value) { name += value.name+', '; }); $('#tpl_vars['id']->value, ENT_QUOTES, 'UTF-8', true);?> -name').val(name.slice(0, -2)); } else // Internet Explorer 9 Compatibility { var name = $(this).val().split(/[\\/]/); $('#tpl_vars['id']->value, ENT_QUOTES, 'UTF-8', true);?> -name').val(name[name.length-1]); } }); if (typeof tpl_vars['id']->value, ENT_QUOTES, 'UTF-8', true);?> _max_files !== 'undefined') { $('#tpl_vars['id']->value, ENT_QUOTES, 'UTF-8', true);?> ').closest('form').on('submit', function(e) { if ($('#tpl_vars['id']->value, ENT_QUOTES, 'UTF-8', true);?> ')[0].files.length > tpl_vars['id']->value, ENT_QUOTES, 'UTF-8', true);?> _max_files) { e.preventDefault(); alert('smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['l'][0], array( array('s'=>sprintf('You can upload a maximum of %s files',$_smarty_tpl->tpl_vars['max_files']->value)),$_smarty_tpl ) );?> '); } }); } }); >