@@ -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 |
@@ -66,7 +66,7 @@ discard block |
||
| 66 | 66 | |
| 67 | 67 | // Get list of users |
| 68 | 68 | $usersList = []; |
| 69 | -$rows = DB::query('SELECT id,login,email FROM ' . prefixTable('users') . ' ORDER BY login ASC'); |
|
| 69 | +$rows = DB::query('SELECT id,login,email FROM '.prefixTable('users').' ORDER BY login ASC'); |
|
| 70 | 70 | foreach ($rows as $record) { |
| 71 | 71 | $usersList[$record['login']] = [ |
| 72 | 72 | 'id' => $record['id'], |
@@ -77,16 +77,16 @@ discard block |
||
| 77 | 77 | // Get list of roles |
| 78 | 78 | $arrRoles = []; |
| 79 | 79 | $listRoles = ''; |
| 80 | -$rows = DB::query('SELECT id,title FROM ' . prefixTable('roles_title') . ' ORDER BY title ASC'); |
|
| 80 | +$rows = DB::query('SELECT id,title FROM '.prefixTable('roles_title').' ORDER BY title ASC'); |
|
| 81 | 81 | foreach ($rows as $reccord) { |
| 82 | 82 | $arrRoles[$reccord['title']] = [ |
| 83 | 83 | 'id' => $reccord['id'], |
| 84 | 84 | 'title' => $reccord['title'], |
| 85 | 85 | ]; |
| 86 | 86 | if (empty($listRoles)) { |
| 87 | - $listRoles = $reccord['id'] . '#' . $reccord['title']; |
|
| 87 | + $listRoles = $reccord['id'].'#'.$reccord['title']; |
|
| 88 | 88 | } else { |
| 89 | - $listRoles .= ';' . $reccord['id'] . '#' . $reccord['title']; |
|
| 89 | + $listRoles .= ';'.$reccord['id'].'#'.$reccord['title']; |
|
| 90 | 90 | } |
| 91 | 91 | } |
| 92 | 92 | |
@@ -161,9 +161,9 @@ discard block |
||
| 161 | 161 | <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> |
| 162 | 162 | <?php |
| 163 | 163 | echo isset($SETTINGS['item_extra_fields']) === true && (int) $SETTINGS['item_extra_fields'] === 1 ? ' |
| 164 | - <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>' : ''; |
|
| 164 | + <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>' : ''; |
|
| 165 | 165 | echo isset($SETTINGS['insert_manual_entry_item_history']) === true && (int) $SETTINGS['insert_manual_entry_item_history'] === 1 ? ' |
| 166 | - <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>' : ''; |
|
| 166 | + <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>' : ''; |
|
| 167 | 167 | ?> |
| 168 | 168 | </ul> |
| 169 | 169 | </div><!-- /.card-header --> |
@@ -232,7 +232,7 @@ discard block |
||
| 232 | 232 | <?php |
| 233 | 233 | for ($i = 4; $i <= $SETTINGS['pwd_maximum_length']; ++$i) { |
| 234 | 234 | echo ' |
| 235 | - <option>' . $i . '</option>'; |
|
| 235 | + <option>' . $i.'</option>'; |
|
| 236 | 236 | } |
| 237 | 237 | ?> |
| 238 | 238 | </select> |
@@ -262,7 +262,7 @@ discard block |
||
| 262 | 262 | <span class="ml-2 col-md-1 clear-me-html" id="form-item-icon-show"></span> |
| 263 | 263 | </div> |
| 264 | 264 | <small class='form-text text-muted'> |
| 265 | - <?php echo langHdl('fontawesome_icon_tip'); ?><a href="<?php echo FONTAWESOME_URL;?>" target="_blank"><i class="fas fa-external-link-alt ml-1"></i></a> |
|
| 265 | + <?php echo langHdl('fontawesome_icon_tip'); ?><a href="<?php echo FONTAWESOME_URL; ?>" target="_blank"><i class="fas fa-external-link-alt ml-1"></i></a> |
|
| 266 | 266 | </small> |
| 267 | 267 | </div> |
| 268 | 268 | |
@@ -412,34 +412,34 @@ discard block |
||
| 412 | 412 | if (isset($_SESSION['item_fields']) === true) { |
| 413 | 413 | foreach ($_SESSION['item_fields'] as $category) { |
| 414 | 414 | echo ' |
| 415 | - <div class="callout callout-info form-item-category hidden" id="form-item-category-' . $category['id'] . '"> |
|
| 416 | - <h5>' . $category['title'] . '</h5> |
|
| 415 | + <div class="callout callout-info form-item-category hidden" id="form-item-category-' . $category['id'].'"> |
|
| 416 | + <h5>' . $category['title'].'</h5> |
|
| 417 | 417 | <p>'; |
| 418 | 418 | foreach ($category['fields'] as $field) { |
| 419 | 419 | if ($field['type'] === 'textarea') { |
| 420 | 420 | echo ' |
| 421 | - <div class="form-group mb-3 form-item-field" id="form-item-field-' . $field['id'] . '" data-field-id="' . $field['id'] . '"> |
|
| 421 | + <div class="form-group mb-3 form-item-field" id="form-item-field-' . $field['id'].'" data-field-id="'.$field['id'].'"> |
|
| 422 | 422 | <label>' . $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 | '</label> |
| 426 | - <textarea class="form-control form-item-control form-item-field-custom" rows="2" data-field-name="' . $field['id'] . '" data-field-mandatory="' . $field['is_mandatory'] . '" data-field-regex="' . $field['regex'] . '" data-change-ongoing="0"></textarea> |
|
| 426 | + <textarea class="form-control form-item-control form-item-field-custom" rows="2" data-field-name="' . $field['id'].'" data-field-mandatory="'.$field['is_mandatory'].'" data-field-regex="'.$field['regex'].'" data-change-ongoing="0"></textarea> |
|
| 427 | 427 | </div>'; |
| 428 | 428 | } else { |
| 429 | 429 | echo ' |
| 430 | - <div class="input-group mb-3 form-item-field" id="form-item-field-' . $field['id'] . '" data-field-id="' . $field['id'] . '"> |
|
| 430 | + <div class="input-group mb-3 form-item-field" id="form-item-field-' . $field['id'].'" data-field-id="'.$field['id'].'"> |
|
| 431 | 431 | <div class="input-group-prepend"> |
| 432 | 432 | <span class="input-group-text">' . $field['title'], |
| 433 | 433 | $field['is_mandatory'] === '1' ? |
| 434 | - '<span class="fas fa-fire text-danger ml-1 infotip" title="' . langHdl('is_mandatory') . '"></span>' : '', |
|
| 434 | + '<span class="fas fa-fire text-danger ml-1 infotip" title="'.langHdl('is_mandatory').'"></span>' : '', |
|
| 435 | 435 | '</span> |
| 436 | 436 | </div> |
| 437 | - <input type="' . $field['type'] . '" class="form-control form-item-control form-item-field-custom" data-field-name="' . $field['id'] . '" data-field-mandatory="' . $field['is_mandatory'] . '" data-field-regex="' . $field['regex'] . '" data-change-ongoing="0"> |
|
| 437 | + <input type="' . $field['type'].'" class="form-control form-item-control form-item-field-custom" data-field-name="'.$field['id'].'" data-field-mandatory="'.$field['is_mandatory'].'" data-field-regex="'.$field['regex'].'" data-change-ongoing="0"> |
|
| 438 | 438 | </div>'; |
| 439 | 439 | } |
| 440 | 440 | if (!empty($field['regex'])) { |
| 441 | 441 | echo ' |
| 442 | - <div>Regex: '. $field['regex'] .'</div> |
|
| 442 | + <div>Regex: '. $field['regex'].'</div> |
|
| 443 | 443 | '; |
| 444 | 444 | } |
| 445 | 445 | } |
@@ -450,8 +450,8 @@ discard block |
||
| 450 | 450 | ) { |
| 451 | 451 | echo ' |
| 452 | 452 | <div class="form-check icheck-blue"> |
| 453 | - <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'] . '"> |
|
| 454 | - <label class="form-check-label ml-3" for="template_' . $category['id'] . '">' . langHdl('main_template') . '</label> |
|
| 453 | + <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'].'"> |
|
| 454 | + <label class="form-check-label ml-3" for="template_' . $category['id'].'">'.langHdl('main_template').'</label> |
|
| 455 | 455 | </div>'; |
| 456 | 456 | } |
| 457 | 457 | echo ' |
@@ -684,18 +684,18 @@ discard block |
||
| 684 | 684 | <?php |
| 685 | 685 | foreach ($_SESSION['item_fields'] as $elem) { |
| 686 | 686 | echo ' |
| 687 | - <div class="callout callout-info card-item-category hidden" id="card-item-category-' . $elem['id'] . '"> |
|
| 688 | - <h5>' . $elem['title'] . '</h5> |
|
| 687 | + <div class="callout callout-info card-item-category hidden" id="card-item-category-' . $elem['id'].'"> |
|
| 688 | + <h5>' . $elem['title'].'</h5> |
|
| 689 | 689 | <p> |
| 690 | 690 | <ul class="list-group list-group-unbordered mb-3">'; |
| 691 | 691 | foreach ($elem['fields'] as $field) { |
| 692 | 692 | echo ' |
| 693 | - <li class="list-group-item card-item-field hidden" id="card-item-field-' . $field['id'] . '"> |
|
| 694 | - <b>' . $field['title'] . '</b> |
|
| 695 | - <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'] . '"> |
|
| 693 | + <li class="list-group-item card-item-field hidden" id="card-item-field-' . $field['id'].'"> |
|
| 694 | + <b>' . $field['title'].'</b> |
|
| 695 | + <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'].'"> |
|
| 696 | 696 | <i class="fas fa-copy"></i> |
| 697 | 697 | </button> |
| 698 | - <span class="card-item-field-value float-right ml-1" id="card-item-field-value-' . $field['id'] . '"></span> |
|
| 698 | + <span class="card-item-field-value float-right ml-1" id="card-item-field-value-' . $field['id'].'"></span> |
|
| 699 | 699 | </li>'; |
| 700 | 700 | } |
| 701 | 701 | echo ' |
@@ -1080,7 +1080,7 @@ discard block |
||
| 1080 | 1080 | <p><?php |
| 1081 | 1081 | echo str_replace( |
| 1082 | 1082 | ['##otv_expiration_period##', '. '], |
| 1083 | - ['<span class="text-bold text-primary">' . $SETTINGS['otv_expiration_period'] . '</span>', '<br>'], |
|
| 1083 | + ['<span class="text-bold text-primary">'.$SETTINGS['otv_expiration_period'].'</span>', '<br>'], |
|
| 1084 | 1084 | langHdl('otv_message') |
| 1085 | 1085 | ); |
| 1086 | 1086 | ?></p> |
@@ -1154,7 +1154,7 @@ discard block |
||
| 1154 | 1154 | <select class="form-control form-folder-control select2" style="width:100%;" id="form-folder-add-complexicity" required> |
| 1155 | 1155 | <?php |
| 1156 | 1156 | foreach (TP_PW_COMPLEXITY as $key => $value) { |
| 1157 | - echo '<option value="' . $key . '">' . $value[1] . '</option>'; |
|
| 1157 | + echo '<option value="'.$key.'">'.$value[1].'</option>'; |
|
| 1158 | 1158 | } |
| 1159 | 1159 | ?> |
| 1160 | 1160 | </select> |
@@ -1172,14 +1172,14 @@ discard block |
||
| 1172 | 1172 | <label><?php echo langHdl('icon'); ?></label> |
| 1173 | 1173 | <input type="text" class="form-control form-folder-control" id="form-folder-add-icon"> |
| 1174 | 1174 | <small class='form-text text-muted'> |
| 1175 | - <?php echo langHdl('fontawesome_icon_tip'); ?><a href="<?php echo FONTAWESOME_URL;?>" target="_blank"><i class="fas fa-external-link-alt ml-1"></i></a> |
|
| 1175 | + <?php echo langHdl('fontawesome_icon_tip'); ?><a href="<?php echo FONTAWESOME_URL; ?>" target="_blank"><i class="fas fa-external-link-alt ml-1"></i></a> |
|
| 1176 | 1176 | </small> |
| 1177 | 1177 | </div> |
| 1178 | 1178 | <div class="form-group"> |
| 1179 | 1179 | <label><?php echo langHdl('icon_on_selection'); ?></label> |
| 1180 | 1180 | <input type="text" class="form-control form-folder-control" id="form-folder-add-icon-selected"> |
| 1181 | 1181 | <small class='form-text text-muted'> |
| 1182 | - <?php echo langHdl('fontawesome_icon_tip'); ?><a href="<?php echo FONTAWESOME_URL;?>" target="_blank"><i class="fas fa-external-link-alt ml-1"></i></a> |
|
| 1182 | + <?php echo langHdl('fontawesome_icon_tip'); ?><a href="<?php echo FONTAWESOME_URL; ?>" target="_blank"><i class="fas fa-external-link-alt ml-1"></i></a> |
|
| 1183 | 1183 | </small> |
| 1184 | 1184 | </div> |
| 1185 | 1185 | </div> |