2009-05-20 15:49:08 +00:00
|
|
|
<?php
|
|
|
|
require_once 'surveillance/surveillance.php';
|
|
|
|
|
|
|
|
$client = new SoapClient(null, array( 'trace' => 1,
|
|
|
|
'soap_version' => SOAP_1_1,
|
|
|
|
'location' => WEBSERVICE_URL,
|
|
|
|
'uri' => WEBSERVICE_URI,
|
|
|
|
'login' => $_SESSION['tabInfo']['login'],
|
|
|
|
'password' => $_SESSION['tabInfo']['password']
|
|
|
|
));
|
2009-07-21 15:08:08 +00:00
|
|
|
|
2009-12-15 17:14:21 +00:00
|
|
|
if($_REQUEST['q']=='setsurv')
|
|
|
|
{
|
2009-05-20 15:49:08 +00:00
|
|
|
$firephp->log($_REQUEST['formSurv'],'formSurv');
|
2009-12-16 10:10:35 +00:00
|
|
|
$set = setSurveillance($_REQUEST['formSurv']);
|
2009-12-22 07:59:16 +00:00
|
|
|
$firephp->log($set, 'set');
|
2009-12-16 10:10:35 +00:00
|
|
|
if($set!==false){
|
2010-02-10 17:27:03 +00:00
|
|
|
$return = '<br/>L\'entité a été placé sous surveillance.'."\n";
|
2009-05-20 15:49:08 +00:00
|
|
|
}else{
|
2009-12-16 08:44:02 +00:00
|
|
|
$return = '<br/>Une erreur a rendu impossible la mise sous surveillance.'."\n";
|
2009-05-20 15:49:08 +00:00
|
|
|
}
|
2009-12-15 17:14:21 +00:00
|
|
|
}
|
|
|
|
elseif($_REQUEST['q']=='getsurv')
|
|
|
|
{
|
|
|
|
$return = getSurveillance($source, $siret);
|
|
|
|
}
|
|
|
|
elseif($_REQUEST['q']=='ajouter')
|
|
|
|
{
|
|
|
|
$firephp->log($_REQUEST, 'REQUEST');
|
2009-05-20 15:49:08 +00:00
|
|
|
$siren = $_REQUEST['siren'];
|
2009-12-15 17:14:21 +00:00
|
|
|
$source = ( isset($_REQUEST['source']) && !empty($_REQUEST['source']) ) ? $_REQUEST['source'] : '' ;
|
2009-12-22 07:59:16 +00:00
|
|
|
$return = formSurveillance($source, $siren, array(), false);
|
2009-05-20 15:49:08 +00:00
|
|
|
}
|
2009-12-15 17:14:21 +00:00
|
|
|
echo $return;
|
2009-12-22 07:59:16 +00:00
|
|
|
exit;
|
2009-05-20 15:49:08 +00:00
|
|
|
?>
|