ÿØÿàJFIFÿÛ„ ( %"1"%)+...383,7(-.- 404 Not Found
Sh3ll
OdayForums


Server : Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips PHP/7.4.20
System : Linux st2.domain.com 3.10.0-1127.10.1.el7.x86_64 #1 SMP Wed Jun 3 14:28:03 UTC 2020 x86_64
User : apache ( 48)
PHP Version : 7.4.20
Disable Function : NONE
Directory :  /var/www/html/sharefilefree/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /var/www/html/sharefilefree/tz.php
<?php
include_once("includes/header.php"); 

$sql = "select now() as d, @@session.time_zone as tz";
$res = $SFS->dbquery($sql);
$row = mysqli_fetch_object($res);
$dbdate =  $row->d;
$dbtz = $row->tz;
$wsdate = date("Y-m-d H:i:s");

?>

<div class='container'>

  <div class='row'>
   <div class='page-header'>
   	<h2>SFS Timezone Helper</h2>
	</div>
     <div class='col-xs-12 col-xs-offset-0 col-sm-6 col-sm-offset-3 col-md-4 col-md-offset-4'>

				<div class='panel panel-info'>
	        <div class='panel-heading'><h3 class='panel-title'>Webserver</h3></div>
	        <div class='panel-body'>
	        	<dl class="dl-horizontal">
	        		<dt>Datetime</dt><dd><?php echo $wsdate; ?></dd>
	        		<dt>Timezone</dt><dd><?php echo date_default_timezone_get(); ?></dd>
	        	</dl>
	        </div>
	        <div class='panel-heading'><h3 class='panel-title'>Database Server</h3></div>
	        <div class='panel-body'>
	        	<dl class="dl-horizontal">
	        		<dt>Datetime</dt><dd><?php echo $dbdate; ?></dd>
	        		<dt>Timezone</dt><dd><?php echo $dbtz ?></dd>
	        	</dl>
	        </div>
	      </div>
  	</div>
  </div>

 <div class='row'>
     <div class='col-xs-12 col-xs-offset-0 col-sm-6 col-sm-offset-3 '>


<?php

if ($dbdate != $wsdate) {
	echo "<div class='alert alert-danger'>It seems there are differences between the output times of your Webserver and the time settings of your database server.</div>";
		$wsUTC = date("P");
		// $tdiffS = (strtotime($dbdate)-strtotime($wsdate));
		// $tdiffH = floor($tdiffS/3600);
		// $tdiffM= abs(floor($tdiffS%3600));
		// // $tdiffHM = floor($tdiff) . ":" . abs($tdiff%60);
		// $tdiffHM = sprintf('%02d:%02d',$tdiffH,$tdiffM);
		// if ($tdiffHM >= 0) $tdiffHM = "+" . $tdiffHM;
		echo '<div class="alert alert-info">Please try to set <code>$config->db_timezoneCorrection</code> to <code>' . $wsUTC . '</code></div>';
} else {
	echo "<div class='alert alert-success'>It seems there are no time differences between your webserver and your database server.</div>";
}
?>
		</div>
  </div>
</div>
<?php
	include("includes/footer.php");
?>

ZeroDay Forums Mini