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.195.180
<?php
function uniliteGetRoomDet($aobj_context)
{
$aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);
$univcode = $aobj_context->mobj_data['univcode'];
$eDate = $aobj_context->mobj_data['eDate'];
$eSession = $aobj_context->mobj_data['eSession'];
$mob = $aobj_context->mobj_data['mob'];
if($univcode == '' || $eDate == "" || $eSession == "" || $mob == '')
{
$arr['msg'] = 'Invalid Params';
echo $aobj_context->mobj_output->ToJSONEnvelope($arr,-1,"failure");
return;
}
$query = "select a.fqpcode, m.fsubname, a.froomno, r.froomname, count(*) as falloted,
sum(if(ifnull(fansbookno,'') <> '', 1,0)) as fpresent,
sum(if(ifnull(fansbookno,'') = '', 1,0)) as fabsent
from anscapt a inner join (select fqpcode, fsubname from subject
where ifnull(fqpcode,'') <> ''
group by fqpcode) m on a.fqpcode = m.fqpcode
inner join masroom r on a.fcntrcode = r.fcollcode
and a.froomno = r.froomno
where a.fdoe = date_format(str_to_date('{$eDate}','%d/%m/%Y'),'%Y-%m-%d')
and a.fcntrcode = '1001'
group by a.fqpcode, a.froomno
order by a.fqpcode, a.froomno";
$result = $aobj_context->mobj_db->GetAll($menu_query);
// $update_query = "update masuser set fos = '{$appos}', fappver = '{$version}', FAPPLASTLOGIN = now()
// where fmobileno = '{$mobileno}'";
// $result = $aobj_context->mobj_db->Execute($update_query);
// $menu_query = "select fid, fmenuid, ficon,fcolor, fdispname, forder,fismainmenu,fsubmenu,fmainmenu
// from menu_schema_new
// where fmodtype = 'Lite' and fusertype = '{$usertype}'
// and funivcode = '{$univcode}' and factive = 'T'
// order by fismainmenu desc,forder";
//$result = $aobj_context->mobj_db->GetAll($menu_query);
if($result)
{
echo $aobj_context->mobj_output->ToJSONEnvelope($result,0,"success");
}
else
{
$arr['msg'] = 'Invalid Register No.';
echo $aobj_context->mobj_output->ToJSONEnvelope($arr,-1,"failure");
}
}
|