wahs-the-weather/yesterday/index.php
2024-12-12 19:18:16 +00:00

149 lines
7.1 KiB
PHP

<!DOCYYPE html>
<html lang="en">
<head>
<?php include("../includes/head.inc.php"); ?>
<script>
window.onload = () => {
$('#moonImg').attr('src', '/images/moon.png?' + Date.now());
// update the moon image every 20 minutes if the page is left open
setInterval(() => {
$('#moonImg').attr('src', '/images/moon.png?' + Date.now());
}, 1200000);
};
</script>
</head>
<body>
<div class="page-container">
<?php include("../includes/header.inc.php"); ?>
<div id="content">
<h2>Data for yesterday (<span data-cmxdata="yesterday"></span>)</h2>
<table class="mx-datatable">
<tr>
<th colspan="4">Temperature and Humidity</th>
</tr>
<tr>
<td>High Temperature</td>
<td><span data-cmxdata="tempYH"></span>&nbsp;<span data-cmxdata="tempunit"></span></td>
<td>at <span data-cmxdata="TtempYH"></span></td>
</tr>
<tr>
<td>Low Temperature</td>
<td><span data-cmxdata="tempYL"></span>&nbsp;<span data-cmxdata="tempunit"></span></td>
<td>at <span data-cmxdata="TtempYL"></span></td>
</tr>
<tr>
<td>Temperature Range</td>
<td><span data-cmxdata="temprange"></span>&nbsp;<span data-cmxdata="tempunit"></span></td>
<td></td>
</tr>
<tr data-cmx-feels>
<td>High Feels Like</td>
<td><span data-cmxdata="feelslikeYH"></span>&nbsp;<span data-cmxdata="tempunit"></span></td>
<td>at <span data-cmxdata="TfeelslikeYH"></span></td>
</tr>
<tr data-cmx-feels>
<td>Low Feels Like</td>
<td><span data-cmxdata="feelslikeYL"></span>&nbsp;<span data-cmxdata="tempunit"></span></td>
<td>at <span data-cmxdata="TfeelslikeYL"></span></td>
</tr>
<tr>
<td>Low Wind Chill</td>
<td><span data-cmxdata="wchillYL"></span>&nbsp;<span data-cmxdata="tempunit"></span></td>
<td>at <span data-cmxdata="TwchillYL"></span></td>
</tr>
<tr>
<td>High Heat Index</td>
<td><span data-cmxdata="heatindexYH"></span>&nbsp;<span data-cmxdata="tempunit"></span></td>
<td>at <span data-cmxdata="TheatindexYH"></span></td>
</tr>
<tr>
<td>High Humidity</td>
<td><span data-cmxdata="humYH"></span> %</td>
<td>at <span data-cmxdata="ThumYH"></span></td>
</tr>
<tr>
<td>Low Humidity</td>
<td><span data-cmxdata="humYL"></span> %</td>
<td>at <span data-cmxdata="ThumYL"></span></td>
</tr>
<tr>
<th colspan="4">Rainfall</th>
</tr>
<tr>
<td>Rainfall Today</td>
<td><span data-cmxdata="rfall"></span>&nbsp;<span data-cmxdata="rainunit"></span></td>
<td></td>
</tr>
<tr>
<td>Rainfall Rate Max</td>
<td><span data-cmxdata="rrateYM"></span>&nbsp;<span data-cmxdata="rainunit"></span>/hr</td>
<td>at <span data-cmxdata="TrrateYM"></span></td>
</tr>
<tr>
<td>High Hourly Rainfall</td>
<td><span data-cmxdata="hourlyrainYH"></span>&nbsp;<span data-cmxdata="rainunit"></span></td>
<td>at <span data-cmxdata="ThourlyrainYH"></span></td>
</tr>
<tr>
<td>High 24 Hour Rainfall</td>
<td><span data-cmxdata="rain24hourYH"></span>&nbsp;<span data-cmxdata="rainunit"></span></td>
<td>at <span data-cmxdata="Train24hourYH"></span></td>
</tr>
<tr>
<td>Days Since Last Dry Day</td>
<td><span data-cmxdata="ConsecutiveRainDays"></span></td>
<td></td>
</tr>
<tr>
<td>Days Since It Last Rained</td>
<td><span data-cmxdata="ConsecutiveDryDays"></span></td>
<td></td>
</tr>
<tr>
<th colspan="4">Wind</th>
</tr>
<tr>
<td>High Gust</td>
<td><span data-cmxdata="wgustYM"></span>&nbsp;<span data-cmxdata="windunit"></span></td>
<td>at <span data-cmxdata="TwgustYM"></span></td>
</tr>
<tr>
<td>High Speed <span class="subText">(10 minute average)</span></td>
<td><span data-cmxdata="windYM"></span>&nbsp;<span data-cmxdata="windunit"></span> (<span
data-cmxdata="Tbeaufort"></span>)</td>
<td>at <span data-cmxdata="TwindYM"></span></td>
</tr>
<tr>
<td>Wind Run</td>
<td><span data-cmxdata="windrun"></span>&nbsp;<span data-cmxdata="windrununit"></span></td>
<td></td>
</tr>
<tr>
<td>Dominant Direction</td>
<td><span data-cmxdata="domwindbearing"></span>&deg; <span data-cmxdata="domwinddir"></span>
</td>
<td></td>
</tr>
<tr>
<th colspan="4">Pressure (sea level)</th>
</tr>
<tr>
<td>High Pressure</td>
<td><span data-cmxdata="pressYH"></span>&nbsp;<span data-cmxdata="pressunit"></span></td>
<td>at <span data-cmxdata="TpressYH"></span></td>
</tr>
<tr>
<td>Low Pressure</td>
<td><span data-cmxdata="pressYL"></span>&nbsp;<span data-cmxdata="pressunit"></span></td>
<td>at <span data-cmxdata="TpressYL"></span></td>
</tr>
</table>
<small>Page data updated <span data-cmxdata="update"></span></small>
</div>
<?php include("../includes/footer.inc.php"); ?>
</div>
</body>
</html>