@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | $arrQueryStringParams = $this->getQueryStringParams(); |
40 | 40 | |
41 | 41 | if (strtoupper($requestMethod) === 'POST') { |
42 | - require API_ROOT_PATH . "/Model/AuthModel.php"; |
|
42 | + require API_ROOT_PATH."/Model/AuthModel.php"; |
|
43 | 43 | try { |
44 | 44 | $authModel = new AuthModel(); |
45 | 45 | $arrUser = $authModel->getUserAuth( |
@@ -50,7 +50,7 @@ discard block |
||
50 | 50 | if (array_key_exists("token", $arrUser)) { |
51 | 51 | $responseData = json_encode($arrUser); |
52 | 52 | } else { |
53 | - $strErrorDesc = $arrUser['error'] . " (" . $arrUser['info'] . ")"; |
|
53 | + $strErrorDesc = $arrUser['error']." (".$arrUser['info'].")"; |
|
54 | 54 | $strErrorHeader = 'HTTP/1.1 401 Unauthorized'; |
55 | 55 | } |
56 | 56 | } catch (Error $e) { |
@@ -40,7 +40,7 @@ |
||
40 | 40 | "error" => '', |
41 | 41 | ); |
42 | 42 | |
43 | - }catch (Exception $e) { |
|
43 | + } catch (Exception $e) { |
|
44 | 44 | return false; |
45 | 45 | } |
46 | 46 | } |
@@ -65,7 +65,7 @@ |
||
65 | 65 | if ($checkUserAccess->checkSession() === false || $checkUserAccess->userAccessPage('statistics') === 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 |
@@ -66,7 +66,7 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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> |
@@ -65,7 +65,7 @@ discard block |
||
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 |
||
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> |
@@ -70,7 +70,7 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 | } |
@@ -62,7 +62,7 @@ |
||
62 | 62 | if ($checkUserAccess->checkSession() === false || $checkUserAccess->userAccessPage('uploads') === 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 | ?> |
@@ -65,7 +65,7 @@ discard block |
||
65 | 65 | if ($checkUserAccess->checkSession() === false || $checkUserAccess->userAccessPage('emails') === 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 | |
@@ -244,7 +244,7 @@ discard block |
||
244 | 244 | <div class="card-body"> |
245 | 245 | <div id="unsent-emails"> |
246 | 246 | <?php |
247 | - DB::query('SELECT * FROM ' . prefixTable('emails') . ' WHERE status = %s OR status = %s', 'not_sent', ''); |
|
247 | + DB::query('SELECT * FROM '.prefixTable('emails').' WHERE status = %s OR status = %s', 'not_sent', ''); |
|
248 | 248 | echo str_replace('#nb_emails#', (string) DB::count(), $lang->get('email_send_backlog')); |
249 | 249 | ?> |
250 | 250 | </div> |
@@ -67,7 +67,7 @@ |
||
67 | 67 | if ($checkUserAccess->checkSession() === false || $checkUserAccess->userAccessPage('statistics') === false) { |
68 | 68 | // Not allowed page |
69 | 69 | $session->set('system-error_code', ERR_NOT_ALLOWED); |
70 | - include $SETTINGS['cpassman_dir'] . '/error.php'; |
|
70 | + include $SETTINGS['cpassman_dir'].'/error.php'; |
|
71 | 71 | exit; |
72 | 72 | } |
73 | 73 | ?> |