@@ -69,7 +69,7 @@ discard block |
||
69 | 69 | if ($checkUserAccess->checkSession() === false || $checkUserAccess->userAccessPage('items') === false) { |
70 | 70 | // Not allowed page |
71 | 71 | $session->set('system-error_code', ERR_NOT_ALLOWED); |
72 | - include $SETTINGS['cpassman_dir'] . '/error.php'; |
|
72 | + include $SETTINGS['cpassman_dir'].'/error.php'; |
|
73 | 73 | exit; |
74 | 74 | } |
75 | 75 | // Define Timezone |
@@ -90,7 +90,7 @@ discard block |
||
90 | 90 | |
91 | 91 | // Get list of users |
92 | 92 | $usersList = []; |
93 | -$rows = DB::query('SELECT id,login,email FROM ' . prefixTable('users') . ' ORDER BY login ASC'); |
|
93 | +$rows = DB::query('SELECT id,login,email FROM '.prefixTable('users').' ORDER BY login ASC'); |
|
94 | 94 | foreach ($rows as $record) { |
95 | 95 | $usersList[$record['login']] = [ |
96 | 96 | 'id' => $record['id'], |
@@ -101,16 +101,16 @@ discard block |
||
101 | 101 | // Get list of roles |
102 | 102 | $arrRoles = []; |
103 | 103 | $listRoles = ''; |
104 | -$rows = DB::query('SELECT id,title FROM ' . prefixTable('roles_title') . ' ORDER BY title ASC'); |
|
104 | +$rows = DB::query('SELECT id,title FROM '.prefixTable('roles_title').' ORDER BY title ASC'); |
|
105 | 105 | foreach ($rows as $reccord) { |
106 | 106 | $arrRoles[$reccord['title']] = [ |
107 | 107 | 'id' => $reccord['id'], |
108 | 108 | 'title' => $reccord['title'], |
109 | 109 | ]; |
110 | 110 | if (empty($listRoles)) { |
111 | - $listRoles = $reccord['id'] . '#' . $reccord['title']; |
|
111 | + $listRoles = $reccord['id'].'#'.$reccord['title']; |
|
112 | 112 | } else { |
113 | - $listRoles .= ';' . $reccord['id'] . '#' . $reccord['title']; |
|
113 | + $listRoles .= ';'.$reccord['id'].'#'.$reccord['title']; |
|
114 | 114 | } |
115 | 115 | } |
116 | 116 | |
@@ -185,7 +185,7 @@ discard block |
||
185 | 185 | <li class="nav-item"><a class="nav-link" href="#tab_3" data-toggle="tab"><i class="fa-solid fa-archive mr-2"></i><?php echo $lang->get('attachments'); ?></a></li> |
186 | 186 | <?php |
187 | 187 | echo isset($SETTINGS['item_extra_fields']) === true && (int) $SETTINGS['item_extra_fields'] === 1 ? ' |
188 | - <li class="nav-item"><a class="nav-link" href="#tab_4" data-toggle="tab"><i class="fa-solid fa-cubes mr-2"></i>' . $lang->get('fields') . '</a></li>' : ''; |
|
188 | + <li class="nav-item"><a class="nav-link" href="#tab_4" data-toggle="tab"><i class="fa-solid fa-cubes mr-2"></i>' . $lang->get('fields').'</a></li>' : ''; |
|
189 | 189 | ?> |
190 | 190 | </ul> |
191 | 191 | </div><!-- /.card-header --> |
@@ -254,7 +254,7 @@ discard block |
||
254 | 254 | <?php |
255 | 255 | for ($i = 4; $i <= $SETTINGS['pwd_maximum_length']; ++$i) { |
256 | 256 | echo ' |
257 | - <option>' . $i . '</option>'; |
|
257 | + <option>' . $i.'</option>'; |
|
258 | 258 | } |
259 | 259 | ?> |
260 | 260 | </select> |
@@ -284,7 +284,7 @@ discard block |
||
284 | 284 | <span class="ml-2 col-md-1 clear-me-html" id="form-item-icon-show"></span> |
285 | 285 | </div> |
286 | 286 | <small class='form-text text-muted'> |
287 | - <?php echo $lang->get('fontawesome_icon_tip'); ?><a href="<?php echo FONTAWESOME_URL;?>" target="_blank"><i class="fa-solid fa-external-link-alt ml-1"></i></a> |
|
287 | + <?php echo $lang->get('fontawesome_icon_tip'); ?><a href="<?php echo FONTAWESOME_URL; ?>" target="_blank"><i class="fa-solid fa-external-link-alt ml-1"></i></a> |
|
288 | 288 | </small> |
289 | 289 | </div> |
290 | 290 | |
@@ -473,39 +473,39 @@ discard block |
||
473 | 473 | <div class="tab-pane" id="tab_4"> |
474 | 474 | <div id="form-item-field" class="hidden"> |
475 | 475 | <?php |
476 | - $session_item_fields = $session->get('system-item_fields');//print_r($session_item_fields); |
|
476 | + $session_item_fields = $session->get('system-item_fields'); //print_r($session_item_fields); |
|
477 | 477 | if (isset($session_item_fields) === true) { |
478 | 478 | foreach ($session_item_fields as $category) { |
479 | 479 | //print_r($category); |
480 | 480 | echo ' |
481 | - <div class="callout callout-info form-item-category hidden" id="form-item-category-' . $category['id'] . '"> |
|
482 | - <h5>' . $category['title'] . '</h5> |
|
481 | + <div class="callout callout-info form-item-category hidden" id="form-item-category-' . $category['id'].'"> |
|
482 | + <h5>' . $category['title'].'</h5> |
|
483 | 483 | <p>'; |
484 | 484 | foreach ($category['fields'] as $field) { |
485 | 485 | if ($field['type'] === 'textarea') { |
486 | 486 | echo ' |
487 | - <div class="form-group mb-3 form-item-field" id="form-item-field-' . $field['id'] . '" data-field-id="' . $field['id'] . '"> |
|
487 | + <div class="form-group mb-3 form-item-field" id="form-item-field-' . $field['id'].'" data-field-id="'.$field['id'].'"> |
|
488 | 488 | <label>' . $field['title'], |
489 | 489 | $field['is_mandatory'] === '1' ? |
490 | - '<span class="fa-solid fa-fire text-danger ml-1 infotip" title="' . $lang->get('is_mandatory') . '"></span>' : '', |
|
490 | + '<span class="fa-solid fa-fire text-danger ml-1 infotip" title="'.$lang->get('is_mandatory').'"></span>' : '', |
|
491 | 491 | '</label> |
492 | - <textarea class="form-control form-item-control form-item-field-custom" rows="2" data-field-name="' . $field['id'] . '" data-field-mandatory="' . $field['is_mandatory'] . '" data-field-regex="' . $field['regex'] . '" data-change-ongoing="0"></textarea> |
|
492 | + <textarea class="form-control form-item-control form-item-field-custom" rows="2" data-field-name="' . $field['id'].'" data-field-mandatory="'.$field['is_mandatory'].'" data-field-regex="'.$field['regex'].'" data-change-ongoing="0"></textarea> |
|
493 | 493 | </div>'; |
494 | 494 | } else { |
495 | 495 | echo ' |
496 | - <div class="input-group mb-3 form-item-field" id="form-item-field-' . $field['id'] . '" data-field-id="' . $field['id'] . '"> |
|
496 | + <div class="input-group mb-3 form-item-field" id="form-item-field-' . $field['id'].'" data-field-id="'.$field['id'].'"> |
|
497 | 497 | <div class="input-group-prepend"> |
498 | 498 | <span class="input-group-text">' . $field['title'], |
499 | 499 | $field['is_mandatory'] === '1' ? |
500 | - '<span class="fa-solid fa-fire text-danger ml-1 infotip" title="' . $lang->get('is_mandatory') . '"></span>' : '', |
|
500 | + '<span class="fa-solid fa-fire text-danger ml-1 infotip" title="'.$lang->get('is_mandatory').'"></span>' : '', |
|
501 | 501 | '</span> |
502 | 502 | </div> |
503 | - <input type="' . $field['type'] . '" class="form-control form-item-control form-item-field-custom" data-field-name="' . $field['id'] . '" data-field-mandatory="' . $field['is_mandatory'] . '" data-field-regex="' . $field['regex'] . '" data-change-ongoing="0"> |
|
503 | + <input type="' . $field['type'].'" class="form-control form-item-control form-item-field-custom" data-field-name="'.$field['id'].'" data-field-mandatory="'.$field['is_mandatory'].'" data-field-regex="'.$field['regex'].'" data-change-ongoing="0"> |
|
504 | 504 | </div>'; |
505 | 505 | } |
506 | 506 | if (!empty($field['regex'])) { |
507 | 507 | echo ' |
508 | - <div>Regex: '. $field['regex'] .'</div> |
|
508 | + <div>Regex: '. $field['regex'].'</div> |
|
509 | 509 | '; |
510 | 510 | } |
511 | 511 | } |
@@ -516,8 +516,8 @@ discard block |
||
516 | 516 | ) { |
517 | 517 | echo ' |
518 | 518 | <div class="form-check icheck-blue"> |
519 | - <input type="checkbox" class="form-check-input form-check-input-template form-item-control flat-blue" data-category-id="' . $category['id'] . '" data-change-ongoing="0" data-field-name="template" id="template_' . $category['id'] . '"> |
|
520 | - <label class="form-check-label ml-3" for="template_' . $category['id'] . '">' . $lang->get('main_template') . '</label> |
|
519 | + <input type="checkbox" class="form-check-input form-check-input-template form-item-control flat-blue" data-category-id="' . $category['id'].'" data-change-ongoing="0" data-field-name="template" id="template_'.$category['id'].'"> |
|
520 | + <label class="form-check-label ml-3" for="template_' . $category['id'].'">'.$lang->get('main_template').'</label> |
|
521 | 521 | </div>'; |
522 | 522 | } |
523 | 523 | echo ' |
@@ -527,8 +527,8 @@ discard block |
||
527 | 527 | } else { |
528 | 528 | echo |
529 | 529 | '<div class="alert alert-info"> |
530 | - <h5><i class="icon fa fa-info mr-3"></i>' . $lang->get('information') . '</h5> |
|
531 | - ' . $lang->get('no_fields') . ' |
|
530 | + <h5><i class="icon fa fa-info mr-3"></i>' . $lang->get('information').'</h5> |
|
531 | + ' . $lang->get('no_fields').' |
|
532 | 532 | </div>'; |
533 | 533 | } ?> |
534 | 534 | </div> |
@@ -669,7 +669,7 @@ discard block |
||
669 | 669 | <p><?php |
670 | 670 | echo str_replace( |
671 | 671 | ['##otv_expiration_period##', '. '], |
672 | - ['<span class="text-bold text-primary">' . $SETTINGS['otv_expiration_period'] . '</span>', '<br>'], |
|
672 | + ['<span class="text-bold text-primary">'.$SETTINGS['otv_expiration_period'].'</span>', '<br>'], |
|
673 | 673 | $lang->get('otv_message') |
674 | 674 | ); |
675 | 675 | ?></p> |
@@ -687,9 +687,9 @@ discard block |
||
687 | 687 | |
688 | 688 | <div class="row"> |
689 | 689 | <div class="form-group col-4"> |
690 | - <label for="form-item-otv-days"><i class="fa-regular fa-calendar-days mr-2"></i><?php echo $lang->get('number_of_days'); ?> (<?php echo $lang->get('maximum').': '.$SETTINGS['otv_expiration_period'];?>)</label> |
|
690 | + <label for="form-item-otv-days"><i class="fa-regular fa-calendar-days mr-2"></i><?php echo $lang->get('number_of_days'); ?> (<?php echo $lang->get('maximum').': '.$SETTINGS['otv_expiration_period']; ?>)</label> |
|
691 | 691 | <div class="input-group mb-3"> |
692 | - <input type="number" class="form-control clear-me-val" id="form-item-otv-days" min="0" max="<?php echo $SETTINGS['otv_expiration_period'];?>" value="<?php echo $SETTINGS['otv_expiration_period'];?>"> |
|
692 | + <input type="number" class="form-control clear-me-val" id="form-item-otv-days" min="0" max="<?php echo $SETTINGS['otv_expiration_period']; ?>" value="<?php echo $SETTINGS['otv_expiration_period']; ?>"> |
|
693 | 693 | </div> |
694 | 694 | </div> |
695 | 695 | |
@@ -777,7 +777,7 @@ discard block |
||
777 | 777 | <select class="form-control form-folder-control select2" style="width:100%;" id="form-folder-add-complexicity" required> |
778 | 778 | <?php |
779 | 779 | foreach (TP_PW_COMPLEXITY as $key => $value) { |
780 | - echo '<option value="' . $key . '">' . $value[1] . '</option>'; |
|
780 | + echo '<option value="'.$key.'">'.$value[1].'</option>'; |
|
781 | 781 | } |
782 | 782 | ?> |
783 | 783 | </select> |
@@ -795,14 +795,14 @@ discard block |
||
795 | 795 | <label><?php echo $lang->get('icon'); ?></label> |
796 | 796 | <input type="text" class="form-control form-folder-control" id="form-folder-add-icon"> |
797 | 797 | <small class='form-text text-muted'> |
798 | - <?php echo $lang->get('fontawesome_icon_tip'); ?><a href="<?php echo FONTAWESOME_URL;?>" target="_blank"><i class="fa-solid fa-external-link-alt ml-1"></i></a> |
|
798 | + <?php echo $lang->get('fontawesome_icon_tip'); ?><a href="<?php echo FONTAWESOME_URL; ?>" target="_blank"><i class="fa-solid fa-external-link-alt ml-1"></i></a> |
|
799 | 799 | </small> |
800 | 800 | </div> |
801 | 801 | <div class="form-group"> |
802 | 802 | <label><?php echo $lang->get('icon_on_selection'); ?></label> |
803 | 803 | <input type="text" class="form-control form-folder-control" id="form-folder-add-icon-selected"> |
804 | 804 | <small class='form-text text-muted'> |
805 | - <?php echo $lang->get('fontawesome_icon_tip'); ?><a href="<?php echo FONTAWESOME_URL;?>" target="_blank"><i class="fa-solid fa-external-link-alt ml-1"></i></a> |
|
805 | + <?php echo $lang->get('fontawesome_icon_tip'); ?><a href="<?php echo FONTAWESOME_URL; ?>" target="_blank"><i class="fa-solid fa-external-link-alt ml-1"></i></a> |
|
806 | 806 | </small> |
807 | 807 | </div> |
808 | 808 | </div> |
@@ -1213,18 +1213,18 @@ discard block |
||
1213 | 1213 | <?php |
1214 | 1214 | foreach ($session_item_fields as $elem) { |
1215 | 1215 | echo ' |
1216 | - <div class="callout callout-info card-item-category hidden" id="card-item-category-' . $elem['id'] . '"> |
|
1217 | - <h5>' . $elem['title'] . '</h5> |
|
1216 | + <div class="callout callout-info card-item-category hidden" id="card-item-category-' . $elem['id'].'"> |
|
1217 | + <h5>' . $elem['title'].'</h5> |
|
1218 | 1218 | <p> |
1219 | 1219 | <ul class="list-group list-group-unbordered mb-3">'; |
1220 | 1220 | foreach ($elem['fields'] as $field) { |
1221 | 1221 | echo ' |
1222 | - <li class="list-group-item card-item-field hidden" id="card-item-field-' . $field['id'] . '"> |
|
1223 | - <span id="card-item-field-title-' . $field['id'] . '"><b>' . $field['title'] . '</b></span> |
|
1224 | - <button type="button" class="float-right btn btn-secondary btn-sm ml-1 btn-copy-clipboard-clear" data-clipboard-target="#card-item-field-value-' . $field['id'] . '"> |
|
1222 | + <li class="list-group-item card-item-field hidden" id="card-item-field-' . $field['id'].'"> |
|
1223 | + <span id="card-item-field-title-' . $field['id'].'"><b>'.$field['title'].'</b></span> |
|
1224 | + <button type="button" class="float-right btn btn-secondary btn-sm ml-1 btn-copy-clipboard-clear" data-clipboard-target="#card-item-field-value-' . $field['id'].'"> |
|
1225 | 1225 | <i class="fa-solid fa-copy"></i> |
1226 | 1226 | </button> |
1227 | - <span class="card-item-field-value float-right ml-1" id="card-item-field-value-' . $field['id'] . '"></span> |
|
1227 | + <span class="card-item-field-value float-right ml-1" id="card-item-field-value-' . $field['id'].'"></span> |
|
1228 | 1228 | </li>'; |
1229 | 1229 | } |
1230 | 1230 | echo ' |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | if ($checkUserAccess->checkSession() === false || $checkUserAccess->userAccessPage('admin') === false) { |
69 | 69 | // Not allowed page |
70 | 70 | $session->set('system-error_code', ERR_NOT_ALLOWED); |
71 | - include $SETTINGS['cpassman_dir'] . '/error.php'; |
|
71 | + include $SETTINGS['cpassman_dir'].'/error.php'; |
|
72 | 72 | exit; |
73 | 73 | } |
74 | 74 | |
@@ -149,7 +149,7 @@ discard block |
||
149 | 149 | // error |
150 | 150 | toastr.remove(); |
151 | 151 | toastr.error( |
152 | - '<?php echo $lang->get('server_answer_error') . '<br />' . $lang->get('server_returned_data') . ':<br />'; ?>' + data.error, |
|
152 | + '<?php echo $lang->get('server_answer_error').'<br />'.$lang->get('server_returned_data').':<br />'; ?>' + data.error, |
|
153 | 153 | '', { |
154 | 154 | closeButton: true, |
155 | 155 | positionClass: 'toast-bottom-right' |
@@ -223,7 +223,7 @@ discard block |
||
223 | 223 | // error |
224 | 224 | toastr.remove(); |
225 | 225 | toastr.error( |
226 | - '<?php echo $lang->get('server_answer_error') . '<br />' . $lang->get('server_returned_data') . ':<br />'; ?>' + data.error, |
|
226 | + '<?php echo $lang->get('server_answer_error').'<br />'.$lang->get('server_returned_data').':<br />'; ?>' + data.error, |
|
227 | 227 | '', { |
228 | 228 | closeButton: true, |
229 | 229 | positionClass: 'toast-bottom-right' |
@@ -271,7 +271,7 @@ discard block |
||
271 | 271 | // error |
272 | 272 | toastr.remove(); |
273 | 273 | toastr.error( |
274 | - '<?php echo $lang->get('server_answer_error') . '<br />' . $lang->get('server_returned_data') . ':<br />'; ?>' + data.error, |
|
274 | + '<?php echo $lang->get('server_answer_error').'<br />'.$lang->get('server_returned_data').':<br />'; ?>' + data.error, |
|
275 | 275 | '', { |
276 | 276 | closeButton: true, |
277 | 277 | positionClass: 'toast-bottom-right' |
@@ -73,7 +73,7 @@ discard block |
||
73 | 73 | if ($checkUserAccess->checkSession() === false || $checkUserAccess->userAccessPage('tasks') === false) { |
74 | 74 | // Not allowed page |
75 | 75 | $session->set('system-error_code', ERR_NOT_ALLOWED); |
76 | - include $SETTINGS['cpassman_dir'] . '/error.php'; |
|
76 | + include $SETTINGS['cpassman_dir'].'/error.php'; |
|
77 | 77 | exit; |
78 | 78 | } |
79 | 79 | ?> |
@@ -370,7 +370,7 @@ discard block |
||
370 | 370 | // error |
371 | 371 | toastr.remove(); |
372 | 372 | toastr.error( |
373 | - '<?php echo $lang->get('server_answer_error') . '<br />' . $lang->get('server_returned_data') . ':<br />'; ?>' + data.error, |
|
373 | + '<?php echo $lang->get('server_answer_error').'<br />'.$lang->get('server_returned_data').':<br />'; ?>' + data.error, |
|
374 | 374 | '', { |
375 | 375 | closeButton: true, |
376 | 376 | positionClass: 'toast-bottom-right' |
@@ -393,11 +393,11 @@ discard block |
||
393 | 393 | $('#'+field+'_parameter_value').val(frequency === null ? '' : frequency + ';' +value,); |
394 | 394 | param = value.split(';'); |
395 | 395 | if (param.length === 1) { |
396 | - txt = ' <?php echo $lang->get('at');?> ' + param[0]; |
|
396 | + txt = ' <?php echo $lang->get('at'); ?> ' + param[0]; |
|
397 | 397 | } else { |
398 | - txt = ' <?php echo $lang->get('day');?> ' + param[1] + ' <?php echo $lang->get('at');?> ' + param[0]; |
|
398 | + txt = ' <?php echo $lang->get('day'); ?> ' + param[1] + ' <?php echo $lang->get('at'); ?> ' + param[0]; |
|
399 | 399 | } |
400 | - $('#'+field+'_parameter').val(frequency === null ? '<?php echo $lang->get('not_defined');?>' : (data.message + txt)); |
|
400 | + $('#'+field+'_parameter').val(frequency === null ? '<?php echo $lang->get('not_defined'); ?>' : (data.message + txt)); |
|
401 | 401 | $("#task-define-modal").modal('hide'); |
402 | 402 | $('#task-define-modal-type, #task-define-modal-parameter-hourly-value, #task-define-modal-parameter-daily-value, #task-define-modal-frequency').val(''); |
403 | 403 | } |
@@ -503,7 +503,7 @@ discard block |
||
503 | 503 | // error |
504 | 504 | toastr.remove(); |
505 | 505 | toastr.error( |
506 | - '<?php echo $lang->get('server_answer_error') . '<br />' . $lang->get('server_returned_data') . ':<br />'; ?>' + data.error, |
|
506 | + '<?php echo $lang->get('server_answer_error').'<br />'.$lang->get('server_returned_data').':<br />'; ?>' + data.error, |
|
507 | 507 | '', { |
508 | 508 | closeButton: true, |
509 | 509 | positionClass: 'toast-bottom-right' |
@@ -564,7 +564,7 @@ discard block |
||
564 | 564 | // error |
565 | 565 | toastr.remove(); |
566 | 566 | toastr.error( |
567 | - '<?php echo $lang->get('server_answer_error') . '<br />' . $lang->get('server_returned_data') . ':<br />'; ?>' + data.error, |
|
567 | + '<?php echo $lang->get('server_answer_error').'<br />'.$lang->get('server_returned_data').':<br />'; ?>' + data.error, |
|
568 | 568 | '', { |
569 | 569 | closeButton: true, |
570 | 570 | positionClass: 'toast-bottom-right' |
@@ -71,7 +71,7 @@ |
||
71 | 71 | if ($checkUserAccess->checkSession() === false || $checkUserAccess->userAccessPage('oauth') === false) { |
72 | 72 | // Not allowed page |
73 | 73 | $session->set('system-error_code', ERR_NOT_ALLOWED); |
74 | - include $SETTINGS['cpassman_dir'] . '/error.php'; |
|
74 | + include $SETTINGS['cpassman_dir'].'/error.php'; |
|
75 | 75 | exit; |
76 | 76 | } |
77 | 77 |
@@ -70,7 +70,7 @@ discard block |
||
70 | 70 | $emailService = new EmailService(); |
71 | 71 | $rows = DB::query( |
72 | 72 | 'SELECT * |
73 | - FROM ' . prefixTable('background_tasks') . ' |
|
73 | + FROM ' . prefixTable('background_tasks').' |
|
74 | 74 | WHERE is_in_progress = %i AND process_type = %s |
75 | 75 | ORDER BY increment_id ASC LIMIT 0,10', |
76 | 76 | 0, |
@@ -138,7 +138,7 @@ discard block |
||
138 | 138 | |
139 | 139 | //if ((int) $SETTINGS['enable_backlog_mail'] === 1) { |
140 | 140 | $row = DB::queryFirstRow( |
141 | - 'SELECT valeur FROM ' . prefixTable('misc') . ' WHERE type = %s AND intitule = %s', |
|
141 | + 'SELECT valeur FROM '.prefixTable('misc').' WHERE type = %s AND intitule = %s', |
|
142 | 142 | 'cron', |
143 | 143 | 'sending_emails' |
144 | 144 | ); |
@@ -146,7 +146,7 @@ discard block |
||
146 | 146 | if ((int) (time() - $row['valeur']) >= 300 || (int) $row['valeur'] === 0) { |
147 | 147 | $rows = DB::query( |
148 | 148 | 'SELECT * |
149 | - FROM ' . prefixTable('emails') . |
|
149 | + FROM ' . prefixTable('emails'). |
|
150 | 150 | ' WHERE status != %s', |
151 | 151 | 'sent' |
152 | 152 | ); |
@@ -71,7 +71,7 @@ |
||
71 | 71 | function reloadCacheTable(): void |
72 | 72 | { |
73 | 73 | // Load expected files |
74 | - require_once __DIR__. '/../sources/main.functions.php'; |
|
74 | + require_once __DIR__.'/../sources/main.functions.php'; |
|
75 | 75 | |
76 | 76 | updateCacheTable('reload', NULL); |
77 | 77 | } |
78 | 78 | \ No newline at end of file |
@@ -137,14 +137,14 @@ discard block |
||
137 | 137 | && $t->personal_folder == 0 |
138 | 138 | ) { |
139 | 139 | // get $t->parent_id |
140 | - $data = DB::queryFirstRow('SELECT title FROM ' . prefixTable('nested_tree') . ' WHERE id = %i', $t->parent_id); |
|
140 | + $data = DB::queryFirstRow('SELECT title FROM '.prefixTable('nested_tree').' WHERE id = %i', $t->parent_id); |
|
141 | 141 | if ($t->nlevel == 1) { |
142 | 142 | $data['title'] = $lang->get('root'); |
143 | 143 | } |
144 | 144 | |
145 | 145 | // get rights on this folder |
146 | 146 | $arrayRights = array(); |
147 | - $rows = DB::query('SELECT fonction_id FROM ' . prefixTable('rights') . ' WHERE authorized=%i AND tree_id = %i', 1, $t->id); |
|
147 | + $rows = DB::query('SELECT fonction_id FROM '.prefixTable('rights').' WHERE authorized=%i AND tree_id = %i', 1, $t->id); |
|
148 | 148 | foreach ($rows as $record) { |
149 | 149 | array_push($arrayRights, $record['fonction_id']); |
150 | 150 | } |
@@ -162,8 +162,8 @@ discard block |
||
162 | 162 | 'SELECT m.valeur AS valeur, n.renewal_period AS renewal_period, |
163 | 163 | n.bloquer_creation AS bloquer_creation, n.bloquer_modification AS bloquer_modification, |
164 | 164 | n.fa_icon, n.fa_icon_selected |
165 | - FROM ' . prefixTable('misc') . ' AS m, |
|
166 | - ' . prefixTable('nested_tree') . ' AS n |
|
165 | + FROM ' . prefixTable('misc').' AS m, |
|
166 | + ' . prefixTable('nested_tree').' AS n |
|
167 | 167 | WHERE m.type=%s AND m.intitule = n.id AND m.intitule = %i', |
168 | 168 | 'complex', |
169 | 169 | $t->id |
@@ -191,16 +191,16 @@ discard block |
||
191 | 191 | $arrayColumns['folderComplexity'] = ''; |
192 | 192 | } |
193 | 193 | |
194 | - if (is_null($node_data)=== false) { |
|
194 | + if (is_null($node_data) === false) { |
|
195 | 195 | $arrayColumns['renewalPeriod'] = (int) $node_data['renewal_period']; |
196 | 196 | } else { |
197 | - $arrayColumns['renewalPeriod']=0; |
|
197 | + $arrayColumns['renewalPeriod'] = 0; |
|
198 | 198 | } |
199 | 199 | |
200 | 200 | //col7 |
201 | 201 | $data7 = DB::queryFirstRow( |
202 | 202 | 'SELECT bloquer_creation,bloquer_modification |
203 | - FROM ' . prefixTable('nested_tree') . ' |
|
203 | + FROM ' . prefixTable('nested_tree').' |
|
204 | 204 | WHERE id = %i', |
205 | 205 | intval($t->id) |
206 | 206 | ); |
@@ -359,7 +359,7 @@ discard block |
||
359 | 359 | // Get info about this folder |
360 | 360 | $dataFolder = DB::queryfirstrow( |
361 | 361 | 'SELECT * |
362 | - FROM ' . prefixTable('nested_tree') . ' |
|
362 | + FROM ' . prefixTable('nested_tree').' |
|
363 | 363 | WHERE id = %i', |
364 | 364 | $inputData['id'] |
365 | 365 | ); |
@@ -395,7 +395,7 @@ discard block |
||
395 | 395 | //check if parent folder is personal |
396 | 396 | $dataParent = DB::queryfirstrow( |
397 | 397 | 'SELECT personal_folder, bloquer_creation, bloquer_modification |
398 | - FROM ' . prefixTable('nested_tree') . ' |
|
398 | + FROM ' . prefixTable('nested_tree').' |
|
399 | 399 | WHERE id = %i', |
400 | 400 | $inputData['parentId'] |
401 | 401 | ); |
@@ -424,7 +424,7 @@ discard block |
||
424 | 424 | // get complexity level for this folder |
425 | 425 | $data = DB::queryfirstrow( |
426 | 426 | 'SELECT valeur |
427 | - FROM ' . prefixTable('misc') . ' |
|
427 | + FROM ' . prefixTable('misc').' |
|
428 | 428 | WHERE intitule = %i AND type = %s', |
429 | 429 | $inputData['parentId'], |
430 | 430 | 'complex' |
@@ -435,7 +435,7 @@ discard block |
||
435 | 435 | array( |
436 | 436 | 'error' => true, |
437 | 437 | 'message' => $lang->get('error_folder_complexity_lower_than_top_folder') |
438 | - . ' [<b>' . TP_PW_COMPLEXITY[$data['valeur']][1] . '</b>]', |
|
438 | + . ' [<b>'.TP_PW_COMPLEXITY[$data['valeur']][1].'</b>]', |
|
439 | 439 | ), |
440 | 440 | 'encode' |
441 | 441 | ); |
@@ -596,7 +596,7 @@ discard block |
||
596 | 596 | // Check if parent folder is personal |
597 | 597 | $dataParent = DB::queryfirstrow( |
598 | 598 | 'SELECT personal_folder |
599 | - FROM ' . prefixTable('nested_tree') . ' |
|
599 | + FROM ' . prefixTable('nested_tree').' |
|
600 | 600 | WHERE id = %i', |
601 | 601 | $inputData['parentId'] |
602 | 602 | ); |
@@ -636,7 +636,7 @@ discard block |
||
636 | 636 | echo prepareExchangedData( |
637 | 637 | array( |
638 | 638 | 'error' => $creationStatus['error'], |
639 | - 'message' => $creationStatus['error'] === true ? $lang->get('error_not_allowed_to') : $lang->get('folder_created') , |
|
639 | + 'message' => $creationStatus['error'] === true ? $lang->get('error_not_allowed_to') : $lang->get('folder_created'), |
|
640 | 640 | 'newId' => $creationStatus['newId'], |
641 | 641 | ), |
642 | 642 | 'encode' |
@@ -684,7 +684,7 @@ discard block |
||
684 | 684 | echo prepareExchangedData( |
685 | 685 | array( |
686 | 686 | 'error' => true, |
687 | - 'message' => $lang->get('error_not_allowed_to'). " (You can't delete the root folder)", |
|
687 | + 'message' => $lang->get('error_not_allowed_to')." (You can't delete the root folder)", |
|
688 | 688 | ), |
689 | 689 | 'encode' |
690 | 690 | ); |
@@ -694,7 +694,7 @@ discard block |
||
694 | 694 | // Ensure that user has access to all folders |
695 | 695 | $foldersAccessible = DB::query( |
696 | 696 | 'SELECT id |
697 | - FROM ' . prefixTable('nested_tree') . ' |
|
697 | + FROM ' . prefixTable('nested_tree').' |
|
698 | 698 | WHERE id IN %li AND id IN %li', |
699 | 699 | $post_folders, |
700 | 700 | $session->get('user-accessible_folders') |
@@ -708,7 +708,7 @@ discard block |
||
708 | 708 | echo prepareExchangedData( |
709 | 709 | array( |
710 | 710 | 'error' => true, |
711 | - 'message' => $lang->get('error_not_allowed_to') . ' (The following folders are not accessible or do not exist: ' . implode(', ', $missingFolders) . ')', |
|
711 | + 'message' => $lang->get('error_not_allowed_to').' (The following folders are not accessible or do not exist: '.implode(', ', $missingFolders).')', |
|
712 | 712 | ), |
713 | 713 | 'encode' |
714 | 714 | ); |
@@ -725,7 +725,7 @@ discard block |
||
725 | 725 | // Check if parent folder is personal |
726 | 726 | $dataParent = DB::queryfirstrow( |
727 | 727 | 'SELECT personal_folder |
728 | - FROM ' . prefixTable('nested_tree') . ' |
|
728 | + FROM ' . prefixTable('nested_tree').' |
|
729 | 729 | WHERE id = %i', |
730 | 730 | $folderId |
731 | 731 | ); |
@@ -771,10 +771,10 @@ discard block |
||
771 | 771 | prefixTable('misc'), |
772 | 772 | array( |
773 | 773 | 'type' => 'folder_deleted', |
774 | - 'intitule' => 'f' . $thisSubFolders->id, |
|
775 | - 'valeur' => $thisSubFolders->id . ', ' . $thisSubFolders->parent_id . ', ' . |
|
776 | - $thisSubFolders->title . ', ' . $thisSubFolders->nleft . ', ' . $thisSubFolders->nright . ', ' . |
|
777 | - $thisSubFolders->nlevel . ', 0, 0, 0, 0', |
|
774 | + 'intitule' => 'f'.$thisSubFolders->id, |
|
775 | + 'valeur' => $thisSubFolders->id.', '.$thisSubFolders->parent_id.', '. |
|
776 | + $thisSubFolders->title.', '.$thisSubFolders->nleft.', '.$thisSubFolders->nright.', '. |
|
777 | + $thisSubFolders->nlevel.', 0, 0, 0, 0', |
|
778 | 778 | 'created_at' => time(), |
779 | 779 | ) |
780 | 780 | ); |
@@ -783,7 +783,7 @@ discard block |
||
783 | 783 | |
784 | 784 | //delete items & logs |
785 | 785 | $itemsInSubFolder = DB::query( |
786 | - 'SELECT id FROM ' . prefixTable('items') . ' |
|
786 | + 'SELECT id FROM '.prefixTable('items').' |
|
787 | 787 | WHERE id_tree=%i', |
788 | 788 | $thisSubFolders->id |
789 | 789 | ); |
@@ -813,7 +813,7 @@ discard block |
||
813 | 813 | } |
814 | 814 | |
815 | 815 | //Update CACHE table |
816 | - updateCacheTable('delete_value',(int) $item['id']); |
|
816 | + updateCacheTable('delete_value', (int) $item['id']); |
|
817 | 817 | } |
818 | 818 | |
819 | 819 | //Actualize the variable |
@@ -923,7 +923,7 @@ discard block |
||
923 | 923 | // Check if target parent folder is personal |
924 | 924 | $dataParent = DB::queryfirstrow( |
925 | 925 | 'SELECT personal_folder |
926 | - FROM ' . prefixTable('nested_tree') . ' |
|
926 | + FROM ' . prefixTable('nested_tree').' |
|
927 | 927 | WHERE id = %i', |
928 | 928 | $post_target_folder_id |
929 | 929 | ); |
@@ -977,7 +977,7 @@ discard block |
||
977 | 977 | // get complexity of current node |
978 | 978 | $nodeComplexity = DB::queryfirstrow( |
979 | 979 | 'SELECT valeur |
980 | - FROM ' . prefixTable('misc') . ' |
|
980 | + FROM ' . prefixTable('misc').' |
|
981 | 981 | WHERE intitule = %i AND type= %s', |
982 | 982 | $nodeInfo->id, |
983 | 983 | 'complex' |
@@ -1054,7 +1054,7 @@ discard block |
||
1054 | 1054 | // If it is a subfolder, then give access to it for all roles that allows the parent folder |
1055 | 1055 | $rows = DB::query( |
1056 | 1056 | 'SELECT role_id, type |
1057 | - FROM ' . prefixTable('roles_values') . ' |
|
1057 | + FROM ' . prefixTable('roles_values').' |
|
1058 | 1058 | WHERE folder_id = %i', |
1059 | 1059 | $parentId |
1060 | 1060 | ); |
@@ -1062,7 +1062,7 @@ discard block |
||
1062 | 1062 | // Add access to this subfolder after checking that it is not already set |
1063 | 1063 | DB::query( |
1064 | 1064 | 'SELECT * |
1065 | - FROM ' . prefixTable('roles_values') . ' |
|
1065 | + FROM ' . prefixTable('roles_values').' |
|
1066 | 1066 | WHERE folder_id = %i AND role_id = %i', |
1067 | 1067 | $newFolderId, |
1068 | 1068 | $record['role_id'] |
@@ -1082,7 +1082,7 @@ discard block |
||
1082 | 1082 | // if parent folder has Custom Fields Categories then add to this child one too |
1083 | 1083 | $rows = DB::query( |
1084 | 1084 | 'SELECT id_category |
1085 | - FROM ' . prefixTable('categories_folders') . ' |
|
1085 | + FROM ' . prefixTable('categories_folders').' |
|
1086 | 1086 | WHERE id_folder = %i', |
1087 | 1087 | $nodeInfo->id |
1088 | 1088 | ); |
@@ -1101,7 +1101,7 @@ discard block |
||
1101 | 1101 | |
1102 | 1102 | $rows = DB::query( |
1103 | 1103 | 'SELECT * |
1104 | - FROM ' . prefixTable('items') . ' |
|
1104 | + FROM ' . prefixTable('items').' |
|
1105 | 1105 | WHERE id_tree = %i', |
1106 | 1106 | $nodeInfo->id |
1107 | 1107 | ); |
@@ -1110,7 +1110,7 @@ discard block |
||
1110 | 1110 | // if it is then don't copy it |
1111 | 1111 | $item_deleted = DB::queryFirstRow( |
1112 | 1112 | 'SELECT * |
1113 | - FROM ' . prefixTable('log_items') . ' |
|
1113 | + FROM ' . prefixTable('log_items').' |
|
1114 | 1114 | WHERE id_item = %i AND action = %s |
1115 | 1115 | ORDER BY date DESC |
1116 | 1116 | LIMIT 0, 1', |
@@ -1121,7 +1121,7 @@ discard block |
||
1121 | 1121 | |
1122 | 1122 | $item_restored = DB::queryFirstRow( |
1123 | 1123 | 'SELECT * |
1124 | - FROM ' . prefixTable('log_items') . ' |
|
1124 | + FROM ' . prefixTable('log_items').' |
|
1125 | 1125 | WHERE id_item = %i AND action = %s |
1126 | 1126 | ORDER BY date DESC |
1127 | 1127 | LIMIT 0, 1', |
@@ -1136,7 +1136,7 @@ discard block |
||
1136 | 1136 | // Get the ITEM object key for the user |
1137 | 1137 | $userKey = DB::queryFirstRow( |
1138 | 1138 | 'SELECT share_key |
1139 | - FROM ' . prefixTable('sharekeys_items') . ' |
|
1139 | + FROM ' . prefixTable('sharekeys_items').' |
|
1140 | 1140 | WHERE user_id = %i AND object_id = %i', |
1141 | 1141 | $session->get('user-id'), |
1142 | 1142 | $record['id'] |
@@ -1209,7 +1209,7 @@ discard block |
||
1209 | 1209 | // Manage Custom Fields |
1210 | 1210 | $categories = DB::query( |
1211 | 1211 | 'SELECT * |
1212 | - FROM ' . prefixTable('categories_items') . ' |
|
1212 | + FROM ' . prefixTable('categories_items').' |
|
1213 | 1213 | WHERE item_id = %i', |
1214 | 1214 | $record['id'] |
1215 | 1215 | ); |
@@ -1256,15 +1256,15 @@ discard block |
||
1256 | 1256 | $files = DB::query( |
1257 | 1257 | 'SELECT f.id AS id, f.file AS file, f.name AS name, f.status AS status, f.extension AS extension, |
1258 | 1258 | f.size AS size, f.type AS type, s.share_key AS share_key |
1259 | - FROM ' . prefixTable('files') . ' AS f |
|
1260 | - INNER JOIN ' . prefixTable('sharekeys_files') . ' AS s ON (f.id = s.object_id) |
|
1259 | + FROM ' . prefixTable('files').' AS f |
|
1260 | + INNER JOIN ' . prefixTable('sharekeys_files').' AS s ON (f.id = s.object_id) |
|
1261 | 1261 | WHERE s.user_id = %i AND f.id_item = %i', |
1262 | 1262 | $session->get('user-id'), |
1263 | 1263 | $record['id'] |
1264 | 1264 | ); |
1265 | 1265 | foreach ($files as $file) { |
1266 | 1266 | // Check if file still exists |
1267 | - if (file_exists($SETTINGS['path_to_upload_folder'] . DIRECTORY_SEPARATOR . TP_FILE_PREFIX . base64_decode($file['file'])) === true) { |
|
1267 | + if (file_exists($SETTINGS['path_to_upload_folder'].DIRECTORY_SEPARATOR.TP_FILE_PREFIX.base64_decode($file['file'])) === true) { |
|
1268 | 1268 | // Step1 - decrypt the file |
1269 | 1269 | $fileContent = decryptFile( |
1270 | 1270 | $file['file'], |
@@ -1274,9 +1274,9 @@ discard block |
||
1274 | 1274 | |
1275 | 1275 | // Step2 - create file |
1276 | 1276 | // deepcode ignore InsecureHash: Is not a password, just a random string for a file name |
1277 | - $newFileName = md5(time() . '_' . $file['id']) . '.' . $file['extension']; |
|
1277 | + $newFileName = md5(time().'_'.$file['id']).'.'.$file['extension']; |
|
1278 | 1278 | |
1279 | - $outstream = fopen($SETTINGS['path_to_upload_folder'] . DIRECTORY_SEPARATOR . $newFileName, 'ab'); |
|
1279 | + $outstream = fopen($SETTINGS['path_to_upload_folder'].DIRECTORY_SEPARATOR.$newFileName, 'ab'); |
|
1280 | 1280 | if ($outstream === false) { |
1281 | 1281 | echo prepareExchangedData( |
1282 | 1282 | array( |
@@ -1425,7 +1425,7 @@ discard block |
||
1425 | 1425 | // Get path |
1426 | 1426 | $text = ''; |
1427 | 1427 | foreach ($tree->getPath($folder->id, false) as $fld) { |
1428 | - $text .= empty($text) === true ? ' [<i>' . $fld->title : ' > ' . $fld->title; |
|
1428 | + $text .= empty($text) === true ? ' [<i>'.$fld->title : ' > '.$fld->title; |
|
1429 | 1429 | } |
1430 | 1430 | |
1431 | 1431 | // Save array |
@@ -1435,7 +1435,7 @@ discard block |
||
1435 | 1435 | 'id' => (int) $folder->id, |
1436 | 1436 | 'label' => $folder->title, |
1437 | 1437 | 'level' => $folder->nlevel, |
1438 | - 'path' => empty($text) === true ? '' : $text . '</i>]' |
|
1438 | + 'path' => empty($text) === true ? '' : $text.'</i>]' |
|
1439 | 1439 | ) |
1440 | 1440 | ); |
1441 | 1441 | } |
@@ -74,7 +74,7 @@ discard block |
||
74 | 74 | ) { |
75 | 75 | // Not allowed page |
76 | 76 | $session->set('system-error_code', ERR_NOT_ALLOWED); |
77 | - include $SETTINGS['cpassman_dir'] . '/error.php'; |
|
77 | + include $SETTINGS['cpassman_dir'].'/error.php'; |
|
78 | 78 | exit; |
79 | 79 | } |
80 | 80 | |
@@ -130,7 +130,7 @@ discard block |
||
130 | 130 | |
131 | 131 | if ( |
132 | 132 | is_array($dataReceived) && // check if the data is an array |
133 | - array_diff_key(array_flip($requiredKeys), $dataReceived) === [] && // check if all required keys have a valuekeys are present |
|
133 | + array_diff_key(array_flip($requiredKeys), $dataReceived) === [] && // check if all required keys have a valuekeys are present |
|
134 | 134 | count(array_filter($dataReceived)) === count($requiredKeys) && // check if all required |
135 | 135 | in_array($dataReceived['action'], ['at_password_shown', 'at_password_copied'], true) && // only log these actions |
136 | 136 | $session->get('user-id') === (int) filter_var($dataReceived['user_id'], FILTER_SANITIZE_NUMBER_INT) // only log actions of the current user |
@@ -175,7 +175,7 @@ discard block |
||
175 | 175 | |
176 | 176 | // Show passwords inputs and form |
177 | 177 | $('#dialog-user-change-password-info') |
178 | - .html('<i class="icon fa-solid fa-info mr-2"></i><?php echo $lang->get('user_has_to_change_password_info');?>') |
|
178 | + .html('<i class="icon fa-solid fa-info mr-2"></i><?php echo $lang->get('user_has_to_change_password_info'); ?>') |
|
179 | 179 | .removeClass('hidden'); |
180 | 180 | $('#dialog-user-change-password').removeClass('hidden'); |
181 | 181 | |
@@ -188,7 +188,7 @@ discard block |
||
188 | 188 | |
189 | 189 | // Show passwords inputs and form |
190 | 190 | $('#dialog-ldap-user-change-password-info') |
191 | - .html('<i class="icon fa-solid fa-info mr-2"></i><?php echo $lang->get('ldap_user_has_changed_his_password');?>') |
|
191 | + .html('<i class="icon fa-solid fa-info mr-2"></i><?php echo $lang->get('ldap_user_has_changed_his_password'); ?>') |
|
192 | 192 | .removeClass('hidden'); |
193 | 193 | $('#dialog-ldap-user-change-password').removeClass('hidden'); |
194 | 194 | |
@@ -216,7 +216,7 @@ discard block |
||
216 | 216 | |
217 | 217 | if (data.queryResults.auth_type === 'oauth2') { |
218 | 218 | // LDAP or local account to OAuth2 account |
219 | - var info_message = '<?php echo $lang->get('oauth2_need_user_old_password');?>'; |
|
219 | + var info_message = '<?php echo $lang->get('oauth2_need_user_old_password'); ?>'; |
|
220 | 220 | |
221 | 221 | // Hide the "new password" field that users can't fill in manually |
222 | 222 | $('#new-password-field').hide(); |
@@ -228,7 +228,7 @@ discard block |
||
228 | 228 | $('#dialog-ldap-user-change-password-current').val(oauth2_encryption_hash); |
229 | 229 | } else { |
230 | 230 | // LDAP password updated |
231 | - var info_message = '<?php echo $lang->get('ldap_user_has_changed_his_password');?>'; |
|
231 | + var info_message = '<?php echo $lang->get('ldap_user_has_changed_his_password'); ?>'; |
|
232 | 232 | } |
233 | 233 | |
234 | 234 | // Display info tip |
@@ -339,7 +339,7 @@ discard block |
||
339 | 339 | /*console.log('User has to regenerate keys') |
340 | 340 | // HIde |
341 | 341 | $('.content-header, .content').addClass('hidden'); |
342 | - $('#dialog-user-temporary-code-info').html('<i class="icon fa-solid fa-info mr-2"></i><?php echo $lang->get('renecyption_expected');?>'); |
|
342 | + $('#dialog-user-temporary-code-info').html('<i class="icon fa-solid fa-info mr-2"></i><?php echo $lang->get('renecyption_expected'); ?>'); |
|
343 | 343 | |
344 | 344 | // Show passwords inputs and form |
345 | 345 | $('#dialog-user-temporary-code').removeClass('hidden'); |
@@ -421,13 +421,13 @@ discard block |
||
421 | 421 | { |
422 | 422 | if (step === 'psk') { |
423 | 423 | // Inform user |
424 | - $("#user-current-defuse-psk-progress").html('<b><?php echo $lang->get('encryption_keys'); ?> </b> [' + start + ' - ' + (parseInt(start) + <?php echo NUMBER_ITEMS_IN_BATCH;?>) + '] ' + |
|
424 | + $("#user-current-defuse-psk-progress").html('<b><?php echo $lang->get('encryption_keys'); ?> </b> [' + start + ' - ' + (parseInt(start) + <?php echo NUMBER_ITEMS_IN_BATCH; ?>) + '] ' + |
|
425 | 425 | '... <?php echo $lang->get('please_wait'); ?><i class="fa-solid fa-spinner fa-pulse ml-3 text-primary"></i>'); |
426 | 426 | |
427 | 427 | var data = { |
428 | 428 | 'userPsk' : $('#user-current-defuse-psk').val(), |
429 | 429 | 'start': start, |
430 | - 'length': <?php echo NUMBER_ITEMS_IN_BATCH;?>, |
|
430 | + 'length': <?php echo NUMBER_ITEMS_IN_BATCH; ?>, |
|
431 | 431 | 'user_id': userId, |
432 | 432 | 'counterItemsToTreat': counterItemsToTreat |
433 | 433 | }; |
@@ -503,7 +503,7 @@ discard block |
||
503 | 503 | |
504 | 504 | // Show passwords inputs and form |
505 | 505 | $('#dialog-ldap-user-change-password-info') |
506 | - .html('<i class="icon fa-solid fa-info mr-2"></i><?php echo $lang->get('ldap_user_has_changed_his_password');?>') |
|
506 | + .html('<i class="icon fa-solid fa-info mr-2"></i><?php echo $lang->get('ldap_user_has_changed_his_password'); ?>') |
|
507 | 507 | .removeClass('hidden'); |
508 | 508 | $('#dialog-ldap-user-change-password').removeClass('hidden'); |
509 | 509 | |
@@ -593,7 +593,7 @@ discard block |
||
593 | 593 | '</div>' + |
594 | 594 | '</div>' + |
595 | 595 | '</div>' + |
596 | - '<div class="row mt-2<?php echo isset($SETTINGS['enable_pf_feature']) === true && (int) $SETTINGS['enable_pf_feature'] === 1 ? '' : ' hidden'; ?>">' + |
|
596 | + '<div class="row mt-2<?php echo isset($SETTINGS['enable_pf_feature']) === true && (int) $SETTINGS['enable_pf_feature'] === 1 ? '' : ' hidden'; ?>">' + |
|
597 | 597 | '<h6><?php echo $lang->get('provide_recovery_keys'); ?></h6>' + |
598 | 598 | '<div class="input-group mb-2">' + |
599 | 599 | '<div class="input-group-prepend">' + |
@@ -608,7 +608,7 @@ discard block |
||
608 | 608 | '<textarea rows="2" id="recovery-private-key" class="form-control form-item-control"></textarea>' + |
609 | 609 | '</div>' + |
610 | 610 | '</div>' + |
611 | - '<div class="row mt-2<?php echo isset($SETTINGS['enable_pf_feature']) === true && (int) $SETTINGS['enable_pf_feature'] === 1 ? '' : ' hidden'; ?>">' + |
|
611 | + '<div class="row mt-2<?php echo isset($SETTINGS['enable_pf_feature']) === true && (int) $SETTINGS['enable_pf_feature'] === 1 ? '' : ' hidden'; ?>">' + |
|
612 | 612 | '<div class="alert" id="confirm-no-recovery-keys-div">' + |
613 | 613 | '<div class="form-check">' + |
614 | 614 | '<input type="checkbox" class="form-check-input" id="confirm-no-recovery-keys">' + |
@@ -1172,15 +1172,15 @@ discard block |
||
1172 | 1172 | // Prepare data |
1173 | 1173 | var data = { |
1174 | 1174 | 'receipt': $('#temp-user-email').val(), |
1175 | - 'subject': '[Teampass] <?php echo $lang->get('your_new_password');?>', |
|
1176 | - 'body': '<?php echo $lang->get('email_body_temporary_login_password');?>', |
|
1175 | + 'subject': '[Teampass] <?php echo $lang->get('your_new_password'); ?>', |
|
1176 | + 'body': '<?php echo $lang->get('email_body_temporary_login_password'); ?>', |
|
1177 | 1177 | 'pre_replace' : { |
1178 | 1178 | '#enc_code#' : $('#temp-user-pwd').val(), |
1179 | 1179 | } |
1180 | 1180 | } |
1181 | 1181 | if (debugJavascript === true) console.log(data); |
1182 | 1182 | // Prepare form |
1183 | - $('#dialog-admin-change-user-password-info').html('<?php echo $lang->get('sending_email_message');?>'); |
|
1183 | + $('#dialog-admin-change-user-password-info').html('<?php echo $lang->get('sending_email_message'); ?>'); |
|
1184 | 1184 | toastr.remove(); |
1185 | 1185 | toastr.info( |
1186 | 1186 | '<?php echo $lang->get('in_progress'); ?><i class="fa-solid fa-circle-notch fa-spin fa-2x ml-3"></i>' |
@@ -1702,7 +1702,7 @@ discard block |
||
1702 | 1702 | '#warningModal', |
1703 | 1703 | '<i class="fa-solid fa-clock fa-lg warning mr-2"></i><?php echo $lang->get('index_add_one_hour'); ?>', |
1704 | 1704 | '<div class="form-group">' + |
1705 | - '<label for="warningModal-input" class="col-form-label"><?php echo $lang->get('extend_session_duration_by') . ' (' . $lang->get('minutes') . ')'; ?>:</label>' + |
|
1705 | + '<label for="warningModal-input" class="col-form-label"><?php echo $lang->get('extend_session_duration_by').' ('.$lang->get('minutes').')'; ?>:</label>' + |
|
1706 | 1706 | '<input type="number" max="'+(60*60*24)+'" class="form-control" id="warningModal-input" value="60">' + |
1707 | 1707 | '</div>' + |
1708 | 1708 | '<div class="form-text text-muted"><i class=\"fa-solid fa-info-circle mr-2\"></i><?php echo $lang->get('maximum_session_expiration_time'); ?>: '+data.max_session_duration+'</div>', |