<?
$host="localhost";
$user="root";
$pass="dHTRGL2J";
$base="sgu_uni4";
$connect=mysql_connect($host,$user,$pass);
if(mysql_errno() == 1203 || mysql_errno() == 1040) {
	echo" Off";
	exit; 
}
if(mysql_select_db($base, $connect)) {
	//tout est ok
} else {
	echo" Off";
	exit;
}
$sql2 = "SELECT Etat FROM matgraph_etat_serveur limit 1";
if($res2 = db_mysql_Query($sql2)or die('erreur sql<br>'.$sql2.'<br>'.mysql_error())) {
	$row2 = mysql_fetch_array($res2);
	if($row2[Etat] == "on") {
		echo" On";
	} else {
		echo" Off";
	}
}

?>