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.135.208.236


Current Path : /var/www/html/admission/src/
Upload File :
Current File : /var/www/html/admission/src/umenu.php

<?php

function uniclareGetMenus($aobj_context)
{
	$aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);

	$ismainmenu = $aobj_context->mobj_data['ismainmenu'];
	$mainmenu = $aobj_context->mobj_data['mainmenu'];
	$univcode = $aobj_context->mobj_data['univcode'];

	if($ismainmenu == '' || $mainmenu == '' || $univcode == '')
	{
		$arr['msg'] = 'Invalid Params';
		echo $aobj_context->mobj_output->ToJSONEnvelope($arr,1,"failure");
		return;
	}

	if($ismainmenu == 'T' )
	{
		$cond = "and ifnull(fismainmenu,'') = 'T'";
	}
	else
	{
		$cond = "and ifnull(fsubmenu,'') = 'T' and fmainmenu = '{$mainmenu}'";
	}

	$menu_query = "select fid, fmenuid, ficon, fdispname, forder from menu_schema 
		where fmodtype = 'App' {$cond}
		and funivcode = '041' and factive = 'T' 
		order by forder";

	$result = $aobj_context->mobj_db->GetAll($menu_query);

	if(count($result) > 0)
	{
		$arr['menu'] = $result;
		echo $aobj_context->mobj_output->ToJSONEnvelope($arr,0,"success"); 
	}
	else
	{
		$arr['msg'] = 'Invalid Register No.';
		echo $aobj_context->mobj_output->ToJSONEnvelope($arr,-1,"failure");
	}

}