@@ -64,7 +64,7 @@ discard block |
||
| 64 | 64 | if ($checkUserAccess->checkSession() === false || $checkUserAccess->userAccessPage('folders') === false) { |
| 65 | 65 | // Not allowed page |
| 66 | 66 | $_SESSION['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 | |
@@ -100,28 +100,28 @@ discard block |
||
| 100 | 100 | $complexityHtml = '<div id="hidden-select-complexity" class="hidden"><select id="select-complexity" class="form-control form-item-control save-me">'; |
| 101 | 101 | $complexitySelect = ''; |
| 102 | 102 | foreach (TP_PW_COMPLEXITY as $level) { |
| 103 | - $complexitySelect .= '<option value="' . $level[0] . '">' . $level[1] . '</option>'; |
|
| 103 | + $complexitySelect .= '<option value="'.$level[0].'">'.$level[1].'</option>'; |
|
| 104 | 104 | } |
| 105 | -$complexityHtml .= $complexitySelect . '</select></div>'; |
|
| 105 | +$complexityHtml .= $complexitySelect.'</select></div>'; |
|
| 106 | 106 | |
| 107 | 107 | /* Get full tree structure */ |
| 108 | 108 | $tst = $tree->getDescendants(); |
| 109 | 109 | // prepare options list |
| 110 | -$droplist = '<option value="na">---' . langHdl('select') . '---</option>'; |
|
| 110 | +$droplist = '<option value="na">---'.langHdl('select').'---</option>'; |
|
| 111 | 111 | if ((int) $_SESSION['is_admin'] === 1 || (int) $_SESSION['user_manager'] === 1 || (int) $_SESSION['can_create_root_folder'] === 1) { |
| 112 | - $droplist .= '<option value="0">' . langHdl('root') . '</option>'; |
|
| 112 | + $droplist .= '<option value="0">'.langHdl('root').'</option>'; |
|
| 113 | 113 | } |
| 114 | 114 | foreach ($tst as $t) { |
| 115 | 115 | if ( |
| 116 | 116 | in_array($t->id, $_SESSION['groupes_visibles']) === true |
| 117 | 117 | && in_array($t->id, $_SESSION['personal_visible_groups']) === false |
| 118 | 118 | ) { |
| 119 | - $droplist .= '<option value="' . $t->id . '">' . addslashes($t->title); |
|
| 119 | + $droplist .= '<option value="'.$t->id.'">'.addslashes($t->title); |
|
| 120 | 120 | $text = ''; |
| 121 | 121 | foreach ($tree->getPath($t->id, false) as $fld) { |
| 122 | - $text .= empty($text) === true ? ' [' . $fld->title : ' > ' . $fld->title; |
|
| 122 | + $text .= empty($text) === true ? ' ['.$fld->title : ' > '.$fld->title; |
|
| 123 | 123 | } |
| 124 | - $droplist .= (empty($text) === true ? '' : $text . '</i>]') . '</option>'; |
|
| 124 | + $droplist .= (empty($text) === true ? '' : $text.'</i>]').'</option>'; |
|
| 125 | 125 | } |
| 126 | 126 | } |
| 127 | 127 | |
@@ -200,14 +200,14 @@ discard block |
||
| 200 | 200 | <label><?php echo langHdl('icon'); ?></label> |
| 201 | 201 | <input type="text" class="form-control form-folder-control purify" id="new-folder-add-icon" data-field="icon"> |
| 202 | 202 | <small class='form-text text-muted'> |
| 203 | - <?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> |
|
| 203 | + <?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> |
|
| 204 | 204 | </small> |
| 205 | 205 | </div> |
| 206 | 206 | <div class="form-group"> |
| 207 | 207 | <label><?php echo langHdl('icon_on_selection'); ?></label> |
| 208 | 208 | <input type="text" class="form-control form-folder-control purify" id="new-folder-add-icon-selected" data-field="iconSelected"> |
| 209 | 209 | <small class='form-text text-muted'> |
| 210 | - <?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> |
|
| 210 | + <?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> |
|
| 211 | 211 | </small> |
| 212 | 212 | </div> |
| 213 | 213 | <div class="form-group"> |
@@ -298,7 +298,7 @@ discard block |
||
| 298 | 298 | <th scope="col" min-width="200px"><?php echo langHdl('group'); ?></th> |
| 299 | 299 | <th scope="col" min-width="200px"><?php echo langHdl('group_parent'); ?></th> |
| 300 | 300 | <th scope="col" width="50px"><i class="fas fa-gavel fa-lg infotip" title="<?php echo langHdl('password_strength'); ?>"></i></th> |
| 301 | - <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> |
|
| 301 | + <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> |
|
| 302 | 302 | <th scope="col" width="50px"><i class="fas fa-pen fa-lg infotip" title="<?php echo langHdl('auth_creation_without_complexity'); ?>"></i></th> |
| 303 | 303 | <th scope="col" width="50px"><i class="fas fa-edit fa-lg infotip" title="<?php echo langHdl('auth_modification_without_complexity'); ?>"></i></th> |
| 304 | 304 | <th scope="col" width="50px"><i class="fas fa-folder fa-lg infotip" title="<?php echo langHdl('icon'); ?>"></i></th> |
@@ -71,7 +71,7 @@ |
||
| 71 | 71 | if ($checkUserAccess->checkSession() === false || $checkUserAccess->userAccessPage('utilities.logs') === false) { |
| 72 | 72 | // Not allowed page |
| 73 | 73 | $_SESSION['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 | |
@@ -63,7 +63,7 @@ discard block |
||
| 63 | 63 | if ($checkUserAccess->checkSession() === false || $checkUserAccess->userAccessPage('fields') === false) { |
| 64 | 64 | // Not allowed page |
| 65 | 65 | $_SESSION['error']['code'] = ERR_NOT_ALLOWED; |
| 66 | - include $SETTINGS['cpassman_dir'] . '/error.php'; |
|
| 66 | + include $SETTINGS['cpassman_dir'].'/error.php'; |
|
| 67 | 67 | exit; |
| 68 | 68 | } |
| 69 | 69 | |
@@ -178,7 +178,7 @@ discard block |
||
| 178 | 178 | $folders = $tree->getDescendants(); |
| 179 | 179 | foreach ($folders as $folder) { |
| 180 | 180 | DB::query( |
| 181 | - 'SELECT * FROM ' . prefixTable('nested_tree') . ' |
|
| 181 | + 'SELECT * FROM '.prefixTable('nested_tree').' |
|
| 182 | 182 | WHERE personal_folder = %i AND id = %i', |
| 183 | 183 | '0', |
| 184 | 184 | $folder->id |
@@ -190,7 +190,7 @@ discard block |
||
| 190 | 190 | $ident .= '-'; |
| 191 | 191 | } |
| 192 | 192 | echo ' |
| 193 | - <option value="' . $folder->id . '">' . $ident . ' ' . str_replace('&', '&', $folder->title) . '</option>'; |
|
| 193 | + <option value="' . $folder->id.'">'.$ident.' '.str_replace('&', '&', $folder->title).'</option>'; |
|
| 194 | 194 | } |
| 195 | 195 | } |
| 196 | 196 | ?> |
@@ -221,9 +221,9 @@ discard block |
||
| 221 | 221 | <select class="form-control form-item-control select2" style="width:100%;" id="form-field-type"> |
| 222 | 222 | <?php |
| 223 | 223 | // Build list of Types |
| 224 | - echo '<option value="">-- ' . langHdl('select') . ' --</option> |
|
| 225 | - <option value="text">' . langHdl('text') . '</option> |
|
| 226 | - <option value="textarea">' . langHdl('textarea') . '</option>'; |
|
| 224 | + echo '<option value="">-- '.langHdl('select').' --</option> |
|
| 225 | + <option value="text">' . langHdl('text').'</option> |
|
| 226 | + <option value="textarea">' . langHdl('textarea').'</option>'; |
|
| 227 | 227 | ?> |
| 228 | 228 | </select> |
| 229 | 229 | </div> |
@@ -256,14 +256,14 @@ discard block |
||
| 256 | 256 | <select class="form-control form-item-control select2" multiple="multiple" style="width:100%;" id="form-field-roles"> |
| 257 | 257 | <?php |
| 258 | 258 | // Build list of Roles |
| 259 | - echo '<option value="all">' . langHdl('every_roles') . '</option>'; |
|
| 259 | + echo '<option value="all">'.langHdl('every_roles').'</option>'; |
|
| 260 | 260 | $rows = DB::query( |
| 261 | 261 | 'SELECT id, title |
| 262 | - FROM ' . prefixTable('roles_title') . ' |
|
| 262 | + FROM ' . prefixTable('roles_title').' |
|
| 263 | 263 | ORDER BY title ASC' |
| 264 | 264 | ); |
| 265 | 265 | foreach ($rows as $record) { |
| 266 | - echo '<option value="' . $record['id'] . '">' . addslashes($record['title']) . '</option>'; |
|
| 266 | + echo '<option value="'.$record['id'].'">'.addslashes($record['title']).'</option>'; |
|
| 267 | 267 | } |
| 268 | 268 | ?> |
| 269 | 269 | </select> |
@@ -63,7 +63,7 @@ |
||
| 63 | 63 | if ($checkUserAccess->checkSession() === false || $checkUserAccess->userAccessPage('statistics') === false) { |
| 64 | 64 | // Not allowed page |
| 65 | 65 | $_SESSION['error']['code'] = ERR_NOT_ALLOWED; |
| 66 | - include $SETTINGS['cpassman_dir'] . '/error.php'; |
|
| 66 | + include $SETTINGS['cpassman_dir'].'/error.php'; |
|
| 67 | 67 | exit; |
| 68 | 68 | } |
| 69 | 69 | |
@@ -62,7 +62,7 @@ discard block |
||
| 62 | 62 | if ($checkUserAccess->checkSession() === false || $checkUserAccess->userAccessPage('favourites') === false) { |
| 63 | 63 | // Not allowed page |
| 64 | 64 | $_SESSION['error']['code'] = ERR_NOT_ALLOWED; |
| 65 | - include $SETTINGS['cpassman_dir'] . '/error.php'; |
|
| 65 | + include $SETTINGS['cpassman_dir'].'/error.php'; |
|
| 66 | 66 | exit; |
| 67 | 67 | } |
| 68 | 68 | |
@@ -114,12 +114,12 @@ discard block |
||
| 114 | 114 | if (empty($fav) === false) { |
| 115 | 115 | $data = DB::queryFirstRow( |
| 116 | 116 | 'SELECT i.label, i.description, i.id, i.id_tree, t.title |
| 117 | - FROM ' . prefixTable('items') . ' as i |
|
| 118 | - INNER JOIN ' . prefixTable('nested_tree') . ' as t ON (t.id = i.id_tree) |
|
| 117 | + FROM ' . prefixTable('items').' as i |
|
| 118 | + INNER JOIN ' . prefixTable('nested_tree').' as t ON (t.id = i.id_tree) |
|
| 119 | 119 | WHERE i.id = %i', |
| 120 | 120 | $fav |
| 121 | 121 | ); |
| 122 | - if (! empty($data['label'])) { |
|
| 122 | + if (!empty($data['label'])) { |
|
| 123 | 123 | ?> |
| 124 | 124 | <tr> |
| 125 | 125 | <td> |
@@ -63,7 +63,7 @@ |
||
| 63 | 63 | if ($checkUserAccess->checkSession() === false || $checkUserAccess->userAccessPage('export') === false) { |
| 64 | 64 | // Not allowed page |
| 65 | 65 | $_SESSION['error']['code'] = ERR_NOT_ALLOWED; |
| 66 | - include $SETTINGS['cpassman_dir'] . '/error.php'; |
|
| 66 | + include $SETTINGS['cpassman_dir'].'/error.php'; |
|
| 67 | 67 | exit; |
| 68 | 68 | } |
| 69 | 69 | |
@@ -63,7 +63,7 @@ discard block |
||
| 63 | 63 | if ($checkUserAccess->checkSession() === false || $checkUserAccess->userAccessPage('emails') === false) { |
| 64 | 64 | // Not allowed page |
| 65 | 65 | $_SESSION['error']['code'] = ERR_NOT_ALLOWED; |
| 66 | - include $SETTINGS['cpassman_dir'] . '/error.php'; |
|
| 66 | + include $SETTINGS['cpassman_dir'].'/error.php'; |
|
| 67 | 67 | exit; |
| 68 | 68 | } |
| 69 | 69 | |
@@ -245,7 +245,7 @@ discard block |
||
| 245 | 245 | <div class="card-body"> |
| 246 | 246 | <div id="unsent-emails"> |
| 247 | 247 | <?php |
| 248 | - DB::query('SELECT * FROM ' . prefixTable('emails') . ' WHERE status = %s OR status = %s', 'not_sent', ''); |
|
| 248 | + DB::query('SELECT * FROM '.prefixTable('emails').' WHERE status = %s OR status = %s', 'not_sent', ''); |
|
| 249 | 249 | echo str_replace('#nb_emails#', (string) DB::count(), langHdl('email_send_backlog')); |
| 250 | 250 | ?> |
| 251 | 251 | </div> |
@@ -63,7 +63,7 @@ discard block |
||
| 63 | 63 | if ($checkUserAccess->checkSession() === false || $checkUserAccess->userAccessPage('users') === false) { |
| 64 | 64 | // Not allowed page |
| 65 | 65 | $_SESSION['error']['code'] = ERR_NOT_ALLOWED; |
| 66 | - include $SETTINGS['cpassman_dir'] . '/error.php'; |
|
| 66 | + include $SETTINGS['cpassman_dir'].'/error.php'; |
|
| 67 | 67 | exit; |
| 68 | 68 | } |
| 69 | 69 | |
@@ -89,24 +89,24 @@ discard block |
||
| 89 | 89 | // If administrator then all roles are shown |
| 90 | 90 | // else only the Roles the users is associated to. |
| 91 | 91 | if ((int) $_SESSION['is_admin'] === 1) { |
| 92 | - $optionsManagedBy .= '<option value="0">' . langHdl('administrators_only') . '</option>'; |
|
| 92 | + $optionsManagedBy .= '<option value="0">'.langHdl('administrators_only').'</option>'; |
|
| 93 | 93 | } |
| 94 | 94 | |
| 95 | 95 | $rows = DB::query( |
| 96 | 96 | 'SELECT id, title, creator_id |
| 97 | - FROM ' . prefixTable('roles_title') . ' |
|
| 97 | + FROM ' . prefixTable('roles_title').' |
|
| 98 | 98 | ORDER BY title ASC' |
| 99 | 99 | ); |
| 100 | 100 | foreach ($rows as $record) { |
| 101 | 101 | if ((int) $_SESSION['is_admin'] === 1 || in_array($record['id'], $_SESSION['user_roles']) === true) { |
| 102 | - $optionsManagedBy .= '<option value="' . $record['id'] . '">' . langHdl('managers_of') . ' ' . addslashes($record['title']) . '</option>'; |
|
| 102 | + $optionsManagedBy .= '<option value="'.$record['id'].'">'.langHdl('managers_of').' '.addslashes($record['title']).'</option>'; |
|
| 103 | 103 | } |
| 104 | 104 | if ( |
| 105 | 105 | (int) $_SESSION['is_admin'] === 1 |
| 106 | 106 | || (((int) $superGlobal->get('user_manager', 'SESSION') === 1 || (int) $_SESSION['user_can_manage_all_users'] === 1) |
| 107 | 107 | && (in_array($record['id'], $userRoles) === true) || (int) $record['creator_id'] === (int) $_SESSION['user_id']) |
| 108 | 108 | ) { |
| 109 | - $optionsRoles .= '<option value="' . $record['id'] . '">' . addslashes($record['title']) . '</option>'; |
|
| 109 | + $optionsRoles .= '<option value="'.$record['id'].'">'.addslashes($record['title']).'</option>'; |
|
| 110 | 110 | } |
| 111 | 111 | } |
| 112 | 112 | |
@@ -121,7 +121,7 @@ discard block |
||
| 121 | 121 | for ($y = 1; $y < $t->nlevel; ++$y) { |
| 122 | 122 | $ident .= ' '; |
| 123 | 123 | } |
| 124 | - $foldersList .= '<option value="' . $t->id . '">' . $ident . htmlspecialchars($t->title, ENT_COMPAT, 'UTF-8') . '</option>'; |
|
| 124 | + $foldersList .= '<option value="'.$t->id.'">'.$ident.htmlspecialchars($t->title, ENT_COMPAT, 'UTF-8').'</option>'; |
|
| 125 | 125 | } |
| 126 | 126 | } |
| 127 | 127 | |
@@ -158,7 +158,7 @@ discard block |
||
| 158 | 158 | </button><?php |
| 159 | 159 | echo isset($SETTINGS['ldap_mode']) === true && (int) $SETTINGS['ldap_mode'] === 1 && (int) $_SESSION['is_admin'] === 1 ? |
| 160 | 160 | '<button type="button" class="btn btn-primary btn-sm tp-action mr-2" data-action="ldap-sync"> |
| 161 | - <i class="fa-solid fa-address-card mr-2"></i>' . langHdl('ldap_synchronization') . ' |
|
| 161 | + <i class="fa-solid fa-address-card mr-2"></i>' . langHdl('ldap_synchronization').' |
|
| 162 | 162 | </button>' : ''; |
| 163 | 163 | ?> |
| 164 | 164 | </h3> |
@@ -230,7 +230,7 @@ discard block |
||
| 230 | 230 | <?php |
| 231 | 231 | foreach (TP_PW_COMPLEXITY as $entry) { |
| 232 | 232 | echo ' |
| 233 | - <option value="' . $entry[0] . '">' . addslashes($entry[1]) . '</option>'; |
|
| 233 | + <option value="' . $entry[0].'">'.addslashes($entry[1]).'</option>'; |
|
| 234 | 234 | } |
| 235 | 235 | ?> |
| 236 | 236 | </select> |
@@ -70,7 +70,7 @@ discard block |
||
| 70 | 70 | if ($checkUserAccess->checkSession() === false || $checkUserAccess->userAccessPage('tasks') === false) { |
| 71 | 71 | // Not allowed page |
| 72 | 72 | $_SESSION['error']['code'] = ERR_NOT_ALLOWED; |
| 73 | - include $SETTINGS['cpassman_dir'] . '/error.php'; |
|
| 73 | + include $SETTINGS['cpassman_dir'].'/error.php'; |
|
| 74 | 74 | exit; |
| 75 | 75 | } |
| 76 | 76 | ?> |
@@ -423,7 +423,7 @@ discard block |
||
| 423 | 423 | // error |
| 424 | 424 | toastr.remove(); |
| 425 | 425 | toastr.error( |
| 426 | - '<?php echo langHdl('server_answer_error') . '<br />' . langHdl('server_returned_data') . ':<br />'; ?>' + data.error, |
|
| 426 | + '<?php echo langHdl('server_answer_error').'<br />'.langHdl('server_returned_data').':<br />'; ?>' + data.error, |
|
| 427 | 427 | '', { |
| 428 | 428 | closeButton: true, |
| 429 | 429 | positionClass: 'toastr-top-right' |
@@ -446,11 +446,11 @@ discard block |
||
| 446 | 446 | $('#'+field+'_parameter_value').val(frequency === null ? '' : frequency + ';' +value,); |
| 447 | 447 | param = value.split(';'); |
| 448 | 448 | if (param.length === 1) { |
| 449 | - txt = ' <?php echo langHdl('at');?> ' + param[0]; |
|
| 449 | + txt = ' <?php echo langHdl('at'); ?> ' + param[0]; |
|
| 450 | 450 | } else { |
| 451 | - txt = ' <?php echo langHdl('day');?> ' + param[1] + ' <?php echo langHdl('at');?> ' + param[0]; |
|
| 451 | + txt = ' <?php echo langHdl('day'); ?> ' + param[1] + ' <?php echo langHdl('at'); ?> ' + param[0]; |
|
| 452 | 452 | } |
| 453 | - $('#'+field+'_parameter').val(frequency === null ? '<?php echo langHdl('not_defined');?>' : (data.message + txt)); |
|
| 453 | + $('#'+field+'_parameter').val(frequency === null ? '<?php echo langHdl('not_defined'); ?>' : (data.message + txt)); |
|
| 454 | 454 | $("#task-define-modal").modal('hide'); |
| 455 | 455 | $('#task-define-modal-type, #task-define-modal-parameter-hourly-value, #task-define-modal-parameter-daily-value, #task-define-modal-frequency').val(''); |
| 456 | 456 | } |
@@ -556,7 +556,7 @@ discard block |
||
| 556 | 556 | // error |
| 557 | 557 | toastr.remove(); |
| 558 | 558 | toastr.error( |
| 559 | - '<?php echo langHdl('server_answer_error') . '<br />' . langHdl('server_returned_data') . ':<br />'; ?>' + data.error, |
|
| 559 | + '<?php echo langHdl('server_answer_error').'<br />'.langHdl('server_returned_data').':<br />'; ?>' + data.error, |
|
| 560 | 560 | '', { |
| 561 | 561 | closeButton: true, |
| 562 | 562 | positionClass: 'toastr-top-right' |
@@ -607,7 +607,7 @@ discard block |
||
| 607 | 607 | // error |
| 608 | 608 | toastr.remove(); |
| 609 | 609 | toastr.error( |
| 610 | - '<?php echo langHdl('server_answer_error') . '<br />' . langHdl('server_returned_data') . ':<br />'; ?>' + data.error, |
|
| 610 | + '<?php echo langHdl('server_answer_error').'<br />'.langHdl('server_returned_data').':<br />'; ?>' + data.error, |
|
| 611 | 611 | '', { |
| 612 | 612 | closeButton: true, |
| 613 | 613 | positionClass: 'toastr-top-right' |