<?php
include("../../db.php");
error_reporting(E_ALL);
header("Access-Control-Allow-Origin: * ");


    $id=$_REQUEST['id'];    
	
 $chkphoto=$db->getVal("select image from teacher_leave where id='".$id."'");
  
         if($chkphoto!=null) 
         {
     
          unlink("../../uploads/assignment/" . $chkphoto);
         
             
         }		
	
$flgUp=$db->delete("teacher_leave","where id='$id'");



	if($flgUp!="")
	{  
		echo json_encode(array('status' => 1, 'msg'=>'delete Successfully'));    
			
	}
	else
	{		
	 	echo json_encode(array('status' => 0, 'msg'=>'Result Not delete Please Try Again..!'));
	}
	 
	 
	 
	 ?>