header("Content-Type: text/xml");
$fpara = fopen("param.ini", "r");
$ip= fgets($fpara);
if(isset($_GET['name']))
$sep= $_GET['name'];
else{
$sep="";
}
if(isset($_GET['pwd']))
$pwd=$_GET['pwd'];
else{
$pwd="";
}
//---------departement--------
if(isset($_GET['etat']))
$etat=$_GET['etat'];
else{
$etat="";
}
//---------------------------
//echo "ceci est : "."++++++++++".$sep." -----------".$pwd;
//$ip = getenv("REMOTE_ADDR");
//echo $ip;
if (file_exists("codage.tcs"))
$fp = fopen("codage.tcs", "r");
else{
//echo "fichier n'existe pas!!!";
echo("\r\n");
echo("FICHIER INEXISTANT !\r\n");
echo("FICHIER INEXISTANT !\r\n");
echo("\r\n");
exit();
}
//-----------------------------------------------------------------------
if (file_exists("pwd".$sep.".txt"))
{
$fp = fopen("pwd".$sep.".txt", "r");
$ligne1=fgets($fp,255);
$ligne1=trim($ligne1);
if ($ligne1==$sep.",".$pwd )
//--
{
}
else{
//echo "password incorrect ";
echo("\r\n");
echo("Password incorrect !\r\n");
echo("Password incorrect !\r\n");
echo("\r\n");
//echo "password incorrect ".$sep." - ".$pwd;
//fclose($fp);
exit();
}
}
else{
//echo "fichier passwrd n'existe pas!!! "."pwd".$sep.".txt";
echo "Configuation de service manquante (pwdxxx) inexistant!!! ";
exit();
}
//-----------------------------------------------------------------------
if (file_exists("adhan\adhan".$sep.".txt"))
{
unlink("adhan\adhan".$sep.".txt");
}
$fp = fopen("adhan\adhan".$sep.".txt","a");
$varr=$sep.",1";
//fseek($fp,0);
fputs($fp,$varr);
fclose($fp);
if (file_exists($sep."adhan.txt")){
unlink($sep."adhan.txt");
}
$fp=fopen($sep."adhan.txt", "a");
$ver="a";
fputs($fp,"a");
fclose($fp);
echo("\r\n");
echo("ADHAN\r\n");
echo("L'option ADHAN est activée\r\n");
echo("\r\n");
//***************************************************
//***************************************************
?>