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


Current Path : /var/www/html/cuk/orms_wait/src_old/
Upload File :
Current File : //var/www/html/cuk/orms_wait/src_old/other_det.php

<?php

function replaceChars($name)
{
	$spl_char = array("*","/","~","!","@","#","$","%","^","&",":",";","?","/","\\","_","-","'"," ","");
	$link_name = strtolower(str_replace($spl_char,"_",$name));
	return str_ireplace("__","_",$link_name);
}

function saveotherdetails($aobj_context)
{
	session_start();
	$userid = $_SESSION['userid'];
	$aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);  
	include_once("/JSON.php");
	

	$json = new Services_JSON();
	$appno = stripslashes($aobj_context->mobj_data["appno"]);
	$gc = stripslashes($aobj_context->mobj_data["gc"]);
	$unfit = stripslashes($aobj_context->mobj_data["unfit"]);
	$teachlan = stripslashes($aobj_context->mobj_data["teachlan"]);
	$criminal = stripslashes($aobj_context->mobj_data["criminal"]);
	$fieldarrvalue = stripslashes($aobj_context->mobj_data["fieldarrvalue"]);
	$persnaldet = $json->decode($fieldarrvalue);
	$persarr = get_object_vars($persnaldet);
	
	$foreign_arr = stripslashes($aobj_context->mobj_data["foreign_arr"]);
	$mobj_jsondata = $json->decode($foreign_arr);
	$foreign_arr = get_object_vars($mobj_jsondata);
	
	$date = $persarr['OD4'].'-'.$persarr['OD5'].'-'.$persarr['OD6'];
	
	$query = "delete from otherdet
	where fuserid = {$userid} and fappno =  '{$appno}'";
	$result = $aobj_context->mobj_db->Execute($query);
	 
	$query1 = "insert into otherdet
	values('{$userid}','{$appno}','{$teachlan}', '{$date}', '{$gc}', '{$unfit}', '{$criminal}', 
	'{$persarr['OD14']}','{$persarr['OD15']}','{$persarr['OD16']}','{$persarr['OD17']}','{$persarr['OD18']}',
	'{$persarr['OD19']}','{$persarr['OD21']}','{$persarr['OD22']}','{$persarr['OD23']}',
	'{$persarr['OD24']}','{$persarr['OD25']}','{$persarr['OD26']}')";
	//var_dump($query1);
	$results = $aobj_context->mobj_db->Execute($query1);
	
	
	if($results)
	{	
		$arr = "Updated Successfully";
		echo $aobj_context->mobj_output->ToJSONEnvelope($arr,0,"success"); 
	}	
	else
	{	
		$arr = "Some Failure as occured";
		echo $aobj_context->mobj_output->ToJSONEnvelope($arr,-1,"error"); 
	}
}

function loadotherdetails($aobj_context)
{
	$aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);  
	session_start();
	$userid = $_SESSION['userid'];
	$appno = stripslashes($aobj_context->mobj_data["appno"]);
	$query1 = "SELECT * FROM otherdet 
	where fuserid = '{$userid}' and fappno = '{$appno}'";
	$result = $aobj_context->mobj_db->GetRow($query1);
	
	
	if($result)
	{	
		echo $aobj_context->mobj_output->ToJSONEnvelope($result,0,"success"); 
	}	
	else
	{	
		$arr = "Some Failure as occured";
		echo $aobj_context->mobj_output->ToJSONEnvelope($arr,-1,"error"); 
	}	
}

?>