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


Current Path : /var/www/html/mcu/adm/pgetadm/
Upload File :
Current File : /var/www/html/mcu/adm/pgetadm/degree.php

<?php

function getFaculty($aobj_context)
{
    $aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC); 
    
	$query = "SELECT distinct FFACULTY AS int_code,concat('Faculty of ', FFACULTY) AS val 
    FROM degree  
	where ifnull(fadmdeg,'') = 'P' and fdeggrp = 'PG' and ifnull(ffaculty,'') <> ''
    and fexamno = 'A'
    order by FFACULTY asc";
	$result1 = $aobj_context->mobj_db->GetAll($query);
    if(!$result1 && gettype($result1) == 'boolean'){
        $arr['msg'] = "Error while fetching data";
        echo $aobj_context->mobj_output->ToJSONEnvelope($arr,-1,"Failure"); 
        return;
    }
    
    if(count($result1) > 0) {
        $arr['faculty'] = $result1;
	    echo $aobj_context->mobj_output->ToJSONEnvelope($arr,0,"success"); 
	    return;
    }
    else {
        $arr['msg'] = "No data found";
        echo $aobj_context->mobj_output->ToJSONEnvelope($arr,-1,"Failure"); 
        return;
    }
}

function getFacultyDegree($aobj_context)
{
	$aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC); 
	// $ffaculty = $aobj_context->mobj_data["ffaculty"];
    session_start();
    $query = "select distinct  d.fdegree as int_code, concat(d.fdescpn,' - ',d.fdegree) as val 
    from degree  d 
    where d.fexamno = 'A' and ifnull(d.fadmdeg,'') = 'P' and ifnull(d.fdeleted,'') <> 'T'
    and fdeggrp = 'PG'
	order by ffaculty, d.fdescpn";
    $result1 = $aobj_context->mobj_db->GetAll($query);

    $query = "select ifnull(fappno,'') as fappno, ifnull(ffinsub,'F') as ffinsub, 
    ifnull(fpaystatus,'') as fpaystatus from pgstudadm 
    where fmobileno = '{$_SESSION['MOBILE']}'";

    $result2 = $aobj_context->mobj_db->GetRow($query);
    
    if(!$result1 && gettype($result1) == 'boolean'){
        $arr['msg'] = "Error while fetching data";
        echo $aobj_context->mobj_output->ToJSONEnvelope($arr,-1,"Failure"); 
        return;
    }
    if(count($result1) > 0) {

        $arr['fappno'] = $result2['fappno'];
        $arr['fpaystatus'] = $result2['fpaystatus'];
        if(count($result2) == 0)
            $arr['fappno'] = "";
        $arr['fmobileno'] = $_SESSION['MOBILE'];
        $arr['degree'] = $result1;
        echo $aobj_context->mobj_output->ToJSONEnvelope($arr,0,"success"); 
        return;
    }
    else {
        $arr['msg'] = "No data found";
        echo $aobj_context->mobj_output->ToJSONEnvelope($arr,-1,"Failure"); 
        return;
    }
}

?>