<?php
session_start(); 
include_once("../../includes/functions_internal_user_sopf.inc.php"); 

$obj 		= 	new data(); 
$connect	=	$obj->funConnect(); 

$type		=	$_REQUEST['type']; 
$date		=	date('Y-m-d');

$sql		=	"SELECT RATE FROM rate_net_ton_master WHERE BUSINESS_TYPE = '".$type."' AND STATUS = 1 AND '".$date."' BETWEEN FROM_PERIOD AND TO_PERIOD";
$res		=	mysql_query($sql); 
$rows		=	mysql_fetch_object($res);

echo json_encode(['rate' => $rows->RATE]);