<?php
	require "../commonincludefiles.php";
	$branch_id 	= Escape($_REQUEST['branch_id']);
	$semester_id  = Escape($_REQUEST['semester_id'])-1;
	$division 	 = Escape($_REQUEST['division']);
	$gtuhead_id   = Escape($_REQUEST['gtuhead_id'])-3;
	
	$feesflag="";
	
	/* before update its work like dont ask for password to poweruser
	
	if($_SESSION["VedantnrUserRole"] != 'PowerUser')
		{
		$objStudentFeesRecMgmt  = new StudentFeesRecMgmt();
		$flag=$objStudentFeesRecMgmt->checknewadmission($student_id);
		}
	if($flag=='0')
	{
		$objUserMgmt  = new UserMgmt();
		$where=" and user_role='PowerUser'";
		$rs = $objUserMgmt->getAllRecords($limit,$start,$where,$order_field,$order_type);
			if(dbRows($rs) > 0)
			{
				while($rec = dbArray($rs))
				{
					$pass .= $rec['user_password'].",";
				}
			}
				
		$pass = substr($pass, 0, strlen($pass)-1); 
		$Data = array("count" => $flag, "pass" => $pass);
	}
	else
	{
	$Data = array("count" => $flag, "rom" => array());
	}
	echo json_encode($Data); */
	
	$condition = " and branch_id=$branch_id and semester_id=$semester_id and division='$division' and gtuhead_id=$gtuhead_id and find_in_set(".$_SESSION['aYearId'].",year_id)";
	$objcms_gtufeesreceiveMgmt  = new cms_gtufeesreceiveMgmt();
	$feesflag=$objcms_gtufeesreceiveMgmt->checkfeesreceived($condition);
		
	$Data = array("feesflag" => $feesflag);
	
	echo json_encode($Data);
?>