@@ -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'], 'utilities.database', $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 | <!-- Content Header (Page header) --> |
@@ -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'], 'utilities.deletion', $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 | |
@@ -42,12 +42,12 @@ discard block |
||
| 42 | 42 | } |
| 43 | 43 | |
| 44 | 44 | // Load template |
| 45 | -require_once $SETTINGS['cpassman_dir'] . '/sources/main.functions.php'; |
|
| 45 | +require_once $SETTINGS['cpassman_dir'].'/sources/main.functions.php'; |
|
| 46 | 46 | /* do checks */ |
| 47 | -require_once $SETTINGS['cpassman_dir'] . '/sources/checks.php'; |
|
| 47 | +require_once $SETTINGS['cpassman_dir'].'/sources/checks.php'; |
|
| 48 | 48 | if (checkUser($_SESSION['user_id'], $_SESSION['key'], 'admin', $SETTINGS) === false) { |
| 49 | 49 | $_SESSION['error']['code'] = ERR_NOT_ALLOWED; |
| 50 | - include $SETTINGS['cpassman_dir'] . '/error.php'; |
|
| 50 | + include $SETTINGS['cpassman_dir'].'/error.php'; |
|
| 51 | 51 | exit; |
| 52 | 52 | } |
| 53 | 53 | |
@@ -134,12 +134,12 @@ discard block |
||
| 134 | 134 | if ($tab !== false) { |
| 135 | 135 | $cnt = 0; |
| 136 | 136 | foreach ($tab as $cle => $val) { |
| 137 | - if (! (strpos(trim($val), '/*') === 0 || strpos(trim($val), '*') === 0)) { |
|
| 137 | + if (!(strpos(trim($val), '/*') === 0 || strpos(trim($val), '*') === 0)) { |
|
| 138 | 138 | if ($cnt < 19) { |
| 139 | - echo $val . '<br />'; |
|
| 139 | + echo $val.'<br />'; |
|
| 140 | 140 | ++$cnt; |
| 141 | 141 | } elseif ($cnt === 19) { |
| 142 | - echo '...<br /><br /><b><a href="changelog.txt" target="_blank"><span class="fa fa-book"></span>' . langHdl('readme_open') . '</a></b>'; |
|
| 142 | + echo '...<br /><br /><b><a href="changelog.txt" target="_blank"><span class="fa fa-book"></span>'.langHdl('readme_open').'</a></b>'; |
|
| 143 | 143 | break; |
| 144 | 144 | } |
| 145 | 145 | } |
@@ -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'], 'utilities.logs', $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 | |
@@ -176,7 +176,7 @@ discard block |
||
| 176 | 176 | echo isset($_SESSION['user_admin']) && (int) $_SESSION['user_admin'] === 1 ? '' : ' hidden'; |
| 177 | 177 | ?>"> |
| 178 | 178 | <div class="form-group"> |
| 179 | - <h5><i class="fas fa-broom mr-2"></i><?php echo langHdl('purge') . ' ' . langHdl('date_range'); ?></h5> |
|
| 179 | + <h5><i class="fas fa-broom mr-2"></i><?php echo langHdl('purge').' '.langHdl('date_range'); ?></h5> |
|
| 180 | 180 | <div class="input-group"> |
| 181 | 181 | <div class="input-group-prepend"> |
| 182 | 182 | <span class="input-group-text"> |
@@ -199,7 +199,7 @@ discard block |
||
| 199 | 199 | <select class="form-control" id="purge-filter-user"> |
| 200 | 200 | <option value="-1"><?php echo langHdl('all'); ?></option> |
| 201 | 201 | <?php |
| 202 | - $rows = DB::query('SELECT id, name, lastname FROM ' . prefixTable('users') . ' WHERE admin = 0'); |
|
| 202 | + $rows = DB::query('SELECT id, name, lastname FROM '.prefixTable('users').' WHERE admin = 0'); |
|
| 203 | 203 | foreach ($rows as $record) { |
| 204 | 204 | echo ' |
| 205 | 205 | <option value="'.$record['id'].'">'.$record['name'].' '.$record['lastname'].'</option>'; |
@@ -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'], 'admin', $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 | // Generates zones |
| 56 | 56 | $zones = timezone_list(); |
| 57 | 57 | ?> |
@@ -260,7 +260,7 @@ discard block |
||
| 260 | 260 | // get list of all timezones |
| 261 | 261 | foreach ($zones as $key => $zone) { |
| 262 | 262 | echo ' |
| 263 | - <option value="' . $key . '"', isset($SETTINGS['timezone']) === true && $SETTINGS['timezone'] === $key ? ' selected' : '', '>' . $zone . '</option>'; |
|
| 263 | + <option value="' . $key.'"', isset($SETTINGS['timezone']) === true && $SETTINGS['timezone'] === $key ? ' selected' : '', '>'.$zone.'</option>'; |
|
| 264 | 264 | } |
| 265 | 265 | ?> |
| 266 | 266 | </select> |
@@ -311,7 +311,7 @@ discard block |
||
| 311 | 311 | <?php |
| 312 | 312 | foreach ($languagesList as $lang) { |
| 313 | 313 | echo ' |
| 314 | - <option value="' . $lang . '"', isset($SETTINGS['default_language']) === true && $SETTINGS['default_language'] === $lang ? ' selected' : '', '>' . $lang . '</option>'; |
|
| 314 | + <option value="' . $lang.'"', isset($SETTINGS['default_language']) === true && $SETTINGS['default_language'] === $lang ? ' selected' : '', '>'.$lang.'</option>'; |
|
| 315 | 315 | } |
| 316 | 316 | ?> |
| 317 | 317 | </select> |
@@ -408,7 +408,7 @@ discard block |
||
| 408 | 408 | <?php |
| 409 | 409 | foreach (TP_PW_COMPLEXITY as $complex) { |
| 410 | 410 | echo ' |
| 411 | - <option value="' . $complex[0] . '"', isset($SETTINGS['personal_saltkey_security_level']) === true && $SETTINGS['personal_saltkey_security_level'] === $complex[0] ? ' selected' : '', '>' . $complex[1] . '</option>'; |
|
| 411 | + <option value="' . $complex[0].'"', isset($SETTINGS['personal_saltkey_security_level']) === true && $SETTINGS['personal_saltkey_security_level'] === $complex[0] ? ' selected' : '', '>'.$complex[1].'</option>'; |
|
| 412 | 412 | } |
| 413 | 413 | ?> |
| 414 | 414 | </select> |
@@ -720,7 +720,7 @@ discard block |
||
| 720 | 720 | ); |
| 721 | 721 | foreach ($roles as $role) { |
| 722 | 722 | echo ' |
| 723 | - <option value="' . $role['id'] . '"', in_array($role['id'], $arrRolesToPrint) === true ? ' selected' : '', '>' . addslashes($role['title']) . '</option>'; |
|
| 723 | + <option value="' . $role['id'].'"', in_array($role['id'], $arrRolesToPrint) === true ? ' selected' : '', '>'.addslashes($role['title']).'</option>'; |
|
| 724 | 724 | } |
| 725 | 725 | ?> |
| 726 | 726 | </select> |
@@ -892,7 +892,7 @@ discard block |
||
| 892 | 892 | <?php |
| 893 | 893 | foreach (TP_PW_COMPLEXITY as $complex) { |
| 894 | 894 | echo ' |
| 895 | - <option value="' . $complex[0] . '"', isset($SETTINGS['offline_key_level']) === true && $SETTINGS['offline_key_level'] === $complex[0] ? ' selected' : '', '>' . $complex[1] . '</option>'; |
|
| 895 | + <option value="' . $complex[0].'"', isset($SETTINGS['offline_key_level']) === true && $SETTINGS['offline_key_level'] === $complex[0] ? ' selected' : '', '>'.$complex[1].'</option>'; |
|
| 896 | 896 | } |
| 897 | 897 | ?> |
| 898 | 898 | </select> |
@@ -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'], '2fa', $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 | |
@@ -115,7 +115,7 @@ discard block |
||
| 115 | 115 | ); |
| 116 | 116 | foreach ($roles as $role) { |
| 117 | 117 | echo ' |
| 118 | - <option value="' . $role['id'] . '"', in_array($role['id'], $arrRolesMFA) === true ? ' selected' : '', '>' . addslashes($role['title']) . '</option>'; |
|
| 118 | + <option value="' . $role['id'].'"', in_array($role['id'], $arrRolesMFA) === true ? ' selected' : '', '>'.addslashes($role['title']).'</option>'; |
|
| 119 | 119 | } |
| 120 | 120 | ?> |
| 121 | 121 | </select> |
@@ -43,18 +43,18 @@ 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 | 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 | |
| 54 | 54 | // Load |
| 55 | -require_once $SETTINGS['cpassman_dir'] . '/sources/SplClassLoader.php'; |
|
| 56 | -require_once $SETTINGS['cpassman_dir'] . '/sources/main.functions.php'; |
|
| 57 | -require_once $SETTINGS['cpassman_dir'] . '/includes/libraries/protect/SuperGlobal/SuperGlobal.php'; |
|
| 55 | +require_once $SETTINGS['cpassman_dir'].'/sources/SplClassLoader.php'; |
|
| 56 | +require_once $SETTINGS['cpassman_dir'].'/sources/main.functions.php'; |
|
| 57 | +require_once $SETTINGS['cpassman_dir'].'/includes/libraries/protect/SuperGlobal/SuperGlobal.php'; |
|
| 58 | 58 | $superGlobal = new protect\SuperGlobal\SuperGlobal(); |
| 59 | 59 | |
| 60 | 60 | // Prepare SESSION variables |
@@ -69,7 +69,7 @@ discard block |
||
| 69 | 69 | |
| 70 | 70 | // Get list of users |
| 71 | 71 | $usersList = []; |
| 72 | -$rows = DB::query('SELECT id,login,email FROM ' . prefixTable('users') . ' ORDER BY login ASC'); |
|
| 72 | +$rows = DB::query('SELECT id,login,email FROM '.prefixTable('users').' ORDER BY login ASC'); |
|
| 73 | 73 | foreach ($rows as $record) { |
| 74 | 74 | $usersList[$record['login']] = [ |
| 75 | 75 | 'id' => $record['id'], |
@@ -80,16 +80,16 @@ discard block |
||
| 80 | 80 | // Get list of roles |
| 81 | 81 | $arrRoles = []; |
| 82 | 82 | $listRoles = ''; |
| 83 | -$rows = DB::query('SELECT id,title FROM ' . prefixTable('roles_title') . ' ORDER BY title ASC'); |
|
| 83 | +$rows = DB::query('SELECT id,title FROM '.prefixTable('roles_title').' ORDER BY title ASC'); |
|
| 84 | 84 | foreach ($rows as $reccord) { |
| 85 | 85 | $arrRoles[$reccord['title']] = [ |
| 86 | 86 | 'id' => $reccord['id'], |
| 87 | 87 | 'title' => $reccord['title'], |
| 88 | 88 | ]; |
| 89 | 89 | if (empty($listRoles)) { |
| 90 | - $listRoles = $reccord['id'] . '#' . $reccord['title']; |
|
| 90 | + $listRoles = $reccord['id'].'#'.$reccord['title']; |
|
| 91 | 91 | } else { |
| 92 | - $listRoles .= ';' . $reccord['id'] . '#' . $reccord['title']; |
|
| 92 | + $listRoles .= ';'.$reccord['id'].'#'.$reccord['title']; |
|
| 93 | 93 | } |
| 94 | 94 | } |
| 95 | 95 | ?> |
@@ -163,9 +163,9 @@ discard block |
||
| 163 | 163 | <li class="nav-item"><a class="nav-link" href="#tab_3" data-toggle="tab"><i class="fas fa-archive mr-2"></i><?php echo langHdl('attachments'); ?></a></li> |
| 164 | 164 | <?php |
| 165 | 165 | echo isset($SETTINGS['item_extra_fields']) === true && (int) $SETTINGS['item_extra_fields'] === 1 ? ' |
| 166 | - <li class="nav-item"><a class="nav-link" href="#tab_4" data-toggle="tab"><i class="fas fa-cubes mr-2"></i>' . langHdl('fields') . '</a></li>' : ''; |
|
| 166 | + <li class="nav-item"><a class="nav-link" href="#tab_4" data-toggle="tab"><i class="fas fa-cubes mr-2"></i>' . langHdl('fields').'</a></li>' : ''; |
|
| 167 | 167 | echo isset($SETTINGS['insert_manual_entry_item_history']) === true && (int) $SETTINGS['insert_manual_entry_item_history'] === 1 ? ' |
| 168 | - <li class="nav-item"><a class="nav-link" href="#tab_5" data-toggle="tab"><i class="fas fa-history mr-2"></i>' . langHdl('history') . '</a></li>' : ''; |
|
| 168 | + <li class="nav-item"><a class="nav-link" href="#tab_5" data-toggle="tab"><i class="fas fa-history mr-2"></i>' . langHdl('history').'</a></li>' : ''; |
|
| 169 | 169 | ?> |
| 170 | 170 | </ul> |
| 171 | 171 | </div><!-- /.card-header --> |
@@ -234,7 +234,7 @@ discard block |
||
| 234 | 234 | <?php |
| 235 | 235 | for ($i = 4; $i <= $SETTINGS['pwd_maximum_length']; ++$i) { |
| 236 | 236 | echo ' |
| 237 | - <option>' . $i . '</option>'; |
|
| 237 | + <option>' . $i.'</option>'; |
|
| 238 | 238 | } |
| 239 | 239 | ?> |
| 240 | 240 | </select> |
@@ -402,29 +402,29 @@ discard block |
||
| 402 | 402 | <?php |
| 403 | 403 | foreach ($_SESSION['item_fields'] as $category) { |
| 404 | 404 | echo ' |
| 405 | - <div class="callout callout-info form-item-category hidden" id="form-item-category-' . $category['id'] . '"> |
|
| 406 | - <h5>' . $category['title'] . '</h5> |
|
| 405 | + <div class="callout callout-info form-item-category hidden" id="form-item-category-' . $category['id'].'"> |
|
| 406 | + <h5>' . $category['title'].'</h5> |
|
| 407 | 407 | <p>'; |
| 408 | 408 | foreach ($category['fields'] as $field) { |
| 409 | 409 | if ($field['type'] === 'textarea') { |
| 410 | 410 | echo ' |
| 411 | - <div class="form-group mb-3 form-item-field" id="form-item-field-' . $field['id'] . '" data-field-id="' . $field['id'] . '"> |
|
| 411 | + <div class="form-group mb-3 form-item-field" id="form-item-field-' . $field['id'].'" data-field-id="'.$field['id'].'"> |
|
| 412 | 412 | <label>' . $field['title'], |
| 413 | 413 | $field['is_mandatory'] === '1' ? |
| 414 | - '<span class="fas fa-fire text-danger ml-1 infotip" title="' . langHdl('is_mandatory') . '"></span>' : '', |
|
| 414 | + '<span class="fas fa-fire text-danger ml-1 infotip" title="'.langHdl('is_mandatory').'"></span>' : '', |
|
| 415 | 415 | '</label> |
| 416 | - <textarea class="form-control form-item-control form-item-field-custom track-change" rows="2" data-field-name="' . $field['id'] . '" data-field-mandatory="' . $field['is_mandatory'] . '" data-change-ongoing="0"></textarea> |
|
| 416 | + <textarea class="form-control form-item-control form-item-field-custom track-change" rows="2" data-field-name="' . $field['id'].'" data-field-mandatory="'.$field['is_mandatory'].'" data-change-ongoing="0"></textarea> |
|
| 417 | 417 | </div>'; |
| 418 | 418 | } else { |
| 419 | 419 | echo ' |
| 420 | - <div class="input-group mb-3 form-item-field" id="form-item-field-' . $field['id'] . '" data-field-id="' . $field['id'] . '"> |
|
| 420 | + <div class="input-group mb-3 form-item-field" id="form-item-field-' . $field['id'].'" data-field-id="'.$field['id'].'"> |
|
| 421 | 421 | <div class="input-group-prepend"> |
| 422 | 422 | <span class="input-group-text">' . $field['title'], |
| 423 | 423 | $field['is_mandatory'] === '1' ? |
| 424 | - '<span class="fas fa-fire text-danger ml-1 infotip" title="' . langHdl('is_mandatory') . '"></span>' : '', |
|
| 424 | + '<span class="fas fa-fire text-danger ml-1 infotip" title="'.langHdl('is_mandatory').'"></span>' : '', |
|
| 425 | 425 | '</span> |
| 426 | 426 | </div> |
| 427 | - <input type="' . $field['type'] . '" class="form-control form-item-control form-item-field-custom track-change" data-field-name="' . $field['id'] . '" data-field-mandatory="' . $field['is_mandatory'] . '" data-change-ongoing="0"> |
|
| 427 | + <input type="' . $field['type'].'" class="form-control form-item-control form-item-field-custom track-change" data-field-name="'.$field['id'].'" data-field-mandatory="'.$field['is_mandatory'].'" data-change-ongoing="0"> |
|
| 428 | 428 | </div>'; |
| 429 | 429 | } |
| 430 | 430 | } |
@@ -435,8 +435,8 @@ discard block |
||
| 435 | 435 | ) { |
| 436 | 436 | echo ' |
| 437 | 437 | <div class="form-check icheck-blue"> |
| 438 | - <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'] . '"> |
|
| 439 | - <label class="form-check-label ml-3" for="template_' . $category['id'] . '">' . langHdl('main_template') . '</label> |
|
| 438 | + <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'].'"> |
|
| 439 | + <label class="form-check-label ml-3" for="template_' . $category['id'].'">'.langHdl('main_template').'</label> |
|
| 440 | 440 | </div>'; |
| 441 | 441 | } |
| 442 | 442 | echo ' |
@@ -665,18 +665,18 @@ discard block |
||
| 665 | 665 | <?php |
| 666 | 666 | foreach ($_SESSION['item_fields'] as $elem) { |
| 667 | 667 | echo ' |
| 668 | - <div class="callout callout-info card-item-category hidden" id="card-item-category-' . $elem['id'] . '"> |
|
| 669 | - <h5>' . $elem['title'] . '</h5> |
|
| 668 | + <div class="callout callout-info card-item-category hidden" id="card-item-category-' . $elem['id'].'"> |
|
| 669 | + <h5>' . $elem['title'].'</h5> |
|
| 670 | 670 | <p> |
| 671 | 671 | <ul class="list-group list-group-unbordered mb-3">'; |
| 672 | 672 | foreach ($elem['fields'] as $field) { |
| 673 | 673 | echo ' |
| 674 | - <li class="list-group-item card-item-field hidden" id="card-item-field-' . $field['id'] . '"> |
|
| 675 | - <b>' . $field['title'] . '</b> |
|
| 676 | - <button type="button" class="float-right btn btn-outline-info btn-sm ml-1 btn-copy-clipboard-clear" data-clipboard-target="#card-item-field-value-' . $field['id'] . '"> |
|
| 674 | + <li class="list-group-item card-item-field hidden" id="card-item-field-' . $field['id'].'"> |
|
| 675 | + <b>' . $field['title'].'</b> |
|
| 676 | + <button type="button" class="float-right btn btn-outline-info btn-sm ml-1 btn-copy-clipboard-clear" data-clipboard-target="#card-item-field-value-' . $field['id'].'"> |
|
| 677 | 677 | <i class="fas fa-copy"></i> |
| 678 | 678 | </button> |
| 679 | - <span class="card-item-field-value float-right ml-1" id="card-item-field-value-' . $field['id'] . '"></span> |
|
| 679 | + <span class="card-item-field-value float-right ml-1" id="card-item-field-value-' . $field['id'].'"></span> |
|
| 680 | 680 | </li>'; |
| 681 | 681 | } |
| 682 | 682 | echo ' |
@@ -1048,7 +1048,7 @@ discard block |
||
| 1048 | 1048 | <p><?php |
| 1049 | 1049 | echo str_replace( |
| 1050 | 1050 | ['##otv_expiration_period##', '. '], |
| 1051 | - ['<span class="text-bold text-primary">' . $SETTINGS['otv_expiration_period'] . '</span>', '<br>'], |
|
| 1051 | + ['<span class="text-bold text-primary">'.$SETTINGS['otv_expiration_period'].'</span>', '<br>'], |
|
| 1052 | 1052 | langHdl('otv_message') |
| 1053 | 1053 | ); |
| 1054 | 1054 | ?></p> |
@@ -1122,7 +1122,7 @@ discard block |
||
| 1122 | 1122 | <select class="form-control form-folder-control select2" style="width:100%;" id="form-folder-add-complexicity" required> |
| 1123 | 1123 | <?php |
| 1124 | 1124 | foreach (TP_PW_COMPLEXITY as $key => $value) { |
| 1125 | - echo '<option value="' . $key . '">' . $value[1] . '</option>'; |
|
| 1125 | + echo '<option value="'.$key.'">'.$value[1].'</option>'; |
|
| 1126 | 1126 | } |
| 1127 | 1127 | ?> |
| 1128 | 1128 | </select> |
@@ -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> |