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.133.127.131
Current Path : /var/www/oasis/src/ |
| Current File : /var/www/oasis/src/attEntTeachWise.php |
<?php
function getAttEntTeachWiseSubject($aobj_context){
@session_start();
$aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);
$collcode = $_SESSION['collcode'];
$univcode = $_SESSION['FUNIVCODE'];
$teachcode = $aobj_context->mobj_data["teachcode"];
$classcode = $aobj_context->mobj_data["classcode"];
// var_dump($teachcode, $classcode);
// die();
$fild = "concat(ifnull(b.FSUBNAME,''),' - ',b.fssubname) as fsubname";
if($univcode == '052')
$fild = "concat(ifnull(b.FSUBNAME,''),' - ',b.fsubshort) as fsubname";
$query=" SELECT DISTINCT a.fsubcode,{$fild}
FROM attendsum a INNER JOIN `subject` b ON a.fdegree=b.fdegree AND a.fexamno=b.fexamno
and left(a.fsubcode,4) = b.fsubcode WHERE fclassid='{$classcode}'";
$result = $aobj_context->mobj_db->GetAll($query);
if($result)
{
echo $aobj_context->mobj_output->ToJSONEnvelope($result,0,"success");
}
else
{
$arr['msg'] = 'No Subject Found';
echo $aobj_context->mobj_output->ToJSONEnvelope($arr,-1,"failure");
}
}
function getAttEntTeachWiseSection($aobj_context){
@session_start();
$aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);
$collcode = $_SESSION['collcode'];
$teachcode = $aobj_context->mobj_data["teachcode"];
$classcode = $aobj_context->mobj_data["classcode"];
$query="SELECT DISTINCT s.fsection FROM `student` s inner join attendsum a on
s.fregno=a.fregno and s.fdegree=a.fdegree
WHERE a.fcollcode='{$collcode}'
AND a.fclassid = '{$classcode}'";
$result = $aobj_context->mobj_db->GetAll($query);
// var_dump($query);
// die();
if($result)
{
echo $aobj_context->mobj_output->ToJSONEnvelope($result,0,"success");
}
else
{
$arr['msg'] = 'No Subject Found';
echo $aobj_context->mobj_output->ToJSONEnvelope($arr,-1,"failure");
}
}
?>
|