<?php
include("../db.php");
header("Access-Control-Allow-Origin: * ");
date_default_timezone_set("Asia/kolkata");
		 
		 $id= $_REQUEST['idno'];		 
		 $session=$_REQUEST['session'];
		 $rid=$_REQUEST['rid'];
	
     $sql= $db->getRow("SELECT id,udate,Months,total,amount as paid,remaining,payment_mode,added_by,detail from receipt  WHERE id='$rid' and idno='$id' and session='$session'") ;
     $data['tution']=$sql; 
     
     $student = $db->getRow("select name, fname, class, section, admissionno from student where idno='$id' ");

	 // hostel	 
	 
	   $sql1= $db->getRow("SELECT id,udate,Months,total,amount as paid,remaining,payment_mode,added_by,detail from hostel_receipt  WHERE id='$rid' and idno='$id' and session='$session'") ;
	 $data['hostel']=$sql1; 
	
if(is_array($data) && count($data)>0)
	{  
		echo json_encode(array('status' => 1, 'msg'=>'Record found Successfully..!', "data"=>$data, "logo"=>$LinksDetails["logo"], "site_name"=>$LinksDetails["site_name"], "content"=>$LinksDetails["contact_content"], "student"=>$student ));    
			
	}else
	{		
	 	echo json_encode(array('status' => 0, 'msg'=>'No Record Found..!', "data"=>$data));
	}

?>