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


Current Path : /var/www/oasis/src/
Upload File :
Current File : /var/www/oasis/src/rvrt_report.php

<?php
    function getRVRTDeggrp($aobj_context){
        session_start();
        $collcode = $_SESSION['collcode'];
        // $query = "select distinct fdeggrp, concat(fdeggrp, ' - ', fdescpn) as fdesc from deggrp";
        
        $query = "select distinct gr.fdeggrp,concat(gr.fdeggrp,' - ',gr.fdescpn) as fdesc from res_stud rs
        inner join degree dg on rs.fdegree = dg.fdegree 
        inner join deggrp gr on dg.fdeggrp = gr.fdeggrp
        where rs.fcollcode='{$collcode}'";
        $result=$aobj_context->mobj_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");
        }
    }

    function getRVRTDegree($aobj_context){
        session_start();
        $deggrp = $aobj_context->mobj_data['deggrp'];

        if($deggrp === "null" || $deggrp === "All"){
            $cond = "ifnull(dg.fdeggrp, '') like '%'";
        }else{
            $cond = "dg.fdeggrp='{$deggrp}'";
        }
        $collcode = $_SESSION['collcode'];
        // $query = "select distinct d.fdegree, 
        //           concat(d.fdegree, ' - ', d.fdescpn) as fdesc from degree d
        //           inner join colldeg c on c.fdegree = d.fdegree where {$cond}
        //           and fcollcode='{$collcode}'";

        $query = "select distinct rs.fdegree,concat(rs.fdegree, ' - ', dg.fdescpn) as fdesc from res_stud rs
        inner join degree dg on rs.fdegree = dg.fdegree 
        where {$cond} and rs.fcollcode='{$collcode}' order by rs.fdegree;";

        $result=$aobj_context->mobj_db->GetAll($query);

        if($result){
             echo $aobj_context->mobj_output->TOJSONEnvelope($result,0,"success");
        }else{
            $arr['msg']="No Data Found";
            echo $aobj_context->mobj_output->TOJSONEnvelope($arr,-1,"failed");
        }
    }
?>