<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="refresh" content="2"> 
<style type="text/css">
/*	
	Side Navigation Menu V2, RWD
	===================
	License:
	http://goo.gl/EaUPrt
	===================
	Author: @PableraShow

 */

@charset "UTF-8";
@import url(http://fonts.googleapis.com/css?family=Open+Sans:300,400,700);

body {
  font-family: 'Open Sans', sans-serif;
  font-weight: 300;
  line-height: 1.42em;
  color:#A7A1AE;
  background-image: url(bg.jpg);
  background-position: center center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  background-size: cover;
  background-color:#1F2739;
}

h1 {
  font-size:3em; 
  font-weight: 300;
  line-height:1em;
  text-align: center;
  color: #4DC3FA;
}

h2 {
  font-size:1em; 
  font-weight: 300;
  text-align: center;
  display: block;
  line-height:1em;
  padding-bottom: 2em;
  color: #FB667A;
}

h2 a {
  font-weight: 700;
  text-transform: uppercase;
  color: #FB667A;
  text-decoration: none;
}

.blue { color: #185875; }
.yellow { color: #FFF842; }

.container th h1 {
	  font-weight: bold;
	  font-size: 1em;
  text-align: left;
  color: #185875;
}

.container td {
	  font-weight: normal;
	  font-size: 1em;
  -webkit-box-shadow: 0 2px 2px -2px #0E1119;
	   -moz-box-shadow: 0 2px 2px -2px #0E1119;
	        box-shadow: 0 2px 2px -2px #0E1119;
}

.container {
	  text-align: left;
	  overflow: hidden;
	  width: 80%;
	  margin: 0 auto;
  display: table;
  padding: 0 0 8em 0;
}

.container td, .container th {
	  padding-bottom: 2%;
	  padding-top: 2%;
  padding-left:2%;  
}

/* Background-color of the odd rows */
.container tr:nth-child(odd) {
	  background-color: rgba(0,0,0,0.9);
}

/* Background-color of the even rows */
.container tr:nth-child(even) {
	  background-color: rgba(0,0,0,0.7);
}

.container th {
	  background-color: #1F2739;
}

.container td:first-child { color: #FB667A; }

.container tr:hover {
   background-color: #464A52;
-webkit-box-shadow: 0 6px 6px -6px #0E1119;
	   -moz-box-shadow: 0 6px 6px -6px #0E1119;
	        box-shadow: 0 6px 6px -6px #0E1119;
}

.container td:hover {
  background-color: #FFF842;
  color: #403E10;
  font-weight: bold;
  
  box-shadow: #7F7C21 -1px 1px, #7F7C21 -2px 2px, #7F7C21 -3px 3px, #7F7C21 -4px 4px, #7F7C21 -5px 5px, #7F7C21 -6px 6px;
  transform: translate3d(6px, -6px, 0);
  
  transition-delay: 0s;
	  transition-duration: 0.4s;
	  transition-property: all;
  transition-timing-function: line;
}

@media (max-width: 800px) {
.container td:nth-child(4),
.container th:nth-child(4) { display: none; }
}
</style>
</head>
<body>
	<?php 
		require("connect.php");

		$query = "select * from arduino ORDER BY id DESC LIMIT 1";
		$result = mysqli_query($connection, $query);
		while ($row=mysqli_fetch_array($result)){
		
		$tID = $row[0];
		$hum = $row[1];
		$ctem= $row[2];
		$ftem=$row[3];
		$chin=$row[4];
		$fhin=$row[5];
		$cdp=$row[6];
		$fdp=$row[7];
	?>
<h1><span class="blue">&lt;</span>EV<span class="blue">&gt;</span> <span class="yellow">Arduino</pan></h1>
<h2>Created By EV - <a href="http://facebook.com/edrisa.turay" target="_blank"> Edrisa A. Turay</a></h2>
<table class="container">
	<thead>
		<tr>
			<th><h1>Factor</h1></th>
			<th><h1>Values</h1></th>
		</tr>
	</thead>
	<tbody>
		<tr>
			<td>Humidity</td>
			<td><?php echo $hum; ?>%</td>
		</tr>
		<tr>
			<td>Temperature</td>
			<td><?php echo $ctem; ?><sup>o</sup>C | <?php echo $ftem; ?><sup>o</sup>F</td>
		</tr>
		<tr>
			<td>Heat Index</td>
			<td><?php echo $chin; ?><sup>o</sup>C | <?php echo $fhin; ?><sup>o</sup>F</td>
		</tr>
   		<tr>
			<td>Dew Point</td>
			<td><?php echo $cdp; ?><sup>o</sup>C | <?php echo $fdp; ?><sup>o</sup>F</td>
		</tr>
	</tbody>
	<?php } ?>
</table>
</body>
<html>