@@ -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); |
@@ -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 | ?> |
@@ -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 | ?> |
@@ -108,7 +108,7 @@ discard block |
||
| 108 | 108 | // ERROR |
| 109 | 109 | toastr.remove(); |
| 110 | 110 | toastr.error( |
| 111 | - '<?php echo langHdl('server_answer_error') . '<br />' . langHdl('server_returned_data') . ':<br />'; ?>' + data.error, |
|
| 111 | + '<?php echo langHdl('server_answer_error').'<br />'.langHdl('server_returned_data').':<br />'; ?>' + data.error, |
|
| 112 | 112 | '<?php echo langHdl('error'); ?>', { |
| 113 | 113 | timeOut: 5000, |
| 114 | 114 | progressBar: true |
@@ -135,7 +135,7 @@ discard block |
||
| 135 | 135 | // error |
| 136 | 136 | toastr.remove(); |
| 137 | 137 | toastr.error( |
| 138 | - '<?php echo langHdl('server_answer_error') . '<br />' . langHdl('server_returned_data') . ':<br />'; ?>' + data.error, |
|
| 138 | + '<?php echo langHdl('server_answer_error').'<br />'.langHdl('server_returned_data').':<br />'; ?>' + data.error, |
|
| 139 | 139 | '<?php echo langHdl('error'); ?>', { |
| 140 | 140 | timeOut: 5000, |
| 141 | 141 | progressBar: true |
@@ -206,7 +206,7 @@ discard block |
||
| 206 | 206 | // ERROR |
| 207 | 207 | toastr.remove(); |
| 208 | 208 | toastr.error( |
| 209 | - '<?php echo langHdl('server_answer_error') . '<br />' . langHdl('server_returned_data') . ':<br />'; ?>' + data.error, |
|
| 209 | + '<?php echo langHdl('server_answer_error').'<br />'.langHdl('server_returned_data').':<br />'; ?>' + data.error, |
|
| 210 | 210 | '<?php echo langHdl('error'); ?>', { |
| 211 | 211 | timeOut: 5000, |
| 212 | 212 | progressBar: true |
@@ -43,19 +43,19 @@ 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'], 'users', $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 | -require_once $SETTINGS['cpassman_dir'] . '/sources/main.functions.php'; |
|
| 53 | +require_once $SETTINGS['cpassman_dir'].'/sources/main.functions.php'; |
|
| 54 | 54 | // Load superGlobals |
| 55 | -include_once $SETTINGS['cpassman_dir'] . '/includes/libraries/protect/SuperGlobal/SuperGlobal.php'; |
|
| 55 | +include_once $SETTINGS['cpassman_dir'].'/includes/libraries/protect/SuperGlobal/SuperGlobal.php'; |
|
| 56 | 56 | $superGlobal = new protect\SuperGlobal\SuperGlobal(); |
| 57 | 57 | // Connect to mysql server |
| 58 | -require_once $SETTINGS['cpassman_dir'] . '/includes/libraries/Database/Meekrodb/db.class.php'; |
|
| 58 | +require_once $SETTINGS['cpassman_dir'].'/includes/libraries/Database/Meekrodb/db.class.php'; |
|
| 59 | 59 | if (defined('DB_PASSWD_CLEAR') === false) { |
| 60 | 60 | define('DB_PASSWD_CLEAR', defuseReturnDecrypted(DB_PASSWD, $SETTINGS)); |
| 61 | 61 | } |
@@ -72,29 +72,29 @@ discard block |
||
| 72 | 72 | // If administrator then all roles are shown |
| 73 | 73 | // else only the Roles the users is associated to. |
| 74 | 74 | if ((int) $_SESSION['is_admin'] === 1) { |
| 75 | - $optionsManagedBy .= '<option value="0">' . langHdl('administrators_only') . '</option>'; |
|
| 75 | + $optionsManagedBy .= '<option value="0">'.langHdl('administrators_only').'</option>'; |
|
| 76 | 76 | } |
| 77 | 77 | |
| 78 | 78 | $rows = DB::query( |
| 79 | 79 | 'SELECT id, title, creator_id |
| 80 | - FROM ' . prefixTable('roles_title') . ' |
|
| 80 | + FROM ' . prefixTable('roles_title').' |
|
| 81 | 81 | ORDER BY title ASC' |
| 82 | 82 | ); |
| 83 | 83 | foreach ($rows as $record) { |
| 84 | 84 | if ((int) $_SESSION['is_admin'] === 1 || in_array($record['id'], $_SESSION['user_roles']) === true) { |
| 85 | - $optionsManagedBy .= '<option value="' . $record['id'] . '">' . langHdl('managers_of') . ' ' . addslashes($record['title']) . '</option>'; |
|
| 85 | + $optionsManagedBy .= '<option value="'.$record['id'].'">'.langHdl('managers_of').' '.addslashes($record['title']).'</option>'; |
|
| 86 | 86 | } |
| 87 | 87 | if ( |
| 88 | 88 | (int) $_SESSION['is_admin'] === 1 |
| 89 | 89 | || (((int) $superGlobal->get('user_manager', 'SESSION') === 1 || (int) $_SESSION['user_can_manage_all_users'] === 1) |
| 90 | 90 | && (in_array($record['id'], $userRoles) === true) || (int) $record['creator_id'] === (int) $_SESSION['user_id']) |
| 91 | 91 | ) { |
| 92 | - $optionsRoles .= '<option value="' . $record['id'] . '">' . addslashes($record['title']) . '</option>'; |
|
| 92 | + $optionsRoles .= '<option value="'.$record['id'].'">'.addslashes($record['title']).'</option>'; |
|
| 93 | 93 | } |
| 94 | 94 | } |
| 95 | 95 | |
| 96 | 96 | //Build tree |
| 97 | -$tree = new SplClassLoader('Tree\NestedTree', $SETTINGS['cpassman_dir'] . '/includes/libraries'); |
|
| 97 | +$tree = new SplClassLoader('Tree\NestedTree', $SETTINGS['cpassman_dir'].'/includes/libraries'); |
|
| 98 | 98 | $tree->register(); |
| 99 | 99 | $tree = new Tree\NestedTree\NestedTree(prefixTable('nested_tree'), 'id', 'parent_id', 'title'); |
| 100 | 100 | $treeDesc = $tree->getDescendants(); |
@@ -108,7 +108,7 @@ discard block |
||
| 108 | 108 | for ($y = 1; $y < $t->nlevel; ++$y) { |
| 109 | 109 | $ident .= ' '; |
| 110 | 110 | } |
| 111 | - $foldersList .= '<option value="' . $t->id . '">' . $ident . htmlspecialchars($t->title, ENT_COMPAT, 'UTF-8') . '</option>'; |
|
| 111 | + $foldersList .= '<option value="'.$t->id.'">'.$ident.htmlspecialchars($t->title, ENT_COMPAT, 'UTF-8').'</option>'; |
|
| 112 | 112 | } |
| 113 | 113 | } |
| 114 | 114 | |
@@ -145,7 +145,7 @@ discard block |
||
| 145 | 145 | </button><?php |
| 146 | 146 | echo isset($SETTINGS['ldap_mode']) === true && (int) $SETTINGS['ldap_mode'] === 1 && (int) $_SESSION['is_admin'] === 1 ? |
| 147 | 147 | '<button type="button" class="btn btn-primary btn-sm tp-action mr-2" data-action="ldap-sync"> |
| 148 | - <i class="fas fa-address-card mr-2"></i>' . langHdl('ldap_synchronization') . ' |
|
| 148 | + <i class="fas fa-address-card mr-2"></i>' . langHdl('ldap_synchronization').' |
|
| 149 | 149 | </button>' : ''; |
| 150 | 150 | ?> |
| 151 | 151 | </h3> |
@@ -217,7 +217,7 @@ discard block |
||
| 217 | 217 | <?php |
| 218 | 218 | foreach (TP_PW_COMPLEXITY as $entry) { |
| 219 | 219 | echo ' |
| 220 | - <option value="' . $entry[0] . '">' . addslashes($entry[1]) . '</option>'; |
|
| 220 | + <option value="' . $entry[0].'">'.addslashes($entry[1]).'</option>'; |
|
| 221 | 221 | } |
| 222 | 222 | ?> |
| 223 | 223 | </select> |
@@ -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 | ?> |
@@ -142,7 +142,7 @@ discard block |
||
| 142 | 142 | if (parseInt($(this).data('category')) === parseInt(selectedCategory)) { |
| 143 | 143 | fields.push({ |
| 144 | 144 | id: $(this).data('order'), |
| 145 | - text: '<?php echo langHdl('before') . ' '; ?>' + $(this).find('td:eq(1)').text() |
|
| 145 | + text: '<?php echo langHdl('before').' '; ?>' + $(this).find('td:eq(1)').text() |
|
| 146 | 146 | }); |
| 147 | 147 | } |
| 148 | 148 | }); |
@@ -546,7 +546,7 @@ discard block |
||
| 546 | 546 | if ($(this).data('category') === categoryId) { |
| 547 | 547 | fields.push({ |
| 548 | 548 | id: $(this).data('order'), |
| 549 | - text: '<?php echo langHdl('before') . ' '; ?>' + $(this).find('td:eq(1)').text() |
|
| 549 | + text: '<?php echo langHdl('before').' '; ?>' + $(this).find('td:eq(1)').text() |
|
| 550 | 550 | }); |
| 551 | 551 | } |
| 552 | 552 | }); |
@@ -712,7 +712,7 @@ discard block |
||
| 712 | 712 | '</tr>'; |
| 713 | 713 | |
| 714 | 714 | // Prepare list of categories for Form |
| 715 | - categoriesList += '<option value="' + categoryId + '"><?php echo langHdl('before') . ' '; ?>' + val.title + '</option>'; |
|
| 715 | + categoriesList += '<option value="' + categoryId + '"><?php echo langHdl('before').' '; ?>' + val.title + '</option>'; |
|
| 716 | 716 | |
| 717 | 717 | positionCategory += 1; |
| 718 | 718 | } else { |
@@ -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.renewal', $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 | |