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


Current Path : /var/www/html/jobs/src/
Upload File :
Current File : /var/www/html/jobs/src/kusphdadm.php

<?php

function saveApplication($aobj_context)
{
	$aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);
	$reg_no = $aobj_context->mobj_data["reg_no"];

	include_once($aobj_context->main_src."/json.php"); 
	$json = new Services_JSON();
	//recieve decode json string of personal info
	$lstr_param = stripslashes($aobj_context->mobj_data["personal_info"]);
	$per_arr_data = json_decode($lstr_param, true);	

	$strSubjects = implode("','", $sub_arr_data);
	//convert to Associative array
	$rgPerArray = array();
	for($i=0; $i<count($per_arr_data); $i++)
	{
		$rgPerArray[$per_arr_data[$i]['id']] = $per_arr_data[$i]['value'];
	}
	//insert to studadm
	$rgPerArray['idEmail'] = strtolower($rgPerArray['idEmail']);

	$strInsertQuery = "insert into regprov 
	(fregdate, ffname, flname, foccpncode, fexp,fskill, fregnno,
	fmobile, femail, fcity, flocality, fipadd) 
	values(now(), '{$rgPerArray['idFname']}', '{$rgPerArray['idLname']}',
	'{$rgPerArray['idOccpn']}', '{$rgPerArray['idExp']}', '{$rgPerArray['idSkills']}', 
	'{$rgPerArray['idRegnno']}', 
	'{$rgPerArray['idMobile']}', '{$rgPerArray['idEmail']}', 
	'{$rgPerArray['idCity']}', '{$rgPerArray['idLocality']}', 
	'{$_SERVER['REMOTE_ADDR']}')";

	//var_dump($strInsertQuery);
	$boolSaRes = $aobj_context->mobj_db->Execute($strInsertQuery);
	

	if($boolSaRes) 
	{
		$app_no = $aobj_context->mobj_db->Insert_ID();
		$data='Your Registration is successful';
		$arr['message']= $data;
		$arr['app_no'] = $app_no;
		echo $aobj_context->mobj_output->ToJSONEnvelope($arr,0,"success"); 
		return;
	}	
	else
	{
		$arr['message'] = 'Something went wrong please contact help desk';
		echo $aobj_context->mobj_output->ToJSONEnvelope($arr,-1,"failure"); 
		return;
	}

}