5,838
edits
m (→Replacing HTML by PHP: tidy up) |
|||
#Then you create a new PHP script that does not get processed by Cumulus. For example "thismonth.php" would start with the same HTML5 as shown above, but the table is output by the PHP script:
<code><!DOCTYPE HTML>
<html>
<head>
<meta charset="UTF-8">
<meta name="description" content="<#location> weather data" />
<meta name="keywords" content="Cumulus, <#location> weather data, weather, data, weather station" />
<title><?php
include 'cumuluswebtags.php';
echo "$location";
?>weather</title>
<link href="weatherstyle.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="content">
<h1><?php
echo "$location";
?> weather</h1>
....
<table style="width:100%;border-collapse: collapse; border-spacing: 0;" >
<caption>This month's highs and lows</caption>
<tr>
<td colspan="3" class="tableseparator_temp">Temperature and Humidity </td>
</tr>
<tr class="td_temperature_data">
<?php
echo "<th>Highest</th>";
echo "<td>$MonthTempH $tempunit</td>";
echo "<td>$MonthTempHT on $MonthTempHD</td>";
echo "<th>Lowest</th>";
echo "<td>$MonthTempL $tempunit</td>";
echo "<td>$MonthTempLT on $MonthTempLD</td>";
?>
</tr>
echo <<< END_OF_QUOTE
<tr>
<td colspan="2" class="spacer">Pressure (sea level)</td>
</tr>
<tr>
<th class="labels">Lowest</th>
<td class="site_data">$MonthPressL {$pressunit}</td>
<td class="time_stamp">at $MonthPressLT on $MonthPressLD</td>
</tr>
<tr>
<th class="labels">Highest</th>
<td class="site_data">$MonthPressH {$pressunit}</td>
<td class="time_stamp">at $MonthPressHT on $MonthPressHD</td>
</tr>
</table>
END_OF_QUOTE;
|
edits