34 lines
1.1 KiB
PHP
34 lines
1.1 KiB
PHP
|
<?php
|
|||
|
session_start();
|
|||
|
$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']
|
|||
|
));
|
|||
|
|
|||
|
if($_REQUEST['q']=='setsurv'){
|
|||
|
$firephp->log($_REQUEST['formSurv'],'formSurv');
|
|||
|
$firephp->log($client,'client');
|
|||
|
$set = setSurveillance($_REQUEST['formSurv']);
|
|||
|
if($set!==FALSE){
|
|||
|
$return = 'L\'<27>tablissement <20> <20>t<EFBFBD> plac<61> sous surveillance.'."\n";
|
|||
|
}else{
|
|||
|
$return = 'Une erreur a rendu impossible la mise sous surveillance.'."\n";
|
|||
|
}
|
|||
|
$siret = $_REQUEST['formSurv']['siret'];
|
|||
|
$page = $_REQUEST['formSurv']['page'];
|
|||
|
$return.= getSurveillance($page, $siret);
|
|||
|
}elseif($_REQUEST['q']=='getsurv'){
|
|||
|
$return = getSurveillance($page, $siret);
|
|||
|
}elseif($_REQUEST['q']=='ajouter'){
|
|||
|
$siren = $_REQUEST['siren'];
|
|||
|
$source = $_REQUEST['source'];
|
|||
|
print formSurveillance($source, $siren, array(), FALSE);
|
|||
|
}
|
|||
|
print $return;
|
|||
|
?>
|