@@ -43,16 +43,16 @@ discard block |
||
| 43 | 43 | } |
| 44 | 44 | |
| 45 | 45 | /* do checks */ |
| 46 | -require_once $SETTINGS['cpassman_dir'] . '/sources/checks.php'; |
|
| 46 | +require_once $SETTINGS['cpassman_dir'].'/sources/checks.php'; |
|
| 47 | 47 | if (checkUser($_SESSION['user_id'], $_SESSION['key'], curPage($SETTINGS), $SETTINGS) === false) { |
| 48 | 48 | $_SESSION['error']['code'] = ERR_NOT_ALLOWED; |
| 49 | - include $SETTINGS['cpassman_dir'] . '/error.php'; |
|
| 49 | + include $SETTINGS['cpassman_dir'].'/error.php'; |
|
| 50 | 50 | exit; |
| 51 | 51 | } |
| 52 | 52 | |
| 53 | 53 | // Load template |
| 54 | -require_once $SETTINGS['cpassman_dir'] . '/sources/main.functions.php'; |
|
| 55 | -require_once $SETTINGS['cpassman_dir'] . '/includes/libraries/protect/SuperGlobal/SuperGlobal.php'; |
|
| 54 | +require_once $SETTINGS['cpassman_dir'].'/sources/main.functions.php'; |
|
| 55 | +require_once $SETTINGS['cpassman_dir'].'/includes/libraries/protect/SuperGlobal/SuperGlobal.php'; |
|
| 56 | 56 | $superGlobal = new protect\SuperGlobal\SuperGlobal(); |
| 57 | 57 | // Prepare GET variables |
| 58 | 58 | $get = []; |
@@ -73,25 +73,25 @@ discard block |
||
| 73 | 73 | // prepare list of timezones |
| 74 | 74 | $zones = timezone_list(); |
| 75 | 75 | // prepare list of languages |
| 76 | -$languages = DB::query('SELECT label FROM ' . prefixTable('languages') . ' ORDER BY label ASC'); |
|
| 76 | +$languages = DB::query('SELECT label FROM '.prefixTable('languages').' ORDER BY label ASC'); |
|
| 77 | 77 | // Do some stats |
| 78 | -DB::query('SELECT id_item FROM ' . prefixTable('log_items') . ' WHERE action = "at_creation" AND id_user = "' . $_SESSION['user_id'] . '"'); |
|
| 78 | +DB::query('SELECT id_item FROM '.prefixTable('log_items').' WHERE action = "at_creation" AND id_user = "'.$_SESSION['user_id'].'"'); |
|
| 79 | 79 | $userItemsNumber = DB::count(); |
| 80 | -DB::query('SELECT id_item FROM ' . prefixTable('log_items') . ' WHERE action = "at_modification" AND id_user = "' . $_SESSION['user_id'] . '"'); |
|
| 80 | +DB::query('SELECT id_item FROM '.prefixTable('log_items').' WHERE action = "at_modification" AND id_user = "'.$_SESSION['user_id'].'"'); |
|
| 81 | 81 | $userModificationNumber = DB::count(); |
| 82 | -DB::query('SELECT id_item FROM ' . prefixTable('log_items') . ' WHERE action = "at_shown" AND id_user = "' . $_SESSION['user_id'] . '"'); |
|
| 82 | +DB::query('SELECT id_item FROM '.prefixTable('log_items').' WHERE action = "at_shown" AND id_user = "'.$_SESSION['user_id'].'"'); |
|
| 83 | 83 | $userSeenItemsNumber = DB::count(); |
| 84 | -DB::query('SELECT id_item FROM ' . prefixTable('log_items') . ' WHERE action = "at_password_shown" AND id_user = "' . $_SESSION['user_id'] . '"'); |
|
| 84 | +DB::query('SELECT id_item FROM '.prefixTable('log_items').' WHERE action = "at_password_shown" AND id_user = "'.$_SESSION['user_id'].'"'); |
|
| 85 | 85 | $userSeenPasswordsNumber = DB::count(); |
| 86 | 86 | $userInfo = DB::queryFirstRow( |
| 87 | 87 | 'SELECT avatar |
| 88 | - FROM ' . prefixTable('users') . ' |
|
| 89 | - WHERE id = "' . $_SESSION['user_id'] . '"' |
|
| 88 | + FROM ' . prefixTable('users').' |
|
| 89 | + WHERE id = "' . $_SESSION['user_id'].'"' |
|
| 90 | 90 | ); |
| 91 | 91 | if (empty($userInfo['avatar']) === true) { |
| 92 | - $avatar = $SETTINGS['cpassman_url'] . '/includes/images/photo.jpg'; |
|
| 92 | + $avatar = $SETTINGS['cpassman_url'].'/includes/images/photo.jpg'; |
|
| 93 | 93 | } else { |
| 94 | - $avatar = $SETTINGS['cpassman_url'] . '/includes/avatars/' . $userInfo['avatar']; |
|
| 94 | + $avatar = $SETTINGS['cpassman_url'].'/includes/avatars/'.$userInfo['avatar']; |
|
| 95 | 95 | } |
| 96 | 96 | |
| 97 | 97 | // Get Groups name |
@@ -99,8 +99,8 @@ discard block |
||
| 99 | 99 | foreach ($_SESSION['user_roles'] as $role) { |
| 100 | 100 | $tmp = DB::queryFirstRow( |
| 101 | 101 | 'SELECT title |
| 102 | - FROM ' . prefixTable('roles_title') . ' |
|
| 103 | - WHERE id = "' . $role . '"' |
|
| 102 | + FROM ' . prefixTable('roles_title').' |
|
| 103 | + WHERE id = "' . $role.'"' |
|
| 104 | 104 | ); |
| 105 | 105 | if ($tmp !== null) { |
| 106 | 106 | array_push($userParOfGroups, $tmp['title']); |
@@ -144,7 +144,7 @@ discard block |
||
| 144 | 144 | <h3 id="profile-username" class="text-center"> |
| 145 | 145 | <?php |
| 146 | 146 | if (isset($_SESSION['name']) === true && empty($_SESSION['name']) === false) { |
| 147 | - echo $_SESSION['name'] . ' ' . $_SESSION['lastname']; |
|
| 147 | + echo $_SESSION['name'].' '.$_SESSION['lastname']; |
|
| 148 | 148 | } else { |
| 149 | 149 | echo $_SESSION['login']; |
| 150 | 150 | } |
@@ -211,7 +211,7 @@ discard block |
||
| 211 | 211 | } else { |
| 212 | 212 | echo date('d/m/Y', $_SESSION['last_connection']); |
| 213 | 213 | } |
| 214 | - echo ' ' . langHdl('at') . ' '; |
|
| 214 | + echo ' '.langHdl('at').' '; |
|
| 215 | 215 | if (isset($SETTINGS['time_format']) === true) { |
| 216 | 216 | echo date($SETTINGS['time_format'], $_SESSION['last_connection']); |
| 217 | 217 | } else { |
@@ -221,7 +221,7 @@ discard block |
||
| 221 | 221 | </a> |
| 222 | 222 | </li> |
| 223 | 223 | <?php |
| 224 | - if (isset($_SESSION['last_pw_change']) && ! empty($_SESSION['last_pw_change'])) { |
|
| 224 | + if (isset($_SESSION['last_pw_change']) && !empty($_SESSION['last_pw_change'])) { |
|
| 225 | 225 | // Handle last password change string |
| 226 | 226 | if (isset($_SESSION['last_pw_change']) === true) { |
| 227 | 227 | if (isset($SETTINGS['date_format']) === true) { |
@@ -241,12 +241,12 @@ discard block |
||
| 241 | 241 | ) { |
| 242 | 242 | $numDaysBeforePwExpiration = ''; |
| 243 | 243 | } else { |
| 244 | - $numDaysBeforePwExpiration = $LANG['index_pw_expiration'] . ' ' . $_SESSION['numDaysBeforePwExpiration'] . ' ' . $LANG['days'] . '.'; |
|
| 244 | + $numDaysBeforePwExpiration = $LANG['index_pw_expiration'].' '.$_SESSION['numDaysBeforePwExpiration'].' '.$LANG['days'].'.'; |
|
| 245 | 245 | } |
| 246 | 246 | echo ' |
| 247 | 247 | <li class="list-group-item"> |
| 248 | - <b><i class="fas fa-calendar-alt fa-fw fa-lg mr-2"></i>' . langHdl('index_last_pw_change') . '</b> |
|
| 249 | - <a class="float-right">' . $last_pw_change . ' ' . $numDaysBeforePwExpiration . '</a> |
|
| 248 | + <b><i class="fas fa-calendar-alt fa-fw fa-lg mr-2"></i>' . langHdl('index_last_pw_change').'</b> |
|
| 249 | + <a class="float-right">' . $last_pw_change.' '.$numDaysBeforePwExpiration.'</a> |
|
| 250 | 250 | </li>'; |
| 251 | 251 | } |
| 252 | 252 | ?> |
@@ -266,7 +266,7 @@ discard block |
||
| 266 | 266 | if (isset($SETTINGS['api']) === true && (int) $SETTINGS['api'] === 1) { |
| 267 | 267 | echo ' |
| 268 | 268 | <li class="list-group-item"> |
| 269 | - <b><i class="fas fa-paper-plane fa-fw fa-lg mr-2"></i>' . langHdl('user_profile_api_key') . '</b> |
|
| 269 | + <b><i class="fas fa-paper-plane fa-fw fa-lg mr-2"></i>' . langHdl('user_profile_api_key').'</b> |
|
| 270 | 270 | <a class="float-right" id="profile-user-api-token">', |
| 271 | 271 | isset($_SESSION['user']['api-key']) === true ? $_SESSION['user']['api-key'] : '', |
| 272 | 272 | '</a> |
@@ -278,7 +278,7 @@ discard block |
||
| 278 | 278 | ) { |
| 279 | 279 | echo ' |
| 280 | 280 | <li class="list-group-item"> |
| 281 | - <b><i class="fas fa-id-card-o fa-fw fa-lg mr-2"></i>' . langHdl('user_profile_agses_card_id') . '</b> |
|
| 281 | + <b><i class="fas fa-id-card-o fa-fw fa-lg mr-2"></i>' . langHdl('user_profile_agses_card_id').'</b> |
|
| 282 | 282 | <a class="float-right">', |
| 283 | 283 | $_SESSION['user']['agses-usercardid'] ?? '', |
| 284 | 284 | '</a> |
@@ -302,7 +302,7 @@ discard block |
||
| 302 | 302 | <ul class=""> |
| 303 | 303 | <?php |
| 304 | 304 | foreach ($_SESSION['user']['unsuccessfull_login_attempts_list'] as $entry) { |
| 305 | - echo '<li class="">' . $entry . '</li>'; |
|
| 305 | + echo '<li class="">'.$entry.'</li>'; |
|
| 306 | 306 | } ?> |
| 307 | 307 | </ul> |
| 308 | 308 | </div> |
@@ -315,12 +315,12 @@ discard block |
||
| 315 | 315 | <?php |
| 316 | 316 | $rows = DB::query( |
| 317 | 317 | 'SELECT label AS labelAction, date, null |
| 318 | - FROM ' . prefixTable('log_system') . ' |
|
| 318 | + FROM ' . prefixTable('log_system').' |
|
| 319 | 319 | WHERE qui = %i |
| 320 | 320 | UNION |
| 321 | 321 | SELECT l.action, l.date, i.label AS itemLabel |
| 322 | - FROM ' . prefixTable('log_items') . ' AS l |
|
| 323 | - INNER JOIN ' . prefixTable('items') . ' AS i ON (l.id_item = i.id) |
|
| 322 | + FROM ' . prefixTable('log_items').' AS l |
|
| 323 | + INNER JOIN ' . prefixTable('items').' AS i ON (l.id_item = i.id) |
|
| 324 | 324 | WHERE l.id_user = %i AND l.action IN ("at_access") |
| 325 | 325 | ORDER BY date DESC |
| 326 | 326 | LIMIT 0, 40', |
@@ -334,9 +334,9 @@ discard block |
||
| 334 | 334 | $text = langHdl($record['labelAction']); |
| 335 | 335 | } |
| 336 | 336 | if (empty($record['NULL']) === false) { |
| 337 | - $text .= ' ' . langHdl('for') . ' <span class="font-weight-light">' . addslashes($record['NULL']) . '</span>'; |
|
| 337 | + $text .= ' '.langHdl('for').' <span class="font-weight-light">'.addslashes($record['NULL']).'</span>'; |
|
| 338 | 338 | } |
| 339 | - echo '<li class="list-group-item">' . date($SETTINGS['date_format'] . ' ' . $SETTINGS['time_format'], $record['date']) . ' - ' . $text . '</li>'; |
|
| 339 | + echo '<li class="list-group-item">'.date($SETTINGS['date_format'].' '.$SETTINGS['time_format'], $record['date']).' - '.$text.'</li>'; |
|
| 340 | 340 | } |
| 341 | 341 | ?> |
| 342 | 342 | </ul> |
@@ -374,11 +374,10 @@ discard block |
||
| 374 | 374 | <?php |
| 375 | 375 | foreach ($zones as $key => $zone) { |
| 376 | 376 | echo ' |
| 377 | - <option value="' . $key . '"', |
|
| 377 | + <option value="' . $key.'"', |
|
| 378 | 378 | isset($_SESSION['user']['usertimezone']) === true && $_SESSION['user']['usertimezone'] === $key ? |
| 379 | - ' selected' : |
|
| 380 | - (isset($SETTINGS['timezone']) === true && $SETTINGS['timezone'] === $key ? ' selected' : ''), |
|
| 381 | - '>' . $zone . '</option>'; |
|
| 379 | + ' selected' : (isset($SETTINGS['timezone']) === true && $SETTINGS['timezone'] === $key ? ' selected' : ''), |
|
| 380 | + '>'.$zone.'</option>'; |
|
| 382 | 381 | } |
| 383 | 382 | ?> |
| 384 | 383 | </select> |
@@ -390,11 +389,10 @@ discard block |
||
| 390 | 389 | <select class="form-control" id="profile-user-language"> |
| 391 | 390 | <?php |
| 392 | 391 | foreach ($languages as $language) { |
| 393 | - echo '<option value="' . $language['label'] . '"', |
|
| 392 | + echo '<option value="'.$language['label'].'"', |
|
| 394 | 393 | $_SESSION['user']['user_language'] === strtolower($language['label']) ? |
| 395 | - ' selected="selected"' : |
|
| 396 | - ($SETTINGS['default_language'] === strtolower($language['label']) ? ' selected="selected"' : ''), |
|
| 397 | - '>' . $language['label'] . '</option>'; |
|
| 394 | + ' selected="selected"' : ($SETTINGS['default_language'] === strtolower($language['label']) ? ' selected="selected"' : ''), |
|
| 395 | + '>'.$language['label'].'</option>'; |
|
| 398 | 396 | } |
| 399 | 397 | ?> |
| 400 | 398 | </select> |
@@ -445,7 +443,7 @@ discard block |
||
| 445 | 443 | <button type="button" class="btn btn-warning float-right ml-2" id="profile-avatar-file"><?php echo langHdl('upload_new_avatar'); ?></button> |
| 446 | 444 | <?php |
| 447 | 445 | if (isset($SETTINGS['api']) === true && (int) $SETTINGS['api'] === 1) { |
| 448 | - echo '<button type="button" class="btn btn-warning float-right" id="profile-button-api_token">' . langHdl('generate_api_token') . '</button>'; |
|
| 446 | + echo '<button type="button" class="btn btn-warning float-right" id="profile-button-api_token">'.langHdl('generate_api_token').'</button>'; |
|
| 449 | 447 | } |
| 450 | 448 | ?> |
| 451 | 449 | <div id="profile-avatar-file-container" class="hidden"></div> |
@@ -43,15 +43,15 @@ discard block |
||
| 43 | 43 | } |
| 44 | 44 | |
| 45 | 45 | /* do checks */ |
| 46 | -require_once $SETTINGS['cpassman_dir'] . '/sources/checks.php'; |
|
| 46 | +require_once $SETTINGS['cpassman_dir'].'/sources/checks.php'; |
|
| 47 | 47 | if (checkUser($_SESSION['user_id'], $_SESSION['key'], 'fields', $SETTINGS) === false) { |
| 48 | 48 | $_SESSION['error']['code'] = ERR_NOT_ALLOWED; |
| 49 | - include $SETTINGS['cpassman_dir'] . '/error.php'; |
|
| 49 | + include $SETTINGS['cpassman_dir'].'/error.php'; |
|
| 50 | 50 | exit; |
| 51 | 51 | } |
| 52 | 52 | |
| 53 | 53 | // Load template |
| 54 | -require_once $SETTINGS['cpassman_dir'] . '/sources/main.functions.php'; |
|
| 54 | +require_once $SETTINGS['cpassman_dir'].'/sources/main.functions.php'; |
|
| 55 | 55 | //Build tree |
| 56 | 56 | $tree = new SplClassLoader('Tree\NestedTree', './includes/libraries'); |
| 57 | 57 | $tree->register(); |
@@ -153,7 +153,7 @@ discard block |
||
| 153 | 153 | $folders = $tree->getDescendants(); |
| 154 | 154 | foreach ($folders as $folder) { |
| 155 | 155 | DB::query( |
| 156 | - 'SELECT * FROM ' . prefixTable('nested_tree') . ' |
|
| 156 | + 'SELECT * FROM '.prefixTable('nested_tree').' |
|
| 157 | 157 | WHERE personal_folder = %i AND id = %i', |
| 158 | 158 | '0', |
| 159 | 159 | $folder->id |
@@ -165,7 +165,7 @@ discard block |
||
| 165 | 165 | $ident .= '-'; |
| 166 | 166 | } |
| 167 | 167 | echo ' |
| 168 | - <option value="' . $folder->id . '">' . $ident . ' ' . str_replace('&', '&', $folder->title) . '</option>'; |
|
| 168 | + <option value="' . $folder->id.'">'.$ident.' '.str_replace('&', '&', $folder->title).'</option>'; |
|
| 169 | 169 | } |
| 170 | 170 | } |
| 171 | 171 | ?> |
@@ -196,9 +196,9 @@ discard block |
||
| 196 | 196 | <select class="form-control form-item-control select2" style="width:100%;" id="form-field-type"> |
| 197 | 197 | <?php |
| 198 | 198 | // Build list of Types |
| 199 | - echo '<option value="">-- ' . langHdl('select') . ' --</option> |
|
| 200 | - <option value="text">' . langHdl('text') . '</option> |
|
| 201 | - <option value="textarea">' . langHdl('textarea') . '</option>'; |
|
| 199 | + echo '<option value="">-- '.langHdl('select').' --</option> |
|
| 200 | + <option value="text">' . langHdl('text').'</option> |
|
| 201 | + <option value="textarea">' . langHdl('textarea').'</option>'; |
|
| 202 | 202 | ?> |
| 203 | 203 | </select> |
| 204 | 204 | </div> |
@@ -226,14 +226,14 @@ discard block |
||
| 226 | 226 | <select class="form-control form-item-control select2" multiple="multiple" style="width:100%;" id="form-field-roles"> |
| 227 | 227 | <?php |
| 228 | 228 | // Build list of Roles |
| 229 | - echo '<option value="all">' . langHdl('every_roles') . '</option>'; |
|
| 229 | + echo '<option value="all">'.langHdl('every_roles').'</option>'; |
|
| 230 | 230 | $rows = DB::query( |
| 231 | 231 | 'SELECT id, title |
| 232 | - FROM ' . prefixTable('roles_title') . ' |
|
| 232 | + FROM ' . prefixTable('roles_title').' |
|
| 233 | 233 | ORDER BY title ASC' |
| 234 | 234 | ); |
| 235 | 235 | foreach ($rows as $record) { |
| 236 | - echo '<option value="' . $record['id'] . '">' . addslashes($record['title']) . '</option>'; |
|
| 236 | + echo '<option value="'.$record['id'].'">'.addslashes($record['title']).'</option>'; |
|
| 237 | 237 | } |
| 238 | 238 | ?> |
| 239 | 239 | </select> |
@@ -43,15 +43,15 @@ |
||
| 43 | 43 | } |
| 44 | 44 | |
| 45 | 45 | /* do checks */ |
| 46 | -require_once $SETTINGS['cpassman_dir'] . '/sources/checks.php'; |
|
| 46 | +require_once $SETTINGS['cpassman_dir'].'/sources/checks.php'; |
|
| 47 | 47 | if (checkUser($_SESSION['user_id'], $_SESSION['key'], 'backups', $SETTINGS) === false) { |
| 48 | 48 | $_SESSION['error']['code'] = ERR_NOT_ALLOWED; |
| 49 | - include $SETTINGS['cpassman_dir'] . '/error.php'; |
|
| 49 | + include $SETTINGS['cpassman_dir'].'/error.php'; |
|
| 50 | 50 | exit; |
| 51 | 51 | } |
| 52 | 52 | |
| 53 | 53 | // Load template |
| 54 | -require_once $SETTINGS['cpassman_dir'] . '/sources/main.functions.php'; |
|
| 54 | +require_once $SETTINGS['cpassman_dir'].'/sources/main.functions.php'; |
|
| 55 | 55 | // Decrypt key |
| 56 | 56 | $localEncryptionKey = isset($SETTINGS['bck_script_passkey']) === true ? |
| 57 | 57 | cryption($SETTINGS['bck_script_passkey'], '', 'decrypt', $SETTINGS)['string'] : ''; |
@@ -43,11 +43,11 @@ |
||
| 43 | 43 | } |
| 44 | 44 | |
| 45 | 45 | /* do checks */ |
| 46 | -require_once $SETTINGS['cpassman_dir'] . '/sources/checks.php'; |
|
| 46 | +require_once $SETTINGS['cpassman_dir'].'/sources/checks.php'; |
|
| 47 | 47 | if (checkUser($_SESSION['user_id'], $_SESSION['key'], 'statistics', $SETTINGS) === false) { |
| 48 | 48 | $_SESSION['error']['code'] = ERR_NOT_ALLOWED; |
| 49 | 49 | //not allowed page |
| 50 | - include $SETTINGS['cpassman_dir'] . '/error.php'; |
|
| 50 | + include $SETTINGS['cpassman_dir'].'/error.php'; |
|
| 51 | 51 | exit; |
| 52 | 52 | } |
| 53 | 53 | ?> |
@@ -26,7 +26,7 @@ |
||
| 26 | 26 | */ |
| 27 | 27 | |
| 28 | 28 | if ( |
| 29 | - isset($_SESSION['CPM']) === false || $_SESSION['CPM'] !== 1 |
|
| 29 | + isset($_SESSION['CPM']) === false || $_SESSION['CPM'] !== 1 |
|
| 30 | 30 | || isset($_SESSION['user_id']) === false || empty($_SESSION['user_id']) === true |
| 31 | 31 | || isset($_SESSION['key']) === false || empty($_SESSION['key']) === true |
| 32 | 32 | ) { |
@@ -43,15 +43,15 @@ |
||
| 43 | 43 | } |
| 44 | 44 | |
| 45 | 45 | /* do checks */ |
| 46 | -require_once $SETTINGS['cpassman_dir'] . '/sources/checks.php'; |
|
| 46 | +require_once $SETTINGS['cpassman_dir'].'/sources/checks.php'; |
|
| 47 | 47 | if (checkUser($_SESSION['user_id'], $_SESSION['key'], 'special', $SETTINGS) === false) { |
| 48 | 48 | $_SESSION['error']['code'] = ERR_NOT_ALLOWED; |
| 49 | - include $SETTINGS['cpassman_dir'] . '/error.php'; |
|
| 49 | + include $SETTINGS['cpassman_dir'].'/error.php'; |
|
| 50 | 50 | exit; |
| 51 | 51 | } |
| 52 | 52 | |
| 53 | 53 | // Load template |
| 54 | -require_once $SETTINGS['cpassman_dir'] . '/sources/main.functions.php'; |
|
| 54 | +require_once $SETTINGS['cpassman_dir'].'/sources/main.functions.php'; |
|
| 55 | 55 | |
| 56 | 56 | ?> |
| 57 | 57 | |
@@ -43,11 +43,11 @@ |
||
| 43 | 43 | } |
| 44 | 44 | |
| 45 | 45 | /* do checks */ |
| 46 | -require_once $SETTINGS['cpassman_dir'] . '/sources/checks.php'; |
|
| 46 | +require_once $SETTINGS['cpassman_dir'].'/sources/checks.php'; |
|
| 47 | 47 | if (checkUser($_SESSION['user_id'], $_SESSION['key'], 'profile', $SETTINGS) === false) { |
| 48 | 48 | $_SESSION['error']['code'] = ERR_NOT_ALLOWED; |
| 49 | 49 | //not allowed page |
| 50 | - include $SETTINGS['cpassman_dir'] . '/error.php'; |
|
| 50 | + include $SETTINGS['cpassman_dir'].'/error.php'; |
|
| 51 | 51 | exit; |
| 52 | 52 | } |
| 53 | 53 | ?> |
@@ -43,11 +43,11 @@ |
||
| 43 | 43 | } |
| 44 | 44 | |
| 45 | 45 | /* do checks */ |
| 46 | -require_once $SETTINGS['cpassman_dir'] . '/sources/checks.php'; |
|
| 46 | +require_once $SETTINGS['cpassman_dir'].'/sources/checks.php'; |
|
| 47 | 47 | if (checkUser($_SESSION['user_id'], $_SESSION['key'], 'utilities.logs', $SETTINGS) === false) { |
| 48 | 48 | $_SESSION['error']['code'] = ERR_NOT_ALLOWED; |
| 49 | 49 | //not allowed page |
| 50 | - include $SETTINGS['cpassman_dir'] . '/error.php'; |
|
| 50 | + include $SETTINGS['cpassman_dir'].'/error.php'; |
|
| 51 | 51 | exit; |
| 52 | 52 | } |
| 53 | 53 | ?> |
@@ -43,15 +43,15 @@ |
||
| 43 | 43 | } |
| 44 | 44 | |
| 45 | 45 | /* do checks */ |
| 46 | -require_once $SETTINGS['cpassman_dir'] . '/sources/checks.php'; |
|
| 46 | +require_once $SETTINGS['cpassman_dir'].'/sources/checks.php'; |
|
| 47 | 47 | if (checkUser($_SESSION['user_id'], $_SESSION['key'], 'ldap', $SETTINGS) === false) { |
| 48 | 48 | $_SESSION['error']['code'] = ERR_NOT_ALLOWED; |
| 49 | - include $SETTINGS['cpassman_dir'] . '/error.php'; |
|
| 49 | + include $SETTINGS['cpassman_dir'].'/error.php'; |
|
| 50 | 50 | exit; |
| 51 | 51 | } |
| 52 | 52 | |
| 53 | 53 | // Load template |
| 54 | -require_once $SETTINGS['cpassman_dir'] . '/sources/main.functions.php'; |
|
| 54 | +require_once $SETTINGS['cpassman_dir'].'/sources/main.functions.php'; |
|
| 55 | 55 | // LDAP type currently loaded |
| 56 | 56 | $ldap_type = $SETTINGS['ldap_type'] ?? ''; |
| 57 | 57 | |
@@ -43,15 +43,15 @@ discard block |
||
| 43 | 43 | } |
| 44 | 44 | |
| 45 | 45 | /* do checks */ |
| 46 | -require_once $SETTINGS['cpassman_dir'] . '/sources/checks.php'; |
|
| 46 | +require_once $SETTINGS['cpassman_dir'].'/sources/checks.php'; |
|
| 47 | 47 | if (checkUser($_SESSION['user_id'], $_SESSION['key'], 'roles', $SETTINGS) === false) { |
| 48 | 48 | $_SESSION['error']['code'] = ERR_NOT_ALLOWED; |
| 49 | - include $SETTINGS['cpassman_dir'] . '/error.php'; |
|
| 49 | + include $SETTINGS['cpassman_dir'].'/error.php'; |
|
| 50 | 50 | exit; |
| 51 | 51 | } |
| 52 | 52 | |
| 53 | 53 | // Load template |
| 54 | -require_once $SETTINGS['cpassman_dir'] . '/sources/main.functions.php'; |
|
| 54 | +require_once $SETTINGS['cpassman_dir'].'/sources/main.functions.php'; |
|
| 55 | 55 | |
| 56 | 56 | ?> |
| 57 | 57 | |
@@ -94,17 +94,17 @@ discard block |
||
| 94 | 94 | $arrUserRoles = array_filter($_SESSION['user_roles']); |
| 95 | 95 | $where = ''; |
| 96 | 96 | if (count($arrUserRoles) > 0 && (int) $_SESSION['is_admin'] !== 1) { |
| 97 | - $where = ' WHERE id IN (' . implode(',', $arrUserRoles) . ')'; |
|
| 97 | + $where = ' WHERE id IN ('.implode(',', $arrUserRoles).')'; |
|
| 98 | 98 | } |
| 99 | - $rows = DB::query('SELECT * FROM ' . prefixTable('roles_title') . $where); |
|
| 99 | + $rows = DB::query('SELECT * FROM '.prefixTable('roles_title').$where); |
|
| 100 | 100 | foreach ($rows as $reccord) { |
| 101 | 101 | echo ' |
| 102 | - <option value="' . $reccord['id'] . '" |
|
| 103 | - data-complexity-text="' . addslashes(TP_PW_COMPLEXITY[$reccord['complexity']][1]) . '" |
|
| 104 | - data-complexity-icon="' . TP_PW_COMPLEXITY[$reccord['complexity']][2] . '" |
|
| 105 | - data-complexity="' . TP_PW_COMPLEXITY[$reccord['complexity']][0] . '" |
|
| 106 | - data-allow-edit-all="' . $reccord['allow_pw_change'] . '">'. |
|
| 107 | - $reccord['title'] . '</option>'; |
|
| 102 | + <option value="' . $reccord['id'].'" |
|
| 103 | + data-complexity-text="' . addslashes(TP_PW_COMPLEXITY[$reccord['complexity']][1]).'" |
|
| 104 | + data-complexity-icon="' . TP_PW_COMPLEXITY[$reccord['complexity']][2].'" |
|
| 105 | + data-complexity="' . TP_PW_COMPLEXITY[$reccord['complexity']][0].'" |
|
| 106 | + data-allow-edit-all="' . $reccord['allow_pw_change'].'">'. |
|
| 107 | + $reccord['title'].'</option>'; |
|
| 108 | 108 | } |
| 109 | 109 | ?> |
| 110 | 110 | </select> |
@@ -125,7 +125,7 @@ discard block |
||
| 125 | 125 | <?php |
| 126 | 126 | foreach (TP_PW_COMPLEXITY as $entry) { |
| 127 | 127 | echo ' |
| 128 | - <option value="' . $entry[0] . '">' . addslashes($entry[1]) . '</option>'; |
|
| 128 | + <option value="' . $entry[0].'">'.addslashes($entry[1]).'</option>'; |
|
| 129 | 129 | } |
| 130 | 130 | ?> |
| 131 | 131 | </select> |