<?php

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

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

		$objrelievingorder = new relievingorderCertificateMgmt();
		$objrelievingorder ->deleterelievingorder_Id = implode(",",$deleterelievingorder_Id);			
		$objrelievingorder ->delete();
		echo '1';
	}        
}
?>
