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


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

<?php

	function getexamcntInformation($aobj_context)
	{
		
		$query = "select distinct FEXAMNO as internal_code, concat(FEXAMNO,' ',FEXAMNAME) as value from degree";
		$query3 = "select distinct FDEGREE as internal_code,  CONCAT(FDESCPN,' - ',FDEGREE)  as value from degree order by fdescpn, fdegree";
		
		$results = $aobj_context->mobj_db->GetAll($query);
		$results3 = $aobj_context->mobj_db->GetAll($query3);
		
		$arr['FEXAMNO']=$results;
		$arr['FDEGREE']=$results3;
		echo $aobj_context->mobj_output->ToJSONEnvelope($arr,0,"success"); 

	}
	
	function displayexamcnt($aobj_context)
	{
		$aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);
		$degree = $aobj_context->mobj_data["degree"];
		$examno = $aobj_context->mobj_data["examno"];

		
		$query1 = "select distinct fsubcode,fcsubcode,fsubname,fssubname,fsmaxmarks,fexamcnt from subject
					where fdegree = '{$degree}' and fexamno = '{$examno}' and ifnull(fintass,'') = 'T'";
		
		$results1 = $aobj_context->mobj_db->GetAll($query1);
		$i = 1;
		$j= 0;
		
		foreach($results1 as $ak=>$av)
		{
				$details.="<tr>
				<td><input type = 'text' id='subcode{$j}'  disabled	style = 'width:55px' name = 'rowid' name = 'rowid' value = '{$av['fcsubcode']}'/></td>
				<td ><input type = 'text' id='subname{$j}'  disabled style = 'width:420px;text-align:left' value = '{$av['fsubname']}' /></td> 
				<td width = '10px'> <input type = 'text' disabled id='subele{$j}'  style = 'width:125px;text-align:left' value = '{$av['fssubname']}'/> <input type = 'hidden' id='feeprh{$j}' style = 'width:50px' value = 'T'/></td>
				<td width = '10px'> <input type = 'text' disabled id='submax{$j}' style = 'width:53px;text-align:right' value = '{$av['fsmaxmarks']}'/> </td> 
				<td width = '10px'> <input type = 'text' id='subcnt{$j}' style = 'width:53px;text-align:right' value = '{$av['fexamcnt']}' /></td> 
			</tr>";
			$j++;
		}
		$arr['details']=$details;
		$arr['totallength']=$j;
		
		echo $aobj_context->mobj_output->ToJSONEnvelope($arr,0,"success");
	
	}
	
	function Saveexamcntinformation($aobj_context)
	{
		$aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);
		
		$examno = trim($aobj_context->mobj_data["examno"]);
		$degree = trim($aobj_context->mobj_data["degree"]);
		
		$subcode = trim($aobj_context->mobj_data["subcode"]);
		$subcode = explode(',', $subcode);
		
		$subcnt=trim($aobj_context->mobj_data["subcnt"]);
		$subcnt=explode(',', $subcnt);


		for($i=0;$i<count($subcode);$i++)
		{	
			$update = " update subject set
						fexamcnt = '{$subcnt[$i]}'
						where fdegree = '{$degree}' and fexamno='{$examno}' 
						and  fcsubcode ='{$subcode[$i]}'";
			$results = $aobj_context->mobj_db->Execute($update);
		}
		
		if($results)
		{
			$rdata = "Updated Successfully.";
			print_r($aobj_context->mobj_output->ToJSONEnvelope($rdata,0,"success"));
			return $rdata;
		}
		else
		{
			$rdata = "No Updation";
			print_r($aobj_context->mobj_output->ToJSONEnvelope($rdata,-1,"Failure"));  
			return $rdata;			
		}

	}
?>