|
168 | 168 |
|
169 | 169 | // Load user languages files
|
170 | 170 | if (file_exists($SETTINGS['cpassman_dir'] . '/includes/language/' . $session_user_language . '.php') === true) {
|
171 |
| - $_SESSION['teampass']['lang'] = include $SETTINGS['cpassman_dir'] . '/includes/language/' . $session_user_language . '.php'; |
| 171 | + $superGlobal->put('lang', include $SETTINGS['cpassman_dir'] . '/includes/language/' . $session_user_language . '.php', 'SESSION', 'teampass'); |
172 | 172 | } else {
|
173 | 173 | $superGlobal->put('code', ERR_NOT_ALLOWED, 'SESSION', 'error');
|
174 | 174 | //not allowed page
|
|
652 | 652 | <a href="<?php echo HELP_URL; ?>" target="_blank" class="text-info"><i class="fa-solid fa-life-ring mr-2 infotip" title="<?php echo langHdl('admin_help'); ?>"></i></a>
|
653 | 653 | <i class="fa-solid fa-bug infotip pointer text-info" title="<?php echo langHdl('bugs_page'); ?>" onclick="generateBugReport()"></i>
|
654 | 654 | </div>
|
655 |
| - <?php |
656 |
| - //print_r($_SESSION); |
| 655 | + <?php |
657 | 656 | ?>
|
658 | 657 | </div>
|
659 | 658 | </div>
|
|
982 | 981 | } elseif (empty($get['page']) === false) {
|
983 | 982 | include $SETTINGS['cpassman_dir'] . '/pages/' . $get['page'] . '.php';
|
984 | 983 | } else {
|
985 |
| - $_SESSION['error']['code'] = ERR_NOT_EXIST; |
| 984 | + $superGlobal->put('code', ERR_NOT_EXIST, 'SESSION', 'error'); |
986 | 985 | //page doesn't exist
|
987 | 986 | include $SETTINGS['cpassman_dir'].'/error.php';
|
988 | 987 | }
|
989 | 988 |
|
990 | 989 | // Case where login attempts have been identified
|
991 |
| - if (isset($_SESSION['unsuccessfull_login_attempts']) === true |
992 |
| - && $_SESSION['unsuccessfull_login_attempts_nb'] !== 0 |
993 |
| - && $_SESSION['unsuccessfull_login_attempts_shown'] === false |
| 990 | + if ((int) $superGlobal->get('unsuccessfull_login_attempts', 'SESSION') !== 0 |
| 991 | + && (bool) $superGlobal->get('unsuccessfull_login_attempts_shown', 'SESSION') === false |
994 | 992 | ) {
|
995 | 993 | ?>
|
996 | 994 | <input type="hidden" id="user-login-attempts" value="1">
|
|
1028 | 1026 | <?php
|
1029 | 1027 | /* MAIN PAGE */
|
1030 | 1028 | echo '
|
1031 |
| -<input type="hidden" id="temps_restant" value="', $_SESSION['sessionDuration'] ?? '', '" />'; |
| 1029 | +<input type="hidden" id="temps_restant" value="', $superGlobal->get('sessionDuration', 'SESSION') ?? '', '" />'; |
1032 | 1030 | // display an item in the context of OTV link
|
1033 | 1031 | } elseif (($session_validite_pw === null
|
1034 | 1032 | || empty($session_validite_pw) === true
|
|
1040 | 1038 | ) {
|
1041 | 1039 | include './includes/core/otv.php';
|
1042 | 1040 | } else {
|
1043 |
| - $_SESSION['error']['code'] = ERR_VALID_SESSION; |
| 1041 | + $superGlobal->put('code', ERR_VALID_SESSION, 'SESSION', 'error'); |
1044 | 1042 | $superGlobal->put(
|
1045 | 1043 | 'initial_url',
|
1046 | 1044 | filter_var(
|
|
1291 | 1289 | $get['page'] = $superGlobal->get('page', 'GET') === null ? '' : $superGlobal->get('page', 'GET');
|
1292 | 1290 |
|
1293 | 1291 | // Load links, css and javascripts
|
1294 |
| -if ( |
1295 |
| - isset($_SESSION['CPM']) === true |
1296 |
| - && isset($SETTINGS['cpassman_dir']) === true |
1297 |
| -) { |
| 1292 | +if (isset($SETTINGS['cpassman_dir']) === true) { |
1298 | 1293 | include_once $SETTINGS['cpassman_dir'] . '/includes/core/load.js.php';
|
1299 | 1294 | if ($menuAdmin === true) {
|
1300 | 1295 | include_once $SETTINGS['cpassman_dir'] . '/pages/admin.js.php';
|
|
0 commit comments