@@ -91,35 +91,35 @@ discard block |
||
| 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_pwd = filter_input(INPUT_POST, 'duo_pwd', FILTER_SANITIZE_STRING); |
|
| 98 | -$post_duo_data = filter_input(INPUT_POST, 'duo_data', FILTER_SANITIZE_STRING); |
|
| 99 | -$post_login = filter_input(INPUT_POST, 'login', FILTER_SANITIZE_STRING); |
|
| 100 | -$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_pwd = filter_input(INPUT_POST, 'duo_pwd', FILTER_SANITIZE_STRING); |
|
| 98 | +$post_duo_data = filter_input(INPUT_POST, 'duo_data', FILTER_SANITIZE_STRING); |
|
| 99 | +$post_login = filter_input(INPUT_POST, 'login', FILTER_SANITIZE_STRING); |
|
| 100 | +$post_pw = filter_input(INPUT_POST, 'pw', FILTER_SANITIZE_STRING); |
|
| 101 | 101 | |
| 102 | 102 | // Prepare superGlobal variables |
| 103 | -$session_user_language = $superGlobal->get("user_language", "SESSION"); |
|
| 104 | -$session_user_id = $superGlobal->get("user_id", "SESSION"); |
|
| 105 | -$session_user_flag = $superGlobal->get("user_language_flag", "SESSION"); |
|
| 106 | -$session_user_admin = $superGlobal->get("user_admin", "SESSION"); |
|
| 103 | +$session_user_language = $superGlobal->get("user_language", "SESSION"); |
|
| 104 | +$session_user_id = $superGlobal->get("user_id", "SESSION"); |
|
| 105 | +$session_user_flag = $superGlobal->get("user_language_flag", "SESSION"); |
|
| 106 | +$session_user_admin = $superGlobal->get("user_admin", "SESSION"); |
|
| 107 | 107 | $session_user_human_resources = $superGlobal->get("user_can_manage_all_users", "SESSION"); |
| 108 | -$session_user_avatar_thumb = $superGlobal->get("user_avatar_thumb", "SESSION"); |
|
| 109 | -$session_name = $superGlobal->get("name", "SESSION"); |
|
| 110 | -$session_lastname = $superGlobal->get("lastname", "SESSION"); |
|
| 111 | -$session_user_manager = $superGlobal->get("user_manager", "SESSION"); |
|
| 112 | -$session_user_read_only = $superGlobal->get("user_read_only", "SESSION"); |
|
| 113 | -$session_is_admin = $superGlobal->get("is_admin", "SESSION"); |
|
| 114 | -$session_login = $superGlobal->get("login", "SESSION"); |
|
| 115 | -$session_validite_pw = $superGlobal->get("validite_pw", "SESSION"); |
|
| 116 | -$session_nb_folders = $superGlobal->get("nb_folders", "SESSION"); |
|
| 117 | -$session_nb_roles = $superGlobal->get("nb_roles", "SESSION"); |
|
| 118 | -$session_autoriser = $superGlobal->get("autoriser", "SESSION"); |
|
| 119 | -$session_hide_maintenance = $superGlobal->get("hide_maintenance", "SESSION"); |
|
| 120 | -$session_initial_url = $superGlobal->get("initial_url", "SESSION"); |
|
| 121 | -$server_request_uri = $superGlobal->get("REQUEST_URI", "SERVER"); |
|
| 122 | -$session_nb_users_online = $superGlobal->get("nb_users_online", "SESSION"); |
|
| 108 | +$session_user_avatar_thumb = $superGlobal->get("user_avatar_thumb", "SESSION"); |
|
| 109 | +$session_name = $superGlobal->get("name", "SESSION"); |
|
| 110 | +$session_lastname = $superGlobal->get("lastname", "SESSION"); |
|
| 111 | +$session_user_manager = $superGlobal->get("user_manager", "SESSION"); |
|
| 112 | +$session_user_read_only = $superGlobal->get("user_read_only", "SESSION"); |
|
| 113 | +$session_is_admin = $superGlobal->get("is_admin", "SESSION"); |
|
| 114 | +$session_login = $superGlobal->get("login", "SESSION"); |
|
| 115 | +$session_validite_pw = $superGlobal->get("validite_pw", "SESSION"); |
|
| 116 | +$session_nb_folders = $superGlobal->get("nb_folders", "SESSION"); |
|
| 117 | +$session_nb_roles = $superGlobal->get("nb_roles", "SESSION"); |
|
| 118 | +$session_autoriser = $superGlobal->get("autoriser", "SESSION"); |
|
| 119 | +$session_hide_maintenance = $superGlobal->get("hide_maintenance", "SESSION"); |
|
| 120 | +$session_initial_url = $superGlobal->get("initial_url", "SESSION"); |
|
| 121 | +$server_request_uri = $superGlobal->get("REQUEST_URI", "SERVER"); |
|
| 122 | +$session_nb_users_online = $superGlobal->get("nb_users_online", "SESSION"); |
|
| 123 | 123 | |
| 124 | 124 | /* DEFINE WHAT LANGUAGE TO USE */ |
| 125 | 125 | if (isset($_GET['language']) === true) { |
@@ -239,10 +239,7 @@ discard block |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 788 | 785 | <script> |
| 789 | 786 | var seconds = 1; |
| 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); |
@@ -845,7 +842,7 @@ discard block |
||
| 845 | 842 | <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> |
| 846 | 843 | |
| 847 | 844 | ', ($session_user_id !== null && empty($session_user_id) === false) ? ' |
| 848 | - <a href="#" style="color:#F0F0F0;" class="tip" title="'.addslashes($LANG['bugs_page']).'" onclick="generateBugReport()"><i class="fa fa-bug"></i></a>' : '' ,' |
|
| 845 | + <a href="#" style="color:#F0F0F0;" class="tip" title="'.addslashes($LANG['bugs_page']).'" onclick="generateBugReport()"><i class="fa fa-bug"></i></a>' : '', ' |
|
| 849 | 846 | </div> |
| 850 | 847 | <div style="float:left;width:32%;text-align:center;"> |
| 851 | 848 | ', ($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>' : '', ' |
@@ -13,7 +13,7 @@ |
||
| 13 | 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
| 14 | 14 | */ |
| 15 | 15 | global $LANG; |
| 16 | -$LANG = array ( |
|
| 16 | +$LANG = array( |
|
| 17 | 17 | 'provide_yubico_identifiers' => 'Please provide your Yubico identifiers', |
| 18 | 18 | 'admin_yubico_authentication_setting' => 'Enable Yubico authentication', |
| 19 | 19 | 'yubico_user_id' => 'Client ID', |
@@ -13,7 +13,7 @@ |
||
| 13 | 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
| 14 | 14 | */ |
| 15 | 15 | global $LANG; |
| 16 | -$LANG = array ( |
|
| 16 | +$LANG = array( |
|
| 17 | 17 | 'provide_yubico_identifiers' => 'Merci de fournir vos identifiants Yubico', |
| 18 | 18 | 'admin_yubico_authentication_setting' => 'Activer la double identification avec Yubico', |
| 19 | 19 | 'yubico_user_id' => 'ID client', |
@@ -13,7 +13,7 @@ |
||
| 13 | 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
| 14 | 14 | */ |
| 15 | 15 | global $LANG; |
| 16 | -$LANG = array ( |
|
| 16 | +$LANG = array( |
|
| 17 | 17 | 'provide_yubico_identifiers' => 'Please provide your Yubico identifiers', |
| 18 | 18 | 'admin_yubico_authentication_setting' => 'Enable Yubico authentication', |
| 19 | 19 | 'yubico_user_id' => 'Client ID', |
@@ -13,7 +13,7 @@ |
||
| 13 | 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
| 14 | 14 | */ |
| 15 | 15 | global $LANG; |
| 16 | -$LANG = array ( |
|
| 16 | +$LANG = array( |
|
| 17 | 17 | 'provide_yubico_identifiers' => 'Please provide your Yubico identifiers', |
| 18 | 18 | 'admin_yubico_authentication_setting' => 'Enable Yubico authentication', |
| 19 | 19 | 'yubico_user_id' => 'Client ID', |
@@ -13,7 +13,7 @@ |
||
| 13 | 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
| 14 | 14 | */ |
| 15 | 15 | global $LANG; |
| 16 | -$LANG = array ( |
|
| 16 | +$LANG = array( |
|
| 17 | 17 | 'provide_yubico_identifiers' => 'Please provide your Yubico identifiers', |
| 18 | 18 | 'admin_yubico_authentication_setting' => 'Enable Yubico authentication', |
| 19 | 19 | 'yubico_user_id' => 'Client ID', |
@@ -13,7 +13,7 @@ |
||
| 13 | 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
| 14 | 14 | */ |
| 15 | 15 | global $LANG; |
| 16 | -$LANG = array ( |
|
| 16 | +$LANG = array( |
|
| 17 | 17 | 'provide_yubico_identifiers' => 'Please provide your Yubico identifiers', |
| 18 | 18 | 'admin_yubico_authentication_setting' => 'Enable Yubico authentication', |
| 19 | 19 | 'yubico_user_id' => 'Client ID', |
@@ -13,7 +13,7 @@ |
||
| 13 | 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
| 14 | 14 | */ |
| 15 | 15 | global $LANG; |
| 16 | -$LANG = array ( |
|
| 16 | +$LANG = array( |
|
| 17 | 17 | 'provide_yubico_identifiers' => 'Please provide your Yubico identifiers', |
| 18 | 18 | 'admin_yubico_authentication_setting' => 'Enable Yubico authentication', |
| 19 | 19 | 'yubico_user_id' => 'Client ID', |
@@ -13,7 +13,7 @@ |
||
| 13 | 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
| 14 | 14 | */ |
| 15 | 15 | global $LANG; |
| 16 | -$LANG = array ( |
|
| 16 | +$LANG = array( |
|
| 17 | 17 | 'provide_yubico_identifiers' => 'Please provide your Yubico identifiers', |
| 18 | 18 | 'admin_yubico_authentication_setting' => 'Enable Yubico authentication', |
| 19 | 19 | 'yubico_user_id' => 'Client ID', |