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


   $id=$_REQUEST['id'];    
	
 $chkphoto=$db->getVal("select image_name from image_calendar where id='".$id."'");

  
         if($chkphoto!=null) 
         {
     
         unlink("../../uploads/calendar/" . $chkphoto);
         
             
         }	

	
	
$flgUp=$db->delete("image_calendar","where id='$id'");



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