<?php
require "../commonincludefiles.php";
error_reporting(1);

$condition="";
$inquiry_id=  Escape($_POST["inquiry_id"]);
if($inquiry_id !="") {
	
	$condition .= " AND inquiry_id='".$inquiry_id."'"; 
  
    $objfollowUpMgmt = new followUpMgmt();  

	$result = $objfollowUpMgmt->getAllRecords(0,0,$condition,$order_field,$order_type) ;
		
	$num = dbRows($result);
	
	$i = 0;   
	
	//$griddata = array("total" => $num, "griddata" => array());
	
	 if	(dbRows($result) > 0) 
	 {
				$temparray = array();
				while($row = dbArray($result)){
					  	 	 	 	 	 	 	 	 	 	 	 	 	 	
					$temparray["followup_id"]  = $row["followup_id"];
					$temparray["leadfinal"]   = $row["leadfinal"];
					$temparray["followupdate"]  = $row["followupdate"];
					$temparray["followuptime"]   = $row["followuptime"];
					$temparray["inquier_mobileno"]  = $row["inquier_mobileno"];
					$temparray["comment"]   = $row["comment"];
					$griddata[$i] = $temparray;   
					$i++;
			}		
			echo '{"total":"'.$num.'","griddata":'.json_encode($griddata).'}';				
		} 
	
	//echo json_encode($griddata);	
}







?>
