view web/index.php @ 0:9dab44dcb331

Initial commit of Greg's code from http://www.lemis.com/grog/tmp/wh1080.tar.gz
author Daniel O'Connor <darius@dons.net.au>
date Tue, 09 Feb 2010 13:44:25 +1030
parents
children
line wrap: on
line source

<!-- for Emacs, this is a -*- mode: html-fill; coding: utf-8 -*- document -->
<!-- $Id: index.php,v 1.14 2009/12/29 22:56:12 grog Exp grog $ -->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<?php
   /* title should start with a lower case character */
   $title = "Dereel weather observations";
   $subtitle = "";
   include "header.php";
   include "weathergraph.php";
   include "current.php";
   $id = '$Id: index.php,v 1.14 2009/12/29 22:56:12 grog Exp grog $';
   if (array_key_exists ("date", $_GET))
    $date = $_GET ["date"];
   else
    $date = date ("Y-m-d");
 ?>

<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <?php pagetitle0 ($title); ?>
    <meta http-equiv="refresh" content="900" ;="">
  </head>

  <body>
    <?php pageheader0 ($title); ?>

    <div align="justify">
      <p>
	This is an experimental page that I'm working on as part of my weather reporting software.
	It'll grow over time.  In the meantime, you can get more complete version of this
	information from the <?php href
	("http://www.wunderground.com/weatherstation/WXDailyHistory.asp?ID=IVICTORI124",
	"Wunderground page"); ?> for this station.
      </p>

      <h2>
	Current readings at <?php echo $timetext ?>
      </h2>

      <table>
	<?php makerows (<<< EOS
-				Minimum			At				Maximum      At        Current
Outside temperature (°C)	$min_outside_temp	$min_outside_temp_time		$max_outside_temp	$max_outside_temp_time       $outside_temperature
Outside dewpoint (°C)	$min_outside_dewpoint	$min_outside_dewpoint_time	$max_outside_dewpoint	$max_outside_dewpoint_time		$outside_dewpoint
Outside humidity (%)		$min_outside_humidity	$min_outside_humidity_time	$max_outside_humidity	$max_outside_humidity_time    $outside_humidity

Inside temperature (°C)		$min_inside_temp	$min_inside_temp_time		$max_inside_temp	$max_inside_temp_time	$inside_temperature
Inside dewpoint (°C)		$min_inside_dewpoint	$min_inside_dewpoint_time	$max_inside_dewpoint	$max_inside_dewpoint_time	$inside_dewpoint
Inside humidity (%)	$min_inside_humidity	$min_inside_humidity_time	$max_inside_humidity	$max_inside_humidity_time		$inside_humidity

Pressure (hPa)		$min_pressure_msl	$min_pressure_msl_time		$max_pressure_msl	$max_pressure_msl_time			$pressure_msl
Wind speed (km/h)		$min_wind_speed		$min_wind_speed_time		$max_wind_speed		$max_wind_speed_time		$wind_speed
Wind gust (km/h)		$min_wind_gust		$min_wind_gust_time		$max_wind_gust		$max_wind_gust_time		$wind_gust
Wind direction (°)		$wind_direction ($wind_direction_text)
Day's rainfall (mm)		$sum_rain

EOS
, "lrcrcr");
?>
      </table>

      <h2>
	Readings for <?php echo $date ?>
      </h2>

      <div align="left">
	<?php showgraphs (<<< EOS
temperatures-$date	Temperatures
5days-$date             Five day temperatures
humidity-$date           humidity
wind-$date		wind
pressure-$date       	pressure
rain-$date		rain
BoM-Dereel-$date   	BoM-Dereel
EOS
);
?>

      </div>

      <h2>
	Yesterday's readings <?php echo "($yesterday)"; $date = $yesterday; ?>
      </h2>

      <div align="left">
	<?php showgraphs (<<< EOS
outside-temp-$date      Outside temperature
inside-temp-$date       inside-temp
inside-outside-temp-$date  inside-outside-temp
humidity-$date           humidity
wind-$date		wind
pressure-$date       	pressure
rain-$date		rain
BoM-Dereel-$date   	BoM-Dereel
EOS
);
?>

      </div>
    </div>

<?php pagefooter ($id); ?>