Subversion Repositories ALCASAR

Compare Revisions

Ignore whitespace Rev 782 → Rev 783

/web/index.php
1,6 → 1,6
<?php
$hostname = "alcasar";
$network_pb = False;
$network_pb = True;
$cert_add = "http://alcasar/certs";
$direct_access = False;
$diagnostic = "eth0 link down";
10,7 → 10,7
$nb_connection_history = 3;
 
# on discrimine les accès directs sur Alcasar par rapport aux redirections (blacklist ou pannes rso)
if (($_SERVER['HTTP_HOST'] == $_SERVER['SERVER_ADDR']) || preg_match ("/^alcasar/", $_SERVER['HTTP_HOST']) || preg_match ("/^$hostname/", $_SERVER['HTTP_POST']))
if (($_SERVER['HTTP_HOST'] == $_SERVER['SERVER_ADDR']) || preg_match ("/^alcasar/", $_SERVER['HTTP_HOST']) || preg_match ("/^$hostname/", $_SERVER['HTTP_HOST']))
{
$direct_access=True;
exec ("sudo /usr/sbin/chilli_query list|grep $remote_ip" , $tab);
30,7 → 30,7
 
$l_connected = "connected"; // a traduire (choix de la langue ci-dessous mais nécessitant de $connection_history)
// si on a pas d'accès à la bdd, la page s'affiche quand même correctement
if ($user[4] != "0"){
if ((isset ($user[4])) && ($user[4] != "0")){
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");
102,12 → 102,15
$l_install_certif_more = "<a href=\"$cert_add/certificat_alcasar_ca.cert\">Install ALCASAR AC Certificate</a>";
$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>";
if ($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://www.google.fr\">Open an Internet session</a>";}
else {
$l_logout_explain = "Close the session of the user actualy connecterd.<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>";}
if (isset ($user[5])) {
$l_logout_explain = "Close the session of the user actualy connecterd.<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>";
}
}
$l_password_change = "<a href=\"https://$hostname/pass\">Change your password</a>";
$l_password_change_explain = "Ridirect you on password change page.<br><br> You should already have an Internet access account.";
$l_back_page = "<a href=\"javascript:history.back()\">Previous page</a>";
127,7 → 130,7
$img_false = "interdit.png";
$img_internet = $img_connect;
 
if ($user[4] == "0") {
if ((isset ($user[4])) && ($user[4] == "0")) {
if (! $network_pb) {
$img_internet = $img_access;
}