@@ -159,7 +159,7 @@ |
||
159 | 159 | |
160 | 160 | <label for="edit_parent_id" class="label_cpm">'.$LANG['group_parent'].'</label> |
161 | 161 | <select id="edit_parent_id" class="input_text text ui-widget-content ui-corner-all">'. |
162 | - $droplist.' |
|
162 | + $droplist.' |
|
163 | 163 | </select> |
164 | 164 | |
165 | 165 | <label for="edit_folder_complexite" class="label_cpm">'.$LANG['complex_asked'].'</label> |
@@ -56,9 +56,9 @@ discard block |
||
56 | 56 | if (file_exists($filename)) { |
57 | 57 | //copy some constants from this existing file |
58 | 58 | $settingsFile = file($filename); |
59 | - while (list($key,$val) = each($settingsFile)) { |
|
60 | - if (substr_count($val, 'require_once "')>0 && substr_count($val, 'sk.php')>0) { |
|
61 | - $tmp_skfile = substr($val, 14, strpos($val, '";')-14); |
|
59 | + while (list($key, $val) = each($settingsFile)) { |
|
60 | + if (substr_count($val, 'require_once "') > 0 && substr_count($val, 'sk.php') > 0) { |
|
61 | + $tmp_skfile = substr($val, 14, strpos($val, '";') - 14); |
|
62 | 62 | } |
63 | 63 | } |
64 | 64 | } |
@@ -66,18 +66,18 @@ discard block |
||
66 | 66 | // read SK.PHP file |
67 | 67 | $tmp_akey = $tmp_ikey = $tmp_skey = $tmp_host = ""; |
68 | 68 | $skFile = file($tmp_skfile); |
69 | -while (list($key,$val) = each($skFile)) { |
|
70 | - if (substr_count($val, "@define('AKEY'")>0) { |
|
71 | - $tmp_akey = substr($val, 17, strpos($val, '")')-17); |
|
69 | +while (list($key, $val) = each($skFile)) { |
|
70 | + if (substr_count($val, "@define('AKEY'") > 0) { |
|
71 | + $tmp_akey = substr($val, 17, strpos($val, '")') - 17); |
|
72 | 72 | } else |
73 | - if (substr_count($val, "@define('IKEY'")>0) { |
|
74 | - $tmp_ikey = substr($val, 17, strpos($val, '")')-17); |
|
73 | + if (substr_count($val, "@define('IKEY'") > 0) { |
|
74 | + $tmp_ikey = substr($val, 17, strpos($val, '")') - 17); |
|
75 | 75 | } else |
76 | - if (substr_count($val, "@define('SKEY'")>0) { |
|
77 | - $tmp_skey = substr($val, 17, strpos($val, '")')-17); |
|
76 | + if (substr_count($val, "@define('SKEY'") > 0) { |
|
77 | + $tmp_skey = substr($val, 17, strpos($val, '")') - 17); |
|
78 | 78 | } else |
79 | - if (substr_count($val, "@define('HOST'")>0) { |
|
80 | - $tmp_host = substr($val, 17, strpos($val, '")')-17); |
|
79 | + if (substr_count($val, "@define('HOST'") > 0) { |
|
80 | + $tmp_host = substr($val, 17, strpos($val, '")') - 17); |
|
81 | 81 | } |
82 | 82 | } |
83 | 83 | echo ' |
@@ -35,7 +35,7 @@ discard block |
||
35 | 35 | </tr></thead> |
36 | 36 | <tbody>'; |
37 | 37 | //Get favourites |
38 | - $cpt= 0 ; |
|
38 | + $cpt = 0; |
|
39 | 39 | foreach ($_SESSION['favourites'] as $fav) { |
40 | 40 | if (!empty($fav)) { |
41 | 41 | $data = DB::queryFirstRow( |
@@ -47,7 +47,7 @@ discard block |
||
47 | 47 | ); |
48 | 48 | if (!empty($data['label'])) { |
49 | 49 | echo ' |
50 | - <tr class="ligne'.($cpt%2).'" id="row-'.$data['id'].'"> |
|
50 | + <tr class="ligne'.($cpt % 2).'" id="row-'.$data['id'].'"> |
|
51 | 51 | <td> |
52 | 52 | <i class="fa fa-external-link" onClick="javascript:window.location.href = \'index.php?page=items&group='.$data['id_tree'].'&id='.$data['id'].'\';" style="cursor:pointer; font-size:18px;"></i> |
53 | 53 | |
@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | </td> |
56 | 56 | <td align="left">'.stripslashes($data['label']).'</td> |
57 | 57 | <td align="center">'.stripslashes($data['description']).'</td> |
58 | - <td align="center">',$data['title'] == $_SESSION['user_id']?$_SESSION['login']:$data['title'],'</td> |
|
58 | + <td align="center">',$data['title'] == $_SESSION['user_id'] ? $_SESSION['login'] : $data['title'], '</td> |
|
59 | 59 | </tr>'; |
60 | 60 | $cpt++; |
61 | 61 | } |
@@ -34,7 +34,7 @@ discard block |
||
34 | 34 | { |
35 | 35 | type : "free_item_for_edition", |
36 | 36 | id : id, |
37 | - key : "<?php echo $_SESSION["key"];?>" |
|
37 | + key : "<?php echo $_SESSION["key"]; ?>" |
|
38 | 38 | }, |
39 | 39 | function(data) { |
40 | 40 | oTable1.fnDraw(false); |
@@ -46,7 +46,7 @@ discard block |
||
46 | 46 | { |
47 | 47 | type : "disconnect_user", |
48 | 48 | user_id : id, |
49 | - key : "<?php echo $_SESSION["key"];?>" |
|
49 | + key : "<?php echo $_SESSION["key"]; ?>" |
|
50 | 50 | }, |
51 | 51 | function(data) { |
52 | 52 | oTable2.fnDraw(false); |
@@ -86,7 +86,7 @@ discard block |
||
86 | 86 | "sAjaxSource": "sources/datatable/datatable.item_edition.php", |
87 | 87 | "bJQueryUI": true, |
88 | 88 | "oLanguage": { |
89 | - "sUrl": "includes/language/datatables.<?php echo $_SESSION['user_language'];?>.txt" |
|
89 | + "sUrl": "includes/language/datatables.<?php echo $_SESSION['user_language']; ?>.txt" |
|
90 | 90 | }, |
91 | 91 | "fnInitComplete": function() { |
92 | 92 | $("#items_edited_page input").focus(); |
@@ -102,7 +102,7 @@ discard block |
||
102 | 102 | "sAjaxSource": "sources/datatable/datatable.users_logged.php", |
103 | 103 | "bJQueryUI": true, |
104 | 104 | "oLanguage": { |
105 | - "sUrl": "includes/language/datatables.<?php echo $_SESSION['user_language'];?>.txt" |
|
105 | + "sUrl": "includes/language/datatables.<?php echo $_SESSION['user_language']; ?>.txt" |
|
106 | 106 | }, |
107 | 107 | "fnInitComplete": function() { |
108 | 108 | $("#t_users_logged_page input").focus(); |
@@ -121,14 +121,14 @@ discard block |
||
121 | 121 | autoOpen: false, |
122 | 122 | width: 400, |
123 | 123 | height: 150, |
124 | - title: "<?php echo $LANG["admin_action"];?>", |
|
124 | + title: "<?php echo $LANG["admin_action"]; ?>", |
|
125 | 125 | buttons: { |
126 | - "<?php echo $LANG["ok"];?>": function() { |
|
126 | + "<?php echo $LANG["ok"]; ?>": function() { |
|
127 | 127 | $.post( |
128 | 128 | "sources/users.queries.php", |
129 | 129 | { |
130 | 130 | type : "disconnect_all_users", |
131 | - key : "<?php echo $_SESSION["key"];?>" |
|
131 | + key : "<?php echo $_SESSION["key"]; ?>" |
|
132 | 132 | }, |
133 | 133 | function(data) { |
134 | 134 | oTable2.fnDraw(false); |
@@ -136,14 +136,14 @@ discard block |
||
136 | 136 | } |
137 | 137 | ); |
138 | 138 | }, |
139 | - "<?php echo $LANG["cancel_button"];?>": function() { |
|
139 | + "<?php echo $LANG["cancel_button"]; ?>": function() { |
|
140 | 140 | $(this).dialog("close"); |
141 | 141 | } |
142 | 142 | } |
143 | 143 | }); |
144 | 144 | |
145 | 145 | $("#but_disconnect_all_users").click(function() { |
146 | - $("#div_dialog_message_text").html("<?php echo $LANG["disconnect_all_users_sure"];?>"); |
|
146 | + $("#div_dialog_message_text").html("<?php echo $LANG["disconnect_all_users_sure"]; ?>"); |
|
147 | 147 | $("#div_dialog_message").dialog("open"); |
148 | 148 | }); |
149 | 149 | }); |
@@ -19,38 +19,38 @@ |
||
19 | 19 | header('Content-Type: application/json'); |
20 | 20 | |
21 | 21 | if (teampass_api_enabled() != "1") { |
22 | - echo '{"err":"API access not allowed."}'; |
|
23 | - exit; |
|
22 | + echo '{"err":"API access not allowed."}'; |
|
23 | + exit; |
|
24 | 24 | } |
25 | 25 | |
26 | 26 | teampass_whitelist(); |
27 | 27 | |
28 | 28 | if (!isset($_GET['apikey'])) { |
29 | - rest_error('UNKNOWN'); |
|
29 | + rest_error('UNKNOWN'); |
|
30 | 30 | } else { |
31 | - $GLOBALS['apikey'] = $_GET['apikey']; |
|
31 | + $GLOBALS['apikey'] = $_GET['apikey']; |
|
32 | 32 | } |
33 | 33 | |
34 | 34 | $method = $_SERVER['REQUEST_METHOD']; |
35 | 35 | $request = explode("/", substr(@$_SERVER['PATH_INFO'], 1)); |
36 | 36 | |
37 | 37 | switch ($method) { |
38 | - case 'GET': |
|
38 | + case 'GET': |
|
39 | 39 | rest_get(); |
40 | 40 | break; |
41 | - case 'PUT': |
|
41 | + case 'PUT': |
|
42 | 42 | rest_put(); |
43 | 43 | break; |
44 | - case 'DELETE': |
|
44 | + case 'DELETE': |
|
45 | 45 | rest_delete(); |
46 | 46 | break; |
47 | - case 'HEAD': |
|
47 | + case 'HEAD': |
|
48 | 48 | rest_head(); |
49 | 49 | break; |
50 | - case 'NEWUSER': |
|
50 | + case 'NEWUSER': |
|
51 | 51 | rest_newuser(); |
52 | 52 | break; |
53 | - default: |
|
53 | + default: |
|
54 | 54 | rest_error('UNKNOWN'); |
55 | 55 | break; |
56 | 56 | } |
57 | 57 | \ No newline at end of file |
@@ -47,24 +47,24 @@ discard block |
||
47 | 47 | selectedList: 7, |
48 | 48 | minWidth: 550, |
49 | 49 | height: 145, |
50 | - checkAllText: "<?php echo $LANG['check_all_text'];?>", |
|
51 | - uncheckAllText: "<?php echo $LANG['uncheck_all_text'];?>" |
|
50 | + checkAllText: "<?php echo $LANG['check_all_text']; ?>", |
|
51 | + uncheckAllText: "<?php echo $LANG['uncheck_all_text']; ?>" |
|
52 | 52 | }); |
53 | 53 | $("#new_is_admin_by").multiselect({ |
54 | 54 | selectedList: 7, |
55 | 55 | multiple:false, |
56 | 56 | minWidth: 550, |
57 | 57 | height: 145, |
58 | - checkAllText: "<?php echo $LANG['check_all_text'];?>", |
|
59 | - uncheckAllText: "<?php echo $LANG['uncheck_all_text'];?>" |
|
58 | + checkAllText: "<?php echo $LANG['check_all_text']; ?>", |
|
59 | + uncheckAllText: "<?php echo $LANG['uncheck_all_text']; ?>" |
|
60 | 60 | }); |
61 | 61 | $("#share_rights_from, #share_rights_to").multiselect({ |
62 | 62 | selectedList: 7, |
63 | 63 | multiple:false, |
64 | 64 | minWidth: 350, |
65 | 65 | height: 145, |
66 | - checkAllText: "<?php echo $LANG['check_all_text'];?>", |
|
67 | - uncheckAllText: "<?php echo $LANG['uncheck_all_text'];?>" |
|
66 | + checkAllText: "<?php echo $LANG['check_all_text']; ?>", |
|
67 | + uncheckAllText: "<?php echo $LANG['uncheck_all_text']; ?>" |
|
68 | 68 | }); |
69 | 69 | |
70 | 70 | //Launch the datatables pluggin |
@@ -81,7 +81,7 @@ discard block |
||
81 | 81 | } |
82 | 82 | }, |
83 | 83 | "language": { |
84 | - "url": "includes/language/datatables.<?php echo $_SESSION['user_language'];?>.txt" |
|
84 | + "url": "includes/language/datatables.<?php echo $_SESSION['user_language']; ?>.txt" |
|
85 | 85 | }, |
86 | 86 | "columns": [ |
87 | 87 | {"width": "13%", className: "dt-body-left"}, |
@@ -139,10 +139,10 @@ discard block |
||
139 | 139 | type : tmp[1], |
140 | 140 | value : tmp[2], |
141 | 141 | id : tmp[0], |
142 | - key : "<?php echo $_SESSION['key'];?>" |
|
142 | + key : "<?php echo $_SESSION['key']; ?>" |
|
143 | 143 | }, |
144 | 144 | function(data) { |
145 | - data = prepareExchangedData(data, "decode", "<?php echo $_SESSION['key'];?>"); |
|
145 | + data = prepareExchangedData(data, "decode", "<?php echo $_SESSION['key']; ?>"); |
|
146 | 146 | $("#div_loading").hide(); |
147 | 147 | |
148 | 148 | // manage not allowed |
@@ -170,35 +170,35 @@ discard block |
||
170 | 170 | $("#change_user_pw_newpw").simplePassMeter({ |
171 | 171 | "requirements": {}, |
172 | 172 | "container": "#pw_strength", |
173 | - "defaultText" : "<?php echo $LANG['index_pw_level_txt'];?>", |
|
173 | + "defaultText" : "<?php echo $LANG['index_pw_level_txt']; ?>", |
|
174 | 174 | "ratings": [ |
175 | 175 | {"minScore": 0, |
176 | 176 | "className": "meterFail", |
177 | - "text": "<?php echo $LANG['complex_level0'];?>" |
|
177 | + "text": "<?php echo $LANG['complex_level0']; ?>" |
|
178 | 178 | }, |
179 | 179 | {"minScore": 25, |
180 | 180 | "className": "meterWarn", |
181 | - "text": "<?php echo $LANG['complex_level1'];?>" |
|
181 | + "text": "<?php echo $LANG['complex_level1']; ?>" |
|
182 | 182 | }, |
183 | 183 | {"minScore": 50, |
184 | 184 | "className": "meterWarn", |
185 | - "text": "<?php echo $LANG['complex_level2'];?>" |
|
185 | + "text": "<?php echo $LANG['complex_level2']; ?>" |
|
186 | 186 | }, |
187 | 187 | {"minScore": 60, |
188 | 188 | "className": "meterGood", |
189 | - "text": "<?php echo $LANG['complex_level3'];?>" |
|
189 | + "text": "<?php echo $LANG['complex_level3']; ?>" |
|
190 | 190 | }, |
191 | 191 | {"minScore": 70, |
192 | 192 | "className": "meterGood", |
193 | - "text": "<?php echo $LANG['complex_level4'];?>" |
|
193 | + "text": "<?php echo $LANG['complex_level4']; ?>" |
|
194 | 194 | }, |
195 | 195 | {"minScore": 80, |
196 | 196 | "className": "meterExcel", |
197 | - "text": "<?php echo $LANG['complex_level5'];?>" |
|
197 | + "text": "<?php echo $LANG['complex_level5']; ?>" |
|
198 | 198 | }, |
199 | 199 | {"minScore": 90, |
200 | 200 | "className": "meterExcel", |
201 | - "text": "<?php echo $LANG['complex_level6'];?>" |
|
201 | + "text": "<?php echo $LANG['complex_level6']; ?>" |
|
202 | 202 | } |
203 | 203 | ] |
204 | 204 | }); |
@@ -214,13 +214,13 @@ discard block |
||
214 | 214 | autoOpen: false, |
215 | 215 | width: 400, |
216 | 216 | height: 400, |
217 | - title: "<?php echo $LANG['change_user_functions_title'];?>", |
|
217 | + title: "<?php echo $LANG['change_user_functions_title']; ?>", |
|
218 | 218 | buttons: { |
219 | - "<?php echo $LANG['save_button'];?>": function() { |
|
219 | + "<?php echo $LANG['save_button']; ?>": function() { |
|
220 | 220 | Change_user_rights(document.getElementById("selected_user").value,"functions"); |
221 | 221 | $(this).dialog("close"); |
222 | 222 | }, |
223 | - "<?php echo $LANG['cancel_button'];?>": function() { |
|
223 | + "<?php echo $LANG['cancel_button']; ?>": function() { |
|
224 | 224 | $(this).dialog("close"); |
225 | 225 | } |
226 | 226 | } |
@@ -232,13 +232,13 @@ discard block |
||
232 | 232 | autoOpen: false, |
233 | 233 | width: 400, |
234 | 234 | height: 400, |
235 | - title: "<?php echo $LANG['change_user_autgroups_title'];?>", |
|
235 | + title: "<?php echo $LANG['change_user_autgroups_title']; ?>", |
|
236 | 236 | buttons: { |
237 | - "<?php echo $LANG['save_button'];?>": function() { |
|
237 | + "<?php echo $LANG['save_button']; ?>": function() { |
|
238 | 238 | Change_user_rights(document.getElementById("selected_user").value,"autgroups"); |
239 | 239 | $(this).dialog("close"); |
240 | 240 | }, |
241 | - "<?php echo $LANG['cancel_button'];?>": function() { |
|
241 | + "<?php echo $LANG['cancel_button']; ?>": function() { |
|
242 | 242 | $(this).dialog("close"); |
243 | 243 | } |
244 | 244 | } |
@@ -250,13 +250,13 @@ discard block |
||
250 | 250 | autoOpen: false, |
251 | 251 | width: 400, |
252 | 252 | height: 400, |
253 | - title: "<?php echo $LANG['change_user_forgroups_title'];?>", |
|
253 | + title: "<?php echo $LANG['change_user_forgroups_title']; ?>", |
|
254 | 254 | buttons: { |
255 | - "<?php echo $LANG['save_button'];?>": function() { |
|
255 | + "<?php echo $LANG['save_button']; ?>": function() { |
|
256 | 256 | Change_user_rights(document.getElementById("selected_user").value,"forgroups"); |
257 | 257 | $(this).dialog("close"); |
258 | 258 | }, |
259 | - "<?php echo $LANG['cancel_button'];?>": function() { |
|
259 | + "<?php echo $LANG['cancel_button']; ?>": function() { |
|
260 | 260 | $(this).dialog("close"); |
261 | 261 | } |
262 | 262 | } |
@@ -268,21 +268,21 @@ discard block |
||
268 | 268 | autoOpen: false, |
269 | 269 | width: 400, |
270 | 270 | height: 200, |
271 | - title: "<?php echo $LANG['is_administrated_by_role'];?>", |
|
271 | + title: "<?php echo $LANG['is_administrated_by_role']; ?>", |
|
272 | 272 | buttons: { |
273 | - "<?php echo $LANG['save_button'];?>": function() { |
|
273 | + "<?php echo $LANG['save_button']; ?>": function() { |
|
274 | 274 | $.post( |
275 | 275 | "sources/users.queries.php", |
276 | 276 | { |
277 | 277 | type :"change_user_adminby", |
278 | 278 | userId : $("#selected_user").val(), |
279 | 279 | isAdministratedByRole : $("#user_admin_by").val(), |
280 | - key : "<?php echo $_SESSION['key'];?>" |
|
280 | + key : "<?php echo $_SESSION['key']; ?>" |
|
281 | 281 | }, |
282 | 282 | function(data) { |
283 | 283 | if ($("#user_admin_by").val() == "0") { |
284 | 284 | $("#list_adminby_"+$("#selected_user").val()). |
285 | - html("<?php echo $LANG['admin_small'];?>"); |
|
285 | + html("<?php echo $LANG['admin_small']; ?>"); |
|
286 | 286 | } else { |
287 | 287 | $("#list_adminby_"+$("#selected_user").val()). |
288 | 288 | html($("#user_admin_by option:selected").text().match(/"([^"]+)"/)[1]); |
@@ -291,7 +291,7 @@ discard block |
||
291 | 291 | } |
292 | 292 | ) |
293 | 293 | }, |
294 | - "<?php echo $LANG['cancel_button'];?>": function() { |
|
294 | + "<?php echo $LANG['cancel_button']; ?>": function() { |
|
295 | 295 | $(this).dialog("close"); |
296 | 296 | } |
297 | 297 | } |
@@ -303,13 +303,13 @@ discard block |
||
303 | 303 | autoOpen: false, |
304 | 304 | width: 590, |
305 | 305 | height: 620, |
306 | - title: "<?php echo $LANG['new_user_title'];?>", |
|
306 | + title: "<?php echo $LANG['new_user_title']; ?>", |
|
307 | 307 | buttons: { |
308 | - "<?php echo $LANG['save_button'];?>": function() { |
|
308 | + "<?php echo $LANG['save_button']; ?>": function() { |
|
309 | 309 | if ($("#new_login").val() == "" || $("#new_pwd").val()=="" || $("#new_email").val()=="") { |
310 | - $("#add_new_user_error").show(1).html("<?php echo $LANG['error_must_enter_all_fields'];?>").delay(1000).fadeOut(1000); |
|
310 | + $("#add_new_user_error").show(1).html("<?php echo $LANG['error_must_enter_all_fields']; ?>").delay(1000).fadeOut(1000); |
|
311 | 311 | } else { |
312 | - $("#add_new_user_info").show().html("<span class=\'fa fa-cog fa-spin fa-lg\'></span> <?php echo $LANG['please_wait'];?>"); |
|
312 | + $("#add_new_user_info").show().html("<span class=\'fa fa-cog fa-spin fa-lg\'></span> <?php echo $LANG['please_wait']; ?>"); |
|
313 | 313 | |
314 | 314 | // get lists |
315 | 315 | var forbidFld = "", authFld = "", groups = ""; |
@@ -344,8 +344,8 @@ discard block |
||
344 | 344 | "sources/users.queries.php", |
345 | 345 | { |
346 | 346 | type :"add_new_user", |
347 | - data : prepareExchangedData(data, "encode", "<?php echo $_SESSION['key'];?>"), |
|
348 | - key : "<?php echo $_SESSION['key'];?>" |
|
347 | + data : prepareExchangedData(data, "encode", "<?php echo $_SESSION['key']; ?>"), |
|
348 | + key : "<?php echo $_SESSION['key']; ?>" |
|
349 | 349 | }, |
350 | 350 | function(data) { |
351 | 351 | $("#add_new_user_info").hide().html(""); |
@@ -366,7 +366,7 @@ discard block |
||
366 | 366 | ) |
367 | 367 | } |
368 | 368 | }, |
369 | - "<?php echo $LANG['cancel_button'];?>": function() { |
|
369 | + "<?php echo $LANG['cancel_button']; ?>": function() { |
|
370 | 370 | $(this).dialog("close"); |
371 | 371 | } |
372 | 372 | } |
@@ -378,16 +378,16 @@ discard block |
||
378 | 378 | autoOpen: false, |
379 | 379 | width: 400, |
380 | 380 | height: 150, |
381 | - title: "<?php echo $LANG['admin_action'];?>", |
|
381 | + title: "<?php echo $LANG['admin_action']; ?>", |
|
382 | 382 | buttons: { |
383 | - "<?php echo $LANG['ok'];?>": function() { |
|
383 | + "<?php echo $LANG['ok']; ?>": function() { |
|
384 | 384 | $.post( |
385 | 385 | "sources/users.queries.php", |
386 | 386 | { |
387 | 387 | type : "delete_user", |
388 | 388 | id : $("#delete_user_id").val(), |
389 | 389 | action : $("#delete_user_action").val(), |
390 | - key : "<?php echo $_SESSION['key'];?>" |
|
390 | + key : "<?php echo $_SESSION['key']; ?>" |
|
391 | 391 | }, |
392 | 392 | function(data) { |
393 | 393 | window.location.href = "index.php?page=manage_users"; |
@@ -395,7 +395,7 @@ discard block |
||
395 | 395 | "json" |
396 | 396 | ); |
397 | 397 | }, |
398 | - "<?php echo $LANG['cancel_button'];?>": function() { |
|
398 | + "<?php echo $LANG['cancel_button']; ?>": function() { |
|
399 | 399 | $(this).dialog("close"); |
400 | 400 | } |
401 | 401 | } |
@@ -407,9 +407,9 @@ discard block |
||
407 | 407 | autoOpen: false, |
408 | 408 | width: 380, |
409 | 409 | height: 300, |
410 | - title: "<?php echo $LANG['admin_action'];?>", |
|
410 | + title: "<?php echo $LANG['admin_action']; ?>", |
|
411 | 411 | buttons: { |
412 | - "<?php echo $LANG['pw_generate'];?>": function() { |
|
412 | + "<?php echo $LANG['pw_generate']; ?>": function() { |
|
413 | 413 | $("#generated_user_pw").html(""); |
414 | 414 | $("#change_user_pw_wait").show(); |
415 | 415 | $.post( |
@@ -437,19 +437,19 @@ discard block |
||
437 | 437 | } |
438 | 438 | ); |
439 | 439 | }, |
440 | - "<?php echo $LANG['save_button'];?>": function() { |
|
440 | + "<?php echo $LANG['save_button']; ?>": function() { |
|
441 | 441 | if ($("#change_user_pw_newpw_confirm").val() === "" || $("#change_user_pw_newpw").val() === "") { |
442 | 442 | // check if empty |
443 | - $("#change_user_pw_error").html("<?php echo $LANG['error_must_enter_all_fields'];?>").show(1).delay(1000).fadeOut(1000); |
|
443 | + $("#change_user_pw_error").html("<?php echo $LANG['error_must_enter_all_fields']; ?>").show(1).delay(1000).fadeOut(1000); |
|
444 | 444 | } else if ($("#change_user_pw_newpw").val() === $("#change_user_pw_newpw_confirm").val()) { |
445 | 445 | // check if egual |
446 | - var data = "{\"new_pw\":\""+sanitizeString($("#change_user_pw_newpw").val())+"\" , \"user_id\":\""+$("#change_user_pw_id").val()+"\" , \"key\":\"<?php echo $_SESSION['key'];?>\"}"; |
|
446 | + var data = "{\"new_pw\":\""+sanitizeString($("#change_user_pw_newpw").val())+"\" , \"user_id\":\""+$("#change_user_pw_id").val()+"\" , \"key\":\"<?php echo $_SESSION['key']; ?>\"}"; |
|
447 | 447 | $.post( |
448 | 448 | "sources/main.queries.php", |
449 | 449 | { |
450 | 450 | type : "change_pw", |
451 | 451 | change_pw_origine : "admin_change", |
452 | - data : prepareExchangedData(data, "encode", "<?php echo $_SESSION['key'];?>") |
|
452 | + data : prepareExchangedData(data, "encode", "<?php echo $_SESSION['key']; ?>") |
|
453 | 453 | }, |
454 | 454 | function(data) { |
455 | 455 | if (data[0].error == "none") { |
@@ -465,10 +465,10 @@ discard block |
||
465 | 465 | "json" |
466 | 466 | ); |
467 | 467 | } else { |
468 | - $("#change_user_pw_error").html("<?php echo $LANG['error_password_confirmation'];?>").show(1).delay(1000).fadeOut(1000); |
|
468 | + $("#change_user_pw_error").html("<?php echo $LANG['error_password_confirmation']; ?>").show(1).delay(1000).fadeOut(1000); |
|
469 | 469 | } |
470 | 470 | }, |
471 | - "<?php echo $LANG['cancel_button'];?>": function() { |
|
471 | + "<?php echo $LANG['cancel_button']; ?>": function() { |
|
472 | 472 | $("#change_user_pw_newpw_confirm, #change_user_pw_newpw").val(""); |
473 | 473 | $(this).dialog("close"); |
474 | 474 | } |
@@ -485,9 +485,9 @@ discard block |
||
485 | 485 | autoOpen: false, |
486 | 486 | width: 850, |
487 | 487 | height: 500, |
488 | - title: "<?php echo $LANG["logs"];?>", |
|
488 | + title: "<?php echo $LANG["logs"]; ?>", |
|
489 | 489 | buttons: { |
490 | - "<?php echo $LANG['cancel_button'];?>": function() { |
|
490 | + "<?php echo $LANG['cancel_button']; ?>": function() { |
|
491 | 491 | $("#span_user_activity_option").hide(); |
492 | 492 | $("#activity").val(0); |
493 | 493 | $("#tbody_logs").empty(); |
@@ -522,9 +522,9 @@ discard block |
||
522 | 522 | autoOpen: false, |
523 | 523 | width: 400, |
524 | 524 | height: 200, |
525 | - title: "<?php echo $LANG['admin_action'];?>", |
|
525 | + title: "<?php echo $LANG['admin_action']; ?>", |
|
526 | 526 | buttons: { |
527 | - "<?php echo $LANG['cancel_button'];?>": function() { |
|
527 | + "<?php echo $LANG['cancel_button']; ?>": function() { |
|
528 | 528 | $(this).dialog("close"); |
529 | 529 | } |
530 | 530 | } |
@@ -536,10 +536,10 @@ discard block |
||
536 | 536 | autoOpen: false, |
537 | 537 | width: 400, |
538 | 538 | height: 280, |
539 | - title: "<?php echo $LANG['admin_action'];?>", |
|
539 | + title: "<?php echo $LANG['admin_action']; ?>", |
|
540 | 540 | buttons: { |
541 | - "<?php echo $LANG['save_button'];?>": function() { |
|
542 | - $("#user_edit_login_dialog_message").html("<?php echo $LANG['please_wait'];?>"); |
|
541 | + "<?php echo $LANG['save_button']; ?>": function() { |
|
542 | + $("#user_edit_login_dialog_message").html("<?php echo $LANG['please_wait']; ?>"); |
|
543 | 543 | $.post( |
544 | 544 | "sources/users.queries.php", |
545 | 545 | { |
@@ -548,7 +548,7 @@ discard block |
||
548 | 548 | login : $("#edit_login").val(), |
549 | 549 | name : $("#edit_name").val(), |
550 | 550 | lastname: $("#edit_lastname").val(), |
551 | - key : "<?php echo $_SESSION['key'];?>" |
|
551 | + key : "<?php echo $_SESSION['key']; ?>" |
|
552 | 552 | }, |
553 | 553 | function(data) { |
554 | 554 | $("#name_"+$("#selected_user").html()).html($("#edit_name").val()); |
@@ -558,7 +558,7 @@ discard block |
||
558 | 558 | } |
559 | 559 | ); |
560 | 560 | }, |
561 | - "<?php echo $LANG['cancel_button'];?>": function() { |
|
561 | + "<?php echo $LANG['cancel_button']; ?>": function() { |
|
562 | 562 | $(this).dialog("close"); |
563 | 563 | } |
564 | 564 | }, |
@@ -611,9 +611,9 @@ discard block |
||
611 | 611 | autoOpen: false, |
612 | 612 | width: 400, |
613 | 613 | height: 200, |
614 | - title: "<?php echo $LANG['admin_action'];?>", |
|
614 | + title: "<?php echo $LANG['admin_action']; ?>", |
|
615 | 615 | buttons: { |
616 | - "<?php echo $LANG['cancel_button'];?>": function() { |
|
616 | + "<?php echo $LANG['cancel_button']; ?>": function() { |
|
617 | 617 | $(this).dialog("close"); |
618 | 618 | } |
619 | 619 | } |
@@ -625,20 +625,20 @@ discard block |
||
625 | 625 | autoOpen: false, |
626 | 626 | width: 600, |
627 | 627 | height: 550, |
628 | - title: "<?php echo $LANG['dialog_admin_user_edit_title'];?>", |
|
628 | + title: "<?php echo $LANG['dialog_admin_user_edit_title']; ?>", |
|
629 | 629 | open: function() { |
630 | 630 | $("#user_edit_functions_list, #user_edit_managedby, #user_edit_auth, #user_edit_forbid").empty(); |
631 | - $(".ui-dialog-buttonpane button:contains('<?php echo $LANG['save_button'];?>')").button("disable"); |
|
631 | + $(".ui-dialog-buttonpane button:contains('<?php echo $LANG['save_button']; ?>')").button("disable"); |
|
632 | 632 | $.post( |
633 | 633 | "sources/users.queries.php", |
634 | 634 | { |
635 | 635 | type : "get_user_info", |
636 | 636 | id : $('#user_edit_id').val(), |
637 | - key : "<?php echo $_SESSION['key'];?>" |
|
637 | + key : "<?php echo $_SESSION['key']; ?>" |
|
638 | 638 | }, |
639 | 639 | function(data) { |
640 | 640 | if (data.error == "no") { |
641 | - $(".ui-dialog-buttonpane button:contains('<?php echo $LANG['save_button'];?>')").button("enable"); |
|
641 | + $(".ui-dialog-buttonpane button:contains('<?php echo $LANG['save_button']; ?>')").button("enable"); |
|
642 | 642 | |
643 | 643 | $("#user_edit_login").val(data.log); |
644 | 644 | $("#user_edit_name").val(data.name); |
@@ -652,8 +652,8 @@ discard block |
||
652 | 652 | $("#user_edit_managedby").append(data.managedby); |
653 | 653 | $("#user_edit_managedby").multiselect({ |
654 | 654 | multiple: false, |
655 | - header: "<?php echo $LANG['select'];?>", |
|
656 | - noneSelectedText: "<?php echo $LANG['select'];?>", |
|
655 | + header: "<?php echo $LANG['select']; ?>", |
|
656 | + noneSelectedText: "<?php echo $LANG['select']; ?>", |
|
657 | 657 | selectedList: 1 |
658 | 658 | }, 'refresh'); |
659 | 659 | |
@@ -666,7 +666,7 @@ discard block |
||
666 | 666 | $("#user_edit_wait").hide(); |
667 | 667 | $("#user_edit_div").show(); |
668 | 668 | } else { |
669 | - $("#user_edit_error").html("<?php echo $LANG['error_unknown'];?>") |
|
669 | + $("#user_edit_error").html("<?php echo $LANG['error_unknown']; ?>") |
|
670 | 670 | $("#user_edit_wait").hide(); |
671 | 671 | $("#user_edit_div").show(); |
672 | 672 | } |
@@ -677,7 +677,7 @@ discard block |
||
677 | 677 | $("#user_edit_error, #user_edit_warning_bottom").hide().html(""); |
678 | 678 | }, |
679 | 679 | buttons: { |
680 | - "<?php echo $LANG['save_button'];?>": function() { |
|
680 | + "<?php echo $LANG['save_button']; ?>": function() { |
|
681 | 681 | var functions = managedby = allowFld = forbidFld = action_on_user = ""; |
682 | 682 | // manage the multiselect boxes |
683 | 683 | $("#user_edit_functions_list option:selected").each(function () { |
@@ -718,8 +718,8 @@ discard block |
||
718 | 718 | { |
719 | 719 | type : "store_user_changes", |
720 | 720 | id : $('#user_edit_id').val(), |
721 | - data : prepareExchangedData(data, "encode", "<?php echo $_SESSION['key'];?>"), |
|
722 | - key : "<?php echo $_SESSION['key'];?>" |
|
721 | + data : prepareExchangedData(data, "encode", "<?php echo $_SESSION['key']; ?>"), |
|
722 | + key : "<?php echo $_SESSION['key']; ?>" |
|
723 | 723 | }, |
724 | 724 | function(data) { |
725 | 725 | if (data[0].error == "no") { |
@@ -732,7 +732,7 @@ discard block |
||
732 | 732 | "json" |
733 | 733 | ); |
734 | 734 | }, |
735 | - "<?php echo $LANG['cancel_button'];?>": function() { |
|
735 | + "<?php echo $LANG['cancel_button']; ?>": function() { |
|
736 | 736 | $("#user_edit_error, #user_edit_warning_bottom").hide().html(""); |
737 | 737 | $(this).dialog("close"); |
738 | 738 | } |
@@ -746,25 +746,25 @@ discard block |
||
746 | 746 | autoOpen: false, |
747 | 747 | width: 600, |
748 | 748 | height: 400, |
749 | - title: "<?php echo $LANG['share_user_rights'];?>", |
|
749 | + title: "<?php echo $LANG['share_user_rights']; ?>", |
|
750 | 750 | open: function() { |
751 | - $(".ui-dialog-buttonpane button:contains('<?php echo $LANG['save_button'];?>')").button("disable"); |
|
751 | + $(".ui-dialog-buttonpane button:contains('<?php echo $LANG['save_button']; ?>')").button("disable"); |
|
752 | 752 | $.post( |
753 | 753 | "sources/users.queries.php", |
754 | 754 | { |
755 | 755 | type : "get_list_of_users_for_sharing", |
756 | - key : "<?php echo $_SESSION['key'];?>" |
|
756 | + key : "<?php echo $_SESSION['key']; ?>" |
|
757 | 757 | }, |
758 | 758 | function(data) { |
759 | - data = prepareExchangedData(data, "decode", "<?php echo $_SESSION['key'];?>"); |
|
759 | + data = prepareExchangedData(data, "decode", "<?php echo $_SESSION['key']; ?>"); |
|
760 | 760 | if (data.error === "") { |
761 | - $(".ui-dialog-buttonpane button:contains('<?php echo $LANG['save_button'];?>')").button("enable"); |
|
761 | + $(".ui-dialog-buttonpane button:contains('<?php echo $LANG['save_button']; ?>')").button("enable"); |
|
762 | 762 | |
763 | 763 | $("#share_rights_from").append(data.users_list_from); |
764 | 764 | $("#share_rights_from").multiselect({ |
765 | 765 | multiple: false, |
766 | - header: "<?php echo $LANG['select'];?>", |
|
767 | - noneSelectedText: "<?php echo $LANG['select'];?>", |
|
766 | + header: "<?php echo $LANG['select']; ?>", |
|
767 | + noneSelectedText: "<?php echo $LANG['select']; ?>", |
|
768 | 768 | selectedList: 1, |
769 | 769 | maxWidth: "300px;" |
770 | 770 | }, 'refresh'); |
@@ -772,15 +772,15 @@ discard block |
||
772 | 772 | $("#share_rights_to").append(data.users_list_to); |
773 | 773 | $("#share_rights_to").multiselect({ |
774 | 774 | multiple: true, |
775 | - header: "<?php echo $LANG['select'];?>", |
|
776 | - noneSelectedText: "<?php echo $LANG['select'];?>", |
|
775 | + header: "<?php echo $LANG['select']; ?>", |
|
776 | + noneSelectedText: "<?php echo $LANG['select']; ?>", |
|
777 | 777 | selectedList: 7, |
778 | 778 | maxWidth: "300px;" |
779 | 779 | }, 'refresh'); |
780 | 780 | |
781 | 781 | get_user_rights(); |
782 | 782 | } else { |
783 | - $("#share_rights_dialog_error").html("<?php echo $LANG['error_unknown'];?>"); |
|
783 | + $("#share_rights_dialog_error").html("<?php echo $LANG['error_unknown']; ?>"); |
|
784 | 784 | } |
785 | 785 | } |
786 | 786 | ); |
@@ -791,8 +791,8 @@ discard block |
||
791 | 791 | $("#share_rights_details_ids_1, #share_rights_details_ids_2, #share_rights_details_ids_3, #share_rights_details_ids_4").val(""); |
792 | 792 | }, |
793 | 793 | buttons: { |
794 | - "<?php echo $LANG['save_button'];?>": function() { |
|
795 | - $("#share_rights_dialog_msg").html("<?php echo '<i class=\"fa fa-cog fa-spin fa-2x\"></i> '.$LANG['please_wait'];?>").show(); |
|
794 | + "<?php echo $LANG['save_button']; ?>": function() { |
|
795 | + $("#share_rights_dialog_msg").html("<?php echo '<i class=\"fa fa-cog fa-spin fa-2x\"></i> '.$LANG['please_wait']; ?>").show(); |
|
796 | 796 | |
797 | 797 | // destination users |
798 | 798 | var destination_ids = ''; |
@@ -822,7 +822,7 @@ discard block |
||
822 | 822 | user_fldallowed : $("#share_rights_details_ids_3").val(), |
823 | 823 | user_fldforbid : $("#share_rights_details_ids_4").val(), |
824 | 824 | user_otherrights: $("#share_rights_details_other").val(), |
825 | - key : "<?php echo $_SESSION['key'];?>" |
|
825 | + key : "<?php echo $_SESSION['key']; ?>" |
|
826 | 826 | }, |
827 | 827 | function(data) { |
828 | 828 | $("#share_rights_dialog_msg").hide(); |
@@ -835,11 +835,11 @@ discard block |
||
835 | 835 | // unselect destination users |
836 | 836 | $("#share_rights_to").multiselect("uncheckAll"); |
837 | 837 | |
838 | - $("#share_rights_dialog_msg").html("<?php echo '<i class=\"fa fa-check-circle fa-2x mi-green\"></i> '.$LANG['alert_message_done'];?>").show(0).delay(2000).hide(0); |
|
838 | + $("#share_rights_dialog_msg").html("<?php echo '<i class=\"fa fa-check-circle fa-2x mi-green\"></i> '.$LANG['alert_message_done']; ?>").show(0).delay(2000).hide(0); |
|
839 | 839 | } |
840 | 840 | ); |
841 | 841 | }, |
842 | - "<?php echo $LANG['cancel_button'];?>": function() { |
|
842 | + "<?php echo $LANG['cancel_button']; ?>": function() { |
|
843 | 843 | $(this).dialog("close"); |
844 | 844 | } |
845 | 845 | } |
@@ -852,9 +852,9 @@ discard block |
||
852 | 852 | autoOpen: false, |
853 | 853 | width: 380, |
854 | 854 | height: 600, |
855 | - title: "<?php echo $LANG['user_s_rights_on_folders'];?>", |
|
855 | + title: "<?php echo $LANG['user_s_rights_on_folders']; ?>", |
|
856 | 856 | buttons: { |
857 | - "<?php echo $LANG['close'];?>": function() { |
|
857 | + "<?php echo $LANG['close']; ?>": function() { |
|
858 | 858 | $(this).dialog("close"); |
859 | 859 | } |
860 | 860 | }, |
@@ -866,10 +866,10 @@ discard block |
||
866 | 866 | { |
867 | 867 | type : "user_folders_rights", |
868 | 868 | id : $('#user_folders_rights_dialog_id').val(), |
869 | - key : "<?php echo $_SESSION['key'];?>" |
|
869 | + key : "<?php echo $_SESSION['key']; ?>" |
|
870 | 870 | }, |
871 | 871 | function(data) { |
872 | - data = prepareExchangedData(data, "decode", "<?php echo $_SESSION['key'];?>"); |
|
872 | + data = prepareExchangedData(data, "decode", "<?php echo $_SESSION['key']; ?>"); |
|
873 | 873 | $("#user_folders_rights_dialog_txt").html(data.html); |
874 | 874 | $("#user_folders_rights_dialog_wait").hide(); |
875 | 875 | } |
@@ -887,10 +887,10 @@ discard block |
||
887 | 887 | if ($("#confirm_deletion").val() == "") { |
888 | 888 | $("#account_delete").prop("checked", false); |
889 | 889 | $("#confirm_deletion").val("1"); |
890 | - $("#user_edit_error").show().html("<?php echo $LANG['user_info_delete'];?>"); |
|
890 | + $("#user_edit_error").show().html("<?php echo $LANG['user_info_delete']; ?>"); |
|
891 | 891 | } else { |
892 | 892 | $("#user_edit_error").hide().html(""); |
893 | - $("#user_edit_warning_bottom").show().html("<?php echo $LANG['user_info_delete_warning'];?>"); |
|
893 | + $("#user_edit_warning_bottom").show().html("<?php echo $LANG['user_info_delete_warning']; ?>"); |
|
894 | 894 | } |
895 | 895 | } else { |
896 | 896 | $("#confirm_deletion").val(""); |
@@ -914,7 +914,7 @@ discard block |
||
914 | 914 | force : false |
915 | 915 | }, |
916 | 916 | function(data) { |
917 | - data = prepareExchangedData(data, "decode", "<?php echo $_SESSION['key'];?>"); |
|
917 | + data = prepareExchangedData(data, "decode", "<?php echo $_SESSION['key']; ?>"); |
|
918 | 918 | if (data.error == "true") { |
919 | 919 | $("#div_dialog_message_text").html(data.error_msg); |
920 | 920 | $("#div_dialog_message").dialog("open"); |
@@ -928,9 +928,9 @@ discard block |
||
928 | 928 | function action_on_user(id, action) |
929 | 929 | { |
930 | 930 | if (action == "lock") { |
931 | - $("#user_action_html").html("<?php echo $LANG['confirm_lock_account'];?>"); |
|
931 | + $("#user_action_html").html("<?php echo $LANG['confirm_lock_account']; ?>"); |
|
932 | 932 | } else { |
933 | - $("#user_action_html").html("<?php echo $LANG['confirm_del_account'];?>"); |
|
933 | + $("#user_action_html").html("<?php echo $LANG['confirm_del_account']; ?>"); |
|
934 | 934 | } |
935 | 935 | $("#delete_user_action").val(action); |
936 | 936 | $("#delete_user_login").val($("#login_"+id).text()); |
@@ -954,10 +954,10 @@ discard block |
||
954 | 954 | type : parameter, |
955 | 955 | value : new_value, |
956 | 956 | id : id, |
957 | - key : "<?php echo $_SESSION['key'];?>" |
|
957 | + key : "<?php echo $_SESSION['key']; ?>" |
|
958 | 958 | }, |
959 | 959 | function(data) { |
960 | - $("#div_dialog_message_text").html("<div style=\"font-size:16px; text-align:center;\"><span class=\"ui-icon ui-icon-info\" style=\"float: left; margin-right: .3em;\"></span><?php echo $LANG['alert_message_done'];?></div>");$("#div_dialog_message").dialog("open"); |
|
960 | + $("#div_dialog_message_text").html("<div style=\"font-size:16px; text-align:center;\"><span class=\"ui-icon ui-icon-info\" style=\"float: left; margin-right: .3em;\"></span><?php echo $LANG['alert_message_done']; ?></div>");$("#div_dialog_message").dialog("open"); |
|
961 | 961 | |
962 | 962 | } |
963 | 963 | ); |
@@ -970,7 +970,7 @@ discard block |
||
970 | 970 | { |
971 | 971 | type : "open_div_"+type, |
972 | 972 | id : id, |
973 | - key : "<?php echo $_SESSION['key'];?>" |
|
973 | + key : "<?php echo $_SESSION['key']; ?>" |
|
974 | 974 | }, |
975 | 975 | function(data) { |
976 | 976 | data = $.parseJSON(data); |
@@ -1020,7 +1020,7 @@ discard block |
||
1020 | 1020 | type : "change_user_"+type, |
1021 | 1021 | id : id, |
1022 | 1022 | list : list, |
1023 | - key : "<?php echo $_SESSION['key'];?>" |
|
1023 | + key : "<?php echo $_SESSION['key']; ?>" |
|
1024 | 1024 | }, |
1025 | 1025 | function(data) { |
1026 | 1026 | if (type == "functions") { |
@@ -1042,7 +1042,7 @@ discard block |
||
1042 | 1042 | { |
1043 | 1043 | type : "unlock_account", |
1044 | 1044 | id : id, |
1045 | - key : "<?php echo $_SESSION['key'];?>" |
|
1045 | + key : "<?php echo $_SESSION['key']; ?>" |
|
1046 | 1046 | }, |
1047 | 1047 | function(data) { |
1048 | 1048 | document.form_utilisateurs.submit(); |
@@ -1120,12 +1120,12 @@ discard block |
||
1120 | 1120 | }, |
1121 | 1121 | function(data) { |
1122 | 1122 | if (data[0].error == "0") { |
1123 | - $("#manager_dialog_error").html("<div><?php echo $LANG['share_sent_ok'];?></div>"); |
|
1123 | + $("#manager_dialog_error").html("<div><?php echo $LANG['share_sent_ok']; ?></div>"); |
|
1124 | 1124 | } else { |
1125 | 1125 | if (data[0].error == "no_email") { |
1126 | - $("#manager_dialog_error").html("<?php echo $LANG['error_no_email'];?>"); |
|
1126 | + $("#manager_dialog_error").html("<?php echo $LANG['error_no_email']; ?>"); |
|
1127 | 1127 | } else if (data[0].error == "no_user") { |
1128 | - $("#manager_dialog_error").html("<?php echo $LANG['error_no_user'];?>"); |
|
1128 | + $("#manager_dialog_error").html("<?php echo $LANG['error_no_user']; ?>"); |
|
1129 | 1129 | } |
1130 | 1130 | } |
1131 | 1131 | $("#manager_dialog").dialog('open'); |
@@ -1178,7 +1178,7 @@ discard block |
||
1178 | 1178 | { |
1179 | 1179 | type : "get_user_info", |
1180 | 1180 | id : user_id, |
1181 | - key : "<?php echo $_SESSION['key'];?>" |
|
1181 | + key : "<?php echo $_SESSION['key']; ?>" |
|
1182 | 1182 | }, |
1183 | 1183 | function(data) { |
1184 | 1184 | if (data.error == "no") { |
@@ -1234,7 +1234,7 @@ discard block |
||
1234 | 1234 | } |
1235 | 1235 | } |
1236 | 1236 | }); |
1237 | - $("#share_rights_details_3").html(tmp === "" ? "<?php echo $LANG['none'];?>" : tmp); |
|
1237 | + $("#share_rights_details_3").html(tmp === "" ? "<?php echo $LANG['none']; ?>" : tmp); |
|
1238 | 1238 | $("#share_rights_details_ids_3").val(tmp2); |
1239 | 1239 | |
1240 | 1240 | // allowed |
@@ -1252,7 +1252,7 @@ discard block |
||
1252 | 1252 | } |
1253 | 1253 | } |
1254 | 1254 | }); |
1255 | - $("#share_rights_details_4").html(tmp === "" ? "<?php echo $LANG['none'];?>" : tmp); |
|
1255 | + $("#share_rights_details_4").html(tmp === "" ? "<?php echo $LANG['none']; ?>" : tmp); |
|
1256 | 1256 | $("#share_rights_details_ids_4").val(tmp2); |
1257 | 1257 | |
1258 | 1258 | $("#share_rights_details_other").val(data.gestionnaire + ";" + data.read_only + ";" + data.can_create_root_folder + ";" + data.personal_folder + ";" + data.can_manage_all_users + ";" + data.admin); |
@@ -1303,7 +1303,7 @@ discard block |
||
1303 | 1303 | { |
1304 | 1304 | type : "is_login_available", |
1305 | 1305 | login : text, |
1306 | - key : "<?php echo $_SESSION['key'];?>" |
|
1306 | + key : "<?php echo $_SESSION['key']; ?>" |
|
1307 | 1307 | }, |
1308 | 1308 | function(data) { |
1309 | 1309 | if (data[0].error === "") { |
@@ -1320,7 +1320,7 @@ discard block |
||
1320 | 1320 | |
1321 | 1321 | function aes_decrypt(text) |
1322 | 1322 | { |
1323 | - return Aes.Ctr.decrypt(text, "<?php echo $_SESSION['key'];?>", 256); |
|
1323 | + return Aes.Ctr.decrypt(text, "<?php echo $_SESSION['key']; ?>", 256); |
|
1324 | 1324 | } |
1325 | 1325 | |
1326 | 1326 | function htmlspecialchars_decode (string, quote_style) |
@@ -82,7 +82,7 @@ discard block |
||
82 | 82 | $pre."automatic_del", |
83 | 83 | array( |
84 | 84 | 'del_value' => $dataDelete['del_value'] - 1 |
85 | - ), |
|
85 | + ), |
|
86 | 86 | "item_id = %i", |
87 | 87 | $data['item_id'] |
88 | 88 | ); |
@@ -97,7 +97,7 @@ discard block |
||
97 | 97 | prefix_table("items"), |
98 | 98 | array( |
99 | 99 | 'inactif' => '1', |
100 | - ), |
|
100 | + ), |
|
101 | 101 | "id = %i", |
102 | 102 | $data['item_id'] |
103 | 103 | ); |
@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | $data['timestamp'] == intval($_GET['stamp']) |
56 | 56 | ) { |
57 | 57 | // otv is too old |
58 | - if ($data['timestamp'] < ( time() - ($_SESSION['settings']['otv_expiration_period'] * 86400))) { |
|
58 | + if ($data['timestamp'] < (time() - ($_SESSION['settings']['otv_expiration_period'] * 86400))) { |
|
59 | 59 | $html = "Link is too old!"; |
60 | 60 | } else { |
61 | 61 | // get from DB |
@@ -124,11 +124,11 @@ discard block |
||
124 | 124 | "<div style='font-size:20px;font-weight:bold;'>Welcome to One-Time item view page.</div>". |
125 | 125 | "<div style='font-style:italic;'>Here are the details of the Item that has been shared to you</div>". |
126 | 126 | "<div style='margin-top:10px;'><table>". |
127 | - "<tr><td>Label:</td><td>" . $label . "</td></tr>". |
|
128 | - "<tr><td>Password:</td><td>" . htmlspecialchars($pw['string']) . "</td></tr>". |
|
129 | - "<tr><td>Description:</td><td>" . $description . "</td></tr>". |
|
130 | - "<tr><td>login:</td><td>" . $login . "</td></tr>". |
|
131 | - "<tr><td>URL:</td><td>" . $url ."</td></tr>". |
|
127 | + "<tr><td>Label:</td><td>".$label."</td></tr>". |
|
128 | + "<tr><td>Password:</td><td>".htmlspecialchars($pw['string'])."</td></tr>". |
|
129 | + "<tr><td>Description:</td><td>".$description."</td></tr>". |
|
130 | + "<tr><td>login:</td><td>".$login."</td></tr>". |
|
131 | + "<tr><td>URL:</td><td>".$url."</td></tr>". |
|
132 | 132 | "</table></div>". |
133 | 133 | "<div style='margin-top:30px;'>Copy carefully the data you need. This page is only visible once.</div>". |
134 | 134 | "</div>"; |
@@ -47,7 +47,7 @@ discard block |
||
47 | 47 | foreach ($treeDesc as $t) { |
48 | 48 | if (in_array($t->id, $_SESSION['groupes_visibles']) && !in_array($t->id, $_SESSION['personal_visible_groups'])) { |
49 | 49 | $ident = ""; |
50 | - for ($y = 1;$y < $t->nlevel;$y++) { |
|
50 | + for ($y = 1; $y < $t->nlevel; $y++) { |
|
51 | 51 | $ident .= " "; |
52 | 52 | } |
53 | 53 | $foldersList .= '<option value="'.$t->id.'">'.$ident.@htmlspecialchars($t->title, ENT_COMPAT, "UTF-8").'</option>'; |
@@ -159,8 +159,7 @@ discard block |
||
159 | 159 | <label for="new_login" class="label_cpm">'.$LANG['login'].' <span id="new_login_status"></span></label> |
160 | 160 | <input type="text" id="new_login" class="input_text text ui-widget-content ui-corner-all" style="margin-bottom:3px;" /> |
161 | 161 | |
162 | - ', isset($_SESSION['settings']['ldap_mode']) && $_SESSION['settings']['ldap_mode'] == 1 ? '' : |
|
163 | -'<label for="new_pwd" class="label_cpm">'.$LANG['pw'].' <span class="fa fa-refresh" onclick="pwGenerate(\'new_pwd\')" style="cursor:pointer;"></span></label> |
|
162 | + ', isset($_SESSION['settings']['ldap_mode']) && $_SESSION['settings']['ldap_mode'] == 1 ? '' : '<label for="new_pwd" class="label_cpm">'.$LANG['pw'].' <span class="fa fa-refresh" onclick="pwGenerate(\'new_pwd\')" style="cursor:pointer;"></span></label> |
|
164 | 163 | <input type="text" id="new_pwd" class="input_text text ui-widget-content ui-corner-all" style="margin-bottom:3px;" />', ' |
165 | 164 | |
166 | 165 | <label for="new_email" class="label_cpm">'.$LANG['email'].'</label> |
@@ -193,7 +192,7 @@ discard block |
||
193 | 192 | |
194 | 193 | $rows = DB::query("SELECT id,title,creator_id FROM ".prefix_table("roles_title")); |
195 | 194 | foreach ($rows as $record) { |
196 | - if ($_SESSION['is_admin'] == 1 || ($_SESSION['user_manager'] == 1 && (in_array($record['id'], $my_functions) || $record['creator_id'] == $_SESSION['user_id']))) { |
|
195 | + if ($_SESSION['is_admin'] == 1 || ($_SESSION['user_manager'] == 1 && (in_array($record['id'], $my_functions) || $record['creator_id'] == $_SESSION['user_id']))) { |
|
197 | 196 | $functionsList .= '<option value="'.$record['id'].'" class="folder_rights_role">'.$record['title'].'</option>'; |
198 | 197 | } |
199 | 198 | } |
@@ -233,7 +232,7 @@ discard block |
||
233 | 232 | </tr> |
234 | 233 | <tr> |
235 | 234 | <td> |
236 | - <input type="checkbox" id="new_personal_folder"', isset($_SESSION['settings']['enable_pf_feature']) && $_SESSION['settings']['enable_pf_feature'] == 1 ? ' checked="checked"':'', ' /> |
|
235 | + <input type="checkbox" id="new_personal_folder"', isset($_SESSION['settings']['enable_pf_feature']) && $_SESSION['settings']['enable_pf_feature'] == 1 ? ' checked="checked"' : '', ' /> |
|
237 | 236 | <label for="new_personal_folder">'.$LANG['personal_folder'].'</label> |
238 | 237 | </td> |
239 | 238 | </tr> |
@@ -228,7 +228,7 @@ |
||
228 | 228 | $("#connection_error").html("'.addslashes($LANG['bad_psk_confirmation']).'").show(); |
229 | 229 | } else if (data[0].value == "psk_required") { |
230 | 230 | $("#ajax_loader_connexion").hide(); |
231 | - $("#connection_error").html("' . addslashes($LANG['psk_required']) . '"); |
|
231 | + $("#connection_error").html("' . addslashes($LANG['psk_required']).'"); |
|
232 | 232 | $("#connection_error, #connect_psk_confirm").show(); |
233 | 233 | } else if (data[0].value == "user_not_exists") { |
234 | 234 | $("#connection_error").html("'.addslashes($LANG['error_bad_credentials']).'").show(); |