2009-05-20 15:49:08 +00:00
|
|
|
|
<?php
|
|
|
|
|
$firephp->log($_SESSION,'SESSION');
|
|
|
|
|
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');
|
|
|
|
|
$firephp->log($client,'client');
|
2009-05-25 07:35:14 +00:00
|
|
|
|
$siret = $_REQUEST['formSurv']['siret'];
|
2009-12-15 17:14:21 +00:00
|
|
|
|
$source = $_REQUEST['formSurv']['source'];
|
2009-05-20 15:49:08 +00:00
|
|
|
|
$set = setSurveillance($_REQUEST['formSurv']);
|
|
|
|
|
if($set!==FALSE){
|
2009-05-22 15:17:23 +00:00
|
|
|
|
$return = '<br/>L\'entit<69> a <20>t<EFBFBD> plac<61> sous surveillance.<br/>'."\n";
|
2009-05-20 15:49:08 +00:00
|
|
|
|
}else{
|
2009-05-22 12:56:04 +00:00
|
|
|
|
$return = '<br/>Une erreur a rendu impossible la mise sous surveillance.<br/>'."\n";
|
2009-05-20 15:49:08 +00:00
|
|
|
|
}
|
2009-12-15 17:14:21 +00:00
|
|
|
|
$return.= getSurveillance($source, $siret);
|
|
|
|
|
}
|
|
|
|
|
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'] : '' ;
|
|
|
|
|
echo formSurveillance($source, $siren, array(), FALSE);
|
2009-05-20 15:49:08 +00:00
|
|
|
|
}
|
2009-12-15 17:14:21 +00:00
|
|
|
|
echo $return;
|
2009-05-20 15:49:08 +00:00
|
|
|
|
?>
|