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


Current Path : /var/www/html/admission/src/
Upload File :
Current File : /var/www/html/admission/src/uploadAnsBook.php

<?php

function loadQPDet($aobj_context)
{
  $aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC); 
  $univcode = $aobj_context->mobj_data["univcode"];
    
    $query = "select fqpcode, fsubname from tdvs_masqp where ifnull(fdeleted,'')<>'T'
    order by fqpcode";
   
    $result = $aobj_context->pobj_db->GetAll($query);
    
    if(count($result) > 0)
    {
        echo $aobj_context->mobj_output->ToJSONEnvelope($result,0,"success"); 
    }
    else
    {
        $arr['msg'] = ['No QP Found'];
        echo $aobj_context->mobj_output->ToJSONEnvelope($arr,-1,"failure");
    }
}

function totUploadAnsBookDet($aobj_context)
{
  $aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC); 
  $univcode = $aobj_context->mobj_data["univcode"];
  $qpcode = $aobj_context->mobj_data["qpcode"];
  
  if($qpcode == 'All'){
    $con = "";
  }else{
    $con = "and ifnull(s.fqpcode,'') = '{$qpcode}' ";
  }
    
    $query = "select m.fqpcode,concat(m.fsubname,' - ',su.fsubshort) as subname, 
    sum(if(s.FVALNO = '1',1,0)) as fst,
    sum(if(s.FVALNO = '2',1,0)) as sst,
    sum(if(s.FVALNO = 'D',1,0)) as dst,
    sum(if(s.FVALNO = 'R',1,0)) as rst
    from tdvs_masqp m inner join tdvs_tabsum s on m.fqpcode = s.fqpcode
    inner join (select distinct fqpcode, fsubshort from subject 
    where ifnull(fqpcode,'') <> '' group by fqpcode) su
    on su.fqpcode = m.fqpcode and su.fqpcode = m.fqpcode
    and ifnull(su.fqpcode,'') <> ''
    where ifnull(su.fqpcode,'') <> '' 
    $con
    group by s.fqpcode";
    // var_dump($query);
    // die();
    
    $result = $aobj_context->pobj_db->GetAll($query);
    
    if(count($result) > 0)
    {
        echo $aobj_context->mobj_output->ToJSONEnvelope($result,0,"success"); 
    }
    else
    {
        $arr['msg'] = ['No QP Found'];
        echo $aobj_context->mobj_output->ToJSONEnvelope($arr,-1,"failure");
    }
}

function getYearModeData($aobj_context)
{
  $aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC); 
  $univcode = $aobj_context->mobj_data["univcode"];
  $fqpcode = $aobj_context->mobj_data["fqpcode"];
    
  $query = "select distinct t.fyear, t.fexamtype from tdvs_deggrp t 
          inner join degree d on d.fdeggrp = t.fdeggrp
          inner join subject s on s.fdegree = d.fdegree and s.fexamno = d.fexamno 
          where s.fqpcode = '{$fqpcode}'";
   
  $result = $aobj_context->pobj_db->GetRow($query);
  
  if(count($result) > 0)
  {
      echo $aobj_context->mobj_output->ToJSONEnvelope($result,0,"success"); 
  }
  else
  {
      $arr['msg'] = ['No QP Found'];
      echo $aobj_context->mobj_output->ToJSONEnvelope($arr,-1,"failure");
  }
}

  function checkScriptRecieve($aobj_context){
    $aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC); 
    $univcode = $aobj_context->mobj_data["univcode"];
    $qpcode = $aobj_context->mobj_data["qpcode"];
    $year = $aobj_context->mobj_data["year"];
    $examtype = $aobj_context->mobj_data["examtype"];
      
    $query = "select * from tdvs_scriptreceive where fqpcode='{$qpcode}' and fyear='{$year}' and fexamtype='{$examtype}'";

    // var_dump($query);die();
    $result = $aobj_context->pobj_db->GetAll($query);
    
    if(count($result) > 0){
      $arr['msg'] = "Script received";
      echo $aobj_context->mobj_output->ToJSONEnvelope($arr, 0, "success"); 
    } else {
      $arr['msg'] = 'Scripts not received yet';
      echo $aobj_context->mobj_output->ToJSONEnvelope($arr, -1, "failure");
      return;
    }
  }
?>