Subversion Repositories ALCASAR

Compare Revisions

Ignore whitespace Rev 486 → Rev 498

/web/intercept.php
10,7 → 10,7
# notice and this permission notice is included in all copies or
# substantial portions of the software.
 
$organisme = "steweb57";
$organisme = "";
# Redirects from CoovaChilli (chilli daemon) :
# Response to login:
# success : if login successful
28,7 → 28,7
$uamsecret = "Mkb0pAEE";
 
# URL loaded after success authenticates (let blank for browser defaults)
$adminurl = "http://www.sfr.fr";
$adminurl = "";
 
# Our own path
$loginpath = $_SERVER['PHP_SELF'];
/web/acc/admin/auth_exceptions.php
13,6 → 13,7
$Langue = explode(",",$_SERVER['HTTP_ACCEPT_LANGUAGE']);
$Language = strtolower(substr(chop($Langue[0]),0,2)); }
if($Language == 'fr'){
$l_error_open_file = "Erreur d'ouverture du fichier";
$l_trusted_sites = "Sites Internet de confiance";
$l_trusted_sites_explain1 = "Entrez ici les noms de site ou d'URLs Internet pouvant être joints sans authentification";
$l_trusted_sites_explain2 = "Entrez un nom par ligne";
19,12 → 20,15
$l_trusted_sites_list = "Liste de sites Internet de confiance";
$l_trusted_urls_list = "Liste d'URLs Internet de confiance";
$l_trusted_mac = "Équipements de confiance";
$l_trusted_mac_explain1 = "Entrez ici les adresses MAC des équipements autorisés à joindre Internet sans authentification";
$l_trusted_mac_explain2 = "Entrez une adresse MAC par ligne";
$l_trusted_mac_explain = "Entrez ici les adresses MAC des équipements autorisés à joindre Internet sans authentification";
$l_trusted_mac_list = "Liste des adresses MAC de confiance";
$l_trusted_mac_address = "Adresse MAC autorisées";
$l_trusted_mac_info = "Information équipement";
$l_trusted_mac_del = "Supprimer de la liste";
$l_submit = "Enregistrer";
}
else {
$l_error_open_file = "File open error";
$l_trusted_sites = "Trusted Internet sites";
$l_trusted_sites_explain1 = "Enter name of Internet sites or URLS that could be joined without authentication";
$l_trusted_sites_explain2 = "Enter one name per line";
31,10 → 35,13
$l_trusted_sites_list = "Trusted Internet sites list";
$l_trusted_urls_list = "Trusted Internet URLs list";
$l_trusted_mac = "Trusted Equipments";
$l_trusted_mac_explain1 = "Enter MAC address of equipments that could contact Internet without authentification";
$l_trusted_mac_explain2 = "Enter one Mac address per line";
$l_trusted_mac_explain = "Enter MAC address of equipments that could contact Internet without authentification";
$l_trusted_mac_list = "Trusted MAC addresses list";
$l_trusted_mac_address = "Allowed MAC adress MAC";
$l_trusted_mac_info = "Equipment information";
$l_trusted_mac_del = "Delete from list";
$l_submit = "Submit";
 
}
if (isset($_POST['choix'])){
switch ($_POST['choix'])
178,6 → 185,57
<tr><th><?php echo $l_trusted_mac ;?></th></tr>
<tr bgcolor="#FFCC66"><td><img src="/images/pix.gif" width="1" height="2"></td></tr>
</TABLE>
 
<table width="100%" border=1 cellspacing=0 cellpadding=1>
<tr><td colspan=2 align="center">
<?
echo "$l_trusted_mac_explain</td></tr>";
echo "<tr><td align='center' valign='middle'>";
echo "<FORM action='$_SERVER[PHP_SELF]' method='POST'>";
echo "<table cellspacing=2 cellpadding=3 border=1>";
echo "<tr><th>$l_trusted_mac_address<th>$l_trusted_mac_info<th>$l_trusted_mac_del</tr>";
// On lit et on interprète le fichier de filtrage de protocoles
$trusted_mac_file="/usr/local/etc/alcasar-macallowed";
if (file_exists($trusted_mac_file))
{
$pointeur=fopen($trusted_mac_file,"r");
while (!feof ($pointeur))
{
$ligne=fgets($pointeur, 4096);
if ($ligne)
{
$field=explode(" ", $ligne);
$mac_info=trim($field[2],"#");
echo "<tr><td>$field[1]";
echo "<td>$mac_info";
echo "<td><input type='checkbox' name='del-$field[1]'>";
echo "</tr>";
}
}
fclose($pointeur);
}
else {
echo "$l_error_open_file $trusted_mac_file";
}
?>
</table>
<input type='hidden' name='choix' value='change'>
<input type='submit' value='<?echo"$l_submit";?>'>
</form>
</td>
<td valign='middle' align='center'>
<form action='net_filter.php' method='POST'>
<table cellspacing=2 cellpadding=3 border=1>
<tr><th><?echo"$l_trusted_mac_address<th>$l_trusted_mac_info";?></tr>
<tr><td><input type='text' name='add_proto' size='10'></td>
<td><input type='text' name='add_port' size='5'></td>
<input type='hidden' name='choix' value='new_proto'>
<td><input type='submit' value='<?echo"$l_add_to_list";?>'></td>
</tr></table>
</form>
</td></tr>
</table>
 
<TABLE width="100%" border=0 cellspacing=0 cellpadding=1>
<tr bgcolor="#666666"><td>
<TABLE width="100%" border=0 cellspacing=0 cellpadding=2>
/web/index.php
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&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 = "Page principale de votre portail captif";
$l_acc_access = "<a href=\"https://$private_ip/acc\">Acc&egrave;s au centre de gestion (ALCASAR Control Center)</A>";
$l_acc_access = "<a href=\"https://$hostname/acc\">Acc&egrave;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_logout = "<a href=\"http://$hostname:3990/logoff\">D&eacute;connexion</A>";}
$l_password_change = "<a href=\"https://$hostname/pass\">Changer votre mot de passe</A>";
$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>";
}
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>";
}