@@ -66,7 +66,7 @@ discard block |
||
| 66 | 66 | if ($checkUserAccess->checkSession() === false || $checkUserAccess->userAccessPage('users') === false) { |
| 67 | 67 | // Not allowed page |
| 68 | 68 | $session->set('system-error_code', ERR_NOT_ALLOWED); |
| 69 | - include $SETTINGS['cpassman_dir'] . '/error.php'; |
|
| 69 | + include $SETTINGS['cpassman_dir'].'/error.php'; |
|
| 70 | 70 | exit; |
| 71 | 71 | } |
| 72 | 72 | |
@@ -89,24 +89,24 @@ discard block |
||
| 89 | 89 | // If administrator then all roles are shown |
| 90 | 90 | // else only the Roles the users is associated to. |
| 91 | 91 | if ((int) $session->get('user-admin') === 1) { |
| 92 | - $optionsManagedBy .= '<option value="0">' . $lang->get('administrators_only') . '</option>'; |
|
| 92 | + $optionsManagedBy .= '<option value="0">'.$lang->get('administrators_only').'</option>'; |
|
| 93 | 93 | } |
| 94 | 94 | |
| 95 | 95 | $rows = DB::query( |
| 96 | 96 | 'SELECT id, title, creator_id |
| 97 | - FROM ' . prefixTable('roles_title') . ' |
|
| 97 | + FROM ' . prefixTable('roles_title').' |
|
| 98 | 98 | ORDER BY title ASC' |
| 99 | 99 | ); |
| 100 | 100 | foreach ($rows as $record) { |
| 101 | 101 | if ((int) $session->get('user-admin') === 1 || in_array($record['id'], $session->get('user-roles_array')) === true) { |
| 102 | - $optionsManagedBy .= '<option value="' . $record['id'] . '">' . $lang->get('managers_of') . ' ' . addslashes($record['title']) . '</option>'; |
|
| 102 | + $optionsManagedBy .= '<option value="'.$record['id'].'">'.$lang->get('managers_of').' '.addslashes($record['title']).'</option>'; |
|
| 103 | 103 | } |
| 104 | 104 | if ( |
| 105 | 105 | (int) $session->get('user-admin') === 1 |
| 106 | 106 | || (((int) $session->get('user-manager') === 1 || (int) $session->get('user-can_manage_all_users') === 1) |
| 107 | 107 | && (in_array($record['id'], $userRoles) === true) || (int) $record['creator_id'] === (int) $session->get('user-id')) |
| 108 | 108 | ) { |
| 109 | - $optionsRoles .= '<option value="' . $record['id'] . '">' . addslashes($record['title']) . '</option>'; |
|
| 109 | + $optionsRoles .= '<option value="'.$record['id'].'">'.addslashes($record['title']).'</option>'; |
|
| 110 | 110 | } |
| 111 | 111 | } |
| 112 | 112 | |
@@ -121,7 +121,7 @@ discard block |
||
| 121 | 121 | for ($y = 1; $y < $t->nlevel; ++$y) { |
| 122 | 122 | $ident .= ' '; |
| 123 | 123 | } |
| 124 | - $foldersList .= '<option value="' . $t->id . '">' . $ident . htmlspecialchars($t->title, ENT_COMPAT, 'UTF-8') . '</option>'; |
|
| 124 | + $foldersList .= '<option value="'.$t->id.'">'.$ident.htmlspecialchars($t->title, ENT_COMPAT, 'UTF-8').'</option>'; |
|
| 125 | 125 | } |
| 126 | 126 | } |
| 127 | 127 | |
@@ -158,7 +158,7 @@ discard block |
||
| 158 | 158 | </button><?php |
| 159 | 159 | echo isset($SETTINGS['ldap_mode']) === true && (int) $SETTINGS['ldap_mode'] === 1 && (int) $session->get('user-admin') === 1 ? |
| 160 | 160 | '<button type="button" class="btn btn-primary btn-sm tp-action mr-2" data-action="ldap-sync"> |
| 161 | - <i class="fa-solid fa-address-card mr-2"></i>' . $lang->get('ldap_synchronization') . ' |
|
| 161 | + <i class="fa-solid fa-address-card mr-2"></i>' . $lang->get('ldap_synchronization').' |
|
| 162 | 162 | </button>' : ''; |
| 163 | 163 | ?> |
| 164 | 164 | </h3> |
@@ -166,7 +166,7 @@ discard block |
||
| 166 | 166 | |
| 167 | 167 | <!-- /.card-header --> |
| 168 | 168 | <div class="card-body form" id="users-list"> |
| 169 | - <label><input type="checkbox" id="warnings_display" class="tp-action pointer" data-action="refresh"><span class="ml-2 pointer"><?php echo $lang->get('display_warning_icons');?></span></label> |
|
| 169 | + <label><input type="checkbox" id="warnings_display" class="tp-action pointer" data-action="refresh"><span class="ml-2 pointer"><?php echo $lang->get('display_warning_icons'); ?></span></label> |
|
| 170 | 170 | <table id="table-users" class="table table-striped nowrap table-responsive-sm"> |
| 171 | 171 | <thead> |
| 172 | 172 | <tr> |
@@ -231,7 +231,7 @@ discard block |
||
| 231 | 231 | <?php |
| 232 | 232 | foreach (TP_PW_COMPLEXITY as $entry) { |
| 233 | 233 | echo ' |
| 234 | - <option value="' . $entry[0] . '">' . addslashes($entry[1]) . '</option>'; |
|
| 234 | + <option value="' . $entry[0].'">'.addslashes($entry[1]).'</option>'; |
|
| 235 | 235 | } |
| 236 | 236 | ?> |
| 237 | 237 | </select> |
@@ -83,7 +83,7 @@ discard block |
||
| 83 | 83 | } |
| 84 | 84 | |
| 85 | 85 | // Load functions |
| 86 | -require_once __DIR__. '/includes/config/include.php'; |
|
| 86 | +require_once __DIR__.'/includes/config/include.php'; |
|
| 87 | 87 | require_once __DIR__.'/sources/main.functions.php'; |
| 88 | 88 | |
| 89 | 89 | // init |
@@ -112,7 +112,7 @@ discard block |
||
| 112 | 112 | $SETTINGS = $antiXss->xss_clean($SETTINGS); |
| 113 | 113 | |
| 114 | 114 | // Load Core library |
| 115 | -require_once $SETTINGS['cpassman_dir'] . '/sources/core.php'; |
|
| 115 | +require_once $SETTINGS['cpassman_dir'].'/sources/core.php'; |
|
| 116 | 116 | // Prepare POST variables |
| 117 | 117 | $post_language = filter_input(INPUT_POST, 'language', FILTER_SANITIZE_FULL_SPECIAL_CHARS); |
| 118 | 118 | $session_user_language = $session->get('user-language'); |
@@ -138,8 +138,8 @@ discard block |
||
| 138 | 138 | //get default language |
| 139 | 139 | $dataLanguage = DB::queryFirstRow( |
| 140 | 140 | 'SELECT m.valeur AS valeur, l.flag AS flag |
| 141 | - FROM ' . prefixTable('misc') . ' AS m |
|
| 142 | - INNER JOIN ' . prefixTable('languages') . ' AS l ON (m.valeur = l.name) |
|
| 141 | + FROM ' . prefixTable('misc').' AS m |
|
| 142 | + INNER JOIN ' . prefixTable('languages').' AS l ON (m.valeur = l.name) |
|
| 143 | 143 | WHERE m.type=%s_type AND m.intitule=%s_intitule', |
| 144 | 144 | [ |
| 145 | 145 | 'type' => 'admin', |
@@ -170,7 +170,7 @@ discard block |
||
| 170 | 170 | $session_user_language = $SETTINGS['default_language']; |
| 171 | 171 | } |
| 172 | 172 | } |
| 173 | -$lang = new Language($session_user_language, __DIR__. '/includes/language/'); |
|
| 173 | +$lang = new Language($session_user_language, __DIR__.'/includes/language/'); |
|
| 174 | 174 | |
| 175 | 175 | if (isset($SETTINGS['cpassman_dir']) === false || $SETTINGS['cpassman_dir'] === '') { |
| 176 | 176 | $SETTINGS['cpassman_dir'] = __DIR__; |
@@ -232,10 +232,10 @@ discard block |
||
| 232 | 232 | <!-- Toastr --> |
| 233 | 233 | <link rel="stylesheet" href="plugins/toastr/toastr.min.css" /> |
| 234 | 234 | <!-- favicon --> |
| 235 | - <link rel="shortcut icon" type="image/png" href="<?php echo $SETTINGS['favicon'];?>"/> |
|
| 235 | + <link rel="shortcut icon" type="image/png" href="<?php echo $SETTINGS['favicon']; ?>"/> |
|
| 236 | 236 | <!-- Custom style --> |
| 237 | 237 | <?php |
| 238 | - if (file_exists(__DIR__ . '/includes/css/custom.css') === true) {?> |
|
| 238 | + if (file_exists(__DIR__.'/includes/css/custom.css') === true) {?> |
|
| 239 | 239 | <link rel="stylesheet" href="includes/css/custom.css"> |
| 240 | 240 | <?php |
| 241 | 241 | } ?> |
@@ -299,7 +299,7 @@ discard block |
||
| 299 | 299 | <div class="dropdown show"> |
| 300 | 300 | <a class="btn btn-primary dropdown-toggle" href="#" data-toggle="dropdown"> |
| 301 | 301 | <?php |
| 302 | - echo $session_name . ' ' . $session_lastname; ?> |
|
| 302 | + echo $session_name.' '.$session_lastname; ?> |
|
| 303 | 303 | </a> |
| 304 | 304 | |
| 305 | 305 | <div class="dropdown-menu dropdown-menu-right"> |
@@ -323,7 +323,7 @@ discard block |
||
| 323 | 323 | </a> |
| 324 | 324 | <?php |
| 325 | 325 | } ?> |
| 326 | - <a class="dropdown-item user-menu<?php echo (int) $session_user_admin === 1 ? ' hidden' : '';?>" href="#" data-name="generate-new_keys"> |
|
| 326 | + <a class="dropdown-item user-menu<?php echo (int) $session_user_admin === 1 ? ' hidden' : ''; ?>" href="#" data-name="generate-new_keys"> |
|
| 327 | 327 | <i class="fa-solid fa-spray-can-sparkles fa-fw mr-2"></i><?php echo $lang->get('generate_new_keys'); ?> |
| 328 | 328 | </a> |
| 329 | 329 | |
@@ -352,7 +352,7 @@ discard block |
||
| 352 | 352 | <!-- Main Sidebar Container --> |
| 353 | 353 | <aside class="main-sidebar sidebar-dark-primary elevation-4"> |
| 354 | 354 | <!-- Brand Logo --> |
| 355 | - <a href="<?php echo $SETTINGS['cpassman_url'] . '/index.php?page=' . ((int) $session_user_admin === 1 ? 'admin' : 'items'); ?>" class="brand-link"> |
|
| 355 | + <a href="<?php echo $SETTINGS['cpassman_url'].'/index.php?page='.((int) $session_user_admin === 1 ? 'admin' : 'items'); ?>" class="brand-link"> |
|
| 356 | 356 | <img src="includes/images/teampass-logo2-home.png" alt="Teampass Logo" class="brand-image"> |
| 357 | 357 | <span class="brand-text font-weight-light"><?php echo TP_TOOL_NAME; ?></span> |
| 358 | 358 | </a> |
@@ -370,20 +370,20 @@ discard block |
||
| 370 | 370 | <a href="#" data-name="items" class="nav-link', $get['page'] === 'items' ? ' active' : '', '"> |
| 371 | 371 | <i class="nav-icon fa-solid fa-key"></i> |
| 372 | 372 | <p> |
| 373 | - ' . $lang->get('pw') . ' |
|
| 373 | + ' . $lang->get('pw').' |
|
| 374 | 374 | </p> |
| 375 | 375 | </a> |
| 376 | 376 | </li>'; |
| 377 | 377 | } |
| 378 | 378 | |
| 379 | 379 | // IMPORT menu |
| 380 | - if (isset($SETTINGS['allow_import']) === true && (int) $SETTINGS['allow_import'] === 1&& $session_user_admin === 0) { |
|
| 380 | + if (isset($SETTINGS['allow_import']) === true && (int) $SETTINGS['allow_import'] === 1 && $session_user_admin === 0) { |
|
| 381 | 381 | echo ' |
| 382 | 382 | <li class="nav-item"> |
| 383 | 383 | <a href="#" data-name="import" class="nav-link', $get['page'] === 'import' ? ' active' : '', '"> |
| 384 | 384 | <i class="nav-icon fa-solid fa-file-import"></i> |
| 385 | 385 | <p> |
| 386 | - ' . $lang->get('import') . ' |
|
| 386 | + ' . $lang->get('import').' |
|
| 387 | 387 | </p> |
| 388 | 388 | </a> |
| 389 | 389 | </li>'; |
@@ -404,7 +404,7 @@ discard block |
||
| 404 | 404 | <a href="#" data-name="export" class="nav-link', $get['page'] === 'export' ? ' active' : '', '"> |
| 405 | 405 | <i class="nav-icon fa-solid fa-file-export"></i> |
| 406 | 406 | <p> |
| 407 | - ' . $lang->get('export') . ' |
|
| 407 | + ' . $lang->get('export').' |
|
| 408 | 408 | </p> |
| 409 | 409 | </a> |
| 410 | 410 | </li>'; |
@@ -431,7 +431,7 @@ discard block |
||
| 431 | 431 | <a href="#" data-name="search" class="nav-link', $get['page'] === 'search' ? ' active' : '', '"> |
| 432 | 432 | <i class="nav-icon fa-solid fa-search"></i> |
| 433 | 433 | <p> |
| 434 | - ' . $lang->get('find') . ' |
|
| 434 | + ' . $lang->get('find').' |
|
| 435 | 435 | </p> |
| 436 | 436 | </a> |
| 437 | 437 | </li>'; |
@@ -447,7 +447,7 @@ discard block |
||
| 447 | 447 | <a href="#" data-name="favourites" class="nav-link', $get['page'] === 'admin' ? ' favourites' : '', '"> |
| 448 | 448 | <i class="nav-icon fa-solid fa-star"></i> |
| 449 | 449 | <p> |
| 450 | - ' . $lang->get('favorites') . ' |
|
| 450 | + ' . $lang->get('favorites').' |
|
| 451 | 451 | </p> |
| 452 | 452 | </a> |
| 453 | 453 | </li>'; |
@@ -477,7 +477,7 @@ discard block |
||
| 477 | 477 | <a href="#" data-name="suggestion" class="nav-link', $get['page'] === 'suggestion' ? ' active' : '', '"> |
| 478 | 478 | <i class="nav-icon fa-solid fa-lightbulb"></i> |
| 479 | 479 | <p> |
| 480 | - ' . $lang->get('suggestion_menu') . ' |
|
| 480 | + ' . $lang->get('suggestion_menu').' |
|
| 481 | 481 | </p> |
| 482 | 482 | </a> |
| 483 | 483 | </li>'; |
@@ -490,7 +490,7 @@ discard block |
||
| 490 | 490 | <a href="#" data-name="admin" class="nav-link', $get['page'] === 'admin' ? ' active' : '', '"> |
| 491 | 491 | <i class="nav-icon fa-solid fa-info"></i> |
| 492 | 492 | <p> |
| 493 | - ' . $lang->get('admin_main') . ' |
|
| 493 | + ' . $lang->get('admin_main').' |
|
| 494 | 494 | </p> |
| 495 | 495 | </a> |
| 496 | 496 | </li> |
@@ -498,7 +498,7 @@ discard block |
||
| 498 | 498 | <a href="#" class="nav-link"> |
| 499 | 499 | <i class="nav-icon fa-solid fa-wrench"></i> |
| 500 | 500 | <p> |
| 501 | - ' . $lang->get('admin_settings') . ' |
|
| 501 | + ' . $lang->get('admin_settings').' |
|
| 502 | 502 | <i class="fa-solid fa-angle-left right"></i> |
| 503 | 503 | </p> |
| 504 | 504 | </a> |
@@ -506,55 +506,55 @@ discard block |
||
| 506 | 506 | <li class="nav-item"> |
| 507 | 507 | <a href="#" data-name="options" class="nav-link', $get['page'] === 'options' ? ' active' : '', '"> |
| 508 | 508 | <i class="fa-solid fa-check-double nav-icon"></i> |
| 509 | - <p>' . $lang->get('options') . '</p> |
|
| 509 | + <p>' . $lang->get('options').'</p> |
|
| 510 | 510 | </a> |
| 511 | 511 | </li> |
| 512 | 512 | <li class="nav-item"> |
| 513 | 513 | <a href="#" data-name="2fa" class="nav-link', $get['page'] === '2fa' ? ' active' : '', '"> |
| 514 | 514 | <i class="fa-solid fa-qrcode nav-icon"></i> |
| 515 | - <p>' . $lang->get('mfa_short') . '</p> |
|
| 515 | + <p>' . $lang->get('mfa_short').'</p> |
|
| 516 | 516 | </a> |
| 517 | 517 | </li> |
| 518 | 518 | <li class="nav-item"> |
| 519 | 519 | <a href="#" data-name="api" class="nav-link', $get['page'] === 'api' ? ' active' : '', '"> |
| 520 | 520 | <i class="fa-solid fa-cubes nav-icon"></i> |
| 521 | - <p>' . $lang->get('api') . '</p> |
|
| 521 | + <p>' . $lang->get('api').'</p> |
|
| 522 | 522 | </a> |
| 523 | 523 | </li> |
| 524 | 524 | <li class="nav-item"> |
| 525 | 525 | <a href="#" data-name="backups" class="nav-link', $get['page'] === 'backups' ? ' active' : '', '"> |
| 526 | 526 | <i class="fa-solid fa-database nav-icon"></i> |
| 527 | - <p>' . $lang->get('backups') . '</p> |
|
| 527 | + <p>' . $lang->get('backups').'</p> |
|
| 528 | 528 | </a> |
| 529 | 529 | </li> |
| 530 | 530 | <li class="nav-item"> |
| 531 | 531 | <a href="#" data-name="emails" class="nav-link', $get['page'] === 'emails' ? ' active' : '', '"> |
| 532 | 532 | <i class="fa-solid fa-envelope nav-icon"></i> |
| 533 | - <p>' . $lang->get('emails') . '</p> |
|
| 533 | + <p>' . $lang->get('emails').'</p> |
|
| 534 | 534 | </a> |
| 535 | 535 | </li> |
| 536 | 536 | <li class="nav-item"> |
| 537 | 537 | <a href="#" data-name="fields" class="nav-link', $get['page'] === 'fields' ? ' active' : '', '"> |
| 538 | 538 | <i class="fa-solid fa-keyboard nav-icon"></i> |
| 539 | - <p>' . $lang->get('fields') . '</p> |
|
| 539 | + <p>' . $lang->get('fields').'</p> |
|
| 540 | 540 | </a> |
| 541 | 541 | </li> |
| 542 | 542 | <li class="nav-item"> |
| 543 | 543 | <a href="#" data-name="ldap" class="nav-link', $get['page'] === 'ldap' ? ' active' : '', '"> |
| 544 | 544 | <i class="fa-solid fa-id-card nav-icon"></i> |
| 545 | - <p>' . $lang->get('ldap') . '</p> |
|
| 545 | + <p>' . $lang->get('ldap').'</p> |
|
| 546 | 546 | </a> |
| 547 | 547 | </li> |
| 548 | 548 | <li class="nav-item"> |
| 549 | 549 | <a href="#" data-name="uploads" class="nav-link', $get['page'] === 'uploads' ? ' active' : '', '"> |
| 550 | 550 | <i class="fa-solid fa-file-upload nav-icon"></i> |
| 551 | - <p>' . $lang->get('uploads') . '</p> |
|
| 551 | + <p>' . $lang->get('uploads').'</p> |
|
| 552 | 552 | </a> |
| 553 | 553 | </li> |
| 554 | 554 | <li class="nav-item"> |
| 555 | 555 | <a href="#" data-name="statistics" class="nav-link', $get['page'] === 'statistics' ? ' active' : '', '"> |
| 556 | 556 | <i class="fa-solid fa-chart-bar nav-icon"></i> |
| 557 | - <p>' . $lang->get('statistics') . '</p> |
|
| 557 | + <p>' . $lang->get('statistics').'</p> |
|
| 558 | 558 | </a> |
| 559 | 559 | </li> |
| 560 | 560 | </ul> |
@@ -565,7 +565,7 @@ discard block |
||
| 565 | 565 | <li class="nav-item"> |
| 566 | 566 | <a href="#" data-name="tasks" class="nav-link', $get['page'] === 'tasks' ? ' active' : '', '"> |
| 567 | 567 | <i class="fa-solid fa-tasks nav-icon"></i> |
| 568 | - <p>' . $lang->get('tasks') . '</p> |
|
| 568 | + <p>' . $lang->get('tasks').'</p> |
|
| 569 | 569 | </a> |
| 570 | 570 | </li>'; |
| 571 | 571 | } |
@@ -581,7 +581,7 @@ discard block |
||
| 581 | 581 | <a href="#" data-name="folders" class="nav-link', $get['page'] === 'folders' ? ' active' : '', '"> |
| 582 | 582 | <i class="nav-icon fa-solid fa-folder-open"></i> |
| 583 | 583 | <p> |
| 584 | - ' . $lang->get('folders') . ' |
|
| 584 | + ' . $lang->get('folders').' |
|
| 585 | 585 | </p> |
| 586 | 586 | </a> |
| 587 | 587 | </li> |
@@ -589,7 +589,7 @@ discard block |
||
| 589 | 589 | <a href="#" data-name="roles" class="nav-link', $get['page'] === 'roles' ? ' active' : '', '"> |
| 590 | 590 | <i class="nav-icon fa-solid fa-graduation-cap"></i> |
| 591 | 591 | <p> |
| 592 | - ' . $lang->get('roles') . ' |
|
| 592 | + ' . $lang->get('roles').' |
|
| 593 | 593 | </p> |
| 594 | 594 | </a> |
| 595 | 595 | </li> |
@@ -597,38 +597,38 @@ discard block |
||
| 597 | 597 | <a href="#" data-name="users" class="nav-link', $get['page'] === 'users' ? ' active' : '', '"> |
| 598 | 598 | <i class="nav-icon fa-solid fa-users"></i> |
| 599 | 599 | <p> |
| 600 | - ' . $lang->get('users') . ' |
|
| 600 | + ' . $lang->get('users').' |
|
| 601 | 601 | </p> |
| 602 | 602 | </a> |
| 603 | 603 | </li> |
| 604 | 604 | <li class="nav-item has-treeview', $menuUtilities === true ? ' menu-open' : '', '"> |
| 605 | 605 | <a href="#" class="nav-link"> |
| 606 | 606 | <i class="nav-icon fa-solid fa-cubes"></i> |
| 607 | - <p>' . $lang->get('admin_views') . '<i class="fa-solid fa-angle-left right"></i></p> |
|
| 607 | + <p>' . $lang->get('admin_views').'<i class="fa-solid fa-angle-left right"></i></p> |
|
| 608 | 608 | </a> |
| 609 | 609 | <ul class="nav nav-treeview"> |
| 610 | 610 | <li class="nav-item"> |
| 611 | 611 | <a href="#" data-name="utilities.renewal" class="nav-link', $get['page'] === 'utilities.renewal' ? ' active' : '', '"> |
| 612 | 612 | <i class="far fa-calendar-alt nav-icon"></i> |
| 613 | - <p>' . $lang->get('renewal') . '</p> |
|
| 613 | + <p>' . $lang->get('renewal').'</p> |
|
| 614 | 614 | </a> |
| 615 | 615 | </li> |
| 616 | 616 | <li class="nav-item"> |
| 617 | 617 | <a href="#" data-name="utilities.deletion" class="nav-link', $get['page'] === 'utilities.deletion' ? ' active' : '', '"> |
| 618 | 618 | <i class="fa-solid fa-trash-alt nav-icon"></i> |
| 619 | - <p>' . $lang->get('deletion') . '</p> |
|
| 619 | + <p>' . $lang->get('deletion').'</p> |
|
| 620 | 620 | </a> |
| 621 | 621 | </li> |
| 622 | 622 | <li class="nav-item"> |
| 623 | 623 | <a href="#" data-name="utilities.logs" class="nav-link', $get['page'] === 'utilities.logs' ? ' active' : '', '"> |
| 624 | 624 | <i class="fa-solid fa-history nav-icon"></i> |
| 625 | - <p>' . $lang->get('logs') . '</p> |
|
| 625 | + <p>' . $lang->get('logs').'</p> |
|
| 626 | 626 | </a> |
| 627 | 627 | </li> |
| 628 | 628 | <li class="nav-item"> |
| 629 | 629 | <a href="#" data-name="utilities.database" class="nav-link', $get['page'] === 'utilities.database' ? ' active' : '', '"> |
| 630 | 630 | <i class="fa-solid fa-database nav-icon"></i> |
| 631 | - <p>' . $lang->get('database') . '</p> |
|
| 631 | + <p>' . $lang->get('database').'</p> |
|
| 632 | 632 | </a> |
| 633 | 633 | </li> |
| 634 | 634 | </ul> |
@@ -639,10 +639,10 @@ discard block |
||
| 639 | 639 | <!-- /.sidebar-menu --> |
| 640 | 640 | <div class="menu-footer"> |
| 641 | 641 | <div class="" id="sidebar-footer"> |
| 642 | - <i class="fa-solid fa-clock-o mr-2 infotip text-info pointer" title="<?php echo $lang->get('server_time') . ' ' . |
|
| 643 | - date($SETTINGS['date_format'], (int) $server['request_time']) . ' - ' . |
|
| 642 | + <i class="fa-solid fa-clock-o mr-2 infotip text-info pointer" title="<?php echo $lang->get('server_time').' '. |
|
| 643 | + date($SETTINGS['date_format'], (int) $server['request_time']).' - '. |
|
| 644 | 644 | date($SETTINGS['time_format'], (int) $server['request_time']); ?>"></i> |
| 645 | - <i class="fa-solid fa-users mr-2 infotip text-info pointer" title="<?php echo $session_nb_users_online . ' ' . $lang->get('users_online'); ?>"></i> |
|
| 645 | + <i class="fa-solid fa-users mr-2 infotip text-info pointer" title="<?php echo $session_nb_users_online.' '.$lang->get('users_online'); ?>"></i> |
|
| 646 | 646 | <a href="<?php echo DOCUMENTATION_URL; ?>" target="_blank" class="text-info"><i class="fa-solid fa-book mr-2 infotip" title="<?php echo $lang->get('documentation_canal'); ?>"></i></a> |
| 647 | 647 | <a href="<?php echo HELP_URL; ?>" target="_blank" class="text-info"><i class="fa-solid fa-life-ring mr-2 infotip" title="<?php echo $lang->get('admin_help'); ?>"></i></a> |
| 648 | 648 | <i class="fa-solid fa-bug infotip pointer text-info" title="<?php echo $lang->get('bugs_page'); ?>" onclick="generateBugReport()"></i> |
@@ -791,7 +791,7 @@ discard block |
||
| 791 | 791 | </div> |
| 792 | 792 | <div class="mt-3"> |
| 793 | 793 | <label> |
| 794 | - <span class="mr-2 pointer fw-normal"><i class="fa-solid fa-eye mr-2 text-orange"></i><?php echo $lang->get('show_user_password');?></span> |
|
| 794 | + <span class="mr-2 pointer fw-normal"><i class="fa-solid fa-eye mr-2 text-orange"></i><?php echo $lang->get('show_user_password'); ?></span> |
|
| 795 | 795 | <input type="checkbox" id="dialog-admin-change-user-password-do-show-password" class="pointer"> |
| 796 | 796 | </label> |
| 797 | 797 | </div> |
@@ -952,34 +952,34 @@ discard block |
||
| 952 | 952 | } elseif ($get['page'] === 'items') { |
| 953 | 953 | // SHow page with Items |
| 954 | 954 | if ((int) $session_user_admin !== 1) { |
| 955 | - include $SETTINGS['cpassman_dir'] . '/pages/items.php'; |
|
| 955 | + include $SETTINGS['cpassman_dir'].'/pages/items.php'; |
|
| 956 | 956 | } elseif ((int) $session_user_admin === 1) { |
| 957 | - include $SETTINGS['cpassman_dir'] . '/pages/admin.php'; |
|
| 957 | + include $SETTINGS['cpassman_dir'].'/pages/admin.php'; |
|
| 958 | 958 | } else { |
| 959 | 959 | $session->set('system-error_code', ERR_NOT_ALLOWED); |
| 960 | 960 | //not allowed page |
| 961 | - include $SETTINGS['cpassman_dir'] . '/error.php'; |
|
| 961 | + include $SETTINGS['cpassman_dir'].'/error.php'; |
|
| 962 | 962 | } |
| 963 | 963 | } elseif (in_array($get['page'], array_keys($mngPages)) === true) { |
| 964 | 964 | // Define if user is allowed to see management pages |
| 965 | 965 | if ($session_user_admin === 1) { |
| 966 | 966 | // deepcode ignore FileInclusion: $get['page'] is secured through usage of array_keys test bellow |
| 967 | - include $SETTINGS['cpassman_dir'] . '/pages/' . basename($mngPages[$get['page']]); |
|
| 967 | + include $SETTINGS['cpassman_dir'].'/pages/'.basename($mngPages[$get['page']]); |
|
| 968 | 968 | } elseif ($session_user_manager === 1 || $session_user_human_resources === 1) { |
| 969 | 969 | if ($get['page'] === 'manage_main' || $get['page'] === 'manage_settings' |
| 970 | 970 | ) { |
| 971 | 971 | $session->set('system-error_code', ERR_NOT_ALLOWED); |
| 972 | 972 | //not allowed page |
| 973 | - include $SETTINGS['cpassman_dir'] . '/error.php'; |
|
| 973 | + include $SETTINGS['cpassman_dir'].'/error.php'; |
|
| 974 | 974 | } |
| 975 | 975 | } else { |
| 976 | 976 | $session->set('system-error_code', ERR_NOT_ALLOWED); |
| 977 | 977 | //not allowed page |
| 978 | - include $SETTINGS['cpassman_dir'] . '/error.php'; |
|
| 978 | + include $SETTINGS['cpassman_dir'].'/error.php'; |
|
| 979 | 979 | } |
| 980 | - } elseif (empty($get['page']) === false && file_exists($SETTINGS['cpassman_dir'] . '/pages/' . $get['page'] . '.php') === true) { |
|
| 980 | + } elseif (empty($get['page']) === false && file_exists($SETTINGS['cpassman_dir'].'/pages/'.$get['page'].'.php') === true) { |
|
| 981 | 981 | // deepcode ignore FileInclusion: $get['page'] is tested against file_exists just below |
| 982 | - include $SETTINGS['cpassman_dir'] . '/pages/' . basename($get['page'] . '.php'); |
|
| 982 | + include $SETTINGS['cpassman_dir'].'/pages/'.basename($get['page'].'.php'); |
|
| 983 | 983 | } else { |
| 984 | 984 | $session->set('system-array_roles', ERR_NOT_EXIST); |
| 985 | 985 | //page doesn't exist |
@@ -1028,7 +1028,7 @@ discard block |
||
| 1028 | 1028 | echo ' |
| 1029 | 1029 | <input type="hidden" id="temps_restant" value="', $session->get('user-session_duration') ?? '', '" />'; |
| 1030 | 1030 | // display an item in the context of OTV link |
| 1031 | -} elseif ((null === $session->get('user-validite_pw')|| empty($session->get('user-validite_pw')) === true || empty($session->get('user-id')) === true) |
|
| 1031 | +} elseif ((null === $session->get('user-validite_pw') || empty($session->get('user-validite_pw')) === true || empty($session->get('user-id')) === true) |
|
| 1032 | 1032 | && empty($get['otv']) === false |
| 1033 | 1033 | ) { |
| 1034 | 1034 | // case where one-shot viewer |
@@ -1047,7 +1047,7 @@ discard block |
||
| 1047 | 1047 | FILTER_SANITIZE_URL |
| 1048 | 1048 | ) |
| 1049 | 1049 | ); |
| 1050 | - include $SETTINGS['cpassman_dir'] . '/error.php'; |
|
| 1050 | + include $SETTINGS['cpassman_dir'].'/error.php'; |
|
| 1051 | 1051 | } |
| 1052 | 1052 | } elseif (//(empty($session->get('user-id')) === false && $session->get('user-id') !== null) || |
| 1053 | 1053 | empty($session->get('user-id')) === true |
@@ -1080,7 +1080,7 @@ discard block |
||
| 1080 | 1080 | $session->set('user-initial_url', ''); |
| 1081 | 1081 | |
| 1082 | 1082 | // LOGIN form |
| 1083 | - include $SETTINGS['cpassman_dir'] . '/includes/core/login.php'; |
|
| 1083 | + include $SETTINGS['cpassman_dir'].'/includes/core/login.php'; |
|
| 1084 | 1084 | } else { |
| 1085 | 1085 | // Clear session |
| 1086 | 1086 | $session->invalidate(); |
@@ -1297,61 +1297,61 @@ discard block |
||
| 1297 | 1297 | |
| 1298 | 1298 | // Load links, css and javascripts |
| 1299 | 1299 | if (isset($SETTINGS['cpassman_dir']) === true) { |
| 1300 | - include_once $SETTINGS['cpassman_dir'] . '/includes/core/load.js.php'; |
|
| 1300 | + include_once $SETTINGS['cpassman_dir'].'/includes/core/load.js.php'; |
|
| 1301 | 1301 | if ($menuAdmin === true) { |
| 1302 | - include_once $SETTINGS['cpassman_dir'] . '/pages/admin.js.php'; |
|
| 1302 | + include_once $SETTINGS['cpassman_dir'].'/pages/admin.js.php'; |
|
| 1303 | 1303 | if ($get['page'] === '2fa') { |
| 1304 | - include_once $SETTINGS['cpassman_dir'] . '/pages/2fa.js.php'; |
|
| 1304 | + include_once $SETTINGS['cpassman_dir'].'/pages/2fa.js.php'; |
|
| 1305 | 1305 | } elseif ($get['page'] === 'api') { |
| 1306 | - include_once $SETTINGS['cpassman_dir'] . '/pages/api.js.php'; |
|
| 1306 | + include_once $SETTINGS['cpassman_dir'].'/pages/api.js.php'; |
|
| 1307 | 1307 | } elseif ($get['page'] === 'backups') { |
| 1308 | - include_once $SETTINGS['cpassman_dir'] . '/pages/backups.js.php'; |
|
| 1308 | + include_once $SETTINGS['cpassman_dir'].'/pages/backups.js.php'; |
|
| 1309 | 1309 | } elseif ($get['page'] === 'emails') { |
| 1310 | - include_once $SETTINGS['cpassman_dir'] . '/pages/emails.js.php'; |
|
| 1310 | + include_once $SETTINGS['cpassman_dir'].'/pages/emails.js.php'; |
|
| 1311 | 1311 | } elseif ($get['page'] === 'ldap') { |
| 1312 | - include_once $SETTINGS['cpassman_dir'] . '/pages/ldap.js.php'; |
|
| 1312 | + include_once $SETTINGS['cpassman_dir'].'/pages/ldap.js.php'; |
|
| 1313 | 1313 | } elseif ($get['page'] === 'uploads') { |
| 1314 | - include_once $SETTINGS['cpassman_dir'] . '/pages/uploads.js.php'; |
|
| 1314 | + include_once $SETTINGS['cpassman_dir'].'/pages/uploads.js.php'; |
|
| 1315 | 1315 | } elseif ($get['page'] === 'fields') { |
| 1316 | - include_once $SETTINGS['cpassman_dir'] . '/pages/fields.js.php'; |
|
| 1316 | + include_once $SETTINGS['cpassman_dir'].'/pages/fields.js.php'; |
|
| 1317 | 1317 | } elseif ($get['page'] === 'options') { |
| 1318 | - include_once $SETTINGS['cpassman_dir'] . '/pages/options.js.php'; |
|
| 1318 | + include_once $SETTINGS['cpassman_dir'].'/pages/options.js.php'; |
|
| 1319 | 1319 | } elseif ($get['page'] === 'statistics') { |
| 1320 | - include_once $SETTINGS['cpassman_dir'] . '/pages/statistics.js.php'; |
|
| 1320 | + include_once $SETTINGS['cpassman_dir'].'/pages/statistics.js.php'; |
|
| 1321 | 1321 | } elseif ($get['page'] === 'tasks') { |
| 1322 | - include_once $SETTINGS['cpassman_dir'] . '/pages/tasks.js.php'; |
|
| 1322 | + include_once $SETTINGS['cpassman_dir'].'/pages/tasks.js.php'; |
|
| 1323 | 1323 | } |
| 1324 | 1324 | } elseif (isset($get['page']) === true && $get['page'] !== '') { |
| 1325 | 1325 | if ($get['page'] === 'items') { |
| 1326 | - include_once $SETTINGS['cpassman_dir'] . '/pages/items.js.php'; |
|
| 1326 | + include_once $SETTINGS['cpassman_dir'].'/pages/items.js.php'; |
|
| 1327 | 1327 | } elseif ($get['page'] === 'import') { |
| 1328 | - include_once $SETTINGS['cpassman_dir'] . '/pages/import.js.php'; |
|
| 1328 | + include_once $SETTINGS['cpassman_dir'].'/pages/import.js.php'; |
|
| 1329 | 1329 | } elseif ($get['page'] === 'export') { |
| 1330 | - include_once $SETTINGS['cpassman_dir'] . '/pages/export.js.php'; |
|
| 1330 | + include_once $SETTINGS['cpassman_dir'].'/pages/export.js.php'; |
|
| 1331 | 1331 | } elseif ($get['page'] === 'offline') { |
| 1332 | - include_once $SETTINGS['cpassman_dir'] . '/pages/offline.js.php'; |
|
| 1332 | + include_once $SETTINGS['cpassman_dir'].'/pages/offline.js.php'; |
|
| 1333 | 1333 | } elseif ($get['page'] === 'search') { |
| 1334 | - include_once $SETTINGS['cpassman_dir'] . '/pages/search.js.php'; |
|
| 1334 | + include_once $SETTINGS['cpassman_dir'].'/pages/search.js.php'; |
|
| 1335 | 1335 | } elseif ($get['page'] === 'profile') { |
| 1336 | - include_once $SETTINGS['cpassman_dir'] . '/pages/profile.js.php'; |
|
| 1336 | + include_once $SETTINGS['cpassman_dir'].'/pages/profile.js.php'; |
|
| 1337 | 1337 | } elseif ($get['page'] === 'favourites') { |
| 1338 | - include_once $SETTINGS['cpassman_dir'] . '/pages/favorites.js.php'; |
|
| 1338 | + include_once $SETTINGS['cpassman_dir'].'/pages/favorites.js.php'; |
|
| 1339 | 1339 | } elseif ($get['page'] === 'folders') { |
| 1340 | - include_once $SETTINGS['cpassman_dir'] . '/pages/folders.js.php'; |
|
| 1340 | + include_once $SETTINGS['cpassman_dir'].'/pages/folders.js.php'; |
|
| 1341 | 1341 | } elseif ($get['page'] === 'users') { |
| 1342 | - include_once $SETTINGS['cpassman_dir'] . '/pages/users.js.php'; |
|
| 1342 | + include_once $SETTINGS['cpassman_dir'].'/pages/users.js.php'; |
|
| 1343 | 1343 | } elseif ($get['page'] === 'roles') { |
| 1344 | - include_once $SETTINGS['cpassman_dir'] . '/pages/roles.js.php'; |
|
| 1344 | + include_once $SETTINGS['cpassman_dir'].'/pages/roles.js.php'; |
|
| 1345 | 1345 | } elseif ($get['page'] === 'utilities.deletion') { |
| 1346 | - include_once $SETTINGS['cpassman_dir'] . '/pages/utilities.deletion.js.php'; |
|
| 1346 | + include_once $SETTINGS['cpassman_dir'].'/pages/utilities.deletion.js.php'; |
|
| 1347 | 1347 | } elseif ($get['page'] === 'utilities.logs') { |
| 1348 | - include_once $SETTINGS['cpassman_dir'] . '/pages/utilities.logs.js.php'; |
|
| 1348 | + include_once $SETTINGS['cpassman_dir'].'/pages/utilities.logs.js.php'; |
|
| 1349 | 1349 | } elseif ($get['page'] === 'utilities.database') { |
| 1350 | - include_once $SETTINGS['cpassman_dir'] . '/pages/utilities.database.js.php'; |
|
| 1350 | + include_once $SETTINGS['cpassman_dir'].'/pages/utilities.database.js.php'; |
|
| 1351 | 1351 | } elseif ($get['page'] === 'utilities.renewal') { |
| 1352 | - include_once $SETTINGS['cpassman_dir'] . '/pages/utilities.renewal.js.php'; |
|
| 1352 | + include_once $SETTINGS['cpassman_dir'].'/pages/utilities.renewal.js.php'; |
|
| 1353 | 1353 | } |
| 1354 | 1354 | } else { |
| 1355 | - include_once $SETTINGS['cpassman_dir'] . '/includes/core/login.js.php'; |
|
| 1355 | + include_once $SETTINGS['cpassman_dir'].'/includes/core/login.js.php'; |
|
| 1356 | 1356 | } |
| 1357 | 1357 | } |