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="";
}
//---------poste--------
if(isset($_GET['poste']))
$poste=$_GET['poste'];
else{
$poste="";
}
//---------------------------
//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("Pwd incorrect\r\n");
echo("Pwd 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("C:\datawtx\cico.txt"))
{
$fp = fopen("C:\datawtx\cico.txt","r");
$c=fgets($fp);
}
$fp = fopen("C:\datawtx\cico.txt","a");
$varr="X".$sep."§";
//fseek($fp,0);
fputs($fp,$varr);
fclose($fp);
$trouv=0;
$time=0;
$m="init" ;
while($trouv==0 and $time<=10)
{
if(file_exists("C:\datawtx\x.txt"))
{
$fp = fopen("c:\datawtx\x.txt","r");
$ver=fgets($fp);
$tab=split(",",$ver);
for($i=0;$i\r\n");
echo("Poste Verrouille\r\n");
echo("Poste Verrouille\r\n");
echo ("\r\n");
echo ("EXIT\r\n");
echo ("Key:Services\r\n");
echo ("3\r\n");
echo ("\r\n");
echo("\r\n");
exit();
}
if($trouv==0)
{
echo("\r\n");
echo("ERREUR SERVICE\r\n");
echo("Vérifier sce\r\n");
echo("\r\n");
exit();
}
?>