0xV3NOMx
Linux ip-172-26-7-228 5.4.0-1103-aws #111~18.04.1-Ubuntu SMP Tue May 23 20:04:10 UTC 2023 x86_64



Your IP : 3.137.221.252


Current Path : /var/www/oasis/src_old/
Upload File :
Current File : /var/www/oasis/src_old/collfundtransfer.php

<?php


function updatecollfunddet($aobj_context)
{
	session_start();
	$college = $_SESSION['collcode'];
	$fremarks =  trim($aobj_context->mobj_data["fremarks"]);
	$famount =  trim($aobj_context->mobj_data["famount"]);
	


	if($college == '')
	{
		//var_dump($college);
		$data = 'Login again and enter';
		echo $aobj_context->mobj_output->ToJSONEnvelope($data,-1,"failure"); 
		return;
	}	

	$qry = "select * from college 
			where fcollcode = '{$college}' 
			and DATE_FORMAT(NOW(),'%Y-%m-%d') 
			BETWEEN DATE_FORMAT(fexfinefrom,'%Y-%m-%d') 
			AND DATE_FORMAT(fexfineto,'%Y-%m-%d')";
	$student_exam_details = $aobj_context->mobj_db->GetAll($qry); 
		
	if(count($student_exam_details) > 0)
	{

		$query = "select ifnull(fexfine,0) as fexfine from college where fcollcode = '{$college}'";
		$results = $aobj_context->mobj_db->GetRow($query); 

		$fexfine = $results['fexfine'];

		$query = "insert into collfundtransfer(fcollcode,famount,fremarks,ffine) values ('{$college}','{$famount}','{$fremarks}','{$fexfine}')";
		//var_dump($query);
		$studresults = $aobj_context->mobj_db->Execute($query);

		$id = $aobj_context->mobj_db->insert_id();

		if($studresults)
		{
			$data['appno'] = $id;

			$query = "select * from masbank where ifnull(fsuspend,'') <> 'T'";
			$results = $aobj_context->mobj_db->GetAll($query);	
			
			$data['masbank'] = $results;


			echo $aobj_context->mobj_output->ToJSONEnvelope($data,0,"success"); 
			return;
		}
		else
		{
			$data = 'Updatetion Failure';
			echo $aobj_context->mobj_output->ToJSONEnvelope($data,-1,"failure"); 
			return;
		}

	}
	else
	{
		$data = 'Fund Transfer Not Available.';
		echo $aobj_context->mobj_output->ToJSONEnvelope($data,-2,"failure"); 
		return;
	}	

}

function getbankdet($aobj_context)
{
	$college = $_SESSION['collcode'];

	if($college == '')
	{
		$data = 'Session Expired Login again and enter';
		echo $aobj_context->mobj_output->ToJSONEnvelope($data,-1,"failure"); 
		return;
	}

	$select_qry = "select fbank, fbankbranch, fbankaccno, fifsccode, fchequefavour, fbankplace, fbranchcode  
	from college 
	where fcollcode = '{$college}'"; 
	$cntrresults = $aobj_context->mobj_db->GetRow($select_qry);

	
	$data = $cntrresults;
	echo $aobj_context->mobj_output->ToJSONEnvelope($data,0,"success"); 
	return;
}

?>