Subversion Repositories ALCASAR

Rev

Rev 3129 | Rev 3190 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log

Rev 3129 Rev 3132
Line 6... Line 6...
6
		$strResult = 0;
6
		$strResult = 0;
7
		// Déclaration des paramètres de connexion
7
		// Déclaration des paramètres de connexion
8
		$host = "localhost";
8
		$host = "localhost";
9
		$DB_USER = "radius";
9
		$DB_USER = "radius";
10
		$DB_RADIUS = "radius";
10
		$DB_RADIUS = "radius";
11
		$radiuspwd = "pJHKcy9Jv1HrCMHM";
11
		$radiuspwd = "";
12
		// Connexion au serveur
12
		// Connexion au serveur
13
		$mysqli = new mysqli($host, $DB_USER, $radiuspwd, $DB_RADIUS);
13
		$mysqli = new mysqli($host, $DB_USER, $radiuspwd, $DB_RADIUS);
14
		if ($texte == 'user') {$query = "SELECT UserName FROM userinfo";}
14
		if ($texte == 'user') {$query = "SELECT UserName FROM userinfo";}
15
		else { $query = "SELECT GroupName FROM radusergroup GROUP BY GroupName";}
15
		else { $query = "SELECT GroupName FROM radusergroup GROUP BY GroupName";}
16
		$result = $mysqli->query($query);
16
		$result = $mysqli->query($query);
Line 156... Line 156...
156
	$lan_status =  $l_lan." "." <img src='/images/state_ok.gif'> ";	
156
	$lan_status =  $l_lan." "." <img src='/images/state_ok.gif'> ";	
157
} else{
157
} else{
158
	$lan_status =  $l_lan." "." <img src='/images/state_error.gif'> ";
158
	$lan_status =  $l_lan." "." <img src='/images/state_error.gif'> ";
159
}
159
}
160
 
160
 
161
// Router status
161
// Router(s) status
162
$mask = strrchr($conf['PUBLIC_IP'],"/");
162
$mask = strrchr($conf['PUBLIC_IP'],"/");
163
if(routerTest($conf['GW'],$conf['EXTIF']) && ($conf['GW'].$mask != $conf['PUBLIC_IP'])){
163
if(routerTest($conf['GW'],$conf['EXTIF']) && ($conf['GW'].$mask != $conf['PUBLIC_IP'])){ //test only if ALCASAR is not directly connected to Internet
164
	$router_status =  $l_router." "." <img src='/images/state_ok.gif'> ";	
164
	$router_status =  $l_router." "." <img src='/images/state_ok.gif'> ";	
165
} else{
165
} else{
166
	$router_status =  $l_router." "." <img src='/images/state_error.gif'> ";
166
	$router_status =  $l_router." "." <img src='/images/state_error.gif'> ";
167
}
167
}
-
 
168
if($conf['MULTIWAN'] == 'on'){
-
 
169
	exec("grep \"^WAN\" " . CONF_FILE . " | wc -l", $nb_gw);
-
 
170
	for ($i = 1; $i <= $nb_gw[0]; $i++){
-
 
171
		$gw="WAN".$i; $tmp=explode(',', $conf[$gw], 2);
-
 
172
		$gw_ip=trim(str_replace('"', '', $tmp[0]));
-
 
173
		$nro_router = $i + 1;
-
 
174
		if(routerTest($gw_ip,$conf['EXTIF'])){
-
 
175
			$router_status = $router_status." $l_router"."$nro_router"." <img src='/images/state_ok.gif'> ";
-
 
176
		} else{	
-
 
177
			$router_status = $router_status." $l_router"."$nro_router"." <img src='/images/state_error.gif'> ";
-
 
178
		}
-
 
179
	}
168
 
180
}
169
// Internet status
181
// Internet status
170
if ((searchString("/var/www/html/index.php","/network_pb = false/")) && (internetTest())) {
182
if ((searchString("/var/www/html/index.php","/network_pb = false/")) && (internetTest())) {
171
	$internet_status =  $l_DNS." "." <img src='/images/state_ok.gif'> ";
183
	$internet_status =  $l_DNS." "." <img src='/images/state_ok.gif'> ";
172
	$version = dns_get_record("version.alcasar.net",DNS_TXT);
184
	$version = dns_get_record("version.alcasar.net",DNS_TXT);
173
	if (!empty($version)) {
185
	if (!empty($version)) {