1,5 → 1,6 |
<?php |
$private_ip = "192.168.182.1"; |
$hostname = "alcasar"; |
$network_pb = False; |
$direct_access = False; |
$diagnostic = "eth0 link down"; |
8,7 → 9,7 |
exec ("sudo /usr/sbin/chilli_query list|grep $remote_ip" , $tab); |
$user = explode (" ", $tab[0]); |
# on discrimine les accès directs sur Alcasar par rapport aux redirections |
if (($_SERVER['HTTP_HOST'] == $private_ip) || ($_SERVER['HTTP_HOST'] == "alcasar")){$direct_access=True;} |
if (($_SERVER['HTTP_HOST'] == $private_ip) || ($_SERVER['HTTP_HOST'] == "alcasar") || ($_SERVER['HTTP_HOST'] == $hostname)){$direct_access=True;} |
# Choice of language |
$Language = 'en'; |
if(isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])){ |
25,14 → 26,14 |
$l_contact_access_deny = "Contactez le responsable de la sécurité (OSSI/RSSI) si vous pensez que ce filtrage est abusif."; |
$l_contact_net_pb = "Contactez votre responsable informatique ou votre prestataire Internet pour plus d'information"; |
$l_welcome = "Page principale de votre portail captif"; |
$l_acc_access = "<a href=\"https://$private_ip/acc\">Accès au centre de gestion (ALCASAR Control Center)</A>"; |
$l_acc_access = "<a href=\"https://$hostname/acc\">Accès au centre de gestion (ALCASAR Control Center)</A>"; |
if ($user[4] == "0") { |
$l_logout_explain = "Aucune session de consultation Internet n'est actuellement ouverte sur votre système"; |
$l_logout = "<a href=\"http://www.google.fr\">Ouvrir une session Internet</A>";} |
else { |
$l_logout_explain = "Ferme la session de l'usager : <b>$user[5]</b>"; |
$l_logout = "<a href=\"http://$private_ip:3990/logoff\">Déconnexion</A>";} |
$l_password_change = "<a href=\"https://$private_ip/pass\">Changer votre mot de passe</A>"; |
$l_logout = "<a href=\"http://$hostname:3990/logoff\">Déconnexion</A>";} |
$l_password_change = "<a href=\"https://$hostname/pass\">Changer votre mot de passe</A>"; |
$l_password_change_explain = "Vous devez posséder un compte de consultation Internet."; |
$l_back_page = "<a href=\"javascript:history.back()\">Page précédente</a>"; |
} |
47,14 → 48,14 |
$l_contact_access_deny = "Contact your security system manager if you think this filtering is abusive."; |
$l_contact_net_pb = "Contact your network responsive or your Internet provider for more information"; |
$l_welcome = "Your captive portal main page"; |
$l_acc_access = "<a href=\"https://$private_ip/acc\">Access to the ALCASAR Control Center</A>"; |
$l_acc_access = "<a href=\"https://$hostname/acc\">Access to the ALCASAR Control Center</A>"; |
if ($user[4] == "0") { |
$l_logout_explain = "No Internet consultation session is actualy open on your system"; |
$l_logout = "<a href=\"http://www.google.fr\">Open an Internet session</A>";} |
else { |
$l_logout_explain = "Close the session of the user : <b>$user[5]</b>"; |
$l_logout = "<a href=\"http://$private_ip:3990/logoff\">Logoff</A>";} |
$l_password_change = "<a href=\"https://$private_ip/pass\">Change your password</A>"; |
$l_logout = "<a href=\"http://$hostname:3990/logoff\">Logoff</A>";} |
$l_password_change = "<a href=\"https://$hostname/pass\">Change your password</A>"; |
$l_password_change_explain = "You should already have an Internet access account."; |
$l_back_page = "<a href=\"javascript:history.back()\">Previous page</a>"; |
} |