@@ -32,15 +32,15 @@ |
||
| 32 | 32 | } |
| 33 | 33 | |
| 34 | 34 | /* do checks */ |
| 35 | -require_once $SETTINGS['cpassman_dir'] . '/sources/checks.php'; |
|
| 35 | +require_once $SETTINGS['cpassman_dir'].'/sources/checks.php'; |
|
| 36 | 36 | if (!checkUser($_SESSION['user_id'], $_SESSION['key'], curPage($SETTINGS), $SETTINGS)) { |
| 37 | 37 | $_SESSION['error']['code'] = ERR_NOT_ALLOWED; //not allowed page |
| 38 | - include $SETTINGS['cpassman_dir'] . '/error.php'; |
|
| 38 | + include $SETTINGS['cpassman_dir'].'/error.php'; |
|
| 39 | 39 | exit(); |
| 40 | 40 | } |
| 41 | 41 | |
| 42 | 42 | // Load |
| 43 | -require_once $SETTINGS['cpassman_dir'] . '/sources/main.functions.php'; |
|
| 43 | +require_once $SETTINGS['cpassman_dir'].'/sources/main.functions.php'; |
|
| 44 | 44 | |
| 45 | 45 | ?> |
| 46 | 46 | |
@@ -501,8 +501,7 @@ discard block |
||
| 501 | 501 | $post_masked = filter_var($dataReceived['masked'], FILTER_SANITIZE_STRING); |
| 502 | 502 | $post_encrypted = filter_var($dataReceived['encrypted'], FILTER_SANITIZE_STRING); |
| 503 | 503 | $post_roles = filter_var_array($dataReceived['roles'], FILTER_SANITIZE_STRING); |
| 504 | - $post_fieldId = isset($dataReceived['fieldId']) === false ? '' : |
|
| 505 | - filter_var($dataReceived['fieldId'], FILTER_SANITIZE_NUMBER_INT); |
|
| 504 | + $post_fieldId = isset($dataReceived['fieldId']) === false ? '' : filter_var($dataReceived['fieldId'], FILTER_SANITIZE_NUMBER_INT); |
|
| 506 | 505 | |
| 507 | 506 | if (empty($post_fieldId) === false) { |
| 508 | 507 | // UPDATE FIELD |
@@ -620,8 +619,7 @@ discard block |
||
| 620 | 619 | $post_masked = filter_var($dataReceived['masked'], FILTER_SANITIZE_STRING); |
| 621 | 620 | $post_encrypted = filter_var($dataReceived['encrypted'], FILTER_SANITIZE_STRING); |
| 622 | 621 | $post_roles = filter_var_array($dataReceived['roles'], FILTER_SANITIZE_STRING); |
| 623 | - $post_fieldId = isset($dataReceived['fieldId']) === false ? '' : |
|
| 624 | - filter_var($dataReceived['fieldId'], FILTER_SANITIZE_NUMBER_INT); |
|
| 622 | + $post_fieldId = isset($dataReceived['fieldId']) === false ? '' : filter_var($dataReceived['fieldId'], FILTER_SANITIZE_NUMBER_INT); |
|
| 625 | 623 | |
| 626 | 624 | // NEW FIELD |
| 627 | 625 | DB::insert( |
@@ -159,7 +159,7 @@ discard block |
||
| 159 | 159 | $config->setIgnoreHeaderLine('true'); |
| 160 | 160 | // extract data from CSV file |
| 161 | 161 | $interpreter = new Interpreter(); |
| 162 | - $interpreter->addObserver(function (array $row) use (&$valuesToImport) { |
|
| 162 | + $interpreter->addObserver(function(array $row) use (&$valuesToImport) { |
|
| 163 | 163 | $valuesToImport[] = array( |
| 164 | 164 | 'Label' => $row[0], |
| 165 | 165 | 'Login' => $row[1], |
@@ -1135,7 +1135,7 @@ discard block |
||
| 1135 | 1135 | break; |
| 1136 | 1136 | } |
| 1137 | 1137 | |
| 1138 | -spl_autoload_register(function ($class) { |
|
| 1138 | +spl_autoload_register(function($class) { |
|
| 1139 | 1139 | $prefix = 'League\\Csv\\'; |
| 1140 | 1140 | $base_dir = __DIR__.'/src/'; |
| 1141 | 1141 | $len = strlen($prefix); |
@@ -35,10 +35,10 @@ |
||
| 35 | 35 | } |
| 36 | 36 | |
| 37 | 37 | /* do checks */ |
| 38 | -require_once $SETTINGS['cpassman_dir'] . '/sources/checks.php'; |
|
| 38 | +require_once $SETTINGS['cpassman_dir'].'/sources/checks.php'; |
|
| 39 | 39 | if (checkUser($_SESSION['user_id'], $_SESSION['key'], 'profile', $SETTINGS) === false) { |
| 40 | 40 | $_SESSION['error']['code'] = ERR_NOT_ALLOWED; //not allowed page |
| 41 | - include $SETTINGS['cpassman_dir'] . '/error.php'; |
|
| 41 | + include $SETTINGS['cpassman_dir'].'/error.php'; |
|
| 42 | 42 | exit(); |
| 43 | 43 | } |
| 44 | 44 | ?> |
@@ -33,10 +33,10 @@ discard block |
||
| 33 | 33 | } |
| 34 | 34 | |
| 35 | 35 | /* do checks */ |
| 36 | -require_once $SETTINGS['cpassman_dir'] . '/sources/checks.php'; |
|
| 36 | +require_once $SETTINGS['cpassman_dir'].'/sources/checks.php'; |
|
| 37 | 37 | if (!checkUser($_SESSION['user_id'], $_SESSION['key'], curPage($SETTINGS), $SETTINGS)) { |
| 38 | 38 | $_SESSION['error']['code'] = ERR_NOT_ALLOWED; //not allowed page |
| 39 | - include $SETTINGS['cpassman_dir'] . '/error.php'; |
|
| 39 | + include $SETTINGS['cpassman_dir'].'/error.php'; |
|
| 40 | 40 | exit(); |
| 41 | 41 | } |
| 42 | 42 | |
@@ -2139,7 +2139,7 @@ discard block |
||
| 2139 | 2139 | container: 'form-item-upload-zone', |
| 2140 | 2140 | max_file_size: '<?php |
| 2141 | 2141 | if (strrpos($SETTINGS['upload_maxfilesize'], 'mb') === false) { |
| 2142 | - echo $SETTINGS['upload_maxfilesize'] . 'mb'; |
|
| 2142 | + echo $SETTINGS['upload_maxfilesize'].'mb'; |
|
| 2143 | 2143 | } else { |
| 2144 | 2144 | echo $SETTINGS['upload_maxfilesize']; |
| 2145 | 2145 | } |
@@ -35,15 +35,15 @@ discard block |
||
| 35 | 35 | } |
| 36 | 36 | |
| 37 | 37 | /* do checks */ |
| 38 | -require_once $SETTINGS['cpassman_dir'] . '/sources/checks.php'; |
|
| 38 | +require_once $SETTINGS['cpassman_dir'].'/sources/checks.php'; |
|
| 39 | 39 | if (checkUser($_SESSION['user_id'], $_SESSION['key'], 'admin', $SETTINGS) === false) { |
| 40 | 40 | $_SESSION['error']['code'] = ERR_NOT_ALLOWED; |
| 41 | - include $SETTINGS['cpassman_dir'] . '/error.php'; |
|
| 41 | + include $SETTINGS['cpassman_dir'].'/error.php'; |
|
| 42 | 42 | exit(); |
| 43 | 43 | } |
| 44 | 44 | |
| 45 | 45 | // Load template |
| 46 | -require_once $SETTINGS['cpassman_dir'] . '/sources/main.functions.php'; |
|
| 46 | +require_once $SETTINGS['cpassman_dir'].'/sources/main.functions.php'; |
|
| 47 | 47 | |
| 48 | 48 | ?> |
| 49 | 49 | |
@@ -252,7 +252,7 @@ discard block |
||
| 252 | 252 | $zones = timezone_identifiers_list(); |
| 253 | 253 | foreach ($zones as $zone) { |
| 254 | 254 | echo ' |
| 255 | - <option value="' . $zone . '"', isset($SETTINGS['timezone']) === true && $SETTINGS['timezone'] === $zone ? ' selected' : '', '>' . $zone . '</option>'; |
|
| 255 | + <option value="' . $zone.'"', isset($SETTINGS['timezone']) === true && $SETTINGS['timezone'] === $zone ? ' selected' : '', '>'.$zone.'</option>'; |
|
| 256 | 256 | } |
| 257 | 257 | ?> |
| 258 | 258 | </select> |
@@ -303,7 +303,7 @@ discard block |
||
| 303 | 303 | <?php |
| 304 | 304 | foreach ($languagesList as $lang) { |
| 305 | 305 | echo ' |
| 306 | - <option value="' . $lang . '"', isset($SETTINGS['default_language']) === true && $SETTINGS['default_language'] === $lang ? ' selected' : '', '>' . $lang . '</option>'; |
|
| 306 | + <option value="' . $lang.'"', isset($SETTINGS['default_language']) === true && $SETTINGS['default_language'] === $lang ? ' selected' : '', '>'.$lang.'</option>'; |
|
| 307 | 307 | } |
| 308 | 308 | ?> |
| 309 | 309 | </select> |
@@ -398,7 +398,7 @@ discard block |
||
| 398 | 398 | <?php |
| 399 | 399 | foreach (TP_PW_COMPLEXITY as $complex) { |
| 400 | 400 | echo ' |
| 401 | - <option value="' . $complex[0] . '"', isset($SETTINGS['personal_saltkey_security_level']) === true && $SETTINGS['personal_saltkey_security_level'] == $complex[0] ? ' selected' : '', '>' . $complex[1] . '</option>'; |
|
| 401 | + <option value="' . $complex[0].'"', isset($SETTINGS['personal_saltkey_security_level']) === true && $SETTINGS['personal_saltkey_security_level'] == $complex[0] ? ' selected' : '', '>'.$complex[1].'</option>'; |
|
| 402 | 402 | } |
| 403 | 403 | ?> |
| 404 | 404 | </select> |
@@ -710,7 +710,7 @@ discard block |
||
| 710 | 710 | ); |
| 711 | 711 | foreach ($roles as $role) { |
| 712 | 712 | echo ' |
| 713 | - <option value="' . $role['id'] . '"', in_array($role['id'], $arrRolesToPrint) === true ? ' selected' : '', '>' . addslashes($role['title']) . '</option>'; |
|
| 713 | + <option value="' . $role['id'].'"', in_array($role['id'], $arrRolesToPrint) === true ? ' selected' : '', '>'.addslashes($role['title']).'</option>'; |
|
| 714 | 714 | } |
| 715 | 715 | ?> |
| 716 | 716 | </select> |
@@ -870,7 +870,7 @@ discard block |
||
| 870 | 870 | <?php |
| 871 | 871 | foreach (TP_PW_COMPLEXITY as $complex) { |
| 872 | 872 | echo ' |
| 873 | - <option value="' . $complex[0] . '"', isset($SETTINGS['offline_key_level']) === true && $SETTINGS['offline_key_level'] == $complex[0] ? ' selected' : '', '>' . $complex[1] . '</option>'; |
|
| 873 | + <option value="' . $complex[0].'"', isset($SETTINGS['offline_key_level']) === true && $SETTINGS['offline_key_level'] == $complex[0] ? ' selected' : '', '>'.$complex[1].'</option>'; |
|
| 874 | 874 | } |
| 875 | 875 | ?> |
| 876 | 876 | </select> |
@@ -35,18 +35,18 @@ discard block |
||
| 35 | 35 | } |
| 36 | 36 | |
| 37 | 37 | /* do checks */ |
| 38 | -require_once $SETTINGS['cpassman_dir'] . '/sources/checks.php'; |
|
| 38 | +require_once $SETTINGS['cpassman_dir'].'/sources/checks.php'; |
|
| 39 | 39 | if (checkUser($_SESSION['user_id'], $_SESSION['key'], 'roles', $SETTINGS) === false) { |
| 40 | 40 | $_SESSION['error']['code'] = ERR_NOT_ALLOWED; |
| 41 | - include $SETTINGS['cpassman_dir'] . '/error.php'; |
|
| 41 | + include $SETTINGS['cpassman_dir'].'/error.php'; |
|
| 42 | 42 | exit(); |
| 43 | 43 | } |
| 44 | 44 | |
| 45 | 45 | // Load template |
| 46 | -require_once $SETTINGS['cpassman_dir'] . '/sources/main.functions.php'; |
|
| 46 | +require_once $SETTINGS['cpassman_dir'].'/sources/main.functions.php'; |
|
| 47 | 47 | |
| 48 | 48 | // Connect to mysql server |
| 49 | -require_once $SETTINGS['cpassman_dir'] . '/includes/libraries/Database/Meekrodb/db.class.php'; |
|
| 49 | +require_once $SETTINGS['cpassman_dir'].'/includes/libraries/Database/Meekrodb/db.class.php'; |
|
| 50 | 50 | if (defined('DB_PASSWD_CLEAR') === false) { |
| 51 | 51 | define('DB_PASSWD_CLEAR', defuseReturnDecrypted(DB_PASSWD, $SETTINGS)); |
| 52 | 52 | } |
@@ -98,18 +98,18 @@ discard block |
||
| 98 | 98 | $arrUserRoles = array_filter($_SESSION['user_roles']); |
| 99 | 99 | $where = ''; |
| 100 | 100 | if (count($arrUserRoles) > 0 && (int) $_SESSION['is_admin'] !== 1) { |
| 101 | - $where = ' WHERE id IN (' . implode(',', $arrUserRoles) . ')'; |
|
| 101 | + $where = ' WHERE id IN ('.implode(',', $arrUserRoles).')'; |
|
| 102 | 102 | } |
| 103 | - $rows = DB::query('SELECT * FROM ' . prefixTable('roles_title') . $where); |
|
| 103 | + $rows = DB::query('SELECT * FROM '.prefixTable('roles_title').$where); |
|
| 104 | 104 | |
| 105 | 105 | foreach ($rows as $reccord) { |
| 106 | 106 | echo ' |
| 107 | - <option value="' . $reccord['id'] . '" ' . |
|
| 108 | - 'data-complexity-text="' . addslashes(TP_PW_COMPLEXITY[$reccord['complexity']][1]) . '" ' . |
|
| 109 | - 'data-complexity-icon="' . TP_PW_COMPLEXITY[$reccord['complexity']][2] . '" ' . |
|
| 110 | - 'data-complexity="' . TP_PW_COMPLEXITY[$reccord['complexity']][0] . '" ' . |
|
| 111 | - 'data-allow-edit-all="' . $reccord['allow_pw_change'] . '">' . |
|
| 112 | - $reccord['title'] . '</option>'; |
|
| 107 | + <option value="' . $reccord['id'].'" '. |
|
| 108 | + 'data-complexity-text="'.addslashes(TP_PW_COMPLEXITY[$reccord['complexity']][1]).'" '. |
|
| 109 | + 'data-complexity-icon="'.TP_PW_COMPLEXITY[$reccord['complexity']][2].'" '. |
|
| 110 | + 'data-complexity="'.TP_PW_COMPLEXITY[$reccord['complexity']][0].'" '. |
|
| 111 | + 'data-allow-edit-all="'.$reccord['allow_pw_change'].'">'. |
|
| 112 | + $reccord['title'].'</option>'; |
|
| 113 | 113 | } |
| 114 | 114 | ?> |
| 115 | 115 | </select> |
@@ -130,7 +130,7 @@ discard block |
||
| 130 | 130 | <?php |
| 131 | 131 | foreach (TP_PW_COMPLEXITY as $entry) { |
| 132 | 132 | echo ' |
| 133 | - <option value="' . $entry[0] . '">' . addslashes($entry[1]) . '</option>'; |
|
| 133 | + <option value="' . $entry[0].'">'.addslashes($entry[1]).'</option>'; |
|
| 134 | 134 | } |
| 135 | 135 | ?> |
| 136 | 136 | </select> |
@@ -86,7 +86,7 @@ discard block |
||
| 86 | 86 | // error |
| 87 | 87 | toastr.remove(); |
| 88 | 88 | toastr.error( |
| 89 | - '<?php echo langHdl('server_answer_error') . '<br />' . langHdl('server_returned_data') . ':<br />'; ?>' + data.error, |
|
| 89 | + '<?php echo langHdl('server_answer_error').'<br />'.langHdl('server_returned_data').':<br />'; ?>' + data.error, |
|
| 90 | 90 | '', { |
| 91 | 91 | closeButton: true, |
| 92 | 92 | positionClass: 'toastr-top-right' |
@@ -151,7 +151,7 @@ discard block |
||
| 151 | 151 | // error |
| 152 | 152 | toastr.remove(); |
| 153 | 153 | toastr.error( |
| 154 | - '<?php echo langHdl('server_answer_error') . '<br />' . langHdl('server_returned_data') . ':<br />'; ?>' + data.error, |
|
| 154 | + '<?php echo langHdl('server_answer_error').'<br />'.langHdl('server_returned_data').':<br />'; ?>' + data.error, |
|
| 155 | 155 | '', { |
| 156 | 156 | closeButton: true, |
| 157 | 157 | positionClass: 'toastr-top-right' |
@@ -35,10 +35,10 @@ |
||
| 35 | 35 | } |
| 36 | 36 | |
| 37 | 37 | /* do checks */ |
| 38 | -require_once $SETTINGS['cpassman_dir'] . '/sources/checks.php'; |
|
| 38 | +require_once $SETTINGS['cpassman_dir'].'/sources/checks.php'; |
|
| 39 | 39 | if (checkUser($_SESSION['user_id'], $_SESSION['key'], 'profile', $SETTINGS) === false) { |
| 40 | 40 | $_SESSION['error']['code'] = ERR_NOT_ALLOWED; //not allowed page |
| 41 | - include $SETTINGS['cpassman_dir'] . '/error.php'; |
|
| 41 | + include $SETTINGS['cpassman_dir'].'/error.php'; |
|
| 42 | 42 | exit(); |
| 43 | 43 | } |
| 44 | 44 | ?> |