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


Current Path : /var/www/html/collportal/src/
Upload File :
Current File : //var/www/html/collportal/src/degreeWise_IA_Report.php

<?php

function GetDegreeForAttendanceReport($aobj_context){
	$collcode = $aobj_context->mobj_data["collcode"];
	$query="SELECT IFNULL(d.fdegree,'') AS `key`,IFNULL(d.fdegree,'') AS `value`,
                CONCAT(d.FDESCPN, ' [',d.fdegree,']')AS label
            FROM attendsum a 
            INNER JOIN degree d ON a.fdegree=d.fdegree 
            and a.fexamno = d.fexamno
            WHERE a.fcollcode='{$collcode}' 
            GROUP BY a.fdegree
            order by a.fdegree";
			
   $result = $aobj_context->mobj_db->GetAll($query);

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

function GetSemForAttendanceReport($aobj_context){
	$collcode = $aobj_context->mobj_data["collcode"];
	$degree = $aobj_context->mobj_data["degree"];
	
	$query="SELECT DISTINCT ifnull(d.FEXAMNO,'') as `key`,ifnull(d.FEXAMNO,'') as `value`,
                 CONCAT(d.FEXAMNAME,' [',d.FEXAMNO,']')AS label
                 FROM degree d inner join attendsum a on a.fdegree = d.fdegree 
                 and a.fexamno = d.fexamno 
                 where a.fdegree='{$degree}'
                 and a.fcollcode = '{$collcode}'";
    $result = $aobj_context->mobj_db->GetAll($query);
    if($result)
    {
        echo $aobj_context->mobj_output->ToJSONEnvelope($result,0,"success"); 
        return;
    }
    else
    {
        $arr['msg'] = 'No Exam Number Found';
        echo $aobj_context->mobj_output->ToJSONEnvelope($arr,-1,"failure"); 	
        return;
    }
}

function getsubforIAreport($aobj_context){
	$collcode = $aobj_context->mobj_data["collcode"];
	$degree = $aobj_context->mobj_data["degree"];
	$sem = $aobj_context->mobj_data["sem"];

	$query = "SELECT DISTINCT IFNULL(s.FCSUBCODE,'') AS `key`,
              CONCAT(IFNULL(s.fcsubcode,''),IFNULL(s.fssubcode,'')) AS `value`,
              IFNULL(s.fsubname,'')AS `label`, 
              IFNULL(fsubshort,'')AS fsubshort FROM subject s 
              INNER JOIN subdet su ON s.fdegree=su.fdegree AND s.fexamno=su.fexamno
              AND s.fcsubcode=su.fcsubcode
              WHERE s.fdegree='{$degree}' AND s.fexamno='{$sem}'";
		
	$result = $aobj_context->mobj_db->GetAll($query);
	if($result)
	{
		echo $aobj_context->mobj_output->ToJSONEnvelope($result,0,"success"); 
	}
	else
	{
		$data['msg'] = 'Faile to load';
		echo $aobj_context->mobj_output->ToJSONEnvelope($data,-1,"failure"); 
	}
}

function getsubElementforIAreport($aobj_context){
	$degree = $aobj_context->mobj_data["degree"];
	$sem = $aobj_context->mobj_data["sem"];
	$sub = $aobj_context->mobj_data["sub"];
   
	$query = "select DISTINCT DISTINCT IFNULL(s.fsubname,'')AS `key`,
		      IFNULL(s.fsubname,'')AS `value`,
		      IFNULL(s.fsubname,'')AS `label` from subdet s 
	          inner join marksint m on s.fdegree=m.fdegree 
			  and s.fexamno=m.fexamno 
			  and LEFT(s.fcsubcode,5)=LEFT(m.fsubcode,5)
			  INNER JOIN subdet su ON m.fdegree=su.fdegree AND m.fexamno=su.fexamno
	          AND m.fsubcode= concat(su.fcsubcode,su.fsubcode)
              where s.fdegree='{$degree}' and s.fexamno='{$sem}' 
			  and left(s.fcsubcode,4)=LEFT('{$sub}',4) and ftest<>''";
			  
	$result = $aobj_context->mobj_db->GetAll($query);	
	if($result)
	{
		echo $aobj_context->mobj_output->ToJSONEnvelope($result,0,"success"); 
	}
	else
	{
		$data['msg'] = 'Faile to load';
		echo $aobj_context->mobj_output->ToJSONEnvelope($data,-1,"failure"); 
	}  

}

function testforIAreport($aobj_context){
	$aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);
	$degree = $aobj_context->mobj_data["degree"];
	$sem = $aobj_context->mobj_data["sem"];
	$sub = $aobj_context->mobj_data["sub"];
	$element = $aobj_context->mobj_data["element"];
	// var_dump($degree,$sem,$sub,$element,"hii");die();

	$query=" SELECT DISTINCT ifnull(ftest,'')as `key`,ifnull(ftest,'')as `value`,
	         ifnull(ftest,'')as `label`FROM subdet s 
	          INNER JOIN marksint m ON s.fdegree=m.fdegree 
			  AND s.fexamno=m.fexamno 
			  AND LEFT(s.fcsubcode,5)=LEFT(m.fsubcode,5)
			  INNER JOIN subdet su ON m.fdegree=su.fdegree AND m.fexamno=su.fexamno
	          AND m.fsubcode= CONCAT(su.fcsubcode,su.fsubcode)
              WHERE s.fdegree='{$degree}' AND s.fexamno='{$sem}'  
			  and left(s.fcsubcode,4)=LEFT('{$sub}',4)  AND
              su.fsubname='{$element}' AND ftest<>'' ORDER BY ftest";

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

?>