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


Current Path : /proc/thread-self/root/var/www/html/mum/src/
Upload File :
Current File : //proc/thread-self/root/var/www/html/mum/src/push_data_to_studentportal.php

<?php
function pushdatatostudentportal($aobj_context)
{
	$aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);
	@session_start();
	
	/*$fappno = $aobj_context->mobj_data["fappno"];*/
	$db = "logisys3_comexam";
	/*var_dump("pushdatatostudentportal");
	$collegeCode =$_SESSION['collcode'];
	
	$query = "select s.FDEGREE,s.FCOLLCODE,s.FNAME,ifnull(s.fexamappblk,'') as fexamappblk,
			ifnull(s.fmp,'') as fmp,if(ifnull(s.FCASTE,'') = '', 'GM', s.FCASTE) as FCASTE , 
			if(instr(c.fconstype, c.fexamno) > 0, 'Low Income', 'Normal Fee') as FCONSTYPE  
			from student s 
			inner join candsum c on s.fdegree = c.fdegree and s.fregno = c.fregno 
			where s.FREGNO='{$regno}' and s.fcollcode = '{$collegeCode}'";	
		// var_dump($query); 
	$rst = $aobj_context->mobj_db->GetRow($query);
	// var_dump($rst);
	if ($rst ==  false)
	{	
		$arr = "Invalid Reg. No.";
		echo $aobj_context->mobj_output->ToJSONEnvelope($arr, -1,"failure");	
		return;
	}
	else
	{
		$arr = $rst;
		echo $aobj_context->mobj_output->ToJSONEnvelope($arr, 1,"success");	
		return;
	}*/
	/*$query="insert ignore into {$db}.pushstud";

    $res=$aobj_context->mobj_db->Execute($query);

	var_dump($res);*/


	$query1 ="INSERT IGNORE INTO logisys3_comexam.pushstud 
			select c.funivcode,s.fregno,s.fdegree,s.fcollcode,s.fname,
			s.fsex,s.fdob,s.fcaste,s.ffatname,s.fmotname FROM student s, control c"; 

	$res =$aobj_context->mobj_db->Execute($query1);
	
    $count =  $aobj_context->mobj_db->affected_rows();
	
	if($res)
	{
		$arr['msg'] = "Updated Successfuly {$count} Rows affected successfully ";
		$arr['count'] = $count;
		echo $aobj_context->mobj_output->ToJSONEnvelope($arr,1,"success"); 
		return;
	} 
	else
	{
		$arr['msg'] = "Updation failure";
		$arr['count'] = $count;
		echo $aobj_context->mobj_output->ToJSONEnvelope($arr['msg'],-1,"Failed"); 
		return;
	}
}
?>