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 : 18.222.161.245


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

<?php
  function getDegree($aobj_context){
    $collcode = $aobj_context->mobj_data["collcode"];
    $query = "select distinct ifnull(d.fdegree, '')as value, 
              concat(ifnull(fdescpn, ''), ' ', '[', ifnull(c.fdegree, ''), ']')as label 
              from degree d inner join colldeg c on c.fdegree = d.fdegree 
              inner join student s on s.fcollcode = c.fcollcode and s.fdegree = c.fdegree
              where ifnull(c.fdegree, '') <> '' and ifnull(c.fcollcode, '')='{$collcode}' 
              and ifnull(d.fdeleted, '')<>'T'";
    $res = $aobj_context->mobj_db->GetAll($query);
    if($res){
      echo $aobj_context->mobj_output->ToJSONEnvelope($res, 0, "success"); 
    }else{
      $arr['msg'] = "No data found";
      echo $aobj_context->mobj_output->ToJSONEnvelope($data, -1, "failure"); 
      return;
    }
  }

  function viewStudentUpdDet($aobj_context){
    $collcode = $aobj_context->mobj_data["collcode"];
    $data = json_decode($aobj_context->mobj_data["data"], true);

    $degreeArr = '(' . implode(', ', array_map(function($item) {
              return "'" . $item . "'";
    }, $data['degree'])) . ')';

    if($data['type'] === 'pending'){
      $cond = "and ifnull(s.fphotopath,'') = ''";
    }else if($data['type'] === 'uploaded'){
      $cond = "and ifnull(s.fphotopath,'') <> ''";
    }else if($data['type'] === 'all'){
      $cond = "";
    }

    $query = "select ifnull(s.fregno, '') as fregno, ifnull(s.fphotopath, '')as fphotopath,
              ifnull(s.fdegree, '')as fdegree, ifnull(s.fname, '')as fname, 
              ifnull(c.funivcode, '')as funivcode from student s, control c 
              where s.fcollcode = '{$collcode}' and s.fdegree in $degreeArr 
              and s.fregno between '{$data['regfrom']}' and '{$data['regto']}' 
              {$cond}
              order by s.fregno";

    $res = $aobj_context->mobj_db->GetAll($query);
    
    if($res){
      echo $aobj_context->mobj_output->ToJSONEnvelope($res, 0, "success"); 
    }else{
      $arr['msg'] = "No data found";
      echo $aobj_context->mobj_output->ToJSONEnvelope($data, -1, "failure"); 
      return;
    }
  }
?>