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


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

<?php

function getrvdatedetails($aobj_context)
{
	$degree_code_from = trim($aobj_context->mobj_data["degree_code_from"]);
	$degree_code_to = trim($aobj_context->mobj_data["degree_code_to"]);
	$Examno_from = trim($aobj_context->mobj_data["Examno_from"]); 
	$Examno_to = trim($aobj_context->mobj_data["Examno_to"]);
	
	$query = "select fdegree as degcode,fexamno as examno,concat(fdegree,' - ',fdescpn) as fdegree,concat(fexamno,' - ',fexamname) as fexamno,
			ifnull(frvfee,'0') as frvfee,ifnull(frtfee,'0') as frtfee,
			ifnull(fxeroxfee,'0') as fxeroxfee,ifnull(fcvfee,'0') as fcvfee,
			ifnull(frvdays,'0') as frvdays,ifnull(frtdays,'0') as frtdays,
			ifnull(fxrdays,'0') as fxrdays,ifnull(fcvdays,'0') as fcvdays
			from degree 
			where fdegree between '{$degree_code_from}' and '{$degree_code_to}'
			and fexamno between '{$Examno_from}' and '{$Examno_to}'
			order by fdegree,fexamno";
	
	$result = $aobj_context->mobj_db->getAll($query);
	//var_dump($query);
	$i = 1;
	$table.="<table id ='ftable1' align='left'  cellpadding='1' cellspacing='1'  border='1' style='overflow:auto;width:350px;margin:0px;padding:0px;'>";
	foreach($result as $key => $value)
	{      
		$table.="<tr>";
		$table.="<td  align='center'  ><input type = 'text' tabindex = '-1'  id = '{$i}degree' style='width:196px;height:20px' disabled  onchange = 'getid(this.id)' value = '{$value['fdegree']}' name = 'date'/>
		<input type = 'hidden' id = '{$i}degcode' value = '{$value['degcode']}' /></td>";
		$table.="<td  align='center' ><input type = 'text' tabindex = '-1' id = '{$i}exam' style='width:145px;height:20px'   disabled onchange = 'getid(this.id)' value = '{$value['fexamno']}' />
		<input type = 'hidden' id = '{$i}examno' value = '{$value['examno']}' /></td>";
		$table.="<td  align='center'  ><input type = 'text' id = '{$i}frvfee' style='width:51px;height:20px' onkeypress='return acceptNumbersOnlyForModule(event);'  maxlength = 4 onchange = 'getid(this.id)' value = '{$value['frvfee']}'/> 
			<input type = 'hidden' id = '{$i}frvfeeh' value = 'E' /></td>";
		$table.="<td  align='center'  ><input type = 'text' id = '{$i}frtfee' style='width:51px;height:20px' onkeypress='return acceptNumbersOnlyForModule(event);'  maxlength = 4 onchange = 'getid(this.id)' value = '{$value['frtfee']}'/> 
			<input type = 'hidden' id = '{$i}frtfeeh' value = 'E' /></td>";
		$table.="<td  align='center'  ><input type = 'text' id = '{$i}fpcfee' style='width:51px;height:20px' onkeypress='return acceptNumbersOnlyForModule(event);'  maxlength = 4 onchange = 'getid(this.id)' value = '{$value['fxeroxfee']}'/> 
			<input type = 'hidden' id = '{$i}fpcfeeh' value = 'E' /></td>";
		$table.="<td  align='center'  ><input type = 'text' id = '{$i}fcvfee' style='width:51px;height:20px' onkeypress='return acceptNumbersOnlyForModule(event);'  maxlength = 4 onchange = 'getid(this.id)' value = '{$value['fcvfee']}'/> 
			<input type = 'hidden' id = '{$i}fcvfeeh' value = 'E' /></td>";
		$table.="<td  align='center'  ><input type = 'text' id = '{$i}frvdays' style='width:51px;height:20px' onkeypress='return acceptNumbersOnlyForModule(event);'  maxlength = 4 onchange = 'getid(this.id)' value = '{$value['frvdays']}'/> 
			<input type = 'hidden' id = '{$i}frvdaysh' value = 'E' /></td>";
		$table.="<td  align='center'  ><input type = 'text' id = '{$i}frtdays' style='width:51px;height:20px' onkeypress='return acceptNumbersOnlyForModule(event);'  maxlength = 4 onchange = 'getid(this.id)' value = '{$value['frtdays']}'/> 
			<input type = 'hidden' id = '{$i}frtdaysh' value = 'E' /></td>";
		$table.="<td  align='center'  ><input type = 'text' id = '{$i}fpcdays' style='width:51px;height:20px' onkeypress='return acceptNumbersOnlyForModule(event);'  maxlength = 4 onchange = 'getid(this.id)' value = '{$value['fxrdays']}'/> 
			<input type = 'hidden' id = '{$i}fpcdaysh' value = 'E' /></td>";
		$table.="<td  align='center'  ><input type = 'text' id = '{$i}fcvdays' style='width:51px;height:20px' onkeypress='return acceptNumbersOnlyForModule(event);'  maxlength = 4 onchange = 'getid(this.id)' value = '{$value['fcvdays']}'/> 
			<input type = 'hidden' id = '{$i}fcvdaysh' value = 'E' /></td>";
		$table.="</tr>";
		$i++;
	}
	$table.="</table>";
	
	if($result)
	{
		$arr['table'] = $table;
		echo $aobj_context->mobj_output->ToJSONEnvelope($arr,0,"success");	
		return; 
	}else
	{
		$arr = '';
		echo $aobj_context->mobj_output->ToJSONEnvelope($arr,-1,"Failur");	
		return; 
	}
	
}

function Savervdaterange($aobj_context)
{
	
	include_once($aobj_context."/src/JSON.php"); 
	$json = new Services_JSON();
	$date_arr = stripslashes($aobj_context->mobj_data["date_arr"]);
	$mobj_jsondata = $json->decode($date_arr);
	$date_arr = get_object_vars($mobj_jsondata);	

	$degree_code_from = trim($aobj_context->mobj_data["degree_code_from"]);
	$degree_code_to = trim($aobj_context->mobj_data["degree_code_to"]);
	$Examno_from = trim($aobj_context->mobj_data["Examno_from"]); 
	$Examno_to = trim($aobj_context->mobj_data["Examno_to"]);

	$rvfee = trim($aobj_context->mobj_data["rvfee"]); 
	$rtfee = trim($aobj_context->mobj_data["rtfee"]);
	$pcfee = trim($aobj_context->mobj_data["pcfee"]); 
	$cvfee = trim($aobj_context->mobj_data["cvfee"]);
	
	$rvdays = trim($aobj_context->mobj_data["rvdays"]); 
	$rtdays = trim($aobj_context->mobj_data["rtdays"]);
	$pcdays = trim($aobj_context->mobj_data["pcdays"]); 
	$cvdays = trim($aobj_context->mobj_data["cvdays"]);
	
	$bulkinsert = trim($aobj_context->mobj_data["bulkinsert"]);

	for($k=1;$k<=count($date_arr);$k++)
	{
		$query = "update degree set
				frvfee = '{$date_arr[$k]->frvfee}',frtfee = '{$date_arr[$k]->frtfee}',
				fxeroxfee = '{$date_arr[$k]->fpcfee}',fcvfee = '{$date_arr[$k]->fcvfee}',
				frvdays = '{$date_arr[$k]->frvdays}',frtdays = '{$date_arr[$k]->frtdays}',
				fxrdays = '{$date_arr[$k]->fpcdays}',fcvdays = '{$date_arr[$k]->fcvdays}'
				where fdegree = '{$date_arr[$k]->degree}' 
				and   fexamno = '{$date_arr[$k]->examno}'";
		$lobj_update = $aobj_context->mobj_db->Execute($query);
	}
	
	if($bulkinsert == 'T')
	{
		$query = "update degree set
				frvfee = '{$rvfee}',frtfee = '{$rtfee}',
				fxeroxfee = '{$pcfee}',fcvfee = '{$cvfee}',
				frvdays = '{$rvdays}',frtdays = '{$rtdays}',
				fxrdays = '{$pcdays}',fcvdays = '{$cvdays}'
				where fdegree between '{$degree_code_from}' and '{$degree_code_to}' 
				and   fexamno between '{$Examno_from}' and '{$Examno_to}' ";
				
		$lobj_update = $aobj_context->mobj_db->Execute($query);  
	} 
	
	if($lobj_update)	
	{	
		$arr = "updated successfully";
		echo $aobj_context->mobj_output->ToJSONEnvelope($arr,0,"success"); 
	}
	
}


?>