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


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

<?php

    function getMarkSub($aobj_context){
        $aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);
        $degree = $aobj_context->mobj_data['degree'];	
        $exam = $aobj_context->mobj_data['exam'];						 

    	$query = "SELECT  fcsubcode,fsubname FROM subject s 
    	INNER JOIN marks c ON s.fdegree = c.fdegree and s.fexamno = c.fexamno 
    	and s.fcsubcode = c.fsubcode
    	 WHERE  s.fdegree = '{$degree}' AND s.fexamno = '{$exam}'  
    	AND s.Fretain ='T' AND s.FINTASS = 'T' group by fcsubcode";
        

        $result = $aobj_context->pobj_db->GetAll($query);
       
        // var_dump($result);
        // die();
        if($result)
        {
        echo $aobj_context->mobj_output->ToJSONEnvelope($result,0,"success"); 
        }
        else
        {
        $arr['msg'] = 'No Data found';
        echo $aobj_context->mobj_output->ToJSONEnvelope($arr,-1,"failure"); 	
        }	
    }

    function getMarkMax($aobj_context){
        $aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);
        $degree = $aobj_context->mobj_data['degree'];	
        $exam = $aobj_context->mobj_data['exam'];		
        $subj = $aobj_context->mobj_data['sub'];				 

    	$query = "SELECT fvalmax FROM subject 
        WHERE fdegree = '{$degree}' AND fexamno = '{$exam}' AND 
        fcsubcode = '{$subj}'
        GROUP BY fexamno";
        

        $result = $aobj_context->pobj_db->GetRow($query);
       
        // var_dump($result);
        // die();
        if($result)
        {
        echo $aobj_context->mobj_output->ToJSONEnvelope($result,0,"success"); 
        }
        else
        {
        $arr['msg'] = 'No Data found';
        echo $aobj_context->mobj_output->ToJSONEnvelope($arr,-1,"failure"); 	
        }	
    }

    function getMarkSection($aobj_context){
        $aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);
        $degree = $aobj_context->mobj_data['degree'];	
        $exam = $aobj_context->mobj_data['exam'];		
        $subj = $aobj_context->mobj_data['sub'];				 

    	$query = "SELECT IFNULL(fsection, '') AS fsections FROM student s
        INNER JOIN subject a ON s.fdegree = a.fdegree AND s.fexamno = a.fexamno 
        WHERE s.fdegree = '{$degree}' AND s.fexamno = '{$exam}'
         AND a.fcsubcode = '{$subj}'";
        
        // var_dump($query);
        // die();
        $result = $aobj_context->pobj_db->GetRow($query);
       
        
        if($result)
        {
        echo $aobj_context->mobj_output->ToJSONEnvelope($result,0,"success"); 
        }
        else
        {
        $arr['msg'] = 'No Data found';
        echo $aobj_context->mobj_output->ToJSONEnvelope($arr,-1,"failure"); 	
        }	
    }

    function getMarkEntry($aobj_context){
        $aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);
        $degree = $aobj_context->mobj_data['degree'];	
        $exam = $aobj_context->mobj_data['exam'];		
        $subj = $aobj_context->mobj_data['sub'];
        $regfrm = $aobj_context->mobj_data['regfrm'];
        $regto = $aobj_context->mobj_data['regto'];
        $test = $aobj_context->mobj_data['test'];
        $sec = $aobj_context->mobj_data['sec'];				 

    	$query = "SELECT m.fregno, s.fname,IFNULL(m.FMARKS11, '-1') AS FMARKS, 
        IFNULL(m.FPRESENT, '') AS fpresent
        FROM marks m INNER JOIN student s ON m.fdegree = s.fdegree AND m.fexamno = s.fexamno 
        AND m.fcollcode = s.fcollcode
        INNER JOIN SUBJECT su ON s.fdegree = su.fdegree AND s.fexamno = su.fexamno
        WHERE m.fdegree = '{$degree}' AND su.fcsubcode = '{$subj}' AND m.fexamno = '{$exam}' 
        and AND s.fregno BETWEEN '{$regfrm}' AND '{$regto}'";
        
        // var_dump($query);
        // die();
        $result = $aobj_context->pobj_db->GetRow($query);
       
        
        if($result)
        {
        echo $aobj_context->mobj_output->ToJSONEnvelope($result,0,"success"); 
        }
        else
        {
        $arr['msg'] = 'No Data found';
        echo $aobj_context->mobj_output->ToJSONEnvelope($arr,-1,"failure"); 	
        }	
    }

    function viewMarksEntry($aobj_context){
        $aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);
        $collcode = $aobj_context->mobj_data['collcode'];
        $degree = $aobj_context->mobj_data['degree'];	
        $exam = $aobj_context->mobj_data['exam'];		
        $subj = $aobj_context->mobj_data['subj'];
        $regfrm = $aobj_context->mobj_data['regfrm'];
        $regto = $aobj_context->mobj_data['regto'];
        $test = $aobj_context->mobj_data['test'];
        $sec = $aobj_context->mobj_data['sec'];				 
        
    	$query = "SELECT stu.FREGNO, stu.FNAME, IFNULL(mak.FMARKS, -1) AS FMARKS,IFNULL(mak.FPRESENT, '') AS FPRESENT FROM student stu 
        INNER JOIN marks mak ON stu.fdegree = mak.fdegree AND stu.FREGNO=mak.FREGNO AND mak.Fdegree='{$degree}' AND mak.Fexamno='{$exam}' AND mak.FCOLLCODE='{$collcode}'
        INNER JOIN subject sub ON sub.FCSUBCODE = mak.FSUBCODE INNER JOIN degree d ON d.FDEGREE =mak.FDEGREE AND d.Fexamno=mak.Fexamno AND d.FMEYEAR=mak.FYEAR
        AND d.FMEEXAMTYP=mak.FEXAMTYPE AND sub.FCSUBCODE='{$subj}' AND sub.FDEGREE='{$degree}' AND sub.FEXAMNO='{$exam}'
        WHERE stu.FREGNO != '' AND stu.FREGNO LIKE '%%' AND 1=1
        GROUP BY stu.FREGNO ORDER BY stu.FREGNO LIMIT 0, 2000";
        
      
        $result = $aobj_context->pobj_db->GetAll($query);
        // var_dump($result);
        // die();
        
        if($result)
        {
        echo $aobj_context->mobj_output->ToJSONEnvelope($result,0,"success"); 
        }
        else
        {
        $arr['msg'] = 'No Data found';
        echo $aobj_context->mobj_output->ToJSONEnvelope($arr,-1,"failure"); 	
        }	
    }
?>