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


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

<?php
function getsubforIAreport($aobj_context){
	$aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);
	$degree = $aobj_context->mobj_data["degree"];
	$sem = $aobj_context->mobj_data["sem"];

	$query = " SELECT DISTINCT IFNULL(s.fsubname,'')AS fsubname,IFNULL(s.fsubcode,'')AS fsubcode,
	          CONCAT(s.fcsubcode,s.fssubcode) AS fsub,
	          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 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"];


    if($sub == "All"){
		$conn = '';
	}else{
		$conn = "and left(s.fcsubcode,4)=LEFT('{$sub}',4)";
	}
	$query = "select DISTINCT s.fsubname 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}' $conn 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 testforIAreporttest($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"];
	$subelement = $aobj_context->mobj_data["subelement"];
	
	if($sub == "All"){
		$conn = '';
	}else{
		$conn = "and left(s.fcsubcode,4)=LEFT('{$sub}',4)";
	}
	
$query=" SELECT DISTINCT ftest 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}'  
			  {$conn} AND
              su.fsubname='{$subelement}' AND ftest<>'' ORDER BY ftest";

// var_dump($query);die();
	$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"); 
	}  
}

?>