<?php

 require "commonincludefiles.php";
$task = '';
if ( isset($_POST['task'])){
   $task = $_POST['task'];
}
switch($task){
    case "deletemlhp":
        deletemlhp();
        break;
    default:
        echo "{failure:true}";
        break;
}

function deletemlhp(){
   $mlhp_Ids = $_POST['ids']; 
   if (version_compare(PHP_VERSION,"5.2","<"))  {    
     require_once("./JSON.php"); 
     $json = new Services_JSON();
     $deletemlhp_Id = $json->decode(stripslashes($mlhp_Ids));
   } else {
     $deletemlhp_Id = json_decode(stripslashes($mlhp_Ids));
   }
    if(sizeof($deletemlhp_Id)<1){
	  echo '0';
    }
	else {

		$objmlhp = new MlhpCertificateMgmt();
		$objmlhp ->deletemlhp_Id = implode(",",$deletemlhp_Id);			
		$objmlhp ->delete();
		echo '1';
	}        
}
?>
