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


Current Path : /proc/thread-self/root/proc/thread-self/root/var/www/oasis/src/
Upload File :
Current File : //proc/thread-self/root/proc/thread-self/root/var/www/oasis/src/CIEAttendanceNotEligible.php

<?php

function cieattndnoteligibleDegree($aobj_context){
    session_start();
    $collcode=$_SESSION['collcode'];

    $query="select distinct d.fdegree,d.fdescpn from degree d 
            inner join colldeg c on d.fdegree=c.fdegree where fcollcode='{$collcode}'";

    $results=$aobj_context->mobj_db->GetAll($query);
    
    if($results)
        echo $aobj_context->mobj_output->ToJSONEnvelope($results, 0,"success"); 
    else
        echo $aobj_context->mobj_output->ToJSONEnvelope($results,-1,"Failure");
    return;
}

function cieattndnoteligibleExmDate($aobj_context)
{
    $aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);  
    $degree = $aobj_context->mobj_data["degree"]; 
    $collcode=$_SESSION['collcode'];

    $array = explode(", ", $degree);
    $quotedArray = array_map(function($value) {
        return "'" . $value . "'";
    }, $array);
    $degre = implode(",", $quotedArray);

    $qry="select distinct fexamdate from degree where fdegree in ($degre)";
    $result = $aobj_context->mobj_db->GetAll($qry);     

	if($result)	
      echo $aobj_context->mobj_output->ToJSONEnvelope($result,0,"success"); 
    else
      echo $aobj_context->mobj_output->ToJSONEnvelope($result,-1,"Failure");
    return;
}

function cieattndnoteligibleSem($aobj_context) {    
    $aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);  
    $degree = $aobj_context->mobj_data["degree"];  
    $collcode = $_SESSION['collcode'];

    $array = explode(", ", $degree);
    $quotedArray = array_map(function($value) {
        return "'" . $value . "'";
    }, $array);
    $degre = implode(",", $quotedArray);
    if($degree=="All"){
        $deg="";
    }else{
        $deg="where fdegree in ($degre)";
    }

    $query = "select distinct fexamno,fexamname from degree $deg  group by fexamno";
    $result = $aobj_context->mobj_db->GetAll($query);

    if ($result) {
        echo $aobj_context->mobj_output->ToJSONEnvelope($result, 0, "success");
    } else {
        $arr['msg'] = "Semesters not found";
        echo $aobj_context->mobj_output->ToJSONEnvelope($arr, -1, "error");
        return;
    }
}
// function cieattndnoteligibleExmDate($aobj_context){
//     session_start();
//     $collcode=$_SESSION['collcode'];
//     $degree = $aobj_context->mobj_data["degree"];
    
//     $query="SELECT DISTINCT d.FDEGREE, d.FDESCPN FROM degree d INNER JOIN res_fee r 
//                 ON d.fdegree = r.fdegree where r.fcollcode = '{$collcode}' order by FDEGREE";

//     $result=$aobj_context->mobj_db->GetAll($query);

//     $qry="SELECT DISTINCT fsubname from subdet where fcollcode='{$collcode}' order by fsubcode";
//     $result1 = $aobj_context->mobj_db->GetAll($qry);  

//     $querysem="SELECT DISTINCT fexamno, IFNULL(fexamname, '') AS fexamname
//             FROM degree
//             WHERE  fexamno IS NOT NULL
//             AND fexamname <> ''
//             ORDER BY fexamno";

//     $result2=$aobj_context->mobj_db->GetAll($querysem);

//     $combinedResult = array(
//         "result" => $result,
//         "result1" => $result1,
//         "result2" => $result2,
//     );

// if($result){
// 		echo $aobj_context->mobj_output->ToJSONEnvelope($combinedResult,0,"success"); 
// 	}
// 	else{
// 		$data['msg'] = 'Failed to load';
// 		echo $aobj_context->mobj_output->ToJSONEnvelope($data,-1,"failure"); 
// 	}

// }
?>