Subversion Repositories ALCASAR

Compare Revisions

Ignore whitespace Rev 368 → Rev 369

/web/index.php
1,6 → 1,6
<html>
<?
$private_ip = "192.168.182.1";
$private_ip = "192.168.180.1";
$network_pb = False;
$direct_access = False;
$diagnostic = "eth0 link down";
17,41 → 17,49
$Language = strtolower(substr(chop($Langue[0]),0,2)); }
if($Language == 'fr'){
$l_access_denied = "ACC&Egrave;S REFUS&Eacute;";
$l_access_controled = "ACC&Egrave;S CONTROL&Eacute;";
$l_access_welcome = "Bienvenu sur ALCASAR";
$l_access_unavailable = "ACC&Egrave;S INDISPONIBLE";
$l_required_domain = "Site WEB demand&eacute;";
$l_explain_acc_access = "Acc&egrave;s aux param&egrave;tres d'administration du portail. Vous devez poss&eacute;der un compte d'administration.";
$l_explain_acc_access = "Ce centre permet d'administrer le portail. Vous devez poss&eacute;der un compte d'administration.";
$l_explain_access_deny = "Vous tentez d'acc&eacute;der &agrave; une ressource dont le contenu est r&eacute;put&eacute; contenir des informations inappropri&eacute;es.";
$l_explain_net_pb = "Votre portail d&eacute;tecte que l'acc&egrave;s &agrave; Internet est indisponible.";
$l_contact_access_deny = "Contactez le responsable de la s&eacute;curit&eacute; (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 = "Bienvenue sur la page d'accueil du portail ALCASAR";
$l_acc_access = "<a href=\"https://$private_ip/acc\">Acc&eacute;der au centre de gestion (ALCASAR Control Center)</A>";
$l_logout = "<a href=\"http://$private_ip:3990/logoff\">D&eacute;connexion</A>";
if ($user[4] == "0") {$l_logout_explain = "Aucun usager n'est connect&eacute; sur cet &eacute;quipement";} else {$l_logout_explain = "Ferme la session de l'usager : <b>$user[5]</b>";}
$l_welcome = "Page principal de votre portail captif";
$l_acc_access = "<a href=\"https://$private_ip/acc\">Acc&eacute;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&egrave;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&eacute;connexion</A>";}
$l_password_change = "<a href=\"https://$private_ip/pass\">Changer votre mot de passe</A>";
$l_password_change_explain = "Vous redirige sur la pages de changement du mot de passe de votre compte d'acc&egrave;s &agrave; internet.";
$l_password_change_explain = "Vous devez poss&eacute;der un compte de consultation Internet.";
$l_back_page = "<a href=\"javascript:history.back()\">Page pr&eacute;c&eacute;dente</a>";
}
else {
$l_access_denied = "ACCESS DENIED";
$l_access_controled = "ACESS CONTROLED";
$l_access_welcome = "Welcome on ALCASAR";
$l_access_unavailable = "ACCESS UNAVAILABLE";
$l_required_domain = "Required WEB site";
$l_explain_acc_access = "Access to the ALCASAR Control Center. You must have an administrative login and password";
$l_explain_acc_access = "This center control the portal. You must have an administrative account.";
$l_explain_access_deny = "Your portal has just detected that the Internet access is down";
$l_explain_net_pb = "Your portal has just detected that the Internet access is down";
$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 = "Welcome on the captive portal ALCASAR";
$l_acc_access = "<a href=\"https://$private_ip/acc\">go to the ALCASAR Control Center (ACC)</A>";
$l_logout = "<a href=\"http://$private_ip:3990/logoff\">Loging off</A>";
$l_logout_explain = "Logoff if your session is open.";
$l_paasword_change = "<a href=\"https://$private_ip/pass\">Change your password</A>";
$l_password_change_explain = "Redirects you to the password change's page of your internet access account.";
$l_welcome = "Your captive portal main page";
$l_acc_access = "<a href=\"https://$private_ip/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_password_change_explain = "You should already have an Internet access account.";
$l_back_page = "<a href=\"javascript:history.back()\">Previous page</a>";
}
$l_title = ($direct_access ? $l_access_controled : ($network_pb ? $l_access_unavailable : $l_access_denied));
$l_title = ($direct_access ? $l_access_welcome : ($network_pb ? $l_access_unavailable : $l_access_denied));
$l_explain = ($direct_access ? $l_explain_acc_access : ($network_pb ? $l_explain_net_pb : $l_explain_access_deny));
 
echo "<head><title>ALCASAR - $l_title";
85,7 → 93,7
<? if (! $direct_access){echo "$l_required_domain : $_SERVER[HTTP_HOST]";}?>
</DIV>
<? if ($direct_access){
echo " <DIV id=\"box_bienvenue\">
echo " <DIV id=\"box_bienvenue\">
$l_welcome
</DIV>
<DIV class=\"box_menu_courte\" id=\"box_1\">
92,13 → 100,24
<IMG src=\"images/cle.png\">
<SPAN>$l_password_change</SPAN>
<P>$l_password_change_explain</P>
</DIV>
</DIV>";
if ($user[4] == "0") {
echo "
<DIV class=\"box_menu_courte\" id=\"box_2\">
<SPAN>";
if (! $network_pb) { echo "$l_logout";}
echo " </SPAN>
<IMG src=\"images/globe_acces.png\">
<P>$l_logout_explain</P>
</DIV>";}
else {
echo "
<DIV class=\"box_menu_courte\" id=\"box_2\">
<SPAN>$l_logout</SPAN>
<IMG src=\"images/globe.png\">
<P>$l_logout_explain</P>
</DIV>
<DIV class=\"box_menu_large\" id=\"box_3\">
</DIV>";}
echo " <DIV class=\"box_menu_large\" id=\"box_3\">
<SPAN>$l_acc_access</SPAN>
<IMG src=\"images/logo-alcasar.png\">
<P>$l_explain</P>