8,7 → 8,7 |
$host = "localhost"; |
$DB_USER = "radius"; |
$DB_RADIUS = "radius"; |
$radiuspwd = "pJHKcy9Jv1HrCMHM"; |
$radiuspwd = ""; |
// Connexion au serveur |
$mysqli = new mysqli($host, $DB_USER, $radiuspwd, $DB_RADIUS); |
if ($texte == 'user') {$query = "SELECT UserName FROM userinfo";} |
158,14 → 158,26 |
$lan_status = $l_lan." "." <img src='/images/state_error.gif'> "; |
} |
|
// Router status |
// Router(s) status |
$mask = strrchr($conf['PUBLIC_IP'],"/"); |
if(routerTest($conf['GW'],$conf['EXTIF']) && ($conf['GW'].$mask != $conf['PUBLIC_IP'])){ |
if(routerTest($conf['GW'],$conf['EXTIF']) && ($conf['GW'].$mask != $conf['PUBLIC_IP'])){ //test only if ALCASAR is not directly connected to Internet |
$router_status = $l_router." "." <img src='/images/state_ok.gif'> "; |
} else{ |
$router_status = $l_router." "." <img src='/images/state_error.gif'> "; |
} |
|
if($conf['MULTIWAN'] == 'on'){ |
exec("grep \"^WAN\" " . CONF_FILE . " | wc -l", $nb_gw); |
for ($i = 1; $i <= $nb_gw[0]; $i++){ |
$gw="WAN".$i; $tmp=explode(',', $conf[$gw], 2); |
$gw_ip=trim(str_replace('"', '', $tmp[0])); |
$nro_router = $i + 1; |
if(routerTest($gw_ip,$conf['EXTIF'])){ |
$router_status = $router_status." $l_router"."$nro_router"." <img src='/images/state_ok.gif'> "; |
} else{ |
$router_status = $router_status." $l_router"."$nro_router"." <img src='/images/state_error.gif'> "; |
} |
} |
} |
// Internet status |
if ((searchString("/var/www/html/index.php","/network_pb = false/")) && (internetTest())) { |
$internet_status = $l_DNS." "." <img src='/images/state_ok.gif'> "; |