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


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

<?php

function saveworkexperiencedetails($aobj_context)
{
	session_start();
	$userid = $_SESSION['userid'];
	$aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);  
	include_once("/JSON.php");
	
	$json = new Services_JSON();
	$workexp_arr = stripslashes($aobj_context->mobj_data["workexp_arr"]);
	$mobj_jsondata = $json->decode($workexp_arr);
	$workexp_arr = get_object_vars($mobj_jsondata);
	
	$fieldarrvalue = stripslashes($aobj_context->mobj_data["fieldarrvalue"]);
	
	$queryD = "delete from expdetl
	where fuserid = {$userid}";
	$rstD=$aobj_context->mobj_db->Execute($queryD);
	
	for($k=1;$k<=count($workexp_arr);$k++)
	{
		$query="INSERT INTO expdetl(fuserid,fappno,fexptype,fpayband,fbasic,fgross,forganisation,fdoj,ffromdate,ftodate,ftotalexp,fnatass) VALUES 
		('{$userid}','','{$workexp_arr[$k]->Post}','{$workexp_arr[$k]->Pay}','{$workexp_arr[$k]->Bpay}',
		'{$workexp_arr[$k]->Gsal}','{$workexp_arr[$k]->Ename}','',date_format(str_to_date('{$workexp_arr[$k]->From}','%d/%m/%Y'),'%Y-%m-%d'),
		date_format(str_to_date('{$workexp_arr[$k]->To}','%d/%m/%Y'),'%Y-%m-%d'),'{$workexp_arr[$k]->Total}','{$workexp_arr[$k]->Nature}')";
		$rst1 = $aobj_context->mobj_db->Execute($query);
	}
	
	$queryD = "delete from teachexp
	where fuserid = {$userid}";
	$rstD=$aobj_context->mobj_db->Execute($queryD);	
		
	if($rst1)
	{	
		$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"); 
	}

}


?>