<?php
require "../commonincludefiles.php";
$task = '';
if ( isset($_POST['task'])){
  $task = $_POST['task'];
}
switch($task){
    case "LISTING":
        getList();
        break;
    case "DELETESTU":
        deletePresidents();
        break;
    default:
        echo "{failure:true}";
        break;
}

function deletePresidents(){

   $feesreceive_id = $_POST['ids']; 
   $delfeesreceive_id = json_decode(stripslashes($feesreceive_id));
	
    if(sizeof($delfeesreceive_id)<1){
	  echo '0';
    }
	else {

		$objStudentFeesRecMgmt = new StudentFeesRecMgmt();
		$objStudentFeesRecMgmt->feesreceive_id = implode(",",$delfeesreceive_id);
		$objStudentFeesRecMgmt->delete();
		
		$objStudentFeesRecDetailMgmt = new StudentFeesRecDetailMgmt();
		$objStudentFeesRecDetailMgmt->feesreceive_id = implode(",",$delfeesreceive_id);
		$objStudentFeesRecDetailMgmt->delete();
		
		echo '1';
	}        
}
?> 