@@ -68,7 +68,7 @@ discard block |
||
| 68 | 68 | if ($checkUserAccess->checkSession() === false || $checkUserAccess->userAccessPage('export') === false) { |
| 69 | 69 | // Not allowed page |
| 70 | 70 | $session->set('system-error_code', ERR_NOT_ALLOWED); |
| 71 | - include $SETTINGS['cpassman_dir'] . '/error.php'; |
|
| 71 | + include $SETTINGS['cpassman_dir'].'/error.php'; |
|
| 72 | 72 | exit; |
| 73 | 73 | } |
| 74 | 74 | ?> |
@@ -191,7 +191,7 @@ discard block |
||
| 191 | 191 | progress: "#export-password-strength", |
| 192 | 192 | score: "#export-password-strength" |
| 193 | 193 | }, |
| 194 | - scores: [<?php echo TP_PW_STRENGTH_1;?>, <?php echo TP_PW_STRENGTH_2;?>, <?php echo TP_PW_STRENGTH_3;?>, <?php echo TP_PW_STRENGTH_4;?>, <?php echo TP_PW_STRENGTH_5;?>], |
|
| 194 | + scores: [<?php echo TP_PW_STRENGTH_1; ?>, <?php echo TP_PW_STRENGTH_2; ?>, <?php echo TP_PW_STRENGTH_3; ?>, <?php echo TP_PW_STRENGTH_4; ?>, <?php echo TP_PW_STRENGTH_5; ?>], |
|
| 195 | 195 | }, |
| 196 | 196 | i18n : { |
| 197 | 197 | t: function (key) { |
@@ -66,7 +66,7 @@ discard block |
||
| 66 | 66 | if ($checkUserAccess->checkSession() === false || $checkUserAccess->userAccessPage('roles') === false) { |
| 67 | 67 | // Not allowed page |
| 68 | 68 | $session->set('system-error_code', ERR_NOT_ALLOWED); |
| 69 | - include $SETTINGS['cpassman_dir'] . '/error.php'; |
|
| 69 | + include $SETTINGS['cpassman_dir'].'/error.php'; |
|
| 70 | 70 | exit; |
| 71 | 71 | } |
| 72 | 72 | |
@@ -127,17 +127,17 @@ discard block |
||
| 127 | 127 | $arrUserRoles = array_filter($session->get('user-roles_array')); |
| 128 | 128 | $where = ''; |
| 129 | 129 | if (count($arrUserRoles) > 0 && (int) $session->get('user-admin') !== 1) { |
| 130 | - $where = ' WHERE id IN (' . implode(',', $arrUserRoles) . ')'; |
|
| 130 | + $where = ' WHERE id IN ('.implode(',', $arrUserRoles).')'; |
|
| 131 | 131 | } |
| 132 | - $rows = DB::query('SELECT * FROM ' . prefixTable('roles_title') . $where); |
|
| 132 | + $rows = DB::query('SELECT * FROM '.prefixTable('roles_title').$where); |
|
| 133 | 133 | foreach ($rows as $reccord) { |
| 134 | 134 | echo ' |
| 135 | - <option value="' . $reccord['id'] . '" |
|
| 136 | - data-complexity-text="' . addslashes(TP_PW_COMPLEXITY[$reccord['complexity']][1]) . '" |
|
| 137 | - data-complexity-icon="' . TP_PW_COMPLEXITY[$reccord['complexity']][2] . '" |
|
| 138 | - data-complexity="' . TP_PW_COMPLEXITY[$reccord['complexity']][0] . '" |
|
| 139 | - data-allow-edit-all="' . $reccord['allow_pw_change'] . '">'. |
|
| 140 | - $reccord['title'] . '</option>'; |
|
| 135 | + <option value="' . $reccord['id'].'" |
|
| 136 | + data-complexity-text="' . addslashes(TP_PW_COMPLEXITY[$reccord['complexity']][1]).'" |
|
| 137 | + data-complexity-icon="' . TP_PW_COMPLEXITY[$reccord['complexity']][2].'" |
|
| 138 | + data-complexity="' . TP_PW_COMPLEXITY[$reccord['complexity']][0].'" |
|
| 139 | + data-allow-edit-all="' . $reccord['allow_pw_change'].'">'. |
|
| 140 | + $reccord['title'].'</option>'; |
|
| 141 | 141 | } |
| 142 | 142 | ?> |
| 143 | 143 | </select> |
@@ -158,7 +158,7 @@ discard block |
||
| 158 | 158 | <?php |
| 159 | 159 | foreach (TP_PW_COMPLEXITY as $entry) { |
| 160 | 160 | echo ' |
| 161 | - <option value="' . $entry[0] . '">' . addslashes($entry[1]) . '</option>'; |
|
| 161 | + <option value="' . $entry[0].'">'.addslashes($entry[1]).'</option>'; |
|
| 162 | 162 | } |
| 163 | 163 | ?> |
| 164 | 164 | </select> |
@@ -68,7 +68,7 @@ |
||
| 68 | 68 | if ($checkUserAccess->checkSession() === false || $checkUserAccess->userAccessPage('options') === false) { |
| 69 | 69 | // Not allowed page |
| 70 | 70 | $session->set('system-error_code', ERR_NOT_ALLOWED); |
| 71 | - include $SETTINGS['cpassman_dir'] . '/error.php'; |
|
| 71 | + include $SETTINGS['cpassman_dir'].'/error.php'; |
|
| 72 | 72 | exit; |
| 73 | 73 | } |
| 74 | 74 | ?> |
@@ -64,7 +64,7 @@ |
||
| 64 | 64 | if ($checkUserAccess->checkSession() === false || $checkUserAccess->userAccessPage('utilities.renewal') === false) { |
| 65 | 65 | // Not allowed page |
| 66 | 66 | $session->set('system-error_code', ERR_NOT_ALLOWED); |
| 67 | - include $SETTINGS['cpassman_dir'] . '/error.php'; |
|
| 67 | + include $SETTINGS['cpassman_dir'].'/error.php'; |
|
| 68 | 68 | exit; |
| 69 | 69 | } |
| 70 | 70 | |
@@ -71,7 +71,7 @@ |
||
| 71 | 71 | if ($checkUserAccess->checkSession() === false || $checkUserAccess->userAccessPage('search') === false) { |
| 72 | 72 | // Not allowed page |
| 73 | 73 | $session->set('system-error_code', ERR_NOT_ALLOWED); |
| 74 | - include $SETTINGS['cpassman_dir'] . '/error.php'; |
|
| 74 | + include $SETTINGS['cpassman_dir'].'/error.php'; |
|
| 75 | 75 | exit; |
| 76 | 76 | } |
| 77 | 77 | $var = []; |
@@ -2,28 +2,28 @@ |
||
| 2 | 2 | |
| 3 | 3 | declare(strict_types=1); |
| 4 | 4 | |
| 5 | - /** |
|
| 6 | - * Teampass - a collaborative passwords manager. |
|
| 7 | - * --- |
|
| 8 | - * This library is distributed in the hope that it will be useful, |
|
| 9 | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
| 10 | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
|
| 11 | - * --- |
|
| 12 | - * |
|
| 13 | - * @project Teampass |
|
| 14 | - * |
|
| 15 | - * @file search.js.php |
|
| 16 | - * --- |
|
| 17 | - * |
|
| 18 | - * @author Nils Laumaillé ([email protected]) |
|
| 19 | - * |
|
| 20 | - * @copyright 2009-2023 Teampass.net |
|
| 21 | - * |
|
| 22 | - * @license https://spdx.org/licenses/GPL-3.0-only.html#licenseText GPL-3.0 |
|
| 23 | - * --- |
|
| 24 | - * |
|
| 25 | - * @see https://www.teampass.net |
|
| 26 | - */ |
|
| 5 | + /** |
|
| 6 | + * Teampass - a collaborative passwords manager. |
|
| 7 | + * --- |
|
| 8 | + * This library is distributed in the hope that it will be useful, |
|
| 9 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
| 10 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
|
| 11 | + * --- |
|
| 12 | + * |
|
| 13 | + * @project Teampass |
|
| 14 | + * |
|
| 15 | + * @file search.js.php |
|
| 16 | + * --- |
|
| 17 | + * |
|
| 18 | + * @author Nils Laumaillé ([email protected]) |
|
| 19 | + * |
|
| 20 | + * @copyright 2009-2023 Teampass.net |
|
| 21 | + * |
|
| 22 | + * @license https://spdx.org/licenses/GPL-3.0-only.html#licenseText GPL-3.0 |
|
| 23 | + * --- |
|
| 24 | + * |
|
| 25 | + * @see https://www.teampass.net |
|
| 26 | + */ |
|
| 27 | 27 | |
| 28 | 28 | use TeampassClasses\PerformChecks\PerformChecks; |
| 29 | 29 | use TeampassClasses\SessionManager\SessionManager; |
@@ -65,7 +65,7 @@ discard block |
||
| 65 | 65 | if ($checkUserAccess->checkSession() === false || $checkUserAccess->userAccessPage('api') === false) { |
| 66 | 66 | // Not allowed page |
| 67 | 67 | $session->set('system-error_code', ERR_NOT_ALLOWED); |
| 68 | - include $SETTINGS['cpassman_dir'] . '/error.php'; |
|
| 68 | + include $SETTINGS['cpassman_dir'].'/error.php'; |
|
| 69 | 69 | exit; |
| 70 | 70 | } |
| 71 | 71 | |
@@ -149,7 +149,7 @@ discard block |
||
| 149 | 149 | <?php |
| 150 | 150 | $rowsKeys = DB::query( |
| 151 | 151 | 'SELECT increment_id, label, timestamp, user_id, value |
| 152 | - FROM ' . prefixTable('api') . ' |
|
| 152 | + FROM ' . prefixTable('api').' |
|
| 153 | 153 | WHERE type = %s |
| 154 | 154 | ORDER BY timestamp ASC', |
| 155 | 155 | 'key' |
@@ -167,10 +167,10 @@ discard block |
||
| 167 | 167 | <?php |
| 168 | 168 | foreach ($rowsKeys as $key) { |
| 169 | 169 | echo ' |
| 170 | - <tr data-id="' . $key['increment_id'] . '"> |
|
| 171 | - <td width="50px"><i class="fas fa-trash infotip pointer delete-api-key" title="' . $lang->get('del_button') . '"></i></td> |
|
| 172 | - <td><span class="edit-api-key pointer">' . $key['label'] . '</span></td> |
|
| 173 | - <td>' . $key['value']. '</td> |
|
| 170 | + <tr data-id="' . $key['increment_id'].'"> |
|
| 171 | + <td width="50px"><i class="fas fa-trash infotip pointer delete-api-key" title="' . $lang->get('del_button').'"></i></td> |
|
| 172 | + <td><span class="edit-api-key pointer">' . $key['label'].'</span></td> |
|
| 173 | + <td>' . $key['value'].'</td> |
|
| 174 | 174 | </tr>'; |
| 175 | 175 | } ?> |
| 176 | 176 | </tbody> |
@@ -205,7 +205,7 @@ discard block |
||
| 205 | 205 | <div class="col-12 mt-4" id="table-api-ip"> |
| 206 | 206 | <?php |
| 207 | 207 | $rowsIps = DB::query( |
| 208 | - 'SELECT increment_id, label, timestamp value FROM ' . prefixTable('api') . ' |
|
| 208 | + 'SELECT increment_id, label, timestamp value FROM '.prefixTable('api').' |
|
| 209 | 209 | WHERE type = %s |
| 210 | 210 | ORDER BY timestamp ASC', |
| 211 | 211 | 'ip' |
@@ -223,10 +223,10 @@ discard block |
||
| 223 | 223 | <?php |
| 224 | 224 | foreach ($rowsIps as $ip) { |
| 225 | 225 | echo ' |
| 226 | - <tr data-id="' . $ip['increment_id'] . '"> |
|
| 227 | - <td width="50px"><i class="fas fa-trash infotip pointer delete-api-ip" title="' . $lang->get('del_button') . '"></i></td> |
|
| 228 | - <td><span class="edit-api-ip pointer" data-field="label">' . $ip['label'] . '</span></td> |
|
| 229 | - <td><span class="edit-api-ip pointer" data-field="value">' . $ip['value'] . '</span></td> |
|
| 226 | + <tr data-id="' . $ip['increment_id'].'"> |
|
| 227 | + <td width="50px"><i class="fas fa-trash infotip pointer delete-api-ip" title="' . $lang->get('del_button').'"></i></td> |
|
| 228 | + <td><span class="edit-api-ip pointer" data-field="label">' . $ip['label'].'</span></td> |
|
| 229 | + <td><span class="edit-api-ip pointer" data-field="value">' . $ip['value'].'</span></td> |
|
| 230 | 230 | </tr>'; |
| 231 | 231 | } ?> |
| 232 | 232 | </tbody> |
@@ -67,7 +67,7 @@ |
||
| 67 | 67 | if ($checkUserAccess->checkSession() === false || $checkUserAccess->userAccessPage('roles') === false) { |
| 68 | 68 | // Not allowed page |
| 69 | 69 | $session->set('system-error_code', ERR_NOT_ALLOWED); |
| 70 | - include $SETTINGS['cpassman_dir'] . '/error.php'; |
|
| 70 | + include $SETTINGS['cpassman_dir'].'/error.php'; |
|
| 71 | 71 | exit; |
| 72 | 72 | } |
| 73 | 73 | ?> |
@@ -65,7 +65,7 @@ discard block |
||
| 65 | 65 | if ($checkUserAccess->checkSession() === false || $checkUserAccess->userAccessPage('options') === false) { |
| 66 | 66 | // Not allowed page |
| 67 | 67 | $session->set('system-error_code', ERR_NOT_ALLOWED); |
| 68 | - include $SETTINGS['cpassman_dir'] . '/error.php'; |
|
| 68 | + include $SETTINGS['cpassman_dir'].'/error.php'; |
|
| 69 | 69 | exit; |
| 70 | 70 | } |
| 71 | 71 | |
@@ -297,7 +297,7 @@ discard block |
||
| 297 | 297 | // get list of all timezones |
| 298 | 298 | foreach ($zones as $key => $zone) { |
| 299 | 299 | echo ' |
| 300 | - <option value="' . $key . '"', isset($SETTINGS['timezone']) === true && $SETTINGS['timezone'] === $key ? ' selected' : '', '>' . $zone . '</option>'; |
|
| 300 | + <option value="' . $key.'"', isset($SETTINGS['timezone']) === true && $SETTINGS['timezone'] === $key ? ' selected' : '', '>'.$zone.'</option>'; |
|
| 301 | 301 | } |
| 302 | 302 | ?> |
| 303 | 303 | </select> |
@@ -348,7 +348,7 @@ discard block |
||
| 348 | 348 | <?php |
| 349 | 349 | foreach ($languagesList as $teampassLang) { |
| 350 | 350 | echo ' |
| 351 | - <option value="' . $teampassLang . '"', isset($SETTINGS['default_language']) === true && $SETTINGS['default_language'] === $teampassLang ? ' selected' : '', '>' . $teampassLang . '</option>'; |
|
| 351 | + <option value="' . $teampassLang.'"', isset($SETTINGS['default_language']) === true && $SETTINGS['default_language'] === $teampassLang ? ' selected' : '', '>'.$teampassLang.'</option>'; |
|
| 352 | 352 | } |
| 353 | 353 | ?> |
| 354 | 354 | </select> |
@@ -445,7 +445,7 @@ discard block |
||
| 445 | 445 | <?php |
| 446 | 446 | foreach (TP_PW_COMPLEXITY as $complex) { |
| 447 | 447 | echo ' |
| 448 | - <option value="' . $complex[0] . '"', isset($SETTINGS['personal_saltkey_security_level']) === true && $SETTINGS['personal_saltkey_security_level'] === $complex[0] ? ' selected' : '', '>' . $complex[1] . '</option>'; |
|
| 448 | + <option value="' . $complex[0].'"', isset($SETTINGS['personal_saltkey_security_level']) === true && $SETTINGS['personal_saltkey_security_level'] === $complex[0] ? ' selected' : '', '>'.$complex[1].'</option>'; |
|
| 449 | 449 | } |
| 450 | 450 | ?> |
| 451 | 451 | </select> |
@@ -781,7 +781,7 @@ discard block |
||
| 781 | 781 | ); |
| 782 | 782 | foreach ($roles as $role) { |
| 783 | 783 | echo ' |
| 784 | - <option value="' . $role['id'] . '"', in_array($role['id'], $arrRolesToPrint) === true ? ' selected' : '', '>' . addslashes($role['title']) . '</option>'; |
|
| 784 | + <option value="' . $role['id'].'"', in_array($role['id'], $arrRolesToPrint) === true ? ' selected' : '', '>'.addslashes($role['title']).'</option>'; |
|
| 785 | 785 | } |
| 786 | 786 | } |
| 787 | 787 | ?> |
@@ -958,7 +958,7 @@ discard block |
||
| 958 | 958 | <?php |
| 959 | 959 | foreach (TP_PW_COMPLEXITY as $complex) { |
| 960 | 960 | echo ' |
| 961 | - <option value="' . $complex[0] . '"', isset($SETTINGS['offline_key_level']) === true && $SETTINGS['offline_key_level'] === $complex[0] ? ' selected' : '', '>' . $complex[1] . '</option>'; |
|
| 961 | + <option value="' . $complex[0].'"', isset($SETTINGS['offline_key_level']) === true && $SETTINGS['offline_key_level'] === $complex[0] ? ' selected' : '', '>'.$complex[1].'</option>'; |
|
| 962 | 962 | } |
| 963 | 963 | ?> |
| 964 | 964 | </select> |
@@ -67,7 +67,7 @@ discard block |
||
| 67 | 67 | if ($checkUserAccess->checkSession() === false || $checkUserAccess->userAccessPage('folders') === false) { |
| 68 | 68 | // Not allowed page |
| 69 | 69 | $session->set('system-error_code', ERR_NOT_ALLOWED); |
| 70 | - include $SETTINGS['cpassman_dir'] . '/error.php'; |
|
| 70 | + include $SETTINGS['cpassman_dir'].'/error.php'; |
|
| 71 | 71 | exit; |
| 72 | 72 | } |
| 73 | 73 | ?> |
@@ -697,14 +697,14 @@ discard block |
||
| 697 | 697 | '<label><?php echo $lang->get('icon'); ?></label>' + |
| 698 | 698 | '<input type="text" class="form-control form-folder-control purify" id="folder-edit-icon" data-field="icon" value="'+folderIcon+'">' + |
| 699 | 699 | '<small class="form-text text-muted">' + |
| 700 | - '<?php echo $lang->get('fontawesome_icon_tip'); ?><a href="<?php echo FONTAWESOME_URL;?>" target="_blank"><i class="fas fa-external-link-alt ml-1"></i></a>' + |
|
| 700 | + '<?php echo $lang->get('fontawesome_icon_tip'); ?><a href="<?php echo FONTAWESOME_URL; ?>" target="_blank"><i class="fas fa-external-link-alt ml-1"></i></a>' + |
|
| 701 | 701 | '</small>' + |
| 702 | 702 | '</div>' + |
| 703 | 703 | '<div class="form-group ml-2">' + |
| 704 | 704 | '<label><?php echo $lang->get('icon_on_selection'); ?></label>' + |
| 705 | 705 | '<input type="text" class="form-control form-folder-control purify" id="folder-edit-icon-selected" data-field="iconSelected" value="'+folderIconSelection+'">' + |
| 706 | 706 | '<small class="form-text text-muted">' + |
| 707 | - '<?php echo $lang->get('fontawesome_icon_tip'); ?><a href="<?php echo FONTAWESOME_URL;?>" target="_blank"><i class="fas fa-external-link-alt ml-1"></i></a>' + |
|
| 707 | + '<?php echo $lang->get('fontawesome_icon_tip'); ?><a href="<?php echo FONTAWESOME_URL; ?>" target="_blank"><i class="fas fa-external-link-alt ml-1"></i></a>' + |
|
| 708 | 708 | '</small>' + |
| 709 | 709 | '</div>' + |
| 710 | 710 | '<div class="form-group ml-2" id="folder-rights-tuned">' + |