<?php
$tpl_version = "1.2";
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_'.$lang.'.php');
include('wt_data_inc.php');

// Include language files available in lang folder
include('include/local_lang.php');
?>
<!-- WEATHER DATA BEGIN -->
<h2><?php echo $TT_trends; ?></h2>
<div style="margin:10px 25px">
	<p style="text-align:center; font-size: 125%"><strong><?php echo $TT_stats; ?>.</strong></p><br />
	<p><?php echo $Tr_graphs.' '.$graphperiod.'&nbsp;'.$Tr_hours;?>.</p>
	<p><?php echo $Tr_thumbs.' 10 '.$Tr_minutes.'. '.$Tr_larger.'. '.$Tr_sampled.' '.$Tr_minutes; ?>.</p>
</div>
<div style="margin-left:-30px;">		
	<p> <img src="images/wind.png" name="graphs" id="graphs" title="Weather Graphs" alt="Weather Graphs"/></p>
	<table cellpadding="0" cellspacing="0" id="Graph_menu">
		<tr>
			<td colspan="5">Click on a thumbnail to show a large graph in the panel above.</td>
		</tr>
		<tr>
			<td class="td_thumbnails"><a onclick='changeImage("images/wind.png")'><img src="images/windsm.png" alt="Wind Graph Thumbnail" width="150" height="100" border="0" /></a></td>
			<td class="td_thumbnails"><a onclick='changeImage("images/temp.png")'><img src="images/tempsm.png" alt="Temperature Graph Thumbnail" width="150" height="100" border="0" /></a></td>
			<td class="td_thumbnails"><a onclick='changeImage("images/intemp.png")'><img src="images/intempsm.png" alt="Inside Temperature Graph Thumbnail" width="150" height="100" border="0" /></a></td>
			<td class="td_thumbnails"><a onclick='changeImage("images/press.png")'><img src="images/presssm.png" alt="Pressure Graph Thumbnail" width="150" height="100" border="0" /></a></td>
			<td class="td_thumbnails"><a onclick='changeImage("images/rain.png")'><img src="images/rainsm.png" alt="Rain Graph Thumbnail" width="150" height="100" border="0" /></a></td>
		</tr>
		<tr>
			<td class="td_thumbnails"><a onclick='changeImage("images/windd.png")'><img src="images/winddsm.png" alt="Wind Direction Thumbnail" width="150" height="100" border="0" /></a></td>
			<td class="td_thumbnails"><a onclick='changeImage("images/tempm.png")'><img src="images/tempmsm.png" alt="Temp Min/Max Graph Thumbnail" width="150" height="100" border="0" /></a></td>
			<td class="td_thumbnails"><a onclick='changeImage("images/hum.png")'><img src="images/humsm.png" alt="Humidity Graph Thumbnail" width="150" height="100" border="0" /></a></td>
			<td class="td_thumbnails"><a onclick='changeImage("images/raint.png")'><img src="images/raintsm.png" alt="Today's Rainfall Graph Thumbnail" width="150" height="100" border="0" /></a></td>
			<td class="td_thumbnails"><a onclick='changeImage("images/raind.png")'><img src="images/raindsm.png" alt="Daily Rain Graph Thumbnail" width="150" height="100" border="0" /></a></td>
		</tr>
	</table>
</div>