Ajax/Alt Dashboard Customizations

I took this http://discourse.weather-watch.com/t/45605 one step further.

Add this

<?php
  $ralltimeaverage = 
$avrainjan+$avrainfeb+$avrainmar+$avrainapr+$avrainmay+$avrainjun+$avrainjul+$avrainaug+$avrainsep+$avrainoct+$avrainnov+$avraindec; 

   $ravrainalltime = $ralltimeaverage / 1; 
  $ravrainalltime = number_format((round($ravrainalltime,2)),$places); 
  $rcurrentmonthaverage = 
$avrainjannow+$avrainfebnow+$avrainmarnow+$avrainaprnow+$avrainmaynow+$avrainjunnow+$avrainjulnow+$avrainaugnow+$avrainsepnow+$avrainoctnow+$avrainnovnow+$avraindecnow; 

  $rmonthraintrend = $rcurrentmonthaverage / 1;
  $rmonthraintrend = number_format((round($rmonthraintrend,2)),$places); 

           
if($rannualtrend > 0) {
$trendimage='ajax-images/rising.png';
}
else {
$trendimage='ajax-images/falling.png';
}
?>

just before the table tag for the rain section in ajax-dashboard.php.

And add this

	      <tr>
                <td class="data1" nowrap="nowrap">YTD Diff:</td>
                <td style="text-align: right;" class="data1">
                    <?php echo gen_difference($avg_ytd_rain, $ralltimeaverage, $uomRain,
					' %s'.$uomRain.' above avg YTD Rain.',
					' %s'.$uomRain.' below avg YTD Rain.') ?>
				</td>
              </tr>

to have a new row showing the current YTD Diff from Yearly avg.