<?php
$tpl_version = "1.3";
if (isset($_GET['ver'])) {
  echo $tpl_version;
  exit;
	// Date: 2014-12-25
}
session_start(); // start PHP session
// Check if a language has been selected
if (isset($_POST['langue'])) {
  $lang = $_POST['langue'];
  $_SESSION['langue'] = $lang; // store session data
}
elseif(isset($_SESSION['langue'])){
  $lang = $_SESSION['langue']; // Default language
}
else {
  $lang = 'en'; // Default language
  $_SESSION['langue'] = $lang;
}
// Include text and data file
require('lang/text_standard_en.php');  // Fall-back language: English
require('lang/text_standard_'.$lang.'.php');
include('wt_data_inc.php');
?>
<?php echo "<h1>$TT_thismonth</h1>"; ?>
<!-- WEATHER DATA BEGIN -->
<table id="tbl_month" width="100%"  border="0" cellpadding="0" cellspacing="0" summary="Observations for this month">
<col width="325" />
<col width="200" />
<tr>
	<td colspan="3" class="tableseparator"><?php echo $TT_TempAndHum; ?></td>
</tr><tr class="td_data">
	<?php echo '<td>'.$Tr_MonthTempH.'</td><td class="right_align">'.$MonthTempH.' '.$tempunit.'</td><td>'.$MonthTempHF.'</td>'; ?>
</tr><tr class="td_data">
	<?php echo '<td>'.$Tr_MonthTempL.'</td><td class="right_align">'.$MonthTempL.' '.$tempunit.'</td><td>'.$MonthTempLF.'</td>'; ?>
</tr><tr class="td_data">
	<?php echo '<td>'.$Tr_MonthMinTempH.'</td><td class="right_align">'.$MonthMinTempH.' '.$tempunit.'</td><td>'.$MonthMinTempHF.'</td>'; ?>
</tr><tr class="td_data">
	<?php echo '<td>'.$Tr_MonthMaxTempL.'</td><td class="right_align">'.$MonthMaxTempL.' '.$tempunit.'</td><td>'.$MonthMaxTempLF.'</td>'; ?>
</tr><tr class="td_data">
	<?php echo '<td>'.$Tr_MonthAppTempH.'</td><td class="right_align">'.$MonthAppTempH.' '.$tempunit.'</td><td>'.$MonthAppTempHF.'</td>'; ?>
</tr><tr class="td_data">
	<?php echo '<td>'.$Tr_MonthAppTempL.'</td><td class="right_align">'.$MonthAppTempL.' '.$tempunit.'</td><td>'.$MonthAppTempLF.'</td>'; ?>
</tr><tr class="td_data">
	<?php echo '<td>'.$Tr_MonthHeatIndexH.'</td><td class="right_align">'.$MonthHeatIndexH.' '.$tempunit.'</td><td>'.$MonthHeatIndexHF.'</td>'; ?>
</tr><tr class="td_data">
	<?php echo '<td>'.$Tr_MonthWChillL.'</td><td class="right_align">'.$MonthWChillL.' '.$tempunit.'</td><td>'.$MonthWChillLF.'</td>'; ?>
</tr><tr class="td_data">
	<?php echo '<td>'.$Tr_MonthDewPointH.'</td><td class="right_align">'.$MonthDewPointH.' '.$tempunit.'</td><td>'.$MonthDewPointHF.'</td>'; ?>
</tr><tr class="td_data">
	<?php echo '<td>'.$Tr_MonthDewPointL.'</td><td class="right_align">'.$MonthDewPointL.' '.$tempunit.'</td><td>'.$MonthDewPointLF.'</td>'; ?>
</tr><tr class="td_data">
	<?php echo '<td>'.$Tr_MonthHumH.'</td><td class="right_align">'.$MonthHumH.'%</td><td>'.$MonthHumHF.'</td>'; ?>
</tr><tr class="td_data">
	<?php echo '<td>'.$Tr_MonthHumL.'</td><td class="right_align">'.$MonthHumL.'%</td><td>'.$MonthHumLF.'</td>'; ?>
</tr><tr class="td_data">
	<?php echo '<td>'.$Tr_MonthHighDailyTempRange.'</td><td class="right_align">'.$MonthHighDailyTempRange.' '.$tempunit.'</td><td>'.$MonthHighDailyTempRangeF.'</td>'; ?>
</tr><tr class="td_data">
	<?php echo '<td>'.$Tr_MonthLowDailyTempRange.'</td><td class="right_align">'.$MonthLowDailyTempRange.' '.$tempunit.'</td><td>'.$MonthLowDailyTempRangeF.'</td>'; ?>
</tr><tr>
	<td colspan="3" class="tableseparator"><?php echo $TT_Rainfall; ?></td>
</tr><tr class="td_data">
	<?php echo '<td>'.$Tr_rmonth.'</td><td class="right_align">'.$rmonth.' '.$rainunit.'</td><td>&nbsp;</td>'; ?>
</tr><tr class="td_data">
	<?php echo '<td>'.$Tr_MonthRainRateH.'</td><td class="right_align">'.$MonthRainRateH.' '.$rainunit.'/hr</td><td>'.$MonthRainRateHF.'</td>'; ?>
</tr><tr class="td_data">
	<?php echo '<td>'.$Tr_MonthHourlyRainH.'</td><td class="right_align">'.$MonthHourlyRainH.' '.$rainunit.'</td><td>'.$MonthHourlyRainHF.'</td>'; ?>
</tr><tr class="td_data">
	<?php echo '<td>'.$Tr_MonthDailyRainH.'</td><td class="right_align">'.$MonthDailyRainH.' '.$rainunit.'</td><td>'.$MonthDailyRainHF.'</td>'; ?>
</tr><tr class="td_data">
	<?php echo '<td>'.$Tr_MonthLongestDryPeriod.'</td><td class="right_align">'.$MonthLongestDryPeriod.' '.$TT_day.'</td><td>'.$MonthLongestDryPeriodF.'</td>'; ?>
</tr><tr class="td_data">
	<?php echo '<td>'.$Tr_MonthLongestWetPeriod.'</td><td class="right_align">'.$MonthLongestWetPeriod.' '.$TT_day.'</td><td>'.$MonthLongestWetPeriodF.'</td>'; ?>
</tr><tr>
	<td colspan="3" class="tableseparator"><?php echo $TT_Wind; ?></td>
</tr><tr class="td_data">
	<?php echo '<td>'.$Tr_MonthGustH.'</td><td class="right_align">'.$MonthGustH.' '.$windunit.'</td><td>'.$MonthGustHF.'</td>'; ?>
</tr><tr class="td_data">
	<?php echo '<td>'.$Tr_MonthWindH.'</td><td class="right_align">'.$MonthWindH.' '.$windunit.'</td><td>'.$MonthWindHF.'</td>'; ?>
</tr><tr class="td_data">
	<?php echo '<td>'.$Tr_MonthWindRunH.'</td><td class="right_align">'.$MonthWindRunH.' '.$windrununit.'</td><td>'.$MonthWindRunHF.'</td>'; ?>
</tr><tr>
	<td colspan="3" class="tableseparator"><?php echo $TT_Press; ?></td>
</tr><tr class="td_data">
	<?php echo '<td>'.$Tr_MonthPressL.'</td><td class="right_align">'.$MonthPressL.' '.$pressunit.'</td><td>'.$MonthPressLF.'</td>'; ?>
</tr><tr class="td_data">
	<?php echo '<td>'.$Tr_MonthPressH.'</td><td class="right_align">'.$MonthPressH.' '.$pressunit.'</td><td>'.$MonthPressHF.'</td>'; ?>
</tr>
</table>
