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


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

<?php


function savestudententryapplication($aobj_context)
{

	$lstr_param    = stripslashes($aobj_context->mobj_data["cntrinfo"]);
	$per_arr_data  = json_decode($lstr_param, true);	

	$cntrinfo = array();
	for($i=0; $i<count($per_arr_data); $i++)
	{
		$cntrinfo[$per_arr_data[$i]['id']] = $per_arr_data[$i]['value'];
	}

	

	$college = $_SESSION['collcode'];
	
	if($college == '')
	{
		$data = 'Please loging and update.';
		echo $aobj_context->mobj_output->ToJSONEnvelope($data,-1,"failure"); 
		return;
	}	


	$insert_qry="insert into examcntr 
	(fcollcode, fcollname, fcollwebsite, fconstituency, fprincipal, fprinciqual, fprincitype, 
	fservyear, femail, fmobileno, festyear, fcentre, fcentredet, fsafe, fugctwof, fugctwob, fnaacrep,
	fnaacrepdet, faffiliated, fcourses, fclassrooms, fperstaff, ftmpstaff, fnonteachstaff, fclasscctv, 
	fwifi, fcomplab, fcomplabdet, fteachsmob, fofficecctv, fofficecctvdet, fotherdet)
	values   
	('{$cntrinfo['fcollcode']}',
	'{$cntrinfo['fcollname']}',
	'{$cntrinfo['fcollwebsite']}',
	'{$cntrinfo['fconstituency']}',
	'{$cntrinfo['fprincipal']}',
	'{$cntrinfo['fprinciqual']}',
	'{$cntrinfo['fprincitype']}',
	'{$cntrinfo['femail']}',
	'{$cntrinfo['fmobileno']}',
	'{$cntrinfo['festyear']}',
	'{$cntrinfo['fcentre']}',
	'{$cntrinfo['fcentredet']}',
	'{$cntrinfo['fsafe']}',
	'{$cntrinfo['fugctwof']}',
	'{$cntrinfo['fugctwob']}',
	'{$cntrinfo['fnaacrep']}',
	'{$cntrinfo['fnaacrepdet']}',
	'{$cntrinfo['faffiliated']}',
	'{$cntrinfo['fclassrooms']}',
	'{$cntrinfo['fperstaff']}',
	'{$cntrinfo['ftmpstaff']}',
	'{$cntrinfo['fnonteachstaff']}',
	'{$cntrinfo['fclasscctv']}',
	'{$cntrinfo['fwifi']}',
	'{$cntrinfo['fcomplab']}',
	'{$cntrinfo['fcomplabdet']}',
	'{$cntrinfo['fteachsmob']}',
	'{$cntrinfo['fofficecctv']}',
	'{$cntrinfo['fofficecctvdet']}',
	'{$cntrinfo['fotherdet']}'
	) ON DUPLICATE KEY UPDATE 
	fcollcode = '{$cntrinfo['fcollcode']}', 
	fcollname = '{$cntrinfo['fcollcode']}', 
	fcollwebsite = '{$cntrinfo['fcollcode']}', 
	fconstituency = '{$cntrinfo['fcollcode']}', 
	fprincipal = '{$cntrinfo['fcollcode']}', 
	fprinciqual = '{$cntrinfo['fcollcode']}', 
	fprincitype = '{$cntrinfo['fcollcode']}', 
	fservyear = '{$cntrinfo['fcollcode']}', 
	femail = '{$cntrinfo['fcollcode']}', 
	fmobileno = , 
	festyear = , 
	fcentre = , 
	fcentredet = , 
	fsafe = , 
	fugctwof = , 
	fugctwob = , 
	fnaacrep = ,
	fnaacrepdet = , 
	faffiliated = , 
	fcourses = , 
	fclassrooms = , 
	fperstaff = , 
	ftmpstaff = , 
	fnonteachstaff = , 
	fclasscctv = , 
	fwifi = , 
	fcomplab = , 
	fcomplabdet = , 
	fteachsmob = , 
	fofficecctv = , 
	fofficecctvdet =, 
	fotherdet =
	where fcollcode = '{$cntrinfo['fcollcode']}'";
	$studresults = $aobj_context->mobj_db->Execute($insert_qry);

	
	if($studresults)
	{
		$data = $fappno;
		echo $aobj_context->mobj_output->ToJSONEnvelope($data,0,"success"); 
		return;
	}
	else
	{
		$data = 'Updatetion failure';
		echo $aobj_context->mobj_output->ToJSONEnvelope($data,-1,"failure"); 
		return;
	}

}



?>