Subversion Repositories ALCASAR

Compare Revisions

Ignore whitespace Rev 2369 → Rev 2370

/web/index.php
38,7 → 38,7
$buffer = fgets($file_conf, 4096);
if ((strpos($buffer, '=') !== false) && (substr($buffer, 0, 1) !== '#')) {
$tmp = explode('=', $buffer);
$conf[$tmp[0]] = trim($tmp[1]);
$conf[trim($tmp[0])] = trim($tmp[1]);
}
}
fclose($file_conf);
45,9 → 45,11
 
$organisme = $conf["ORGANISM"];
$hostname = $conf["HOSTNAME"].'.'.$conf["DOMAIN"];
$useHTTPS = ((isset($_SERVER['HTTPS'])) && (!empty($_SERVER['HTTPS'])) && ($_SERVER['HTTPS'] !== 'off'));
$network_pb = false; // "alcasar-watchdog.sh" changes this value if a network issue is detected
$diagnostic = "can't contact the default router"; // "alcasar-watchdog.sh" changes this value if a network issue is detected
$certCa_link = "http://$hostname/certs/certificat_alcasar_ca.crt";
$certCa_link = (($useHTTPS) ? 'https' : 'http')."://$hostname/certs/certificat_alcasar_ca.crt";
$logout_link = (($useHTTPS) ? 'https' : 'http').'://'.$hostname.':'.(($useHTTPS) ? 3991 : 3990).'/logoff';
$direct_access = false;
$remote_ip = preg_match('#^([0-9]{1,3}\.){3}[0-9]{1,3}$#', $_SERVER['REMOTE_ADDR']) ? $_SERVER['REMOTE_ADDR'] : '';
$connection_history = '';
161,8 → 163,8
$l_logout = "<a href=\"http://$hostname/index.php?url=$redirect_link\">Ouvrir une session Internet</a>";
} else {
if ($user->username != $user->mac) { // authentication exception or not
$l_logout_explain = "Ferme la session de l'usager actuellement connecté. <br><br>Utilisateur connecté : <a href=\"http://$hostname:3990/logoff\" title=\"Deconnecter l'utilisateur $user->username\"><b>$user->username</b></a><br><br>$nb_connection_history dernières connexions :$connection_history";
$l_logout = "<a href=\"http://$hostname:3990/logoff\">Se déconnecter d'internet</a>";
$l_logout_explain = "Ferme la session de l'usager actuellement connecté. <br><br>Utilisateur connecté : <a href=\"$logout_link\" title=\"Deconnecter l'utilisateur $user->username\"><b>$user->username</b></a><br><br>$nb_connection_history dernières connexions :$connection_history";
$l_logout = "<a href=\"$logout_link\">Se déconnecter d'internet</a>";
} else {
$l_logout_explain = "Votre système ($user->username) est en exception d'authentication.<br><br>$nb_connection_history dernières connexions :$connection_history";
$l_logout = "Information des connexions";
208,8 → 210,8
$l_logout = "<a href=\"http://$hostname/index.php?url=$redirect_link\">Abrir uma conexão de Internet</a>";
} else {
if ($user->username != $user->mac) { // authentication exception or not
$l_logout_explain = "Se desejar, feche a conexão do usuário atual conectado.<br> Usuário conectado : <a href=\"http://$hostname:3990/logoff\" title=\"Disconnect user $user->username\"><b>$user->username</b></a><br><br>$nb_connection_history logins últimos :$connection_history";
$l_logout = "<a href=\"http://$hostname:3990/logoff\">Sair da Internet</a>";
$l_logout_explain = "Se desejar, feche a conexão do usuário atual conectado.<br> Usuário conectado : <a href=\"$logout_link\" title=\"Disconnect user $user->username\"><b>$user->username</b></a><br><br>$nb_connection_history logins últimos :$connection_history";
$l_logout = "<a href=\"$logout_link\">Sair da Internet</a>";
} else {
$l_logout_explain = "O sistema ($user->username) detctou exesso de autenticação.<br><br>$nb_connection_history logins últimos :$connection_history";
$l_logout = "Informações de conexões";
255,8 → 257,8
$l_logout = "<a href=\"http://$hostname/index.php?url=$redirect_link\">打开一个网络进程</a>";
} else {
if ($user->username != $user->mac) { // authentication exception or not
$l_logout_explain = "关闭当前连接进程。<br> 已连接用户:<a href=\"http://$hostname:3990/logoff\" title=\" $user->username\"><b>$user->username</b></a><br><br>$nb_connection_history 最后连接 :$connection_history";
$l_logout = "<a href=\"http://$hostname:3990/logoff\">断开网络</a>";
$l_logout_explain = "关闭当前连接进程。<br> 已连接用户:<a href=\"$logout_link\" title=\" $user->username\"><b>$user->username</b></a><br><br>$nb_connection_history 最后连接 :$connection_history";
$l_logout = "<a href=\"$logout_link\">断开网络</a>";
} else {
$l_logout_explain = "您的系统($user->username)验证例外<br><br>$nb_connection_history 最后连接: $connection_history";
$l_logout = "连接信息";
309,9 → 311,9
$close_session_text = "إقفال جلسة المستخدم المتصل حاليا";
$userlogged_text = "المستخدم متصل";
$disconnect_user_text = "قطع الاتصال على المستخدم";
$l_logout_explain = "Ferme la session de l'usager actuellement connecté. <br><br>Utilisateur connecté : <a href=\"http://$hostname:3990/logoff\" title=\"Deconnecter l'utilisateur $user->username\"><b>$user->username</b></a><br><br>$nb_connection_history dernières connexions :$connection_history";
$l_logout_explain = "Ferme la session de l'usager actuellement connecté. <br><br>Utilisateur connecté : <a href=\"$logout_link\" title=\"Deconnecter l'utilisateur $user->username\"><b>$user->username</b></a><br><br>$nb_connection_history dernières connexions :$connection_history";
$logout_internet_text = "قطع الاتصال على الإنترنت";
$l_logout = "<a href=\"http://$hostname:3990/logoff\">$logout_internet_text</a>";
$l_logout = "<a href=\"$logout_link\">$logout_internet_text</a>";
} else {
$your_system_text = "نظامك";
$auth_except_text = "على توثيق استثنائي";
370,8 → 372,8
$l_logout = "<a href=\"http://$hostname/index.php?url=$redirect_link\">Open an Internet session</a>";
} else {
if ($user->username != $user->mac) { // authentication exception or not
$l_logout_explain = "Close the session of the user currently connected.<br> User logged-on : <a href=\"http://$hostname:3990/logoff\" title=\"Disconnect user $user->username\"><b>$user->username</b></a><br><br>$nb_connection_history last connections :$connection_history";
$l_logout = "<a href=\"http://$hostname:3990/logoff\">Logoff from internet</a>";
$l_logout_explain = "Close the session of the user currently connected.<br> User logged-on : <a href=\"$logout_link\" title=\"Disconnect user $user->username\"><b>$user->username</b></a><br><br>$nb_connection_history last connections :$connection_history";
$l_logout = "<a href=\"$logout_link\">Logoff from internet</a>";
} else {
$l_logout_explain = "Your system ($user->username) is in exception of authentication.<br><br>$nb_connection_history Last logins :$connection_history";
$l_logout = "Connections information";