<?php
	session_start();
include "../class/class.MySQL.php";
require '../class/resizeImage.php';
$db=new MySQL();

$from_date1='';
$to_date1='';

if(!empty($_REQUEST['from_date'])){
$from_date=$_REQUEST['from_date'];
$from_date1 = date('Y-m-d', strtotime($from_date));
}

if(!empty($_REQUEST['to_date'])){
$to_date=$_REQUEST['to_date'];
$to_date1 = date('Y-m-d', strtotime($to_date));
}

$query = "SELECT *,designation.desig_name,DATE_FORMAT(interv_schd,'%d %b %Y %h:%i %p') as int_date FROM  `interview` LEFT JOIN designation ON designation.desig_id=interview.interv_desg
 where 1 AND interv_status!='Shortlisted' ";

if($from_date1!="" && $to_date1!=""){
$query.=" and date(interv_schd) between '$from_date1' and '$to_date1'";
}
include "pagingserch.php";

$query.=" LIMIT $start, $limit";
//echo $sq_arr;
if(isset($_REQUEST['page'])){
$page=$_REQUEST['page'];
}else{
$page=15;
}

$pagecnt=$start;
$getinterview = $db->fetchQuery($query);
	
	//echo $count = count($getrecruitment);
	
	//echo $getrecruitment[] = $pagination;
	
	$count = count($getinterview);
	$getinterview[$count-1]['totalrows'] = $total_pages;
	//$getrecruitment[$count-1]['items_per_page'] = $page;
	
	echo '{"getinterview":'.json_encode($getinterview).'}';

?>

	
    
    
