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 : 18.191.233.198
<?php
function cviewandeditcls($aobj_context){
$collcode = $aobj_context->mobj_data["collcode"];
$usertype=$aobj_context->mobj_data["usertype"];
$user=$aobj_context->mobj_data["user"];
if($usertype==='T'){
$cnd= "and a.fteachcode='{$user}'";
}else{
$cnd='';
}
$query="SELECT CONCAT(IFNULL(m.fteachname,''),' ','[',IFNULL(a.fteachcode,''),']') AS teachname,
a.fcollcode,a.fclassname,a.fclassid FROM attclass a
INNER JOIN masteach m ON m.fteachcode=a.fteachcode
WHERE a.fcollcode='{$collcode}'$cnd";
$result = $aobj_context->mobj_db->GetAll($query);
if($result){
echo $aobj_context->mobj_output->ToJSONEnvelope($result,0,"success");
}else{
$arr['msg']='Failed to Load';
echo $aobj_context->mobj_output->ToJSONEnvelope($arr,-1,"failure");
return;
}
}
?>
|