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


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

<?php

function getPracticalSubjects($aobj_context)
{
  $aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);
  $fdegree = $aobj_context->mobj_data["fdegree"];

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

  $query = "select fcsubcode, fsubname from subject 
  where ftheory = 'F' and fintass = 'F' 
  and fdegree = '{$fdegree}' and fretain = 'F'
  and ifnull(fboard,'') = '{$fboard}'";

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

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

  if (count($result) >= 0) {
    echo $aobj_context->mobj_output->ToJSONEnvelope($result, 0, "success");
    return;
  }
}


function getPracticalBoards($aobj_context)
{

  $aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);
  $fdeggrp = $aobj_context->mobj_data["fdeggrp"];
  $fboard = $aobj_context->mobj_data["fboard"];

  $query = "select fboardcode, fboardname from masboard where fboardcode in (
    select distinct fboard from subject s where ftheory = 'F' and fintass = 'F' 
    and fretain = 'F' and ifnull(fboard,'') <> '' 
    and fdegree in ( select distinct fdegree from degree where fdeggrp = '{$fdeggrp}' ))";

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

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

  if (count($result) > 0) {
    echo $aobj_context->mobj_output->ToJSONEnvelope($result, 0, "success");
    return;
  } else {
    $arr['msg'] = "Practical Boards Not found for degree group";
    echo $aobj_context->mobj_output->ToJSONEnvelope($arr, -1, "Failure");
    return;
  }
}

function getPracticalBatchDet($aobj_context)
{
  $aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);
  $fdeggrp = $aobj_context->mobj_data["fdeggrp"];
  $fdegree = $aobj_context->mobj_data["fdegree"];
  $fboard = $aobj_context->mobj_data["fboard"];
  $fsubcode = $aobj_context->mobj_data["fsubcode"];

  $query = "select focollcode, c.fcollname, date_format(fexamdate, '%d/%m/%Y') as fexamdate, 
  sum(if(fmarks11 = '-1', 1, 0)) as fpendstudcount,
  count(fregno) as fstudcount, count(distinct m.fbatch) as fbatchcount
  from marks_pr m inner join college c on c.fcollcode = m.focollcode left join practical_entry_freeze p
  on m.fdegree = p.fdegree and m.fexamno = p.fexam and m.focollcode = p.fcollcode
  and m.fsubcode = p.fcsubcode and m.fbatch = p.fbatch
  where p.fcsubcode = '{$fsubcode}' and m.fdegree = '{$fdegree}' 
  and m.fdegree in ( select distinct fdegree from degree where fdeggrp = '{$fdeggrp}' )
  group by fexamdate, focollcode";
  // var_dump($query);
  $result = $aobj_context->pobj_db->GetAll($query);

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

  if (count($result) > 0) {
    echo $aobj_context->mobj_output->ToJSONEnvelope($result, 0, "success");
    return;
  } else {
    $arr['msg'] = "fetching Practical Batch Details Not found";
    echo $aobj_context->mobj_output->ToJSONEnvelope($arr, -1, "Failure");
    return;
  }
}