@@ -40,7 +40,7 @@ |
||
40 | 40 | "SELECT id, login FROM ".prefix_table("users")." ORDER BY login ASC" |
41 | 41 | ); |
42 | 42 | $counter = DB::count(); |
43 | -if ($counter>0) { |
|
43 | +if ($counter > 0) { |
|
44 | 44 | foreach ($rows as $reccord) { |
45 | 45 | $tab_users[$reccord['login']] = array( |
46 | 46 | 'id'=>$reccord['id'], |
@@ -116,35 +116,35 @@ discard block |
||
116 | 116 | $("#offline_password").simplePassMeter({ |
117 | 117 | "requirements": {}, |
118 | 118 | "container": "#offline_pw_strength", |
119 | - "defaultText" : "<?php echo $LANG['index_pw_level_txt'];?>", |
|
119 | + "defaultText" : "<?php echo $LANG['index_pw_level_txt']; ?>", |
|
120 | 120 | "ratings": [ |
121 | 121 | {"minScore": 0, |
122 | 122 | "className": "meterFail", |
123 | - "text": "<?php echo $LANG['complex_level0'];?>" |
|
123 | + "text": "<?php echo $LANG['complex_level0']; ?>" |
|
124 | 124 | }, |
125 | 125 | {"minScore": 25, |
126 | 126 | "className": "meterWarn", |
127 | - "text": "<?php echo $LANG['complex_level1'];?>" |
|
127 | + "text": "<?php echo $LANG['complex_level1']; ?>" |
|
128 | 128 | }, |
129 | 129 | {"minScore": 50, |
130 | 130 | "className": "meterWarn", |
131 | - "text": "<?php echo $LANG['complex_level2'];?>" |
|
131 | + "text": "<?php echo $LANG['complex_level2']; ?>" |
|
132 | 132 | }, |
133 | 133 | {"minScore": 60, |
134 | 134 | "className": "meterGood", |
135 | - "text": "<?php echo $LANG['complex_level3'];?>" |
|
135 | + "text": "<?php echo $LANG['complex_level3']; ?>" |
|
136 | 136 | }, |
137 | 137 | {"minScore": 70, |
138 | 138 | "className": "meterGood", |
139 | - "text": "<?php echo $LANG['complex_level4'];?>" |
|
139 | + "text": "<?php echo $LANG['complex_level4']; ?>" |
|
140 | 140 | }, |
141 | 141 | {"minScore": 80, |
142 | 142 | "className": "meterExcel", |
143 | - "text": "<?php echo $LANG['complex_level5'];?>" |
|
143 | + "text": "<?php echo $LANG['complex_level5']; ?>" |
|
144 | 144 | }, |
145 | 145 | {"minScore": 90, |
146 | 146 | "className": "meterExcel", |
147 | - "text": "<?php echo $LANG['complex_level6'];?>" |
|
147 | + "text": "<?php echo $LANG['complex_level6']; ?>" |
|
148 | 148 | } |
149 | 149 | ] |
150 | 150 | }); |
@@ -162,7 +162,7 @@ discard block |
||
162 | 162 | */ |
163 | 163 | function generateOfflineFile() |
164 | 164 | { |
165 | - $("#offline_information").html('<i class="fa fa-cog fa-spin"></i> <?php echo $LANG['please_wait'];?>').attr("class","").show(); |
|
165 | + $("#offline_information").html('<i class="fa fa-cog fa-spin"></i> <?php echo $LANG['please_wait']; ?>').attr("class","").show(); |
|
166 | 166 | |
167 | 167 | //Get list of selected folders |
168 | 168 | var ids = ""; |
@@ -172,19 +172,19 @@ discard block |
||
172 | 172 | }); |
173 | 173 | |
174 | 174 | if (ids == "") { |
175 | - $("#offline_information").show().html("<?php echo $LANG['error_no_selected_folder'];?>").attr("class","ui-state-error"); |
|
175 | + $("#offline_information").show().html("<?php echo $LANG['error_no_selected_folder']; ?>").attr("class","ui-state-error"); |
|
176 | 176 | setTimeout(function(){$("#offline_information").effect( "fade", "slow" );}, 1000); |
177 | 177 | return; |
178 | 178 | } |
179 | 179 | |
180 | 180 | if ($("#offline_password").val() == "") { |
181 | - $("#offline_information").show().html("<?php echo $LANG['pdf_password_warning'];?>").attr("class","ui-state-error"); |
|
181 | + $("#offline_information").show().html("<?php echo $LANG['pdf_password_warning']; ?>").attr("class","ui-state-error"); |
|
182 | 182 | setTimeout(function(){$("#offline_information").effect( "fade", "slow" );}, 1000); |
183 | 183 | return; |
184 | 184 | } |
185 | 185 | |
186 | 186 | if ($("#offline_pw_strength_value").val() < $("#min_offline_pw_strength_value").val()) { |
187 | - $("#offline_information").addClass("ui-state-error ui-corner-all").show().html("<?php echo $LANG['error_complex_not_enought'];?>"); |
|
187 | + $("#offline_information").addClass("ui-state-error ui-corner-all").show().html("<?php echo $LANG['error_complex_not_enought']; ?>"); |
|
188 | 188 | setTimeout(function(){$("#offline_information").effect( "fade", "slow" );}, 1000); |
189 | 189 | return; |
190 | 190 | } |
@@ -216,7 +216,7 @@ discard block |
||
216 | 216 | { |
217 | 217 | // prpare list of ids to treat during this run |
218 | 218 | if (idsList != "") { |
219 | - $("#offline_information").html('<i class="fa fa-cog fa-spin"></i> <?php echo $LANG['please_wait'];?> - ' + Math.round((parseInt(cpt)*100)/parseInt(number)) + "%"); |
|
219 | + $("#offline_information").html('<i class="fa fa-cog fa-spin"></i> <?php echo $LANG['please_wait']; ?> - ' + Math.round((parseInt(cpt)*100)/parseInt(number)) + "%"); |
|
220 | 220 | |
221 | 221 | tab = idsList.split(';'); |
222 | 222 | idTree = tab[0]; |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | $("#tbl_categories").append( |
63 | 63 | '<tr id="t_cat_'+data[0].id+'"><td colspan="2">'+ |
64 | 64 | '<input type="text" id="catOrd_'+data[0].id+'" size="1" class="category_order" value="1" /> '+ |
65 | - '<span class="fa-stack tip" title="<?php echo $LANG['field_add_in_category'];?>" onclick="fieldAdd('+ |
|
65 | + '<span class="fa-stack tip" title="<?php echo $LANG['field_add_in_category']; ?>" onclick="fieldAdd('+ |
|
66 | 66 | data[0].id+')" style="cursor:pointer;">'+ |
67 | 67 | '<i class="fa fa-square fa-stack-2x"></i><i class="fa fa-plus fa-stack-1x fa-inverse"></i>'+ |
68 | 68 | '</span> '+ |
@@ -70,10 +70,10 @@ discard block |
||
70 | 70 | '<label for="item_'+data[0].id+'_cat" id="item_'+data[0].id+'">'+ |
71 | 71 | $("#new_category_label").val()+'</label>'+ |
72 | 72 | '</td><td>'+ |
73 | - '<span class="fa-stack tip" title="<?php echo $LANG['category_in_folders'];?>" onclick="catInFolders('+data[0].id+')" style="cursor:pointer;">'+ |
|
73 | + '<span class="fa-stack tip" title="<?php echo $LANG['category_in_folders']; ?>" onclick="catInFolders('+data[0].id+')" style="cursor:pointer;">'+ |
|
74 | 74 | '<i class="fa fa-square fa-stack-2x"></i><i class="fa fa-edit fa-stack-1x fa-inverse"></i>'+ |
75 | 75 | '</span> '+ |
76 | - '<?php echo $LANG['category_in_folders_title'];?>:'+ |
|
76 | + '<?php echo $LANG['category_in_folders_title']; ?>:'+ |
|
77 | 77 | '<span style="font-family:italic; margin-left:10px;" id="catFolders_'+data[0].id+'"></span>'+ |
78 | 78 | '<input type="hidden" id="catFoldersList_'+data[0].id+'" value="'+data[0].id+'" /></td><td></td>'); |
79 | 79 | // Add new cat |
@@ -94,7 +94,7 @@ discard block |
||
94 | 94 | var data = $("input[name=sel_item]:checked").attr("id").split('_'); |
95 | 95 | $("#post_id").val(data[1]); |
96 | 96 | $("#post_type").val("renameItem"); |
97 | - $("#category_confirm_text").html("<?php echo $LANG['confirm_rename'];?>"); |
|
97 | + $("#category_confirm_text").html("<?php echo $LANG['confirm_rename']; ?>"); |
|
98 | 98 | $("#category_confirm").dialog("open"); |
99 | 99 | } |
100 | 100 | |
@@ -105,7 +105,7 @@ discard block |
||
105 | 105 | var data = $("input[name=sel_item]:checked").attr("id").split('_'); |
106 | 106 | $("#post_id").val(data[1]); |
107 | 107 | $("#post_type").val("deleteCategory"); |
108 | - $("#category_confirm_text").html("<?php echo $LANG['confirm_deletion'];?>"); |
|
108 | + $("#category_confirm_text").html("<?php echo $LANG['confirm_deletion']; ?>"); |
|
109 | 109 | $("#category_confirm").dialog("open"); |
110 | 110 | } |
111 | 111 | |
@@ -116,7 +116,7 @@ discard block |
||
116 | 116 | var data = $("input[name=sel_item]:checked").attr("id").split('_'); |
117 | 117 | $("#post_id").val(data[1]); |
118 | 118 | $("#post_type").val("moveItem"); |
119 | - $("#category_confirm_text").html("<?php echo $LANG['confirm_moveto'];?>"); |
|
119 | + $("#category_confirm_text").html("<?php echo $LANG['confirm_moveto']; ?>"); |
|
120 | 120 | $("#category_confirm").dialog("open"); |
121 | 121 | } |
122 | 122 | |
@@ -167,7 +167,7 @@ discard block |
||
167 | 167 | "sources/categories.queries.php", |
168 | 168 | { |
169 | 169 | type : "loadFieldsList", |
170 | - title : prepareExchangedData(sanitizeString($("#new_category_label").val()), "encode", "<?php echo $_SESSION['key'];?>") |
|
170 | + title : prepareExchangedData(sanitizeString($("#new_category_label").val()), "encode", "<?php echo $_SESSION['key']; ?>") |
|
171 | 171 | }, |
172 | 172 | function(data) { |
173 | 173 | var newList = '<table id="tbl_categories" style="">'; |
@@ -177,17 +177,17 @@ discard block |
||
177 | 177 | if (val[0] === "1") { |
178 | 178 | newList += '<tr id="t_cat_'+val[1]+'"><td colspan="2">'+ |
179 | 179 | '<input type="text" id="catOrd_'+val[1]+'" size="1" class="category_order" value="'+val[3]+'" /> '+ |
180 | - '<span class="fa-stack tip" title="<?php echo $LANG['field_add_in_category'];?>" onclick="fieldAdd('+ |
|
180 | + '<span class="fa-stack tip" title="<?php echo $LANG['field_add_in_category']; ?>" onclick="fieldAdd('+ |
|
181 | 181 | val[1]+')" style="cursor:pointer;">'+ |
182 | 182 | '<i class="fa fa-square fa-stack-2x"></i><i class="fa fa-plus fa-stack-1x fa-inverse"></i>'+ |
183 | 183 | '</span> '+ |
184 | 184 | '<input type="radio" name="sel_item" id="item_'+val[1]+'_cat" />'+ |
185 | 185 | '<label for="item_'+val[1]+'_cat" id="item_'+val[1]+'">'+val[2]+'</label>'+ |
186 | 186 | '</td><td>'+ |
187 | - '<span class="fa-stack tip" title="<?php echo $LANG['category_in_folders'];?>" onclick="catInFolders('+val[1]+')" style="cursor:pointer;">'+ |
|
187 | + '<span class="fa-stack tip" title="<?php echo $LANG['category_in_folders']; ?>" onclick="catInFolders('+val[1]+')" style="cursor:pointer;">'+ |
|
188 | 188 | '<i class="fa fa-square fa-stack-2x"></i><i class="fa fa-edit fa-stack-1x fa-inverse"></i>'+ |
189 | 189 | '</span> '+ |
190 | - '<?php echo $LANG['category_in_folders_title'];?>:'+ |
|
190 | + '<?php echo $LANG['category_in_folders_title']; ?>:'+ |
|
191 | 191 | '<span style="font-family:italic; margin-left:10px;" id="catFolders_'+val[1]+'">'+val[4]+'</span>'+ |
192 | 192 | '<input type="hidden" id="catFoldersList_'+val[1]+'" value="'+val[5]+'" /></td></tr>'; |
193 | 193 | } else { |
@@ -199,9 +199,9 @@ discard block |
||
199 | 199 | if (val[4] !== "") { |
200 | 200 | newList += '<span id="encryt_data_'+val[1]+'" style="margin-left:4px; cursor:pointer;">'; |
201 | 201 | if (val[4] === "1") { |
202 | - newList += '<i class="fa fa-key tip" title="<?php echo $LANG['encrypted_data'];?>" onclick="changeEncrypMode('+val[1]+', 1)"></i>'; |
|
202 | + newList += '<i class="fa fa-key tip" title="<?php echo $LANG['encrypted_data']; ?>" onclick="changeEncrypMode('+val[1]+', 1)"></i>'; |
|
203 | 203 | } else if (val[4] === "0") { |
204 | - newList += '<span class="fa-stack" title="<?php echo $LANG['not_encrypted_data'];?>" onclick="changeEncrypMode('+val[1]+', 0)"><i class="fa fa-key fa-stack-1x"></i><i class="fa fa-ban fa-stack-1x fa-lg" style="color:red;"></i></span>'; |
|
204 | + newList += '<span class="fa-stack" title="<?php echo $LANG['not_encrypted_data']; ?>" onclick="changeEncrypMode('+val[1]+', 0)"><i class="fa fa-key fa-stack-1x"></i><i class="fa fa-ban fa-stack-1x fa-lg" style="color:red;"></i></span>'; |
|
205 | 205 | } |
206 | 206 | newList += '</span>' |
207 | 207 | } |
@@ -234,7 +234,7 @@ discard block |
||
234 | 234 | else if (action === "admin_action_change_salt_key") { |
235 | 235 | option = aes_encrypt(sanitizeString($("#new_salt_key").val())); |
236 | 236 | } else if (action === "admin_email_send_backlog") { |
237 | - $("#email_testing_results").show().html("<?php echo addslashes($LANG['please_wait']);?>").attr("class","ui-corner-all ui-state-focus"); |
|
237 | + $("#email_testing_results").show().html("<?php echo addslashes($LANG['please_wait']); ?>").attr("class","ui-corner-all ui-state-focus"); |
|
238 | 238 | } else if (action === "admin_action_attachments_cryption") { |
239 | 239 | option = $("input[name=attachments_cryption]:checked").val(); |
240 | 240 | if (option === "" || option === undefined) { |
@@ -261,7 +261,7 @@ discard block |
||
261 | 261 | if (option === "" || option.length === 0) return; |
262 | 262 | |
263 | 263 | // convert to json string |
264 | - option = prepareExchangedData(JSON.stringify(option) , "encode", "<?php echo $_SESSION['key'];?>"); |
|
264 | + option = prepareExchangedData(JSON.stringify(option) , "encode", "<?php echo $_SESSION['key']; ?>"); |
|
265 | 265 | } |
266 | 266 | //Lauchn ajax query |
267 | 267 | $.post( |
@@ -274,7 +274,7 @@ discard block |
||
274 | 274 | $("#div_loading").hide(); |
275 | 275 | if (data != null) { |
276 | 276 | if (data[0].result == "db_backup") { |
277 | - $("#result_admin_action_db_backup").html("<span class='fa fa-file-code-o'></span> <a href='"+data[0].href+"'><?php echo $LANG['pdf_download'];?></a>").show(); |
|
277 | + $("#result_admin_action_db_backup").html("<span class='fa fa-file-code-o'></span> <a href='"+data[0].href+"'><?php echo $LANG['pdf_download']; ?></a>").show(); |
|
278 | 278 | } else if (data[0].result == "pf_done") { |
279 | 279 | $("#result_admin_action_check_pf").html("<span class='fa fa-check mi-green'></span>").show(); |
280 | 280 | } else if (data[0].result == "db_restore") { |
@@ -289,9 +289,9 @@ discard block |
||
289 | 289 | } else if (data[0].result == "db_optimize") { |
290 | 290 | $("#result_admin_action_db_optimize").html("<span class='fa fa-check mi-green'></span>").show(); |
291 | 291 | } else if (data[0].result == "purge_old_files") { |
292 | - $("#result_admin_action_purge_old_files").html("<span class='fa fa-check mi-green'></span> "+data[0].nb_files_deleted+" <? echo $LANG['admin_action_purge_old_files_result'];?>").show(); |
|
292 | + $("#result_admin_action_purge_old_files").html("<span class='fa fa-check mi-green'></span> "+data[0].nb_files_deleted+" <? echo $LANG['admin_action_purge_old_files_result']; ?>").show(); |
|
293 | 293 | } else if (data[0].result == "db_clean_items") { |
294 | - $("#result_admin_action_db_clean_items").html("<span class='fa fa-check mi-green'></span> "+data[0].nb_items_deleted+" <?php echo $LANG['admin_action_db_clean_items_result'];?>").show(); |
|
294 | + $("#result_admin_action_db_clean_items").html("<span class='fa fa-check mi-green'></span> "+data[0].nb_items_deleted+" <?php echo $LANG['admin_action_db_clean_items_result']; ?>").show(); |
|
295 | 295 | } else if (data[0].result == "changed_salt_key") { |
296 | 296 | //deconnect user |
297 | 297 | $("#menu_action").val("deconnexion"); |
@@ -299,9 +299,9 @@ discard block |
||
299 | 299 | window.location.href = "logout.php" |
300 | 300 | } else if (data[0].result == "email_test_conf" || data[0].result == "admin_email_send_backlog") { |
301 | 301 | if (data[0].error != "") { |
302 | - $("#email_testing_results").html("<?php echo addslashes($LANG['admin_email_result_nok']);?> "+data[0].message).show().attr("class","ui-state-error ui-corner-all"); |
|
302 | + $("#email_testing_results").html("<?php echo addslashes($LANG['admin_email_result_nok']); ?> "+data[0].message).show().attr("class","ui-state-error ui-corner-all"); |
|
303 | 303 | } else { |
304 | - $("#email_testing_results").html("<?php echo addslashes(str_replace("#email#", $_SESSION['user_email'], $LANG['admin_email_result_ok']));?>").show().attr("class","ui-corner-all ui-state-focus"); |
|
304 | + $("#email_testing_results").html("<?php echo addslashes(str_replace("#email#", $_SESSION['user_email'], $LANG['admin_email_result_ok'])); ?>").show().attr("class","ui-corner-all ui-state-focus"); |
|
305 | 305 | } |
306 | 306 | } else if (data[0].result == "pw_prefix_correct") { |
307 | 307 | $("result_admin_action_pw_prefix_correct").html(data[0].ret).show(); |
@@ -326,7 +326,7 @@ discard block |
||
326 | 326 | } else if (data[0].result === "backup_decrypt_fails") { |
327 | 327 | $("#result_admin_script_backup").html(data[0].msg).show(); |
328 | 328 | } else if (data[0].result === "backup_decrypt_success") { |
329 | - $("#result_admin_script_backup").html("<span class='fa fa-check mi-green'></span> <?php echo addslashes($LANG['file_is_now_ready']);?> - " + data[0].msg).show(1).delay(5000).fadeOut(500); |
|
329 | + $("#result_admin_script_backup").html("<span class='fa fa-check mi-green'></span> <?php echo addslashes($LANG['file_is_now_ready']); ?> - " + data[0].msg).show(1).delay(5000).fadeOut(500); |
|
330 | 330 | } |
331 | 331 | //-- |
332 | 332 | } |
@@ -339,7 +339,7 @@ discard block |
||
339 | 339 | * |
340 | 340 | */ |
341 | 341 | function confirmChangingSk() { |
342 | - if (confirm("<?php echo addslashes($LANG['confirm_database_reencryption']);?>")) { |
|
342 | + if (confirm("<?php echo addslashes($LANG['confirm_database_reencryption']); ?>")) { |
|
343 | 343 | changeMainSaltKey('starting', ''); |
344 | 344 | } |
345 | 345 | } |
@@ -360,14 +360,14 @@ discard block |
||
360 | 360 | // start change |
361 | 361 | if (start === "starting") { |
362 | 362 | // inform |
363 | - $("#changeMainSaltKey_message").html("<i class=\"fa fa-cog fa-spin fa\"></i> <?php echo $LANG['starting'];?>").show(); |
|
363 | + $("#changeMainSaltKey_message").html("<i class=\"fa fa-cog fa-spin fa\"></i> <?php echo $LANG['starting']; ?>").show(); |
|
364 | 364 | |
365 | 365 | // launch query |
366 | 366 | $.post( |
367 | 367 | "sources/admin.queries.php", |
368 | 368 | { |
369 | 369 | type : "admin_action_change_salt_key___start", |
370 | - key : "<?php echo $_SESSION['key'];?>" |
|
370 | + key : "<?php echo $_SESSION['key']; ?>" |
|
371 | 371 | }, |
372 | 372 | function(data) { |
373 | 373 | if (data[0].error == "" && data[0].nextAction == "encrypt_items") { |
@@ -379,7 +379,7 @@ discard block |
||
379 | 379 | //changeMainSaltKey(0, "files"); |
380 | 380 | } else { |
381 | 381 | // error mngt |
382 | - $("#changeMainSaltKey_message").html("<i class=\"fa fa-alert fa-spin fa\"></i> <?php echo $LANG['error_sent_back'];?> : "+data[0].error); |
|
382 | + $("#changeMainSaltKey_message").html("<i class=\"fa fa-alert fa-spin fa\"></i> <?php echo $LANG['error_sent_back']; ?> : "+data[0].error); |
|
383 | 383 | } |
384 | 384 | }, |
385 | 385 | "json" |
@@ -388,7 +388,7 @@ discard block |
||
388 | 388 | } else if (isFinite(start) && object !== "") { |
389 | 389 | console.log("Step Encrypt - " +start+" ; "+nb+" ; "+$("#changeMainSaltKey_itemsCount").val()); |
390 | 390 | |
391 | - $("#changeMainSaltKey_message").html("<i class=\"fa fa-cog fa-spin fa\"></i> <?php echo $LANG['treating_items'];?>... "+start+" > "+(parseInt(start)+parseInt(nb))+" (<?php echo $LANG['total_number_of_items'];?> : "+$("#changeMainSaltKey_itemsCount").val()+")"); |
|
391 | + $("#changeMainSaltKey_message").html("<i class=\"fa fa-cog fa-spin fa\"></i> <?php echo $LANG['treating_items']; ?>... "+start+" > "+(parseInt(start)+parseInt(nb))+" (<?php echo $LANG['total_number_of_items']; ?> : "+$("#changeMainSaltKey_itemsCount").val()+")"); |
|
392 | 392 | |
393 | 393 | $.post( |
394 | 394 | "sources/admin.queries.php", |
@@ -398,7 +398,7 @@ discard block |
||
398 | 398 | start : start, |
399 | 399 | length : nb, |
400 | 400 | nbItems : $("#changeMainSaltKey_itemsCount").val(), |
401 | - key : "<?php echo $_SESSION['key'];?>" |
|
401 | + key : "<?php echo $_SESSION['key']; ?>" |
|
402 | 402 | }, |
403 | 403 | function(data) { |
404 | 404 | console.log("Next action: "+data[0].nextAction); |
@@ -412,11 +412,11 @@ discard block |
||
412 | 412 | } |
413 | 413 | changeMainSaltKey(data[0].nextStart, object); |
414 | 414 | } else if (data[0].nextAction === "finishing") { |
415 | - $("#changeMainSaltKey_message").html("<?php echo $LANG['finalizing'];?>..."); |
|
415 | + $("#changeMainSaltKey_message").html("<?php echo $LANG['finalizing']; ?>..."); |
|
416 | 416 | changeMainSaltKey("finishing"); |
417 | 417 | } else { |
418 | 418 | // error mngt |
419 | - $("#changeMainSaltKey_message").html("<i class=\"fa fa-alert fa-spin fa\"></i> <?php echo $LANG['error_sent_back'];?> : "+data[0].error); |
|
419 | + $("#changeMainSaltKey_message").html("<i class=\"fa fa-alert fa-spin fa\"></i> <?php echo $LANG['error_sent_back']; ?> : "+data[0].error); |
|
420 | 420 | } |
421 | 421 | }, |
422 | 422 | "json" |
@@ -427,12 +427,12 @@ discard block |
||
427 | 427 | "sources/admin.queries.php", |
428 | 428 | { |
429 | 429 | type : "admin_action_change_salt_key___end", |
430 | - key : "<?php echo $_SESSION['key'];?>" |
|
430 | + key : "<?php echo $_SESSION['key']; ?>" |
|
431 | 431 | }, |
432 | 432 | function(data) { |
433 | 433 | if (data[0].nextAction === "done") { |
434 | 434 | console.log("done"); |
435 | - $("#changeMainSaltKey_message").html("<i class=\"fa fa-info fa-lg\"></i> <?php echo $LANG['alert_message_done']." ".$LANG['number_of_items_treated'];?> : " + $("#changeMainSaltKey_itemsCountTotal").val() + '<p><?php echo $LANG['check_data_after_reencryption'];?><p><div style=\"margin-top:5px;\"><a href=\"#\" onclick=\"encryption_show_revert()\"><?php echo $LANG['revert'];?></a></div>'); |
|
435 | + $("#changeMainSaltKey_message").html("<i class=\"fa fa-info fa-lg\"></i> <?php echo $LANG['alert_message_done']." ".$LANG['number_of_items_treated']; ?> : " + $("#changeMainSaltKey_itemsCountTotal").val() + '<p><?php echo $LANG['check_data_after_reencryption']; ?><p><div style=\"margin-top:5px;\"><a href=\"#\" onclick=\"encryption_show_revert()\"><?php echo $LANG['revert']; ?></a></div>'); |
|
436 | 436 | } else { |
437 | 437 | // error mngt |
438 | 438 | } |
@@ -444,13 +444,13 @@ discard block |
||
444 | 444 | } |
445 | 445 | |
446 | 446 | function encryption_show_revert() { |
447 | - if (confirm('<?php echo $LANG['revert_the_database'];?>')) { |
|
448 | - $("#changeMainSaltKey_message").append('<div style="margin-top:5px;"><i class="fa fa-cog fa-spin fa-lg"></i> <?php echo addslashes($LANG['please_wait']);?>...</div>') |
|
447 | + if (confirm('<?php echo $LANG['revert_the_database']; ?>')) { |
|
448 | + $("#changeMainSaltKey_message").append('<div style="margin-top:5px;"><i class="fa fa-cog fa-spin fa-lg"></i> <?php echo addslashes($LANG['please_wait']); ?>...</div>') |
|
449 | 449 | $.post( |
450 | 450 | "sources/admin.queries.php", |
451 | 451 | { |
452 | 452 | type : "admin_action_change_salt_key___restore_backup", |
453 | - key : "<?php echo $_SESSION['key'];?>" |
|
453 | + key : "<?php echo $_SESSION['key']; ?>" |
|
454 | 454 | }, |
455 | 455 | function(data) { |
456 | 456 | $("#changeMainSaltKey_message").html('').hide(); |
@@ -474,8 +474,8 @@ discard block |
||
474 | 474 | "sources/admin.queries.php", |
475 | 475 | { |
476 | 476 | type : "save_option_change", |
477 | - data : prepareExchangedData(data, "encode", "<?php echo $_SESSION['key'];?>"), |
|
478 | - key : "<?php echo $_SESSION['key'];?>" |
|
477 | + data : prepareExchangedData(data, "encode", "<?php echo $_SESSION['key']; ?>"), |
|
478 | + key : "<?php echo $_SESSION['key']; ?>" |
|
479 | 479 | }, |
480 | 480 | function(data) { |
481 | 481 | // force page reload in case of encryptClientServer |
@@ -485,7 +485,7 @@ discard block |
||
485 | 485 | } |
486 | 486 | //decrypt data |
487 | 487 | try { |
488 | - data = prepareExchangedData(data , "decode", "<?php echo $_SESSION['key'];?>"); |
|
488 | + data = prepareExchangedData(data , "decode", "<?php echo $_SESSION['key']; ?>"); |
|
489 | 489 | } catch (e) { |
490 | 490 | // error |
491 | 491 | $("#message_box").html("An error appears. Answer from Server cannot be parsed!<br />Returned data:<br />"+data).show().fadeOut(4000); |
@@ -524,8 +524,8 @@ discard block |
||
524 | 524 | drag: true, // allow dragging the toggle between positions |
525 | 525 | click: true, // allow clicking on the toggle |
526 | 526 | text: { |
527 | - on: '<?php echo $LANG['yes'];?>', // text for the ON position |
|
528 | - off: '<?php echo $LANG['no'];?>' // and off |
|
527 | + on: '<?php echo $LANG['yes']; ?>', // text for the ON position |
|
528 | + off: '<?php echo $LANG['no']; ?>' // and off |
|
529 | 529 | }, |
530 | 530 | on: true, // is the toggle ON on init |
531 | 531 | animate: 250, // animation time (ms) |
@@ -550,8 +550,8 @@ discard block |
||
550 | 550 | "sources/admin.queries.php", |
551 | 551 | { |
552 | 552 | type : "save_option_change", |
553 | - data : prepareExchangedData(data, "encode", "<?php echo $_SESSION['key'];?>"), |
|
554 | - key : "<?php echo $_SESSION['key'];?>" |
|
553 | + data : prepareExchangedData(data, "encode", "<?php echo $_SESSION['key']; ?>"), |
|
554 | + key : "<?php echo $_SESSION['key']; ?>" |
|
555 | 555 | }, |
556 | 556 | function(data) { |
557 | 557 | // force page reload in case of encryptClientServer |
@@ -561,7 +561,7 @@ discard block |
||
561 | 561 | } |
562 | 562 | //decrypt data |
563 | 563 | try { |
564 | - data = prepareExchangedData(data , "decode", "<?php echo $_SESSION['key'];?>"); |
|
564 | + data = prepareExchangedData(data , "decode", "<?php echo $_SESSION['key']; ?>"); |
|
565 | 565 | } catch (e) { |
566 | 566 | // error |
567 | 567 | $("#message_box").html("An error appears. Answer from Server cannot be parsed!<br />Returned data:<br />"+data).show().fadeOut(4000); |
@@ -605,7 +605,7 @@ discard block |
||
605 | 605 | } |
606 | 606 | }, |
607 | 607 | beforeLoad: function( event, ui ) { |
608 | - ui.panel.html('<div id="loader_tab"><i class="fa fa-cog fa-spin"></i> <?php echo $LANG['loading'];?>...</div>') |
|
608 | + ui.panel.html('<div id="loader_tab"><i class="fa fa-cog fa-spin"></i> <?php echo $LANG['loading']; ?>...</div>') |
|
609 | 609 | }, |
610 | 610 | load: function( event, ui ) { |
611 | 611 | $("#loader_tab").remove(); |
@@ -638,9 +638,9 @@ discard block |
||
638 | 638 | autoOpen: false, |
639 | 639 | width: 400, |
640 | 640 | height: 120, |
641 | - title: "<?php echo $LANG['confirm'];?>", |
|
641 | + title: "<?php echo $LANG['confirm']; ?>", |
|
642 | 642 | buttons: { |
643 | - "<?php echo $LANG['confirm'];?>": function() { |
|
643 | + "<?php echo $LANG['confirm']; ?>": function() { |
|
644 | 644 | $("#div_loading").show(); |
645 | 645 | var $this = $(this); |
646 | 646 | // prepare data to send |
@@ -675,7 +675,7 @@ discard block |
||
675 | 675 | "json" |
676 | 676 | ); |
677 | 677 | }, |
678 | - "<?php echo $LANG['cancel_button'];?>": function() { |
|
678 | + "<?php echo $LANG['cancel_button']; ?>": function() { |
|
679 | 679 | $("#div_loading").hide(); |
680 | 680 | $(this).dialog("close"); |
681 | 681 | } |
@@ -688,9 +688,9 @@ discard block |
||
688 | 688 | autoOpen: false, |
689 | 689 | width: 500, |
690 | 690 | height: 150, |
691 | - title: "<?php echo $LANG['category_in_folders'];?>", |
|
691 | + title: "<?php echo $LANG['category_in_folders']; ?>", |
|
692 | 692 | buttons: { |
693 | - "<?php echo $LANG['confirm'];?>": function() { |
|
693 | + "<?php echo $LANG['confirm']; ?>": function() { |
|
694 | 694 | if ($("#new_field_title").val() != "" && $("#post_id").val() != "") { |
695 | 695 | $("#div_loading").show(); |
696 | 696 | var $this = $(this); |
@@ -712,7 +712,7 @@ discard block |
||
712 | 712 | ); |
713 | 713 | } |
714 | 714 | }, |
715 | - "<?php echo $LANG['cancel_button'];?>": function() { |
|
715 | + "<?php echo $LANG['cancel_button']; ?>": function() { |
|
716 | 716 | $("#div_loading").hide(); |
717 | 717 | $(this).dialog("close"); |
718 | 718 | } |
@@ -722,8 +722,8 @@ discard block |
||
722 | 722 | $("#cat_folders_selection").multiselect({ |
723 | 723 | selectedList: 7, |
724 | 724 | multiple:true, |
725 | - checkAllText: "<?php echo $LANG['check_all_text'];?>", |
|
726 | - uncheckAllText: "<?php echo $LANG['uncheck_all_text'];?>" |
|
725 | + checkAllText: "<?php echo $LANG['check_all_text']; ?>", |
|
726 | + uncheckAllText: "<?php echo $LANG['uncheck_all_text']; ?>" |
|
727 | 727 | }); |
728 | 728 | |
729 | 729 | $("#category_in_folder").dialog({ |
@@ -732,12 +732,12 @@ discard block |
||
732 | 732 | autoOpen: false, |
733 | 733 | width: 400, |
734 | 734 | height: 350, |
735 | - title: "<?php echo $LANG['category_in_folders'];?>", |
|
735 | + title: "<?php echo $LANG['category_in_folders']; ?>", |
|
736 | 736 | open: function() { |
737 | 737 | $("#cat_folders_selection").multiselect('refresh'); |
738 | 738 | }, |
739 | 739 | buttons: { |
740 | - "<?php echo $LANG['confirm'];?>": function() { |
|
740 | + "<?php echo $LANG['confirm']; ?>": function() { |
|
741 | 741 | // get list of selected folders |
742 | 742 | var ids = ""; |
743 | 743 | $("#cat_folders_selection :selected").each(function(i, selected) { |
@@ -767,7 +767,7 @@ discard block |
||
767 | 767 | ); |
768 | 768 | } |
769 | 769 | }, |
770 | - "<?php echo $LANG['cancel_button'];?>": function() { |
|
770 | + "<?php echo $LANG['cancel_button']; ?>": function() { |
|
771 | 771 | $("#div_loading").hide(); |
772 | 772 | $(this).dialog("close"); |
773 | 773 | } |
@@ -780,12 +780,12 @@ discard block |
||
780 | 780 | autoOpen: false, |
781 | 781 | width:250, |
782 | 782 | height:150, |
783 | - title: "<?php echo $LANG['admin_action_db_restore_key'];?>", |
|
783 | + title: "<?php echo $LANG['admin_action_db_restore_key']; ?>", |
|
784 | 784 | buttons: { |
785 | - "<?php echo $LANG['ok'];?>": function() { |
|
785 | + "<?php echo $LANG['ok']; ?>": function() { |
|
786 | 786 | LaunchAdminActions("admin_action_db_restore", $("#restore_bck_fileObj").val()+"&"+$("#restore_bck_encryption_key").val()); |
787 | 787 | }, |
788 | - "<?php echo $LANG['cancel_button'];?>'": function() { |
|
788 | + "<?php echo $LANG['cancel_button']; ?>'": function() { |
|
789 | 789 | $(this).dialog("close"); |
790 | 790 | } |
791 | 791 | } |
@@ -911,11 +911,11 @@ discard block |
||
911 | 911 | $.post("sources/admin.queries.php", |
912 | 912 | { |
913 | 913 | type : "is_backup_table_existing", |
914 | - key : "<?php echo $_SESSION['key'];?>" |
|
914 | + key : "<?php echo $_SESSION['key']; ?>" |
|
915 | 915 | }, |
916 | 916 | function(data) { |
917 | 917 | if (data === "1") { |
918 | - $("#changeMainSaltKey_message").show().html('<?php echo addslashes($LANG['previous_backup_exists']);?> <b><a href="#" id="but_bck_restore"><?php echo $LANG['yes'];?></a></b><br /><?php echo $LANG['previous_backup_exists_delete'];?> <b><a href="#" id="but_bck_delete"><?php echo $LANG['yes'];?></a></b>'); |
|
918 | + $("#changeMainSaltKey_message").show().html('<?php echo addslashes($LANG['previous_backup_exists']); ?> <b><a href="#" id="but_bck_restore"><?php echo $LANG['yes']; ?></a></b><br /><?php echo $LANG['previous_backup_exists_delete']; ?> <b><a href="#" id="but_bck_delete"><?php echo $LANG['yes']; ?></a></b>'); |
|
919 | 919 | |
920 | 920 | // Restore the backup |
921 | 921 | $("#but_bck_restore").click(function(e) { |
@@ -924,13 +924,13 @@ discard block |
||
924 | 924 | |
925 | 925 | // Delete the backup |
926 | 926 | $("#but_bck_delete").click(function(e) { |
927 | - if (confirm("<?php echo $LANG['wipe_backup_data'];?>")) { |
|
928 | - $("#changeMainSaltKey_message").append('<div style="margin-top:5px;"><i class="fa fa-cog fa-spin fa-lg"></i> <?php echo addslashes($LANG['please_wait']);?>...</div>') |
|
927 | + if (confirm("<?php echo $LANG['wipe_backup_data']; ?>")) { |
|
928 | + $("#changeMainSaltKey_message").append('<div style="margin-top:5px;"><i class="fa fa-cog fa-spin fa-lg"></i> <?php echo addslashes($LANG['please_wait']); ?>...</div>') |
|
929 | 929 | $.post( |
930 | 930 | "sources/admin.queries.php", |
931 | 931 | { |
932 | 932 | type : "admin_action_change_salt_key___delete_backup", |
933 | - key : "<?php echo $_SESSION['key'];?>" |
|
933 | + key : "<?php echo $_SESSION['key']; ?>" |
|
934 | 934 | }, |
935 | 935 | function(data) { |
936 | 936 | $("#changeMainSaltKey_message").html('').hide(); |
@@ -995,9 +995,9 @@ discard block |
||
995 | 995 | // show to user |
996 | 996 | if (data[0].error === ""){ |
997 | 997 | if (encrypted_data === "1") { |
998 | - $("#encryt_data_"+id).html('<span class="fa-stack" title="<?php echo $LANG['not_encrypted_data'];?>" onclick="changeEncrypMode(\''+id+'\', \'0\')"><i class="fa fa-key fa-stack-1x"></i><i class="fa fa-ban fa-stack-1x fa-lg" style="color:red;"></i></span>'); |
|
998 | + $("#encryt_data_"+id).html('<span class="fa-stack" title="<?php echo $LANG['not_encrypted_data']; ?>" onclick="changeEncrypMode(\''+id+'\', \'0\')"><i class="fa fa-key fa-stack-1x"></i><i class="fa fa-ban fa-stack-1x fa-lg" style="color:red;"></i></span>'); |
|
999 | 999 | } else { |
1000 | - $("#encryt_data_"+id).html('<i class="fa fa-key tip" title="<?php echo $LANG['encrypted_data'];?>" onclick="changeEncrypMode(\''+id+'\', \'1\')"></i>'); |
|
1000 | + $("#encryt_data_"+id).html('<i class="fa fa-key tip" title="<?php echo $LANG['encrypted_data']; ?>" onclick="changeEncrypMode(\''+id+'\', \'1\')"></i>'); |
|
1001 | 1001 | } |
1002 | 1002 | } |
1003 | 1003 | $("#div_loading").hide(); |
@@ -21,7 +21,7 @@ discard block |
||
21 | 21 | //<![CDATA[ |
22 | 22 | function aes_decrypt(text) |
23 | 23 | { |
24 | - return Aes.Ctr.decrypt(text, "<?php echo $_SESSION['key'];?>", 256); |
|
24 | + return Aes.Ctr.decrypt(text, "<?php echo $_SESSION['key']; ?>", 256); |
|
25 | 25 | } |
26 | 26 | |
27 | 27 | /* |
@@ -38,10 +38,10 @@ discard block |
||
38 | 38 | "sources/items.queries.php", |
39 | 39 | { |
40 | 40 | type : "refresh_visible_folders", |
41 | - key : "<?php echo $_SESSION['key'];?>" |
|
41 | + key : "<?php echo $_SESSION['key']; ?>" |
|
42 | 42 | }, |
43 | 43 | function(data) { |
44 | - data = prepareExchangedData(data , "decode", "<?php echo $_SESSION['key'];?>"); |
|
44 | + data = prepareExchangedData(data , "decode", "<?php echo $_SESSION['key']; ?>"); |
|
45 | 45 | $("#copy_in_folder").find('option').remove().end().append(data.selectFullVisibleFoldersOptions); |
46 | 46 | $('#div_copy_item_to_folder').dialog('open'); |
47 | 47 | } |
@@ -55,9 +55,9 @@ discard block |
||
55 | 55 | autoOpen: false, |
56 | 56 | width: 400, |
57 | 57 | height: 200, |
58 | - title: "<?php echo $LANG['item_menu_copy_elem'];?>", |
|
58 | + title: "<?php echo $LANG['item_menu_copy_elem']; ?>", |
|
59 | 59 | buttons: { |
60 | - "<?php echo $LANG['ok'];?>": function() { |
|
60 | + "<?php echo $LANG['ok']; ?>": function() { |
|
61 | 61 | //Send query |
62 | 62 | $.post( |
63 | 63 | "sources/items.queries.php", |
@@ -65,7 +65,7 @@ discard block |
||
65 | 65 | type : "copy_item", |
66 | 66 | item_id : $('#id_selected_item').val(), |
67 | 67 | folder_id : $('#copy_in_folder').val(), |
68 | - key : "<?php echo $_SESSION['key'];?>" |
|
68 | + key : "<?php echo $_SESSION['key']; ?>" |
|
69 | 69 | }, |
70 | 70 | function(data) { |
71 | 71 | //check if format error |
@@ -74,7 +74,7 @@ discard block |
||
74 | 74 | } |
75 | 75 | //if OK |
76 | 76 | if (data[0].status == "ok") { |
77 | - $("#div_dialog_message_text").html("<?php echo $LANG['alert_message_done'];?>"); |
|
77 | + $("#div_dialog_message_text").html("<?php echo $LANG['alert_message_done']; ?>"); |
|
78 | 78 | $("#div_dialog_message").dialog('open'); |
79 | 79 | $("#div_copy_item_to_folder").dialog('close'); |
80 | 80 | } |
@@ -82,7 +82,7 @@ discard block |
||
82 | 82 | "json" |
83 | 83 | ); |
84 | 84 | }, |
85 | - "<?php echo $LANG['cancel_button'];?>": function() { |
|
85 | + "<?php echo $LANG['cancel_button']; ?>": function() { |
|
86 | 86 | $("#copy_item_to_folder_show_error").html("").hide(); |
87 | 87 | $(this).dialog('close'); |
88 | 88 | } |
@@ -105,10 +105,10 @@ discard block |
||
105 | 105 | autoOpen: false, |
106 | 106 | width: 450, |
107 | 107 | height: 220, |
108 | - title: "<?php echo $LANG['see_item_title'];?>", |
|
108 | + title: "<?php echo $LANG['see_item_title']; ?>", |
|
109 | 109 | open: |
110 | 110 | function(event, ui) { |
111 | - $("#div_item_data_show_error").html("<?php echo $LANG['admin_info_loading'];?>").show(); |
|
111 | + $("#div_item_data_show_error").html("<?php echo $LANG['admin_info_loading']; ?>").show(); |
|
112 | 112 | $.post( |
113 | 113 | "sources/items.queries.php", |
114 | 114 | { |
@@ -117,25 +117,25 @@ discard block |
||
117 | 117 | salt_key_required : $('#personalItem').val(), |
118 | 118 | salt_key_set : $('#personal_sk_set').val(), |
119 | 119 | page : "find", |
120 | - key : "<?php echo $_SESSION['key'];?>" |
|
120 | + key : "<?php echo $_SESSION['key']; ?>" |
|
121 | 121 | }, |
122 | 122 | function(data) { |
123 | 123 | //decrypt data |
124 | - data = prepareExchangedData(data, "decode", "<?php echo $_SESSION['key'];?>"); |
|
124 | + data = prepareExchangedData(data, "decode", "<?php echo $_SESSION['key']; ?>"); |
|
125 | 125 | var return_html = ""; |
126 | 126 | if (data.show_detail_option != "0" || data.show_details == 0) { |
127 | 127 | //item expired |
128 | - return_html = "<?php echo $LANG['not_allowed_to_see_pw_is_expired'];?>"; |
|
128 | + return_html = "<?php echo $LANG['not_allowed_to_see_pw_is_expired']; ?>"; |
|
129 | 129 | } else if (data.show_details == "0") { |
130 | 130 | //Admin cannot see Item |
131 | - return_html = "<?php echo $LANG['not_allowed_to_see_pw'];?>"; |
|
131 | + return_html = "<?php echo $LANG['not_allowed_to_see_pw']; ?>"; |
|
132 | 132 | } else { |
133 | 133 | return_html = "<table>"+ |
134 | - "<tr><td valign='top' class='td_title'><span class='ui-icon ui-icon-carat-1-e' style='float: left; margin-right: .3em;'> </span><?php echo $LANG['label'];?> :</td><td style='font-style:italic;display:inline;'>"+data.label+"</td></tr>"+ |
|
135 | - "<tr><td valign='top' class='td_title'><span class='ui-icon ui-icon-carat-1-e' style='float: left; margin-right: .3em;'> </span><?php echo $LANG['description'];?> :</td><td style='font-style:italic;display:inline;'>"+data.description+"</td></tr>"+ |
|
136 | - "<tr><td valign='top' class='td_title'><span class='ui-icon ui-icon-carat-1-e' style='float: left; margin-right: .3em;'> </span><?php echo $LANG['pw'];?> :</td><td style='font-style:italic;display:inline;'>"+unsanitizeString(data.pw)+"</td></tr>"+ |
|
137 | - "<tr><td valign='top' class='td_title'><span class='ui-icon ui-icon-carat-1-e' style='float: left; margin-right: .3em;'> </span><?php echo $LANG['index_login'];?> :</td><td style='font-style:italic;display:inline;'>"+data.login+"</td></tr>"+ |
|
138 | - "<tr><td valign='top' class='td_title'><span class='ui-icon ui-icon-carat-1-e' style='float: left; margin-right: .3em;'> </span><?php echo $LANG['url'];?> :</td><td style='font-style:italic;display:inline;'>"+data.url+"</td></tr>"+ |
|
134 | + "<tr><td valign='top' class='td_title'><span class='ui-icon ui-icon-carat-1-e' style='float: left; margin-right: .3em;'> </span><?php echo $LANG['label']; ?> :</td><td style='font-style:italic;display:inline;'>"+data.label+"</td></tr>"+ |
|
135 | + "<tr><td valign='top' class='td_title'><span class='ui-icon ui-icon-carat-1-e' style='float: left; margin-right: .3em;'> </span><?php echo $LANG['description']; ?> :</td><td style='font-style:italic;display:inline;'>"+data.description+"</td></tr>"+ |
|
136 | + "<tr><td valign='top' class='td_title'><span class='ui-icon ui-icon-carat-1-e' style='float: left; margin-right: .3em;'> </span><?php echo $LANG['pw']; ?> :</td><td style='font-style:italic;display:inline;'>"+unsanitizeString(data.pw)+"</td></tr>"+ |
|
137 | + "<tr><td valign='top' class='td_title'><span class='ui-icon ui-icon-carat-1-e' style='float: left; margin-right: .3em;'> </span><?php echo $LANG['index_login']; ?> :</td><td style='font-style:italic;display:inline;'>"+data.login+"</td></tr>"+ |
|
138 | + "<tr><td valign='top' class='td_title'><span class='ui-icon ui-icon-carat-1-e' style='float: left; margin-right: .3em;'> </span><?php echo $LANG['url']; ?> :</td><td style='font-style:italic;display:inline;'>"+data.url+"</td></tr>"+ |
|
139 | 139 | "</table>"; |
140 | 140 | } |
141 | 141 | $("#div_item_data_show_error").html("").hide(); |
@@ -150,7 +150,7 @@ discard block |
||
150 | 150 | } |
151 | 151 | , |
152 | 152 | buttons: { |
153 | - "<?php echo $LANG['ok'];?>": function() { |
|
153 | + "<?php echo $LANG['ok']; ?>": function() { |
|
154 | 154 | $(this).dialog('close'); |
155 | 155 | } |
156 | 156 | } |
@@ -166,7 +166,7 @@ discard block |
||
166 | 166 | "sAjaxSource": "sources/find.queries.php", |
167 | 167 | "bJQueryUI": true, |
168 | 168 | "oLanguage": { |
169 | - "sUrl": "includes/language/datatables.<?php echo $_SESSION['user_language'];?>.txt" |
|
169 | + "sUrl": "includes/language/datatables.<?php echo $_SESSION['user_language']; ?>.txt" |
|
170 | 170 | }, |
171 | 171 | "fnInitComplete": function() { |
172 | 172 | $("#find_page input").focus(); |
@@ -194,7 +194,7 @@ discard block |
||
194 | 194 | autoOpen: false, |
195 | 195 | width: 500, |
196 | 196 | height: 400, |
197 | - title: "<?php echo $LANG['mass_operation'];?>", |
|
197 | + title: "<?php echo $LANG['mass_operation']; ?>", |
|
198 | 198 | open: function() { |
199 | 199 | var html = sel_items = sel_items_txt = item_id = ''; |
200 | 200 | |
@@ -213,7 +213,7 @@ discard block |
||
213 | 213 | |
214 | 214 | // prepare display |
215 | 215 | if ($("#div_mass_op").data('action') === "move") { |
216 | - html = '<?php echo $LANG['you_decided_to_move_items'];?>: ' + |
|
216 | + html = '<?php echo $LANG['you_decided_to_move_items']; ?>: ' + |
|
217 | 217 | '<div><ul>' + sel_items_txt + '</ul></div>'; |
218 | 218 | var folder_options = ''; |
219 | 219 | |
@@ -222,7 +222,7 @@ discard block |
||
222 | 222 | "sources/folders.queries.php", |
223 | 223 | { |
224 | 224 | type : "get_list_of_folders", |
225 | - key : "<?php echo $_SESSION['key'];?>" |
|
225 | + key : "<?php echo $_SESSION['key']; ?>" |
|
226 | 226 | }, |
227 | 227 | function(data) { |
228 | 228 | $("#div_loading").hide(); |
@@ -235,7 +235,7 @@ discard block |
||
235 | 235 | } |
236 | 236 | |
237 | 237 | // destination folder |
238 | - html += '<div style=""><?php echo $LANG['import_keepass_to_folder'];?>: ' + |
|
238 | + html += '<div style=""><?php echo $LANG['import_keepass_to_folder']; ?>: ' + |
|
239 | 239 | '<select id="mass_move_destination_folder_id">' + data[0].list_folders + '</select>' + |
240 | 240 | '</div>'; |
241 | 241 | |
@@ -245,19 +245,19 @@ discard block |
||
245 | 245 | "json" |
246 | 246 | ); |
247 | 247 | } else if ($("#div_mass_op").data('action') === "delete") { |
248 | - html = '<?php echo $LANG['you_decided_to_delete_items'];?>: ' + |
|
248 | + html = '<?php echo $LANG['you_decided_to_delete_items']; ?>: ' + |
|
249 | 249 | '<div><ul>' + sel_items_txt + '</ul></div>' + |
250 | - '<div style="padding:10px;" class="ui-corner-all ui-state-error"><span class="fa fa-warning fa-lg"></span> <?php echo $LANG['confirm_deletion'];?></div>'; |
|
250 | + '<div style="padding:10px;" class="ui-corner-all ui-state-error"><span class="fa fa-warning fa-lg"></span> <?php echo $LANG['confirm_deletion']; ?></div>'; |
|
251 | 251 | |
252 | 252 | $("#div_mass_html").html(html); |
253 | 253 | } |
254 | 254 | |
255 | 255 | }, |
256 | 256 | buttons: { |
257 | - "<?php echo $LANG['ok'];?>": function() { |
|
257 | + "<?php echo $LANG['ok']; ?>": function() { |
|
258 | 258 | $("#div_mass_op_msg") |
259 | 259 | .addClass("ui-state-highlight") |
260 | - .html('<span class="fa fa-cog fa-spin fa-lg"></span> <?php echo $LANG['please_wait'];?>') |
|
260 | + .html('<span class="fa fa-cog fa-spin fa-lg"></span> <?php echo $LANG['please_wait']; ?>') |
|
261 | 261 | .show(); |
262 | 262 | |
263 | 263 | var sel_items = ''; |
@@ -270,7 +270,7 @@ discard block |
||
270 | 270 | if (sel_items === "") { |
271 | 271 | $("#div_mass_op_msg") |
272 | 272 | .addClass("ui-state-error") |
273 | - .html('<span class="fa fa-warning fa-lg"></span> <?php echo $LANG['must_select_items'];?>') |
|
273 | + .html('<span class="fa fa-warning fa-lg"></span> <?php echo $LANG['must_select_items']; ?>') |
|
274 | 274 | .show().delay(2000).fadeOut(1000); |
275 | 275 | return false; |
276 | 276 | } |
@@ -285,7 +285,7 @@ discard block |
||
285 | 285 | type : "mass_move_items", |
286 | 286 | item_ids : sel_items, |
287 | 287 | folder_id : $("#mass_move_destination_folder_id").val(), |
288 | - key : "<?php echo $_SESSION['key'];?>" |
|
288 | + key : "<?php echo $_SESSION['key']; ?>" |
|
289 | 289 | }, |
290 | 290 | function(data) { |
291 | 291 | //check if format error |
@@ -297,7 +297,7 @@ discard block |
||
297 | 297 | //reload search |
298 | 298 | oTable.api().ajax.reload(); |
299 | 299 | |
300 | - $("#main_info_box_text").html("<?php echo $LANG['alert_message_done'];?>"); |
|
300 | + $("#main_info_box_text").html("<?php echo $LANG['alert_message_done']; ?>"); |
|
301 | 301 | $("#main_info_box").show().position({ |
302 | 302 | my: "center", |
303 | 303 | at: "center top+75", |
@@ -320,7 +320,7 @@ discard block |
||
320 | 320 | { |
321 | 321 | type : "mass_delete_items", |
322 | 322 | item_ids : sel_items, |
323 | - key : "<?php echo $_SESSION['key'];?>" |
|
323 | + key : "<?php echo $_SESSION['key']; ?>" |
|
324 | 324 | }, |
325 | 325 | function(data) { |
326 | 326 | //check if format error |
@@ -332,7 +332,7 @@ discard block |
||
332 | 332 | //reload search |
333 | 333 | oTable.api().ajax.reload(); |
334 | 334 | |
335 | - $("#main_info_box_text").html("<?php echo $LANG['alert_message_done'];?>"); |
|
335 | + $("#main_info_box_text").html("<?php echo $LANG['alert_message_done']; ?>"); |
|
336 | 336 | $("#main_info_box").show().position({ |
337 | 337 | my: "center", |
338 | 338 | at: "center top+75", |
@@ -348,7 +348,7 @@ discard block |
||
348 | 348 | ); |
349 | 349 | } |
350 | 350 | }, |
351 | - "<?php echo $LANG['cancel_button'];?>": function() { |
|
351 | + "<?php echo $LANG['cancel_button']; ?>": function() { |
|
352 | 352 | $(this).dialog('close'); |
353 | 353 | } |
354 | 354 | } |
@@ -167,7 +167,7 @@ discard block |
||
167 | 167 | $(function() { |
168 | 168 | $("#tabs").tabs({ |
169 | 169 | beforeLoad: function( event, ui ) { |
170 | - ui.panel.html('<div id="loader_tab"><i class="fa fa-cog fa-spin"></i> <?php echo $LANG['loading'];?>...</div>') |
|
170 | + ui.panel.html('<div id="loader_tab"><i class="fa fa-cog fa-spin"></i> <?php echo $LANG['loading']; ?>...</div>') |
|
171 | 171 | }, |
172 | 172 | load: function( event, ui ) { |
173 | 173 | $("#loader_tab").remove(); |
@@ -193,7 +193,7 @@ discard block |
||
193 | 193 | autoOpen: false, |
194 | 194 | width: 400, |
195 | 195 | height: 150, |
196 | - title: "<?php echo $LANG['please_confirm'];?>", |
|
196 | + title: "<?php echo $LANG['please_confirm']; ?>", |
|
197 | 197 | open : function() { |
198 | 198 | // check if one is ticked |
199 | 199 | var list_i = ""; |
@@ -213,13 +213,13 @@ discard block |
||
213 | 213 | |
214 | 214 | // confirm? |
215 | 215 | if ($("#tab2_action").val() == "restoration") { |
216 | - $("#tab2_dialog_html").html("<?php echo $LANG['views_confirm_restoration'];?>"); |
|
216 | + $("#tab2_dialog_html").html("<?php echo $LANG['views_confirm_restoration']; ?>"); |
|
217 | 217 | } else if ($("#tab2_action").val() == "deletion") { |
218 | - $("#tab2_dialog_html").html("<?php echo $LANG['views_confirm_items_deletion'];?>"); |
|
218 | + $("#tab2_dialog_html").html("<?php echo $LANG['views_confirm_items_deletion']; ?>"); |
|
219 | 219 | } |
220 | 220 | }, |
221 | 221 | buttons: { |
222 | - "<?php echo $LANG['confirm'];?>": function() { |
|
222 | + "<?php echo $LANG['confirm']; ?>": function() { |
|
223 | 223 | LoadingPage(); |
224 | 224 | var list_i = ""; |
225 | 225 | $(".cb_deleted_item:checked").each(function() { |
@@ -262,7 +262,7 @@ discard block |
||
262 | 262 | ); |
263 | 263 | } |
264 | 264 | }, |
265 | - "<?php echo $LANG['cancel_button'];?>": function() { |
|
265 | + "<?php echo $LANG['cancel_button']; ?>": function() { |
|
266 | 266 | $(this).dialog("close"); |
267 | 267 | } |
268 | 268 | } |
@@ -114,7 +114,7 @@ discard block |
||
114 | 114 | if (isset($_SESSION['last_pw_change']) && !empty($_SESSION['last_pw_change'])) { |
115 | 115 | echo ' |
116 | 116 | <div style="margin-bottom:6px;"> |
117 | - <i class="fa fa-calendar fa-fw fa-lg"></i> '. $LANG['index_last_pw_change'].' ', isset($_SESSION['settings']['date_format']) ? date($_SESSION['settings']['date_format'], $_SESSION['last_pw_change']) : (isset($_SESSION['last_pw_change']) ? date("d/m/Y", $_SESSION['last_pw_change']) : "-"). '. ', $_SESSION['numDaysBeforePwExpiration'] == "infinite" ? '' : $LANG['index_pw_expiration'].' '.$_SESSION['numDaysBeforePwExpiration'].' '.$LANG['days'].' |
|
117 | + <i class="fa fa-calendar fa-fw fa-lg"></i> '. $LANG['index_last_pw_change'].' ', isset($_SESSION['settings']['date_format']) ? date($_SESSION['settings']['date_format'], $_SESSION['last_pw_change']) : (isset($_SESSION['last_pw_change']) ? date("d/m/Y", $_SESSION['last_pw_change']) : "-").'. ', $_SESSION['numDaysBeforePwExpiration'] == "infinite" ? '' : $LANG['index_pw_expiration'].' '.$_SESSION['numDaysBeforePwExpiration'].' '.$LANG['days'].' |
|
118 | 118 | </div>'; |
119 | 119 | } |
120 | 120 | echo ' |
@@ -217,7 +217,7 @@ discard block |
||
217 | 217 | $(".tip").tooltipster({multiple: true}); |
218 | 218 | // password |
219 | 219 | $("#but_change_password").click(function() { |
220 | - $("#change_pwd_complexPw").html("<?php echo $LANG['complex_asked'];?> : <?php echo $_SESSION['settings']['pwComplexity'][$_SESSION['user_pw_complexity']][1];?>"); |
|
220 | + $("#change_pwd_complexPw").html("<?php echo $LANG['complex_asked']; ?> : <?php echo $_SESSION['settings']['pwComplexity'][$_SESSION['user_pw_complexity']][1]; ?>"); |
|
221 | 221 | $("#change_pwd_error").hide(); |
222 | 222 | $("#div_change_psk, #div_reset_psk").hide(); |
223 | 223 | |
@@ -232,35 +232,35 @@ discard block |
||
232 | 232 | $("#new_pw").simplePassMeter({ |
233 | 233 | "requirements": {}, |
234 | 234 | "container": "#pw_strength", |
235 | - "defaultText" : "<?php echo $LANG['index_pw_level_txt'];?>", |
|
235 | + "defaultText" : "<?php echo $LANG['index_pw_level_txt']; ?>", |
|
236 | 236 | "ratings": [ |
237 | 237 | {"minScore": 0, |
238 | 238 | "className": "meterFail", |
239 | - "text": "<?php echo $LANG['complex_level0'];?>" |
|
239 | + "text": "<?php echo $LANG['complex_level0']; ?>" |
|
240 | 240 | }, |
241 | 241 | {"minScore": 25, |
242 | 242 | "className": "meterWarn", |
243 | - "text": "<?php echo $LANG['complex_level1'];?>" |
|
243 | + "text": "<?php echo $LANG['complex_level1']; ?>" |
|
244 | 244 | }, |
245 | 245 | {"minScore": 50, |
246 | 246 | "className": "meterWarn", |
247 | - "text": "<?php echo $LANG['complex_level2'];?>" |
|
247 | + "text": "<?php echo $LANG['complex_level2']; ?>" |
|
248 | 248 | }, |
249 | 249 | {"minScore": 60, |
250 | 250 | "className": "meterGood", |
251 | - "text": "<?php echo $LANG['complex_level3'];?>" |
|
251 | + "text": "<?php echo $LANG['complex_level3']; ?>" |
|
252 | 252 | }, |
253 | 253 | {"minScore": 70, |
254 | 254 | "className": "meterGood", |
255 | - "text": "<?php echo $LANG['complex_level4'];?>" |
|
255 | + "text": "<?php echo $LANG['complex_level4']; ?>" |
|
256 | 256 | }, |
257 | 257 | {"minScore": 80, |
258 | 258 | "className": "meterExcel", |
259 | - "text": "<?php echo $LANG['complex_level5'];?>" |
|
259 | + "text": "<?php echo $LANG['complex_level5']; ?>" |
|
260 | 260 | }, |
261 | 261 | {"minScore": 90, |
262 | 262 | "className": "meterExcel", |
263 | - "text": "<?php echo $LANG['complex_level6'];?>" |
|
263 | + "text": "<?php echo $LANG['complex_level6']; ?>" |
|
264 | 264 | } |
265 | 265 | ] |
266 | 266 | }); |
@@ -284,32 +284,32 @@ discard block |
||
284 | 284 | type : "change_pw", |
285 | 285 | change_pw_origine : "user_change", |
286 | 286 | complexity : $("#pw_strength_value").val(), |
287 | - data : prepareExchangedData(data, "encode", "<?php echo $_SESSION['key'];?>") |
|
287 | + data : prepareExchangedData(data, "encode", "<?php echo $_SESSION['key']; ?>") |
|
288 | 288 | }, |
289 | 289 | function(data) { |
290 | 290 | if (data[0].error == "already_used") { |
291 | 291 | $("#new_pw, #new_pw2").val(""); |
292 | - $("#change_pwd_error").addClass("ui-state-error ui-corner-all").show().html("<span><?php echo $LANG['pw_used'];?></span>"); |
|
292 | + $("#change_pwd_error").addClass("ui-state-error ui-corner-all").show().html("<span><?php echo $LANG['pw_used']; ?></span>"); |
|
293 | 293 | } else if (data[0].error == "complexity_level_not_reached") { |
294 | 294 | $("#new_pw, #new_pw2").val(""); |
295 | - $("#change_pwd_error").addClass("ui-state-error ui-corner-all").show().html("<span><?php echo $LANG['error_complex_not_enought'];?></span>"); |
|
295 | + $("#change_pwd_error").addClass("ui-state-error ui-corner-all").show().html("<span><?php echo $LANG['error_complex_not_enought']; ?></span>"); |
|
296 | 296 | } else { |
297 | 297 | $("#div_change_password").hide(); |
298 | 298 | $("#dialog_user_profil").dialog("option", "height", 450); |
299 | 299 | $("#new_pw, #new_pw2").val(""); |
300 | 300 | } |
301 | 301 | $("#password_change_wait").hide(); |
302 | - $("#profile_info_box").html("<?php echo $LANG['alert_message_done'];?>").show(); |
|
302 | + $("#profile_info_box").html("<?php echo $LANG['alert_message_done']; ?>").show(); |
|
303 | 303 | setTimeout(function(){$("#profile_info_box").effect( "fade", "slow" );}, 1000); |
304 | 304 | }, |
305 | 305 | "json" |
306 | 306 | ); |
307 | 307 | } else { |
308 | - $("#change_pwd_error").addClass("ui-state-error ui-corner-all").show().html("<?php echo $LANG['error_complex_not_enought'];?>"); |
|
308 | + $("#change_pwd_error").addClass("ui-state-error ui-corner-all").show().html("<?php echo $LANG['error_complex_not_enought']; ?>"); |
|
309 | 309 | setTimeout(function(){$("#change_pwd_error").effect( "fade", "slow" );}, 1000); |
310 | 310 | } |
311 | 311 | } else { |
312 | - $("#change_pwd_error").addClass("ui-state-error ui-corner-all").show().html("<?php echo $LANG['index_pw_error_identical'];?>"); |
|
312 | + $("#change_pwd_error").addClass("ui-state-error ui-corner-all").show().html("<?php echo $LANG['index_pw_error_identical']; ?>"); |
|
313 | 313 | setTimeout(function(){$("#change_pwd_error").effect( "fade", "slow" );}, 1000); |
314 | 314 | } |
315 | 315 | }); |
@@ -362,8 +362,8 @@ discard block |
||
362 | 362 | var tmp = Math.random().toString(36).substring(7); |
363 | 363 | |
364 | 364 | up.settings.multipart_params = { |
365 | - "PHPSESSID":"<?php echo $_SESSION['user_id'];?>", |
|
366 | - "newFileName":"user<?php echo $_SESSION['user_id'];?>"+tmp, |
|
365 | + "PHPSESSID":"<?php echo $_SESSION['user_id']; ?>", |
|
366 | + "newFileName":"user<?php echo $_SESSION['user_id']; ?>"+tmp, |
|
367 | 367 | "type_upload":"upload_profile_photo", |
368 | 368 | "user_token": $("#profile_user_token").val() |
369 | 369 | }; |
@@ -373,7 +373,7 @@ discard block |
||
373 | 373 | |
374 | 374 | // Show runtime status |
375 | 375 | uploader_photo.bind("Init", function(up, params) { |
376 | - $("#plupload_runtime2").html("<?php echo $LANG['runtime_upload'];?> " + params.runtime).removeClass('ui-state-error'); |
|
376 | + $("#plupload_runtime2").html("<?php echo $LANG['runtime_upload']; ?> " + params.runtime).removeClass('ui-state-error'); |
|
377 | 377 | $("#upload_enabled2").val("1"); |
378 | 378 | }); |
379 | 379 | |
@@ -421,7 +421,7 @@ discard block |
||
421 | 421 | }); |
422 | 422 | $(".editable_select").editable("sources/users.queries.php", { |
423 | 423 | indicator : "<img src=\'includes/images/loading.gif\' />", |
424 | - data : " {'full':'<?php echo $LANG['full'];?>','sequential':'<?php echo $LANG['sequential'];?>', 'selected':'<?php echo $_SESSION['user_settings']['treeloadstrategy'];?>'}", |
|
424 | + data : " {'full':'<?php echo $LANG['full']; ?>','sequential':'<?php echo $LANG['sequential']; ?>', 'selected':'<?php echo $_SESSION['user_settings']['treeloadstrategy']; ?>'}", |
|
425 | 425 | type : 'select', |
426 | 426 | select : true, |
427 | 427 | onblur : "cancel", |
@@ -431,7 +431,7 @@ discard block |
||
431 | 431 | }); |
432 | 432 | $(".editable_language").editable("sources/users.queries.php", { |
433 | 433 | indicator : "<img src=\'includes/images/loading.gif\' />", |
434 | - data : '<?php print json_encode($arraFlags);?>', |
|
434 | + data : '<?php print json_encode($arraFlags); ?>', |
|
435 | 435 | type : 'select', |
436 | 436 | select : true, |
437 | 437 | onblur : "cancel", |
@@ -441,7 +441,7 @@ discard block |
||
441 | 441 | }); |
442 | 442 | $(".editable_timezone").editable("sources/users.queries.php", { |
443 | 443 | indicator : "<img src=\'includes/images/loading.gif\' />", |
444 | - data : '<?php print json_encode($arrayTimezones);?>', |
|
444 | + data : '<?php print json_encode($arrayTimezones); ?>', |
|
445 | 445 | type : 'select', |
446 | 446 | select : true, |
447 | 447 | onblur : "cancel", |
@@ -451,7 +451,7 @@ discard block |
||
451 | 451 | }); |
452 | 452 | $(".editable_yesno").editable("sources/users.queries.php", { |
453 | 453 | indicator : "<img src=\'includes/images/loading.gif\' />", |
454 | - data : '{"O":"<?php echo $LANG['no'];?>","1":"<?php echo $LANG['yes'];?>"}', |
|
454 | + data : '{"O":"<?php echo $LANG['no']; ?>","1":"<?php echo $LANG['yes']; ?>"}', |
|
455 | 455 | type : 'select', |
456 | 456 | select : true, |
457 | 457 | onblur : "cancel", |
@@ -472,7 +472,7 @@ discard block |
||
472 | 472 | |
473 | 473 | // prepare fields |
474 | 474 | $("#new_personal_saltkey").val(""); |
475 | - $("#old_personal_saltkey").val("<?php echo addslashes(str_replace(""", '"', @$_SESSION['my_sk']));?>"); |
|
475 | + $("#old_personal_saltkey").val("<?php echo addslashes(str_replace(""", '"', @$_SESSION['my_sk'])); ?>"); |
|
476 | 476 | |
477 | 477 | $("#div_change_psk").show(); |
478 | 478 | $("#dialog_user_profil").dialog("option", "height", 600); |
@@ -484,7 +484,7 @@ discard block |
||
484 | 484 | |
485 | 485 | if ($("#new_personal_saltkey").val() === "" || $("#new_personal_saltkey").val() === "") { |
486 | 486 | $("#psk_change_wait").hide(); |
487 | - $("#div_change_psk").before('<div id="tmp_msg" class="ui-widget ui-state-error ui-corner-all" style="margin-bottom:3px; padding:3px;"><?php echo addslashes($LANG['home_personal_saltkey_label']);?></div>'); |
|
487 | + $("#div_change_psk").before('<div id="tmp_msg" class="ui-widget ui-state-error ui-corner-all" style="margin-bottom:3px; padding:3px;"><?php echo addslashes($LANG['home_personal_saltkey_label']); ?></div>'); |
|
488 | 488 | |
489 | 489 | setTimeout(function(){$("#tmp_msg").effect( "fade", "slow" );$("#tmp_msg").remove();}, 1000); |
490 | 490 | return false; |
@@ -499,11 +499,11 @@ discard block |
||
499 | 499 | "sources/main.queries.php", |
500 | 500 | { |
501 | 501 | type : "change_personal_saltkey", |
502 | - data_to_share : prepareExchangedData(data_to_share, "encode", "<?php echo $_SESSION['key'];?>"), |
|
503 | - key : "<?php echo $_SESSION['key'];?>" |
|
502 | + data_to_share : prepareExchangedData(data_to_share, "encode", "<?php echo $_SESSION['key']; ?>"), |
|
503 | + key : "<?php echo $_SESSION['key']; ?>" |
|
504 | 504 | }, |
505 | 505 | function(data) { |
506 | - data = prepareExchangedData(data , "decode", "<?php echo $_SESSION['key'];?>"); |
|
506 | + data = prepareExchangedData(data , "decode", "<?php echo $_SESSION['key']; ?>"); |
|
507 | 507 | if (data.error == "no") { |
508 | 508 | changePersonalSaltKey(data_to_share, data.list, data.nb_total); |
509 | 509 | } else { |
@@ -538,12 +538,12 @@ discard block |
||
538 | 538 | "sources/main.queries.php", |
539 | 539 | { |
540 | 540 | type : "reset_personal_saltkey", |
541 | - data_to_share : prepareExchangedData(data_to_share, "encode", "<?php echo $_SESSION['key'];?>"), |
|
542 | - key : "<?php echo $_SESSION['key'];?>" |
|
541 | + data_to_share : prepareExchangedData(data_to_share, "encode", "<?php echo $_SESSION['key']; ?>"), |
|
542 | + key : "<?php echo $_SESSION['key']; ?>" |
|
543 | 543 | }, |
544 | 544 | function(data) { |
545 | 545 | $("#psk_reset_wait").hide(); |
546 | - $("#button_reset_psk").after('<div id="reset_temp"><?php echo $LANG['alert_message_done'];?></div>'); |
|
546 | + $("#button_reset_psk").after('<div id="reset_temp"><?php echo $LANG['alert_message_done']; ?></div>'); |
|
547 | 547 | setTimeout(function(){$("#div_reset_psk").effect( "fade", "slow" ); $("#reset_temp").remove();}, 1500); |
548 | 548 | } |
549 | 549 | ); |
@@ -571,14 +571,14 @@ discard block |
||
571 | 571 | var regex = new RegExp("^[a-zA-Z0-9.,/#&$@()%*]+$"); |
572 | 572 | var key = event.key; |
573 | 573 | if (!regex.test(key)) { |
574 | - $("#field_warning").html("<?php echo addslashes($LANG['character_not_allowed']);?>").stop(true,true).show().fadeOut(1000); |
|
574 | + $("#field_warning").html("<?php echo addslashes($LANG['character_not_allowed']); ?>").stop(true,true).show().fadeOut(1000); |
|
575 | 575 | event.preventDefault(); |
576 | 576 | return false; |
577 | 577 | } |
578 | 578 | break; |
579 | 579 | } |
580 | 580 | }).bind("paste",function(e){ |
581 | - $("#field_warning").html("<?php echo addslashes($LANG['error_not_allowed_to']);?>").stop(true,true).show().fadeOut(1000); |
|
581 | + $("#field_warning").html("<?php echo addslashes($LANG['error_not_allowed_to']); ?>").stop(true,true).show().fadeOut(1000); |
|
582 | 582 | e.preventDefault(); |
583 | 583 | }); |
584 | 584 | }); |
@@ -603,7 +603,7 @@ discard block |
||
603 | 603 | "sources/main.queries.php", |
604 | 604 | { |
605 | 605 | type : "store_personal_saltkey", |
606 | - data : prepareExchangedData(data, "encode", "<?php echo $_SESSION['key'];?>"), |
|
606 | + data : prepareExchangedData(data, "encode", "<?php echo $_SESSION['key']; ?>"), |
|
607 | 607 | debug : true |
608 | 608 | }, |
609 | 609 | function(data){ |
@@ -617,13 +617,13 @@ discard block |
||
617 | 617 | "sources/utils.queries.php", |
618 | 618 | { |
619 | 619 | type : "reencrypt_personal_pwd", |
620 | - data_to_share : prepareExchangedData(credentials, "encode", "<?php echo $_SESSION['key'];?>"), |
|
620 | + data_to_share : prepareExchangedData(credentials, "encode", "<?php echo $_SESSION['key']; ?>"), |
|
621 | 621 | currentId : currentID, |
622 | - key : "<?php echo $_SESSION['key'];?>" |
|
622 | + key : "<?php echo $_SESSION['key']; ?>" |
|
623 | 623 | }, |
624 | 624 | function(data){ |
625 | 625 | if (currentID == "") { |
626 | - $("#psk_change_wait_info").html("<?php echo $LANG['alert_message_done'];?>"); |
|
626 | + $("#psk_change_wait_info").html("<?php echo $LANG['alert_message_done']; ?>"); |
|
627 | 627 | location.reload(); |
628 | 628 | } else { |
629 | 629 | if (data[0].error == "") { |
@@ -160,7 +160,7 @@ |
||
160 | 160 | |
161 | 161 | // if DUOSecurity enabled then changing PWD is not allowed |
162 | 162 | if (!isset($_SESSION['settings']['duo']) || $_SESSION['settings']['duo'] == 0) { |
163 | - echo ' |
|
163 | + echo ' |
|
164 | 164 | <div id="div_change_password" style="display:none; padding:5px;" class="ui-widget ui-state-default"> |
165 | 165 | <div style="text-align:center;margin:5px;padding:3px;" id="change_pwd_complexPw" class="ui-widget ui-state-active ui-corner-all"></div> |
166 | 166 | <label for="new_pw" class="form_label">'.$LANG['index_new_pw'].' :</label> |
@@ -67,13 +67,13 @@ |
||
67 | 67 | <div class="ui-state-error ui-corner-all error" >'.$LANG['error_not_exists'].'</div>'; |
68 | 68 | } elseif (@$_SESSION['error']['code'] == ERR_SESS_EXPIRED) { |
69 | 69 | echo ' |
70 | - <div class="ui-state-error ui-corner-all error" style="text-align:center;" >'.$LANG['index_session_expired'].'<br /><br /><a href="index.php" />'.$LANG['home'] .'</a></div>'; |
|
70 | + <div class="ui-state-error ui-corner-all error" style="text-align:center;" >'.$LANG['index_session_expired'].'<br /><br /><a href="index.php" />'.$LANG['home'].'</a></div>'; |
|
71 | 71 | } elseif (@$_SESSION['error']['code'] == ERR_NO_MCRYPT) { |
72 | 72 | echo ' |
73 | - <div class="ui-state-error ui-corner-all error" style="text-align:center;" >'.$LANG['error_mcrypt_not_loaded'].'<br /><br /><a href="index.php" />'.$LANG['home'] .'</a></div>'; |
|
73 | + <div class="ui-state-error ui-corner-all error" style="text-align:center;" >'.$LANG['error_mcrypt_not_loaded'].'<br /><br /><a href="index.php" />'.$LANG['home'].'</a></div>'; |
|
74 | 74 | } elseif (@$_SESSION['error']['code'] == ERR_VALID_SESSION) { |
75 | 75 | echo ' |
76 | - <div class="ui-state-error ui-corner-all error" style="text-align:center;" >'.$LANG['error_not_authorized'].'<br /><br /><a href="index.php" />'.$LANG['home'] .'</a></div>'; |
|
76 | + <div class="ui-state-error ui-corner-all error" style="text-align:center;" >'.$LANG['error_not_authorized'].'<br /><br /><a href="index.php" />'.$LANG['home'].'</a></div>'; |
|
77 | 77 | } |
78 | 78 | } |
79 | 79 |
@@ -23,7 +23,7 @@ discard block |
||
23 | 23 | ) { |
24 | 24 | die('Hacking attempt...'); |
25 | 25 | } |
26 | -$_SESSION['settings']['enable_server_password_change'] = 1; |
|
26 | +$_SESSION['settings']['enable_server_password_change'] = 1; |
|
27 | 27 | /* do checks */ |
28 | 28 | require_once $_SESSION['settings']['cpassman_dir'].'/includes/config/include.php'; |
29 | 29 | require_once $_SESSION['settings']['cpassman_dir'].'/sources/checks.php'; |
@@ -136,7 +136,7 @@ discard block |
||
136 | 136 | type : "server_auto_update_password_frequency", |
137 | 137 | id : $('#selected_items').val(), |
138 | 138 | freq : $('#ssh_freq').val(), |
139 | - key : "<?php echo $_SESSION['key'];?>" |
|
139 | + key : "<?php echo $_SESSION['key']; ?>" |
|
140 | 140 | }, |
141 | 141 | function(data) { |
142 | 142 | if (data[0].error != "") { |
@@ -147,7 +147,7 @@ discard block |
||
147 | 147 | .addClass( "ui-state-error" ); |
148 | 148 | } else { |
149 | 149 | $("#cronned_task_error") |
150 | - .html("<?php echo $LANG['alert_message_done'];?>") |
|
150 | + .html("<?php echo $LANG['alert_message_done']; ?>") |
|
151 | 151 | .show() |
152 | 152 | .removeClass( "ui-state-error" ) |
153 | 153 | .addClass( "ui-state-focus" ); |
@@ -161,37 +161,37 @@ discard block |
||
161 | 161 | { |
162 | 162 | // check if new password is set |
163 | 163 | if($("#ausp_pwd").val() == "") { |
164 | - $("#dialog_auto_update_server_pwd_info").html('<i class="fa fa-warning"></i> <?php echo $LANG['error_new_pwd_missing'];?>').show(); |
|
164 | + $("#dialog_auto_update_server_pwd_info").html('<i class="fa fa-warning"></i> <?php echo $LANG['error_new_pwd_missing']; ?>').show(); |
|
165 | 165 | return false; |
166 | 166 | } |
167 | 167 | // check if new password is set |
168 | 168 | if($("#ausp_ssh_root").val() == "" || $("#ausp_ssh_pwd").val() == "") { |
169 | - $("#dialog_auto_update_server_pwd_info").html('<i class="fa fa-warning"></i> <?php echo $LANG['error_ssh_credentials_missing'];?>').show(); |
|
169 | + $("#dialog_auto_update_server_pwd_info").html('<i class="fa fa-warning"></i> <?php echo $LANG['error_ssh_credentials_missing']; ?>').show(); |
|
170 | 170 | return false; |
171 | 171 | } |
172 | 172 | // show progress |
173 | - $("#dialog_auto_update_server_pwd_status").html('<i class="fa fa-cog fa-spin"></i> <?php echo $LANG['please_wait'];?> ... ').attr("class","").show(); |
|
173 | + $("#dialog_auto_update_server_pwd_status").html('<i class="fa fa-cog fa-spin"></i> <?php echo $LANG['please_wait']; ?> ... ').attr("class","").show(); |
|
174 | 174 | $("#dialog_auto_update_server_pwd_info").html("").hide(); |
175 | 175 | //prepare data |
176 | 176 | var data = '{"currentId":"'+$('#selected_items').val() + '", '+ |
177 | 177 | '"new_pwd":"'+$('#ausp_pwd').val()+'", '+ |
178 | 178 | '"ssh_root":"'+$('#ausp_ssh_root').val()+'", '+ |
179 | 179 | '"ssh_pwd":"'+$('#ausp_ssh_pwd').val()+'", '+ |
180 | - '"user_id":"<?php echo $_SESSION['user_id'];?>"}'; |
|
180 | + '"user_id":"<?php echo $_SESSION['user_id']; ?>"}'; |
|
181 | 181 | |
182 | 182 | $.post( |
183 | 183 | "sources/utils.queries.php", |
184 | 184 | { |
185 | 185 | type : "server_auto_update_password", |
186 | - data : prepareExchangedData(data, "encode", "<?php echo $_SESSION['key'];?>"), |
|
187 | - key : "<?php echo $_SESSION['key'];?>" |
|
186 | + data : prepareExchangedData(data, "encode", "<?php echo $_SESSION['key']; ?>"), |
|
187 | + key : "<?php echo $_SESSION['key']; ?>" |
|
188 | 188 | }, |
189 | 189 | function(data) { |
190 | - data = prepareExchangedData(data , "decode", "<?php echo $_SESSION['key'];?>"); |
|
190 | + data = prepareExchangedData(data , "decode", "<?php echo $_SESSION['key']; ?>"); |
|
191 | 191 | //check if format error |
192 | 192 | if (data.error != "") { |
193 | 193 | $("#dialog_auto_update_server_pwd_info").html("Error: "+data.error).show(); |
194 | - $("#dialog_auto_update_server_pwd_status").html("<?php echo $LANG['auto_update_server_password_info'];?>"); |
|
194 | + $("#dialog_auto_update_server_pwd_status").html("<?php echo $LANG['auto_update_server_password_info']; ?>"); |
|
195 | 195 | } else { |
196 | 196 | // tbc |
197 | 197 | $("#dialog_auto_update_server_pwd_status").html("done "+data.text); |
@@ -225,7 +225,7 @@ discard block |
||
225 | 225 | numerals : true |
226 | 226 | }, |
227 | 227 | function(data) { |
228 | - data = prepareExchangedData(data, "decode", "<?php echo $_SESSION['key'];?>"); |
|
228 | + data = prepareExchangedData(data, "decode", "<?php echo $_SESSION['key']; ?>"); |
|
229 | 229 | if (data.error == "true") { |
230 | 230 | $("#dialog_auto_update_server_pwd_info").html(data.error_msg).show(); |
231 | 231 | } else { |
@@ -43,7 +43,7 @@ discard block |
||
43 | 43 | |
44 | 44 | $dbgDuo = fopen("upgrade.log", "w"); |
45 | 45 | $finish = false; |
46 | -$next = ($_POST['nb']+$_POST['start']); |
|
46 | +$next = ($_POST['nb'] + $_POST['start']); |
|
47 | 47 | |
48 | 48 | $dbTmp = mysqli_connect( |
49 | 49 | $_SESSION['server'], |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | decrypt($record['pw']), |
69 | 69 | strlen($record['pw_iv']) |
70 | 70 | ); |
71 | - if (isUTF8($tmpData ) && !empty($tmpData)) { |
|
71 | + if (isUTF8($tmpData) && !empty($tmpData)) { |
|
72 | 72 | $encrypt = cryption_phpCrypt( |
73 | 73 | $tmpData, |
74 | 74 | SALT, |