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


Current Path : /proc/thread-self/root/var/www/oasis/src_old/
Upload File :
Current File : //proc/thread-self/root/var/www/oasis/src_old/cntDeclaration.php

<?php


function saveexamctrdet($aobj_context)
{

	$lstr_param    = stripslashes($aobj_context->mobj_data["cntrdetlobj"]);
	// var_dump($lstr_param);
	$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']] = utf8_decode(urldecode($per_arr_data[$i]['value']));
	}
	// var_dump($cntrinfo);
	$college = $_SESSION['collcode'];
	
	if($college == '')
	{
		$data = 'Session Expired Login again and enter';
		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   
	('{$college}',
	'{$cntrinfo['fcollname']}', '{$cntrinfo['fcollwebsite']}', 
	'{$cntrinfo['fconstituency']}', '{$cntrinfo['fprincipal']}',
	'{$cntrinfo['fprinciqual']}', '{$cntrinfo['fprincitype']}',
	'{$cntrinfo['fservyear']}', '{$cntrinfo['femail']}',
	'{$cntrinfo['fmobileno']}', '{$cntrinfo['festyear']}',
	'{$cntrinfo['fcentre']}', '{$cntrinfo['fcentredet']}',
	'{$cntrinfo['fsafe']}', '{$cntrinfo['fugctwof']}',
	'{$cntrinfo['fugctwob']}', '{$cntrinfo['fnaacrep']}',
	'{$cntrinfo['fnaacrepdet']}', '{$cntrinfo['faffiliated']}',
	'{$cntrinfo['fcourses']}', '{$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 = '{$college}',  fcollname = '{$cntrinfo['fcollname']}', 
	fcollwebsite = '{$cntrinfo['fcollwebsite']}', 
	fconstituency = '{$cntrinfo['fconstituency']}', 
	fprincipal = '{$cntrinfo['fprincipal']}', 
	fprinciqual = '{$cntrinfo['fprinciqual']}', 
	fprincitype = '{$cntrinfo['fprincitype']}', 
	fservyear = '{$cntrinfo['fservyear']}', 
	femail = '{$cntrinfo['femail']}',  fmobileno = '{$cntrinfo['fmobileno']}', 
	festyear = '{$cntrinfo['festyear']}', 
	fcentre = '{$cntrinfo['fcentre']}', 
	fcentredet = '{$cntrinfo['fcentredet']}', 
	fsafe = '{$cntrinfo['fsafe']}', 
	fugctwof = '{$cntrinfo['fugctwof']}', 
	fugctwob = '{$cntrinfo['fugctwob']}', 
	fnaacrep = '{$cntrinfo['fnaacrep']}',
	fnaacrepdet = '{$cntrinfo['fnaacrepdet']}', 
	faffiliated = '{$cntrinfo['faffiliated']}', 
	fcourses = '{$cntrinfo['fcourses']}', 
	fclassrooms = '{$cntrinfo['fclassrooms']}', 
	fperstaff = '{$cntrinfo['fperstaff']}', 
	ftmpstaff = '{$cntrinfo['ftmpstaff']}', 
	fnonteachstaff = '{$cntrinfo['fnonteachstaff']}', 
	fclasscctv = '{$cntrinfo['fclasscctv']}', 
	fwifi = '{$cntrinfo['fwifi']}', 
	fcomplab = '{$cntrinfo['fcomplab']}', 
	fcomplabdet = '{$cntrinfo['fcomplabdet']}', 
	fteachsmob = '{$cntrinfo['fteachsmob']}', 
	fofficecctv = '{$cntrinfo['fofficecctv']}', 
	fofficecctvdet ='{$cntrinfo['fofficecctvdet']}', 
	fotherdet = '{$cntrinfo['fotherdet']}'";
	$studresults = $aobj_context->mobj_db->Execute($insert_qry);
	// var_dump($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;
	}

}

function getCntrDetl($aobj_context)
{
	$college = $_SESSION['collcode'];

	$select_qry = "select * from examcntr where fcollcode = '{$college}'"; 
	$cntrresults = $aobj_context->mobj_db->GetRow($select_qry);

	if(count($cntrresults) == 0)
	{
		$select_qry = "select fcollname, fprincipalname as fprincipal, 
		fmobile as fmobileno, femail from college where fcollcode = '{$college}'";

		$cntrresults = $aobj_context->mobj_db->GetRow($select_qry);	
	}

	$data = $cntrresults;
	echo $aobj_context->mobj_output->ToJSONEnvelope($data,0,"success"); 
	return;
}

?>