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


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

<?php

function getcollegeiamarks($aobj_context){
    $aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC); 
    $univcode = $aobj_context->mobj_data['univcode'];
    $collcode = $aobj_context->mobj_data['collcode'];
    $fcollcode = $aobj_context->mobj_data['fcollcode'];

    if($fcollcode == null || $fcollcode == ""){
        $cond = "";
    }else{
        $cond = "where fcollcode = '{$fcollcode}'";
    }

    $query = "SELECT IFNULL(fcollcode,'')AS fcollcode, IFNULL(fcollname,'')AS fcollname
              ,IFNULL(FTOWN,'')AS FTOWN  FROM college $cond";
   
    $result = $aobj_context->pobj_db->GetAll($query);
    // var_dump($result);
    // die();
    if($result){
        echo $aobj_context->mobj_output->TOJSONEnvelope($result,0,"success");
        return;
    }else{
        $arr['msg'] = "Data not found";
        echo $aobj_context->mobj_output->TOJSONEnvelope($arr,-1,"failure");
        return;
    } 
}


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

    if($college === "All"){
        $collegeCond = "fcollcode BETWEEN '0' AND 'Z'";
    }else{
        $collegeCond = "fcollcode='{$college}'";
    }
  
    $query = "SELECT DISTINCT d.fdegree,d.fdescpn
            FROM degree d INNER JOIN colldeg cd ON d.fdegree = cd.FDEGREE 
            WHERE $collegeCond group by d.fdegree";
//    var_dump($query);die();
    $result = $aobj_context->pobj_db->GetAll($query);
    
    if($result){
        echo $aobj_context->mobj_output->TOJSONEnvelope($result,0,"success");
        return;
    }else{
        $arr['msg'] = "Data not found";
        echo $aobj_context->mobj_output->TOJSONEnvelope($arr,-1,"failure");
        return;
    } 
}

function getsemia($aobj_context){
    $aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC); 
    $univcode = $aobj_context->mobj_data['univcode'];
    $college = $aobj_context->mobj_data['college'];
    $degree = $aobj_context->mobj_data['degree'];

    if($college === "All"){
        $collegeCond = " fcollcode BETWEEN '0' AND 'Z'";
    }else{
        $collegeCond = "fcollcode='{$college}'";
    }
    if($degree === "All"){
        $degreeCond = "cd.fdegree BETWEEN '0' AND 'Z'";
    }else{
        $degreeCond = "cd.fdegree='{$degree}'";
    }
    
  
    $query = "SELECT DISTINCT d.fexamno,d.fexamname FROM degree d INNER JOIN 
    colldeg cd ON d.fdegree = cd.FDEGREE WHERE $collegeCond AND $degreeCond ";

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

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

function getsubjectia($aobj_context){
    $aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC); 
    $univcode = $aobj_context->mobj_data['univcode'];
    $sem = $aobj_context->mobj_data['sem'];
    $degree = $aobj_context->mobj_data['degree'];
    $college = $aobj_context->mobj_data['college'];
  
    if($college === "All"){
        $collegeCond = "fcollcode BETWEEN '0' AND 'Z' ";
    }else{
        $collegeCond = "fcollcode='{$college}'";
    }
    if($degree === "All"){
        $degreeCond = "cd.fdegree BETWEEN '0' AND 'Z'";
    }else{
        $degreeCond = "cd.fdegree='{$degree}'";
    }
    if($sem === "All"){
        $semCond = "s.fexamno BETWEEN '0' AND 'Z'";
    }else{
        $semCond = "s.fexamno='{$sem}'";
    }

    $query = " SELECT DISTINCT s.fsubcode,s.fsubname FROM degree d 
    INNER JOIN colldeg cd ON d.fdegree = cd.FDEGREE INNER JOIN `subject` s 
    ON s.fdegree = cd.FDEGREE  WHERE $collegeCond AND $degreeCond AND $semCond ";
  
    $result = $aobj_context->pobj_db->GetAll($query);
    
    // var_dump($query);
    // die();
   
    if($result){
        echo $aobj_context->mobj_output->TOJSONEnvelope($result,0,"success");
        return;
    }else{
        $arr['msg'] = "Data not found";
        echo $aobj_context->mobj_output->TOJSONEnvelope($arr,-1,"failure");
        return;
    } 
}

function viewiamarkstable($aobj_context){
    $aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC); 
    $univcode = $aobj_context->mobj_data['univcode'];
    $college = $aobj_context->mobj_data['college'];
    $degree = $aobj_context->mobj_data['degree'];
    $sem = $aobj_context->mobj_data['sem'];
    $subject = $aobj_context->mobj_data['subject'];
    // var_dump($college,$degree,$sem,$subject);
    // die(); 
    if($college === "All"){
        $collegeCond = "m.fcollcode BETWEEN '0' AND 'Z'";
    }else{
        $collegeCond = "m.fcollcode='{$college}'";
    }
    if($degree === "All"){
        $degreeCond = "m.fdegree BETWEEN '0' AND 'Z'";
    }else{
        $degreeCond = "m.fdegree='{$degree}' ";
    }
    if($sem === "All"){
        $semCond = "m.fexamno BETWEEN '0' AND 'Z'";
    }else{
        $semCond = "m.fexamno='{$sem}'";
    } 
    if($subject === "All"){
        $subjectCond = "s.fsubcode BETWEEN '0' AND 'Z'";
    }else{
        $subjectCond = "s.fsubcode='{$subject}'";
    } 

    $query = "SELECT m.fcollcode,c.fcollname,c.ftown,m.fdegree,d.fdescpn,d.fexamname,
    m.fsubcode,s.fsubname,COUNT(m.fregno) as totlstd,
    SUM(IF(IFNULL(m.fmarks,'-1') = '-1',1,0)) AS not_entred,
    SUM(IF(IFNULL(m.fmarks,'-1') <> '-1',1,0)) AS entred
    FROM marks m INNER JOIN college c ON m.fcollcode = c.fcollcode
    INNER JOIN degree d ON m.fdegree = d.fdegree AND m.fexamno = d.fexamno 
    INNER JOIN subject s ON m.fdegree = s.fdegree AND m.fexamno = s.fexamno 
    AND s.fcsubcode = m.fsubcode 
    WHERE $collegeCond  AND $degreeCond 
    AND $subjectCond AND  $semCond
    group by m.fcollcode,m.fdegree,m.fexamno,m.fsubcode";
    
    $result = $aobj_context->pobj_db->GetAll($query);

    // var_dump($query,"nikki");
    // die();

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