Subversion Repositories ALCASAR

Compare Revisions

Ignore whitespace Rev 362 → Rev 363

/alcasar.sh
1101,7 → 1101,6
chown -R root:apache /usr/local/etc/{alcasar-dnsfilter-available,alcasar-dnsfilter-enabled}
# On fait pointer le black-hole sur une page interne
$SED "s?^IP_RETOUR=.*?IP_RETOUR=\"$PRIVATE_IP\"?g" $DIR_DEST_SBIN/alcasar-bl.sh
ln -sf $DIR_WEB/index-access-deny.php $DIR_WEB/index.php
# On récupère la dernière version de la BL Toulouse
$DIR_DEST_SBIN/alcasar-bl.sh -download
}
/scripts/alcasar-watchdog.sh
25,15 → 25,15
case $EXT_DOWN in
"1")
logger "eth0 link down"
/bin/sed -i "s?diagnostic =.*?diagnostic = eth0 link down?g" $Index_Page
/bin/sed -i "s?diagnostic =.*?diagnostic = \"eth0 link down\";?g" $Index_Page
;;
"2")
logger "can't contact the default router"
/bin/sed -i "s?diagnostic =.*?diagnostic = can't contact the default router?g" $Index_Page
/bin/sed -i "s?diagnostic =.*?diagnostic = \"can't contact the default router\";?g" $Index_Page
;;
"3")
logger "can't contact the Internet DNS"
/bin/sed -i "s?diagnostic =.*?diagnostic = can't contact the Internet DNS?g" $Index_Page
/bin/sed -i "s?diagnostic =.*?diagnostic = \"can't contact the Internet DNS\";?g" $Index_Page
;;
esac
net_pb=`cat /etc/dnsmasq.d/alcasar-dnsmasq.conf|grep "address=/#/"|wc -l`
/web/index-access-deny.php
File deleted
/web/css/style_intercept.css
207,9 → 207,9
}
#acces_controle {
TEXT-ALIGN: center;
FONT-SIZE: 50px;
PADDING-TOP: 20px;
PADDING-BOTTOM: 20px;
FONT-SIZE: 40px;
PADDING-TOP: 25px;
PADDING-BOTTOM: 27px;
MARGIN: 0px;
}
#logo_acces {
252,13 → 252,21
}
#cadre_titre SPAN {
POSITION: absolute;
TOP: 80px;
WIDTH: 540px;
LEFT: 100px;
TOP: 70px;
WIDTH: 510px;
LEFT: 110px;
FONT-SIZE: 14px;
COLOR: red;
TEXT-ALIGN: center;
BORDER: 2px red solid;
PADDING: 2px;
BACKGROUND-COLOR: white;
}
#contenu_acces SPAN {
POSITION: relative;
BOTTOM: -150px;
FONT-FAMILY: "courier new";
}
#box_refuse {
FONT-SIZE: 16px;
MARGIN-LEFT: 130px;
/web/index.php
3,6 → 3,11
$private_ip = "192.168.182.1";
$network_pb = False;
$direct_access = False;
$diagnostic = "eth0 link down";
$remote_ip = ($_SERVER['REMOTE_ADDR']);
$tab = array();$user = array();
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;}
# Choice of language
23,7 → 28,7
$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>";
$l_logout_explain = "Vous permet de d&eacute;connectez une session ouverte.";
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_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_back_page = "<a href=\"javascript:history.back()\">Page pr&eacute;c&eacute;dente</a>";
61,7 → 66,10
echo "
<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 {
echo"
<DIV id=\"cadre_titre\" class=\"titre_refus\">
77,8 → 85,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\">
90,7 → 97,7
<SPAN>$l_logout</SPAN>
<IMG src=\"images/globe.png\">
<P>$l_logout_explain</P>
</DIV>
</DIV>
<DIV class=\"box_menu_large\" id=\"box_3\">
<SPAN>$l_acc_access</SPAN>
<IMG src=\"images/logo-alcasar.png\">
103,7 → 110,12
</DIV>
<DIV id=\"liens_redir\">
<P>$l_back_page</P>
</DIV>";}?>
</DIV>";}
if (($network_pb)&&(! $direct_access))
{
echo " <SPAN>Diagnostic : $diagnostic</SPAN>";
}
?>
</DIV>
</BODY>
</html>