<?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_year</h1>"; ?>
<!-- WEATHER DATA BEGIN -->
<table width="100%"  border="0" cellpadding="0" cellspacing="0" summary="Observations for this month">
<col width="325" />
<col width="200"/>
<tr>
	<td colspan="4" class="tableseparator"><?php echo $TT_TempAndHum; ?></td>
</tr><tr class="td_data">
	<?php echo '<td>'.$Tr_YearTempH.'</td><td class="right_align">'.$YearTempH.' '.$tempunit.'</td><td>'.$YearTempHF.'</td>'; ?>
</tr><tr class="td_data">
	<?php echo '<td>'.$Tr_YearTempL.'</td><td class="right_align">'.$YearTempL.' '.$tempunit.'</td><td>'.$YearTempLF.'</td>'; ?>
</tr><tr class="td_data">
	<?php echo '<td>'.$Tr_YearMinTempH.'</td><td class="right_align">'.$YearMinTempH.' '.$tempunit.'</td><td>'.$YearMinTempHF.'</td>'; ?>
</tr><tr class="td_data">
	<?php echo '<td>'.$Tr_YearMaxTempL.'</td><td class="right_align">'.$YearMaxTempL.' '.$tempunit.'</td><td>'.$YearMaxTempLF.'</td>'; ?>
</tr><tr class="td_data">
	<?php echo '<td>'.$Tr_YearAppTempH.'</td><td class="right_align">'.$YearAppTempH.' '.$tempunit.'</td><td>'.$YearAppTempHF.'</td>'; ?>
</tr><tr class="td_data">
	<?php echo '<td>'.$Tr_YearAppTempL.'</td><td class="right_align">'.$YearAppTempL.' '.$tempunit.'</td><td>'.$YearAppTempLF.'</td>'; ?>
</tr><tr class="td_data">
	<?php echo '<td>'.$Tr_YearHeatIndexH.'</td><td class="right_align">'.$YearHeatIndexH.' '.$tempunit.'</td><td>'.$YearHeatIndexHF.'</td>'; ?>
</tr><tr class="td_data">
	<?php echo '<td>'.$Tr_YearWChillL.'</td><td class="right_align">'.$YearWChillL.' '.$tempunit.'</td><td>'.$YearWChillLF.'</td>'; ?>
</tr><tr class="td_data">
	<?php echo '<td>'.$Tr_YearDewPointH.'</td><td class="right_align">'.$YearDewPointH.' '.$tempunit.'</td><td>'.$YearDewPointHF.'</td>'; ?>
</tr><tr class="td_data">
	<?php echo '<td>'.$Tr_YearDewPointL.'</td><td class="right_align">'.$YearDewPointL.' '.$tempunit.'</td><td>'.$YearDewPointLF.'</td>'; ?>
</tr><tr class="td_data">
	<?php echo '<td>'.$Tr_YearHumH.'</td><td class="right_align">'.$YearHumH.'%</td><td>'.$YearHumHF.'</td>'; ?>
</tr><tr class="td_data">
	<?php echo '<td>'.$Tr_YearHumL.'</td><td class="right_align">'.$YearHumL.'%</td><td>'.$YearHumLF.'</td>'; ?>
</tr><tr class="td_data">
	<?php echo '<td>'.$Tr_YearHighDailyTempRange.'</td><td class="right_align">'.$YearHighDailyTempRange.' '.$tempunit.'</td><td>'.$YearHighDailyTempRangeF.'</td>'; ?>
</tr><tr class="td_data">
	<?php echo '<td>'.$Tr_YearLowDailyTempRange.'</td><td class="right_align">'.$YearLowDailyTempRange.' '.$tempunit.'</td><td>'.$YearLowDailyTempRangeF.'</td>'; ?>
</tr><tr>
	<td colspan="4" class="tableseparator"><?php echo $TT_Rainfall; ?></td>
</tr><tr class="td_data">
	<?php echo '<td>'.$Tr_ryear.'</td><td class="right_align">'.$ryear.' '.$rainunit.'</td><td>&nbsp;</td>'; ?>
</tr><tr class="td_data">
	<?php echo '<td>'.$Tr_YearRainRateH.'</td><td class="right_align">'.$YearRainRateH.' '.$rainunit.'/hr</td><td>'.$YearRainRateHF.'</td>'; ?>
</tr><tr class="td_data">
	<?php echo '<td>'.$Tr_YearHourlyRainH.'</td><td class="right_align">'.$YearHourlyRainH.' '.$rainunit.'</td><td>'.$YearHourlyRainHF.'</td>'; ?>
</tr><tr class="td_data">
	<?php echo '<td>'.$Tr_YearDailyRainH.'</td><td class="right_align">'.$YearDailyRainH.' '.$rainunit.'</td><td>'.$YearDailyRainHF.'</td>'; ?>
</tr><tr class="td_data">
	<?php echo '<td>'.$Tr_YearMonthlyRainH.'</td><td class="right_align">'.$YearMonthlyRainH.' '.$rainunit.'</td><td>'.$YearMonthlyRainHF.'</td>'; ?>
</tr><tr class="td_data">
	<?php echo '<td>'.$Tr_YearLongestDryPeriod.'</td><td class="right_align">'.$YearLongestDryPeriod.' '.$TT_day.'</td><td>'.$YearLongestDryPeriodF.'</td>'; ?>
</tr><tr class="td_data">
	<?php echo '<td>'.$Tr_YearLongestWetPeriod.'</td><td class="right_align">'.$YearLongestWetPeriod.' '.$TT_day.'</td><td>'.$YearLongestWetPeriodF.'</td>'; ?>
</tr><tr>
	<td colspan="4" class="tableseparator"><?php echo $TT_Wind; ?></td>
</tr><tr class="td_data">
	<?php echo '<td>'.$Tr_YearGustH.'</td><td class="right_align">'.$YearGustH.' '.$windunit.'</td><td>'.$YearGustHF.'</td>'; ?>
</tr><tr class="td_data">
	<?php echo '<td>'.$Tr_YearWindH.'</td><td class="right_align">'.$YearWindH.' '.$windunit.'</td><td>'.$YearWindHF.'</td>'; ?>
</tr><tr class="td_data">
	<?php echo '<td>'.$Tr_YearWindRunH.'</td><td class="right_align">'.$YearWindRunH.' '.$windrununit.'</td><td>'.$YearWindRunHF.'</td>'; ?>
</tr><tr>
	<td colspan="4" class="tableseparator"><?php echo $TT_Press; ?></td>
</tr><tr class="td_data">
	<?php echo '<td>'.$Tr_YearPressL.'</td><td class="right_align">'.$YearPressL.' '.$pressunit.'</td><td>'.$YearPressLF.'</td>'; ?>
</tr><tr class="td_data">
	<?php echo '<td>'.$Tr_YearPressH.'</td><td class="right_align">'.$YearPressH.' '.$pressunit.'</td><td>'.$YearPressHF.'</td>'; ?>
</tr>
</table>
