|
@@ -91,34 +91,34 @@ discard block |
|
|
block discarded – undo |
91
|
91
|
require_once $SETTINGS['cpassman_dir'].'/sources/core.php'; |
92
|
92
|
|
93
|
93
|
// Prepare POST variables |
94
|
|
-$post_language = filter_input(INPUT_POST, 'language', FILTER_SANITIZE_STRING); |
95
|
|
-$post_sig_response = filter_input(INPUT_POST, 'sig_response', FILTER_SANITIZE_STRING); |
96
|
|
-$post_duo_login = filter_input(INPUT_POST, 'duo_login', FILTER_SANITIZE_STRING); |
97
|
|
-$post_duo_data = filter_input(INPUT_POST, 'duo_data', FILTER_SANITIZE_STRING); |
98
|
|
-$post_login = filter_input(INPUT_POST, 'login', FILTER_SANITIZE_STRING); |
99
|
|
-$post_pw = filter_input(INPUT_POST, 'pw', FILTER_SANITIZE_STRING); |
|
94
|
+$post_language = filter_input(INPUT_POST, 'language', FILTER_SANITIZE_STRING); |
|
95
|
+$post_sig_response = filter_input(INPUT_POST, 'sig_response', FILTER_SANITIZE_STRING); |
|
96
|
+$post_duo_login = filter_input(INPUT_POST, 'duo_login', FILTER_SANITIZE_STRING); |
|
97
|
+$post_duo_data = filter_input(INPUT_POST, 'duo_data', FILTER_SANITIZE_STRING); |
|
98
|
+$post_login = filter_input(INPUT_POST, 'login', FILTER_SANITIZE_STRING); |
|
99
|
+$post_pw = filter_input(INPUT_POST, 'pw', FILTER_SANITIZE_STRING); |
100
|
100
|
|
101
|
101
|
// Prepare superGlobal variables |
102
|
|
-$session_user_language = $superGlobal->get("user_language", "SESSION"); |
103
|
|
-$session_user_id = $superGlobal->get("user_id", "SESSION"); |
104
|
|
-$session_user_flag = $superGlobal->get("user_language_flag", "SESSION"); |
105
|
|
-$session_user_admin = $superGlobal->get("user_admin", "SESSION"); |
|
102
|
+$session_user_language = $superGlobal->get("user_language", "SESSION"); |
|
103
|
+$session_user_id = $superGlobal->get("user_id", "SESSION"); |
|
104
|
+$session_user_flag = $superGlobal->get("user_language_flag", "SESSION"); |
|
105
|
+$session_user_admin = $superGlobal->get("user_admin", "SESSION"); |
106
|
106
|
$session_user_human_resources = $superGlobal->get("user_can_manage_all_users", "SESSION"); |
107
|
|
-$session_user_avatar_thumb = $superGlobal->get("user_avatar_thumb", "SESSION"); |
108
|
|
-$session_name = $superGlobal->get("name", "SESSION"); |
109
|
|
-$session_lastname = $superGlobal->get("lastname", "SESSION"); |
110
|
|
-$session_user_manager = $superGlobal->get("user_manager", "SESSION"); |
111
|
|
-$session_user_read_only = $superGlobal->get("user_read_only", "SESSION"); |
112
|
|
-$session_is_admin = $superGlobal->get("is_admin", "SESSION"); |
113
|
|
-$session_login = $superGlobal->get("login", "SESSION"); |
114
|
|
-$session_validite_pw = $superGlobal->get("validite_pw", "SESSION"); |
115
|
|
-$session_nb_folders = $superGlobal->get("nb_folders", "SESSION"); |
116
|
|
-$session_nb_roles = $superGlobal->get("nb_roles", "SESSION"); |
117
|
|
-$session_autoriser = $superGlobal->get("autoriser", "SESSION"); |
118
|
|
-$session_hide_maintenance = $superGlobal->get("hide_maintenance", "SESSION"); |
119
|
|
-$session_initial_url = $superGlobal->get("initial_url", "SESSION"); |
120
|
|
-$server_request_uri = $superGlobal->get("REQUEST_URI", "SERVER"); |
121
|
|
-$session_nb_users_online = $superGlobal->get("nb_users_online", "SESSION"); |
|
107
|
+$session_user_avatar_thumb = $superGlobal->get("user_avatar_thumb", "SESSION"); |
|
108
|
+$session_name = $superGlobal->get("name", "SESSION"); |
|
109
|
+$session_lastname = $superGlobal->get("lastname", "SESSION"); |
|
110
|
+$session_user_manager = $superGlobal->get("user_manager", "SESSION"); |
|
111
|
+$session_user_read_only = $superGlobal->get("user_read_only", "SESSION"); |
|
112
|
+$session_is_admin = $superGlobal->get("is_admin", "SESSION"); |
|
113
|
+$session_login = $superGlobal->get("login", "SESSION"); |
|
114
|
+$session_validite_pw = $superGlobal->get("validite_pw", "SESSION"); |
|
115
|
+$session_nb_folders = $superGlobal->get("nb_folders", "SESSION"); |
|
116
|
+$session_nb_roles = $superGlobal->get("nb_roles", "SESSION"); |
|
117
|
+$session_autoriser = $superGlobal->get("autoriser", "SESSION"); |
|
118
|
+$session_hide_maintenance = $superGlobal->get("hide_maintenance", "SESSION"); |
|
119
|
+$session_initial_url = $superGlobal->get("initial_url", "SESSION"); |
|
120
|
+$server_request_uri = $superGlobal->get("REQUEST_URI", "SERVER"); |
|
121
|
+$session_nb_users_online = $superGlobal->get("nb_users_online", "SESSION"); |
122
|
122
|
|
123
|
123
|
|
124
|
124
|
/* DEFINE WHAT LANGUAGE TO USE */ |
|
@@ -239,10 +239,7 @@ discard block |
|
|
block discarded – undo |
239
|
239
|
<div style="float:right; margin:-10px 5px 0 0; color:#FFF;">' |
240
|
240
|
.$LANG['index_welcome'].' <b>'.$session_name.' '.$session_lastname |
241
|
241
|
.' ['.$session_login.']</b> - ' |
242
|
|
- , $session_user_admin === '1' ? $LANG['god'] : |
243
|
|
- ($session_user_manager === '1' ? $LANG['gestionnaire'] : |
244
|
|
- ($session_user_read_only === '1' ? $LANG['read_only_account'] : |
245
|
|
- ($session_user_human_resources === '1' ? $LANG['human_resources'] :$LANG['user']) |
|
242
|
+ , $session_user_admin === '1' ? $LANG['god'] : ($session_user_manager === '1' ? $LANG['gestionnaire'] : ($session_user_read_only === '1' ? $LANG['read_only_account'] : ($session_user_human_resources === '1' ? $LANG['human_resources'] : $LANG['user']) |
246
|
243
|
) |
247
|
244
|
), ' '.strtolower($LANG['index_login']).'</div>'; |
248
|
245
|
|
|
@@ -709,7 +706,7 @@ discard block |
|
|
block discarded – undo |
709
|
706
|
echo ' |
710
|
707
|
<div style="margin-bottom:3px;"> |
711
|
708
|
<label for="login" class="form_label">', isset($SETTINGS['custom_login_text']) && !empty($SETTINGS['custom_login_text']) ? (string) $SETTINGS['custom_login_text'] : $LANG['index_login'], '</label> |
712
|
|
- <input type="text" size="10" id="login" name="login" class="input_text text ui-widget-content ui-corner-all" value="' , $username , '" readonly /> |
|
709
|
+ <input type="text" size="10" id="login" name="login" class="input_text text ui-widget-content ui-corner-all" value="' , $username, '" readonly /> |
713
|
710
|
<span id="login_check_wait" style="display:none; float:right;"><i class="fa fa-cog fa-spin fa-1x"></i></span> |
714
|
711
|
</div>'; |
715
|
712
|
} else { |
|
@@ -733,7 +730,7 @@ discard block |
|
|
block discarded – undo |
733
|
730
|
</div>'; |
734
|
731
|
} |
735
|
732
|
|
736
|
|
- if (!(isset($SETTINGS['enable_http_request_login']) === true && $SETTINGS['enable_http_request_login'] === '1' && isset($_SERVER['PHP_AUTH_USER']) === true && !(isset($SETTINGS['maintenance_mode']) === true && $SETTINGS['maintenance_mode'] === '1')) ) { |
|
733
|
+ if (!(isset($SETTINGS['enable_http_request_login']) === true && $SETTINGS['enable_http_request_login'] === '1' && isset($_SERVER['PHP_AUTH_USER']) === true && !(isset($SETTINGS['maintenance_mode']) === true && $SETTINGS['maintenance_mode'] === '1'))) { |
737
|
734
|
echo ' |
738
|
735
|
<div id="connect_pw" style="margin-bottom:3px;"> |
739
|
736
|
<label for="pw" class="form_label" id="user_pwd">'.$LANG['index_password'].'</label> |
|
@@ -788,7 +785,7 @@ discard block |
|
|
block discarded – undo |
788
|
785
|
<script> |
789
|
786
|
var seconds = 3; |
790
|
787
|
function updateLogonButton(timeToGo){ |
791
|
|
- document.getElementById("but_identify_user").value = "' . $LANG['duration_login_attempt'] . ' " + timeToGo; |
|
788
|
+ document.getElementById("but_identify_user").value = "' . $LANG['duration_login_attempt'].' " + timeToGo; |
792
|
789
|
} |
793
|
790
|
$( window ).on( "load", function() { |
794
|
791
|
updateLogonButton(seconds); |
|
@@ -842,7 +839,7 @@ discard block |
|
|
block discarded – undo |
842
|
839
|
<a href="https://www.reddit.com/r/TeamPass/" target="_blank" style="color:#F0F0F0;" class="tip" title="'.addslashes($LANG['admin_help']).'"><i class="fa fa-reddit-alien"></i></a> |
843
|
840
|
|
844
|
841
|
', ($session_user_id !== null && empty($session_user_id) === false) ? ' |
845
|
|
- <a href="#" style="color:#F0F0F0;" class="tip" title="'.addslashes($LANG['bugs_page']).'" onclick="generateBugReport()"><i class="fa fa-bug"></i></a>' : '' ,' |
|
842
|
+ <a href="#" style="color:#F0F0F0;" class="tip" title="'.addslashes($LANG['bugs_page']).'" onclick="generateBugReport()"><i class="fa fa-bug"></i></a>' : '', ' |
846
|
843
|
</div> |
847
|
844
|
<div style="float:left;width:32%;text-align:center;"> |
848
|
845
|
', ($session_user_id !== null && empty($session_user_id) === false) ? '<i class="fa fa-users"></i> '.$session_nb_users_online.' '.$LANG['users_online'].' | <i class="fa fa-hourglass-end"></i> '.$LANG['index_expiration_in'].' <div style="display:inline;" id="countdown"></div>' : '', ' |