2010-07-06 09:25:42 +00:00

27 lines
671 B
PHP

<?php
isset($_REQUEST['q']) ? $q = $_REQUEST['q'] : $q = '';
$params = explode('/', $q);
$action = $params[0];
require_once realpath(dirname(__FILE__)).'/surveillance.php';
switch ( $action ){
case 'ajouter':
$siret = $params[1];
$source = isset($params[2]) ? $params[2] : '' ;
$return = formSurveillance($source, $siret, array(), true);
echo $return;
break;
case 'setsurv':
$set = setSurveillance($_REQUEST['formSurv']);
FB::log($set, 'set');
if ( $set == '' ){
$return = '';
} elseif ( $set===false ){
$return = 'Erreur : Mise sous surveillance impossible.'."\n";
} else {
$return = 'Erreur : '.$set."\n";
}
echo $return;
break;
}