Passed
Push — wip_sessions ( b55e55...384f5b )
by Nils
05:05
created
pages/profile.js.php 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
 if ($checkUserAccess->checkSession() === false || $checkUserAccess->userAccessPage('profile') === 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
 ?>
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
     })
96 96
 
97 97
     // Select user properties
98
-    $('#profile-user-language option[value=<?php echo $session->get('user-language');?>').attr('selected','selected');
98
+    $('#profile-user-language option[value=<?php echo $session->get('user-language'); ?>').attr('selected','selected');
99 99
 
100 100
 
101 101
     // AVATAR IMPORT
@@ -262,7 +262,7 @@  discard block
 block discarded – undo
262 262
                     $('#profile-user-email').val(data.email)
263 263
 
264 264
                     // reload page in case of language change
265
-                    if ($('#profile-user-language').val().toLowerCase() !== '<?php echo $session->get('user-language');?>') {
265
+                    if ($('#profile-user-language').val().toLowerCase() !== '<?php echo $session->get('user-language'); ?>') {
266 266
                         // prepare reload
267 267
                         $(this).delay(3000).queue(function() {
268 268
                             document.location.href = "index.php?page=profile";
@@ -273,7 +273,7 @@  discard block
 block discarded – undo
273 273
                         // Inform user
274 274
                         toastr.remove();
275 275
                         toastr.info(
276
-                            '<?php echo $lang->get('alert_page_will_reload') . ' ... ' . $lang->get('please_wait'); ?>',
276
+                            '<?php echo $lang->get('alert_page_will_reload').' ... '.$lang->get('please_wait'); ?>',
277 277
                             '', {
278 278
                                 timeOut: 3000,
279 279
                                 progressBar: true
@@ -377,27 +377,27 @@  discard block
 block discarded – undo
377 377
         "defaultText": "<?php echo $lang->get('index_pw_level_txt'); ?>",
378 378
         "ratings": [
379 379
             {
380
-                "minScore": <?php echo TP_PW_STRENGTH_1;?>,
380
+                "minScore": <?php echo TP_PW_STRENGTH_1; ?>,
381 381
                 "className": "meterWarn",
382 382
                 "text": "<?php echo $lang->get('complex_level1'); ?>"
383 383
             },
384 384
             {
385
-                "minScore": <?php echo TP_PW_STRENGTH_2;?>,
385
+                "minScore": <?php echo TP_PW_STRENGTH_2; ?>,
386 386
                 "className": "meterWarn",
387 387
                 "text": "<?php echo $lang->get('complex_level2'); ?>"
388 388
             },
389 389
             {
390
-                "minScore": <?php echo TP_PW_STRENGTH_3;?>,
390
+                "minScore": <?php echo TP_PW_STRENGTH_3; ?>,
391 391
                 "className": "meterGood",
392 392
                 "text": "<?php echo $lang->get('complex_level3'); ?>"
393 393
             },
394 394
             {
395
-                "minScore": <?php echo TP_PW_STRENGTH_4;?>,
395
+                "minScore": <?php echo TP_PW_STRENGTH_4; ?>,
396 396
                 "className": "meterGood",
397 397
                 "text": "<?php echo $lang->get('complex_level4'); ?>"
398 398
             },
399 399
             {
400
-                "minScore": <?php echo TP_PW_STRENGTH_5;?>,
400
+                "minScore": <?php echo TP_PW_STRENGTH_5; ?>,
401 401
                 "className": "meterExcel",
402 402
                 "text": "<?php echo $lang->get('complex_level5'); ?>"
403 403
             }
@@ -490,27 +490,27 @@  discard block
 block discarded – undo
490 490
         "defaultText": "<?php echo $lang->get('index_pw_level_txt'); ?>",
491 491
         "ratings": [
492 492
             {
493
-                "minScore": <?php echo TP_PW_STRENGTH_1;?>,
493
+                "minScore": <?php echo TP_PW_STRENGTH_1; ?>,
494 494
                 "className": "meterWarn",
495 495
                 "text": "<?php echo $lang->get('complex_level1'); ?>"
496 496
             },
497 497
             {
498
-                "minScore": <?php echo TP_PW_STRENGTH_2;?>,
498
+                "minScore": <?php echo TP_PW_STRENGTH_2; ?>,
499 499
                 "className": "meterWarn",
500 500
                 "text": "<?php echo $lang->get('complex_level2'); ?>"
501 501
             },
502 502
             {
503
-                "minScore": <?php echo TP_PW_STRENGTH_3;?>,
503
+                "minScore": <?php echo TP_PW_STRENGTH_3; ?>,
504 504
                 "className": "meterGood",
505 505
                 "text": "<?php echo $lang->get('complex_level3'); ?>"
506 506
             },
507 507
             {
508
-                "minScore": <?php echo TP_PW_STRENGTH_4;?>,
508
+                "minScore": <?php echo TP_PW_STRENGTH_4; ?>,
509 509
                 "className": "meterGood",
510 510
                 "text": "<?php echo $lang->get('complex_level4'); ?>"
511 511
             },
512 512
             {
513
-                "minScore": <?php echo TP_PW_STRENGTH_5;?>,
513
+                "minScore": <?php echo TP_PW_STRENGTH_5; ?>,
514 514
                 "className": "meterExcel",
515 515
                 "text": "<?php echo $lang->get('complex_level5'); ?>"
516 516
             }
@@ -526,7 +526,7 @@  discard block
 block discarded – undo
526 526
         }
527 527
     });
528 528
 
529
-    $('#profile-keys_download-date').text('<?php echo null === $session->get('user-keys_recovery_time') ? $lang->get('none') : date($SETTINGS['date_format'] . ' ' . $SETTINGS['time_format'], (int) $session->get('user-keys_recovery_time')); ?>');
529
+    $('#profile-keys_download-date').text('<?php echo null === $session->get('user-keys_recovery_time') ? $lang->get('none') : date($SETTINGS['date_format'].' '.$SETTINGS['time_format'], (int) $session->get('user-keys_recovery_time')); ?>');
530 530
 
531 531
     $("#open-dialog-keys-download").on('click', function(event) {
532 532
         event.preventDefault();
Please login to merge, or discard this patch.
pages/favourites.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
 if ($checkUserAccess->checkSession() === false || $checkUserAccess->userAccessPage('favourites') === 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
 
@@ -118,12 +118,12 @@  discard block
 block discarded – undo
118 118
                             if (empty($fav) === false) {
119 119
                                 $data = DB::queryFirstRow(
120 120
                                     'SELECT i.label, i.description, i.id, i.id_tree, t.title
121
-                                    FROM ' . prefixTable('items') . ' as i
122
-                                    INNER JOIN ' . prefixTable('nested_tree') . ' as t ON (t.id = i.id_tree)
121
+                                    FROM ' . prefixTable('items').' as i
122
+                                    INNER JOIN ' . prefixTable('nested_tree').' as t ON (t.id = i.id_tree)
123 123
                                     WHERE i.id = %i',
124 124
                                     $fav
125 125
                                 );
126
-                                if (! empty($data['label'])) {
126
+                                if (!empty($data['label'])) {
127 127
                                     ?>
128 128
                                     <tr>
129 129
                                         <td>
Please login to merge, or discard this patch.
pages/folders.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
 if ($checkUserAccess->checkSession() === false || $checkUserAccess->userAccessPage('folders') === 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
 
@@ -99,28 +99,28 @@  discard block
 block discarded – undo
99 99
 $complexityHtml = '<div id="hidden-select-complexity" class="hidden"><select id="select-complexity" class="form-control form-item-control save-me">';
100 100
 $complexitySelect = '';
101 101
 foreach (TP_PW_COMPLEXITY as $level) {
102
-    $complexitySelect .= '<option value="' . $level[0] . '">' . $level[1] . '</option>';
102
+    $complexitySelect .= '<option value="'.$level[0].'">'.$level[1].'</option>';
103 103
 }
104
-$complexityHtml .= $complexitySelect . '</select></div>';
104
+$complexityHtml .= $complexitySelect.'</select></div>';
105 105
 
106 106
 /* Get full tree structure */
107 107
 $tst = $tree->getDescendants();
108 108
 // prepare options list
109
-$droplist = '<option value="na">---' . $lang->get('select') . '---</option>';
109
+$droplist = '<option value="na">---'.$lang->get('select').'---</option>';
110 110
 if ((int) $session->get('user-admin') === 1 || (int) $session->get('user-manager') === 1 || (int) $session->get('user-can_create_root_folder') === 1) {
111
-    $droplist .= '<option value="0">' . $lang->get('root') . '</option>';
111
+    $droplist .= '<option value="0">'.$lang->get('root').'</option>';
112 112
 }
113 113
 foreach ($tst as $t) {
114 114
     if (
115 115
         in_array($t->id, $session->get('user-accessible_folders')) === true
116 116
         && in_array($t->id, $session->get('user-personal_visible_folders')) === false
117 117
     ) {
118
-        $droplist .= '<option value="' . $t->id . '">' . addslashes($t->title);
118
+        $droplist .= '<option value="'.$t->id.'">'.addslashes($t->title);
119 119
         $text = '';
120 120
         foreach ($tree->getPath($t->id, false) as $fld) {
121
-            $text .= empty($text) === true ? '     [' . $fld->title : ' > ' . $fld->title;
121
+            $text .= empty($text) === true ? '     ['.$fld->title : ' > '.$fld->title;
122 122
         }
123
-        $droplist .= (empty($text) === true ? '' : $text . '</i>]') . '</option>';
123
+        $droplist .= (empty($text) === true ? '' : $text.'</i>]').'</option>';
124 124
     }
125 125
 }
126 126
 
@@ -199,14 +199,14 @@  discard block
 block discarded – undo
199 199
                                     <label><?php echo $lang->get('icon'); ?></label>
200 200
                                     <input type="text" class="form-control form-folder-control purify" id="new-folder-add-icon" data-field="icon">
201 201
                                     <small class='form-text text-muted'>
202
-                                        <?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>
202
+                                        <?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>
203 203
                                     </small>
204 204
                                 </div>
205 205
                                 <div class="form-group">
206 206
                                     <label><?php echo $lang->get('icon_on_selection'); ?></label>
207 207
                                     <input type="text" class="form-control form-folder-control purify" id="new-folder-add-icon-selected" data-field="iconSelected">
208 208
                                     <small class='form-text text-muted'>
209
-                                        <?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>
209
+                                        <?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>
210 210
                                     </small>
211 211
                                 </div>
212 212
                                 <div class="form-group">
@@ -297,7 +297,7 @@  discard block
 block discarded – undo
297 297
                                 <th scope="col" min-width="200px"><?php echo $lang->get('group'); ?></th>
298 298
                                 <th scope="col" min-width="200px"><?php echo $lang->get('group_parent'); ?></th>
299 299
                                 <th scope="col" width="50px"><i class="fas fa-gavel fa-lg infotip" title="<?php echo $lang->get('password_strength'); ?>"></i></th>
300
-                                <th scope="col" width="50px"><i class="fas fa-recycle fa-lg infotip" title="<?php echo $lang->get('group_pw_duration') . ' ' . $lang->get('group_pw_duration_tip'); ?>"></i></th>
300
+                                <th scope="col" width="50px"><i class="fas fa-recycle fa-lg infotip" title="<?php echo $lang->get('group_pw_duration').' '.$lang->get('group_pw_duration_tip'); ?>"></i></th>
301 301
                                 <th scope="col" width="50px"><i class="fas fa-pen fa-lg infotip" title="<?php echo $lang->get('auth_creation_without_complexity'); ?>"></i></th>
302 302
                                 <th scope="col" width="50px"><i class="fas fa-edit fa-lg infotip" title="<?php echo $lang->get('auth_modification_without_complexity'); ?>"></i></th>
303 303
                                 <th scope="col" width="50px"><i class="fas fa-folder fa-lg infotip" title="<?php echo $lang->get('icon'); ?>"></i></th>
Please login to merge, or discard this patch.
pages/users.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
 if ($checkUserAccess->checkSession() === false || $checkUserAccess->userAccessPage('users') === false) {
63 63
     // Not allowed page
64 64
     $session->set('system-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
 
@@ -85,24 +85,24 @@  discard block
 block discarded – undo
85 85
 // If administrator then all roles are shown
86 86
 // else only the Roles the users is associated to.
87 87
 if ((int) $session->get('user-admin') === 1) {
88
-    $optionsManagedBy .= '<option value="0">' . $lang->get('administrators_only') . '</option>';
88
+    $optionsManagedBy .= '<option value="0">'.$lang->get('administrators_only').'</option>';
89 89
 }
90 90
 
91 91
 $rows = DB::query(
92 92
     'SELECT id, title, creator_id
93
-    FROM ' . prefixTable('roles_title') . '
93
+    FROM ' . prefixTable('roles_title').'
94 94
     ORDER BY title ASC'
95 95
 );
96 96
 foreach ($rows as $record) {
97 97
     if ((int) $session->get('user-admin') === 1 || in_array($record['id'], $session->get('user-roles_array')) === true) {
98
-        $optionsManagedBy .= '<option value="' . $record['id'] . '">' . $lang->get('managers_of') . ' ' . addslashes($record['title']) . '</option>';
98
+        $optionsManagedBy .= '<option value="'.$record['id'].'">'.$lang->get('managers_of').' '.addslashes($record['title']).'</option>';
99 99
     }
100 100
     if (
101 101
         (int) $session->get('user-admin') === 1
102 102
         || (((int) $session->get('user-manager') === 1 || (int) $session->get('user-can_manage_all_users') === 1)
103 103
             && (in_array($record['id'], $userRoles) === true) || (int) $record['creator_id'] === (int) $session->get('user-id'))
104 104
     ) {
105
-        $optionsRoles .= '<option value="' . $record['id'] . '">' . addslashes($record['title']) . '</option>';
105
+        $optionsRoles .= '<option value="'.$record['id'].'">'.addslashes($record['title']).'</option>';
106 106
     }
107 107
 }
108 108
 
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
         for ($y = 1; $y < $t->nlevel; ++$y) {
118 118
             $ident .= '&nbsp;&nbsp;';
119 119
         }
120
-        $foldersList .= '<option value="' . $t->id . '">' . $ident . htmlspecialchars($t->title, ENT_COMPAT, 'UTF-8') . '</option>';
120
+        $foldersList .= '<option value="'.$t->id.'">'.$ident.htmlspecialchars($t->title, ENT_COMPAT, 'UTF-8').'</option>';
121 121
     }
122 122
 }
123 123
 
@@ -154,7 +154,7 @@  discard block
 block discarded – undo
154 154
                         </button><?php
155 155
                                     echo isset($SETTINGS['ldap_mode']) === true && (int) $SETTINGS['ldap_mode'] === 1 && (int) $session->get('user-admin') === 1 ?
156 156
                                         '<button type="button" class="btn btn-primary btn-sm tp-action mr-2" data-action="ldap-sync">
157
-                            <i class="fa-solid fa-address-card mr-2"></i>' . $lang->get('ldap_synchronization') . '
157
+                            <i class="fa-solid fa-address-card mr-2"></i>' . $lang->get('ldap_synchronization').'
158 158
                         </button>' : '';
159 159
                                     ?>
160 160
                     </h3>
@@ -226,7 +226,7 @@  discard block
 block discarded – undo
226 226
                                             <?php
227 227
                                             foreach (TP_PW_COMPLEXITY as $entry) {
228 228
                                                 echo '
229
-                                            <option value="' . $entry[0] . '">' . addslashes($entry[1]) . '</option>';
229
+                                            <option value="' . $entry[0].'">'.addslashes($entry[1]).'</option>';
230 230
                                             }
231 231
                                             ?>
232 232
                                         </select>
Please login to merge, or discard this patch.
pages/2fa.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
 if ($checkUserAccess->checkSession() === false || $checkUserAccess->userAccessPage('mfa') === 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
 
@@ -141,7 +141,7 @@  discard block
 block discarded – undo
141 141
                                     );
142 142
                                     foreach ($roles as $role) {
143 143
                                         echo '
144
-                                    <option value="' . $role['id'] . '"', in_array($role['id'], $arrRolesMFA) === true ? ' selected' : '', '>' . addslashes($role['title']) . '</option>';
144
+                                    <option value="' . $role['id'].'"', in_array($role['id'], $arrRolesMFA) === true ? ' selected' : '', '>'.addslashes($role['title']).'</option>';
145 145
                                     }
146 146
                                     ?>
147 147
                                 </select>
Please login to merge, or discard this patch.
pages/import.js.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
 if ($checkUserAccess->checkSession() === false || $checkUserAccess->userAccessPage('import') === 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
 ?>
@@ -702,7 +702,7 @@  discard block
 block discarded – undo
702 702
                                     // Isolate first item
703 703
                                     if (itemsList.length > 0) {
704 704
                                         $('#import-feedback-progress-text')
705
-                                            .html('<i class="fas fa-cog fa-spin ml-4 mr-2"></i><?php echo $lang->get('operation_progress');?> ('+((counter*100)/itemsNumber).toFixed(2)+'%) - <i>'+itemsList[0].Title + '</i>');
705
+                                            .html('<i class="fas fa-cog fa-spin ml-4 mr-2"></i><?php echo $lang->get('operation_progress'); ?> ('+((counter*100)/itemsNumber).toFixed(2)+'%) - <i>'+itemsList[0].Title + '</i>');
706 706
 
707 707
                                         data = {
708 708
                                             'edit-all': $('#import-keepass-edit-all-checkbox').prop('checked') === true ? 1 : 0,
Please login to merge, or discard this patch.
pages/items.php 1 patch
Spacing   +34 added lines, -34 removed lines patch added patch discarded remove patch
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
     error_log('DEBUG: En ERREUR /!\\');
64 64
     // Not allowed page
65 65
     $session->set('system-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
 // Define Timezone
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
 
85 85
 // Get list of users
86 86
 $usersList = [];
87
-$rows = DB::query('SELECT id,login,email FROM ' . prefixTable('users') . ' ORDER BY login ASC');
87
+$rows = DB::query('SELECT id,login,email FROM '.prefixTable('users').' ORDER BY login ASC');
88 88
 foreach ($rows as $record) {
89 89
     $usersList[$record['login']] = [
90 90
         'id' => $record['id'],
@@ -95,16 +95,16 @@  discard block
 block discarded – undo
95 95
 // Get list of roles
96 96
 $arrRoles = [];
97 97
 $listRoles = '';
98
-$rows = DB::query('SELECT id,title FROM ' . prefixTable('roles_title') . ' ORDER BY title ASC');
98
+$rows = DB::query('SELECT id,title FROM '.prefixTable('roles_title').' ORDER BY title ASC');
99 99
 foreach ($rows as $reccord) {
100 100
     $arrRoles[$reccord['title']] = [
101 101
         'id' => $reccord['id'],
102 102
         'title' => $reccord['title'],
103 103
     ];
104 104
     if (empty($listRoles)) {
105
-        $listRoles = $reccord['id'] . '#' . $reccord['title'];
105
+        $listRoles = $reccord['id'].'#'.$reccord['title'];
106 106
     } else {
107
-        $listRoles .= ';' . $reccord['id'] . '#' . $reccord['title'];
107
+        $listRoles .= ';'.$reccord['id'].'#'.$reccord['title'];
108 108
     }
109 109
 }
110 110
 
@@ -179,7 +179,7 @@  discard block
 block discarded – undo
179 179
                         <li class="nav-item"><a class="nav-link" href="#tab_3" data-toggle="tab"><i class="fa-solid fa-archive mr-2"></i><?php echo $lang->get('attachments'); ?></a></li>
180 180
                         <?php
181 181
                         echo isset($SETTINGS['item_extra_fields']) === true && (int) $SETTINGS['item_extra_fields'] === 1 ? '
182
-                            <li class="nav-item"><a class="nav-link" href="#tab_4" data-toggle="tab"><i class="fa-solid fa-cubes mr-2"></i>' . $lang->get('fields') . '</a></li>' : '';
182
+                            <li class="nav-item"><a class="nav-link" href="#tab_4" data-toggle="tab"><i class="fa-solid fa-cubes mr-2"></i>' . $lang->get('fields').'</a></li>' : '';
183 183
                         ?>
184 184
                     </ul>
185 185
                 </div><!-- /.card-header -->
@@ -248,7 +248,7 @@  discard block
 block discarded – undo
248 248
                                                 <?php
249 249
                                                 for ($i = 4; $i <= $SETTINGS['pwd_maximum_length']; ++$i) {
250 250
                                                     echo '
251
-                                                <option>' . $i . '</option>';
251
+                                                <option>' . $i.'</option>';
252 252
                                                 }
253 253
                                                 ?>
254 254
                                             </select>
@@ -278,7 +278,7 @@  discard block
 block discarded – undo
278 278
                                     <span class="ml-2 col-md-1 clear-me-html" id="form-item-icon-show"></span>
279 279
                                 </div>
280 280
                                 <small class='form-text text-muted'>
281
-                                    <?php echo $lang->get('fontawesome_icon_tip'); ?><a href="<?php echo FONTAWESOME_URL;?>" target="_blank"><i class="fa-solid fa-external-link-alt ml-1"></i></a>
281
+                                    <?php echo $lang->get('fontawesome_icon_tip'); ?><a href="<?php echo FONTAWESOME_URL; ?>" target="_blank"><i class="fa-solid fa-external-link-alt ml-1"></i></a>
282 282
                                 </small>
283 283
                             </div>
284 284
 
@@ -467,38 +467,38 @@  discard block
 block discarded – undo
467 467
                             <div class="tab-pane" id="tab_4">
468 468
                                 <div id="form-item-field" class="hidden">
469 469
                                     <?php
470
-                                        $session_item_fields = $session->get('system-item_fields');//print_r($session_item_fields);
470
+                                        $session_item_fields = $session->get('system-item_fields'); //print_r($session_item_fields);
471 471
                                         if (isset($session_item_fields) === true) {
472 472
                                             foreach ($session_item_fields as $category) {print_r($category);
473 473
                                                 echo '
474
-                                            <div class="callout callout-info form-item-category hidden" id="form-item-category-' . $category['id'] . '">
475
-                                                <h5>' . $category['title'] . '</h5>
474
+                                            <div class="callout callout-info form-item-category hidden" id="form-item-category-' . $category['id'].'">
475
+                                                <h5>' . $category['title'].'</h5>
476 476
                                                 <p>';
477 477
                                                 foreach ($category['fields'] as $field) {
478 478
                                                     if ($field['type'] === 'textarea') {
479 479
                                                         echo '
480
-                                                    <div class="form-group mb-3 form-item-field" id="form-item-field-' . $field['id'] . '" data-field-id="' . $field['id'] . '">
480
+                                                    <div class="form-group mb-3 form-item-field" id="form-item-field-' . $field['id'].'" data-field-id="'.$field['id'].'">
481 481
                                                         <label>' . $field['title'],
482 482
                                                             $field['is_mandatory'] === '1' ?
483
-                                                                '<span class="fa-solid fa-fire text-danger ml-1 infotip" title="' . $lang->get('is_mandatory') . '"></span>' : '',
483
+                                                                '<span class="fa-solid fa-fire text-danger ml-1 infotip" title="'.$lang->get('is_mandatory').'"></span>' : '',
484 484
                                                             '</label>
485
-                                                        <textarea class="form-control form-item-control form-item-field-custom" rows="2" data-field-name="' . $field['id'] . '" data-field-mandatory="' . $field['is_mandatory'] . '" data-field-regex="' . $field['regex'] . '" data-change-ongoing="0"></textarea>
485
+                                                        <textarea class="form-control form-item-control form-item-field-custom" rows="2" data-field-name="' . $field['id'].'" data-field-mandatory="'.$field['is_mandatory'].'" data-field-regex="'.$field['regex'].'" data-change-ongoing="0"></textarea>
486 486
                                                     </div>';
487 487
                                                     } else {
488 488
                                                         echo '
489
-                                                    <div class="input-group mb-3 form-item-field" id="form-item-field-' . $field['id'] . '" data-field-id="' . $field['id'] . '">
489
+                                                    <div class="input-group mb-3 form-item-field" id="form-item-field-' . $field['id'].'" data-field-id="'.$field['id'].'">
490 490
                                                         <div class="input-group-prepend">
491 491
                                                             <span class="input-group-text">' . $field['title'],
492 492
                                                             $field['is_mandatory'] === '1' ?
493
-                                                                '<span class="fa-solid fa-fire text-danger ml-1 infotip" title="' . $lang->get('is_mandatory') . '"></span>' : '',
493
+                                                                '<span class="fa-solid fa-fire text-danger ml-1 infotip" title="'.$lang->get('is_mandatory').'"></span>' : '',
494 494
                                                             '</span>
495 495
                                                         </div>
496
-                                                        <input type="' . $field['type'] . '" class="form-control form-item-control form-item-field-custom" data-field-name="' . $field['id'] . '" data-field-mandatory="' . $field['is_mandatory'] . '" data-field-regex="' . $field['regex'] . '" data-change-ongoing="0">
496
+                                                        <input type="' . $field['type'].'" class="form-control form-item-control form-item-field-custom" data-field-name="'.$field['id'].'" data-field-mandatory="'.$field['is_mandatory'].'" data-field-regex="'.$field['regex'].'" data-change-ongoing="0">
497 497
                                                     </div>';
498 498
                                                     }
499 499
                                                     if (!empty($field['regex'])) {
500 500
                                                         echo '
501
-                                                    <div>Regex: '. $field['regex'] .'</div>
501
+                                                    <div>Regex: '. $field['regex'].'</div>
502 502
                                                         ';
503 503
                                                     }
504 504
                                                 }
@@ -509,8 +509,8 @@  discard block
 block discarded – undo
509 509
                                                 ) {
510 510
                                                     echo '
511 511
                                                     <div class="form-check icheck-blue">
512
-                                                        <input type="checkbox" class="form-check-input form-check-input-template form-item-control flat-blue" data-category-id="' . $category['id'] . '" data-change-ongoing="0" data-field-name="template" id="template_' . $category['id'] . '">
513
-                                                        <label class="form-check-label ml-3" for="template_' . $category['id'] . '">' . $lang->get('main_template') . '</label>
512
+                                                        <input type="checkbox" class="form-check-input form-check-input-template form-item-control flat-blue" data-category-id="' . $category['id'].'" data-change-ongoing="0" data-field-name="template" id="template_'.$category['id'].'">
513
+                                                        <label class="form-check-label ml-3" for="template_' . $category['id'].'">'.$lang->get('main_template').'</label>
514 514
                                                     </div>';
515 515
                                                 }
516 516
                                                 echo '
@@ -520,8 +520,8 @@  discard block
 block discarded – undo
520 520
                                         } else {
521 521
                                             echo
522 522
                                             '<div class="alert alert-info">
523
-                                                <h5><i class="icon fa fa-info mr-3"></i>' . $lang->get('information') . '</h5>
524
-                                                ' . $lang->get('no_fields') . '
523
+                                                <h5><i class="icon fa fa-info mr-3"></i>' . $lang->get('information').'</h5>
524
+                                                ' . $lang->get('no_fields').'
525 525
                                             </div>';
526 526
                                         } ?>
527 527
                                 </div>
@@ -714,18 +714,18 @@  discard block
 block discarded – undo
714 714
                         <?php
715 715
                             foreach ($session_item_fields as $elem) {
716 716
                                 echo '
717
-                        <div class="callout callout-info card-item-category hidden" id="card-item-category-' . $elem['id'] . '">
718
-                            <h5>' . $elem['title'] . '</h5>
717
+                        <div class="callout callout-info card-item-category hidden" id="card-item-category-' . $elem['id'].'">
718
+                            <h5>' . $elem['title'].'</h5>
719 719
                             <p>
720 720
                                 <ul class="list-group list-group-unbordered mb-3">';
721 721
                                 foreach ($elem['fields'] as $field) {
722 722
                                     echo '
723
-                                    <li class="list-group-item card-item-field hidden" id="card-item-field-' . $field['id'] . '">
724
-                                        <span id="card-item-field-title-' . $field['id'] . '"><b>' . $field['title'] . '</b></span>
725
-                                        <button type="button" class="float-right btn btn-outline-info btn-sm ml-1 btn-copy-clipboard-clear"  data-clipboard-target="#card-item-field-value-' . $field['id'] . '">
723
+                                    <li class="list-group-item card-item-field hidden" id="card-item-field-' . $field['id'].'">
724
+                                        <span id="card-item-field-title-' . $field['id'].'"><b>'.$field['title'].'</b></span>
725
+                                        <button type="button" class="float-right btn btn-outline-info btn-sm ml-1 btn-copy-clipboard-clear"  data-clipboard-target="#card-item-field-value-' . $field['id'].'">
726 726
                                             <i class="fa-solid fa-copy"></i>
727 727
                                         </button>
728
-                                        <span class="card-item-field-value float-right ml-1" id="card-item-field-value-' . $field['id'] . '"></span>
728
+                                        <span class="card-item-field-value float-right ml-1" id="card-item-field-value-' . $field['id'].'"></span>
729 729
                                     </li>';
730 730
                                 }
731 731
                                 echo '
@@ -1112,7 +1112,7 @@  discard block
 block discarded – undo
1112 1112
                         <p><?php
1113 1113
                             echo str_replace(
1114 1114
         ['##otv_expiration_period##', '. '],
1115
-        ['<span class="text-bold text-primary">' . $SETTINGS['otv_expiration_period'] . '</span>', '<br>'],
1115
+        ['<span class="text-bold text-primary">'.$SETTINGS['otv_expiration_period'].'</span>', '<br>'],
1116 1116
         $lang->get('otv_message')
1117 1117
     );
1118 1118
                             ?></p>
@@ -1130,9 +1130,9 @@  discard block
 block discarded – undo
1130 1130
 
1131 1131
                     <div class="row">
1132 1132
                         <div class="form-group col-4">
1133
-                            <label for="form-item-otv-days"><i class="fa-regular fa-calendar-days mr-2"></i><?php echo $lang->get('number_of_days'); ?> (<?php echo $lang->get('maximum').': '.$SETTINGS['otv_expiration_period'];?>)</label>
1133
+                            <label for="form-item-otv-days"><i class="fa-regular fa-calendar-days mr-2"></i><?php echo $lang->get('number_of_days'); ?> (<?php echo $lang->get('maximum').': '.$SETTINGS['otv_expiration_period']; ?>)</label>
1134 1134
                             <div class="input-group mb-3">
1135
-                                <input type="number" class="form-control clear-me-val" id="form-item-otv-days" min="0" max="<?php echo $SETTINGS['otv_expiration_period'];?>" value="<?php echo $SETTINGS['otv_expiration_period'];?>">
1135
+                                <input type="number" class="form-control clear-me-val" id="form-item-otv-days" min="0" max="<?php echo $SETTINGS['otv_expiration_period']; ?>" value="<?php echo $SETTINGS['otv_expiration_period']; ?>">
1136 1136
                             </div>
1137 1137
                         </div>
1138 1138
 
@@ -1220,7 +1220,7 @@  discard block
 block discarded – undo
1220 1220
                             <select class="form-control form-folder-control select2" style="width:100%;" id="form-folder-add-complexicity" required>
1221 1221
                                 <?php
1222 1222
                                 foreach (TP_PW_COMPLEXITY as $key => $value) {
1223
-                                    echo '<option value="' . $key . '">' . $value[1] . '</option>';
1223
+                                    echo '<option value="'.$key.'">'.$value[1].'</option>';
1224 1224
                                 }
1225 1225
                                 ?>
1226 1226
                             </select>
@@ -1238,14 +1238,14 @@  discard block
 block discarded – undo
1238 1238
                             <label><?php echo $lang->get('icon'); ?></label>
1239 1239
                             <input type="text" class="form-control form-folder-control" id="form-folder-add-icon">
1240 1240
                             <small class='form-text text-muted'>
1241
-                                <?php echo $lang->get('fontawesome_icon_tip'); ?><a href="<?php echo FONTAWESOME_URL;?>" target="_blank"><i class="fa-solid fa-external-link-alt ml-1"></i></a>
1241
+                                <?php echo $lang->get('fontawesome_icon_tip'); ?><a href="<?php echo FONTAWESOME_URL; ?>" target="_blank"><i class="fa-solid fa-external-link-alt ml-1"></i></a>
1242 1242
                             </small>
1243 1243
                         </div>
1244 1244
                         <div class="form-group">
1245 1245
                             <label><?php echo $lang->get('icon_on_selection'); ?></label>
1246 1246
                             <input type="text" class="form-control form-folder-control" id="form-folder-add-icon-selected">
1247 1247
                             <small class='form-text text-muted'>
1248
-                                <?php echo $lang->get('fontawesome_icon_tip'); ?><a href="<?php echo FONTAWESOME_URL;?>" target="_blank"><i class="fa-solid fa-external-link-alt ml-1"></i></a>
1248
+                                <?php echo $lang->get('fontawesome_icon_tip'); ?><a href="<?php echo FONTAWESOME_URL; ?>" target="_blank"><i class="fa-solid fa-external-link-alt ml-1"></i></a>
1249 1249
                             </small>
1250 1250
                         </div>
1251 1251
                     </div>
Please login to merge, or discard this patch.
pages/users.js.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
 if ($checkUserAccess->checkSession() === false || $checkUserAccess->userAccessPage('users') === false) {
71 71
     // Not allowed page
72 72
     $session->set('system-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
 ?>
@@ -302,8 +302,8 @@  discard block
 block discarded – undo
302 302
         if (store.get('teampassApplication').formUserAction === "add_new_user") {
303 303
             var data = {
304 304
                 'receipt': $('#form-email').val(),
305
-                'subject': 'TEAMPASS - <?php echo $lang->get('temporary_encryption_code');?>',
306
-                'body': '<?php echo $lang->get('email_body_new_user');?>',
305
+                'subject': 'TEAMPASS - <?php echo $lang->get('temporary_encryption_code'); ?>',
306
+                'body': '<?php echo $lang->get('email_body_new_user'); ?>',
307 307
                 'pre_replace' : {
308 308
                     '#code#' : store.get('teampassUser').admin_new_user_temporary_encryption_code,
309 309
                     '#login#' : store.get('teampassUser').admin_new_user_login,
@@ -313,8 +313,8 @@  discard block
 block discarded – undo
313 313
         } else {
314 314
             var data = {
315 315
                 'receipt': $('#form-email').val(),
316
-                'subject': 'TEAMPASS - <?php echo $lang->get('temporary_encryption_code');?>',
317
-                'body': '<?php echo $lang->get('email_body_temporary_encryption_code');?>',
316
+                'subject': 'TEAMPASS - <?php echo $lang->get('temporary_encryption_code'); ?>',
317
+                'body': '<?php echo $lang->get('email_body_temporary_encryption_code'); ?>',
318 318
                 'pre_replace' : {
319 319
                     '#enc_code#' : store.get('teampassUser').admin_new_user_temporary_encryption_code,
320 320
                 }
@@ -567,14 +567,14 @@  discard block
 block discarded – undo
567 567
             }
568 568
             // Inform user
569 569
             $("#warningModalBody").html('<b><?php echo $lang->get('encryption_keys'); ?> - ' +
570
-                stepText + '</b> [' + start + ' - ' + (parseInt(start) + <?php echo NUMBER_ITEMS_IN_BATCH;?>) + ']<span id="warningModalBody_extra">' + $nbItemsToConvert + '</span> ' +
570
+                stepText + '</b> [' + start + ' - ' + (parseInt(start) + <?php echo NUMBER_ITEMS_IN_BATCH; ?>) + ']<span id="warningModalBody_extra">' + $nbItemsToConvert + '</span> ' +
571 571
                 '... <?php echo $lang->get('please_wait'); ?><i class="fas fa-spinner fa-pulse ml-3 text-primary"></i>');
572 572
 
573 573
             // If expected, show the OPT to the admin
574 574
             if (constVisibleOTP === true) {
575 575
                 toastr.info(
576
-                    '<?php echo $lang->get('show_encryption_code_to_admin');?> <div><input class="form-control form-item-control flex-nowrap" value="' + userTemporaryCode + '" readonly></div>'
577
-                    + '<br /><button type="button" class="btn clear"><?php echo $lang->get('close');?></button>',
576
+                    '<?php echo $lang->get('show_encryption_code_to_admin'); ?> <div><input class="form-control form-item-control flex-nowrap" value="' + userTemporaryCode + '" readonly></div>'
577
+                    + '<br /><button type="button" class="btn clear"><?php echo $lang->get('close'); ?></button>',
578 578
                     '<?php echo $lang->get('information'); ?>',
579 579
                     {
580 580
                         extendedTimeOut: 0,
@@ -593,7 +593,7 @@  discard block
 block discarded – undo
593 593
             var data = {
594 594
                 action: step,
595 595
                 start: start,
596
-                length: <?php echo NUMBER_ITEMS_IN_BATCH;?>,
596
+                length: <?php echo NUMBER_ITEMS_IN_BATCH; ?>,
597 597
                 user_id: userId,
598 598
             }
599 599
             if (debugJavascript === true) {
@@ -1401,7 +1401,7 @@  discard block
 block discarded – undo
1401 1401
                         } else {
1402 1402
                             // Show icon or not
1403 1403
                             if ($('#user-disabled').prop('checked') === true) {
1404
-                                $('#user-login-'+userID).before('<i class="fas fa-user-slash infotip text-danger mr-2" title="<?php echo $lang->get('account_is_locked');?>" id="user-disable-'+userID+'"></i>');
1404
+                                $('#user-login-'+userID).before('<i class="fas fa-user-slash infotip text-danger mr-2" title="<?php echo $lang->get('account_is_locked'); ?>" id="user-disable-'+userID+'"></i>');
1405 1405
                             } else {
1406 1406
                                 $('#user-disable-'+userID).remove();
1407 1407
                             }
Please login to merge, or discard this patch.
pages/admin.js.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
 if ($checkUserAccess->checkSession() === false || $checkUserAccess->userAccessPage('admin') === 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
 
@@ -145,7 +145,7 @@  discard block
 block discarded – undo
145 145
                     // error
146 146
                     toastr.remove();
147 147
                     toastr.error(
148
-                        '<?php echo $lang->get('server_answer_error') . '<br />' . $lang->get('server_returned_data') . ':<br />'; ?>' + data.error,
148
+                        '<?php echo $lang->get('server_answer_error').'<br />'.$lang->get('server_returned_data').':<br />'; ?>' + data.error,
149 149
                         '', {
150 150
                             closeButton: true,
151 151
                             positionClass: 'toastr-top-right'
@@ -219,7 +219,7 @@  discard block
 block discarded – undo
219 219
                     // error
220 220
                     toastr.remove();
221 221
                     toastr.error(
222
-                        '<?php echo $lang->get('server_answer_error') . '<br />' . $lang->get('server_returned_data') . ':<br />'; ?>' + data.error,
222
+                        '<?php echo $lang->get('server_answer_error').'<br />'.$lang->get('server_returned_data').':<br />'; ?>' + data.error,
223 223
                         '', {
224 224
                             closeButton: true,
225 225
                             positionClass: 'toastr-top-right'
Please login to merge, or discard this patch.