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.15.239.207
<?php
function attupd($aobj_context){
$aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);
$adate = $aobj_context->mobj_data["adate"];
$litime = $aobj_context->mobj_data["litime"];
$lotime = $aobj_context->mobj_data["lotime"];
$type = $aobj_context->mobj_data["type"];
$empl = $aobj_context->mobj_data["empl"];
if($type == 'Login')
{
$query = "select d.fdeptname, d.flogitime, d.flogotime,
if(timediff(time(now()), time(d.flogitime))>'00:15:00','PR','PR') as diff
from logisys3_oums.masdept d inner join logisys3_oums.attendance m on d.fdeptcode = m.fattndept
where m.femplcode = '{$empl}'
and fattndate = '{$adate}'";
$userinfo = $aobj_context->mobj_db->getRow($query);
$glogitime = $userinfo['flogitime'];
$query = "update logisys3_oums.attendance set fattnstat='PR',
flogistat = '',
fattnremk = '',
flogitime = '{$litime}',
flogidiff = timediff('{$litime}', time('{$glogitime}')),
flogiremk = '',
fupdttime = concat('{$adate}',' ','{$litime}')
where femplcode = '{$empl}'
and fattndate = '{$adate}'
and ifnull(flogostat,'') = ''";
$res = $aobj_context->mobj_db->Execute($query);
$query = "update logisys3_oums.attenddet set
flogitime = '{$litime}'
where femplcode = '{$empl}'
and fattndate = '{$adate}'
and ftype = 'I'";
$res1 = $aobj_context->mobj_db->Execute($query);
if($res && $res1){
$arr = "Updated Succefuly";
echo $aobj_context->mobj_output->TOJSONEnvelope($arr,0,"success");
}
else{
$arr = "Please try later";
echo $aobj_context->mobj_output->TOJSONEnvelope($arr,-1,"failed");
}
}
}
function getCollegesAsperDeggrp($aobj_context){
$aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);
$univcode = $aobj_context->mobj_data["univcode"];
$deggrp = $aobj_context->mobj_data["deggrp"];
$query = "select distinct c.fcollcode, c.fcollname,c.ftown, dg.fdeggrp from college c
inner join student s on s.fcollcode = c.fcollcode
inner join degree d on d.fdegree = s.fdegree
inner join deggrp dg on d.fdeggrp = dg.fdeggrp
where dg.fdeggrp ='{$deggrp}' order by fcollcode";
$result=$aobj_context->pobj_db->GetAll($query);
if($result){
echo $aobj_context->mobj_output->TOJSONEnvelope($result,0,"success");
}
else{
$arr['msg']="Please try later";
echo $aobj_context->mobj_output->TOJSONEnvelope($arr,-1,"failed");
}
}
?>
|