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--------
//---------------------------
//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"))
{
//echo "fichier passwrd n'existe pas!!! "."pwd".$sep.".txt";
///§§§echo ("Configuation de service manquante (pwdxxx) inexistant!!! ");
echo("\r\n");
echo("Configuation de service manquante (pwdxxx) inexistant!!! \r\n");
echo("Configuation de service manquante (pwdxxx) inexistant!!! \r\n");
echo("\r\n");
exit();
}
else
{
$fp = fopen("pwd".$sep.".txt", "r");
$ligne1=fgets($fp,255);
$ligne1=trim($ligne1);
//----------------------------------------------------------------
if ($ligne1!==$sep.",".$pwd )
{
echo("\r\n");
echo("Password incorrect !\r\n");
echo("Password incorrect !\r\n");
echo("\r\n");
fclose($fp);
exit();
}
else
{
//===========================================
echo("\r\n");
//!!
//echo("Enregistrement des Appels :\r\n");
echo("Choisir l'une des options suivantes :\r\n\r\n E : Enregistrement de l'appel en cours...\r\n\r\n X : Annuler l'enregistrement");
//!!
echo ("\r\n");
echo ("E\r\n");
echo ("http://".$ip."/Services_Cisco/rec1.php?name=".$sep."\r\n");
echo ("1\r\n");
echo ("\r\n");
//--------------
echo ("\r\n");
echo ("X\r\n");
echo ("http://".$ip."/Services_Cisco/rec2.php?name=".$sep."\r\n");
echo ("5\r\n");
echo ("\r\n");
//--------------
echo ("\r\n");
echo ("EXIT\r\n");
echo ("SoftKey:Exit\r\n");
echo ("3\r\n");
echo ("\r\n");
echo ("\r\n");
}
}
?>