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


Current Path : /var/www/html/collportal/src/
Upload File :
Current File : //var/www/html/collportal/src/cgetclsdepts.php

<?php
function cgetclsdeptdet($aobj_context){
    $collcode = $aobj_context->mobj_data["collcode"];
    $usertype = $aobj_context->mobj_data["usertype"];
    $user = $aobj_context->mobj_data["user"];

    $query = "select ifnull(FDEPTCODE,'')as value, concat(ifnull(FDEPTNAME, ''), ' ', '[',ifnull(FDEPTCODE,''),']')as label from masdept 
            where ifnull(fdeleted,'') <> 'T'
            order by FDEPTNAME";
    $result = $aobj_context->mobj_db->GetAll($query);

   

    if($result){
        $arr['masteach'] = $result;
        $arr['masdept'] = $res1;
        echo $aobj_context->mobj_output->ToJSONEnvelope($result,0,"success"); 
    }else{
        $arr['msg']='Failed to Load';
		echo $aobj_context->mobj_output->ToJSONEnvelope($arr,0,"failure");
        return;
    }
}


function cgetclsTeachdet($aobj_context){
    $collcode = $aobj_context->mobj_data["collcode"];
    $usertype = $aobj_context->mobj_data["usertype"];
    $user = $aobj_context->mobj_data["user"];
    $dept = $aobj_context->mobj_data["dept"];

    if($usertype==='T'){
      $cnd= "and fteachcode='{$user}'";
    }
    $query= "SELECT ifnull(fteachcode,'')as value,concat(ifnull(fteachname,''),' ','[',ifnull(fteachcode,''),']')as label FROM masteach 
            WHERE fcollcode = '{$collcode}' {$cnd} ORDER BY fteachname";
            
    $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,0,"failure");
        return;
    }         
}
?>