<?php
session_start();
$currentBaseDir = dirname($_SERVER['PHP_SELF']);
include($_SESSION['basedir']."core.php");

//var_dump($_REQUEST);

$svaTool = new svaTool();

$Id = "";

$ids = $_REQUEST['ids'];
$ids = rtrim($ids, ",");
$idsList = explode(",", $ids);
$found = false;
$errorCode = 0;


for ($i = 0; $i < count($idsList); $i++) {

    $item = trim($idsList[$i]);
    $Id .= "'" . $item . "',";
    
}

$Id = rtrim($Id, ',');


//$Id = $_REQUEST['data'];
$errorCode = 0;

if ($errorCode == 0) {
$qosCode = "";


$dba->UpdateAddKnownledgeBase(3, $Id, NULL, NULL,NULL, NULL);
   //$errorCode = 10;
}




switch ($errorCode) {

    case 0 : $msg = "{ \"errorCode\": $errorCode,\"errorMessage\" :\"ELEMENT SUPPRIME AVEC SUCCES !\"  }"; 
        break;
    case 1 : $msg = "{ \"errorCode\": $errorCode,\"errorMessage\" :\"ERREUR ! LE NOM DU PARAMETRE EST INVALIDE !\"  }";
        break;
    case 2 : $msg = "{ \"errorCode\": $errorCode,\"errorMessage\" :\"ERREUR ! VEUILLEZ SAISIR UNE VALEUR POUR CE PARAMETRE. !\"  }"; 
        break;
   
   
	 
}


echo $msg ;


?>