<html>
<head>
<style type="text/css">
#table-2 {
    border: 1px solid #2E2E2E;
    background-color: #f2f2f2;
    width: 990px;
    border-radius: 6px;
    -webkit-border-radius: 6px;
    -moz-border-radius: 6px;
}
#table-2 td, #table-2 th {
	padding: 5px;
	color: #333;
}
#table-2 thead {
	font-family: "Lucida Sans Unicode", "Lucida Grande", sans-serif;
	padding: .2em 0 .2em .5em;
	text-align: left;
	color: #4B4B4B;
	background-color: #C8C8C8;
	background-image: -webkit-gradient(linear, left top, left bottom, from(#f2f2f2), to(#e3e3e3), color-stop(.6,#B3B3B3));
	background-image: -moz-linear-gradient(top, #D6D6D6, #B0B0B0, #B3B3B3 90%);
	border-bottom: solid 1px #999;
}
#table-2 th {
	font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
	font-size: 17px;
	line-height: 20px;
	font-style: normal;
	font-weight: normal;
	text-align: left;
	text-shadow: white 1px 1px 1px;
}
#table-2 td {
	line-height: 20px;
	font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
	font-size: 14px;
	border-bottom: 1px solid #fff;
	border-top: 1px solid #fff;
}
#table-2 td:hover {
	background-color: #fff;
}
.auto-style1 {
	text-align: center;
}
.auto-style3 {
	text-align: center;
	border-style: solid;
	margin-top: 15px;
}
.intestazione {
	
	background: #3B3B3B;
    text-align: center;
    color: #FFFFFF;
    font-size: 15px;
    font-weight: bold;	 
}
.intestazione2 {	
	text-align: center;
    color: #FFFFFF;
    font-size: 12px;
	font-weight: bold;  
    
}
.valoriprincipali {
    background: #111215;
    text-align: center;
    color: #FFFFFF;
	font-weight: bold;
	font-size: 30px;
	padding: 5px;
}

.valoritestata {
    background: #111215;
    text-align: center;
    color: #FFFFFF;
    font-weight: bold;
    font-size: 20px;    
	}
.valoriminimi {
    background: #111215;
    color: #009BFF;
    font-size: 12px;
	font-weight: bold;
	text-align: center;
	border-bottom: 1px solid #fff;
	padding: 2px;
    
}		
.valorimedi {
    background: #111215;
    color: #FFFFFF;
    font-size: 12px; 
	font-weight: bold;
	text-align: center;
	border-bottom: 1px solid #fff;
	padding: 2px;
}
.valorimassimi {
    background: #111215;
    color: #E73717;
    font-size: 12px;
	font-weight: bold;
	text-align: center;
	border-bottom: 1px solid #fff;
	padding: 2px;
}
	.valorivento {
    background: #111215;
	color:#FFFFFF;
    font-size: 15px;
	text-align: center;
	border-bottom: 1px solid #fff;	
}
	.tabella {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    background: #111215;
    border: 20px  #111215;
    border-radius: 5px;
    -moz-border-radius: 5px; /* firefox */
    -webkit-border-radius: 5px;    	
	
}	
	
	.Contorni {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
	font-size: 25px;
	font-weight: 800;
	color: #FFFFFF;
    background: #111215;
    border: 2px ridge;
	
}			
		
    </style>
<?php
echo("<meta http-equiv='refresh' content='20'>");
?>
</head>
<body>		  
<table align="center" class="tabella" style="width:1000" >
<tbody>
<tr>
<th height="30" colspan="3" class="intestazione"><p>TEMPERATURA</p></th>
<th width="314" height="30" class="intestazione"><p>VENTO</p></th>
<th width="250" height="30" class="intestazione"><p>PIOGGIA</p></th>
</tr>
<tr>
<td height="120" colspan="3">
<center>
<div style="width:100px; height:30px; padding:5x; align-content: center; color: #FFFFFF;">[th0temp-act.1:--]&deg; C</div>
</center>
<div style="width:100px; height:30px; padding:5x; font-size:15px; margin:auto; padding-left: 20px; color: #FFFFFF;">[th0temp-delta10:--]&deg;C </div>
</td>
<?php
$valore = "th0temp-delta10";
if(( $valore > 0.0 ) ){ $src = "trendUp.png"; }
if(( $valore = 0.0 ) ){ $src = "trendNeutral.png"; }
if(( $valore < 0.0 ) ){ $src = "trendDown.png"; }		
?>
<img src="<?php echo $src; ?>" alt="" />		
<td height="120">
<center>
<div style="width:100px; height:30px; float: left; margin-left: 15px; padding:5px; color: #FFFFFF;">[wind0wind-act] km/h </div> 
<div style="width:100px; height:30px; float: right; margin-right: 15px; padding:5px; color: #FFFFFF;">Raffica:[wind0wind-dmax=kmh.1:] km/h</div>
<div style="width:100px; height:30px  padding:5x;  color: #FFFFFF;"> [wind0dir-act.0]&deg; </div>
<div style="width:100px; height:30px; padding:5x; color: #FFFFFF;"> [wind0dir-act=endir:--]</div>
<div style="width:100px; height:30px; padding:5x;  color: #FFFFFF;"> [wind*wind-act=bft.0:--] </div></center>
		  
<?php 		  
$direzione_del_vento = "[wind0dir-act=endir:--]";		  
switch ($direzione_del_vento)
{
  case "WNW":
  case "NW":
  case "NNW":
    $s = "Maestrale";
    break;

  case "N":
    $s = "Tramontana";
    break;

  case "NNE":
  case "NE":
  case "ENE":		
    $s = "Grecale";
    break;
   
	case "E":
    $s = "Levante";
    break; 		
		
  case "ESE":
  case "SE":
  case "SSE":		
    $s = "Scirocco";
    break;	
	
  case "S":
     $s = "Ostro";
    break; 	
	
  case "SSW":
  case "SW":
  case "WSW":		
    $s = "Libeccio";
    break;	
  
  case "W":
     $s = "Ponente";
    break; 	
}
print $s;
?>
</p>
</td>			        
<td height="120" class="valoriprincipali">
<p class="valoritestata">[rain0total-sumday.1:--] mm  [rain0rate-act] mm/h <br>
<?php
$valore = "[rain0rate-act]";
if ( ($valore >= 0.0)     and ($valore <=  0.2) )  {print "Assente";}	
if ( ($valore >  0.5)     and ($valore <=  5.0) )  {print "Pioggia debole";}	
if ( ($valore >  6.0)     and ($valore <= 10.0))   {print "Pioggia moderata";}	
if ( ($valore >  10.5)    and ($valore <= 20.0))   {print "Pioggia forte";}	
if ( ($valore >  20.5)    and ($valore <= 35.5))   {print "Rovescio";}	
if ( ($valore >  36.0)    and ($valore <= 100.0))  {print "Nubifragio";}

if ( $valore <= 80.0 )    $s = "Nubifragio";
if ( $valore <= 40.0 )    $s = "Rovescio";
if ( $valore <= 20.0 )    $s = "Pioggia forte";
if ( $valore <= 10.0 )    $s = "Pioggia moderata";
if ( $valore <= 4.0 )     $s = "Pioggia debole";
if ( $valore <= 0.1 )     $s = "Assente";     // where is $s used ?
?>
</p>
</td>
</tr>
    <tr>
      <td colspan="3" class="intestazione"><p class="intestazione2">OGGI</p></td>
      <td colspan="1" class="intestazione"><p class="intestazione2">OGGI</p></td>
      <td colspan="1" class="intestazione"><p class="intestazione2">OGGI</p></td>
    </tr>
    <tr>
      <td width="80" class="valoriminimi">MIN: [th0temp-dmin]&deg; C</td>
      <td width="80" class="valorimedi">MED: [th0temp-davg]&deg; C</td>
      <td width="80" class="valorimassimi">MAX: [th0temp-dmax]&deg; C</td>
		
      <td width="80"><div style="text-align: left; padding-left: 10px; color: #FFFFFF; font-weight: bold;">Raffica:</span> 
		  <span style="padding-left: 10px; color: #E73717; font-weight: bold;">[wind0wind-dmax=kmh.1:] km/h alle ore [wind0wind-dmaxtime.ij:--]:[wind0wind-dmaxtime.kl:--] </span> &nbsp;|&nbsp;
        Media:   [wind0avgwind-act.1=kmh.1:] km/h </td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td colspan="3">&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td colspan="3">&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td colspan="3">&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td colspan="3">&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td colspan="3">&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
    </tr>
  </tbody>
</table>
</p>
</body>
<html>