@@ -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'], '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,11 +43,11 @@ 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 | 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 | ?> |
@@ -138,7 +138,7 @@ discard block |
||
| 138 | 138 | if (data[i].selected_role === 1) { |
| 139 | 139 | selected_role = data[i].id; |
| 140 | 140 | } |
| 141 | - html_admin_by += '<option value="' + data[i].id + '"><?php echo langHdl('managers_of') . ' '; ?>' + data[i].title + '</option>'; |
|
| 141 | + html_admin_by += '<option value="' + data[i].id + '"><?php echo langHdl('managers_of').' '; ?>' + data[i].title + '</option>'; |
|
| 142 | 142 | html_roles += '<option value="' + data[i].id + '">' + data[i].title + '</option>'; |
| 143 | 143 | } |
| 144 | 144 | $("#ldap_new_user_is_administrated_by").append(html_admin_by); |
@@ -2,30 +2,30 @@ |
||
| 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-2021 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 | - |
|
| 28 | - $var = []; |
|
| 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-2021 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 | + |
|
| 28 | + $var = []; |
|
| 29 | 29 | $var['hidden_asterisk'] = '<i class="fas fa-asterisk mr-2"></i><i class="fas fa-asterisk mr-2"></i><i class="fas fa-asterisk mr-2"></i><i class="fas fa-asterisk mr-2"></i><i class="fas fa-asterisk"></i>'; |
| 30 | 30 | |
| 31 | 31 | ?> |
@@ -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'], 'folders', $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 | // Ensure Complexity levels are translated |
| 56 | 56 | if (defined('TP_PW_COMPLEXITY') === false) { |
| 57 | 57 | define( |
@@ -71,33 +71,33 @@ discard block |
||
| 71 | 71 | $complexityHtml = '<div id="hidden-select-complexity" class="hidden"><select id="select-complexity" class="form-control form-item-control save-me">'; |
| 72 | 72 | $complexitySelect = ''; |
| 73 | 73 | foreach (TP_PW_COMPLEXITY as $level) { |
| 74 | - $complexitySelect .= '<option value="' . $level[0] . '">' . $level[1] . '</option>'; |
|
| 74 | + $complexitySelect .= '<option value="'.$level[0].'">'.$level[1].'</option>'; |
|
| 75 | 75 | } |
| 76 | -$complexityHtml .= $complexitySelect . '</select></div>'; |
|
| 76 | +$complexityHtml .= $complexitySelect.'</select></div>'; |
|
| 77 | 77 | // Prepare folders |
| 78 | -require_once $SETTINGS['cpassman_dir'] . '/sources/SplClassLoader.php'; |
|
| 78 | +require_once $SETTINGS['cpassman_dir'].'/sources/SplClassLoader.php'; |
|
| 79 | 79 | //Build tree |
| 80 | -$tree = new SplClassLoader('Tree\NestedTree', $SETTINGS['cpassman_dir'] . '/includes/libraries'); |
|
| 80 | +$tree = new SplClassLoader('Tree\NestedTree', $SETTINGS['cpassman_dir'].'/includes/libraries'); |
|
| 81 | 81 | $tree->register(); |
| 82 | 82 | $tree = new Tree\NestedTree\NestedTree(prefixTable('nested_tree'), 'id', 'parent_id', 'title'); |
| 83 | 83 | /* Get full tree structure */ |
| 84 | 84 | $tst = $tree->getDescendants(); |
| 85 | 85 | // prepare options list |
| 86 | -$droplist = '<option value="na">---' . langHdl('select') . '---</option>'; |
|
| 86 | +$droplist = '<option value="na">---'.langHdl('select').'---</option>'; |
|
| 87 | 87 | if ((int) $_SESSION['is_admin'] === 1 || (int) $_SESSION['user_manager'] === 1 || (int) $_SESSION['can_create_root_folder'] === 1) { |
| 88 | - $droplist .= '<option value="0">' . langHdl('root') . '</option>'; |
|
| 88 | + $droplist .= '<option value="0">'.langHdl('root').'</option>'; |
|
| 89 | 89 | } |
| 90 | 90 | foreach ($tst as $t) { |
| 91 | 91 | if ( |
| 92 | 92 | in_array($t->id, $_SESSION['groupes_visibles']) === true |
| 93 | 93 | && in_array($t->id, $_SESSION['personal_visible_groups']) === false |
| 94 | 94 | ) { |
| 95 | - $droplist .= '<option value="' . $t->id . '">' . addslashes($t->title); |
|
| 95 | + $droplist .= '<option value="'.$t->id.'">'.addslashes($t->title); |
|
| 96 | 96 | $text = ''; |
| 97 | 97 | foreach ($tree->getPath($t->id, false) as $fld) { |
| 98 | - $text .= empty($text) === true ? ' [' . $fld->title : ' > ' . $fld->title; |
|
| 98 | + $text .= empty($text) === true ? ' ['.$fld->title : ' > '.$fld->title; |
|
| 99 | 99 | } |
| 100 | - $droplist .= (empty($text) === true ? '' : $text . '</i>]') . '</option>'; |
|
| 100 | + $droplist .= (empty($text) === true ? '' : $text.'</i>]').'</option>'; |
|
| 101 | 101 | } |
| 102 | 102 | } |
| 103 | 103 | |
@@ -260,7 +260,7 @@ discard block |
||
| 260 | 260 | <th scope="col" min-width="200px"><?php echo langHdl('group'); ?></th> |
| 261 | 261 | <th scope="col" min-width="200px"><?php echo langHdl('group_parent'); ?></th> |
| 262 | 262 | <th scope="col" width="50px"><i class="fas fa-gavel fa-lg infotip" title="<?php echo langHdl('password_strength'); ?>"></i></th> |
| 263 | - <th scope="col" width="50px"><i class="fas fa-recycle fa-lg infotip" title="<?php echo langHdl('group_pw_duration') . ' ' . langHdl('group_pw_duration_tip'); ?>"></i></th> |
|
| 263 | + <th scope="col" width="50px"><i class="fas fa-recycle fa-lg infotip" title="<?php echo langHdl('group_pw_duration').' '.langHdl('group_pw_duration_tip'); ?>"></i></th> |
|
| 264 | 264 | <th scope="col" width="50px"><i class="fas fa-pen fa-lg infotip" title="<?php echo langHdl('auth_creation_without_complexity'); ?>"></i></th> |
| 265 | 265 | <th scope="col" width="50px"><i class="fas fa-edit fa-lg infotip" title="<?php echo langHdl('auth_modification_without_complexity'); ?>"></i></th> |
| 266 | 266 | </tr> |
@@ -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'], 'folders', $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 | ?> |