-26 Removals
+29 Additions
<script> <script>
<!-- <!--
function insertAtCursor(myField, myValue) { function insertAtCursor(myField, myValue) {
//IE support //IE support
if (document.selection) { if (document.selection) {
myField.focus(); myField.focus();
sel = document.selection.createRange(); sel = document.selection.createRange();
sel.text = myValue; sel.text = myValue;
} }
//MOZILLA/NETSCAPE support //MOZILLA/NETSCAPE support
else if (myField.selectionStart || myField.selectionStart == '0') { else if (myField.selectionStart || myField.selectionStart == '0') {
var startPos = myField.selectionStart; var startPos = myField.selectionStart;
var endPos = myField.selectionEnd; var endPos = myField.selectionEnd;
myField.value = myField.value.substring(0, startPos) + myValue + myField.value.substring(endPos, myField.value.length); myField.value = myField.value.substring(0, startPos) + myValue + myField.value.substring(endPos, myField.value.length);
} else { } else {
myField.value += myValue; myField.value += myValue;
} }
} }
function insert_popup(code) function insert_popup(code)
{ {
# IF C_TINYMCE_EDITOR # # IF C_TINYMCE_EDITOR #
if (opener == null) if (opener == null)
var field = window.parent.document.getElementById("{FIELD}"); var field = window.parent.document.getElementById("{FIELD}");
else else
var field = opener.document.getElementById("{FIELD}"); var field = opener.document.getElementById("{FIELD}");
# ELSE # # ELSE #
var field = opener.document.getElementById("{FIELD}"); var field = opener.document.getElementById("{FIELD}");
# ENDIF # # ENDIF #
var field_type = field.tagName.toLowerCase(); var field_type = field.tagName.toLowerCase();
if (field_type == 'input') if (field_type == 'input')
{ {
field.value = code; field.value = code;
} }
else else
{ {
# IF C_TINYMCE_EDITOR # # IF C_TINYMCE_EDITOR #
window.parent.insertTinyMceContent(code); //insertion pour tinymce. window.parent.insertTinyMceContent(code); //insertion pour tinymce.
# ELSE # # ELSE #
insertAtCursor(field, code); insertAtCursor(field, code);
field.scrollTop(field.prop("selectionStart")); field.scrollTop(field.prop("selectionStart"));
# ENDIF # # ENDIF #
} }
field.focus(); field.focus();
} }
function close_popup() function close_popup()
{ {
opener=self; opener=self;
self.close(); self.close();
} }
function Confirm_member() { function Confirm_member() {
return confirm("{L_CONFIRM_EMPTY_FOLDER}"); return confirm("{L_CONFIRM_EMPTY_FOLDER}");
} }
function popup_upload(path, width, height, scrollbars) function popup_upload(path, width, height, scrollbars)
{ {
if( height == '0' ) if( height == '0' )
height = screen.height - 150; height = screen.height - 150;
if( width == '0' ) if( width == '0' )
width = screen.width - 200; width = screen.width - 200;
window.open(path, "", "width="+width+", height="+height+ ",location=no,status=no,toolbar=no,scrollbars=" + scrollbars + ",resizable=yes"); window.open(path, "", "width="+width+", height="+height+ ",location=no,status=no,toolbar=no,scrollbars=" + scrollbars + ",resizable=yes");
} }
var hide_folder = false; var hide_folder = false;
var empty_folder = 0; var empty_folder = 0;
function display_new_folder() function display_new_folder()
{ {
if( document.getElementById('empty-folder') ) if( document.getElementById('empty-folder') )
document.getElementById('empty-folder').style.display = 'none'; document.getElementById('empty-folder').style.display = 'none';
if ( typeof this.divid == 'undefined' ) if ( typeof this.divid == 'undefined' )
this.divid = 0; this.divid = 0;
else else
this.divid++; this.divid++;
if( !hide_folder ) if( !hide_folder )
{ {
document.getElementById('new-folder').innerHTML += '<div class="upload-elements-repertory" id="new-folder' + divid + '"><i class="fa fa-folder fa-2x"></i> <input type="text" name="folder_name" id="folder_name" value="" onblur="add_folder(\'{FOLDER_ID}\', \'{USER_ID}\', ' + divid + ');"></div>'; document.getElementById('new-folder').innerHTML += '<div class="upload-elements-repertory" id="new-folder' + divid + '"><i class="fa fa-folder fa-2x"></i> <input type="text" name="folder_name" id="folder_name" value="" onblur="add_folder(\'{FOLDER_ID}\', \'{USER_ID}\', ' + divid + ');"></div>';
document.getElementById('folder_name').focus(); document.getElementById('folder_name').focus();
} }
else else
{ {
document.getElementById('new-folder' + (divid - 1)).style.display = 'block'; document.getElementById('new-folder' + (divid - 1)).style.display = 'block';
document.getElementById('new-folder' + (divid - 1)).innerHTML = '<div class="upload-elements-repertory" id="new-folder' + divid + '"><i class="fa fa-folder fa-2x"></i> <input type="text" name="folder_name" id="folder_name" value="" onblur="add_folder(\'{FOLDER_ID}\', \'{USER_ID}\', ' + (divid - 1) + ');"></div>'; document.getElementById('new-folder' + (divid - 1)).innerHTML = '<div class="upload-elements-repertory" id="new-folder' + divid + '"><i class="fa fa-folder fa-2x"></i> <input type="text" name="folder_name" id="folder_name" value="" onblur="add_folder(\'{FOLDER_ID}\', \'{USER_ID}\', ' + (divid - 1) + ');"></div>';
document.getElementById('folder_name').focus(); document.getElementById('folder_name').focus();
this.divid--; this.divid--;
hide_folder = false; hide_folder = false;
} }
} }
function display_rename_folder(id, previous_name, previous_cut_name) function display_rename_folder(id, previous_name, previous_cut_name)
{ {
if( document.getElementById('f' + id) ) if( document.getElementById('f' + id) )
{ {
document.getElementById('f' + id).innerHTML = '<input type="text" name="finput' + id + '" id="finput' + id + '" value="' + previous_name + '" onblur="rename_folder(\'' + id + '\', \'' + previous_name.replace(/\'/g, "\\\'") + '\', \'' + previous_cut_name.replace(/\'/g, "\\\'") + '\');">'; document.getElementById('f' + id).innerHTML = '<input type="text" name="finput' + id + '" id="finput' + id + '" value="' + previous_name + '" onblur="rename_folder(\'' + id + '\', \'' + previous_name.replace(/\'/g, "\\\'") + '\', \'' + previous_cut_name.replace(/\'/g, "\\\'") + '\');">';
document.getElementById('finput' + id).focus(); document.getElementById('finput' + id).focus();
} }
} }
function rename_folder(id_folder, previous_name, previous_cut_name) function rename_folder(id_folder, previous_name, previous_cut_name)
{ {
var name = document.getElementById('finput' + id_folder).value; var name = document.getElementById('finput' + id_folder).value;
var regex = /\/|\.|\\|\||\?|<|>|\"/; var regex = /\/|\.|\\|\||\?|<|>|\"/;
document.getElementById('img' + id_folder).innerHTML = '<i class="fa fa-spinner fa-spin"></i>'; document.getElementById('img' + id_folder).innerHTML = '<i class="fa fa-spinner fa-spin"></i>';
if( name != '' && regex.test(name) ) //interdiction des caractères spéciaux dans la nom. if( name != '' && regex.test(name) ) //interdiction des caractères spéciaux dans la nom.
{ {
alert("{L_FOLDER_FORBIDDEN_CHARS}"); alert("{L_FOLDER_FORBIDDEN_CHARS}");
document.getElementById('f' + id_folder).innerHTML = '<a href="upload.php?f=' + id_folder + '{POPUP}">' + previous_cut_name + '</a>'; document.getElementById('f' + id_folder).innerHTML = '<a href="upload.php?f=' + id_folder + '{POPUP}">' + previous_cut_name + '</a>';
document.getElementById('img' + id_folder).innerHTML = ''; document.getElementById('img' + id_folder).innerHTML = '';
} }
else if( name != '' ) else if( name != '' )
{ {
name2 = escape_xmlhttprequest(name); name2 = escape_xmlhttprequest(name);
data = "id_folder=" + id_folder + "&name=" + name2 + "&previous_name=" + previous_name; data = "id_folder=" + id_folder + "&name=" + name2 + "&previous_name=" + previous_name;
var xhr_object = xmlhttprequest_init('../kernel/framework/ajax/uploads_xmlhttprequest.php?token={TOKEN}&rename_folder=1'); var xhr_object = xmlhttprequest_init('../kernel/framework/ajax/uploads_xmlhttprequest.php?token={TOKEN}&rename_folder=1');
xhr_object.onreadystatechange = function() xhr_object.onreadystatechange = function()
{ {
if( xhr_object.readyState == 4 && xhr_object.status == 200 ) if( xhr_object.readyState == 4 && xhr_object.status == 200 )
{ {
if( xhr_object.responseText != '' ) if( xhr_object.responseText != '' )
{ {
document.getElementById('f' + id_folder).innerHTML = '<a href="upload.php?f=' + id_folder + '{POPUP}">' + name + '</a>'; document.getElementById('f' + id_folder).innerHTML = '<a href="upload.php?f=' + id_folder + '{POPUP}">' + name + '</a>';
document.getElementById('fhref' + id_folder).innerHTML = '<a href="javascript:display_rename_folder(\'' + id_folder + '\', \'' + xhr_object.responseText.replace(/\'/g, "\\\'") + '\', \'' + name.replace(/\'/g, "\\\'") + '\');" class="fa fa-edit"></a>'; document.getElementById('fhref' + id_folder).innerHTML = '<a href="javascript:display_rename_folder(\'' + id_folder + '\', \'' + xhr_object.responseText.replace(/\'/g, "\\\'") + '\', \'' + name.replace(/\'/g, "\\\'") + '\');" class="fa fa-edit"></a>';
} }
else else
{ {
alert("{L_FOLDER_ALREADY_EXIST}"); alert("{L_FOLDER_ALREADY_EXIST}");
document.getElementById('f' + id_folder).innerHTML = '<a href="upload.php?f=' + id_folder + '{POPUP}">' + previous_cut_name + '</a>'; document.getElementById('f' + id_folder).innerHTML = '<a href="upload.php?f=' + id_folder + '{POPUP}">' + previous_cut_name + '</a>';
} }
document.getElementById('img' + id_folder).innerHTML = ''; document.getElementById('img' + id_folder).innerHTML = '';
} }
else if( xhr_object.readyState == 4 ) else if( xhr_object.readyState == 4 )
document.getElementById('img' + id_folder).innerHTML = ''; document.getElementById('img' + id_folder).innerHTML = '';
} }
xmlhttprequest_sender(xhr_object, data); xmlhttprequest_sender(xhr_object, data);
} }
} }
function add_folder(id_parent, user_id, divid) function add_folder(id_parent, user_id, divid)
{ {
var name = document.getElementById("folder_name").value; var name = document.getElementById("folder_name").value;
var regex = /\/|\.|\\|\||\?|<|>|\"/; var regex = /\/|\.|\\|\||\?|<|>|\"/;
if( name != '' && regex.test(name) ) //interdiction des caractères spéciaux dans le nom. if( name != '' && regex.test(name) ) //interdiction des caractères spéciaux dans le nom.
{ {
alert("{L_FOLDER_FORBIDDEN_CHARS}"); alert("{L_FOLDER_FORBIDDEN_CHARS}");
document.getElementById('new-folder' + divid).innerHTML = ''; document.getElementById('new-folder' + divid).innerHTML = '';
document.getElementById('new-folder' + divid).style.display = 'none'; document.getElementById('new-folder' + divid).style.display = 'none';
hide_folder = true; hide_folder = true;
if( document.getElementById('empty-folder') && empty_folder == 0 ) if( document.getElementById('empty-folder') && empty_folder == 0 )
document.getElementById('empty-folder').style.display = 'block'; document.getElementById('empty-folder').style.display = 'block';
} }
else if( name != '' ) else if( name != '' )
{ {
name2 = escape_xmlhttprequest(name); name2 = escape_xmlhttprequest(name);
data = "name=" + name2 + "&user_id=" + user_id + "&id_parent=" + id_parent; data = "name=" + name2 + "&user_id=" + user_id + "&id_parent=" + id_parent;
var xhr_object = xmlhttprequest_init('../kernel/framework/ajax/uploads_xmlhttprequest.php?token={TOKEN}&new_folder=1'); var xhr_object = xmlhttprequest_init('../kernel/framework/ajax/uploads_xmlhttprequest.php?token={TOKEN}&new_folder=1');
xhr_object.onreadystatechange = function() xhr_object.onreadystatechange = function()
{ {
if( xhr_object.readyState == 4 && xhr_object.status == 200 ) if( xhr_object.readyState == 4 && xhr_object.status == 200 )
{ {
if( xhr_object.responseText > 0 ) if( xhr_object.responseText > 0 )
{ {
document.getElementById('new-folder' + divid).innerHTML = '<a href="upload.php?f=' + xhr_object.responseText + '{POPUP}"><i class="fa fa-folder fa-2x"></i></a><br /> &nbsp;<span id="f' + xhr_object.responseText + '"><a href="upload.php?f=' + xhr_object.responseText + '{POPUP}">' + name + '</a></span><br /> <div class="upload-repertory-controls"><span id="fhref' + xhr_object.responseText + '"><a href="javascript:display_rename_folder(\'' + xhr_object.responseText + '\', \'' + name.replace(/\'/g, "\\\'") + '\', \'' + name.replace(/\'/g, "\\\'") + '\');" class="fa fa-edit"></a></span>&nbsp;<span><a href="upload.php?delf=' + xhr_object.responseText + '&amp;f={FOLDER_ID}&amp;token={TOKEN}{POPUP}" data-confirmation="delete-element"><i class="fa fa-delete"></i></a></span>&nbsp;<span><a href="upload.php?movefd=' + xhr_object.responseText + '&amp;f={FOLDER_ID}{POPUP}" title="{L_MOVETO}" class="fa fa-move"></a></span><span id="img' + xhr_object.responseText + '"></span></div>'; document.getElementById('new-folder' + divid).innerHTML = '<a class="infos-options" href="upload.php?f=' + xhr_object.responseText + '{POPUP}"><i class="fa fa-folder fa-2x"></i></a> &nbsp;<span class="infos-options" id="f' + xhr_object.responseText + '"><a href="upload.php?f=' + xhr_object.responseText + '{POPUP}">' + name + '</a></span> <div class="upload-repertory-controls"><span id="fhref' + xhr_object.responseText + '"><a href="javascript:display_rename_folder(\'' + xhr_object.responseText + '\', \'' + name.replace(/\'/g, "\\\'") + '\', \'' + name.replace(/\'/g, "\\\'") + '\');" class="fa fa-edit"></a></span>&nbsp;<span><a href="upload.php?delf=' + xhr_object.responseText + '&amp;f={FOLDER_ID}&amp;token={TOKEN}{POPUP}" data-confirmation="delete-element"><i class="fa fa-delete"></i></a></span>&nbsp;<span><a href="upload.php?movefd=' + xhr_object.responseText + '&amp;f={FOLDER_ID}{POPUP}" title="{L_MOVETO}" class="fa fa-move"></a></span><span id="img' + xhr_object.responseText + '"></span></div>';
var total_folder = document.getElementById('total-folder').innerHTML; var total_folder = document.getElementById('total-folder').innerHTML;
total_folder++; total_folder++;
document.getElementById('total-folder').innerHTML = total_folder; document.getElementById('total-folder').innerHTML = total_folder;
empty_folder++; empty_folder++;
} }
else else
{ {
alert("{L_FOLDER_ALREADY_EXIST}"); alert("{L_FOLDER_ALREADY_EXIST}");
document.getElementById('new-folder' + divid).innerHTML = ''; document.getElementById('new-folder' + divid).innerHTML = '';
document.getElementById('new-folder' + divid).style.display = 'none'; document.getElementById('new-folder' + divid).style.display = 'none';
hide_folder = true; hide_folder = true;
} }
} }
} }
xmlhttprequest_sender(xhr_object, data); xmlhttprequest_sender(xhr_object, data);
} }
else else
{ {
if( document.getElementById('empty-folder') && empty_folder == 0 ) if( document.getElementById('empty-folder') && empty_folder == 0 )
document.getElementById('empty-folder').style.display = 'block'; document.getElementById('empty-folder').style.display = 'block';
document.getElementById('new-folder' + divid).innerHTML = ''; document.getElementById('new-folder' + divid).innerHTML = '';
document.getElementById('new-folder' + divid).style.display = 'none'; document.getElementById('new-folder' + divid).style.display = 'none';
hide_folder = true; hide_folder = true;
} }
} }
function display_rename_file(id, previous_name, previous_cut_name) function display_rename_file(id, previous_name, previous_cut_name)
{ {
if( document.getElementById('fi' + id) ) if( document.getElementById('fi' + id) )
{ {
document.getElementById('fi1' + id).style.display = 'none'; document.getElementById('fi1' + id).style.display = 'none';
document.getElementById('fi' + id).style.display = 'inline'; document.getElementById('fi' + id).style.display = 'inline';
document.getElementById('fi' + id).innerHTML = '<input type="text" name="fiinput' + id + '" id="fiinput' + id + '" value="' + previous_name + '" onblur="rename_file(\'' + id + '\', \'' + previous_name.replace(/\'/g, "\\\'") + '\', \'' + previous_cut_name.replace(/\'/g, "\\\'") + '\');">'; document.getElementById('fi' + id).innerHTML = '<input type="text" name="fiinput' + id + '" id="fiinput' + id + '" value="' + previous_name + '" onblur="rename_file(\'' + id + '\', \'' + previous_name.replace(/\'/g, "\\\'") + '\', \'' + previous_cut_name.replace(/\'/g, "\\\'") + '\');">';
document.getElementById('fiinput' + id).focus(); document.getElementById('fiinput' + id).focus();
} }
} }
function rename_file(id_file, previous_name, previous_cut_name) function rename_file(id_file, previous_name, previous_cut_name)
{ {
var name = document.getElementById("fiinput" + id_file).value; var name = document.getElementById("fiinput" + id_file).value;
var regex = /\/|\\|\||\?|<|>|\"/; var regex = /\/|\\|\||\?|<|>|\"/;
document.getElementById('imgf' + id_file).innerHTML = '<i class="fa fa-spinner fa-spin"></i>'; document.getElementById('imgf' + id_file).innerHTML = '<i class="fa fa-spinner fa-spin"></i>';
if( name != '' && regex.test(name) ) //interdiction des caractères spéciaux dans la nom. if( name != '' && regex.test(name) ) //interdiction des caractères spéciaux dans la nom.
{ {
alert("{L_FOLDER_FORBIDDEN_CHARS}"); alert("{L_FOLDER_FORBIDDEN_CHARS}");
document.getElementById('fi1' + id_file).style.display = 'inline'; document.getElementById('fi1' + id_file).style.display = 'inline';
document.getElementById('fi' + id_file).style.display = 'none'; document.getElementById('fi' + id_file).style.display = 'none';
document.getElementById('imgf' + id_file).innerHTML = ''; document.getElementById('imgf' + id_file).innerHTML = '';
} }
else if( name != '' ) else if( name != '' )
{ {
name2 = escape_xmlhttprequest(name); name2 = escape_xmlhttprequest(name);
data = "id_file=" + id_file + "&name=" + name2 + "&previous_name=" + previous_cut_name; data = "id_file=" + id_file + "&name=" + name2 + "&previous_name=" + previous_cut_name;
var xhr_object = xmlhttprequest_init('../kernel/framework/ajax/uploads_xmlhttprequest.php?token={TOKEN}&rename_file=1'); var xhr_object = xmlhttprequest_init('../kernel/framework/ajax/uploads_xmlhttprequest.php?token={TOKEN}&rename_file=1');
xhr_object.onreadystatechange = function() xhr_object.onreadystatechange = function()
{ {
if( xhr_object.readyState == 4 && xhr_object.status == 200 && xhr_object.responseText != '' ) if( xhr_object.readyState == 4 && xhr_object.status == 200 && xhr_object.responseText != '' )
{ {
if( xhr_object.responseText == '/' ) if( xhr_object.responseText == '/' )
{ {
alert("{L_FOLDER_ALREADY_EXIST}"); alert("{L_FOLDER_ALREADY_EXIST}");
document.getElementById('fi1' + id_file).style.display = 'inline'; document.getElementById('fi1' + id_file).style.display = 'inline';
document.getElementById('fi' + id_file).style.display = 'none'; document.getElementById('fi' + id_file).style.display = 'none';
} }
else else
{ {
document.getElementById('fi' + id_file).style.display = 'none'; document.getElementById('fi' + id_file).style.display = 'none';
document.getElementById('fi1' + id_file).style.display = 'inline'; document.getElementById('fi1' + id_file).style.display = 'inline';
document.getElementById('fi1' + id_file).innerHTML = xhr_object.responseText; document.getElementById('fi1' + id_file).innerHTML = xhr_object.responseText;
document.getElementById('fihref' + id_file).innerHTML = '<a href="javascript:display_rename_file(\'' + id_file + '\', \'' + name.replace(/\'/g, "\\\'") + '\', \'' + previous_name.replace(/\'/g, "\\\'") + '\', \'' + xhr_object.responseText.replace(/\'/g, "\\\'") + '\');" class="fa fa-edit"></a>'; document.getElementById('fihref' + id_file).innerHTML = '<a href="javascript:display_rename_file(\'' + id_file + '\', \'' + name.replace(/\'/g, "\\\'") + '\', \'' + previous_name.replace(/\'/g, "\\\'") + '\', \'' + xhr_object.responseText.replace(/\'/g, "\\\'") + '\');" class="fa fa-edit"></a>';
} }
document.getElementById('imgf' + id_file).innerHTML = ''; document.getElementById('imgf' + id_file).innerHTML = '';
} }
else if( xhr_object.readyState == 4 && xhr_object.responseText == '' ) else if( xhr_object.readyState == 4 && xhr_object.responseText == '' )
{ {
document.getElementById('fi' + id_file).style.display = 'none'; document.getElementById('fi' + id_file).style.display = 'none';
document.getElementById('fi1' + id_file).style.display = 'inline'; document.getElementById('fi1' + id_file).style.display = 'inline';
document.getElementById('fihref' + id_file).innerHTML = '<a href="javascript:display_rename_file(\'' + id_file + '\', \'' + previous_name.replace(/\'/g, "\\\'") + '\', \'' + previous_cut_name.replace(/\'/g, "\\\'") + '\');" class="fa fa-edit"></a>'; document.getElementById('fihref' + id_file).innerHTML = '<a href="javascript:display_rename_file(\'' + id_file + '\', \'' + previous_name.replace(/\'/g, "\\\'") + '\', \'' + previous_cut_name.replace(/\'/g, "\\\'") + '\');" class="fa fa-edit"></a>';
document.getElementById('imgf' + id_file).innerHTML = ''; document.getElementById('imgf' + id_file).innerHTML = '';
} }
} }
xmlhttprequest_sender(xhr_object, data); xmlhttprequest_sender(xhr_object, data);
} }
} }
var delay = 1000; //Délai après lequel le bloc est automatiquement masqué, après le départ de la souris. var delay = 1000; //Délai après lequel le bloc est automatiquement masqué, après le départ de la souris.
var timeout; var timeout;
var displayed = false; var displayed = false;
var previous_block; var previous_block;
//Affiche le bloc. //Affiche le bloc.
function upload_display_block(divID) function upload_display_block(divID)
{ {
var i; var i;
if( timeout ) if( timeout )
clearTimeout(timeout); clearTimeout(timeout);
var block = document.getElementById('move' + divID); var block = document.getElementById('move' + divID);
if( block.style.display == 'none' ) if( block.style.display == 'none' )
{ {
if( document.getElementById(previous_block) ) if( document.getElementById(previous_block) )
document.getElementById(previous_block).style.display = 'none'; document.getElementById(previous_block).style.display = 'none';
displayed = true; displayed = true;
block.style.display = 'block'; block.style.display = 'block';
previous_block = 'move' + divID; previous_block = 'move' + divID;
} }
else else
{ {
block.style.display = 'none'; block.style.display = 'none';
displayed = false; displayed = false;
} }
} }
//Cache le bloc. //Cache le bloc.
function upload_hide_block(idfield, stop) function upload_hide_block(idfield, stop)
{ {
if( stop && timeout ) if( stop && timeout )
{ {
clearTimeout(timeout); clearTimeout(timeout);
} }
else if( displayed ) else if( displayed )
{ {
clearTimeout(timeout); clearTimeout(timeout);
timeout = setTimeout('upload_display_block(\'' + idfield + '\')', delay); timeout = setTimeout('upload_display_block(\'' + idfield + '\')', delay);
} }
} }
var selected = 0; var selected = 0;
function select_div(id) function select_div(id)
{ {
if( document.getElementById(id) ) if( document.getElementById(id) )
{ {
if( selected == 0 ) if( selected == 0 )
{ {
document.getElementById(id).select(); document.getElementById(id).select();
selected = 1; selected = 1;
} }
else else
{ {
document.getElementById(id).blur(); document.getElementById(id).blur();
selected = 0; selected = 0;
} }
} }
} }
--> -->
</script> </script>
<section id="module-user-upload"> <section id="module-user-upload">
<header> <header>
<h1>{L_FILES_ACTION}</h1> <h1>{L_FILES_ACTION}</h1>
</header> </header>
<div class="content"> <div class="content">
<div id="new-file"> <div id="new-file">
# INCLUDE message_helper # # INCLUDE message_helper #
<form action="upload.php?f={FOLDER_ID}&amp;token={TOKEN}{POPUP}" enctype="multipart/form-data" method="post"> <form action="upload.php?f={FOLDER_ID}&amp;token={TOKEN}{POPUP}" enctype="multipart/form-data" method="post">
<fieldset> <fieldset>
<legend>{L_ADD_FILES}</legend> <legend>{L_ADD_FILES}</legend>
<div class="form-element"> <div class="form-element">
<div class="form-field"> <div class="form-field">
<input type="file" name="upload_file" id="upload-file"> <input type="file" name="upload_file" id="upload-file">
<input type="hidden" name="max_file_size" value="2000000"> <input type="hidden" name="max_file_size" value="2000000">
</div> </div>
<input type="hidden" name="token" value="{TOKEN}"> <input type="hidden" name="token" value="{TOKEN}">
<button type="submit" name="valid_up" value="true" class="submit">{L_UPLOAD}</button> <button type="submit" name="valid_up" value="true" class="submit">{L_UPLOAD}</button>
</div> </div>
</fieldset> </fieldset>
</form> </form>
</div> </div>
<div class="upload-address-bar"> <div class="upload-address-bar">
<a href="upload.php?root=1{POPUP}"><i class="fa fa-home"></i> {L_ROOT}</a>{URL} <a href="upload.php?root=1{POPUP}"><i class="fa fa-home" aria-hidden="true"></i> {L_ROOT}</a>{URL}
</div> </div>
<div class="upload-address-bar-links"> <div class="upload-address-bar-links">
<a href="upload.php?fup={FOLDER_ID}{POPUP}"> <a href="upload.php?fup={FOLDER_ID}{POPUP}">
<i class="fa fa-level-up"></i> {L_FOLDER_UP} <i class="fa fa-level-up" aria-hidden="true"></i> {L_FOLDER_UP}
</a> </a>
<a href="javascript:display_new_folder();"> <a href="javascript:display_new_folder();">
<i class="fa fa-plus"></i> {L_FOLDER_NEW} <i class="fa fa-plus" aria-hidden="true"></i> {L_FOLDER_NEW}
</a> </a>
<a href="javascript:document.getElementById('upload-file').click();"> <a href="javascript:document.getElementById('upload-file').click();">
<i class="fa fa-save"></i> {L_ADD_FILES} <i class="fa fa-save" aria-hidden="true"></i> {L_ADD_FILES}
</a> </a>
</div> </div>
<div class="spacer"></div> <div class="spacer"></div>
<legend>{L_FOLDER_CONTENT}</legend> <legend>{L_FOLDER_CONTENT}</legend>
<div class="upload-elements-container"> <div class="upload-elements-container">
# IF C_EMPTY_FOLDER # # IF C_EMPTY_FOLDER #
<div id="empty-folder" class="notice">{L_EMPTY_FOLDER}</div> <div id="empty-folder" class="message-helper notice">{L_EMPTY_FOLDER}</div>
<span id="new-folder"></span> <span id="new-folder"></span>
# ELSE # # ELSE #
# START folder # # START folder #
<div class="upload-elements-repertory"> <div class="upload-elements-repertory">
<a href="upload.php?f={folder.ID}{POPUP}" class="fa # IF folder.C_MEMBER_FOLDER #fa-users # ELSE #fa-folder # ENDIF #fa-2x"></a><br /> <a class="infos-options" href="upload.php?f={folder.ID}{POPUP}">
<span id="f{folder.ID}"><a href="upload.php?f={folder.ID}{POPUP}">{folder.NAME}</a></span><br /> <i class="fa # IF folder.C_MEMBER_FOLDER #fa-users # ELSE #fa-folder # ENDIF #fa-2x"></i>
</a>
<span class="infos-options" id="f{folder.ID}"><a href="upload.php?f={folder.ID}{POPUP}">{folder.NAME}</a></span>
<div class="upload-repertory-controls"> <div class="upload-repertory-controls">
{folder.RENAME_FOLDER} {folder.RENAME_FOLDER}
<span> <span>
<a href="upload.php?delf={folder.ID}&amp;f={FOLDER_ID}&amp;token={TOKEN}{POPUP}" title="{folder.L_TYPE_DEL_FOLDER}" class="fa fa-delete" data-confirmation="delete-element"></a> <a href="upload.php?delf={folder.ID}&amp;f={FOLDER_ID}&amp;token={TOKEN}{POPUP}" data-confirmation="delete-element" aria-label="{folder.L_TYPE_DEL_FOLDER}"><i class="fa fa-delete" aria-hidden="true" title="{folder.L_TYPE_DEL_FOLDER}"></i></a>
</span> </span>
<span> <span>
<a href="upload{folder.U_MOVE}" title="{L_MOVETO}" class="fa fa-move"></a> <a href="upload{folder.U_MOVE}" aria-label="{L_MOVETO}"><i class="fa fa-move" aria-hidden="true" title="{L_MOVETO}"></i></a>
</span> </span>
<span id="img{folder.ID}"></span> <span id="img{folder.ID}"></span>
</div> </div>
</div> </div>
# END folder # # END folder #
<span id="new-folder"></span> <span id="new-folder"></span>
# START files # # START files #
<div class="upload-elements-file"> <div class="upload-elements-file">
# IF files.C_IMG # # IF files.C_IMG #
<a href="{files.URL}" data-lightbox="formatter" data-rel="lightcase:collection" title="{files.TITLE}"> <a href="{files.URL}" data-lightbox="formatter" data-rel="lightcase:collection" title="{files.TITLE}">
<div class="upload-element-picture" style="background-image: url({files.URL})"></div> <div class="upload-element-picture" style="background-image: url({files.URL})"></div>
</a> </a>
# ELSE # # ELSE #
<a class="# IF files.C_RECENT_FILE #upload-recent-file# END IF #" href="{files.URL}" title="{files.TITLE}"{files.LIGHTBOX}> <a class="# IF files.C_RECENT_FILE #upload-recent-file# END IF #" href="{files.URL}" title="{files.TITLE}"{files.LIGHTBOX}>
<div class="upload-element-icon"><i class="fa {files.IMG}"></i></div> <div class="upload-element-icon"><i class="fa-upload-img {files.IMG}"></i></div>
</a> </a>
# ENDIF # # ENDIF #
<div class="upload-element-name# IF files.C_RECENT_FILE # upload-recent-file# ENDIF #" id="fi1{files.ID}">{files.NAME}</div> <div class="upload-element-name# IF files.C_RECENT_FILE # upload-recent-file# ENDIF #" id="fi1{files.ID}">{files.NAME}</div>
<span id="fi{files.ID}"></span> <span id="fi{files.ID}"></span>
{files.BBCODE} {files.BBCODE}
<div class="upload-file-controls"> <div class="upload-file-controls">
{files.RENAME_FILE} {files.RENAME_FILE}
<a href="upload.php?del={files.ID}&amp;f={FOLDER_ID}&amp;token={TOKEN}{POPUP}" title="{L_DELETE}" class="fa fa-delete" data-confirmation="delete-element"></a> <a href="upload.php?del={files.ID}&amp;f={FOLDER_ID}&amp;token={TOKEN}{POPUP}" data-confirmation="delete-element" aria-label="{L_DELETE}"><i class="fa fa-delete" aria-hidden="true" title="{L_DELETE}"></i></a>
<a href="upload{files.U_MOVE}" title="{L_MOVETO}" class="fa fa-move"></a> <a href="upload{files.U_MOVE}" aria-label="{L_MOVETO}"><i class="fa fa-move" aria-hidden="true" title="{L_MOVETO}"></i></a>
{files.INSERT} {files.INSERT}
</div> </div>
<span class="text-strong">{files.FILETYPE}</span><br /> <span class="infos-options text-strong">{files.FILETYPE}</span>
<span class="text-strong">{files.SIZE}</span> <span class="text-strong">{files.SIZE}</span>
<span id="imgf{files.ID}"></span> <span id="imgf{files.ID}"></span>
</div> </div>
# END files # # END files #
# ENDIF # # ENDIF #
<div class="options"> <div class="options infos">
{L_FOLDERS} : <strong><span id="total-folder">{TOTAL_FOLDERS}</span></strong><br /> <span class="infos-options" id="total-folder">{L_FOLDERS} : <strong>{TOTAL_FOLDERS}</strong></span>
{L_FILES} : <strong>{TOTAL_FILES}</strong><br /> <span class="infos-options">{L_FILES} : <strong>{TOTAL_FILES}</strong></span>
{L_FOLDER_SIZE} : <strong>{TOTAL_FOLDER_SIZE}</strong><br /> <span class="infos-options">{L_FOLDER_SIZE} : <strong>{TOTAL_FOLDER_SIZE}</strong></span>
{L_DATA} : <strong>{TOTAL_SIZE}</strong> <span class="infos-options">{L_DATA} : <strong>{TOTAL_SIZE}</strong></span>
</div> </div>
</div> </div>
</div> </div>
<footer> <footer>
# IF C_DISPLAY_CLOSE_BUTTON # # IF C_DISPLAY_CLOSE_BUTTON #
<fieldset class="fieldset-submit"> <fieldset class="fieldset-submit">
<legend>${LangLoader::get_message('close', 'main')}</legend> <legend>${LangLoader::get_message('close', 'main')}</legend>
<button type="reset" onclick="javascript:close_popup()" value="true">${LangLoader::get_message('close', 'main')}</button> <button type="reset" onclick="javascript:close_popup()" value="true">${LangLoader::get_message('close', 'main')}</button>
</fieldset> </fieldset>
# ENDIF # # ENDIF #
</footer> </footer>
</section> </section>
Editor
Original Text
Changed Text