Mercurial > ~darius > hgwebdir.cgi > wh1080
comparison 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 |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:9dab44dcb331 |
---|---|
1 <!-- for Emacs, this is a -*- mode: html-fill; coding: utf-8 -*- document --> | |
2 <!-- $Id: index.php,v 1.14 2009/12/29 22:56:12 grog Exp grog $ --> | |
3 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" | |
4 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
5 | |
6 <?php | |
7 /* title should start with a lower case character */ | |
8 $title = "Dereel weather observations"; | |
9 $subtitle = ""; | |
10 include "header.php"; | |
11 include "weathergraph.php"; | |
12 include "current.php"; | |
13 $id = '$Id: index.php,v 1.14 2009/12/29 22:56:12 grog Exp grog $'; | |
14 if (array_key_exists ("date", $_GET)) | |
15 $date = $_GET ["date"]; | |
16 else | |
17 $date = date ("Y-m-d"); | |
18 ?> | |
19 | |
20 <html xmlns="http://www.w3.org/1999/xhtml"> | |
21 <head> | |
22 <?php pagetitle0 ($title); ?> | |
23 <meta http-equiv="refresh" content="900" ;=""> | |
24 </head> | |
25 | |
26 <body> | |
27 <?php pageheader0 ($title); ?> | |
28 | |
29 <div align="justify"> | |
30 <p> | |
31 This is an experimental page that I'm working on as part of my weather reporting software. | |
32 It'll grow over time. In the meantime, you can get more complete version of this | |
33 information from the <?php href | |
34 ("http://www.wunderground.com/weatherstation/WXDailyHistory.asp?ID=IVICTORI124", | |
35 "Wunderground page"); ?> for this station. | |
36 </p> | |
37 | |
38 <h2> | |
39 Current readings at <?php echo $timetext ?> | |
40 </h2> | |
41 | |
42 <table> | |
43 <?php makerows (<<< EOS | |
44 - Minimum At Maximum At Current | |
45 Outside temperature (°C) $min_outside_temp $min_outside_temp_time $max_outside_temp $max_outside_temp_time $outside_temperature | |
46 Outside dewpoint (°C) $min_outside_dewpoint $min_outside_dewpoint_time $max_outside_dewpoint $max_outside_dewpoint_time $outside_dewpoint | |
47 Outside humidity (%) $min_outside_humidity $min_outside_humidity_time $max_outside_humidity $max_outside_humidity_time $outside_humidity | |
48 | |
49 Inside temperature (°C) $min_inside_temp $min_inside_temp_time $max_inside_temp $max_inside_temp_time $inside_temperature | |
50 Inside dewpoint (°C) $min_inside_dewpoint $min_inside_dewpoint_time $max_inside_dewpoint $max_inside_dewpoint_time $inside_dewpoint | |
51 Inside humidity (%) $min_inside_humidity $min_inside_humidity_time $max_inside_humidity $max_inside_humidity_time $inside_humidity | |
52 | |
53 Pressure (hPa) $min_pressure_msl $min_pressure_msl_time $max_pressure_msl $max_pressure_msl_time $pressure_msl | |
54 Wind speed (km/h) $min_wind_speed $min_wind_speed_time $max_wind_speed $max_wind_speed_time $wind_speed | |
55 Wind gust (km/h) $min_wind_gust $min_wind_gust_time $max_wind_gust $max_wind_gust_time $wind_gust | |
56 Wind direction (°) $wind_direction ($wind_direction_text) | |
57 Day's rainfall (mm) $sum_rain | |
58 | |
59 EOS | |
60 , "lrcrcr"); | |
61 ?> | |
62 </table> | |
63 | |
64 <h2> | |
65 Readings for <?php echo $date ?> | |
66 </h2> | |
67 | |
68 <div align="left"> | |
69 <?php showgraphs (<<< EOS | |
70 temperatures-$date Temperatures | |
71 5days-$date Five day temperatures | |
72 humidity-$date humidity | |
73 wind-$date wind | |
74 pressure-$date pressure | |
75 rain-$date rain | |
76 BoM-Dereel-$date BoM-Dereel | |
77 EOS | |
78 ); | |
79 ?> | |
80 | |
81 </div> | |
82 | |
83 <h2> | |
84 Yesterday's readings <?php echo "($yesterday)"; $date = $yesterday; ?> | |
85 </h2> | |
86 | |
87 <div align="left"> | |
88 <?php showgraphs (<<< EOS | |
89 outside-temp-$date Outside temperature | |
90 inside-temp-$date inside-temp | |
91 inside-outside-temp-$date inside-outside-temp | |
92 humidity-$date humidity | |
93 wind-$date wind | |
94 pressure-$date pressure | |
95 rain-$date rain | |
96 BoM-Dereel-$date BoM-Dereel | |
97 EOS | |
98 ); | |
99 ?> | |
100 | |
101 </div> | |
102 </div> | |
103 | |
104 <?php pagefooter ($id); ?> |