<?php

session_start();
include './core.php';

$svaTool = new svaTool();

$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, ',');



if ($errorCode == 0) {
$qosCode = "";
$dba->UpdateAddDelUsers(3, $Id, NULL, NULL, NULL, NULL, NULL, NULL , NULL, NULL, NULL , NULL, NULL, NULL, NULL, NULL, NULL, NULL , NULL, NULL, NULL , NULL, NULL, NULL, NULL, NULL, NULL, NULL , NULL, NULL, NULL , NULL  ) ;
$dba->UpdateAddDelUserRoles(3,  $Id, 0, 0);

}




switch ($errorCode) {

    case 0 : $msg = "{ \"errorCode\": $errorCode,\"errorMessage\" :\"UTILISATEUR(S) SUPPRIME(S) AVEC SUCCES !\"  }"; 
        break;
    case 1 : $msg = "{ \"errorCode\": $errorCode,\"errorMessage\" :\"ERREUR ! IMPOSSIBLE DE SUPPRIMER L'UTILISATEUR !\"  }";
        break;
    case 2 : $msg = "{ \"errorCode\": $errorCode,\"errorMessage\" :\"ERREUR ! VEUILLEZ SAISIR UNE VALEUR POUR CE PARAMETRE. !\"  }"; 
        break;
   
   
	 
}

echo $msg;
?>