<?php
 require "commonincludefiles.php";
$task = '';
if ( isset($_POST['task'])){
  $task = $_POST['task'];
}
switch($task){
    
    case "DELETESITE":
        deleteUsers();
        break;
    default:
        echo "{failure:true}";
        break;
}
function deleteUsers(){
   $Config_Ids = $_POST['ids']; 
   if (version_compare(PHP_VERSION,"5.2","<"))  {    
     require_once("./JSON.php"); 
     $json = new Services_JSON();
     $deleteConfig_Id = $json->decode(stripslashes($Config_Ids));
   } else {
     $deleteConfig_Id = json_decode(stripslashes($Config_Ids));
   }
    if(sizeof($deleteConfig_Id)<1)
	{
	  echo "0";
    }
	else {

		$objSiteConfigMgmt= new SiteConfigMgmt();
		$objSiteConfigMgmt->deleteConfig_Id = implode(",",$deleteConfig_Id);
		$objSiteConfigMgmt ->delete();
		echo "1";		
	}        
}
?> 