<?   
error_reporting(0);
if (substr_count($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip')) ob_start("ob_gzhandler"); else ob_start();
session_start();
session_cache_limiter('private');
$cache_limiter 	= session_cache_limiter();
session_cache_expire(60);
$cache_expire 	= session_cache_expire(); 
date_default_timezone_set('Asia/Manila'); 
$CURRENT_DATE 	= date('Y-m-d H:i:s');
include_once('../config/minho.php');
include_once('../config/autoloadClass.php');
$autoload	=	new autoloadClass();
$mecon		=	new condbClass();
$formClass		=	new formClass();
$main		=	array();
$main2		=	array();
$arr3		=	array();
$main3		=	array();
$main4		=	array();
$mainId		=	(isset($_POST['mainid'])) ? $_POST['mainid'] : ""; 
 
//check first if reservation id exist in releases_to_broker database table else get records in buyer_payment_monitoring and reservation table
 
$mecon->query("SELECT Id, Contractor FROM contractor WHERE Status = :status ORDER BY Contractor");  
$mecon->bind(':status', 'active'); 
$main = $mecon->resultset(); 
$counter = count($main); 
$arr1 = array();
$arr2 = array();
$arr3 = array(); 
$other = array(); 
$userType	=	$_SESSION['danvilles_user_type'];
for($a=0; $a<$counter; $a++){  
/********************/

 
	$arr1['id']				= trim(html_entity_decode(stripslashes($main[$a]['Id']))); 
	$arr1['contractor']		= trim(html_entity_decode(stripslashes($main[$a]['Contractor'])));    
	$arr2[] 				= $arr1;
}

$arr3['data'] = $arr2;
echo json_encode($arr3); 
exit();
ob_end_flush();

