Graphs | ||
// COMPARE VERSION
$verFile = $WUcacheDir.'WUG-version.txt'; 
$remVerCheck = 'http://pocasi.hovnet.cz/wug/version.php'; // server with newest version info
$tHourStart = strtotime(date('Y-m-d').' 00:00:01');  //more compatible solution than strtotime("today")
   
if ($updateCheck) {
  if (is_file($verFile)) { 
    if ( filemtime($verFile) < $tHourStart ) { // compare version from remote server once at day      
      $vf = @fopen($verFile, "w");
      @fwrite($vf, trim(file_get_contents($remVerCheck)));
      if (true) { // send name to station list
      file_get_contents( $remVerCheck.'?name='.urlencode(utf8_encode($stationName)).'&i=1&web='.urlencode($_SERVER['HTTP_HOST']) );
      }
    }
  @fclose($vf);
  } else { // create verify file, version will be checked in next page load.
  $vf = @fopen($verFile, "w");
  @fwrite($vf, trim(file_get_contents($remVerCheck)));
  @fclose($vf);
  file_get_contents( $remVerCheck.'?name='.urlencode(utf8_encode($stationName)).'&i=1&web='.urlencode($_SERVER['HTTP_HOST']) );
  }
  // Check version for information at the bottom of the page.
  if (version_compare(VERSION, trim(file_get_contents($verFile)), '<')) {
  $nwVerAvail = true;
  } else {
  $nwVerAvail = false;
  }
}
//if ($winFlag) {$tabPos = '';} else {$tabPos = 'position: absolute; bottom: 0pt;';}
if ($nwVerAvail) {$redVer = ' style="color:#FA7C78"';} else {$redVer = ' ';}
if ($nwVerAvail) { // tooltip info
$tooltipVer = 'There is available a newer version ( '.trim(file_get_contents($verFile)).' ) of this SW. For more information, click the author\'s website link.';
} else {
$tooltipVer = 'The latest version is already installed.';
}
// Copyright, version and other info - Please do not change this code!
if (!is_file('./WUG-settings.php')) {$tabFlag = true;} //resolve mode
if ($winFlag or $tabFlag) {
echo '
 
  | 

