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


Current Path : /proc/thread-self/root/var/www/misc/public_html/ovms/src/
Upload File :
Current File : //proc/thread-self/root/var/www/misc/public_html/ovms/src/systemsetup.php

<?php

	function gettimerdetails($aobj_context)
	{
		$aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);
		session_start();
		$timestamp = time();
		$diff = 0; //<-Time of countdown in seconds.  ie. 3600 = 1 hr. or 86400 = 1 day.
		//MODIFICATION BELOW THIS LINE IS NOT REQUIRED.
		$hld_diff = $diff;
		if(isset($_SESSION['ts'])) 
		{
			$slice = ($timestamp + $_SESSION['ts']);	
			$diff = $diff + $slice;
		}
		if(isset($_SESSION['ts']) ) 
		{
			$diff = $hld_diff;
			$_SESSION['ts'] = $timestamp;
		}
		//Below is demonstration of output.  Seconds could be passed to Javascript.
		$diff; //$diff holds seconds less than 3600 (1 hour);
		$hours = floor($diff / 3600) . '0';
		$diff = $diff % 3600;
		$minutes = floor($diff / 60) . '0';
		$diff = $diff % 60;
		$seconds = $diff; 
		
		$arr['hours'] = $hours;
		$arr['minutes'] = $minutes;
		$arr['seconds'] = $seconds;
	
		echo $aobj_context->mobj_output->ToJSONEnvelope($arr,0,"success"); 
	}

	function getheaderdetails($aobj_context)
	{
		session_start();
		$query="select c.FUNIVNAME as univname,DATE_FORMAT(NOW(),'%W  , %M  %d , %Y  |  %h:%i:%s %p') as datestr from control c";		
		$rst = $aobj_context->mobj_db->GetRow($query);				
		echo $aobj_context->mobj_output->ToJSONEnvelope($rst,0,"success");
	}
?>