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


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

<?php



   function loadexamdeggrp($aobj_context){
    $aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC); 
    $univcode = $aobj_context->mobj_data['univcode'];
    $deggrp = $aobj_context->mobj_data['deggrp'];

    $query = " SELECT CONCAT( IFNULL(fyear, ''), '*', IFNULL(fexamtype, '')) AS yearnmode,
                ifnull(fdeggrp,'') as fdeggrp,IFNULL(fdescpn, '') AS fdescpn FROM deggrp
                WHERE IFNULL(fdeleted, '') <> 'T';";
             
    $result = $aobj_context->pobj_db->GetAll($query);

    if($result){
        echo $aobj_context->mobj_output->TOJSONEnvelope($result,0,"success");
        return;
    }else{
        $arr['msg'] = "Dates Not Found";
        echo $aobj_context->mobj_output->TOJSONEnvelope($arr,-1,"failure");
        return;
    } 
}

function loadexamappcentre($aobj_context){
    $aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC); 
    $univcode = $aobj_context->mobj_data['univcode'];
    $examdeggrp = $aobj_context->mobj_data['deggrp'];

    $deggrp1 = explode("*", $examdeggrp);

    $deggrp = $deggrp1[0];
   
    $query = " select c.fcntrcode,concat(cl.fcollname,', ',cl.ftown) as collegename
                from candsum c inner join college cl on cl.fcollcode = c.fcntrcode
                inner join degree d on c.fdegree=d.fdegree and d.fexamno='A'
                where d.fdeggrp='{$deggrp}'
                group by c.fcntrcode;";
                
    $result = $aobj_context->pobj_db->GetAll($query);

    if($result){
        echo $aobj_context->mobj_output->TOJSONEnvelope($result,0,"success");
        return;
    }else{
        $arr['msg'] = "Dates Not Found";
        echo $aobj_context->mobj_output->TOJSONEnvelope($arr,-1,"failure");
        return;
    } 
}

function loadexamappdegree($aobj_context){
    $aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC); 
    $univcode = $aobj_context->mobj_data['univcode'];
    $examdeggrp = $aobj_context->mobj_data['deggrp'];
    $centre = $aobj_context->mobj_data['centre'];
    $deggrp1 = explode("*", $examdeggrp);

    $deggrp = $deggrp1[0];

    if($centre==="All"){
        $centrecond=" ";
    }else{
        $centrecond="and c.fcntrcode='{$centre}'";
    }

    
    $query = " select distinct c.fdegree,d.fdescpn from candsum c 
                inner join degree d on c.fdegree=d.fdegree where fdeggrp='{$deggrp}' $centrecond;";

    $result = $aobj_context->pobj_db->GetAll($query);
    
    if($result){
        echo $aobj_context->mobj_output->TOJSONEnvelope($result,0,"success");
        return;
    }else{
        $arr['msg'] = "Dates Not Found";
        echo $aobj_context->mobj_output->TOJSONEnvelope($arr,-1,"failure");
        return;
    } 
}

function loadexamappsem($aobj_context){
    $aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC); 
    $univcode = $aobj_context->mobj_data['univcode'];
    $examdeggrp = $aobj_context->mobj_data['deggrp'];
    $centre = $aobj_context->mobj_data['centre'];
    $degree = $aobj_context->mobj_data['degree'];
    $deggrp1 = explode("*", $examdeggrp);

    $deggrp = $deggrp1[0];
   
    if($centre==="All"){
        $centrecond=" ";
    }else{
        $centrecond="and c.fcntrcode='{$centre}'";
    } 
    if($degree==="All"){
        $degreecond=" ";
    }else{
        $degreecond="and  c.fdegree='{$degree}'";
    }

  
    $query = " select distinct c.fexamno,d.fexamname from candsum c 
                inner join degree d on c.fdegree=d.fdegree and c.fexamno=d.fexamno
                where fdeggrp='{$deggrp}'  $centrecond  $degreecond
                group by fexamno;";
              
                
    $result = $aobj_context->pobj_db->GetAll($query);

    if($result){
        echo $aobj_context->mobj_output->TOJSONEnvelope($result,0,"success");
        return; 
    }else{
        $arr['msg'] = "Dates Not Found";
        echo $aobj_context->mobj_output->TOJSONEnvelope($arr,-1,"failure");
        return;
    } 
}

function loadexamappdetails($aobj_context){
    $aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC); 
    $univcode = $aobj_context->mobj_data['univcode'];
    $examdeggrp = $aobj_context->mobj_data['deggrp'];
    $centre = $aobj_context->mobj_data['centre'];
    $degree = $aobj_context->mobj_data['degree'];
    $sem = $aobj_context->mobj_data['sem'];
    $range1 = $aobj_context->mobj_data['range1'];
    $range2 = $aobj_context->mobj_data['range2'];
    $deggrp1 = explode("*", $examdeggrp);

    $deggrp = $deggrp1[0];
    

    if($centre==="All"){
        $centrecond=" ";
    }else{
        $centrecond="and c.fcntrcode='{$centre}'";
    }
    if($degree==="All"){
        $degreecond=" ";
    }else{
        $degreecond="and  c.fdegree='{$degree}'";
    }
    if($sem==="All"){
        $semcond=" ";
    }else{
        $semcond="and c.fexamno='{$sem}'";
    }

    $query = "SELECT c.fcntrcode, CONCAT(cg.fcollname, ', ', cg.ftown) AS collegename,
                c.fdegree , COUNT(DISTINCT c.fregno) AS total_count
                FROM candsum c INNER JOIN college cg ON c.fcntrcode = cg.fcollcode
                INNER JOIN canddet d ON c.fcollcode = d.fcollcode AND c.fdegree = d.fdegree 
                AND c.fregno = d.fregno
                INNER JOIN degree g ON c.fdegree = g.fdegree AND d.fexamno = g.fexamno
                WHERE g.fdeggrp='{$deggrp}' and c.fregno between '{$range1}' and '{$range2}' $semcond  $centrecond
                and ifnull(FPASSMTH,'')='' $degreecond GROUP BY c.fcntrcode,c.fdegree;";
                
$result = $aobj_context->pobj_db->GetAll($query);
               
    if($result){
        echo $aobj_context->mobj_output->TOJSONEnvelope($result,0,"success");
        return;
    }else{
        $arr['msg'] = "Dates Not Found";
        echo $aobj_context->mobj_output->TOJSONEnvelope($arr,-1,"failure");
        return;
    } 
}

function saveexamappdetails($aobj_context){
    $aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC); 
    $univcode = $aobj_context->mobj_data['univcode'];
    $row = json_decode($aobj_context->mobj_data['selectedRows'], true);
    $centre = $aobj_context->mobj_data['centre'];
    $examdeggrp = $aobj_context->mobj_data['deggrp'];
    $sem = $aobj_context->mobj_data['sem'];
    $range1 = $aobj_context->mobj_data['range1'];
    $range2 = $aobj_context->mobj_data['range2'];
    $degree = $aobj_context->mobj_data['degree'];
    $oldstd = $aobj_context->mobj_data['isAcknowledged'];
    $deggrp1 = explode("*", $examdeggrp);

    $deggrp = $deggrp1[0];
    $year = $deggrp1[1];
    $examtype = $deggrp1[2];
    var_dump($examtype,$year);
    die();

    if($centre==="All"){
        $centrecond=" ";
    }else{
        $centrecond="and c.fcntrcode='{$centre}'";
    }
    if($degree==="All"){
        $degreecond=" ";
    }else{
        $degreecond="and  c.fdegree='{$degree}'";
    }
    if($sem==="All"){
        $semcond=" ";
        $semcond1="and ffreshexam in('A','B','C','D','F','G','H','I','J')";
    }else{
        $semcond="and c.fexamno='{$sem}'";
        $semcond1="and ffreshexam = '{$sem}'";
    }
        // $degquery = "select fyear,fexamtype from deggrp where fdeggrp='{$deggrp}'";

        // $degresult = $aobj_context->pobj_db->GetRow($degquery);

        // $year = $degresult['fyear'];
        // $examtype = $degresult['fexamtype'];
        
     foreach ($row as $key => $value) {

        $query = "update candsum set frecptdate = now(), ftotalfee = '1'
                    where fcntrcode = '{$value['fcntrcode']}'
                    and fdegree = '{$value['fdegree']}'
                    and fyear = '{$year}'
                    and fexamtype = '{$examtype}' 
                    $semcond1 ";

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

        $query1 = "update candsum cs, canddet cd  set fpresent = 'P'
                    where and ifnull(cd.fpassmth,'') = ''
                    and cs.fregno = cd.fregno and cs.fdegree = cd.fdegree and 
                    and cs.fcollcode = cd.fcollcode
                    and cs.ffreshexam = cd.fexamno
                    and cs.fcntrcode = '{$value['fcntrcode']}'
                    and cd.fdegree = '{$value['fdegree']}'
                    and cd.fyear = '{$year}'
                    and cd.fexamtype = '{$examtype}'
                    $semcond1 ";
      
        $result1 = $aobj_context->pobj_db->Execute($query1);
    }
               
    if($result){
        echo $aobj_context->mobj_output->TOJSONEnvelope($result,0,"success");
        return;
    }else{
        $arr['msg'] = "Dates Not Found";
        echo $aobj_context->mobj_output->TOJSONEnvelope($arr,-1,"failure");
        return;
    } 
}


?>