29,8 → 29,7 |
*****************************************************************/ |
$ouvre=fopen(CONF_FILE,"r"); |
if ($ouvre){ |
while (!feof ($ouvre)) |
{ |
while (!feof ($ouvre)){ |
$tampon = fgets($ouvre, 4096); |
if (strpos($tampon,"=")!==false){ |
$tmp = explode("=",$tampon); |
44,7 → 43,7 |
$organisme = trim($conf["ORGANISM"]); |
$domainname = trim($conf["DOMAIN"]); |
$hostname = "alcasar.".$domainname; |
$network_pb = False; |
$network_pb = False; # "alcasar-watchdog.sh" changes this value if a network issue is detected |
$cert_add = "http://$hostname/certs"; |
$direct_access = False; |
$display_menu=False; |
55,8 → 54,9 |
$nb_connection_history = 3; |
$Language = 'en'; |
if(isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])){ |
$Langue = explode(",",$_SERVER['HTTP_ACCEPT_LANGUAGE']); |
$Language = strtolower(substr(chop($Langue[0]),0,2)); } |
$Langue = explode(",",$_SERVER['HTTP_ACCEPT_LANGUAGE']); |
$Language = strtolower(substr(chop($Langue[0]),0,2)); |
} |
$redirect_link = "www.euronews.com"; # Default redirection for HTTPS interception (beware, this website must run in HTTP) |
|
# Retrieve the user info behind the remote ip |
63,14 → 63,11 |
exec ("sudo /usr/sbin/chilli_query list | grep -Ew $remote_ip" , $tab); |
$user = explode (" ", $tab[0]); |
|
|
# Test if it's a direct connexion to ALCASAR |
if (isset($_SERVER['HTTP_HOST'])) |
{ |
if (($_SERVER['HTTP_HOST'] == $_SERVER['SERVER_ADDR']) || (preg_match ("/^alcasar$/", $_SERVER['HTTP_HOST'])) || (preg_match ("/^$hostname$/", $_SERVER['HTTP_HOST'])) || (preg_match ("/^$organisme$/", $_SERVER['HTTP_HOST']))) |
{ |
$direct_access=True; |
exec("sudo /usr/sbin/ipset del not_auth_yet $remote_ip"); # del user of the ipset "not_auth_yet" to not loop |
if (isset($_SERVER['HTTP_HOST'])){ |
if (($_SERVER['HTTP_HOST'] == $_SERVER['SERVER_ADDR']) || (preg_match ("/^alcasar$/", $_SERVER['HTTP_HOST'])) || (preg_match ("/^$hostname$/", $_SERVER['HTTP_HOST'])) || (preg_match ("/^$organisme$/", $_SERVER['HTTP_HOST']))){ |
$direct_access=True; |
exec("sudo /usr/sbin/ipset del not_auth_yet $remote_ip"); # del user of the ipset "not_auth_yet" to not loop |
} |
} |
# Function to adapt time connexion in seconds to H,M,S |
83,7 → 80,7 |
return $time[0]." h ".$time[1]." m ".$time[2]." s"; |
} |
|
//if user need to be warn |
# if user need to be warned |
if(isset($_GET['warn']) && isset($_GET['url'])) |
{ |
$direct_access = False; |
96,11 → 93,10 |
header("Location: $_GET[url]",TRUE,307); |
exit; |
} |
// we retrieve his three last connections |
# we retrieve his three last connections |
if ((is_file("./acc/manager/lib/sql/drivers/mysql/functions.php"))&&(is_file("/etc/freeradius-web/config.php"))){ |
include_once("/etc/freeradius-web/config.php"); |
include_once("./acc/manager/lib/sql/drivers/mysql/functions.php"); |
|
$sql = "SELECT UserName, AcctStartTime, AcctStopTime, acctsessiontime FROM radacct WHERE UserName='$user[5]' ORDER BY AcctStartTime DESC LIMIT 0 , $nb_connection_history"; |
$link = @da_sql_pconnect($config); |
if ($link){ |
120,27 → 116,21 |
else # the user isn't authenticated |
{ |
exec("sudo /usr/sbin/ipset list not_auth_yet | grep $remote_ip | wc -l 2>&1", $ipset_not_auth_yet); |
if(!$direct_access && $ipset_not_auth_yet[0] == '0') # it's the first stage of the interception |
{ |
if(!$direct_access && $ipset_not_auth_yet[0] == '0'){ # it's the first stage of the interception |
$display_menu = True; # Display menu for user not_auth_yet |
if (!isset($_SERVER['HTTPS'])) # In HTTP, the user is redirected on it's home page. In HTTPS, it's on the default page |
{ |
$redirect_link = $_SERVER['HTTP_HOST']; # to keep the user URL |
if (!isset($_SERVER['HTTPS'])){ # In HTTP, the user is redirected on it's home page. In HTTPS, it's on the default page (see $redirect_link) |
$redirect_link = $_SERVER['HTTP_HOST']; |
} |
|
} |
if(isset($_GET['url'])) # it's the second stage (when user has clicked to open a connection ...) |
{ |
if(isset($_GET['url'])){ # it's the second stage (when user has clicked on the button "open a connection") |
exec("sudo /usr/sbin/ipset add not_auth_yet $remote_ip"); # Add user in the ipset "not_auth_yet" (DNS requests not intercepted) |
$redir = "http://".$_GET['url']; |
$redir = "http://".$_GET['url']; |
header("Location: $redir",TRUE,307); |
exit; |
} |
if ($ipset_not_auth_yet[0] == '1'){ #if user not_auth_yet still here (index.php), we force DNS resquest. |
if ($ipset_not_auth_yet[0] == '1'){ # if user not_auth_yet still here (index.php), we force DNS resquest. |
echo "<script>window.location.reload(true)</script>"; # force DNS request |
} |
|
|
} |
} |
# Choice of language |
if($Language == 'fr'){ |
160,18 → 150,16 |
$l_certif_explain = "Permet l'échange de données sécurisées entre votre station de consultation et le portail captif ALCASAR.<BR>Si ce certificat n'est pas enregistré sur votre station de consultation, il est possible que des alertes de sécurité soient émises par votre navigateur.<br><br>"; |
$l_certif_explain_help = "<a href=\"alcasar-certificat.pdf\" target=\"_blank\">Aide complémentaire</a>"; |
$l_category = "catégorie :"; |
if ((isset ($user[4])) && ($user[4] == "0")) { |
if ((isset ($user[4])) && ($user[4] == "0")){ |
$l_logout_explain = "Aucune session de consultation Internet n'est actuellement ouverte sur votre système."; |
$l_logout = "<a href=\"http://$hostname/index.php?url=$redirect_link\">Ouvrir une session Internet</a>"; |
} |
else { |
if ($user[5] != $user[0]) // authentication exception or not |
{ |
else{ |
if ($user[5] != $user[0]){ # 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[5]\"><b>$user[5]</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>"; |
} |
else |
{ |
else{ |
$l_logout_explain = "Votre système ($user[5]) est en exception d'authentication.<br><br>$nb_connection_history last connections :$connection_history"; |
$l_logout = "Information des connexions"; |
} |
184,10 → 172,12 |
$l_service_sms_n = "Service SMS non actif"; |
$l_acc_sms = "Auto enregistrement par SMS"; |
$l_explain_warn = "L'administrateur a créé une archive contenant vos journaux de connexion dans le cadre d'une affaire judiciaire."; |
if(isset($_GET['url'])) |
if(isset($_GET['url'])){ |
$l_continue_link = "<a href='index.php?redirect=1&url=$_GET[url]' class='button'>Je comprends et je souhaite continuer ma navigation.</a>"; |
else |
} |
else{ |
$l_continue_link = "<a href='index.php' class='button'>Je comprends et je souhaite continuer ma navigation.</a>"; |
} |
$l_title_warn="Cher utilisateur, "; |
$l_explain_warn_name="Une personne sous le nom de "; |
$l_explain_warn_ip="sous cette IP : "; |
211,18 → 201,16 |
$l_certif_explain = "O certificado Permiti a troca de dados seguro entre seu computador e o portal Alcasar.<BR>Se este certificado não estiver incorporado no seu computador, alguns alertas de segurança deverá aparecer no navegador.<br><br>"; |
$l_certif_explain_help = "<a href=\"alcasar-certificat.pdf\" target=\"_blank\">Essa foi uma ajuda complementar</a>"; |
$l_category = "categoria :"; |
if ((isset ($user[4])) && ($user[4] == "0")) { |
if ((isset ($user[4])) && ($user[4] == "0")){ |
$l_logout_explain = "Não há conexão de Internet aberta em seu computador, deseja conectar?"; |
$l_logout = "<a href=\"http://$hostname/index.php?url=$redirect_link\">Abrir uma conexão de Internet</a>"; |
} |
else { |
if ($user[5] != $user[0]) // authentication exception or not |
{ |
else{ |
if ($user[5] != $user[0]){ # 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[5]\"><b>$user[5]</b></a><br><br>$nb_connection_history last connections :$connection_history"; |
$l_logout = "<a href=\"http://$hostname:3990/logoff\">Sair da Internet</a>"; |
} |
else |
{ |
else{ |
$l_logout_explain = "O sistema ($user[5]) detctou exesso de autenticação.<br><br>$nb_connection_history logins últimos :$connection_history"; |
$l_logout = "Informações de conexões"; |
} |
235,10 → 223,12 |
$l_service_sms_n = "SMS service disable"; |
$l_acc_sms = "Auto registration by SMS"; |
$l_explain_warn = "El administrador ha creado un archivo que contiene los periódicos de inicio de sesión como parte de un proceso judicial."; |
if(isset($_GET['url'])) |
if(isset($_GET['url'])){ |
$l_continue_link = "<a href='index.php?redirect=1&url=$_GET[url]' class='button'>Lo comprendo y deseo continuar mi navegación.</a>"; |
else |
} |
else{ |
$l_continue_link = "<a href='index.php' class='button'>Lo comprendo y deseo continuar mi navegación.</a>"; |
} |
$l_title_warn="Estimado usuario,"; |
$l_explain_warn_name="El usario "; |
$l_explain_warn_ip="con este IP : "; |
262,18 → 252,16 |
$l_certif_explain = "允许您的计算机与ALCASAR门户进行安全数据交换。<BR>如果该证书未包含在您的计算机中,您的浏览器将出现一些安全提醒。<br><br>"; |
$l_certif_explain_help = "<a href=\"alcasar-certificat.pdf\" target=\"_blank\">额外帮助</a>"; |
$l_category = "类别 :"; |
if ((isset ($user[4])) && ($user[4] == "0")) { |
if ((isset ($user[4])) && ($user[4] == "0")){ |
$l_logout_explain = "您的系统目前没有打开任何网络咨询进程。"; |
$l_logout = "<a href=\"http://$hostname/index.php?url=$redirect_link\">打开一个网络进程</a>"; |
} |
else { |
if ($user[5] != $user[0]) // authentication exception or not |
{ |
else{ |
if ($user[5] != $user[0]){ # authentication exception or not |
$l_logout_explain = "关闭当前连接进程。<br> 已连接用户:<a href=\"http://$hostname:3990/logoff\" title=\" $user[5]\"><b>$user[5]</b></a><br><br>$nb_connection_history 最后连接 :$connection_history"; |
$l_logout = "<a href=\"http://$hostname:3990/logoff\">断开网络</a>"; |
} |
else |
{ |
else{ |
$l_logout_explain = "您的系统($user[5])验证例外<br><br>$nb_connection_history 最后连接: $connection_history"; |
$l_logout = "连接信息"; |
} |
286,10 → 274,12 |
$l_service_sms_n = "短信服务禁用"; |
$l_acc_sms = "短信自动注册"; |
$l_explain_warn = "管理员创建了一份可用于司法调查的连接日志文档。"; |
if(isset($_GET['url'])) |
if(isset($_GET['url'])){ |
$l_continue_link = "<a href='index.php?redirect=1&url=$_GET[url]' class='button'>我明白并希望继续浏览。</a>"; |
else |
} |
else{ |
$l_continue_link = "<a href='index.php' class='button'>我明白并希望继续浏览。</a>"; |
} |
$l_title_warn="亲爱的用户,"; |
$l_explain_warn_name="一人名为"; |
$l_explain_warn_ip="在此IP:"; |
296,7 → 286,7 |
$l_explain_warn_date="查看您的连接日志于"; |
$l_explain_warn_reason=" 如下原因:"; |
} |
else if ($Language == 'ar') { |
else if ($Language == 'ar'){ |
$l_access_denied = "مراقبة الدخول"; |
$l_access_welcome = "ALCASAR مرحبا بك في"; |
$l_access_unavailable = "الدخول غير متوفر"; |
317,12 → 307,13 |
$l_certif_explain = "<br><br>.$cert_not_saved_text<br> .$exchange_data_text"; |
$l_certif_explain_help = "<a href=\"alcasar-certificat.pdf\" target=\"_blank\">مساعدة إضافية </a>"; |
$l_category = "فئة :"; |
if ((isset ($user[4])) && ($user[4] == "0")) { |
if ((isset ($user[4])) && ($user[4] == "0")){ |
$l_logout_explain = "و لا جلسة استفسار للإنترنت مفتوحة حاليا على نظامك"; |
$close_session_text = "فتح جلسة الإنترنت"; |
$l_logout = "<a href=\"http://$hostname/index.php?url=$redirect_link\">$close_session_text</a>"; |
} else { |
if ($user[5] != $user[0]) { // authentication exception or not |
} |
else{ |
if ($user[5] != $user[0]){ # authentication exception or not |
$close_session_text = "إقفال جلسة المستخدم المتصل حاليا"; |
$user_logged_text = "المستخدم متصل"; |
$disconnect_user_text = "قطع الاتصال على المستخدم"; |
330,7 → 321,7 |
$logout_internet_text = "قطع الاتصال على الإنترنت"; |
$l_logout = "<a href=\"http://$hostname:3990/logoff\">$logout_internet_text</a>"; |
} |
else { |
else{ |
$your_system_text = "نظامك"; |
$auth_except_text = "على توثيق استثنائي"; |
$last_conn_text = "اتصالات مشاركة"; |
356,10 → 347,10 |
$l_acc_sms = "تسجيل ذاتي عن طريق SMS"; |
$l_explain_warn = "المسؤول أنشأ أرشيفاً تحتوي على سجلات الاتصال في إطار تحقيق قضائي"; |
$understand_text = "أنا متفهم و أريد ان أواصل التصفح"; |
if(isset($_GET['url'])) { |
if(isset($_GET['url'])){ |
$l_continue_link = "<a href='index.php?redirect=1&url=$_GET[url]' class='button'>$understand_text</a>"; |
} |
else { |
else{ |
$l_continue_link = "<a href='index.php' class='button'>$understand_text</a>"; |
} |
$l_title_warn = "عزيزي المستعمل, "; |
368,7 → 359,7 |
$l_explain_warn_date = "إطّلع على سجلات الاتصال الخاصة بك في"; |
$l_explain_warn_reason = "السبب المسرّح به: "; |
} |
else { |
else{ |
$l_access_denied = "Access control"; |
$l_access_welcome = "Welcome on ALCASAR"; |
$l_access_unavailable = "ACCESS UNAVAILABLE"; |
385,18 → 376,16 |
$l_certif_explain = "Allow secure data exchange between your computer and ALCASAR portal.<BR>If this certificate isn't incorporated in your computer, some security alerts should appear in your browser.<br><br>"; |
$l_certif_explain_help = "<a href=\"alcasar-certificat.pdf\" target=\"_blank\">Complementary help</a>"; |
$l_category = "category :"; |
if ((isset ($user[4])) && ($user[4] == "0")) { |
if ((isset ($user[4])) && ($user[4] == "0")){ |
$l_logout_explain = "No Internet consultation session is actualy open on your system"; |
$l_logout = "<a href=\"http://$hostname/index.php?url=$redirect_link\">Open an Internet session</a>"; |
} |
else { |
if ($user[5] != $user[0]) // authentication exception or not |
{ |
else{ |
if ($user[5] != $user[0]){ # 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[5]\"><b>$user[5]</b></a><br><br>$nb_connection_history last connections :$connection_history"; |
$l_logout = "<a href=\"http://$hostname:3990/logoff\">Logoff from internet</a>"; |
} |
else |
{ |
else{ |
$l_logout_explain = "Your system ($user[5]) is in exception of authentication.<br><br>$nb_connection_history Last logins :$connection_history"; |
$l_logout = "Connections information"; |
} |
409,10 → 398,12 |
$l_service_sms_n = "SMS service disable"; |
$l_acc_sms = "Auto registration by SMS"; |
$l_explain_warn = "The administrator created an archive which contains your imputabilities logs for a judicial investigation."; |
if(isset($_GET['url'])) |
if(isset($_GET['url'])){ |
$l_continue_link = "<a href='index.php?redirect=1&url=$_GET[url]' class='button'>I understand and I wish to continue.</a>"; |
else |
} |
else{ |
$l_continue_link = "<a href='index.php' class='button'>I understand and I wish to continue.</a>"; |
} |
$l_title_warn="Dear user,"; |
$l_explain_warn_name="Someone called "; |
$l_explain_warn_ip="with this IP : "; |
437,15 → 428,15 |
$img_adm = "adm.png"; |
$img_internet = $img_connect; |
|
if ((isset ($user[4])) && ($user[4] == "0")) { |
if (! $network_pb) { |
if ((isset ($user[4])) && ($user[4] == "0")){ |
if (! $network_pb){ |
$img_internet = $img_access; |
} |
else { |
} |
else{ |
$img_internet = $img_warning; |
} |
} |
else { |
else{ |
$img_internet = $img_connect; |
} |
|
456,18 → 447,19 |
header("Cache-Control: post-check=0, pre-check=0", false); |
header("Pragma: no-cache"); |
?> |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> |
<html> |
<head> |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> |
<title>ALCASAR - <?php echo $l_title; ?></title> |
<meta http-equiv="Cache-control" content="no-cache"> |
<meta http-equiv="Pragma" content="no-cache"> |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> |
<html> |
<head> |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> |
<title>ALCASAR - <?php echo $l_title; ?></title> |
<meta http-equiv="Cache-control" content="no-cache"> |
<meta http-equiv="Pragma" content="no-cache"> |
<?php |
echo "<style>"; |
include("css/style_intercept.css"); |
echo "</style>"; |
?> |
|
<script type="text/javascript"> |
function valoriserDiv5(param){ |
document.getElementById("box_info").innerHTML = param.innerHTML; |
478,32 → 470,31 |
<?php |
if ($direct_access || $display_menu){ |
echo " |
<div id=\"cadre_titre\" class=\"titre_controle\"> |
<p id=\"acces_controle\" class=\"titre_controle\">$l_title</p>"; |
<div id=\"cadre_titre\" class=\"titre_controle\"> |
<p id=\"acces_controle\" class=\"titre_controle\">$l_title</p>"; |
if ($network_pb) { |
echo " <span>$l_explain_net_pb</span>"; |
} |
} |
else { |
#if user need to be warn about that someone who read his logs |
if(isset($_GET['warn']) && isset($_GET['url']) && $_GET['warn'] == '1') |
{ |
echo" |
<div id=\"cadre_titre\" class=\"titre_refus\"> |
<p id=\"acces_controle\" class=\"titre_refus\">$l_title_warn</p>"; |
} |
else |
{ |
echo" |
<div id=\"cadre_titre\" class=\"titre_refus\"> |
<p id=\"acces_controle\" class=\"titre_refus\">$l_title</p>"; |
} |
} |
else{ |
# if user need to be warned that someone reads his logs |
if(isset($_GET['warn']) && isset($_GET['url']) && $_GET['warn'] == '1'){ |
echo " |
<div id=\"cadre_titre\" class=\"titre_refus\"> |
<p id=\"acces_controle\" class=\"titre_refus\">$l_title_warn</p>"; |
} |
else{ |
echo " |
<div id=\"cadre_titre\" class=\"titre_refus\"> |
<p id=\"acces_controle\" class=\"titre_refus\">$l_title</p>"; |
} |
} |
?> |
<div id="boite_logo"> |
<img src="<?php echo "$img_rep$img_organisme"; ?>"> |
</div> |
|
<div id="boite_logo"> |
<img src="<?php echo "$img_rep$img_organisme"; ?>"> |
</div> |
</div> |
<div id="contenu_acces"> |
<div id="box_url"> |
<?php |
513,103 → 504,94 |
<?php |
# Check if the SMS service is enable |
$service_SMS_status="false"; |
if ($service_SMS_status == "true") { |
$sms_div=' |
<div class="box_menu" id="box_acc" onmouseover="valoriserDiv5(text_acc);"> |
<span>'.$l_sms_access.'</span> |
<img src="'.$img_rep.''.$img_sms.'"> |
</div> |
if ($service_SMS_status == "true"){ |
$sms_div=' |
<div class="box_menu" id="box_acc" onmouseover="valoriserDiv5(text_acc);"> |
<span>'.$l_sms_access.'</span> |
<img src="'.$img_rep.''.$img_sms.'"> |
</div> |
'; |
|
$sms_div_over=' |
<div class="div-cache" id="text_acc"> |
<h2>'.$l_sms_access.'</h2> |
<p>'.$l_sms_explain.'</p> |
<p><font color="green"><center>'.$l_service_sms.'</center></font></p> |
<img src="'.$img_rep.''.$img_sms.'"> |
</div> |
$sms_div_over=' |
<div class="div-cache" id="text_acc"> |
<h2>'.$l_sms_access.'</h2> |
<p>'.$l_sms_explain.'</p> |
<p><font color="green"><center>'.$l_service_sms.'</center></font></p> |
<img src="'.$img_rep.''.$img_sms.'"> |
</div> |
'; |
} |
else { |
$sms_div=''; |
$sms_div_over=''; |
$sms_div=''; |
$sms_div_over=''; |
} |
if ($direct_access || $display_menu){ |
echo " <div id=\"box_bienvenue\"> |
echo " |
<div id=\"box_bienvenue\"> |
$l_welcome |
</div> |
<div class=\"box_menu\" id=\"box_conn\" onmouseover=\"valoriserDiv5(text_conn);\"> |
<span>$l_logout</span> |
<img src=\"$img_rep$img_internet\"> |
</div> |
<div class=\"box_menu\" id=\"box_certif\" onmouseover=\"valoriserDiv5(text_certif);\"> |
<span>$l_install_certif</span> |
<img src=\"$img_rep$img_certificate\"> |
</div> |
<div class=\"box_menu\" id=\"box_mdp\" onmouseover=\"valoriserDiv5(text_mdp);\"> |
<img src=\"$img_rep$img_pwd\"> |
<span>$l_password_change</span> |
</div> |
$sms_div |
<div class=\"div-cache\" id=\"text_conn\"> |
<h2>$l_logout</h2> |
<p>$l_logout_explain</p> |
<img src=\"$img_rep$img_internet\"> |
</div> |
<div class=\"div-cache\" id=\"text_certif\"> |
<h2>$l_install_certif_more</h2> |
<p>$l_certif_explain $l_certif_explain_help</p> |
<img src=\"$img_rep$img_certificate\"> |
</div> |
<div class=\"div-cache\" id=\"text_mdp\"> |
<h2>$l_password_change</h2> |
<p>$l_password_change_explain</p> |
<img src=\"$img_rep$img_pwd\"> |
</div> |
$sms_div_over |
<div id=\"box_info\"> |
</div>"; |
} |
else { |
# user need to be warned that someone reads his logs |
if(isset($_GET['warn']) && isset($_GET['url']) && $_GET['warn'] == '1'){ |
$filename="/var/www/html/acc/backup/log_info.txt"; |
$l_explain_warn=""; |
if(file_exists($filename)){ |
$fichier = fopen($filename, "r"); |
$content = file($filename); |
foreach($content as $line){ |
$infos=explode("|||", $line); |
$log_date=$infos[0]; |
$log_user=$infos[1]; |
$log_reason=$infos[2]; |
$log_ip=$infos[3]; |
} |
$l_explain_warn="$l_explain_warn_name$log_user ( $l_explain_warn_ip$log_ip ) $l_explain_warn_date$log_date $l_explain_warn_reason$log_reason"; |
} |
else{ |
echo "Log error!"; |
} |
echo " |
<div id=\"box_refuse\"> |
<img src=\"$img_rep$img_warning\"> |
<p>$l_explain_warn</p> |
</div> |
<div class=\"box_menu\" id=\"box_conn\" onmouseover=\"valoriserDiv5(text_conn);\"> |
<span>$l_logout</span> |
<img src=\"$img_rep$img_internet\"> |
</div> |
<div class=\"box_menu\" id=\"box_certif\" onmouseover=\"valoriserDiv5(text_certif);\"> |
<span>$l_install_certif</span> |
<img src=\"$img_rep$img_certificate\"> |
</div> |
<div class=\"box_menu\" id=\"box_mdp\" onmouseover=\"valoriserDiv5(text_mdp);\"> |
<img src=\"$img_rep$img_pwd\"> |
<span>$l_password_change</span> |
</div> |
$sms_div |
<div class=\"div-cache\" id=\"text_conn\"> |
<h2>$l_logout</h2> |
<p>$l_logout_explain</p> |
<img src=\"$img_rep$img_internet\"> |
</div> |
<div class=\"div-cache\" id=\"text_certif\"> |
<h2>$l_install_certif_more</h2> |
<p>$l_certif_explain $l_certif_explain_help</p> |
<img src=\"$img_rep$img_certificate\"> |
</div> |
<div class=\"div-cache\" id=\"text_mdp\"> |
<h2>$l_password_change</h2> |
<p>$l_password_change_explain</p> |
<img src=\"$img_rep$img_pwd\"> |
</div> |
$sms_div_over |
<div id=\"box_info\"> |
<div id=\"liens_redir\"> |
<p>$l_continue_link</p> |
</div>"; |
} |
else { |
#if user need to be warn about that someone who read his logs |
if(isset($_GET['warn']) && isset($_GET['url']) && $_GET['warn'] == '1') |
{ |
|
|
$filename="/var/www/html/acc/backup/log_info.txt"; |
$l_explain_warn=""; |
if(file_exists($filename)){ |
$fichier = fopen($filename, "r"); |
$content = file($filename); |
foreach($content as $line){ |
$infos=explode("|||", $line); |
$log_date=$infos[0]; |
$log_user=$infos[1]; |
$log_reason=$infos[2]; |
$log_ip=$infos[3]; |
} |
|
$l_explain_warn="$l_explain_warn_name$log_user ( $l_explain_warn_ip$log_ip ) $l_explain_warn_date$log_date $l_explain_warn_reason$log_reason"; |
} |
else |
{ |
echo "Log error!"; |
} |
|
|
echo " |
<div id=\"box_refuse\"> |
<img src=\"$img_rep$img_warning\"> |
<p>$l_explain_warn</p> |
|
</div> |
<div id=\"liens_redir\"> |
<p>$l_continue_link</p> |
</div>"; |
|
} |
else |
{ |
else{ |
echo " |
<div id=\"box_refuse\"> |
<img src=\"$img_rep$img_false\"> |
621,7 → 603,7 |
} |
} |
if (($network_pb)&&(! $direct_access)) { |
echo " <span>Diagnostic : $diagnostic</span>"; |
echo " <span>Diagnostic : $diagnostic</span>"; |
} |
?> |
</div> |
632,5 → 614,3 |
</div> |
</body> |
</html> |
|
|