@@ -33,7 +33,7 @@ discard block |
||
33 | 33 | url: "sources/datatable/datatable.folders.php" |
34 | 34 | }, |
35 | 35 | "language": { |
36 | - "url": "includes/language/datatables.<?php echo $_SESSION['user_language'];?>.txt" |
|
36 | + "url": "includes/language/datatables.<?php echo $_SESSION['user_language']; ?>.txt" |
|
37 | 37 | }, |
38 | 38 | "columns": [ |
39 | 39 | {"width": "7%"}, |
@@ -59,7 +59,7 @@ discard block |
||
59 | 59 | autoOpen: false, |
60 | 60 | width: 350, |
61 | 61 | height: 450, |
62 | - title: "<?php echo $LANG['add_new_group'];?>", |
|
62 | + title: "<?php echo $LANG['add_new_group']; ?>", |
|
63 | 63 | open: function(event, ui) { |
64 | 64 | $("#new_folder_wait").hide(); |
65 | 65 | |
@@ -70,16 +70,16 @@ discard block |
||
70 | 70 | $("#parent_id").val("na"); |
71 | 71 | }, |
72 | 72 | buttons: { |
73 | - "<?php echo $LANG['save_button'];?>": function() { |
|
73 | + "<?php echo $LANG['save_button']; ?>": function() { |
|
74 | 74 | //Check if renewal_period is an integer |
75 | 75 | if (isInteger(document.getElementById("add_node_renewal_period").value) == false) { |
76 | - document.getElementById("addgroup_show_error").innerHTML = "<?php echo $LANG['error_renawal_period_not_integer'];?>"; |
|
76 | + document.getElementById("addgroup_show_error").innerHTML = "<?php echo $LANG['error_renawal_period_not_integer']; ?>"; |
|
77 | 77 | $("#addgroup_show_error").show(); |
78 | 78 | } else if (document.getElementById("new_rep_complexite").value == "") { |
79 | - document.getElementById("addgroup_show_error").innerHTML = "<?php echo $LANG['error_group_complex'];?>"; |
|
79 | + document.getElementById("addgroup_show_error").innerHTML = "<?php echo $LANG['error_group_complex']; ?>"; |
|
80 | 80 | $("#addgroup_show_error").show(); |
81 | 81 | } else if (document.getElementById("parent_id").value == "" || isNaN(document.getElementById("parent_id").value)) { |
82 | - document.getElementById("addgroup_show_error").innerHTML = "<?php echo $LANG['error_no_selected_folder'];?>"; |
|
82 | + document.getElementById("addgroup_show_error").innerHTML = "<?php echo $LANG['error_no_selected_folder']; ?>"; |
|
83 | 83 | $("#addgroup_show_error").show(); |
84 | 84 | } else { |
85 | 85 | if (document.getElementById("ajouter_groupe_titre").value != "" && document.getElementById("parent_id").value != "na") { |
@@ -94,22 +94,22 @@ discard block |
||
94 | 94 | "sources/folders.queries.php", |
95 | 95 | { |
96 | 96 | type : "add_folder", |
97 | - data : prepareExchangedData(data, "encode", "<?php echo $_SESSION['key'];?>"), |
|
98 | - key : "<?php echo $_SESSION['key'];?>" |
|
97 | + data : prepareExchangedData(data, "encode", "<?php echo $_SESSION['key']; ?>"), |
|
98 | + key : "<?php echo $_SESSION['key']; ?>" |
|
99 | 99 | }, |
100 | 100 | function(data) { |
101 | 101 | //Check errors |
102 | 102 | if (data[0].error == "error_group_exist") { |
103 | 103 | $("#div_add_group").dialog("open"); |
104 | - $("#addgroup_show_error").html("<?php echo $LANG['error_group_exist'];?>"); |
|
104 | + $("#addgroup_show_error").html("<?php echo $LANG['error_group_exist']; ?>"); |
|
105 | 105 | $("#addgroup_show_error").show(); |
106 | 106 | } else if (data[0].error == "error_html_codes") { |
107 | 107 | $("#div_add_group").dialog("open"); |
108 | - $("#addgroup_show_error").html("<?php echo $LANG['error_html_codes'];?>"); |
|
108 | + $("#addgroup_show_error").html("<?php echo $LANG['error_html_codes']; ?>"); |
|
109 | 109 | $("#addgroup_show_error").show(); |
110 | 110 | } else if (data[0].error == "error_title_only_with_numbers") { |
111 | 111 | $("#div_add_group").dialog("open"); |
112 | - $("#addgroup_show_error").html("<?php echo $LANG['error_only_numbers_in_folder_name'];?>"); |
|
112 | + $("#addgroup_show_error").html("<?php echo $LANG['error_only_numbers_in_folder_name']; ?>"); |
|
113 | 113 | $("#addgroup_show_error").show(); |
114 | 114 | } else { |
115 | 115 | tableFolders.api().ajax.reload(); |
@@ -121,12 +121,12 @@ discard block |
||
121 | 121 | "json" |
122 | 122 | ); |
123 | 123 | } else { |
124 | - document.getElementById("addgroup_show_error").innerHTML = "<?php echo $LANG['error_fields_2'];?>"; |
|
124 | + document.getElementById("addgroup_show_error").innerHTML = "<?php echo $LANG['error_fields_2']; ?>"; |
|
125 | 125 | $("#addgroup_show_error").show(); |
126 | 126 | } |
127 | 127 | } |
128 | 128 | }, |
129 | - "<?php echo $LANG['cancel_button'];?>": function() { |
|
129 | + "<?php echo $LANG['cancel_button']; ?>": function() { |
|
130 | 130 | $("#addgroup_show_error").html("").hide(); |
131 | 131 | $(this).dialog("close"); |
132 | 132 | } |
@@ -139,7 +139,7 @@ discard block |
||
139 | 139 | autoOpen: false, |
140 | 140 | width: 350, |
141 | 141 | height: 450, |
142 | - title: "<?php echo $LANG['at_category'];?>", |
|
142 | + title: "<?php echo $LANG['at_category']; ?>", |
|
143 | 143 | open: function(event, ui) { |
144 | 144 | var id = $("#folder_id_to_edit").val(); |
145 | 145 | $("#edit_folder_wait").hide(); |
@@ -153,15 +153,15 @@ discard block |
||
153 | 153 | $("#edit_folder_block_modif").val($("#block_modif_"+id).val()); |
154 | 154 | }, |
155 | 155 | buttons: { |
156 | - "<?php echo $LANG['delete'];?>": function() { |
|
157 | - if (confirm("<?php echo $LANG['confirm_delete_group'];?>")) { |
|
156 | + "<?php echo $LANG['delete']; ?>": function() { |
|
157 | + if (confirm("<?php echo $LANG['confirm_delete_group']; ?>")) { |
|
158 | 158 | //send query |
159 | 159 | $.post( |
160 | 160 | "sources/folders.queries.php", |
161 | 161 | { |
162 | 162 | type : "delete_folder", |
163 | 163 | id : $("#folder_id_to_edit").val(), |
164 | - key : "<?php echo $_SESSION['key'];?>" |
|
164 | + key : "<?php echo $_SESSION['key']; ?>" |
|
165 | 165 | }, |
166 | 166 | function(data) { |
167 | 167 | tableFolders.api().ajax.reload(); |
@@ -173,15 +173,15 @@ discard block |
||
173 | 173 | //Close |
174 | 174 | $("#div_edit_folder").dialog("close"); |
175 | 175 | }, |
176 | - "<?php echo $LANG['save_button'];?>": function() { |
|
176 | + "<?php echo $LANG['save_button']; ?>": function() { |
|
177 | 177 | if ($('#edit_folder_complexite').val() == "") { |
178 | - $("#edit_folder_show_error").html("<?php echo $LANG['error_group_complex'];?>").show(); |
|
178 | + $("#edit_folder_show_error").html("<?php echo $LANG['error_group_complex']; ?>").show(); |
|
179 | 179 | return; |
180 | 180 | }if ($('#edit_folder_title').val() == "") { |
181 | - $("#edit_folder_show_error").html("<?php echo $LANG['error_group_label'];?>").show(); |
|
181 | + $("#edit_folder_show_error").html("<?php echo $LANG['error_group_label']; ?>").show(); |
|
182 | 182 | return; |
183 | 183 | }if ($('#edit_parent_id').val() == "na") { |
184 | - $("#edit_folder_show_error").html("<?php echo $LANG['error_no_selected_folder'];?>").show(); |
|
184 | + $("#edit_folder_show_error").html("<?php echo $LANG['error_no_selected_folder']; ?>").show(); |
|
185 | 185 | return; |
186 | 186 | } |
187 | 187 | $("#edit_folder_wait").show(); |
@@ -194,19 +194,19 @@ discard block |
||
194 | 194 | "sources/folders.queries.php", |
195 | 195 | { |
196 | 196 | type : "update_folder", |
197 | - data : prepareExchangedData(data, "encode", "<?php echo $_SESSION['key'];?>"), |
|
198 | - key : "<?php echo $_SESSION['key'];?>" |
|
197 | + data : prepareExchangedData(data, "encode", "<?php echo $_SESSION['key']; ?>"), |
|
198 | + key : "<?php echo $_SESSION['key']; ?>" |
|
199 | 199 | }, |
200 | 200 | function(data) { |
201 | 201 | //Check errors |
202 | 202 | if (data[0].error == "error_group_exist") { |
203 | - $("#edit_folder_show_error").html("<?php echo $LANG['error_group_exist'];?>").show(); |
|
203 | + $("#edit_folder_show_error").html("<?php echo $LANG['error_group_exist']; ?>").show(); |
|
204 | 204 | LoadingPage(); |
205 | 205 | } else if (data[0].error == "error_html_codes") { |
206 | - $("#edit_folder_show_error").html("<?php echo $LANG['error_html_codes'];?>").show(); |
|
206 | + $("#edit_folder_show_error").html("<?php echo $LANG['error_html_codes']; ?>").show(); |
|
207 | 207 | LoadingPage(); |
208 | 208 | } else if (data[0].error == "error_title_only_with_numbers") { |
209 | - $("#edit_folder_show_error").html("<?php echo $LANG['error_only_numbers_in_folder_name'];?>").show(); |
|
209 | + $("#edit_folder_show_error").html("<?php echo $LANG['error_only_numbers_in_folder_name']; ?>").show(); |
|
210 | 210 | $("#edit_folder_wait").hide(); |
211 | 211 | } else { |
212 | 212 | $("#folder_id_to_edit").val(""); //clear id |
@@ -219,7 +219,7 @@ discard block |
||
219 | 219 | "json" |
220 | 220 | ); |
221 | 221 | }, |
222 | - "<?php echo $LANG['cancel_button'];?>": function() { |
|
222 | + "<?php echo $LANG['cancel_button']; ?>": function() { |
|
223 | 223 | //clear id |
224 | 224 | $("#folder_id_to_edit").val(""); |
225 | 225 | $("#edit_folder_show_error").html(""); |
@@ -252,7 +252,7 @@ discard block |
||
252 | 252 | { |
253 | 253 | type : "select_sub_folders", |
254 | 254 | id : elem[1], |
255 | - key : "<?php echo $_SESSION['key'];?>" |
|
255 | + key : "<?php echo $_SESSION['key']; ?>" |
|
256 | 256 | }, |
257 | 257 | function(data) { |
258 | 258 | $("#div_loading").hide(); |
@@ -284,7 +284,7 @@ discard block |
||
284 | 284 | type : tmp[1], |
285 | 285 | value : tmp[2], |
286 | 286 | id : tmp[0], |
287 | - key : "<?php echo $_SESSION['key'];?>" |
|
287 | + key : "<?php echo $_SESSION['key']; ?>" |
|
288 | 288 | }, |
289 | 289 | function(data) { |
290 | 290 | $("#div_loading").hide(); |
@@ -306,7 +306,7 @@ discard block |
||
306 | 306 | if (list_i == "") list_i = elem[1]; |
307 | 307 | else list_i = list_i+';'+elem[1]; |
308 | 308 | }); |
309 | - if (list_i != "" && $("#action_on_going").val() == "" && confirm("<?php echo addslashes($LANG['confirm_deletion']);?>")) { |
|
309 | + if (list_i != "" && $("#action_on_going").val() == "" && confirm("<?php echo addslashes($LANG['confirm_deletion']); ?>")) { |
|
310 | 310 | $("#div_loading").show(); |
311 | 311 | $("#action_on_going").val("multiple_folders"); |
312 | 312 | var data = '{"foldersList":"'+list_i+'"}'; |
@@ -315,8 +315,8 @@ discard block |
||
315 | 315 | "sources/folders.queries.php", |
316 | 316 | { |
317 | 317 | type : "delete_multiple_folders", |
318 | - data : prepareExchangedData(data, "encode", "<?php echo $_SESSION['key'];?>"), |
|
319 | - key : "<?php echo $_SESSION['key'];?>" |
|
318 | + data : prepareExchangedData(data, "encode", "<?php echo $_SESSION['key']; ?>"), |
|
319 | + key : "<?php echo $_SESSION['key']; ?>" |
|
320 | 320 | }, |
321 | 321 | function(data) { |
322 | 322 | tableFolders.api().ajax.reload(); |
@@ -86,7 +86,7 @@ discard block |
||
86 | 86 | itemLog("item_password_shown"); |
87 | 87 | $('#id_pw').text($('#hid_pw').val()); |
88 | 88 | } else { |
89 | - $('#id_pw').html('<?php echo $var['hidden_asterisk'];?>'); |
|
89 | + $('#id_pw').html('<?php echo $var['hidden_asterisk']; ?>'); |
|
90 | 90 | } |
91 | 91 | } |
92 | 92 | |
@@ -195,7 +195,7 @@ discard block |
||
195 | 195 | //Disable menu buttons |
196 | 196 | $("#button_quick_login_copy, #button_quick_pw_copy").hide(); |
197 | 197 | |
198 | - $("#items_path_var").html('<i class="fa fa-folder-open-o"></i> <?php echo $LANG['opening_folder'];?>'); |
|
198 | + $("#items_path_var").html('<i class="fa fa-folder-open-o"></i> <?php echo $LANG['opening_folder']; ?>'); |
|
199 | 199 | |
200 | 200 | //ajax query |
201 | 201 | request = $.post("sources/items.queries.php", |
@@ -204,7 +204,7 @@ discard block |
||
204 | 204 | id : groupe_id, |
205 | 205 | restricted : restricted, |
206 | 206 | start : start, |
207 | - key : "<?php echo $_SESSION['key'];?>", |
|
207 | + key : "<?php echo $_SESSION['key']; ?>", |
|
208 | 208 | nb_items_to_display_once : $("#nb_items_to_display_once").val() |
209 | 209 | }, |
210 | 210 | function(data) { |
@@ -213,7 +213,7 @@ discard block |
||
213 | 213 | return false; |
214 | 214 | } |
215 | 215 | //get data |
216 | - data = prepareExchangedData(data, "decode", "<?php echo $_SESSION['key'];?>"); |
|
216 | + data = prepareExchangedData(data, "decode", "<?php echo $_SESSION['key']; ?>"); |
|
217 | 217 | |
218 | 218 | // reset doubleclick prevention |
219 | 219 | requestRunning = false; |
@@ -236,7 +236,7 @@ discard block |
||
236 | 236 | if (data.IsPersonalFolder === 0) { |
237 | 237 | $("#items_path_var").html('<i class="fa fa-folder-open-o"></i> ' + data.arborescence); |
238 | 238 | } else { |
239 | - $("#items_path_var").html('<i class="fa fa-folder-open-o"></i> <?php echo $LANG['personal_folder'];?> : ' + data.arborescence); |
|
239 | + $("#items_path_var").html('<i class="fa fa-folder-open-o"></i> <?php echo $LANG['personal_folder']; ?> : ' + data.arborescence); |
|
240 | 240 | } |
241 | 241 | var path_levels = data.arborescence.split(' <i class="fa fa-caret-right"></i> ').length; |
242 | 242 | if ($("#items_path_var").width() > path_maxlength) { |
@@ -278,7 +278,7 @@ discard block |
||
278 | 278 | } |
279 | 279 | |
280 | 280 | if (data.array_items == "" && data.items_count == "0") { |
281 | - $("#items_list").html('<div style="text-align:center;margin-top:30px;"><b><i class="fa fa-info-circle"></i> <?php echo addslashes($LANG['no_item_to_display']);?></b></div>'); |
|
281 | + $("#items_list").html('<div style="text-align:center;margin-top:30px;"><b><i class="fa fa-info-circle"></i> <?php echo addslashes($LANG['no_item_to_display']); ?></b></div>'); |
|
282 | 282 | } |
283 | 283 | |
284 | 284 | // store the categories to be displayed |
@@ -398,7 +398,7 @@ discard block |
||
398 | 398 | $(this).addClass("ui-state-highlight"); |
399 | 399 | }, |
400 | 400 | helper: function(event) { |
401 | - return $("<div class='ui-widget-header' id='drop_helper'>"+"<?php echo $LANG['drag_drop_helper'];?>"+"</div>"); |
|
401 | + return $("<div class='ui-widget-header' id='drop_helper'>"+"<?php echo $LANG['drag_drop_helper']; ?>"+"</div>"); |
|
402 | 402 | } |
403 | 403 | }); |
404 | 404 | $(".folder").droppable({ |
@@ -414,7 +414,7 @@ discard block |
||
414 | 414 | type : "move_item", |
415 | 415 | item_id : ui.draggable.attr("id"), |
416 | 416 | folder_id : $(this).attr("id").substring(4), |
417 | - key : "<?php echo $_SESSION['key'];?>" |
|
417 | + key : "<?php echo $_SESSION['key']; ?>" |
|
418 | 418 | }, |
419 | 419 | function(data) { |
420 | 420 | //increment / decrement number of items in folders |
@@ -422,7 +422,7 @@ discard block |
||
422 | 422 | $("#itcount_"+data[0].to_folder).text(Math.floor($("#itcount_"+data[0].to_folder).text())+1); |
423 | 423 | $("#id_label, #item_viewed_x_times, #id_desc, #id_pw, #id_login, #id_email, #id_url, #id_files, #id_restricted_to, #id_tags, #id_kbs").html(""); |
424 | 424 | LoadingPage(); |
425 | - displayMessage("<?php echo $LANG['alert_message_done'];?>"); |
|
425 | + displayMessage("<?php echo $LANG['alert_message_done']; ?>"); |
|
426 | 426 | }, |
427 | 427 | "json" |
428 | 428 | ); |
@@ -462,7 +462,7 @@ discard block |
||
462 | 462 | force : "false" |
463 | 463 | }, |
464 | 464 | function(data) { |
465 | - data = prepareExchangedData(data , "decode", "<?php echo $_SESSION['key'];?>"); |
|
465 | + data = prepareExchangedData(data , "decode", "<?php echo $_SESSION['key']; ?>"); |
|
466 | 466 | if (data.error == "true") { |
467 | 467 | $("#div_dialog_message_text").html(data.error_msg); |
468 | 468 | $("#div_dialog_message").dialog("open"); |
@@ -506,7 +506,7 @@ discard block |
||
506 | 506 | item_id : $("#selected_items").val() |
507 | 507 | }, |
508 | 508 | function(data) { |
509 | - data = prepareExchangedData(data , "decode", "<?php echo $_SESSION['key'];?>"); |
|
509 | + data = prepareExchangedData(data , "decode", "<?php echo $_SESSION['key']; ?>"); |
|
510 | 510 | funcReturned = 1; |
511 | 511 | if (data.error == undefined || data.error == 0) { |
512 | 512 | $("#complexite_groupe").val(data.val); |
@@ -570,7 +570,7 @@ discard block |
||
570 | 570 | |
571 | 571 | function AjouterItem() |
572 | 572 | { |
573 | - $("#div_formulaire_saisi_info").show().html("<?php echo "<i class='fa fa-cog fa-spin fa-lg'></i> ".addslashes($LANG['please_wait'])."...";?>"); |
|
573 | + $("#div_formulaire_saisi_info").show().html("<?php echo "<i class='fa fa-cog fa-spin fa-lg'></i> ".addslashes($LANG['please_wait'])."..."; ?>"); |
|
574 | 574 | LoadingPage(); |
575 | 575 | $("#error_detected").val(''); //Refresh error foolowup |
576 | 576 | var erreur = ""; |
@@ -583,14 +583,14 @@ discard block |
||
583 | 583 | } |
584 | 584 | |
585 | 585 | // do checks |
586 | - if ($("#label").val() == "") erreur = "<?php echo $LANG['error_label'];?>"; |
|
587 | - else if ($("#pw1").val() === "" && $("#create_item_without_password").val() !== "1") erreur = "<?php echo $LANG['error_pw'];?>"; |
|
588 | - else if ($("#categorie").val() == "na") erreur = "<?php echo $LANG['error_group'];?>"; |
|
589 | - else if ($("#pw1").val() != $("#pw2").val()) erreur = "<?php echo $LANG['error_confirm'];?>"; |
|
590 | - else if ($("#enable_delete_after_consultation").is(':checked') && (($("#times_before_deletion").val() < 1 && $("#deletion_after_date").val() == "") || ($("#times_before_deletion").val() == "" && $("#deletion_after_date").val() == ""))) erreur = "<?php echo $LANG['error_times_before_deletion'];?>"; |
|
591 | - else if ($("#item_tags").val() != "" && reg.test($("#item_tags").val())) erreur = "<?php echo $LANG['error_tags'];?>"; |
|
586 | + if ($("#label").val() == "") erreur = "<?php echo $LANG['error_label']; ?>"; |
|
587 | + else if ($("#pw1").val() === "" && $("#create_item_without_password").val() !== "1") erreur = "<?php echo $LANG['error_pw']; ?>"; |
|
588 | + else if ($("#categorie").val() == "na") erreur = "<?php echo $LANG['error_group']; ?>"; |
|
589 | + else if ($("#pw1").val() != $("#pw2").val()) erreur = "<?php echo $LANG['error_confirm']; ?>"; |
|
590 | + else if ($("#enable_delete_after_consultation").is(':checked') && (($("#times_before_deletion").val() < 1 && $("#deletion_after_date").val() == "") || ($("#times_before_deletion").val() == "" && $("#deletion_after_date").val() == ""))) erreur = "<?php echo $LANG['error_times_before_deletion']; ?>"; |
|
591 | + else if ($("#item_tags").val() != "" && reg.test($("#item_tags").val())) erreur = "<?php echo $LANG['error_tags']; ?>"; |
|
592 | 592 | else if (($('#recherche_group_pf').val() === "1" || $('#selected_folder_is_personal').val() === "1") && $('#personal_sk_set').val() === "0") { |
593 | - erreur = "<?php echo $LANG['alert_message_personal_sk_missing'];?>"; |
|
593 | + erreur = "<?php echo $LANG['alert_message_personal_sk_missing']; ?>"; |
|
594 | 594 | } else{ |
595 | 595 | //Check pw complexity level |
596 | 596 | if ( |
@@ -685,13 +685,13 @@ discard block |
||
685 | 685 | "sources/items.queries.php", |
686 | 686 | { |
687 | 687 | type : "new_item", |
688 | - data : prepareExchangedData(data, "encode", "<?php echo $_SESSION['key'];?>"), |
|
689 | - key : "<?php echo $_SESSION['key'];?>" |
|
688 | + data : prepareExchangedData(data, "encode", "<?php echo $_SESSION['key']; ?>"), |
|
689 | + key : "<?php echo $_SESSION['key']; ?>" |
|
690 | 690 | }, |
691 | 691 | function(data) { |
692 | 692 | //decrypt data |
693 | 693 | try { |
694 | - data = prepareExchangedData(data , "decode", "<?php echo $_SESSION['key'];?>"); |
|
694 | + data = prepareExchangedData(data , "decode", "<?php echo $_SESSION['key']; ?>"); |
|
695 | 695 | } catch (e) { |
696 | 696 | // error |
697 | 697 | $("#div_loading").hide(); |
@@ -705,7 +705,7 @@ discard block |
||
705 | 705 | //Check errors |
706 | 706 | if (data.error == "item_exists") { |
707 | 707 | $("#div_formulaire_saisi").dialog("open"); |
708 | - $("#new_show_error").html('<?php echo addslashes($LANG['error_item_exists']);?>'); |
|
708 | + $("#new_show_error").html('<?php echo addslashes($LANG['error_item_exists']); ?>'); |
|
709 | 709 | $("#new_show_error").show(); |
710 | 710 | LoadingPage(); |
711 | 711 | } else if (data.error == "ERR_KEY_NOT_CORRECT") { |
@@ -720,7 +720,7 @@ discard block |
||
720 | 720 | LoadingPage(); |
721 | 721 | } else if (data.error == "ERR_PWD_TOO_LONG") { |
722 | 722 | $("#div_formulaire_saisi").dialog("open"); |
723 | - $("#new_show_error").html('<?php echo addslashes($LANG['error_pw_too_long']);?>'); |
|
723 | + $("#new_show_error").html('<?php echo addslashes($LANG['error_pw_too_long']); ?>'); |
|
724 | 724 | $("#new_show_error").show(); |
725 | 725 | LoadingPage(); |
726 | 726 | } else if (data.error == "ERR_ENCRYPTION_NOT_CORRECT") { |
@@ -765,15 +765,15 @@ discard block |
||
765 | 765 | $(".fields_div, #item_file_queue, #display_title, #visible_pw").html(""); |
766 | 766 | |
767 | 767 | $("#div_formulaire_saisi").dialog('close'); |
768 | - $("#div_formulaire_saisi ~ .ui-dialog-buttonpane").find("button:contains('<?php echo $LANG['save_button'];?>')").prop("disabled", false); |
|
768 | + $("#div_formulaire_saisi ~ .ui-dialog-buttonpane").find("button:contains('<?php echo $LANG['save_button']; ?>')").prop("disabled", false); |
|
769 | 769 | } |
770 | 770 | $("#div_formulaire_saisi_info").hide().html(""); |
771 | 771 | $("#div_loading").hide(); |
772 | 772 | } |
773 | 773 | ); |
774 | 774 | } else { |
775 | - $('#new_show_error').html("<?php echo addslashes($LANG['error_complex_not_enought']);?>").show(); |
|
776 | - $("#div_formulaire_saisi ~ .ui-dialog-buttonpane").find("button:contains('<?php echo $LANG['save_button'];?>')").prop("disabled", false); |
|
775 | + $('#new_show_error').html("<?php echo addslashes($LANG['error_complex_not_enought']); ?>").show(); |
|
776 | + $("#div_formulaire_saisi ~ .ui-dialog-buttonpane").find("button:contains('<?php echo $LANG['save_button']; ?>')").prop("disabled", false); |
|
777 | 777 | $("#div_formulaire_saisi_info").hide().html(""); |
778 | 778 | } |
779 | 779 | } |
@@ -785,7 +785,7 @@ discard block |
||
785 | 785 | |
786 | 786 | function EditerItem() |
787 | 787 | { |
788 | - $("#div_formulaire_edition_item_info").html("<?php echo "<i class='fa fa-cog fa-spin fa-lg'></i> ".addslashes($LANG['please_wait'])."...";?>").show(); |
|
788 | + $("#div_formulaire_edition_item_info").html("<?php echo "<i class='fa fa-cog fa-spin fa-lg'></i> ".addslashes($LANG['please_wait'])."..."; ?>").show(); |
|
789 | 789 | $("#item_detail_zone_loader").hide(); |
790 | 790 | var erreur = ""; |
791 | 791 | var reg=new RegExp("[.|,|;|:|!|=|+|-|*|/|#|\"|'|&]"); |
@@ -797,11 +797,11 @@ discard block |
||
797 | 797 | } |
798 | 798 | |
799 | 799 | // do checks |
800 | - if ($('#edit_label').val() == "") erreur = "<?php echo addslashes($LANG['error_label']);?>"; |
|
801 | - else if ($("#edit_pw1").val() === "" && $("#create_item_without_password").val() !== "1") erreur = "<?php echo $LANG['error_pw'];?>"; |
|
802 | - else if ($("#edit_pw1").val() != $("#edit_pw2").val()) erreur = "<?php echo addslashes($LANG['error_confirm']);?>"; |
|
803 | - else if ($("#edit_tags").val() != "" && reg.test($("#edit_tags").val())) erreur = "<?php echo addslashes($LANG['error_tags']);?>"; |
|
804 | - else if ($("#edit_categorie option:selected").val() == "" || typeof $("#edit_categorie option:selected").val() === "undefined") erreur = "<?php echo addslashes($LANG['error_no_selected_folder']);?>"; |
|
800 | + if ($('#edit_label').val() == "") erreur = "<?php echo addslashes($LANG['error_label']); ?>"; |
|
801 | + else if ($("#edit_pw1").val() === "" && $("#create_item_without_password").val() !== "1") erreur = "<?php echo $LANG['error_pw']; ?>"; |
|
802 | + else if ($("#edit_pw1").val() != $("#edit_pw2").val()) erreur = "<?php echo addslashes($LANG['error_confirm']); ?>"; |
|
803 | + else if ($("#edit_tags").val() != "" && reg.test($("#edit_tags").val())) erreur = "<?php echo addslashes($LANG['error_tags']); ?>"; |
|
804 | + else if ($("#edit_categorie option:selected").val() == "" || typeof $("#edit_categorie option:selected").val() === "undefined") erreur = "<?php echo addslashes($LANG['error_no_selected_folder']); ?>"; |
|
805 | 805 | else{ |
806 | 806 | //Check pw complexity level |
807 | 807 | if (( |
@@ -898,13 +898,13 @@ discard block |
||
898 | 898 | "sources/items.queries.php", |
899 | 899 | { |
900 | 900 | type : "update_item", |
901 | - data : prepareExchangedData(data, "encode", "<?php echo $_SESSION['key'];?>"), |
|
902 | - key : "<?php echo $_SESSION['key'];?>" |
|
901 | + data : prepareExchangedData(data, "encode", "<?php echo $_SESSION['key']; ?>"), |
|
902 | + key : "<?php echo $_SESSION['key']; ?>" |
|
903 | 903 | }, |
904 | 904 | function(data) { |
905 | 905 | //decrypt data |
906 | 906 | try { |
907 | - data = prepareExchangedData(data , "decode", "<?php echo $_SESSION['key'];?>"); |
|
907 | + data = prepareExchangedData(data , "decode", "<?php echo $_SESSION['key']; ?>"); |
|
908 | 908 | } catch (e) { |
909 | 909 | // error |
910 | 910 | $("#div_loading").hide(); |
@@ -933,7 +933,7 @@ discard block |
||
933 | 933 | LoadingPage(); |
934 | 934 | } else if (data.error == "ERR_PWD_TOO_LONG") { |
935 | 935 | $("#div_loading").hide(); |
936 | - $("#edit_show_error").html('<?php echo addslashes($LANG['error_pw_too_long']);?>'); |
|
936 | + $("#edit_show_error").html('<?php echo addslashes($LANG['error_pw_too_long']); ?>'); |
|
937 | 937 | $("#edit_show_error").show(); |
938 | 938 | LoadingPage(); |
939 | 939 | } else if (data.error == "ERR_NOT_ALLOWED_TO_EDIT") { |
@@ -943,7 +943,7 @@ discard block |
||
943 | 943 | LoadingPage(); |
944 | 944 | } else if (data.error != "") { |
945 | 945 | $("#div_loading").hide(); |
946 | - $("#edit_show_error").html('<?php echo addslashes($LANG['error_not_allowed_to']);?>'); |
|
946 | + $("#edit_show_error").html('<?php echo addslashes($LANG['error_not_allowed_to']); ?>'); |
|
947 | 947 | $("#edit_show_error").show(); |
948 | 948 | LoadingPage(); |
949 | 949 | } else { |
@@ -962,7 +962,7 @@ discard block |
||
962 | 962 | $("#id_files").html(unsanitizeString(data.files)); |
963 | 963 | $("#item_edit_list_files").html(data.files_edit); |
964 | 964 | $("#id_info").html(unsanitizeString(data.history)); |
965 | - $('#id_pw').html('<?php echo $var['hidden_asterisk'];?>'); |
|
965 | + $('#id_pw').html('<?php echo $var['hidden_asterisk']; ?>'); |
|
966 | 966 | |
967 | 967 | //Refresh hidden data |
968 | 968 | $("#hid_label").val($('#edit_label').val()); |
@@ -1037,10 +1037,10 @@ discard block |
||
1037 | 1037 | } |
1038 | 1038 | |
1039 | 1039 | |
1040 | - $("button:contains('<?php echo $LANG['save_button'];?>')").prop("disabled", false); |
|
1040 | + $("button:contains('<?php echo $LANG['save_button']; ?>')").prop("disabled", false); |
|
1041 | 1041 | //Close dialogbox |
1042 | 1042 | $("#div_formulaire_edition_item").dialog('close'); |
1043 | - $("#div_formulaire_edition_item ~ .ui-dialog-buttonpane").find("button:contains('<?php echo $LANG['save_button'];?>')").prop("disabled", false); |
|
1043 | + $("#div_formulaire_edition_item ~ .ui-dialog-buttonpane").find("button:contains('<?php echo $LANG['save_button']; ?>')").prop("disabled", false); |
|
1044 | 1044 | //hide loader |
1045 | 1045 | $("#div_loading").hide(); |
1046 | 1046 | } |
@@ -1061,8 +1061,8 @@ discard block |
||
1061 | 1061 | );*/ |
1062 | 1062 | |
1063 | 1063 | } else { |
1064 | - $('#edit_show_error').html("<?php echo addslashes($LANG['error_complex_not_enought']);?>").show(); |
|
1065 | - $("#div_formulaire_edition_item ~ .ui-dialog-buttonpane").find("button:contains('<?php echo $LANG['save_button'];?>')").prop("disabled", false); |
|
1064 | + $('#edit_show_error').html("<?php echo addslashes($LANG['error_complex_not_enought']); ?>").show(); |
|
1065 | + $("#div_formulaire_edition_item ~ .ui-dialog-buttonpane").find("button:contains('<?php echo $LANG['save_button']; ?>')").prop("disabled", false); |
|
1066 | 1066 | $("#div_formulaire_edition_item_info").hide().html(""); |
1067 | 1067 | } |
1068 | 1068 | } |
@@ -1070,27 +1070,27 @@ discard block |
||
1070 | 1070 | if (erreur != "") { |
1071 | 1071 | $('#edit_show_error').html(erreur).show(); |
1072 | 1072 | $("#div_formulaire_edition_item_info").hide().html(""); |
1073 | - $("#div_formulaire_edition_item ~ .ui-dialog-buttonpane").find("button:contains('<?php echo $LANG['save_button'];?>')").prop("disabled", false); |
|
1073 | + $("#div_formulaire_edition_item ~ .ui-dialog-buttonpane").find("button:contains('<?php echo $LANG['save_button']; ?>')").prop("disabled", false); |
|
1074 | 1074 | } |
1075 | 1075 | } |
1076 | 1076 | |
1077 | 1077 | function AddNewFolder() |
1078 | 1078 | { |
1079 | 1079 | if ($("#new_rep_titre").val() == "") { |
1080 | - $("#new_rep_show_error").html("<?php echo addslashes($LANG['error_group_label']);?>").show(); |
|
1080 | + $("#new_rep_show_error").html("<?php echo addslashes($LANG['error_group_label']); ?>").show(); |
|
1081 | 1081 | } else if ($("#new_rep_groupe").val() === "") { |
1082 | - $("#new_rep_show_error").html("<?php echo addslashes($LANG['error_group_noparent']);?>").show(); |
|
1082 | + $("#new_rep_show_error").html("<?php echo addslashes($LANG['error_group_noparent']); ?>").show(); |
|
1083 | 1083 | } else if ($("#new_rep_complexite").val() == "") { |
1084 | - $("#new_rep_show_error").html("<?php echo addslashes($LANG['error_group_complex']);?>").show(); |
|
1084 | + $("#new_rep_show_error").html("<?php echo addslashes($LANG['error_group_complex']); ?>").show(); |
|
1085 | 1085 | } else if (/^\d+$/.test($("#new_rep_titre").val())) { |
1086 | 1086 | // check if folder title contains only numbers |
1087 | - $("#new_rep_show_error").html("<?php echo addslashes($LANG['error_only_numbers_in_folder_name']);?>").show(); |
|
1087 | + $("#new_rep_show_error").html("<?php echo addslashes($LANG['error_only_numbers_in_folder_name']); ?>").show(); |
|
1088 | 1088 | } else if ($("#user_ongoing_action").val() == "") { |
1089 | 1089 | $("#add_folder_loader").show(); |
1090 | 1090 | $("#user_ongoing_action").val("true"); |
1091 | 1091 | $("#new_rep_show_error").hide(); |
1092 | 1092 | if ($("#new_rep_role").val() == undefined) { |
1093 | - role_id = "<?php echo $_SESSION['fonction_id'];?>"; |
|
1093 | + role_id = "<?php echo $_SESSION['fonction_id']; ?>"; |
|
1094 | 1094 | } else { |
1095 | 1095 | role_id = $("#new_rep_role").val(); |
1096 | 1096 | } |
@@ -1104,18 +1104,18 @@ discard block |
||
1104 | 1104 | "sources/folders.queries.php", |
1105 | 1105 | { |
1106 | 1106 | type : "add_folder", |
1107 | - data : prepareExchangedData(data, "encode", "<?php echo $_SESSION['key'];?>"), |
|
1108 | - key : "<?php echo $_SESSION['key'];?>" |
|
1107 | + data : prepareExchangedData(data, "encode", "<?php echo $_SESSION['key']; ?>"), |
|
1108 | + key : "<?php echo $_SESSION['key']; ?>" |
|
1109 | 1109 | }, |
1110 | 1110 | function(data) { |
1111 | 1111 | $("#user_ongoing_action").val(""); |
1112 | 1112 | //Check errors |
1113 | 1113 | if (data[0].error == "error_group_exist") { |
1114 | - $("#new_rep_show_error").html("<?php echo addslashes($LANG['error_group_exist']);?>").show(); |
|
1114 | + $("#new_rep_show_error").html("<?php echo addslashes($LANG['error_group_exist']); ?>").show(); |
|
1115 | 1115 | } else if (data[0].error == "error_html_codes") { |
1116 | - $("#new_rep_show_error").html("<?php echo addslashes($LANG['error_html_codes']);?>").show(); |
|
1116 | + $("#new_rep_show_error").html("<?php echo addslashes($LANG['error_html_codes']); ?>").show(); |
|
1117 | 1117 | } else if (data[0].error == "error_title_only_with_numbers") { |
1118 | - $("#new_rep_show_error").html("<?php echo addslashes($LANG['error_only_numbers_in_folder_name']);?>").show(); |
|
1118 | + $("#new_rep_show_error").html("<?php echo addslashes($LANG['error_only_numbers_in_folder_name']); ?>").show(); |
|
1119 | 1119 | } else if (data[0].error != "") { |
1120 | 1120 | $("#new_rep_show_error").html(data[0].error).show(); |
1121 | 1121 | } else { |
@@ -1134,11 +1134,11 @@ discard block |
||
1134 | 1134 | function SupprimerFolder() |
1135 | 1135 | { |
1136 | 1136 | if ($("#delete_rep_groupe_validate").is(':checked') === false) { |
1137 | - $("#del_rep_show_error").html("<?php echo '<span class=\"fa fa-warning fa-lg\"></span> <\span>'.addslashes($LANG['please_confirm']);?>").show(1).delay(2000).fadeOut(1000); |
|
1137 | + $("#del_rep_show_error").html("<?php echo '<span class=\"fa fa-warning fa-lg\"></span> <\span>'.addslashes($LANG['please_confirm']); ?>").show(1).delay(2000).fadeOut(1000); |
|
1138 | 1138 | } else if ($("#delete_rep_groupe").val() === "0") { |
1139 | - $("#del_rep_show_error").html("<?php echo '<span class=\"fa fa-warning fa-lg\"></span> <\span>'.addslashes($LANG['error_group']);?>").show(1).delay(2000).fadeOut(1000); |
|
1140 | - } else if ($("#delete_rep_groupe option:selected").text() === "<?php echo $_SESSION['login'];?>") { |
|
1141 | - $("#del_rep_show_error").html("<?php echo '<span class=\"fa fa-warning fa-lg\"></span> <\span>'.addslashes($LANG['error_not_allowed_to']);?>").show(1).delay(2000).fadeOut(1000); |
|
1139 | + $("#del_rep_show_error").html("<?php echo '<span class=\"fa fa-warning fa-lg\"></span> <\span>'.addslashes($LANG['error_group']); ?>").show(1).delay(2000).fadeOut(1000); |
|
1140 | + } else if ($("#delete_rep_groupe option:selected").text() === "<?php echo $_SESSION['login']; ?>") { |
|
1141 | + $("#del_rep_show_error").html("<?php echo '<span class=\"fa fa-warning fa-lg\"></span> <\span>'.addslashes($LANG['error_not_allowed_to']); ?>").show(1).delay(2000).fadeOut(1000); |
|
1142 | 1142 | } else { |
1143 | 1143 | $("#del_folder_loader").show(); |
1144 | 1144 | $.post( |
@@ -1146,14 +1146,14 @@ discard block |
||
1146 | 1146 | { |
1147 | 1147 | type : "delete_folder", |
1148 | 1148 | id : $("#delete_rep_groupe").val(), |
1149 | - key : "<?php echo $_SESSION['key'];?>" |
|
1149 | + key : "<?php echo $_SESSION['key']; ?>" |
|
1150 | 1150 | }, |
1151 | 1151 | function(data) { |
1152 | 1152 | $("#del_folder_loader").hide(); |
1153 | 1153 | |
1154 | 1154 | //decrypt data |
1155 | 1155 | try { |
1156 | - data = prepareExchangedData(data , "decode", "<?php echo $_SESSION['key'];?>"); |
|
1156 | + data = prepareExchangedData(data , "decode", "<?php echo $_SESSION['key']; ?>"); |
|
1157 | 1157 | } catch (e) { |
1158 | 1158 | // error |
1159 | 1159 | $("#div_loading").hide(); |
@@ -1166,10 +1166,10 @@ discard block |
||
1166 | 1166 | |
1167 | 1167 | if (data.error !== "") { |
1168 | 1168 | if (data.error === "ERR_SUB_FOLDERS_EXIST") { |
1169 | - $("#del_rep_show_error").html("<?php echo '<span class=\"fa fa-warning fa-lg\"></span> <\span>'.addslashes($LANG['error_cannot_delete_subfolders_exist']);?>").show(1).delay(3000).fadeOut(1000); |
|
1169 | + $("#del_rep_show_error").html("<?php echo '<span class=\"fa fa-warning fa-lg\"></span> <\span>'.addslashes($LANG['error_cannot_delete_subfolders_exist']); ?>").show(1).delay(3000).fadeOut(1000); |
|
1170 | 1170 | |
1171 | 1171 | } else if (data.error === "ERR_FOLDER_NOT_ALLOWED") { |
1172 | - $("#del_rep_show_error").html("<?php echo '<span class=\"fa fa-warning fa-lg\"></span> <\span>'.addslashes($LANG['error_not_allowed_to']);?>").show(1).delay(3000).fadeOut(1000); |
|
1172 | + $("#del_rep_show_error").html("<?php echo '<span class=\"fa fa-warning fa-lg\"></span> <\span>'.addslashes($LANG['error_not_allowed_to']); ?>").show(1).delay(3000).fadeOut(1000); |
|
1173 | 1173 | } |
1174 | 1174 | } else { |
1175 | 1175 | refreshTree(data.parent_id); |
@@ -1223,10 +1223,10 @@ discard block |
||
1223 | 1223 | |
1224 | 1224 | // Check if personal SK is needed and set |
1225 | 1225 | if (($('#recherche_group_pf').val() === "1" && $('#personal_sk_set').val() === "0") && salt_key_required === "1") { |
1226 | - $("#set_personal_saltkey_warning").html("<div style='font-size:16px;'><span class='fa fa-warning fa-lg'></span> </span><?php echo addslashes($LANG['alert_message_personal_sk_missing']);?></div>").show(1).delay(2500).fadeOut(1000); |
|
1226 | + $("#set_personal_saltkey_warning").html("<div style='font-size:16px;'><span class='fa fa-warning fa-lg'></span> </span><?php echo addslashes($LANG['alert_message_personal_sk_missing']); ?></div>").show(1).delay(2500).fadeOut(1000); |
|
1227 | 1227 | $('#div_set_personal_saltkey').dialog('open'); |
1228 | 1228 | |
1229 | - //$("#div_dialog_message_text").html("<div style='font-size:16px;'><span class='fa fa-warning fa-lg mi-red'></span> <\/span><?php echo addslashes($LANG['alert_message_personal_sk_missing']);?><\/div>"); |
|
1229 | + //$("#div_dialog_message_text").html("<div style='font-size:16px;'><span class='fa fa-warning fa-lg mi-red'></span> <\/span><?php echo addslashes($LANG['alert_message_personal_sk_missing']); ?><\/div>"); |
|
1230 | 1230 | $("#div_loading").hide(); |
1231 | 1231 | //$("#div_dialog_message").dialog("open"); |
1232 | 1232 | $("#request_ongoing").val(""); |
@@ -1260,12 +1260,12 @@ discard block |
||
1260 | 1260 | expired_item : expired_item, |
1261 | 1261 | restricted : restricted, |
1262 | 1262 | page : "items", |
1263 | - key : "<?php echo $_SESSION['key'];?>" |
|
1263 | + key : "<?php echo $_SESSION['key']; ?>" |
|
1264 | 1264 | }, |
1265 | 1265 | function(data_raw) { |
1266 | 1266 | //decrypt data |
1267 | 1267 | try { |
1268 | - data = prepareExchangedData(data_raw , "decode", "<?php echo $_SESSION['key'];?>"); |
|
1268 | + data = prepareExchangedData(data_raw , "decode", "<?php echo $_SESSION['key']; ?>"); |
|
1269 | 1269 | } catch (e) { |
1270 | 1270 | // error |
1271 | 1271 | $("#div_loading").hide(); |
@@ -1284,7 +1284,7 @@ discard block |
||
1284 | 1284 | $("#pw_shown").val("0"); |
1285 | 1285 | |
1286 | 1286 | // show some info on top |
1287 | - if (data.auto_update_pwd_frequency != "0") var auto_update_pwd = "<i class='fa fa-shield tip' title='<?php echo $LANG['server_auto_update_password_enabled_tip'];?>'></i> <b>"+data.auto_update_pwd_frequency+"</b> | "; |
|
1287 | + if (data.auto_update_pwd_frequency != "0") var auto_update_pwd = "<i class='fa fa-shield tip' title='<?php echo $LANG['server_auto_update_password_enabled_tip']; ?>'></i> <b>"+data.auto_update_pwd_frequency+"</b> | "; |
|
1288 | 1288 | else var auto_update_pwd = ""; |
1289 | 1289 | $("#item_viewed_x_times").html(auto_update_pwd+" <i class='fa fa-sticky-note-o tip' title='Number of times item was displayed'></i> <b>"+data.viewed_no+"</b>"); |
1290 | 1290 | |
@@ -1333,7 +1333,7 @@ discard block |
||
1333 | 1333 | if (data.pw === "") { |
1334 | 1334 | $("#id_pw").html(""); |
1335 | 1335 | } else { |
1336 | - $("#id_pw").html('<?php echo $var['hidden_asterisk'];?>'); |
|
1336 | + $("#id_pw").html('<?php echo $var['hidden_asterisk']; ?>'); |
|
1337 | 1337 | } |
1338 | 1338 | $("#hid_pw").val(unsanitizeString(data.pw)); |
1339 | 1339 | if (data.url != "") { |
@@ -1450,25 +1450,25 @@ discard block |
||
1450 | 1450 | if (data.to_be_deleted != 0 && data.to_be_deleted != null && data.to_be_deleted != "not_enabled") { |
1451 | 1451 | $('#item_extra_info') |
1452 | 1452 | .html("<b><i class='fa fa-bell-o mi-red'></i></b> ") |
1453 | - .attr("title", "<?php echo addslashes($LANG['automatic_deletion_activated']);?>"); |
|
1453 | + .attr("title", "<?php echo addslashes($LANG['automatic_deletion_activated']); ?>"); |
|
1454 | 1454 | $('#item_extra_info').tooltipster({multiple: true}); |
1455 | 1455 | } else { |
1456 | 1456 | $('#item_extra_info').html(""); |
1457 | 1457 | } |
1458 | 1458 | |
1459 | - if (data.notification_status == 0 && data.id_user == <?php echo $_SESSION['user_id'];?>) { |
|
1459 | + if (data.notification_status == 0 && data.id_user == <?php echo $_SESSION['user_id']; ?>) { |
|
1460 | 1460 | $('#menu_button_notify') |
1461 | 1461 | .prop("disabled", false) |
1462 | - .attr('title','<?php echo $LANG['enable_notify'];?>') |
|
1462 | + .attr('title','<?php echo $LANG['enable_notify']; ?>') |
|
1463 | 1463 | .attr('onclick','notify_click(\'true\')'); |
1464 | 1464 | $('#div_notify').attr('class', '<i class="fa fa-bell mi-green"></i> '); |
1465 | - } else if (data.notification_status == 1 && data.id_user == <?php echo $_SESSION['user_id'];?>) { |
|
1465 | + } else if (data.notification_status == 1 && data.id_user == <?php echo $_SESSION['user_id']; ?>) { |
|
1466 | 1466 | $('#menu_button_notify') |
1467 | 1467 | .prop("disabled", false) |
1468 | - .attr('title','<?php echo $LANG['disable_notify'];?>') |
|
1468 | + .attr('title','<?php echo $LANG['disable_notify']; ?>') |
|
1469 | 1469 | .attr('onclick','notify_click(\'false\')'); |
1470 | 1470 | $('#div_notify').attr('class', '<i class="fa fa-bell-slash mi-red"></i> '); |
1471 | - $('#item_extra_info').html("<i><i class=\'fa fa-bell mi-green\'></i> <?php echo addslashes($LANG['notify_activated']);?></i>"); |
|
1471 | + $('#item_extra_info').html("<i><i class=\'fa fa-bell mi-green\'></i> <?php echo addslashes($LANG['notify_activated']); ?></i>"); |
|
1472 | 1472 | } else { |
1473 | 1473 | $('#menu_button_notify').attr('disabled', 'disabled'); |
1474 | 1474 | $('#div_notify').attr('class', '<i class="fa fa-bell mi-green"></i> '); |
@@ -1482,7 +1482,7 @@ discard block |
||
1482 | 1482 | } |
1483 | 1483 | }); |
1484 | 1484 | clipboard_pw.on('success', function(e) { |
1485 | - $("#message_box").html("<?php echo addslashes($LANG['pw_copied_clipboard']);?>").show().fadeOut(1000); |
|
1485 | + $("#message_box").html("<?php echo addslashes($LANG['pw_copied_clipboard']); ?>").show().fadeOut(1000); |
|
1486 | 1486 | itemLog("item_password_copied"); |
1487 | 1487 | |
1488 | 1488 | e.clearSelection(); |
@@ -1497,7 +1497,7 @@ discard block |
||
1497 | 1497 | } |
1498 | 1498 | }); |
1499 | 1499 | clipboard_login.on('success', function(e) { |
1500 | - $("#message_box").html("<?php echo addslashes($LANG['login_copied_clipboard']);?>").show().fadeOut(1000); |
|
1500 | + $("#message_box").html("<?php echo addslashes($LANG['login_copied_clipboard']); ?>").show().fadeOut(1000); |
|
1501 | 1501 | |
1502 | 1502 | e.clearSelection(); |
1503 | 1503 | }); |
@@ -1511,7 +1511,7 @@ discard block |
||
1511 | 1511 | } |
1512 | 1512 | }); |
1513 | 1513 | clipboard_url.on('success', function(e) { |
1514 | - $("#message_box").html("<?php echo addslashes($LANG['url_copied_clipboard']);?>").show().fadeOut(1000); |
|
1514 | + $("#message_box").html("<?php echo addslashes($LANG['url_copied_clipboard']); ?>").show().fadeOut(1000); |
|
1515 | 1515 | |
1516 | 1516 | e.clearSelection(); |
1517 | 1517 | }); |
@@ -1520,11 +1520,11 @@ discard block |
||
1520 | 1520 | //prepare link to clipboard |
1521 | 1521 | var clipboard_link = new Clipboard("#menu_button_copy_link", { |
1522 | 1522 | text: function() { |
1523 | - return "<?php echo $_SESSION['settings']['cpassman_url'];?>"+"/index.php?page=items&group="+data.folder+"&id="+data.id; |
|
1523 | + return "<?php echo $_SESSION['settings']['cpassman_url']; ?>"+"/index.php?page=items&group="+data.folder+"&id="+data.id; |
|
1524 | 1524 | } |
1525 | 1525 | }); |
1526 | 1526 | clipboard_link.on('success', function(e) { |
1527 | - $("#message_box").html("<?php echo addslashes($LANG['url_copied']);?>").show().fadeOut(1000); |
|
1527 | + $("#message_box").html("<?php echo addslashes($LANG['url_copied']); ?>").show().fadeOut(1000); |
|
1528 | 1528 | |
1529 | 1529 | e.clearSelection(); |
1530 | 1530 | }); |
@@ -1560,7 +1560,7 @@ discard block |
||
1560 | 1560 | } else { |
1561 | 1561 | //Dont show details |
1562 | 1562 | $("#item_details_nok").show(); |
1563 | - $("#item_details_nok_restriction_list").html('<div style="margin:10px 0 0 20px;"><b><?php echo $LANG['author'];?>: </b>' + data.author + '<br /><b><?php echo $LANG['restricted_to'];?>: </b>' + data.restricted_to + '<br /><br /><u><a href="#" onclick="SendMail(\'request_access_to_author\',\'' + data.id + ',' + data.id_user + '\',\'<?php echo $_SESSION['key'];?>\',\'<?php echo addslashes($LANG['forgot_my_pw_email_sent']);?>\')"><?php echo addslashes($LANG['request_access_ot_item']);?></a></u></div>'); |
|
1563 | + $("#item_details_nok_restriction_list").html('<div style="margin:10px 0 0 20px;"><b><?php echo $LANG['author']; ?>: </b>' + data.author + '<br /><b><?php echo $LANG['restricted_to']; ?>: </b>' + data.restricted_to + '<br /><br /><u><a href="#" onclick="SendMail(\'request_access_to_author\',\'' + data.id + ',' + data.id_user + '\',\'<?php echo $_SESSION['key']; ?>\',\'<?php echo addslashes($LANG['forgot_my_pw_email_sent']); ?>\')"><?php echo addslashes($LANG['request_access_ot_item']); ?></a></u></div>'); |
|
1564 | 1564 | $("#item_details_ok").hide(); |
1565 | 1565 | $("#item_details_expired").hide(); |
1566 | 1566 | $("#item_details_expired_full").hide(); |
@@ -1609,7 +1609,7 @@ discard block |
||
1609 | 1609 | function(data) { |
1610 | 1610 | //decrypt data |
1611 | 1611 | try { |
1612 | - data = prepareExchangedData(data , "decode", "<?php echo $_SESSION['key'];?>"); |
|
1612 | + data = prepareExchangedData(data , "decode", "<?php echo $_SESSION['key']; ?>"); |
|
1613 | 1613 | } catch (e) { |
1614 | 1614 | // error |
1615 | 1615 | $("#div_loading").hide(); |
@@ -1646,7 +1646,7 @@ discard block |
||
1646 | 1646 | |
1647 | 1647 | // set indicator if item has change proposal |
1648 | 1648 | if (data.has_change_proposal !== 0) { |
1649 | - $("#item_extra_info").prepend('<i class="fa fa-lightbulb-o fa-sm mi-yellow tip" title="<?php echo $LANG['item_has_change_proposal'];?>" onclick=""></i> '); |
|
1649 | + $("#item_extra_info").prepend('<i class="fa fa-lightbulb-o fa-sm mi-yellow tip" title="<?php echo $LANG['item_has_change_proposal']; ?>" onclick=""></i> '); |
|
1650 | 1650 | } |
1651 | 1651 | |
1652 | 1652 | $(param).prop("disabled", false); |
@@ -1686,7 +1686,7 @@ discard block |
||
1686 | 1686 | }, |
1687 | 1687 | function(data) { |
1688 | 1688 | LoadingPage(); |
1689 | - displayMessage("<?php echo $LANG['alert_message_done'];?>"); |
|
1689 | + displayMessage("<?php echo $LANG['alert_message_done']; ?>"); |
|
1690 | 1690 | } |
1691 | 1691 | ); |
1692 | 1692 | } |
@@ -1697,7 +1697,7 @@ discard block |
||
1697 | 1697 | function open_add_group_div() |
1698 | 1698 | { |
1699 | 1699 | if ($("#user_is_read_only").length && $("#user_is_read_only").val() == 1) { |
1700 | - displayMessage("<?php echo $LANG['error_not_allowed_to'];?>"); |
|
1700 | + displayMessage("<?php echo $LANG['error_not_allowed_to']; ?>"); |
|
1701 | 1701 | return false; |
1702 | 1702 | } |
1703 | 1703 | |
@@ -1718,7 +1718,7 @@ discard block |
||
1718 | 1718 | function open_edit_group_div() |
1719 | 1719 | { |
1720 | 1720 | if ($("#user_is_read_only").length && $("#user_is_read_only").val() == 1) { |
1721 | - displayMessage("<?php echo $LANG['error_not_allowed_to'];?>"); |
|
1721 | + displayMessage("<?php echo $LANG['error_not_allowed_to']; ?>"); |
|
1722 | 1722 | return false; |
1723 | 1723 | } |
1724 | 1724 | |
@@ -1743,17 +1743,17 @@ discard block |
||
1743 | 1743 | function open_move_group_div() |
1744 | 1744 | { |
1745 | 1745 | if ($.inArray($("#hid_cat").val(), $("#personal_visible_groups_list").val().split(',')) != -1 && $("#personal_sk_set").val() === "0") { |
1746 | - displayMessage("<i class='fa fa-warning'></i> <?php echo $LANG['error_personal_sk_expected'];?>"); |
|
1746 | + displayMessage("<i class='fa fa-warning'></i> <?php echo $LANG['error_personal_sk_expected']; ?>"); |
|
1747 | 1747 | return false; |
1748 | 1748 | } |
1749 | 1749 | |
1750 | 1750 | if ( |
1751 | - $("#hid_cat").val() == "<?php if (isset($_SESSION['personal_folders'][0])) echo $_SESSION['personal_folders'][0]; else echo "";?>") { |
|
1752 | - displayMessage("<i class='fa fa-warning'></i> <?php echo $LANG['error_not_allowed_to'];?>"); |
|
1751 | + $("#hid_cat").val() == "<?php if (isset($_SESSION['personal_folders'][0])) echo $_SESSION['personal_folders'][0]; else echo ""; ?>") { |
|
1752 | + displayMessage("<i class='fa fa-warning'></i> <?php echo $LANG['error_not_allowed_to']; ?>"); |
|
1753 | 1753 | return false; |
1754 | 1754 | } |
1755 | 1755 | if ($("#user_is_read_only").length && $("#user_is_read_only").val() == 1) { |
1756 | - displayMessage("<i class='fa fa-warning'></i> <?php echo $LANG['error_not_allowed_to'];?>"); |
|
1756 | + displayMessage("<i class='fa fa-warning'></i> <?php echo $LANG['error_not_allowed_to']; ?>"); |
|
1757 | 1757 | return false; |
1758 | 1758 | } |
1759 | 1759 | $("#div_loading").show(); |
@@ -1775,7 +1775,7 @@ discard block |
||
1775 | 1775 | function open_del_group_div() |
1776 | 1776 | { |
1777 | 1777 | if ($("#user_is_read_only").length && $("#user_is_read_only").val() == 1) { |
1778 | - displayMessage("<?php echo $LANG['error_not_allowed_to'];?>"); |
|
1778 | + displayMessage("<?php echo $LANG['error_not_allowed_to']; ?>"); |
|
1779 | 1779 | return false; |
1780 | 1780 | } |
1781 | 1781 | $("#div_loading").show(); |
@@ -1800,16 +1800,16 @@ discard block |
||
1800 | 1800 | |
1801 | 1801 | //Check if personal SK is needed and set |
1802 | 1802 | if ($('#recherche_group_pf').val() == 1 && $('#personal_sk_set').val() == 0) { |
1803 | - $("#div_dialog_message_text").html("<div style='font-size:16px;'><span class='ui-icon ui-icon-alert' style='float: left; margin-right: .3em;'><\/span><?php echo addslashes($LANG['alert_message_personal_sk_missing']);?><\/div>"); |
|
1803 | + $("#div_dialog_message_text").html("<div style='font-size:16px;'><span class='ui-icon ui-icon-alert' style='float: left; margin-right: .3em;'><\/span><?php echo addslashes($LANG['alert_message_personal_sk_missing']); ?><\/div>"); |
|
1804 | 1804 | LoadingPage(); |
1805 | 1805 | $("#div_dialog_message").dialog("open"); |
1806 | 1806 | } else if ($("#hid_cat").val() == "") { |
1807 | 1807 | LoadingPage(); |
1808 | - $("#div_dialog_message_text").html("<div style='font-size:16px;'><span class='ui-icon ui-icon-alert' style='float: left; margin-right: .3em;'><\/span><?php echo addslashes($LANG['error_no_selected_folder']);?><\/div>").dialog("open"); |
|
1808 | + $("#div_dialog_message_text").html("<div style='font-size:16px;'><span class='ui-icon ui-icon-alert' style='float: left; margin-right: .3em;'><\/span><?php echo addslashes($LANG['error_no_selected_folder']); ?><\/div>").dialog("open"); |
|
1809 | 1809 | } else if ($('#recherche_group_pf').val() == 0 || ($('#recherche_group_pf').val() == 1 && $('#personal_sk_set').val() == 1)) { |
1810 | 1810 | // is user read only and it is not a personal folder |
1811 | 1811 | if ($('#recherche_group_pf').val() == 0 && $("#user_is_read_only").length && $("#user_is_read_only").val() == "1") { |
1812 | - displayMessage("<?php echo $LANG['error_not_allowed_to'];?>"); |
|
1812 | + displayMessage("<?php echo $LANG['error_not_allowed_to']; ?>"); |
|
1813 | 1813 | LoadingPage(); |
1814 | 1814 | return false; |
1815 | 1815 | } |
@@ -1832,13 +1832,13 @@ discard block |
||
1832 | 1832 | { |
1833 | 1833 | toolbar :[["Bold", "Italic", "Strike", "-", "NumberedList", "BulletedList", "-", "Link","Unlink","-","RemoveFormat"]], |
1834 | 1834 | height: 100, |
1835 | - language: "<?php echo $_SESSION['user_language_code'];?>" |
|
1835 | + language: "<?php echo $_SESSION['user_language_code']; ?>" |
|
1836 | 1836 | } |
1837 | 1837 | ); |
1838 | 1838 | |
1839 | 1839 | // prepare select2 for users |
1840 | 1840 | $("#annonce_liste_destinataires").select2({ |
1841 | - language: "<?php echo $_SESSION['user_language_code'];?>" |
|
1841 | + language: "<?php echo $_SESSION['user_language_code']; ?>" |
|
1842 | 1842 | }); |
1843 | 1843 | |
1844 | 1844 | if ($("#recherche_group_pf").val() == 1) { |
@@ -1862,13 +1862,13 @@ discard block |
||
1862 | 1862 | if ( |
1863 | 1863 | ($('#recherche_group_pf').val() === "0" && $("#user_is_read_only").length && $("#user_is_read_only").val() === "1") && ($("#access_level").val() === "1" || $("#access_level").val() === "2" || $("#access_level").val() === "3") |
1864 | 1864 | ) { |
1865 | - displayMessage("<?php echo $LANG['error_not_allowed_to'];?>"); |
|
1865 | + displayMessage("<?php echo $LANG['error_not_allowed_to']; ?>"); |
|
1866 | 1866 | return false; |
1867 | 1867 | } |
1868 | 1868 | |
1869 | 1869 | // If no Item selected, no edition possible |
1870 | 1870 | if ($("#selected_items").val() == "") { |
1871 | - displayMessage("<?php echo $LANG['none_selected_text'];?>"); |
|
1871 | + displayMessage("<?php echo $LANG['none_selected_text']; ?>"); |
|
1872 | 1872 | return false; |
1873 | 1873 | } |
1874 | 1874 | $("#div_loading").show(); |
@@ -1901,7 +1901,7 @@ discard block |
||
1901 | 1901 | { |
1902 | 1902 | toolbar :[["Bold", "Italic", "Strike", "-", "NumberedList", "BulletedList", "-", "Link","Unlink","-","RemoveFormat"]], |
1903 | 1903 | height: 100, |
1904 | - language: "<?php echo $_SESSION['user_language_code'];?>" |
|
1904 | + language: "<?php echo $_SESSION['user_language_code']; ?>" |
|
1905 | 1905 | } |
1906 | 1906 | ); |
1907 | 1907 | CKEDITOR.instances["edit_desc"].setData($('#hid_desc').val()); |
@@ -1963,7 +1963,7 @@ discard block |
||
1963 | 1963 | if (restricted_to_roles == 1) { |
1964 | 1964 | //add optgroup |
1965 | 1965 | var optgroup = $('<optgroup>'); |
1966 | - optgroup.attr('label', "<?php echo $LANG['users'];?>"); |
|
1966 | + optgroup.attr('label', "<?php echo $LANG['users']; ?>"); |
|
1967 | 1967 | $("#edit_restricted_to_list option:last").wrapAll(optgroup); |
1968 | 1968 | } |
1969 | 1969 | var liste = $('#input_liste_utilisateurs').val().split(';'); |
@@ -1984,7 +1984,7 @@ discard block |
||
1984 | 1984 | var j = i; |
1985 | 1985 | //add optgroup |
1986 | 1986 | var optgroup = $('<optgroup>'); |
1987 | - optgroup.attr('label', "<?php echo $LANG['roles'];?>"); |
|
1987 | + optgroup.attr('label', "<?php echo $LANG['roles']; ?>"); |
|
1988 | 1988 | |
1989 | 1989 | var liste = $('#input_list_roles').val().split(';'); |
1990 | 1990 | for (var i=0; i<liste.length; i++) { |
@@ -2004,7 +2004,7 @@ discard block |
||
2004 | 2004 | |
2005 | 2005 | // prepare select2 for users |
2006 | 2006 | $("#edit_annonce_liste_destinataires").select2({ |
2007 | - language: "<?php echo $_SESSION['user_language_code'];?>" |
|
2007 | + language: "<?php echo $_SESSION['user_language_code']; ?>" |
|
2008 | 2008 | }); |
2009 | 2009 | |
2010 | 2010 | // disable folder selection if PF |
@@ -2028,7 +2028,7 @@ discard block |
||
2028 | 2028 | if ( |
2029 | 2029 | ($('#recherche_group_pf').val() === "0" && $("#user_is_read_only").length && $("#user_is_read_only").val() === "1") && ($("#access_level").val() === "1" || $("#access_level").val() === "2" || $("#access_level").val() === "3") |
2030 | 2030 | ) { |
2031 | - displayMessage("<i class='fa fa-warning'></i> <?php echo addslashes($LANG['error_not_allowed_to']);?>"); |
|
2031 | + displayMessage("<i class='fa fa-warning'></i> <?php echo addslashes($LANG['error_not_allowed_to']); ?>"); |
|
2032 | 2032 | return false; |
2033 | 2033 | } |
2034 | 2034 | |
@@ -2045,7 +2045,7 @@ discard block |
||
2045 | 2045 | $("#div_loading").hide(); |
2046 | 2046 | $('#div_del_item').dialog('open'); |
2047 | 2047 | } else { |
2048 | - displayMessage("<i class='fa fa-warning'></i> <?php echo addslashes($LANG['none_selected_text']);?>"); |
|
2048 | + displayMessage("<i class='fa fa-warning'></i> <?php echo addslashes($LANG['none_selected_text']); ?>"); |
|
2049 | 2049 | } |
2050 | 2050 | } |
2051 | 2051 | |
@@ -2056,7 +2056,7 @@ discard block |
||
2056 | 2056 | { |
2057 | 2057 | // is user read only |
2058 | 2058 | if ($('#recherche_group_pf').val() == 0 && $("#user_is_read_only").length && $("#user_is_read_only").val() == "1") { |
2059 | - displayMessage("<i class='fa fa-warning'></i> <?php echo addslashes($LANG['error_not_allowed_to']);?>"); |
|
2059 | + displayMessage("<i class='fa fa-warning'></i> <?php echo addslashes($LANG['error_not_allowed_to']); ?>"); |
|
2060 | 2060 | return false; |
2061 | 2061 | } |
2062 | 2062 | |
@@ -2064,7 +2064,7 @@ discard block |
||
2064 | 2064 | $('#copy_in_folder').val($("#hid_cat").val()); |
2065 | 2065 | $('#div_copy_item_to_folder').dialog('open'); |
2066 | 2066 | } else { |
2067 | - displayMessage("<i class='fa fa-warning'></i> <?php echo addslashes($LANG['none_selected_text']);?>"); |
|
2067 | + displayMessage("<i class='fa fa-warning'></i> <?php echo addslashes($LANG['none_selected_text']); ?>"); |
|
2068 | 2068 | } |
2069 | 2069 | } |
2070 | 2070 | |
@@ -2097,7 +2097,7 @@ discard block |
||
2097 | 2097 | { |
2098 | 2098 | type : "delete_attached_file", |
2099 | 2099 | file_id : file_id, |
2100 | - key : "<?php echo $_SESSION['key'];?>" |
|
2100 | + key : "<?php echo $_SESSION['key']; ?>" |
|
2101 | 2101 | }, |
2102 | 2102 | function(data) { |
2103 | 2103 | $("#span_edit_file_"+file_id).css("textDecoration", "line-through"); |
@@ -2116,10 +2116,10 @@ discard block |
||
2116 | 2116 | type : "image_preview_preparation", |
2117 | 2117 | uri : uri, |
2118 | 2118 | title : title, |
2119 | - key : "<?php echo $_SESSION['key'];?>" |
|
2119 | + key : "<?php echo $_SESSION['key']; ?>" |
|
2120 | 2120 | }, |
2121 | 2121 | function(data) { |
2122 | - data = prepareExchangedData(data , "decode", "<?php echo $_SESSION['key'];?>"); |
|
2122 | + data = prepareExchangedData(data , "decode", "<?php echo $_SESSION['key']; ?>"); |
|
2123 | 2123 | |
2124 | 2124 | $("#dialog_files").html('<img id="image_files" src="" />'); |
2125 | 2125 | //Get the HTML Elements |
@@ -2133,7 +2133,7 @@ discard block |
||
2133 | 2133 | imageTag |
2134 | 2134 | .error(function() { |
2135 | 2135 | $("#div_loading").hide(); |
2136 | - displayMessage("<?php echo "<i class='fa fa-exclamation-triangle fa-2x'></i> ".addslashes($LANG['error_file_is_missing']);?>"); |
|
2136 | + displayMessage("<?php echo "<i class='fa fa-exclamation-triangle fa-2x'></i> ".addslashes($LANG['error_file_is_missing']); ?>"); |
|
2137 | 2137 | }) |
2138 | 2138 | .load(function() { |
2139 | 2139 | $("#div_loading").hide(); |
@@ -2153,7 +2153,7 @@ discard block |
||
2153 | 2153 | { |
2154 | 2154 | type : "file_deletion", |
2155 | 2155 | filename: data.file_path, |
2156 | - key : "<?php echo $_SESSION['key'];?>" |
|
2156 | + key : "<?php echo $_SESSION['key']; ?>" |
|
2157 | 2157 | } |
2158 | 2158 | ); |
2159 | 2159 | } |
@@ -2168,12 +2168,12 @@ discard block |
||
2168 | 2168 | $.post("sources/items.queries.php", |
2169 | 2169 | { |
2170 | 2170 | type : "notify_a_user", |
2171 | - user_id : <?php echo $_SESSION['user_id'];?>, |
|
2171 | + user_id : <?php echo $_SESSION['user_id']; ?>, |
|
2172 | 2172 | status : status, |
2173 | 2173 | notify_type : 'on_show', |
2174 | 2174 | notify_role : '', |
2175 | 2175 | item_id : $('#id_item').val(), |
2176 | - key : "<?php echo $_SESSION['key'];?>" |
|
2176 | + key : "<?php echo $_SESSION['key']; ?>" |
|
2177 | 2177 | }, |
2178 | 2178 | function(data) { |
2179 | 2179 | if (data[0].error == "something_wrong") { |
@@ -2183,13 +2183,13 @@ discard block |
||
2183 | 2183 | $("#new_show_error").hide(); |
2184 | 2184 | if (data[0].new_status == "true") { |
2185 | 2185 | $('#menu_button_notify') |
2186 | - .attr('title','<?php echo $LANG['disable_notify'];?>') |
|
2186 | + .attr('title','<?php echo $LANG['disable_notify']; ?>') |
|
2187 | 2187 | .attr('onclick','notify_click(\'false\')'); |
2188 | 2188 | $('#div_notify').attr('class', '<i class="fa fa-bell-slash mi-green"></i> '); |
2189 | - $('#item_extra_info').html("<?php echo addslashes($LANG['notify_activated']);?>"); |
|
2189 | + $('#item_extra_info').html("<?php echo addslashes($LANG['notify_activated']); ?>"); |
|
2190 | 2190 | } else if (data[0].new_status == "false") { |
2191 | 2191 | $('#menu_button_notify') |
2192 | - .attr('title','<?php echo $LANG['enable_notify'];?>') |
|
2192 | + .attr('title','<?php echo $LANG['enable_notify']; ?>') |
|
2193 | 2193 | .attr('onclick','notify_click(\'true\')'); |
2194 | 2194 | $('#div_notify').attr('class', '<i class="fa fa-bell mi-green"></i> '); |
2195 | 2195 | $('#item_extra_info').html(""); |
@@ -2206,7 +2206,7 @@ discard block |
||
2206 | 2206 | function checkTitleDuplicate(itemTitle, checkInCurrentFolder, checkInAllFolders, textFieldId) |
2207 | 2207 | { |
2208 | 2208 | $("#new_show_error").html("").hide(); |
2209 | - $("#div_formulaire_saisi ~ .ui-dialog-buttonpane").find("button:contains('<?php echo $LANG['save_button'];?>')").button("enable"); |
|
2209 | + $("#div_formulaire_saisi ~ .ui-dialog-buttonpane").find("button:contains('<?php echo $LANG['save_button']; ?>')").button("enable"); |
|
2210 | 2210 | if (itemTitle != "") { |
2211 | 2211 | if (checkInCurrentFolder == "1" || checkInAllFolders == "1") { |
2212 | 2212 | //prepare data |
@@ -2219,7 +2219,7 @@ discard block |
||
2219 | 2219 | } |
2220 | 2220 | |
2221 | 2221 | // disable Save button |
2222 | - $("#div_formulaire_saisi ~ .ui-dialog-buttonpane").find("button:contains('<?php echo $LANG['save_button'];?>')").button("disable"); |
|
2222 | + $("#div_formulaire_saisi ~ .ui-dialog-buttonpane").find("button:contains('<?php echo $LANG['save_button']; ?>')").button("disable"); |
|
2223 | 2223 | |
2224 | 2224 | // send query |
2225 | 2225 | $.post( |
@@ -2227,17 +2227,17 @@ discard block |
||
2227 | 2227 | { |
2228 | 2228 | type : "check_for_title_duplicate", |
2229 | 2229 | option : typeOfCheck, |
2230 | - data : prepareExchangedData(data, "encode", "<?php echo $_SESSION['key'];?>"), |
|
2231 | - key : "<?php echo $_SESSION['key'];?>" |
|
2230 | + data : prepareExchangedData(data, "encode", "<?php echo $_SESSION['key']; ?>"), |
|
2231 | + key : "<?php echo $_SESSION['key']; ?>" |
|
2232 | 2232 | }, |
2233 | 2233 | function(data) { |
2234 | 2234 | if (data[0].duplicate != "1") { |
2235 | - $("#div_formulaire_saisi ~ .ui-dialog-buttonpane").find("button:contains('<?php echo $LANG['save_button'];?>')").button("enable"); |
|
2235 | + $("#div_formulaire_saisi ~ .ui-dialog-buttonpane").find("button:contains('<?php echo $LANG['save_button']; ?>')").button("enable"); |
|
2236 | 2236 | // display title |
2237 | 2237 | $("#"+textFieldId).html(itemTitle.escapeHTML()); |
2238 | 2238 | } else { |
2239 | 2239 | $("#label").focus(); |
2240 | - $("#new_show_error").html("<?php echo $LANG['duplicate_title_in_same_folder'];?>").show(); |
|
2240 | + $("#new_show_error").html("<?php echo $LANG['duplicate_title_in_same_folder']; ?>").show(); |
|
2241 | 2241 | } |
2242 | 2242 | } |
2243 | 2243 | ); |
@@ -2292,10 +2292,10 @@ discard block |
||
2292 | 2292 | "sources/items.queries.php", |
2293 | 2293 | { |
2294 | 2294 | type : "refresh_visible_folders", |
2295 | - key : "<?php echo $_SESSION['key'];?>" |
|
2295 | + key : "<?php echo $_SESSION['key']; ?>" |
|
2296 | 2296 | }, |
2297 | 2297 | function(data) { |
2298 | - data = prepareExchangedData(data , "decode", "<?php echo $_SESSION['key'];?>"); |
|
2298 | + data = prepareExchangedData(data , "decode", "<?php echo $_SESSION['key']; ?>"); |
|
2299 | 2299 | //check if format error |
2300 | 2300 | if (data.error == "") { |
2301 | 2301 | // append new list |
@@ -2404,7 +2404,7 @@ discard block |
||
2404 | 2404 | |
2405 | 2405 | //warning if screen height too short |
2406 | 2406 | if (parseInt(window_height-440) <= 30) { |
2407 | - $("#div_dialog_message_text").html("<?php echo addslashes($LANG['warning_screen_height']);?>"); |
|
2407 | + $("#div_dialog_message_text").html("<?php echo addslashes($LANG['warning_screen_height']); ?>"); |
|
2408 | 2408 | $("#div_dialog_message").dialog('open'); |
2409 | 2409 | } |
2410 | 2410 | |
@@ -2436,7 +2436,7 @@ discard block |
||
2436 | 2436 | } |
2437 | 2437 | }, |
2438 | 2438 | "strings" : { |
2439 | - "Loading ..." : "<?php echo $LANG['loading'];?>..." |
|
2439 | + "Loading ..." : "<?php echo $LANG['loading']; ?>..." |
|
2440 | 2440 | }, |
2441 | 2441 | "error" : { |
2442 | 2442 | |
@@ -2474,12 +2474,12 @@ discard block |
||
2474 | 2474 | autoOpen: false, |
2475 | 2475 | width: 500, |
2476 | 2476 | height: 280, |
2477 | - title: "<?php echo $LANG['item_menu_add_rep'];?>", |
|
2477 | + title: "<?php echo $LANG['item_menu_add_rep']; ?>", |
|
2478 | 2478 | buttons: { |
2479 | - "<?php echo $LANG['save_button'];?>": function() { |
|
2479 | + "<?php echo $LANG['save_button']; ?>": function() { |
|
2480 | 2480 | AddNewFolder(); |
2481 | 2481 | }, |
2482 | - "<?php echo $LANG['cancel_button'];?>": function() { |
|
2482 | + "<?php echo $LANG['cancel_button']; ?>": function() { |
|
2483 | 2483 | $("#new_rep_show_error").html("").hide(); |
2484 | 2484 | $(this).dialog('close'); |
2485 | 2485 | } |
@@ -2497,26 +2497,26 @@ discard block |
||
2497 | 2497 | autoOpen: false, |
2498 | 2498 | width: 490, |
2499 | 2499 | height: 280, |
2500 | - title: "<?php echo $LANG['item_menu_edi_rep'];?>", |
|
2500 | + title: "<?php echo $LANG['item_menu_edi_rep']; ?>", |
|
2501 | 2501 | buttons: { |
2502 | - "<?php echo $LANG['save_button'];?>": function() { |
|
2502 | + "<?php echo $LANG['save_button']; ?>": function() { |
|
2503 | 2503 | //Do some checks |
2504 | 2504 | $("#edit_rep_show_error").hide(); |
2505 | 2505 | if ($("#edit_folder_title").val() == "") { |
2506 | - $("#edit_rep_show_error").html("<?php echo addslashes($LANG['error_group_label']);?>"); |
|
2506 | + $("#edit_rep_show_error").html("<?php echo addslashes($LANG['error_group_label']); ?>"); |
|
2507 | 2507 | $("#edit_rep_show_error").show(); |
2508 | 2508 | } else if ($("#edit_folder_folder").val() == "0") { |
2509 | - $("#edit_rep_show_error").html("<?php echo addslashes($LANG['error_group']);?>"); |
|
2509 | + $("#edit_rep_show_error").html("<?php echo addslashes($LANG['error_group']); ?>"); |
|
2510 | 2510 | $("#edit_rep_show_error").show(); |
2511 | 2511 | } else if ($("#edit_folder_complexity").val() == "") { |
2512 | - $("#edit_rep_show_error").html("<?php echo addslashes($LANG['error_group_complex']);?>"); |
|
2512 | + $("#edit_rep_show_error").html("<?php echo addslashes($LANG['error_group_complex']); ?>"); |
|
2513 | 2513 | $("#edit_rep_show_error").show(); |
2514 | 2514 | } else if (/^\d+$/.test($("#edit_folder_title").val())) { |
2515 | - $("#edit_rep_show_error").html("<?php echo addslashes($LANG['error_only_numbers_in_folder_name']);?>"); |
|
2515 | + $("#edit_rep_show_error").html("<?php echo addslashes($LANG['error_only_numbers_in_folder_name']); ?>"); |
|
2516 | 2516 | $("#edit_rep_show_error").show(); |
2517 | 2517 | } else { |
2518 | 2518 | $("#edit_folder_loader").show(); |
2519 | - $("#div_editer_rep ~ .ui-dialog-buttonpane").find("button:contains('<?php echo $LANG['save_button'];?>')").prop("disabled", true); |
|
2519 | + $("#div_editer_rep ~ .ui-dialog-buttonpane").find("button:contains('<?php echo $LANG['save_button']; ?>')").prop("disabled", true); |
|
2520 | 2520 | |
2521 | 2521 | //prepare data |
2522 | 2522 | var data = '{"title":"' + $('#edit_folder_title').val().replace(/"/g,'"') + '", ' + |
@@ -2528,8 +2528,8 @@ discard block |
||
2528 | 2528 | "sources/items.queries.php", |
2529 | 2529 | { |
2530 | 2530 | type : "update_rep", |
2531 | - data : prepareExchangedData(data, "encode", "<?php echo $_SESSION['key'];?>"), |
|
2532 | - key : "<?php echo $_SESSION['key'];?>" |
|
2531 | + data : prepareExchangedData(data, "encode", "<?php echo $_SESSION['key']; ?>"), |
|
2532 | + key : "<?php echo $_SESSION['key']; ?>" |
|
2533 | 2533 | }, |
2534 | 2534 | function(data) { |
2535 | 2535 | //check if format error |
@@ -2542,23 +2542,23 @@ discard block |
||
2542 | 2542 | $("#div_editer_rep").dialog("close"); |
2543 | 2543 | } else { |
2544 | 2544 | if (data[0].error === "ERR_TITLE_ONLY_WITH_NUMBERS") { |
2545 | - $("#edit_rep_show_error").html('<?php echo addslashes($LANG['error_only_numbers_in_folder_name']);?>').show(); |
|
2545 | + $("#edit_rep_show_error").html('<?php echo addslashes($LANG['error_only_numbers_in_folder_name']); ?>').show(); |
|
2546 | 2546 | } else { |
2547 | 2547 | $("#edit_rep_show_error").html(data[0].error).show(); |
2548 | 2548 | } |
2549 | 2549 | |
2550 | 2550 | } |
2551 | 2551 | $("#edit_folder_loader").hide(); |
2552 | - $("#div_editer_rep ~ .ui-dialog-buttonpane").find("button:contains('<?php echo $LANG['save_button'];?>')").prop("disabled", false); |
|
2552 | + $("#div_editer_rep ~ .ui-dialog-buttonpane").find("button:contains('<?php echo $LANG['save_button']; ?>')").prop("disabled", false); |
|
2553 | 2553 | }, |
2554 | 2554 | "json" |
2555 | 2555 | ); |
2556 | 2556 | } |
2557 | 2557 | }, |
2558 | - "<?php echo $LANG['cancel_button'];?>": function() { |
|
2558 | + "<?php echo $LANG['cancel_button']; ?>": function() { |
|
2559 | 2559 | $("#edit_folder_loader").hide(); |
2560 | 2560 | $("#edit_rep_show_error").html("").hide(); |
2561 | - $("#div_editer_rep ~ .ui-dialog-buttonpane").find("button:contains('<?php echo $LANG['save_button'];?>')").prop("disabled", false); |
|
2561 | + $("#div_editer_rep ~ .ui-dialog-buttonpane").find("button:contains('<?php echo $LANG['save_button']; ?>')").prop("disabled", false); |
|
2562 | 2562 | $(this).dialog('close'); |
2563 | 2563 | } |
2564 | 2564 | }, |
@@ -2575,20 +2575,20 @@ discard block |
||
2575 | 2575 | autoOpen: false, |
2576 | 2576 | width: 400, |
2577 | 2577 | height: 250, |
2578 | - title: "<?php echo $LANG['item_menu_copy_elem'];?>", |
|
2578 | + title: "<?php echo $LANG['item_menu_copy_elem']; ?>", |
|
2579 | 2579 | open: function( event, ui ) { |
2580 | 2580 | $("#copy_in_folder").select2({ |
2581 | - language: "<?php echo $_SESSION['user_language_code'];?>" |
|
2581 | + language: "<?php echo $_SESSION['user_language_code']; ?>" |
|
2582 | 2582 | }); |
2583 | - $(":button:contains('<?php echo $LANG['ok'];?>')").prop("disabled", false); |
|
2583 | + $(":button:contains('<?php echo $LANG['ok']; ?>')").prop("disabled", false); |
|
2584 | 2584 | $("#copy_item_info").addClass("ui-state-highlight ui-corner-all").hide(); |
2585 | 2585 | $(".ui-tooltip").siblings(".tooltip").remove(); |
2586 | 2586 | $("#div_copy_item_to_folder_item").html("<center>"+$("#id_label").html()+"</center>"); |
2587 | 2587 | }, |
2588 | 2588 | buttons: { |
2589 | - "<?php echo $LANG['ok'];?>": function() { |
|
2590 | - $("#copy_item_info").addClass("ui-state-highlight ui-corner-all").show().html("<span><?php echo $LANG['please_wait']." <i class=\'fa fa-cog fa-spin'></i>";?></span>"); |
|
2591 | - $(":button:contains('<?php echo $LANG['ok'];?>')").prop("disabled", true); |
|
2589 | + "<?php echo $LANG['ok']; ?>": function() { |
|
2590 | + $("#copy_item_info").addClass("ui-state-highlight ui-corner-all").show().html("<span><?php echo $LANG['please_wait']." <i class=\'fa fa-cog fa-spin'></i>"; ?></span>"); |
|
2591 | + $(":button:contains('<?php echo $LANG['ok']; ?>')").prop("disabled", true); |
|
2592 | 2592 | //Send query |
2593 | 2593 | $.post( |
2594 | 2594 | "sources/items.queries.php", |
@@ -2597,7 +2597,7 @@ discard block |
||
2597 | 2597 | item_id : $('#id_item').val(), |
2598 | 2598 | source_id : $('#hid_cat').val(), |
2599 | 2599 | dest_id : $('#copy_in_folder').val(), |
2600 | - key : "<?php echo $_SESSION['key'];?>" |
|
2600 | + key : "<?php echo $_SESSION['key']; ?>" |
|
2601 | 2601 | }, |
2602 | 2602 | function(data) { |
2603 | 2603 | //check if format error |
@@ -2618,7 +2618,7 @@ discard block |
||
2618 | 2618 | "json" |
2619 | 2619 | ); |
2620 | 2620 | }, |
2621 | - "<?php echo $LANG['cancel_button'];?>": function() { |
|
2621 | + "<?php echo $LANG['cancel_button']; ?>": function() { |
|
2622 | 2622 | $("#copy_item_to_folder_show_error").html("").hide(); |
2623 | 2623 | $("#div_copy_item_to_folder").dialog('close'); |
2624 | 2624 | } |
@@ -2633,21 +2633,21 @@ discard block |
||
2633 | 2633 | autoOpen: false, |
2634 | 2634 | width: 350, |
2635 | 2635 | height: 250, |
2636 | - title: "<?php echo $LANG['item_menu_mov_rep'];?>", |
|
2636 | + title: "<?php echo $LANG['item_menu_mov_rep']; ?>", |
|
2637 | 2637 | buttons: { |
2638 | - "<?php echo $LANG['save_button'];?>": function() { |
|
2638 | + "<?php echo $LANG['save_button']; ?>": function() { |
|
2639 | 2639 | //Do some checks |
2640 | 2640 | $("#move_rep_show_error").hide(); |
2641 | 2641 | if ($("#move_folder_id").val() == "0") { |
2642 | - $("#move_rep_show_error").html("<?php echo addslashes($LANG['error_group']);?>"); |
|
2642 | + $("#move_rep_show_error").html("<?php echo addslashes($LANG['error_group']); ?>"); |
|
2643 | 2643 | $("#move_rep_show_error").show(); |
2644 | 2644 | } else if($('#hid_cat').val() === $('#move_folder_id').val()) { |
2645 | 2645 | // do not move to itself |
2646 | - $("#move_rep_show_error").html("<?php echo addslashes($LANG['error_not_allowed_to']);?>"); |
|
2646 | + $("#move_rep_show_error").html("<?php echo addslashes($LANG['error_not_allowed_to']); ?>"); |
|
2647 | 2647 | $("#move_rep_show_error").show(); |
2648 | 2648 | } else { |
2649 | 2649 | $("#move_folder_loader").show(); |
2650 | - $("#div_editer_rep ~ .ui-dialog-buttonpane").find("button:contains('<?php echo $LANG['save_button'];?>')").prop("disabled", true); |
|
2650 | + $("#div_editer_rep ~ .ui-dialog-buttonpane").find("button:contains('<?php echo $LANG['save_button']; ?>')").prop("disabled", true); |
|
2651 | 2651 | |
2652 | 2652 | //prepare data |
2653 | 2653 | var data = '{"source_folder_id":"' + $('#hid_cat').val() + '", ' + |
@@ -2658,13 +2658,13 @@ discard block |
||
2658 | 2658 | "sources/items.queries.php", |
2659 | 2659 | { |
2660 | 2660 | type : "move_folder", |
2661 | - data : prepareExchangedData(data, "encode", "<?php echo $_SESSION['key'];?>"), |
|
2662 | - key : "<?php echo $_SESSION['key'];?>" |
|
2661 | + data : prepareExchangedData(data, "encode", "<?php echo $_SESSION['key']; ?>"), |
|
2662 | + key : "<?php echo $_SESSION['key']; ?>" |
|
2663 | 2663 | }, |
2664 | 2664 | function(data) { |
2665 | 2665 | //check if format error |
2666 | 2666 | if (data[0].error == "") { |
2667 | - $("#div_move_folder ~ .ui-dialog-buttonpane").find("button:contains('<?php echo $LANG['save_button'];?>')").prop("disabled", false); |
|
2667 | + $("#div_move_folder ~ .ui-dialog-buttonpane").find("button:contains('<?php echo $LANG['save_button']; ?>')").prop("disabled", false); |
|
2668 | 2668 | ListerItems($('#hid_cat').val(), "", 0); |
2669 | 2669 | $("#move_folder_loader").hide(); |
2670 | 2670 | refreshTree(); |
@@ -2678,9 +2678,9 @@ discard block |
||
2678 | 2678 | ); |
2679 | 2679 | } |
2680 | 2680 | }, |
2681 | - "<?php echo $LANG['cancel_button'];?>": function() { |
|
2681 | + "<?php echo $LANG['cancel_button']; ?>": function() { |
|
2682 | 2682 | $("#edit_rep_show_error").html("").hide(); |
2683 | - $("#div_editer_rep ~ .ui-dialog-buttonpane").find("button:contains('<?php echo $LANG['save_button'];?>')").prop("disabled", false); |
|
2683 | + $("#div_editer_rep ~ .ui-dialog-buttonpane").find("button:contains('<?php echo $LANG['save_button']; ?>')").prop("disabled", false); |
|
2684 | 2684 | $("#move_rep_show_error").html("").hide(); |
2685 | 2685 | $(this).dialog('close'); |
2686 | 2686 | } |
@@ -2699,7 +2699,7 @@ discard block |
||
2699 | 2699 | autoOpen: false, |
2700 | 2700 | width: 500, |
2701 | 2701 | height: 290, |
2702 | - title: "<?php echo $LANG['copy_folder'];?>", |
|
2702 | + title: "<?php echo $LANG['copy_folder']; ?>", |
|
2703 | 2703 | close: function () { |
2704 | 2704 | $("#copy_folder_source_id, #copy_folder_destination_id").children('option').remove(); |
2705 | 2705 | $("#div_copy_folder_msg") |
@@ -2708,14 +2708,14 @@ discard block |
||
2708 | 2708 | .hide(); |
2709 | 2709 | }, |
2710 | 2710 | open: function(event,ui) { |
2711 | - $("#div_copy_folder ~ .ui-dialog-buttonpane").find("button:contains('<?php echo $LANG['save_button'];?>')").prop("disabled", false); |
|
2711 | + $("#div_copy_folder ~ .ui-dialog-buttonpane").find("button:contains('<?php echo $LANG['save_button']; ?>')").prop("disabled", false); |
|
2712 | 2712 | |
2713 | 2713 | // get list of folders |
2714 | 2714 | $.post( |
2715 | 2715 | "sources/folders.queries.php", |
2716 | 2716 | { |
2717 | 2717 | type : "get_list_of_folders", |
2718 | - key : "<?php echo $_SESSION['key'];?>" |
|
2718 | + key : "<?php echo $_SESSION['key']; ?>" |
|
2719 | 2719 | }, |
2720 | 2720 | function(data) { |
2721 | 2721 | $("#div_loading").hide(); |
@@ -2729,11 +2729,11 @@ discard block |
||
2729 | 2729 | ); |
2730 | 2730 | }, |
2731 | 2731 | buttons: { |
2732 | - "<?php echo $LANG['save_button'];?>": function() { |
|
2732 | + "<?php echo $LANG['save_button']; ?>": function() { |
|
2733 | 2733 | //Do some checks |
2734 | 2734 | if ($("#copy_folder_source_id").val() === "" || $("#copy_folder_destination_id").val() === "") { |
2735 | 2735 | $("#div_copy_folder_msg") |
2736 | - .html('<i class="fa fa-warning"></i> <?php echo $LANG['error_must_enter_all_fields'];?>') |
|
2736 | + .html('<i class="fa fa-warning"></i> <?php echo $LANG['error_must_enter_all_fields']; ?>') |
|
2737 | 2737 | .addClass("ui-state-error") |
2738 | 2738 | .show().delay(2000).fadeOut(1000); |
2739 | 2739 | return false; |
@@ -2741,7 +2741,7 @@ discard block |
||
2741 | 2741 | |
2742 | 2742 | if ($("#copy_folder_source_id").val() === $("#copy_folder_destination_id").val()) { |
2743 | 2743 | $("#div_copy_folder_msg") |
2744 | - .html('<i class="fa fa-warning"></i> <?php echo $LANG['error_source_and_destination_are_equal'];?>') |
|
2744 | + .html('<i class="fa fa-warning"></i> <?php echo $LANG['error_source_and_destination_are_equal']; ?>') |
|
2745 | 2745 | .addClass("ui-state-error") |
2746 | 2746 | .show().delay(2000).fadeOut(1000); |
2747 | 2747 | return false; |
@@ -2749,7 +2749,7 @@ discard block |
||
2749 | 2749 | |
2750 | 2750 | |
2751 | 2751 | $("#div_copy_folder_msg") |
2752 | - .html('<i class="fa fa-cog fa-spin"></i> <?php echo $LANG['please_wait'];?>') |
|
2752 | + .html('<i class="fa fa-cog fa-spin"></i> <?php echo $LANG['please_wait']; ?>') |
|
2753 | 2753 | .addClass("ui-state-highlight") |
2754 | 2754 | .show(); |
2755 | 2755 | |
@@ -2762,13 +2762,13 @@ discard block |
||
2762 | 2762 | "sources/folders.queries.php", |
2763 | 2763 | { |
2764 | 2764 | type : "copy_folder", |
2765 | - data : prepareExchangedData(data, "encode", "<?php echo $_SESSION['key'];?>"), |
|
2766 | - key : "<?php echo $_SESSION['key'];?>" |
|
2765 | + data : prepareExchangedData(data, "encode", "<?php echo $_SESSION['key']; ?>"), |
|
2766 | + key : "<?php echo $_SESSION['key']; ?>" |
|
2767 | 2767 | }, |
2768 | 2768 | function(data) { |
2769 | 2769 | //check if format error |
2770 | 2770 | if (data[0].error == "") { |
2771 | - $("#div_copy_folder ~ .ui-dialog-buttonpane").find("button:contains('<?php echo $LANG['save_button'];?>')").prop("disabled", false); |
|
2771 | + $("#div_copy_folder ~ .ui-dialog-buttonpane").find("button:contains('<?php echo $LANG['save_button']; ?>')").prop("disabled", false); |
|
2772 | 2772 | refreshTree(); |
2773 | 2773 | $("#div_copy_folder").dialog("close"); |
2774 | 2774 | } else { |
@@ -2778,9 +2778,9 @@ discard block |
||
2778 | 2778 | "json" |
2779 | 2779 | ); |
2780 | 2780 | }, |
2781 | - "<?php echo $LANG['cancel_button'];?>": function() { |
|
2781 | + "<?php echo $LANG['cancel_button']; ?>": function() { |
|
2782 | 2782 | $("#div_copy_folder_msg").html("").hide(); |
2783 | - $("#div_copy_folder ~ .ui-dialog-buttonpane").find("button:contains('<?php echo $LANG['save_button'];?>')").prop("disabled", false); |
|
2783 | + $("#div_copy_folder ~ .ui-dialog-buttonpane").find("button:contains('<?php echo $LANG['save_button']; ?>')").prop("disabled", false); |
|
2784 | 2784 | $(this).dialog('close'); |
2785 | 2785 | } |
2786 | 2786 | } |
@@ -2794,12 +2794,12 @@ discard block |
||
2794 | 2794 | autoOpen: false, |
2795 | 2795 | width: 600, |
2796 | 2796 | height: 230, |
2797 | - title: "<?php echo $LANG['item_menu_del_rep'];?>", |
|
2797 | + title: "<?php echo $LANG['item_menu_del_rep']; ?>", |
|
2798 | 2798 | buttons: { |
2799 | - "<?php echo $LANG['delete'];?>": function() { |
|
2799 | + "<?php echo $LANG['delete']; ?>": function() { |
|
2800 | 2800 | SupprimerFolder(); |
2801 | 2801 | }, |
2802 | - "<?php echo $LANG['cancel_button'];?>": function() { |
|
2802 | + "<?php echo $LANG['cancel_button']; ?>": function() { |
|
2803 | 2803 | $(this).dialog('close'); |
2804 | 2804 | } |
2805 | 2805 | }, |
@@ -2819,17 +2819,17 @@ discard block |
||
2819 | 2819 | autoOpen: false, |
2820 | 2820 | width: 505, |
2821 | 2821 | height: 680, |
2822 | - title: "<?php echo $LANG['item_menu_add_elem'];?>", |
|
2822 | + title: "<?php echo $LANG['item_menu_add_elem']; ?>", |
|
2823 | 2823 | open: function( event, ui ) { |
2824 | - $(".ui-dialog-buttonpane button:contains('<?php echo $LANG['save_button'];?>')").button("disabled"); |
|
2824 | + $(".ui-dialog-buttonpane button:contains('<?php echo $LANG['save_button']; ?>')").button("disabled"); |
|
2825 | 2825 | }, |
2826 | 2826 | buttons: { |
2827 | - "<?php echo $LANG['save_button'];?>": function() { |
|
2827 | + "<?php echo $LANG['save_button']; ?>": function() { |
|
2828 | 2828 | $("#div_loading").show(); |
2829 | - $(".ui-dialog-buttonpane button:contains('<?php echo $LANG['save_button'];?>')").button("enable"); |
|
2829 | + $(".ui-dialog-buttonpane button:contains('<?php echo $LANG['save_button']; ?>')").button("enable"); |
|
2830 | 2830 | AjouterItem(); |
2831 | 2831 | }, |
2832 | - "<?php echo $LANG['cancel_button'];?>": function() { |
|
2832 | + "<?php echo $LANG['cancel_button']; ?>": function() { |
|
2833 | 2833 | //Clear upload queue |
2834 | 2834 | $('#item_file_queue').html(''); |
2835 | 2835 | //Select 1st tab |
@@ -2860,7 +2860,7 @@ discard block |
||
2860 | 2860 | } |
2861 | 2861 | |
2862 | 2862 | $("#categorie").select2({ |
2863 | - language: "<?php echo $_SESSION['user_language_code'];?>" |
|
2863 | + language: "<?php echo $_SESSION['user_language_code']; ?>" |
|
2864 | 2864 | }); |
2865 | 2865 | }, |
2866 | 2866 | close: function(event,ui) { |
@@ -2871,7 +2871,7 @@ discard block |
||
2871 | 2871 | $(".item_field").val(""); // clean values in Fields |
2872 | 2872 | $("#pw1").focus(); |
2873 | 2873 | $("#new_show_error").html("").hide(); |
2874 | - $(".ui-dialog-buttonpane button:contains('<?php echo $LANG['save_button'];?>')").button("enable"); |
|
2874 | + $(".ui-dialog-buttonpane button:contains('<?php echo $LANG['save_button']; ?>')").button("enable"); |
|
2875 | 2875 | $("#div_loading").hide(); |
2876 | 2876 | } |
2877 | 2877 | }); |
@@ -2883,13 +2883,13 @@ discard block |
||
2883 | 2883 | autoOpen: false, |
2884 | 2884 | width: 505, |
2885 | 2885 | height: 680, |
2886 | - title: "<?php echo $LANG['item_menu_edi_elem'];?>", |
|
2886 | + title: "<?php echo $LANG['item_menu_edi_elem']; ?>", |
|
2887 | 2887 | buttons: { |
2888 | - "<?php echo $LANG['save_button'];?>": function() { |
|
2889 | - $("#div_formulaire_edition_item ~ .ui-dialog-buttonpane").find("button:contains('<?php echo $LANG['save_button'];?>')").prop("disabled", true); |
|
2888 | + "<?php echo $LANG['save_button']; ?>": function() { |
|
2889 | + $("#div_formulaire_edition_item ~ .ui-dialog-buttonpane").find("button:contains('<?php echo $LANG['save_button']; ?>')").prop("disabled", true); |
|
2890 | 2890 | EditerItem(); |
2891 | 2891 | }, |
2892 | - "<?php echo $LANG['cancel_button'];?>": function() { |
|
2892 | + "<?php echo $LANG['cancel_button']; ?>": function() { |
|
2893 | 2893 | //Clear upload queue |
2894 | 2894 | $('#item_edit_file_queue').html(''); |
2895 | 2895 | //Select 1st tab |
@@ -2912,10 +2912,10 @@ discard block |
||
2912 | 2912 | { |
2913 | 2913 | type : "free_item_for_edition", |
2914 | 2914 | id : $("#id_item").val(), |
2915 | - key : "<?php echo $_SESSION['key'];?>" |
|
2915 | + key : "<?php echo $_SESSION['key']; ?>" |
|
2916 | 2916 | } |
2917 | 2917 | ); |
2918 | - $("button:contains('<?php echo $LANG['save_button'];?>')").prop("disabled", false); |
|
2918 | + $("button:contains('<?php echo $LANG['save_button']; ?>')").prop("disabled", false); |
|
2919 | 2919 | }, |
2920 | 2920 | open: function(event,ui) { |
2921 | 2921 | //refresh pw complexity |
@@ -2931,7 +2931,7 @@ discard block |
||
2931 | 2931 | if ($("#edit_item_more") != undefined && $("#display_categories").val() != 1) |
2932 | 2932 | $("#edit_item_more").show(); |
2933 | 2933 | } |
2934 | - $("button:contains('<?php echo $LANG['save_button'];?>')").prop("disabled", false); |
|
2934 | + $("button:contains('<?php echo $LANG['save_button']; ?>')").prop("disabled", false); |
|
2935 | 2935 | |
2936 | 2936 | // hide complexity if PF |
2937 | 2937 | if ($("#pf_selected").val() == 1) { |
@@ -2941,7 +2941,7 @@ discard block |
||
2941 | 2941 | } |
2942 | 2942 | |
2943 | 2943 | $("#edit_categorie").select2({ |
2944 | - language: "<?php echo $_SESSION['user_language_code'];?>" |
|
2944 | + language: "<?php echo $_SESSION['user_language_code']; ?>" |
|
2945 | 2945 | }); |
2946 | 2946 | } |
2947 | 2947 | }); |
@@ -2953,9 +2953,9 @@ discard block |
||
2953 | 2953 | autoOpen: false, |
2954 | 2954 | width: 400, |
2955 | 2955 | height: 220, |
2956 | - title: "<?php echo $LANG['item_menu_del_elem'];?>", |
|
2956 | + title: "<?php echo $LANG['item_menu_del_elem']; ?>", |
|
2957 | 2957 | buttons: { |
2958 | - "<?php echo $LANG['del_button'];?>": function() { |
|
2958 | + "<?php echo $LANG['del_button']; ?>": function() { |
|
2959 | 2959 | $.post( |
2960 | 2960 | "sources/items.queries.php", |
2961 | 2961 | { |
@@ -2963,7 +2963,7 @@ discard block |
||
2963 | 2963 | id : $("#id_item").val(), |
2964 | 2964 | categorie : $('#hid_cat').val(), |
2965 | 2965 | label : $("#hid_label").val(), |
2966 | - key : "<?php echo $_SESSION['key'];?>" |
|
2966 | + key : "<?php echo $_SESSION['key']; ?>" |
|
2967 | 2967 | }, |
2968 | 2968 | function(data) { |
2969 | 2969 | $("#div_loading").show(); |
@@ -2985,7 +2985,7 @@ discard block |
||
2985 | 2985 | ); |
2986 | 2986 | $(this).dialog('close'); |
2987 | 2987 | }, |
2988 | - "<?php echo $LANG['cancel_button'];?>": function() { |
|
2988 | + "<?php echo $LANG['cancel_button']; ?>": function() { |
|
2989 | 2989 | $(this).dialog('close'); |
2990 | 2990 | } |
2991 | 2991 | }, |
@@ -3002,9 +3002,9 @@ discard block |
||
3002 | 3002 | autoOpen: false, |
3003 | 3003 | width: 500, |
3004 | 3004 | height: 200, |
3005 | - title: "<?php echo $LANG['admin_main'];?>", |
|
3005 | + title: "<?php echo $LANG['admin_main']; ?>", |
|
3006 | 3006 | buttons: { |
3007 | - "<?php echo $LANG['close'];?>": function() { |
|
3007 | + "<?php echo $LANG['close']; ?>": function() { |
|
3008 | 3008 | $(this).dialog('close'); |
3009 | 3009 | } |
3010 | 3010 | }, |
@@ -3020,9 +3020,9 @@ discard block |
||
3020 | 3020 | autoOpen: false, |
3021 | 3021 | width: 650, |
3022 | 3022 | height: 400, |
3023 | - title: "<?php echo $LANG['history'];?>", |
|
3023 | + title: "<?php echo $LANG['history']; ?>", |
|
3024 | 3024 | buttons: { |
3025 | - "<?php echo $LANG['close'];?>": function() { |
|
3025 | + "<?php echo $LANG['close']; ?>": function() { |
|
3026 | 3026 | $(this).dialog('close'); |
3027 | 3027 | } |
3028 | 3028 | }, |
@@ -3035,13 +3035,13 @@ discard block |
||
3035 | 3035 | "sources/items.queries.php", |
3036 | 3036 | { |
3037 | 3037 | type : "load_item_history", |
3038 | - data : prepareExchangedData(data, "encode", "<?php echo $_SESSION['key'];?>"), |
|
3039 | - key : "<?php echo $_SESSION['key'];?>" |
|
3038 | + data : prepareExchangedData(data, "encode", "<?php echo $_SESSION['key']; ?>"), |
|
3039 | + key : "<?php echo $_SESSION['key']; ?>" |
|
3040 | 3040 | }, |
3041 | 3041 | function(data) { |
3042 | 3042 | //decrypt data |
3043 | 3043 | try { |
3044 | - data = prepareExchangedData(data , "decode", "<?php echo $_SESSION['key'];?>"); |
|
3044 | + data = prepareExchangedData(data , "decode", "<?php echo $_SESSION['key']; ?>"); |
|
3045 | 3045 | } catch (e) { |
3046 | 3046 | // error |
3047 | 3047 | $("#div_loading").hide(); |
@@ -3065,9 +3065,9 @@ discard block |
||
3065 | 3065 | autoOpen: false, |
3066 | 3066 | width: 500, |
3067 | 3067 | height: 200, |
3068 | - title: "<?php echo $LANG['share'];?>", |
|
3068 | + title: "<?php echo $LANG['share']; ?>", |
|
3069 | 3069 | buttons: { |
3070 | - "<?php echo $LANG['send'];?>": function() { |
|
3070 | + "<?php echo $LANG['send']; ?>": function() { |
|
3071 | 3071 | $("#div_item_share_error").hide(); |
3072 | 3072 | if (IsValidEmail($("#item_share_email").val())) { //check if email format is ok |
3073 | 3073 | $("#div_item_share_status").show(); |
@@ -3078,12 +3078,12 @@ discard block |
||
3078 | 3078 | id : $("#id_item").val(), |
3079 | 3079 | receipt : $("#item_share_email").val(), |
3080 | 3080 | cat : "share_this_item", |
3081 | - key : "<?php echo $_SESSION['key'];?>" |
|
3081 | + key : "<?php echo $_SESSION['key']; ?>" |
|
3082 | 3082 | }, |
3083 | 3083 | function(data) { |
3084 | 3084 | $("#div_item_share_status").html("").hide(); |
3085 | 3085 | if (data[0].error == "") { |
3086 | - $("#div_item_share_error").html("<?php echo addslashes($LANG['share_sent_ok']);?>").show(); |
|
3086 | + $("#div_item_share_error").html("<?php echo addslashes($LANG['share_sent_ok']); ?>").show(); |
|
3087 | 3087 | } else { |
3088 | 3088 | $("#div_item_share_error").html(data[0].message).show(); |
3089 | 3089 | } |
@@ -3091,10 +3091,10 @@ discard block |
||
3091 | 3091 | "json" |
3092 | 3092 | ); |
3093 | 3093 | } else { |
3094 | - $("#div_item_share_error").html("<?php echo addslashes($LANG['bad_email_format']);?>").show(); |
|
3094 | + $("#div_item_share_error").html("<?php echo addslashes($LANG['bad_email_format']); ?>").show(); |
|
3095 | 3095 | } |
3096 | 3096 | }, |
3097 | - "<?php echo $LANG['close'];?>": function() { |
|
3097 | + "<?php echo $LANG['close']; ?>": function() { |
|
3098 | 3098 | $(this).dialog('close'); |
3099 | 3099 | } |
3100 | 3100 | }, |
@@ -3110,9 +3110,9 @@ discard block |
||
3110 | 3110 | autoOpen: false, |
3111 | 3111 | width: 300, |
3112 | 3112 | height: 100, |
3113 | - title: "<?php echo $LANG['share'];?>", |
|
3113 | + title: "<?php echo $LANG['share']; ?>", |
|
3114 | 3114 | buttons: { |
3115 | - "<?php echo $LANG['ok'];?>": function() { |
|
3115 | + "<?php echo $LANG['ok']; ?>": function() { |
|
3116 | 3116 | |
3117 | 3117 | } |
3118 | 3118 | }, |
@@ -3128,18 +3128,18 @@ discard block |
||
3128 | 3128 | autoOpen: false, |
3129 | 3129 | width: 750, |
3130 | 3130 | height: 450, |
3131 | - title: "<?php echo $LANG['suggest_password_change'];?>", |
|
3131 | + title: "<?php echo $LANG['suggest_password_change']; ?>", |
|
3132 | 3132 | buttons: { |
3133 | - "<?php echo $LANG['ok'];?>": function() { |
|
3133 | + "<?php echo $LANG['ok']; ?>": function() { |
|
3134 | 3134 | $("#div_suggest_change_wait").html('<i class="fa fa-cog fa-spin fa-2x"></i>').show().removeClass("ui-state-error"); |
3135 | 3135 | |
3136 | 3136 | // do checks |
3137 | 3137 | if (!IsValidEmail($("#email_change").val()) && $("#email_change").val() !== "") { |
3138 | - $("#div_suggest_change_wait").html('<i class="fa fa-warning fa-lg"></i> <?php echo addslashes($LANG['email_format_is_not_correct']);?>').show(1).delay(2000).fadeOut(1000).addClass("ui-state-error"); |
|
3138 | + $("#div_suggest_change_wait").html('<i class="fa fa-warning fa-lg"></i> <?php echo addslashes($LANG['email_format_is_not_correct']); ?>').show(1).delay(2000).fadeOut(1000).addClass("ui-state-error"); |
|
3139 | 3139 | return false; |
3140 | 3140 | } |
3141 | 3141 | if (!validateURL($("#url_change").val()) && $("#url_change").val() !== "") { |
3142 | - $("#div_suggest_change_wait").html('<i class="fa fa-warning fa-lg"></i> <?php echo addslashes($LANG['url_format_is_not_correct']);?>').show(1).delay(2000).fadeOut(1000).addClass("ui-state-error"); |
|
3142 | + $("#div_suggest_change_wait").html('<i class="fa fa-warning fa-lg"></i> <?php echo addslashes($LANG['url_format_is_not_correct']); ?>').show(1).delay(2000).fadeOut(1000).addClass("ui-state-error"); |
|
3143 | 3143 | return false; |
3144 | 3144 | } |
3145 | 3145 | |
@@ -3150,13 +3150,13 @@ discard block |
||
3150 | 3150 | "sources/items.queries.php", |
3151 | 3151 | { |
3152 | 3152 | type : "suggest_item_change", |
3153 | - data : prepareExchangedData(data, "encode", "<?php echo $_SESSION['key'];?>"), |
|
3153 | + data : prepareExchangedData(data, "encode", "<?php echo $_SESSION['key']; ?>"), |
|
3154 | 3154 | id : $("#id_item").val(), |
3155 | - key : "<?php echo $_SESSION['key'];?>" |
|
3155 | + key : "<?php echo $_SESSION['key']; ?>" |
|
3156 | 3156 | }, |
3157 | 3157 | function(data) { |
3158 | 3158 | if (data[0].error === "") { |
3159 | - $("#div_suggest_change_wait").html("<?php echo $LANG['suggestion_done'];?>").show(1).delay(1500).fadeOut(1000); |
|
3159 | + $("#div_suggest_change_wait").html("<?php echo $LANG['suggestion_done']; ?>").show(1).delay(1500).fadeOut(1000); |
|
3160 | 3160 | setTimeout( |
3161 | 3161 | function() { |
3162 | 3162 | $("#div_suggest_change").dialog("close"); |
@@ -3168,21 +3168,21 @@ discard block |
||
3168 | 3168 | "json" |
3169 | 3169 | ); |
3170 | 3170 | }, |
3171 | - "<?php echo $LANG['close'];?>": function() { |
|
3171 | + "<?php echo $LANG['close']; ?>": function() { |
|
3172 | 3172 | $(this).dialog('close'); |
3173 | 3173 | } |
3174 | 3174 | }, |
3175 | 3175 | open: function(event,ui) { |
3176 | 3176 | $("#div_suggest_change_html") |
3177 | 3177 | .html( |
3178 | - '<label class="form_label_100" style="padding:4px;"><?php echo $LANG['label'];?></label><input type="text" id="label_change" value="'+$("#hid_label").val()+'" class="input_text_80 ui-widget-content ui-corner-all">' + |
|
3179 | - '<label class="form_label_100" style="padding:4px;"><?php echo $LANG['pw'];?></label><input type="text" id="pwd_change" value="" class="input_text_80 ui-widget-content ui-corner-all">' + |
|
3180 | - ' <i class="fa fa-info-circle fa-lg tip" title="<?php echo addslashes($LANG['suggest_change_password_blank']);?>"></i>' + |
|
3181 | - //'<label class="form_label_100" style="padding:4px;"><?php echo $LANG['description'];?></label><textarea id="description_change_change" class="input_text_80 ui-widget-content ui-corner-all">'+$("#hid_desc").val()+'</textarea>' + |
|
3182 | - '<label class="form_label_100" style="padding:4px;"><?php echo $LANG['index_login'];?></label><input type="text" id="login_change" value="'+$("#hid_login").val()+'" class="input_text_80 ui-widget-content ui-corner-all">' + |
|
3183 | - '<label class="form_label_100" style="padding:4px;"><?php echo $LANG['email'];?></label><input type="text" id="email_change" value="'+$("#hid_email").val()+'" class="input_text_80 ui-widget-content ui-corner-all">' + |
|
3184 | - '<label class="form_label_100" style="padding:4px;"><?php echo $LANG['url'];?></label><input type="text" id="url_change" value="'+$("#hid_url").val()+'" class="input_text_80 ui-widget-content ui-corner-all">' + |
|
3185 | - '<label class="form_label_100" style="padding:4px;"><?php echo $LANG['comment'];?></label><input type="text" id="comment_change" value="" class="input_text_80 ui-widget-content ui-corner-all">' |
|
3178 | + '<label class="form_label_100" style="padding:4px;"><?php echo $LANG['label']; ?></label><input type="text" id="label_change" value="'+$("#hid_label").val()+'" class="input_text_80 ui-widget-content ui-corner-all">' + |
|
3179 | + '<label class="form_label_100" style="padding:4px;"><?php echo $LANG['pw']; ?></label><input type="text" id="pwd_change" value="" class="input_text_80 ui-widget-content ui-corner-all">' + |
|
3180 | + ' <i class="fa fa-info-circle fa-lg tip" title="<?php echo addslashes($LANG['suggest_change_password_blank']); ?>"></i>' + |
|
3181 | + //'<label class="form_label_100" style="padding:4px;"><?php echo $LANG['description']; ?></label><textarea id="description_change_change" class="input_text_80 ui-widget-content ui-corner-all">'+$("#hid_desc").val()+'</textarea>' + |
|
3182 | + '<label class="form_label_100" style="padding:4px;"><?php echo $LANG['index_login']; ?></label><input type="text" id="login_change" value="'+$("#hid_login").val()+'" class="input_text_80 ui-widget-content ui-corner-all">' + |
|
3183 | + '<label class="form_label_100" style="padding:4px;"><?php echo $LANG['email']; ?></label><input type="text" id="email_change" value="'+$("#hid_email").val()+'" class="input_text_80 ui-widget-content ui-corner-all">' + |
|
3184 | + '<label class="form_label_100" style="padding:4px;"><?php echo $LANG['url']; ?></label><input type="text" id="url_change" value="'+$("#hid_url").val()+'" class="input_text_80 ui-widget-content ui-corner-all">' + |
|
3185 | + '<label class="form_label_100" style="padding:4px;"><?php echo $LANG['comment']; ?></label><input type="text" id="comment_change" value="" class="input_text_80 ui-widget-content ui-corner-all">' |
|
3186 | 3186 | ) |
3187 | 3187 | .show(); |
3188 | 3188 | $(".tip").tooltipster({multiple: true}); |
@@ -3208,17 +3208,17 @@ discard block |
||
3208 | 3208 | flash_swf_url : "includes/libraries/Plupload/Moxie.swf", |
3209 | 3209 | silverlight_xap_url : "includes/libraries/Plupload/Moxie.xap", |
3210 | 3210 | filters : [ |
3211 | - {title : "Image files", extensions : "<?php echo $_SESSION['settings']['upload_imagesext'];?>"}, |
|
3212 | - {title : "Package files", extensions : "<?php echo $_SESSION['settings']['upload_pkgext'];?>"}, |
|
3213 | - {title : "Documents files", extensions : "<?php echo $_SESSION['settings']['upload_docext'];?>"}, |
|
3214 | - {title : "Other files", extensions : "<?php echo $_SESSION['settings']['upload_otherext'];?>"} |
|
3211 | + {title : "Image files", extensions : "<?php echo $_SESSION['settings']['upload_imagesext']; ?>"}, |
|
3212 | + {title : "Package files", extensions : "<?php echo $_SESSION['settings']['upload_pkgext']; ?>"}, |
|
3213 | + {title : "Documents files", extensions : "<?php echo $_SESSION['settings']['upload_docext']; ?>"}, |
|
3214 | + {title : "Other files", extensions : "<?php echo $_SESSION['settings']['upload_otherext']; ?>"} |
|
3215 | 3215 | ],<?php |
3216 | 3216 | if ($_SESSION['settings']['upload_imageresize_options'] == 1) { |
3217 | 3217 | ?> |
3218 | 3218 | resize : { |
3219 | - width : <?php echo $_SESSION['settings']['upload_imageresize_width'];?>, |
|
3220 | - height : <?php echo $_SESSION['settings']['upload_imageresize_height'];?>, |
|
3221 | - quality : <?php echo $_SESSION['settings']['upload_imageresize_quality'];?> |
|
3219 | + width : <?php echo $_SESSION['settings']['upload_imageresize_width']; ?>, |
|
3220 | + height : <?php echo $_SESSION['settings']['upload_imageresize_height']; ?>, |
|
3221 | + quality : <?php echo $_SESSION['settings']['upload_imageresize_quality']; ?> |
|
3222 | 3222 | }, |
3223 | 3223 | <?php |
3224 | 3224 | } |
@@ -3233,7 +3233,7 @@ discard block |
||
3233 | 3233 | } |
3234 | 3234 | |
3235 | 3235 | up.setOption('multipart_params', { |
3236 | - PHPSESSID : "<?php echo $_SESSION['user_id'];?>", |
|
3236 | + PHPSESSID : "<?php echo $_SESSION['user_id']; ?>", |
|
3237 | 3237 | itemId : $("#random_id").val(), |
3238 | 3238 | type_upload : "item_attachments", |
3239 | 3239 | edit_item : false, |
@@ -3317,17 +3317,17 @@ discard block |
||
3317 | 3317 | flash_swf_url : "includes/libraries/Plupload/Moxie.swf", |
3318 | 3318 | silverlight_xap_url : "includes/libraries/Plupload/Moxie.xap", |
3319 | 3319 | filters : [ |
3320 | - {title : "Image files", extensions : "<?php echo $_SESSION['settings']['upload_imagesext'];?>"}, |
|
3321 | - {title : "Package files", extensions : "<?php echo $_SESSION['settings']['upload_pkgext'];?>"}, |
|
3322 | - {title : "Documents files", extensions : "<?php echo $_SESSION['settings']['upload_docext'];?>"}, |
|
3323 | - {title : "Other files", extensions : "<?php echo $_SESSION['settings']['upload_otherext'];?>"} |
|
3320 | + {title : "Image files", extensions : "<?php echo $_SESSION['settings']['upload_imagesext']; ?>"}, |
|
3321 | + {title : "Package files", extensions : "<?php echo $_SESSION['settings']['upload_pkgext']; ?>"}, |
|
3322 | + {title : "Documents files", extensions : "<?php echo $_SESSION['settings']['upload_docext']; ?>"}, |
|
3323 | + {title : "Other files", extensions : "<?php echo $_SESSION['settings']['upload_otherext']; ?>"} |
|
3324 | 3324 | ],<?php |
3325 | 3325 | if ($_SESSION['settings']['upload_imageresize_options'] == 1) { |
3326 | 3326 | ?> |
3327 | 3327 | resize : { |
3328 | - width : <?php echo $_SESSION['settings']['upload_imageresize_width'];?>, |
|
3329 | - height : <?php echo $_SESSION['settings']['upload_imageresize_height'];?>, |
|
3330 | - quality : <?php echo $_SESSION['settings']['upload_imageresize_quality'];?> |
|
3328 | + width : <?php echo $_SESSION['settings']['upload_imageresize_width']; ?>, |
|
3329 | + height : <?php echo $_SESSION['settings']['upload_imageresize_height']; ?>, |
|
3330 | + quality : <?php echo $_SESSION['settings']['upload_imageresize_quality']; ?> |
|
3331 | 3331 | },<?php |
3332 | 3332 | } |
3333 | 3333 | ?> |
@@ -3336,7 +3336,7 @@ discard block |
||
3336 | 3336 | $("#item_edit_upload_wait").show(); |
3337 | 3337 | |
3338 | 3338 | up.setOption('multipart_params', { |
3339 | - PHPSESSID : "<?php echo $_SESSION['user_id'];?>", |
|
3339 | + PHPSESSID : "<?php echo $_SESSION['user_id']; ?>", |
|
3340 | 3340 | itemId : $('#selected_items').val(), |
3341 | 3341 | type_upload : "item_attachments", |
3342 | 3342 | edit_item : true, |
@@ -3434,35 +3434,35 @@ discard block |
||
3434 | 3434 | $("#pw1").simplePassMeter({ |
3435 | 3435 | "requirements": {}, |
3436 | 3436 | "container": "#pw_strength", |
3437 | - "defaultText" : "<?php echo $LANG['index_pw_level_txt'];?>", |
|
3437 | + "defaultText" : "<?php echo $LANG['index_pw_level_txt']; ?>", |
|
3438 | 3438 | "ratings": [ |
3439 | 3439 | {"minScore": 0, |
3440 | 3440 | "className": "meterFail", |
3441 | - "text": "<?php echo $LANG['complex_level0'];?>" |
|
3441 | + "text": "<?php echo $LANG['complex_level0']; ?>" |
|
3442 | 3442 | }, |
3443 | 3443 | {"minScore": 25, |
3444 | 3444 | "className": "meterWarn", |
3445 | - "text": "<?php echo $LANG['complex_level1'];?>" |
|
3445 | + "text": "<?php echo $LANG['complex_level1']; ?>" |
|
3446 | 3446 | }, |
3447 | 3447 | {"minScore": 50, |
3448 | 3448 | "className": "meterWarn", |
3449 | - "text": "<?php echo $LANG['complex_level2'];?>" |
|
3449 | + "text": "<?php echo $LANG['complex_level2']; ?>" |
|
3450 | 3450 | }, |
3451 | 3451 | {"minScore": 60, |
3452 | 3452 | "className": "meterGood", |
3453 | - "text": "<?php echo $LANG['complex_level3'];?>" |
|
3453 | + "text": "<?php echo $LANG['complex_level3']; ?>" |
|
3454 | 3454 | }, |
3455 | 3455 | {"minScore": 70, |
3456 | 3456 | "className": "meterGood", |
3457 | - "text": "<?php echo $LANG['complex_level4'];?>" |
|
3457 | + "text": "<?php echo $LANG['complex_level4']; ?>" |
|
3458 | 3458 | }, |
3459 | 3459 | {"minScore": 80, |
3460 | 3460 | "className": "meterExcel", |
3461 | - "text": "<?php echo $LANG['complex_level5'];?>" |
|
3461 | + "text": "<?php echo $LANG['complex_level5']; ?>" |
|
3462 | 3462 | }, |
3463 | 3463 | {"minScore": 90, |
3464 | 3464 | "className": "meterExcel", |
3465 | - "text": "<?php echo $LANG['complex_level6'];?>" |
|
3465 | + "text": "<?php echo $LANG['complex_level6']; ?>" |
|
3466 | 3466 | } |
3467 | 3467 | ] |
3468 | 3468 | }); |
@@ -3489,35 +3489,35 @@ discard block |
||
3489 | 3489 | $("#edit_pw1").simplePassMeter({ |
3490 | 3490 | "requirements": {}, |
3491 | 3491 | "container": "#edit_pw_strength", |
3492 | - "defaultText" : "<?php echo $LANG['index_pw_level_txt'];?>", |
|
3492 | + "defaultText" : "<?php echo $LANG['index_pw_level_txt']; ?>", |
|
3493 | 3493 | "ratings": [ |
3494 | 3494 | {"minScore": 0, |
3495 | 3495 | "className": "meterFail", |
3496 | - "text": "<?php echo $LANG['complex_level0'];?>" |
|
3496 | + "text": "<?php echo $LANG['complex_level0']; ?>" |
|
3497 | 3497 | }, |
3498 | 3498 | {"minScore": 25, |
3499 | 3499 | "className": "meterWarn", |
3500 | - "text": "<?php echo $LANG['complex_level1'];?>" |
|
3500 | + "text": "<?php echo $LANG['complex_level1']; ?>" |
|
3501 | 3501 | }, |
3502 | 3502 | {"minScore": 50, |
3503 | 3503 | "className": "meterWarn", |
3504 | - "text": "<?php echo $LANG['complex_level2'];?>" |
|
3504 | + "text": "<?php echo $LANG['complex_level2']; ?>" |
|
3505 | 3505 | }, |
3506 | 3506 | {"minScore": 60, |
3507 | 3507 | "className": "meterGood", |
3508 | - "text": "<?php echo $LANG['complex_level3'];?>" |
|
3508 | + "text": "<?php echo $LANG['complex_level3']; ?>" |
|
3509 | 3509 | }, |
3510 | 3510 | {"minScore": 70, |
3511 | 3511 | "className": "meterGood", |
3512 | - "text": "<?php echo $LANG['complex_level4'];?>" |
|
3512 | + "text": "<?php echo $LANG['complex_level4']; ?>" |
|
3513 | 3513 | }, |
3514 | 3514 | {"minScore": 80, |
3515 | 3515 | "className": "meterExcel", |
3516 | - "text": "<?php echo $LANG['complex_level5'];?>" |
|
3516 | + "text": "<?php echo $LANG['complex_level5']; ?>" |
|
3517 | 3517 | }, |
3518 | 3518 | {"minScore": 90, |
3519 | 3519 | "className": "meterExcel", |
3520 | - "text": "<?php echo $LANG['complex_level6'];?>" |
|
3520 | + "text": "<?php echo $LANG['complex_level6']; ?>" |
|
3521 | 3521 | } |
3522 | 3522 | ] |
3523 | 3523 | }); |
@@ -3536,7 +3536,7 @@ discard block |
||
3536 | 3536 | |
3537 | 3537 | //add date selector |
3538 | 3538 | $(".datepicker").datepicker({ |
3539 | - dateFormat:"<?php echo str_replace(array("Y","M"), array("yy","mm"), $_SESSION['settings']['date_format']);?>", |
|
3539 | + dateFormat:"<?php echo str_replace(array("Y", "M"), array("yy", "mm"), $_SESSION['settings']['date_format']); ?>", |
|
3540 | 3540 | changeMonth: true, |
3541 | 3541 | changeYear: true |
3542 | 3542 | }); |
@@ -3586,12 +3586,12 @@ discard block |
||
3586 | 3586 | autoOpen: false, |
3587 | 3587 | width: 500, |
3588 | 3588 | height: 350, |
3589 | - title: "<?php echo $LANG['offline_menu_title'];?>", |
|
3589 | + title: "<?php echo $LANG['offline_menu_title']; ?>", |
|
3590 | 3590 | buttons: { |
3591 | - "<?php echo $LANG['button_offline_generate'];?>": function() { |
|
3591 | + "<?php echo $LANG['button_offline_generate']; ?>": function() { |
|
3592 | 3592 | generateOfflineFile(); |
3593 | 3593 | }, |
3594 | - "<?php echo $LANG['close'];?>": function() { |
|
3594 | + "<?php echo $LANG['close']; ?>": function() { |
|
3595 | 3595 | $(this).dialog("close"); |
3596 | 3596 | } |
3597 | 3597 | }, |
@@ -3607,12 +3607,12 @@ discard block |
||
3607 | 3607 | autoOpen: false, |
3608 | 3608 | width: 500, |
3609 | 3609 | height: 350, |
3610 | - title: "<?php echo $LANG['print_out_menu_title'];?>", |
|
3610 | + title: "<?php echo $LANG['print_out_menu_title']; ?>", |
|
3611 | 3611 | buttons: { |
3612 | - "<?php echo $LANG['button_export_file'];?>": function() { |
|
3612 | + "<?php echo $LANG['button_export_file']; ?>": function() { |
|
3613 | 3613 | exportItemsToFile(); |
3614 | 3614 | }, |
3615 | - "<?php echo $LANG['close'];?>": function() { |
|
3615 | + "<?php echo $LANG['close']; ?>": function() { |
|
3616 | 3616 | $(this).dialog("close"); |
3617 | 3617 | } |
3618 | 3618 | }, |
@@ -3628,9 +3628,9 @@ discard block |
||
3628 | 3628 | autoOpen: false, |
3629 | 3629 | width: 600, |
3630 | 3630 | height: 500, |
3631 | - title: "<?php echo $LANG['import_csv_menu_title'];?>", |
|
3631 | + title: "<?php echo $LANG['import_csv_menu_title']; ?>", |
|
3632 | 3632 | buttons: { |
3633 | - "<?php echo $LANG['close'];?>": function() { |
|
3633 | + "<?php echo $LANG['close']; ?>": function() { |
|
3634 | 3634 | $(this).dialog("close"); |
3635 | 3635 | } |
3636 | 3636 | }, |
@@ -3647,16 +3647,16 @@ discard block |
||
3647 | 3647 | autoOpen: false, |
3648 | 3648 | width: 500, |
3649 | 3649 | height: 300, |
3650 | - title: "<?php echo $LANG['upgrade_needed'];?>", |
|
3650 | + title: "<?php echo $LANG['upgrade_needed']; ?>", |
|
3651 | 3651 | buttons: { |
3652 | - "<?php echo $LANG['admin_action_db_backup_start_tip'];?>": function() { |
|
3653 | - $("#dialog_upgrade_personal_passwords_status").html('<i class="fa fa-cog fa-spin"></i> <?php echo $LANG['please_wait'];?> ... <span id="reencryption_progress">0%</span>').attr("class","").show(); |
|
3652 | + "<?php echo $LANG['admin_action_db_backup_start_tip']; ?>": function() { |
|
3653 | + $("#dialog_upgrade_personal_passwords_status").html('<i class="fa fa-cog fa-spin"></i> <?php echo $LANG['please_wait']; ?> ... <span id="reencryption_progress">0%</span>').attr("class","").show(); |
|
3654 | 3654 | $.post( |
3655 | 3655 | "sources/utils.queries.php", |
3656 | 3656 | { |
3657 | 3657 | type : "reencrypt_personal_pwd_start", |
3658 | - user_id : "<?php echo $_SESSION['user_id'];?>", |
|
3659 | - key : "<?php echo $_SESSION['key'];?>" |
|
3658 | + user_id : "<?php echo $_SESSION['user_id']; ?>", |
|
3659 | + key : "<?php echo $_SESSION['key']; ?>" |
|
3660 | 3660 | }, |
3661 | 3661 | function(data) { |
3662 | 3662 | if (data[0].error != "") { |
@@ -3668,7 +3668,7 @@ discard block |
||
3668 | 3668 | "json" |
3669 | 3669 | ); |
3670 | 3670 | }, |
3671 | - "<?php echo $LANG['cancel_button'];?>": function() { |
|
3671 | + "<?php echo $LANG['cancel_button']; ?>": function() { |
|
3672 | 3672 | $(this).dialog("close"); |
3673 | 3673 | } |
3674 | 3674 | } |
@@ -3681,14 +3681,14 @@ discard block |
||
3681 | 3681 | autoOpen: false, |
3682 | 3682 | width: 620, |
3683 | 3683 | height: 500, |
3684 | - title: "<?php echo $LANG['update_server_password'];?>", |
|
3684 | + title: "<?php echo $LANG['update_server_password']; ?>", |
|
3685 | 3685 | buttons: { |
3686 | - "<?php echo $LANG['close'];?>": function() { |
|
3686 | + "<?php echo $LANG['close']; ?>": function() { |
|
3687 | 3687 | $(this).dialog("close"); |
3688 | 3688 | } |
3689 | 3689 | }, |
3690 | 3690 | close: function() { |
3691 | - $("#div_ssh").html("<i class=\'fa fa-cog fa-spin fa-2x\'></i> <b><?php echo $LANG['please_wait'];?></b>"); |
|
3691 | + $("#div_ssh").html("<i class=\'fa fa-cog fa-spin fa-2x\'></i> <b><?php echo $LANG['please_wait']; ?></b>"); |
|
3692 | 3692 | } |
3693 | 3693 | }); |
3694 | 3694 | |
@@ -3700,7 +3700,7 @@ discard block |
||
3700 | 3700 | "sources/main.queries.php", |
3701 | 3701 | { |
3702 | 3702 | type : "send_waiting_emails", |
3703 | - key : "<?php echo $_SESSION['key'];?>" |
|
3703 | + key : "<?php echo $_SESSION['key']; ?>" |
|
3704 | 3704 | } |
3705 | 3705 | ); |
3706 | 3706 | |
@@ -3709,7 +3709,7 @@ discard block |
||
3709 | 3709 | "sources/main.queries.php", |
3710 | 3710 | { |
3711 | 3711 | type : "sending_statistics", |
3712 | - key : "<?php echo $_SESSION['key'];?>" |
|
3712 | + key : "<?php echo $_SESSION['key']; ?>" |
|
3713 | 3713 | } |
3714 | 3714 | ); |
3715 | 3715 | }, |
@@ -3739,7 +3739,7 @@ discard block |
||
3739 | 3739 | $("#pw_shown").val("1"); |
3740 | 3740 | } |
3741 | 3741 | } else { |
3742 | - $('#id_pw').html('<?php echo $var['hidden_asterisk'];?>'); |
|
3742 | + $('#id_pw').html('<?php echo $var['hidden_asterisk']; ?>'); |
|
3743 | 3743 | $('.tip').tooltipster({multiple: true}); |
3744 | 3744 | } |
3745 | 3745 | } |
@@ -3760,7 +3760,7 @@ discard block |
||
3760 | 3760 | id_item : $('#id_item').val(), |
3761 | 3761 | folder_id : $('#hid_cat').val(), |
3762 | 3762 | hid_label : $('#hid_label').val(), |
3763 | - key : "<?php echo $_SESSION['key'];?>" |
|
3763 | + key : "<?php echo $_SESSION['key']; ?>" |
|
3764 | 3764 | } |
3765 | 3765 | ); |
3766 | 3766 | } |
@@ -3837,13 +3837,13 @@ discard block |
||
3837 | 3837 | // prepare clipboard items |
3838 | 3838 | var clipboard = new Clipboard('.mini_login'); |
3839 | 3839 | clipboard.on('success', function(e) { |
3840 | - $("#message_box").html("<?php echo addslashes($LANG['login_copied_clipboard']);?>").show().fadeOut(1000); |
|
3840 | + $("#message_box").html("<?php echo addslashes($LANG['login_copied_clipboard']); ?>").show().fadeOut(1000); |
|
3841 | 3841 | e.clearSelection(); |
3842 | 3842 | }); |
3843 | 3843 | |
3844 | 3844 | var clipboard = new Clipboard('.mini_pw'); |
3845 | 3845 | clipboard.on('success', function(e) { |
3846 | - $("#message_box").html("<?php echo addslashes($LANG['pw_copied_clipboard']);?>").show().fadeOut(1000); |
|
3846 | + $("#message_box").html("<?php echo addslashes($LANG['pw_copied_clipboard']); ?>").show().fadeOut(1000); |
|
3847 | 3847 | itemLog("item_password_copied"); |
3848 | 3848 | e.clearSelection(); |
3849 | 3849 | }); |
@@ -3851,7 +3851,7 @@ discard block |
||
3851 | 3851 | $(".tip").tooltipster({multiple: true}); |
3852 | 3852 | $(".mini_login, .mini_pw").css("cursor", "pointer"); |
3853 | 3853 | |
3854 | - var restricted_to_roles = <?php if (isset($_SESSION['settings']['restricted_to_roles']) && $_SESSION['settings']['restricted_to_roles'] == 1) echo 1; else echo 0;?>; |
|
3854 | + var restricted_to_roles = <?php if (isset($_SESSION['settings']['restricted_to_roles']) && $_SESSION['settings']['restricted_to_roles'] == 1) echo 1; else echo 0; ?>; |
|
3855 | 3855 | |
3856 | 3856 | // refine users list to the related roles |
3857 | 3857 | $.post( |
@@ -3859,10 +3859,10 @@ discard block |
||
3859 | 3859 | { |
3860 | 3860 | type : "get_refined_list_of_users", |
3861 | 3861 | iFolderId : $('#hid_cat').val(), |
3862 | - key : "<?php echo $_SESSION['key'];?>" |
|
3862 | + key : "<?php echo $_SESSION['key']; ?>" |
|
3863 | 3863 | }, |
3864 | 3864 | function(data) { |
3865 | - data = prepareExchangedData(data , "decode", "<?php echo $_SESSION['key'];?>"); |
|
3865 | + data = prepareExchangedData(data , "decode", "<?php echo $_SESSION['key']; ?>"); |
|
3866 | 3866 | // *** restricted_to_list *** |
3867 | 3867 | $("#restricted_to_list").empty(); |
3868 | 3868 | // add list of users |
@@ -3871,7 +3871,7 @@ discard block |
||
3871 | 3871 | if (restricted_to_roles == 1) { |
3872 | 3872 | //add optgroup |
3873 | 3873 | var optgroup = $('<optgroup>'); |
3874 | - optgroup.attr('label', "<?php echo $LANG['users'];?>"); |
|
3874 | + optgroup.attr('label', "<?php echo $LANG['users']; ?>"); |
|
3875 | 3875 | $(".folder_rights_user").wrapAll(optgroup); |
3876 | 3876 | } |
3877 | 3877 | } |
@@ -3879,13 +3879,13 @@ discard block |
||
3879 | 3879 | if (restricted_to_roles == 1 && $('#restricted_to').val() != undefined) { |
3880 | 3880 | //add optgroup |
3881 | 3881 | var optgroup = $('<optgroup>'); |
3882 | - optgroup.attr('label', "<?php echo $LANG['roles'];?>"); |
|
3882 | + optgroup.attr('label', "<?php echo $LANG['roles']; ?>"); |
|
3883 | 3883 | $("#restricted_to_list").append(data.selOptionsRoles); |
3884 | 3884 | $(".folder_rights_role").wrapAll(optgroup); |
3885 | 3885 | } |
3886 | 3886 | //Prepare multiselect widget |
3887 | 3887 | $("#restricted_to_list").select2({ |
3888 | - language: "<?php echo $_SESSION['user_language_code'];?>" |
|
3888 | + language: "<?php echo $_SESSION['user_language_code']; ?>" |
|
3889 | 3889 | }); |
3890 | 3890 | |
3891 | 3891 | // *** edit_restricted_to_list *** |
@@ -3895,7 +3895,7 @@ discard block |
||
3895 | 3895 | if (restricted_to_roles == 1) { |
3896 | 3896 | //add optgroup |
3897 | 3897 | var optgroup = $('<optgroup>'); |
3898 | - optgroup.attr('label', "<?php echo $LANG['users'];?>"); |
|
3898 | + optgroup.attr('label', "<?php echo $LANG['users']; ?>"); |
|
3899 | 3899 | $(".folder_rights_user_edit").wrapAll(optgroup); |
3900 | 3900 | } |
3901 | 3901 | } |
@@ -3903,13 +3903,13 @@ discard block |
||
3903 | 3903 | if (restricted_to_roles == 1 && $('#edit_restricted_to').val() != undefined) { |
3904 | 3904 | //add optgroup |
3905 | 3905 | var optgroup = $('<optgroup>'); |
3906 | - optgroup.attr('label', "<?php echo $LANG['roles'];?>"); |
|
3906 | + optgroup.attr('label', "<?php echo $LANG['roles']; ?>"); |
|
3907 | 3907 | $("#edit_restricted_to_list").append(data.selEOptionsRoles); |
3908 | 3908 | $(".folder_rights_role_edit").wrapAll(optgroup); |
3909 | 3909 | } |
3910 | 3910 | //Prepare multiselect widget |
3911 | 3911 | $("#edit_restricted_to_list").select2({ |
3912 | - language: "<?php echo $_SESSION['user_language_code'];?>" |
|
3912 | + language: "<?php echo $_SESSION['user_language_code']; ?>" |
|
3913 | 3913 | }); |
3914 | 3914 | } |
3915 | 3915 | ); |
@@ -3941,12 +3941,12 @@ discard block |
||
3941 | 3941 | { |
3942 | 3942 | type : "history_entry_add", |
3943 | 3943 | folder_id : $('#hid_cat').val(), |
3944 | - data : prepareExchangedData(data, "encode", "<?php echo $_SESSION['key'];?>"), |
|
3945 | - key : "<?php echo $_SESSION['key'];?>" |
|
3944 | + data : prepareExchangedData(data, "encode", "<?php echo $_SESSION['key']; ?>"), |
|
3945 | + key : "<?php echo $_SESSION['key']; ?>" |
|
3946 | 3946 | }, |
3947 | 3947 | function(data) { |
3948 | 3948 | //check if format error |
3949 | - data = prepareExchangedData(data , "decode", "<?php echo $_SESSION['key'];?>"); |
|
3949 | + data = prepareExchangedData(data , "decode", "<?php echo $_SESSION['key']; ?>"); |
|
3950 | 3950 | if (data.error == "") { |
3951 | 3951 | $("#item_history_log_error").html("").hide(); |
3952 | 3952 | $("#add_history_entry_label").val(""); |
@@ -3962,13 +3962,13 @@ discard block |
||
3962 | 3962 | |
3963 | 3963 | function aes_encrypt(text) |
3964 | 3964 | { |
3965 | - return Aes.Ctr.encrypt(text, "<?php echo $_SESSION['key'];?>", 256); |
|
3965 | + return Aes.Ctr.encrypt(text, "<?php echo $_SESSION['key']; ?>", 256); |
|
3966 | 3966 | } |
3967 | 3967 | |
3968 | 3968 | |
3969 | 3969 | function aes_decrypt(text) |
3970 | 3970 | { |
3971 | - return Aes.Ctr.decrypt(text, "<?php echo $_SESSION['key'];?>", 256); |
|
3971 | + return Aes.Ctr.decrypt(text, "<?php echo $_SESSION['key']; ?>", 256); |
|
3972 | 3972 | } |
3973 | 3973 | |
3974 | 3974 | /* |
@@ -3985,7 +3985,7 @@ discard block |
||
3985 | 3985 | { |
3986 | 3986 | type : "generate_OTV_url", |
3987 | 3987 | id : $("#id_item").val(), |
3988 | - key : "<?php echo $_SESSION['key'];?>" |
|
3988 | + key : "<?php echo $_SESSION['key']; ?>" |
|
3989 | 3989 | }, |
3990 | 3990 | function(data) { |
3991 | 3991 | //check if format error |
@@ -4003,7 +4003,7 @@ discard block |
||
4003 | 4003 | } |
4004 | 4004 | }); |
4005 | 4005 | clipboard.on('success', function(e) { |
4006 | - $("#show_otv_copied").html("<?php echo addslashes($LANG['link_is_copied']);?>").show().fadeOut(2000); |
|
4006 | + $("#show_otv_copied").html("<?php echo addslashes($LANG['link_is_copied']); ?>").show().fadeOut(2000); |
|
4007 | 4007 | |
4008 | 4008 | e.clearSelection(); |
4009 | 4009 | }); |
@@ -4026,7 +4026,7 @@ discard block |
||
4026 | 4026 | |
4027 | 4027 | // wait |
4028 | 4028 | $("#items_list_loader").show(); |
4029 | - $("#items_path_var").html('<i class="fa fa-filter"></i> <?php echo $LANG['searching'];?>'); |
|
4029 | + $("#items_path_var").html('<i class="fa fa-filter"></i> <?php echo $LANG['searching']; ?>'); |
|
4030 | 4030 | |
4031 | 4031 | // clean |
4032 | 4032 | $("#id_label, #id_desc, #id_pw, #id_login, #id_email, #id_url, #id_files, #id_restricted_to ,#id_tags, #id_kbs, .fields_div, #item_extra_info").html(""); |
@@ -4040,12 +4040,12 @@ discard block |
||
4040 | 4040 | { |
4041 | 4041 | type : "search_for_items", |
4042 | 4042 | sSearch : $("#search_item").val(), |
4043 | - key : "<?php echo $_SESSION['key'];?>" |
|
4043 | + key : "<?php echo $_SESSION['key']; ?>" |
|
4044 | 4044 | }, |
4045 | 4045 | function(data) { |
4046 | - data = prepareExchangedData(data , "decode", "<?php echo $_SESSION['key'];?>"); |
|
4046 | + data = prepareExchangedData(data , "decode", "<?php echo $_SESSION['key']; ?>"); |
|
4047 | 4047 | displayMessage(data.message); |
4048 | - $("#items_path_var").html('<i class="fa fa-filter"></i> <?php echo $LANG['search_results'];?>'); |
|
4048 | + $("#items_path_var").html('<i class="fa fa-filter"></i> <?php echo $LANG['search_results']; ?>'); |
|
4049 | 4049 | $("#items_list").html("<ul class='liste_items 'id='full_items_list'></ul>"); |
4050 | 4050 | $("#full_items_list").html(data.items_html); |
4051 | 4051 | $("#items_list_loader").hide(); |
@@ -4064,7 +4064,7 @@ discard block |
||
4064 | 4064 | |
4065 | 4065 | // wait |
4066 | 4066 | $("#items_list_loader").show(); |
4067 | - $("#items_path_var").html('<i class="fa fa-filter"></i> <?php echo $LANG['searching_tag'];?> <b>' + tag + '</b> ...'); |
|
4067 | + $("#items_path_var").html('<i class="fa fa-filter"></i> <?php echo $LANG['searching_tag']; ?> <b>' + tag + '</b> ...'); |
|
4068 | 4068 | |
4069 | 4069 | // clean |
4070 | 4070 | $("#id_label, #id_desc, #id_pw, #id_login, #id_email, #id_url, #id_files, #id_restricted_to ,#id_tags, #id_kbs").html(""); |
@@ -4078,12 +4078,12 @@ discard block |
||
4078 | 4078 | { |
4079 | 4079 | type : "search_for_items_with_tags", |
4080 | 4080 | tagSearch : tag, |
4081 | - key : "<?php echo $_SESSION['key'];?>" |
|
4081 | + key : "<?php echo $_SESSION['key']; ?>" |
|
4082 | 4082 | }, |
4083 | 4083 | function(data) { |
4084 | - data = prepareExchangedData(data , "decode", "<?php echo $_SESSION['key'];?>"); |
|
4084 | + data = prepareExchangedData(data , "decode", "<?php echo $_SESSION['key']; ?>"); |
|
4085 | 4085 | displayMessage(data.message); |
4086 | - $("#items_path_var").html('<i class="fa fa-filter"></i> <?php echo $LANG['search_results'];?> <b>' + tag + '</b>'); |
|
4086 | + $("#items_path_var").html('<i class="fa fa-filter"></i> <?php echo $LANG['search_results']; ?> <b>' + tag + '</b>'); |
|
4087 | 4087 | $("#full_items_list").html(data.items_html); |
4088 | 4088 | $("#items_list_loader").hide(); |
4089 | 4089 | } |
@@ -4095,7 +4095,7 @@ discard block |
||
4095 | 4095 | $("#dialog_offline_mode").dialog({ |
4096 | 4096 | open: function(event, ui) { |
4097 | 4097 | $("#div_offline_mode").load( |
4098 | - "<?php echo $_SESSION['settings']['cpassman_url'];?>/items.offline.php?key=<?php echo $_SESSION['key'];?>", function(){} |
|
4098 | + "<?php echo $_SESSION['settings']['cpassman_url']; ?>/items.offline.php?key=<?php echo $_SESSION['key']; ?>", function(){} |
|
4099 | 4099 | ); |
4100 | 4100 | } |
4101 | 4101 | }).dialog("open"); |
@@ -4106,7 +4106,7 @@ discard block |
||
4106 | 4106 | $("#dialog_export_file").dialog({ |
4107 | 4107 | open: function(event, ui) { |
4108 | 4108 | $("#div_export_file").load( |
4109 | - "<?php echo $_SESSION['settings']['cpassman_url'];?>/items.export.php?key=<?php echo $_SESSION['key'];?>", function(){} |
|
4109 | + "<?php echo $_SESSION['settings']['cpassman_url']; ?>/items.export.php?key=<?php echo $_SESSION['key']; ?>", function(){} |
|
4110 | 4110 | ); |
4111 | 4111 | } |
4112 | 4112 | }).dialog("open"); |
@@ -4117,7 +4117,7 @@ discard block |
||
4117 | 4117 | $("#dialog_import_file").dialog({ |
4118 | 4118 | open: function(event, ui) { |
4119 | 4119 | $("#div_import_file").load( |
4120 | - "<?php echo $_SESSION['settings']['cpassman_url'];?>/items.import.php?key=<?php echo $_SESSION['key'];?>&folder_id="+$("#hid_cat").val(), function(){} |
|
4120 | + "<?php echo $_SESSION['settings']['cpassman_url']; ?>/items.import.php?key=<?php echo $_SESSION['key']; ?>&folder_id="+$("#hid_cat").val(), function(){} |
|
4121 | 4121 | ); |
4122 | 4122 | } |
4123 | 4123 | }).dialog("open"); |
@@ -4126,7 +4126,7 @@ discard block |
||
4126 | 4126 | function reEncryptPersonalPwds(remainingIds, currentId, nb) |
4127 | 4127 | { |
4128 | 4128 | //console.log(remainingIds+";"+currentId+";"+nb); |
4129 | - $("#dialog_upgrade_personal_passwords_status").html('<i class="fa fa-cog fa-spin"></i> <?php echo $LANG['please_wait'];?> ... <span id="reencryption_progress">0%</span>').attr("class","").show(); |
|
4129 | + $("#dialog_upgrade_personal_passwords_status").html('<i class="fa fa-cog fa-spin"></i> <?php echo $LANG['please_wait']; ?> ... <span id="reencryption_progress">0%</span>').attr("class","").show(); |
|
4130 | 4130 | |
4131 | 4131 | $.ajax({ |
4132 | 4132 | url: "sources/utils.queries.php", |
@@ -4135,8 +4135,8 @@ discard block |
||
4135 | 4135 | data : { |
4136 | 4136 | type : "reencrypt_personal_pwd", |
4137 | 4137 | currentId : currentId, |
4138 | - user_id : "<?php echo $_SESSION['user_id'];?>", |
|
4139 | - key : "<?php echo $_SESSION['key'];?>" |
|
4138 | + user_id : "<?php echo $_SESSION['user_id']; ?>", |
|
4139 | + key : "<?php echo $_SESSION['key']; ?>" |
|
4140 | 4140 | }, |
4141 | 4141 | complete : function(data, statut){ |
4142 | 4142 | var aIds = remainingIds.split(","); |
@@ -4152,7 +4152,7 @@ discard block |
||
4152 | 4152 | if (nb2 != "0" || (nb2 == "" && currentID != "")) { |
4153 | 4153 | reEncryptPersonalPwds(aIds, currentID, nb); |
4154 | 4154 | } else { |
4155 | - $("#dialog_upgrade_personal_passwords").html('<i class="fa fa-info"></i> <?php echo $LANG['operation_encryption_done'];?>'); |
|
4155 | + $("#dialog_upgrade_personal_passwords").html('<i class="fa fa-info"></i> <?php echo $LANG['operation_encryption_done']; ?>'); |
|
4156 | 4156 | |
4157 | 4157 | // ensure that no upgrade popup is shown |
4158 | 4158 | $("#personal_upgrade_needed").val(""); |
@@ -4167,7 +4167,7 @@ discard block |
||
4167 | 4167 | $("#dialog_ssh").dialog({ |
4168 | 4168 | open: function(event, ui) { |
4169 | 4169 | $("#div_ssh").load( |
4170 | - "<?php echo $_SESSION['settings']['cpassman_url'].'/ssh.php?key='.$_SESSION['key'];?>&id="+$("#selected_items").val(), function(){} |
|
4170 | + "<?php echo $_SESSION['settings']['cpassman_url'].'/ssh.php?key='.$_SESSION['key']; ?>&id="+$("#selected_items").val(), function(){} |
|
4171 | 4171 | ); |
4172 | 4172 | } |
4173 | 4173 | }).dialog("open"); |
@@ -1748,7 +1748,12 @@ discard block |
||
1748 | 1748 | } |
1749 | 1749 | |
1750 | 1750 | if ( |
1751 | - $("#hid_cat").val() == "<?php if (isset($_SESSION['personal_folders'][0])) echo $_SESSION['personal_folders'][0]; else echo "";?>") { |
|
1751 | + $("#hid_cat").val() == "<?php if (isset($_SESSION['personal_folders'][0])) { |
|
1752 | + echo $_SESSION['personal_folders'][0]; |
|
1753 | +} else { |
|
1754 | + echo ""; |
|
1755 | +} |
|
1756 | +?>") { |
|
1752 | 1757 | displayMessage("<i class='fa fa-warning'></i> <?php echo $LANG['error_not_allowed_to'];?>"); |
1753 | 1758 | return false; |
1754 | 1759 | } |
@@ -3851,7 +3856,12 @@ discard block |
||
3851 | 3856 | $(".tip").tooltipster({multiple: true}); |
3852 | 3857 | $(".mini_login, .mini_pw").css("cursor", "pointer"); |
3853 | 3858 | |
3854 | - var restricted_to_roles = <?php if (isset($_SESSION['settings']['restricted_to_roles']) && $_SESSION['settings']['restricted_to_roles'] == 1) echo 1; else echo 0;?>; |
|
3859 | + var restricted_to_roles = <?php if (isset($_SESSION['settings']['restricted_to_roles']) && $_SESSION['settings']['restricted_to_roles'] == 1) { |
|
3860 | + echo 1; |
|
3861 | +} else { |
|
3862 | + echo 0; |
|
3863 | +} |
|
3864 | +?>; |
|
3855 | 3865 | |
3856 | 3866 | // refine users list to the related roles |
3857 | 3867 | $.post( |
@@ -43,7 +43,7 @@ |
||
43 | 43 | |
44 | 44 | // Is personal SK available |
45 | 45 | echo ' |
46 | -<input type="hidden" name="personal_sk_set" id="personal_sk_set" value="', isset($_SESSION['my_sk']) && !empty($_SESSION['my_sk']) ? '1':'0', '" />'; |
|
46 | +<input type="hidden" name="personal_sk_set" id="personal_sk_set" value="', isset($_SESSION['my_sk']) && !empty($_SESSION['my_sk']) ? '1' : '0', '" />'; |
|
47 | 47 | |
48 | 48 | // Show the Items in a table view |
49 | 49 | echo '<input type="hidden" id="id_selected_item" /> |
@@ -84,7 +84,7 @@ discard block |
||
84 | 84 | $parse = parse_url($record['url']); |
85 | 85 | $ssh = new Net_SSH2($parse['host'], $parse['port']); |
86 | 86 | if (!$ssh->login($record['login'], $oldPwClear['string'])) { |
87 | - $log .= " ERR - Login failed.\n Error description:".$_SESSION['sshError']."\n\n"; |
|
87 | + $log .= " ERR - Login failed.\n Error description:".$_SESSION['sshError']."\n\n"; |
|
88 | 88 | }else{ |
89 | 89 | // send ssh script for user change |
90 | 90 | $ret_server = $ssh->exec('echo -e "'.$new_pwd.'\n'.$new_pwd.'" | passwd '.$record['login']); |
@@ -104,7 +104,7 @@ discard block |
||
104 | 104 | 'pw' => $encrypt['string'], |
105 | 105 | 'pw_iv' => $encrypt['iv'], |
106 | 106 | 'auto_update_pwd_next_date' => time() + (2592000 * intval($record['auto_update_pwd_frequency'])) |
107 | - ), |
|
107 | + ), |
|
108 | 108 | "id = %i", |
109 | 109 | $record['id'] |
110 | 110 | ); |
@@ -29,7 +29,7 @@ discard block |
||
29 | 29 | DB::$dbName = $database; |
30 | 30 | DB::$port = $port; |
31 | 31 | DB::$error_handler = 'db_error_handler'; |
32 | -$link= mysqli_connect($server, $user, $pass, $database, $port); |
|
32 | +$link = mysqli_connect($server, $user, $pass, $database, $port); |
|
33 | 33 | |
34 | 34 | // ssh libraries |
35 | 35 | stream_resolve_include_path('../includes/libraries/Authentication/phpseclib/Crypt/RC4.php'); |
@@ -85,7 +85,7 @@ discard block |
||
85 | 85 | $ssh = new Net_SSH2($parse['host'], $parse['port']); |
86 | 86 | if (!$ssh->login($record['login'], $oldPwClear['string'])) { |
87 | 87 | $log .= " ERR - Login failed.\n Error description:".$_SESSION['sshError']."\n\n"; |
88 | - }else{ |
|
88 | + } else { |
|
89 | 89 | // send ssh script for user change |
90 | 90 | $ret_server = $ssh->exec('echo -e "'.$new_pwd.'\n'.$new_pwd.'" | passwd '.$record['login']); |
91 | 91 | if (strpos($ret_server, "updated successfully") !== false) { |
@@ -85,7 +85,7 @@ |
||
85 | 85 | $ssh = new Net_SSH2($parse['host'], $parse['port']); |
86 | 86 | if (!$ssh->login($record['login'], $oldPwClear['string'])) { |
87 | 87 | $log .= " ERR - Login failed.\n Error description:".$_SESSION['sshError']."\n\n"; |
88 | - }else{ |
|
88 | + } else{ |
|
89 | 89 | // send ssh script for user change |
90 | 90 | $ret_server = $ssh->exec('echo -e "'.$new_pwd.'\n'.$new_pwd.'" | passwd '.$record['login']); |
91 | 91 | if (strpos($ret_server, "updated successfully") !== false) { |
@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | DB::$dbName = $database; |
26 | 26 | DB::$port = $port; |
27 | 27 | DB::$error_handler = 'db_error_handler'; |
28 | -$link= mysqli_connect($server, $user, $pass, $database, $port); |
|
28 | +$link = mysqli_connect($server, $user, $pass, $database, $port); |
|
29 | 29 | |
30 | 30 | //Load AES |
31 | 31 | $aes = new SplClassLoader('Encryption\Crypt', '../includes/libraries'); |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | if (!empty($settings['bck_script_filename']) && !empty($settings['bck_script_path'])) { |
40 | 40 | //get all of the tables |
41 | 41 | $tables = array(); |
42 | - $result = mysqli_query($link,'SHOW TABLES'); |
|
42 | + $result = mysqli_query($link, 'SHOW TABLES'); |
|
43 | 43 | while ($row = mysqli_fetch_row($result)) { |
44 | 44 | $tables[] = $row[0]; |
45 | 45 | } |
@@ -47,32 +47,32 @@ discard block |
||
47 | 47 | |
48 | 48 | //cycle through each table and format the data |
49 | 49 | foreach ($tables as $table) { |
50 | - $result = mysqli_query($link,'SELECT * FROM '.$table); |
|
50 | + $result = mysqli_query($link, 'SELECT * FROM '.$table); |
|
51 | 51 | $num_fields = mysqli_num_fields($result); |
52 | 52 | |
53 | - $return.= 'DROP TABLE '.$table.';'; |
|
54 | - $row2 = mysqli_fetch_row(mysqli_query($link,'SHOW CREATE TABLE '.$table)); |
|
55 | - $return.= "\n\n".$row2[1].";\n\n"; |
|
53 | + $return .= 'DROP TABLE '.$table.';'; |
|
54 | + $row2 = mysqli_fetch_row(mysqli_query($link, 'SHOW CREATE TABLE '.$table)); |
|
55 | + $return .= "\n\n".$row2[1].";\n\n"; |
|
56 | 56 | |
57 | 57 | for ($i = 0; $i < $num_fields; $i++) { |
58 | 58 | while ($row = mysqli_fetch_row($result)) { |
59 | - $return.= 'INSERT INTO '.$table.' VALUES('; |
|
60 | - for ($j=0; $j<$num_fields; $j++) { |
|
59 | + $return .= 'INSERT INTO '.$table.' VALUES('; |
|
60 | + for ($j = 0; $j < $num_fields; $j++) { |
|
61 | 61 | $row[$j] = addslashes($row[$j]); |
62 | 62 | $row[$j] = preg_replace('/\n/', '/\\n/', $row[$j]); |
63 | 63 | if (isset($row[$j])) { |
64 | - $return.= '"'.$row[$j].'"' ; |
|
64 | + $return .= '"'.$row[$j].'"'; |
|
65 | 65 | } else { |
66 | - $return.= '""'; |
|
66 | + $return .= '""'; |
|
67 | 67 | } |
68 | - if ($j<($num_fields-1)) { |
|
69 | - $return.= ','; |
|
68 | + if ($j < ($num_fields - 1)) { |
|
69 | + $return .= ','; |
|
70 | 70 | } |
71 | 71 | } |
72 | - $return.= ");\n"; |
|
72 | + $return .= ");\n"; |
|
73 | 73 | } |
74 | 74 | } |
75 | - $return.="\n\n\n"; |
|
75 | + $return .= "\n\n\n"; |
|
76 | 76 | } |
77 | 77 | |
78 | 78 | // Encrypt file is required |
@@ -93,7 +93,7 @@ discard block |
||
93 | 93 | prefix_table("users"), |
94 | 94 | array( |
95 | 95 | 'fonction_id' => $_SESSION['fonction_id'] |
96 | - ), |
|
96 | + ), |
|
97 | 97 | "id = %i", |
98 | 98 | $_SESSION['user_id'] |
99 | 99 | ); |
@@ -132,7 +132,7 @@ discard block |
||
132 | 132 | prefix_table("users"), |
133 | 133 | array( |
134 | 134 | 'fonction_id' => rtrim(implode(";", $tab), ";") |
135 | - ), |
|
135 | + ), |
|
136 | 136 | "id = %i", |
137 | 137 | $record['id'] |
138 | 138 | ); |
@@ -154,7 +154,7 @@ discard block |
||
154 | 154 | array( |
155 | 155 | 'title' => noHTML($_POST['title']), |
156 | 156 | 'complexity' => $_POST['complexity'] |
157 | - ), |
|
157 | + ), |
|
158 | 158 | 'id = %i', |
159 | 159 | $_POST['id'] |
160 | 160 | ); |
@@ -172,7 +172,7 @@ discard block |
||
172 | 172 | prefix_table("roles_title"), |
173 | 173 | array( |
174 | 174 | 'allow_pw_change' => $_POST['value'] |
175 | - ), |
|
175 | + ), |
|
176 | 176 | 'id = %i', |
177 | 177 | $_POST['id'] |
178 | 178 | ); |
@@ -199,7 +199,7 @@ discard block |
||
199 | 199 | array( |
200 | 200 | 'folder_id' => $node->id, |
201 | 201 | 'role_id' => $_POST['role'] |
202 | - ) |
|
202 | + ) |
|
203 | 203 | ); |
204 | 204 | } |
205 | 205 | } |
@@ -244,7 +244,7 @@ discard block |
||
244 | 244 | 'folder_id' => $node->id, |
245 | 245 | 'role_id' => $role_id, |
246 | 246 | 'type' => $access |
247 | - ) |
|
247 | + ) |
|
248 | 248 | ); |
249 | 249 | } |
250 | 250 | } else { |
@@ -76,7 +76,7 @@ discard block |
||
76 | 76 | |
77 | 77 | if ($role_id != 0) { |
78 | 78 | //Actualize the variable |
79 | - $_SESSION['nb_roles'] ++; |
|
79 | + $_SESSION['nb_roles']++; |
|
80 | 80 | |
81 | 81 | // get some data |
82 | 82 | $data_tmp = DB::queryfirstrow("SELECT fonction_id FROM ".prefix_table("users")." WHERE id = %s", $_SESSION['user_id']); |
@@ -115,7 +115,7 @@ discard block |
||
115 | 115 | DB::delete(prefix_table("roles_title"), "id = %i", $_POST['id']); |
116 | 116 | DB::delete(prefix_table("roles_values"), "role_id = %i", $_POST['id']); |
117 | 117 | //Actualize the variable |
118 | - $_SESSION['nb_roles'] --; |
|
118 | + $_SESSION['nb_roles']--; |
|
119 | 119 | |
120 | 120 | // parse all users to remove this role |
121 | 121 | $rows = DB::query( |
@@ -263,13 +263,13 @@ discard block |
||
263 | 263 | case "refresh_roles_matrix": |
264 | 264 | //pw complexity levels |
265 | 265 | $_SESSION['settings']['pwComplexity'] = array( |
266 | - 0=>array(0,$LANG['complex_level0']), |
|
267 | - 25=>array(25,$LANG['complex_level1']), |
|
268 | - 50=>array(50,$LANG['complex_level2']), |
|
269 | - 60=>array(60,$LANG['complex_level3']), |
|
270 | - 70=>array(70,$LANG['complex_level4']), |
|
271 | - 80=>array(80,$LANG['complex_level5']), |
|
272 | - 90=>array(90,$LANG['complex_level6']) |
|
266 | + 0=>array(0, $LANG['complex_level0']), |
|
267 | + 25=>array(25, $LANG['complex_level1']), |
|
268 | + 50=>array(50, $LANG['complex_level2']), |
|
269 | + 60=>array(60, $LANG['complex_level3']), |
|
270 | + 70=>array(70, $LANG['complex_level4']), |
|
271 | + 80=>array(80, $LANG['complex_level5']), |
|
272 | + 90=>array(90, $LANG['complex_level6']) |
|
273 | 273 | ); |
274 | 274 | |
275 | 275 | $tree = $tree->getDescendants(); |
@@ -288,17 +288,17 @@ discard block |
||
288 | 288 | if (count($arrUserRoles) == 0 || $_SESSION['is_admin'] == 1) $where = ""; |
289 | 289 | else $where = " WHERE id IN (".implode(',', $arrUserRoles).")"; |
290 | 290 | DB::query("SELECT * FROM ".prefix_table("roles_title").$where); |
291 | - $roles_count = DB::count(); |
|
291 | + $roles_count = DB::count(); |
|
292 | 292 | if ($roles_count > $display_nb) { |
293 | 293 | if (!isset($_POST['start']) || $_POST['start'] == 0) { |
294 | 294 | $start = 0; |
295 | 295 | $previous = 0; |
296 | 296 | } else { |
297 | 297 | $start = intval($_POST['start']); |
298 | - $previous = $start-$display_nb; |
|
298 | + $previous = $start - $display_nb; |
|
299 | 299 | } |
300 | - $sql_limit = " LIMIT ".mysqli_real_escape_string($link, filter_var($start, FILTER_SANITIZE_NUMBER_INT)) .", ". mysqli_real_escape_string($link, filter_var($display_nb, FILTER_SANITIZE_NUMBER_INT)); |
|
301 | - $next = $start+$display_nb; |
|
300 | + $sql_limit = " LIMIT ".mysqli_real_escape_string($link, filter_var($start, FILTER_SANITIZE_NUMBER_INT)).", ".mysqli_real_escape_string($link, filter_var($display_nb, FILTER_SANITIZE_NUMBER_INT)); |
|
301 | + $next = $start + $display_nb; |
|
302 | 302 | } |
303 | 303 | |
304 | 304 | // array of roles for actual user |
@@ -310,7 +310,7 @@ discard block |
||
310 | 310 | $where." |
311 | 311 | ORDER BY title ASC".$sql_limit); |
312 | 312 | foreach ($rows as $record) { |
313 | - if ($_SESSION['is_admin'] == 1 || ($_SESSION['user_manager'] == 1 && (in_array($record['id'], $my_functions) || $record['creator_id'] == $_SESSION['user_id']))) { |
|
313 | + if ($_SESSION['is_admin'] == 1 || ($_SESSION['user_manager'] == 1 && (in_array($record['id'], $my_functions) || $record['creator_id'] == $_SESSION['user_id']))) { |
|
314 | 314 | if ($record['allow_pw_change'] == 1) { |
315 | 315 | $allow_pw_change = ' <span class=\'fa mi-red fa-2x fa-magic tip\' id=\'img_apcfr_'.$record['id'].'\' onclick=\'allow_pw_change_for_role('.$record['id'].', 0)\' style=\'cursor:pointer;\' title=\''.$LANG['role_cannot_modify_all_seen_items'].'\'></span>'; |
316 | 316 | } else { |
@@ -332,11 +332,11 @@ discard block |
||
332 | 332 | $texte .= '</tr></thead><tbody>'; |
333 | 333 | |
334 | 334 | //Display each folder with associated rights by role |
335 | - $i=0; |
|
335 | + $i = 0; |
|
336 | 336 | foreach ($tree as $node) { |
337 | 337 | if (in_array($node->id, $_SESSION['groupes_visibles']) && !in_array($node->id, $_SESSION['personal_visible_groups'])) { |
338 | - $ident=""; |
|
339 | - for ($a=1; $a<$node->nlevel; $a++) { |
|
338 | + $ident = ""; |
|
339 | + for ($a = 1; $a < $node->nlevel; $a++) { |
|
340 | 340 | $ident .= '<i class=\'fa fa-sm fa-caret-right mi-grey-1\'></i> '; |
341 | 341 | } |
342 | 342 | |
@@ -406,7 +406,7 @@ discard block |
||
406 | 406 | $return_values = array("error" => $LANG['error_string_not_utf8']); |
407 | 407 | }*/ |
408 | 408 | |
409 | - $return_values = json_encode($return_values, JSON_HEX_TAG|JSON_HEX_APOS|JSON_HEX_QUOT|JSON_HEX_AMP); |
|
409 | + $return_values = json_encode($return_values, JSON_HEX_TAG | JSON_HEX_APOS | JSON_HEX_QUOT | JSON_HEX_AMP); |
|
410 | 410 | |
411 | 411 | //return data |
412 | 412 | echo $return_values; |
@@ -219,8 +219,9 @@ discard block |
||
219 | 219 | |
220 | 220 | if ($_POST['access'] === "read" || $_POST['access'] === "write" || $_POST['access'] === "nodelete") { |
221 | 221 | // define code to use |
222 | - if ($_POST['access'] == "read") $access = "R"; |
|
223 | - elseif ($_POST['access'] == "write") { |
|
222 | + if ($_POST['access'] == "read") { |
|
223 | + $access = "R"; |
|
224 | + } elseif ($_POST['access'] == "write") { |
|
224 | 225 | if ($_POST['accessoption'] == "") { |
225 | 226 | $access = "W"; |
226 | 227 | } elseif ($_POST['accessoption'] == "nodelete") { |
@@ -230,7 +231,9 @@ discard block |
||
230 | 231 | } elseif ($_POST['accessoption'] == "nodelete_noedit") { |
231 | 232 | $access = "NDNE"; |
232 | 233 | } |
233 | - } else $access = ""; |
|
234 | + } else { |
|
235 | + $access = ""; |
|
236 | + } |
|
234 | 237 | |
235 | 238 | // loop |
236 | 239 | foreach ($tree_list as $node) { |
@@ -285,8 +288,11 @@ discard block |
||
285 | 288 | |
286 | 289 | //count nb of roles |
287 | 290 | $arrUserRoles = array_filter($_SESSION['user_roles']); |
288 | - if (count($arrUserRoles) == 0 || $_SESSION['is_admin'] == 1) $where = ""; |
|
289 | - else $where = " WHERE id IN (".implode(',', $arrUserRoles).")"; |
|
291 | + if (count($arrUserRoles) == 0 || $_SESSION['is_admin'] == 1) { |
|
292 | + $where = ""; |
|
293 | + } else { |
|
294 | + $where = " WHERE id IN (".implode(',', $arrUserRoles).")"; |
|
295 | + } |
|
290 | 296 | DB::query("SELECT * FROM ".prefix_table("roles_title").$where); |
291 | 297 | $roles_count = DB::count(); |
292 | 298 | if ($roles_count > $display_nb) { |
@@ -208,7 +208,7 @@ |
||
208 | 208 | $folderClass = "folder_not_droppable"; |
209 | 209 | if (isset($_SESSION['settings']['show_only_accessible_folders']) && $_SESSION['settings']['show_only_accessible_folders'] == 1) { |
210 | 210 | // folder is not visible |
211 | - $nodeDirectDescendants = $tree->getDescendants($nodeId, false, true, true); |
|
211 | + $nodeDirectDescendants = $tree->getDescendants($nodeId, false, true, true); |
|
212 | 212 | if (count($nodeDirectDescendants) > 0) { |
213 | 213 | // show it but block it |
214 | 214 | $hide_node = false; |
@@ -164,7 +164,7 @@ discard block |
||
164 | 164 | } |
165 | 165 | |
166 | 166 | // prepare json return for current node |
167 | - if ($node->parent_id==0) $parent = "#"; |
|
167 | + if ($node->parent_id == 0) $parent = "#"; |
|
168 | 168 | else $parent = "li_".$node->parent_id; |
169 | 169 | |
170 | 170 | // special case for READ-ONLY folder |
@@ -188,7 +188,7 @@ discard block |
||
188 | 188 | $text .= ' (<span class=\'items_count\' id=\'itcount_'.$node->id.'\'>'.$itemsNb.'</span>'; |
189 | 189 | // display tree counters |
190 | 190 | if (isset($_SESSION['settings']['tree_counters']) && $_SESSION['settings']['tree_counters'] == 1) { |
191 | - $text .= '|'.$nbChildrenItems.'|'.(count($nodeDescendants)-1); |
|
191 | + $text .= '|'.$nbChildrenItems.'|'.(count($nodeDescendants) - 1); |
|
192 | 192 | } |
193 | 193 | $text .= ')'; |
194 | 194 | } elseif (in_array($node->id, $listFoldersLimitedKeys)) { |
@@ -231,7 +231,7 @@ discard block |
||
231 | 231 | $ret_json .= '{'. |
232 | 232 | '"id":"li_'.$node->id.'"'. |
233 | 233 | ', "parent":"'.$parent.'"'. |
234 | - ', "children":'. ($childrenNb == 0 ? "false" : "true"). |
|
234 | + ', "children":'.($childrenNb == 0 ? "false" : "true"). |
|
235 | 235 | ', "text":"'.str_replace('"', '"', $text).'"'. |
236 | 236 | ', "li_attr":{"class":"jstreeopen", "title":"ID ['.$node->id.'] '.$title.'"}'. |
237 | 237 | ', "a_attr":{"id":"fld_'.$node->id.'", "class":"'.$folderClass.' nodblclick" , "onclick":"ListerItems(\''.$node->id.'\', \''.$restricted.'\', 0, 1)"}'. |
@@ -240,7 +240,7 @@ discard block |
||
240 | 240 | $ret_json .= '{'. |
241 | 241 | '"id":"li_'.$node->id.'"'. |
242 | 242 | ', "parent":"'.$parent.'"'. |
243 | - ', "children":'. ($childrenNb == 0 ? "false" : "true"). |
|
243 | + ', "children":'.($childrenNb == 0 ? "false" : "true"). |
|
244 | 244 | ', "text":"<i class=\'fa fa-close mi-red\'></i> '.$text.'"'. |
245 | 245 | ', "li_attr":{"class":"", "title":"ID ['.$node->id.'] '.$LANG['no_access'].'"}'. |
246 | 246 | '}'; |
@@ -272,7 +272,7 @@ discard block |
||
272 | 272 | $nodeDescendants = $tree->getDescendants($completTree[$nodeId]->id, true, false, true); |
273 | 273 | foreach ($nodeDescendants as $node) { |
274 | 274 | // manage tree counters |
275 | - if (isset($_SESSION['settings']['tree_counters']) && $_SESSION['settings']['tree_counters'] == 1 && in_array($node,array_merge($_SESSION['groupes_visibles'], $_SESSION['list_restricted_folders_for_items']))) { |
|
275 | + if (isset($_SESSION['settings']['tree_counters']) && $_SESSION['settings']['tree_counters'] == 1 && in_array($node, array_merge($_SESSION['groupes_visibles'], $_SESSION['list_restricted_folders_for_items']))) { |
|
276 | 276 | DB::query( |
277 | 277 | "SELECT * FROM ".prefix_table("items")." |
278 | 278 | WHERE inactif=%i AND id_tree = %i", |
@@ -336,7 +336,7 @@ discard block |
||
336 | 336 | $text .= ' (<span class=\'items_count\' id=\'itcount_'.$completTree[$nodeId]->id.'\'>'.$itemsNb.'</span>'; |
337 | 337 | // display tree counters |
338 | 338 | if (isset($_SESSION['settings']['tree_counters']) && $_SESSION['settings']['tree_counters'] == 1) { |
339 | - $text .= '|'.$nbChildrenItems.'|'.(count($nodeDescendants)-1); |
|
339 | + $text .= '|'.$nbChildrenItems.'|'.(count($nodeDescendants) - 1); |
|
340 | 340 | } |
341 | 341 | $text .= ')'; |
342 | 342 | } elseif (in_array($completTree[$nodeId]->id, $listFoldersLimitedKeys)) { |
@@ -383,7 +383,7 @@ discard block |
||
383 | 383 | if (isset($_SESSION['settings']['show_only_accessible_folders']) && $_SESSION['settings']['show_only_accessible_folders'] === "1") { |
384 | 384 | if ($hide_node === true) { |
385 | 385 | $last_visible_parent = $parent; |
386 | - $last_visible_parent_level = $completTree[$nodeId]->nlevel --; |
|
386 | + $last_visible_parent_level = $completTree[$nodeId]->nlevel--; |
|
387 | 387 | } else if ($completTree[$nodeId]->nlevel < $last_visible_parent_level) { |
388 | 388 | $last_visible_parent = ""; |
389 | 389 | } |
@@ -391,8 +391,8 @@ discard block |
||
391 | 391 | |
392 | 392 | |
393 | 393 | // json |
394 | - if ($hide_node === false && $show_but_block === false) { |
|
395 | - $ret_json .= (!empty($ret_json) ? ", " : "") . '{'. |
|
394 | + if ($hide_node === false && $show_but_block === false) { |
|
395 | + $ret_json .= (!empty($ret_json) ? ", " : "").'{'. |
|
396 | 396 | '"id":"li_'.$completTree[$nodeId]->id.'"'. |
397 | 397 | ', "parent":"'.(empty($last_visible_parent) ? $parent : $last_visible_parent).'"'. |
398 | 398 | ', "text":"'.str_replace('"', '"', $text).'"'. |
@@ -400,7 +400,7 @@ discard block |
||
400 | 400 | ', "a_attr":{"id":"fld_'.$completTree[$nodeId]->id.'", "class":"'.$folderClass.'" , "onclick":"ListerItems(\''.$completTree[$nodeId]->id.'\', \''.$restricted.'\', 0, 1)", "ondblclick":"LoadTreeNode(\''.$completTree[$nodeId]->id.'\')"}'. |
401 | 401 | '}'; |
402 | 402 | } else if ($show_but_block === true) { |
403 | - $ret_json .= (!empty($ret_json) ? ", " : "") . '{'. |
|
403 | + $ret_json .= (!empty($ret_json) ? ", " : "").'{'. |
|
404 | 404 | '"id":"li_'.$completTree[$nodeId]->id.'"'. |
405 | 405 | ', "parent":"'.(empty($last_visible_parent) ? $parent : $last_visible_parent).'"'. |
406 | 406 | ', "text":"<i class=\'fa fa-close mi-red\'></i> '.$text.'"'. |
@@ -164,8 +164,11 @@ discard block |
||
164 | 164 | } |
165 | 165 | |
166 | 166 | // prepare json return for current node |
167 | - if ($node->parent_id==0) $parent = "#"; |
|
168 | - else $parent = "li_".$node->parent_id; |
|
167 | + if ($node->parent_id==0) { |
|
168 | + $parent = "#"; |
|
169 | + } else { |
|
170 | + $parent = "li_".$node->parent_id; |
|
171 | + } |
|
169 | 172 | |
170 | 173 | // special case for READ-ONLY folder |
171 | 174 | if ($_SESSION['user_read_only'] === true && !in_array($node->id, $_SESSION['personal_folders'])) { |
@@ -224,7 +227,9 @@ discard block |
||
224 | 227 | } |
225 | 228 | |
226 | 229 | // if required, separate the json answer for each folder |
227 | - if (!empty($ret_json)) $ret_json .= ", "; |
|
230 | + if (!empty($ret_json)) { |
|
231 | + $ret_json .= ", "; |
|
232 | + } |
|
228 | 233 | |
229 | 234 | // json |
230 | 235 | if ($hide_node == false && $show_but_block == false) { |
@@ -73,7 +73,7 @@ discard block |
||
73 | 73 | prefix_table('tokens'), |
74 | 74 | array( |
75 | 75 | 'end_timestamp' => time() + 10 |
76 | - ), |
|
76 | + ), |
|
77 | 77 | "user_id = %i AND token = %s", |
78 | 78 | $_SESSION['user_id'], |
79 | 79 | $_POST['user_token'] |
@@ -89,7 +89,7 @@ discard block |
||
89 | 89 | prefix_table('tokens'), |
90 | 90 | array( |
91 | 91 | 'end_timestamp' => time() + 30 |
92 | - ), |
|
92 | + ), |
|
93 | 93 | "user_id = %i AND token = %s", |
94 | 94 | $_SESSION['user_id'], |
95 | 95 | $_POST['user_token'] |
@@ -128,7 +128,7 @@ discard block |
||
128 | 128 | |
129 | 129 | // HTTP headers for no cache etc |
130 | 130 | header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); |
131 | -header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); |
|
131 | +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); |
|
132 | 132 | header("Cache-Control: no-store, no-cache, must-revalidate"); |
133 | 133 | header("Cache-Control: post-check=0, pre-check=0", false); |
134 | 134 | header("Pragma: no-cache"); |
@@ -137,9 +137,9 @@ discard block |
||
137 | 137 | |
138 | 138 | $cleanupTargetDir = true; // Remove old files |
139 | 139 | $maxFileAge = 5 * 3600; // Temp file age in seconds |
140 | -$valid_chars_regex = 'A-Za-z0-9'; //accept only those characters |
|
140 | +$valid_chars_regex = 'A-Za-z0-9'; //accept only those characters |
|
141 | 141 | $MAX_FILENAME_LENGTH = 260; |
142 | -$max_file_size_in_bytes = 2147483647; //2Go |
|
142 | +$max_file_size_in_bytes = 2147483647; //2Go |
|
143 | 143 | |
144 | 144 | @date_default_timezone_set($_POST['timezone']); |
145 | 145 | |
@@ -147,7 +147,7 @@ discard block |
||
147 | 147 | $POST_MAX_SIZE = ini_get('post_max_size'); |
148 | 148 | $unit = strtoupper(substr($POST_MAX_SIZE, -1)); |
149 | 149 | $multiplier = ($unit == 'M' ? 1048576 : ($unit == 'K' ? 1024 : ($unit == 'G' ? 1073741824 : 1))); |
150 | -if ((int) $_SERVER['CONTENT_LENGTH'] > $multiplier*(int) $POST_MAX_SIZE && $POST_MAX_SIZE) { |
|
150 | +if ((int) $_SERVER['CONTENT_LENGTH'] > $multiplier * (int) $POST_MAX_SIZE && $POST_MAX_SIZE) { |
|
151 | 151 | handleError('POST exceeded maximum allowed size.', 111); |
152 | 152 | } |
153 | 153 | |
@@ -201,20 +201,20 @@ discard block |
||
201 | 201 | $fileName = preg_replace('[^'.$valid_chars_regex.']', '', strtolower(basename($fileName))); |
202 | 202 | |
203 | 203 | // Make sure the fileName is unique but only if chunking is disabled |
204 | -if ($chunks < 2 && file_exists($targetDir . DIRECTORY_SEPARATOR . $fileName)) { |
|
204 | +if ($chunks < 2 && file_exists($targetDir.DIRECTORY_SEPARATOR.$fileName)) { |
|
205 | 205 | $ext = strrpos($fileName, '.'); |
206 | 206 | $fileNameA = substr($fileName, 0, $ext); |
207 | 207 | $fileNameB = substr($fileName, $ext); |
208 | 208 | |
209 | 209 | $count = 1; |
210 | - while (file_exists($targetDir . DIRECTORY_SEPARATOR . $fileNameA . '_' . $count . $fileNameB)) { |
|
210 | + while (file_exists($targetDir.DIRECTORY_SEPARATOR.$fileNameA.'_'.$count.$fileNameB)) { |
|
211 | 211 | $count++; |
212 | 212 | } |
213 | 213 | |
214 | - $fileName = $fileNameA . '_' . $count . $fileNameB; |
|
214 | + $fileName = $fileNameA.'_'.$count.$fileNameB; |
|
215 | 215 | } |
216 | 216 | |
217 | -$filePath = $targetDir . DIRECTORY_SEPARATOR . $fileName; |
|
217 | +$filePath = $targetDir.DIRECTORY_SEPARATOR.$fileName; |
|
218 | 218 | |
219 | 219 | // Create target dir |
220 | 220 | if (!file_exists($targetDir)) { |
@@ -224,7 +224,7 @@ discard block |
||
224 | 224 | // Remove old temp files |
225 | 225 | if ($cleanupTargetDir && is_dir($targetDir) && ($dir = opendir($targetDir))) { |
226 | 226 | while (($file = readdir($dir)) !== false) { |
227 | - $tmpfilePath = $targetDir . DIRECTORY_SEPARATOR . $file; |
|
227 | + $tmpfilePath = $targetDir.DIRECTORY_SEPARATOR.$file; |
|
228 | 228 | |
229 | 229 | // Remove temp file if it is older than the max age and is not the current file |
230 | 230 | if (preg_match('/\.part$/', $file) |
@@ -339,7 +339,7 @@ discard block |
||
339 | 339 | |
340 | 340 | // Get some variables |
341 | 341 | $fileRandomId = md5($fileName.time()); |
342 | -rename($filePath, $targetDir . DIRECTORY_SEPARATOR . $fileRandomId); |
|
342 | +rename($filePath, $targetDir.DIRECTORY_SEPARATOR.$fileRandomId); |
|
343 | 343 | |
344 | 344 | //Get data from DB |
345 | 345 | /*$data = DB::queryfirstrow( |
@@ -388,7 +388,7 @@ discard block |
||
388 | 388 | return $f; |
389 | 389 | } |
390 | 390 | |
391 | - return substr($f, strrpos($f, '.')+1); |
|
391 | + return substr($f, strrpos($f, '.') + 1); |
|
392 | 392 | } |
393 | 393 | |
394 | 394 | /* Handles the error output. */ |
@@ -67,7 +67,7 @@ discard block |
||
67 | 67 | |
68 | 68 | // HTTP headers for no cache etc |
69 | 69 | header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); |
70 | -header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); |
|
70 | +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); |
|
71 | 71 | header("Cache-Control: no-store, no-cache, must-revalidate"); |
72 | 72 | header("Cache-Control: post-check=0, pre-check=0", false); |
73 | 73 | header("Pragma: no-cache"); |
@@ -80,9 +80,9 @@ discard block |
||
80 | 80 | |
81 | 81 | $cleanupTargetDir = true; // Remove old files |
82 | 82 | $maxFileAge = 5 * 3600; // Temp file age in seconds |
83 | -$valid_chars_regex = 'A-Za-z0-9'; //accept only those characters |
|
83 | +$valid_chars_regex = 'A-Za-z0-9'; //accept only those characters |
|
84 | 84 | $MAX_FILENAME_LENGTH = 260; |
85 | -$max_file_size_in_bytes = 2147483647; //2Go |
|
85 | +$max_file_size_in_bytes = 2147483647; //2Go |
|
86 | 86 | |
87 | 87 | @date_default_timezone_set($_POST['timezone']); |
88 | 88 | |
@@ -90,7 +90,7 @@ discard block |
||
90 | 90 | $POST_MAX_SIZE = ini_get('post_max_size'); |
91 | 91 | $unit = strtoupper(substr($POST_MAX_SIZE, -1)); |
92 | 92 | $multiplier = ($unit == 'M' ? 1048576 : ($unit == 'K' ? 1024 : ($unit == 'G' ? 1073741824 : 1))); |
93 | -if ((int) $_SERVER['CONTENT_LENGTH'] > $multiplier*(int) $POST_MAX_SIZE && $POST_MAX_SIZE) { |
|
93 | +if ((int) $_SERVER['CONTENT_LENGTH'] > $multiplier * (int) $POST_MAX_SIZE && $POST_MAX_SIZE) { |
|
94 | 94 | handleError('POST exceeded maximum allowed size.', 111); |
95 | 95 | } |
96 | 96 | |
@@ -161,19 +161,19 @@ discard block |
||
161 | 161 | $fileName = preg_replace('/[^'.$valid_chars_regex.'\.]/', '', strtolower(basename($fileName))); |
162 | 162 | |
163 | 163 | // Make sure the fileName is unique but only if chunking is disabled |
164 | -if ($chunks < 2 && file_exists($targetDir . DIRECTORY_SEPARATOR . $fileName)) { |
|
164 | +if ($chunks < 2 && file_exists($targetDir.DIRECTORY_SEPARATOR.$fileName)) { |
|
165 | 165 | $fileNameA = substr($fileName, 0, $ext); |
166 | 166 | $fileNameB = substr($fileName, $ext); |
167 | 167 | |
168 | 168 | $count = 1; |
169 | - while (file_exists($targetDir . DIRECTORY_SEPARATOR . $fileNameA . '_' . $count . $fileNameB)) { |
|
169 | + while (file_exists($targetDir.DIRECTORY_SEPARATOR.$fileNameA.'_'.$count.$fileNameB)) { |
|
170 | 170 | $count++; |
171 | 171 | } |
172 | 172 | |
173 | - $fileName = $fileNameA . '_' . $count . $fileNameB; |
|
173 | + $fileName = $fileNameA.'_'.$count.$fileNameB; |
|
174 | 174 | } |
175 | 175 | |
176 | -$filePath = $targetDir . DIRECTORY_SEPARATOR . $fileName; |
|
176 | +$filePath = $targetDir.DIRECTORY_SEPARATOR.$fileName; |
|
177 | 177 | |
178 | 178 | // Create target dir |
179 | 179 | if (!file_exists($targetDir)) { |
@@ -183,7 +183,7 @@ discard block |
||
183 | 183 | // Remove old temp files |
184 | 184 | if ($cleanupTargetDir && is_dir($targetDir) && ($dir = opendir($targetDir))) { |
185 | 185 | while (($file = readdir($dir)) !== false) { |
186 | - $tmpfilePath = $targetDir . DIRECTORY_SEPARATOR . $file; |
|
186 | + $tmpfilePath = $targetDir.DIRECTORY_SEPARATOR.$file; |
|
187 | 187 | |
188 | 188 | // Remove temp file if it is older than the max age and is not the current file |
189 | 189 | if (preg_match('/\.part$/', $file) |
@@ -270,9 +270,9 @@ discard block |
||
270 | 270 | } |
271 | 271 | |
272 | 272 | if (isset($_POST["type_upload"]) && $_POST["type_upload"] == "import_items_from_csv") { |
273 | - rename($filePath, $targetDir . DIRECTORY_SEPARATOR . $_POST["csvFile"]); |
|
273 | + rename($filePath, $targetDir.DIRECTORY_SEPARATOR.$_POST["csvFile"]); |
|
274 | 274 | } else if (isset($_POST["type_upload"]) && $_POST["type_upload"] == "import_items_from_keypass") { |
275 | - rename($filePath, $targetDir . DIRECTORY_SEPARATOR . $_POST["xmlFile"]); |
|
275 | + rename($filePath, $targetDir.DIRECTORY_SEPARATOR.$_POST["xmlFile"]); |
|
276 | 276 | } else if (isset($_POST["type_upload"]) && $_POST["type_upload"] == "upload_profile_photo") { |
277 | 277 | // sanitize the new file name |
278 | 278 | $newFileName = preg_replace('/[^\w\._]+/', '_', $_POST['newFileName']); |
@@ -282,13 +282,13 @@ discard block |
||
282 | 282 | $ext = pathinfo($filePath, PATHINFO_EXTENSION); |
283 | 283 | |
284 | 284 | // rename the file |
285 | - rename($filePath, $targetDir . DIRECTORY_SEPARATOR . $newFileName . '.' . $ext); |
|
285 | + rename($filePath, $targetDir.DIRECTORY_SEPARATOR.$newFileName.'.'.$ext); |
|
286 | 286 | |
287 | 287 | // make thumbnail |
288 | 288 | require_once $_SESSION['settings']['cpassman_dir'].'/sources/main.functions.php'; |
289 | 289 | make_thumb( |
290 | - $targetDir . DIRECTORY_SEPARATOR . $newFileName . '.' . $ext, |
|
291 | - $targetDir . DIRECTORY_SEPARATOR . $newFileName ."_thumb" . '.' . $ext, |
|
290 | + $targetDir.DIRECTORY_SEPARATOR.$newFileName.'.'.$ext, |
|
291 | + $targetDir.DIRECTORY_SEPARATOR.$newFileName."_thumb".'.'.$ext, |
|
292 | 292 | 40 |
293 | 293 | ); |
294 | 294 | |
@@ -307,13 +307,13 @@ discard block |
||
307 | 307 | |
308 | 308 | // get current avatar and delete it |
309 | 309 | $data = DB::queryFirstRow("SELECT avatar, avatar_thumb FROM ".$pre."users WHERE id=%i", $_SESSION['user_id']); |
310 | - @unlink($targetDir . DIRECTORY_SEPARATOR .$data['avatar']); |
|
311 | - @unlink($targetDir . DIRECTORY_SEPARATOR .$data['avatar_thumb']); |
|
310 | + @unlink($targetDir.DIRECTORY_SEPARATOR.$data['avatar']); |
|
311 | + @unlink($targetDir.DIRECTORY_SEPARATOR.$data['avatar_thumb']); |
|
312 | 312 | |
313 | 313 | // store in DB the new avatar |
314 | 314 | DB::query( |
315 | 315 | "UPDATE ".$pre."users |
316 | - SET avatar='".$newFileName . '.' . $ext."', avatar_thumb='".$newFileName ."_thumb" . '.' . $ext."' |
|
316 | + SET avatar='".$newFileName.'.'.$ext."', avatar_thumb='".$newFileName."_thumb".'.'.$ext."' |
|
317 | 317 | WHERE id=%i", |
318 | 318 | $_SESSION['user_id'] |
319 | 319 | ); |
@@ -326,7 +326,7 @@ discard block |
||
326 | 326 | exit(); |
327 | 327 | |
328 | 328 | } else { |
329 | - rename($filePath, $targetDir . DIRECTORY_SEPARATOR . $_POST["File"]); |
|
329 | + rename($filePath, $targetDir.DIRECTORY_SEPARATOR.$_POST["File"]); |
|
330 | 330 | } |
331 | 331 | |
332 | 332 | // Return JSON-RPC response |
@@ -339,7 +339,7 @@ discard block |
||
339 | 339 | return $f; |
340 | 340 | } |
341 | 341 | |
342 | - return substr($f, strrpos($f, '.')+1); |
|
342 | + return substr($f, strrpos($f, '.') + 1); |
|
343 | 343 | } |
344 | 344 | |
345 | 345 | /* Handles the error output. */ |