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


Current Path : /var/www/html/kswu/orms/src/
Upload File :
Current File : /var/www/html/kswu/orms/src/referencesdet.php

<?php
function savereferences($aobj_context)
{
	session_start();
	$userid = $_SESSION['userid'];
	$aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);  
	include_once("/JSON.php");
	
	$json = new Services_JSON();
	$fieldarrvalue = stripslashes($aobj_context->mobj_data["fieldarrvalue"]);
	$persnaldet = $json->decode($fieldarrvalue);
	$persarr = get_object_vars($persnaldet);
	
	$queryd = "delete from refdetl  
	where fuserid = '{$userid}'";
	$rst=$aobj_context->mobj_db->Execute($queryd);	
	
	$query = "insert into refdetl(fuserid, frname, fradd, fremail, frphoneno, frmobileno, frfaxid)
	values ('{$userid}','{$persarr['S24']}','{$persarr['S27']}','{$persarr['S30']}','{$persarr['S33']}','{$persarr['S36']}','{$persarr['S39']}')
	,('{$userid}','{$persarr['S25']}','{$persarr['S28']}','{$persarr['S31']}','{$persarr['S34']}','{$persarr['S37']}','{$persarr['S40']}')
	,('{$userid}','{$persarr['S26']}','{$persarr['S29']}','{$persarr['S32']}','{$persarr['S35']}','{$persarr['S38']}','{$persarr['S41']}')";

		//var_dump($query);
	$result = $aobj_context->mobj_db->Execute($query);
	
	if($result) 
	{
			$arr='Updated Successfuly';
			echo $aobj_context->mobj_output->ToJSONEnvelope($arr,0,"success"); 
			return;
	}	
	else
	{
		$arr='Insertion Failed';					 
		echo $aobj_context->mobj_output->ToJSONEnvelope($lquery,-1,"failure"); 
		return;
	}
}

function loadRefrnceDetails($aobj_context)
{
	$aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);  
	session_start();
	$userid = $_SESSION['userid'];
	
	$query1 = "SELECT * FROM refdetl 
	where fuserid = '{$userid}'";
	$result1 = $aobj_context->mobj_db->GetAll($query1);
	if($result1)
	{	
		echo $aobj_context->mobj_output->ToJSONEnvelope($result1,0,"success"); 
	}	
	else
	{	
		$arr = "Some Failure as occured";
		echo $aobj_context->mobj_output->ToJSONEnvelope($arr,-1,"error"); 
	}	
}
?>