extranet/www/pages/ajax_surveillance.php

36 lines
1.0 KiB
PHP
Raw Normal View History

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
if($_REQUEST['q']=='setsurv')
{
2009-05-20 15:49:08 +00:00
$firephp->log($_REQUEST['formSurv'],'formSurv');
$set = setSurveillance($_REQUEST['formSurv']);
2009-12-22 07:59:16 +00:00
$firephp->log($set, 'set');
if($set!==false){
$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
}
}
elseif($_REQUEST['q']=='getsurv')
{
$return = getSurveillance($source, $siret);
}
elseif($_REQUEST['q']=='ajouter')
{
$firephp->log($_REQUEST, 'REQUEST');
$siret = $_REQUEST['siret'];
$source = ( isset($_REQUEST['source']) && !empty($_REQUEST['source']) ) ? $_REQUEST['source'] : '' ;
$return = formSurveillance($source, $siret, array(), false);
2009-05-20 15:49:08 +00:00
}
echo $return;
2009-12-22 07:59:16 +00:00
exit;
2009-05-20 15:49:08 +00:00
?>