<?php
#
#  wctags.php (WC) - Last modified: 13-MAR-2012
#
// Inspired by cumuluswebtags.txt. See http://wiki.sandaysoft.com/a/Php_webtags
// Version 0.56 - 15-APR-2012.
// ------------------------------------------------------------------------------------------------
// allow viewing of generated source

if ( isset($_REQUEST['source']) && strtolower($_REQUEST['source']) == 'view' ) {
//--self downloader --
   $filenameReal = __FILE__;
   $download_size = filesize($filenameReal);
   header('Pragma: public');
   header('Cache-Control: private');
   header('Cache-Control: no-cache, must-revalidate');
   header('Content-type: text/plain');
   header('Accept-Ranges: bytes');
   header('Content-Length: $download_size');
   header('Connection: close');

   readfile($filenameReal);
   exit;
}

// ====================================================================================================================
$ISO8601DATES="ISO8601DATES$"; //Replaced with the current date in ISO 8601 format.
$CT='CT$';     //Replaced with the current temperature, temperature units and hourly change in brackets.
$CD='CD$';     //Replaced with the current dew point, dew point units and hourly change in brackets.
$CWC='CWC$';     //Replaced with the current wind chill, wind chill units and hourly change in brackets.
$CX='CX$';     //Replaced with the current wind direction and units.
$CW='CW$';     //Replaced with the current average wind speed and units.
$CG='CG$';     //Replaced with the current wind gust and units.
$CP='CP$';     //Replaced with current barometric pressure, units and hourly change.
$CR='CR$';     //Replaced with current hourly precipitation rate, units and hourly change.
$CC='CC$';     //Replaced with current conditions (when available)
$CF='CF$';     //Replaced with current forecast (Vantage/Vue/WLIP/WS23xx only currently)
$CSF='CSF$';     //Replaced with current short forecast (Vantage/Vue/WLIP only currently)
$CU='CU$';     //Replaced with the time of the last valid data
$WDTEXT='WDTEXT$';     //Replaced with the current 16 sector 10-minute average wind direction as text
$BTTEXT='BTTEXT$';     //Replaced with the current barometric trend as text
$RS='RS$';     //Rain storm value (Vantage/Vue/WLIP)
$RSD='RSD$';     //Rain storm start date (Vantage/Vue/WLIP)
$RLD='RLD$';     //Last significant (0.6mm or more) rain date and amount
$WEATHERFACT="WEATHERFACT$";     //Replaced with a interesting weather fact/note. A new fact is generated daily at random.
$STRECORDS="STRECORDS$";     //Replaced with station records.
$STRECENT="STRECENT$";     //Replaced with recent statistics.
$STDAILY="STDAILY$";     //Replaced with the current daily statistics.
$STMONTHLY1="STMONTHLY1$";     //Replaced with the current monthly statistics (part 1).
$STMONTHLY2="STMONTHLY2$";     //Replaced with the current monthly statistics (part 2).
$STMONTHLY="STMONTHLY$";     //Replaced with the current monthly statistics (all).
$STYEAROVERYEAR="STYEAROVERYEAR$";     //Replaced with the year over year statistics.
$BD='BD$';     //Build information
$L='L$';     //Station name
$D='D$';     //Date and time
$UT='UT$';     //Uptime
$t12='t12$';     //Time (12 hour clock)
$t24='t24$';     //Time (24 hour clock)
$da='da$';     //Date in the format of month/day/year
$de='de$';     //Date in the format of day/month/year
$SUNRISELOCAL='SUNRISELOCAL$';     //Sunrise local time
$SUNSETLOCAL='SUNSETLOCAL$';     //Sunset local time
$SUNRISEUTC='SUNRISEUTC$';     //Sunrise time UTC
$SUNSETUTC='SUNSETUTC$';     //Sunset (UTC)
$DAYLIGHTTIME='DAYLIGHTTIME$';     //Hours:Minutes of daylight today
$SUNRISELOCAL1='SUNRISELOCAL1$';     //Sunrise local time tomorrow
$SUNSETLOCAL1='SUNSETLOCAL1$';     //Sunset local time tomorrow
$SUNRISEUTC1='SUNRISEUTC1$';     //Sunrise time UTC tomorrow
$SUNSETUTC1='SUNSETUTC1$';     //Sunset (UTC) tomorrow
$DAYLIGHTTIME1='DAYLIGHTTIME1$';     //Hours:Minutes of daylight tomorrow
$WCAM="WCAM$";     //Replaced with the current web-cam picture at the resolution as set in the web-cam preferences.
$WCAM320.="WCAM320$";     //Replaced with the current web-cam picture at a horizontal resolution of 320. The vertical resolution is a nominal 240 pixels but this is dependent on your camera as the aspect ratio is always maintained. We also provide WCAM640$, WCAM800$ and WCAM1280$
$MOVIE="MOVIE$";     //Replaced with a link to the last time-lapse movie.
$DALL='DALL$';     //Replaced with all dials. (Also available is DALLC$ which is replaced with all dials and comms counts)
$DWINDD='DWINDD$';     //Replaced with current wind direction dial.
$DWINDS='DWINDS$';     //Replaced with current wind speed dial.
$DWINDR='DWINDR$';     //Replaced with current wind run dial.
$DBARO='DBARO$';     //Replaced with current barometer dial.
$DCLOUDB='DCLOUDB$';     //Replaced with current calculated cloud base dial.
$DSOLAR="DSOLAR$";     //Replaced with current solar meter.
$DTEMPO='DTEMPO$';     //Replaced with current outside temperature meter.
$DDEW='DDEW$';     //Replaced with current dew point meter.
$DWINDCH='DWINDCH$';     //Replaced with current wind chill meter.
$DHEATI='DHEATI$';     //Replaced with current heat index meter.
$DHUMO='DHUMO$';     //Replaced with current outside humidity meter.
$DTEMPI='DTEMPI$';     //Replaced with current inside temperature meter.
$DHUMI='DHUMI$';     //Replaced with current inside humidity meter.
$DRAIN1='DRAIN1$';     //Replaced with current 1 hour rain rate meter.
$DRAIN24='DRAIN24$';     //Replaced with current 24 hour rain rate meter.
$DUV="DUV$";     //Replaced with current U.V. meter.
$GRTEMPO="GRTEMPO$";     //Replaced with current outside temperature graph.
$GRDEW="GRDEW$";     //Replaced with current dew point graph.
$GRHUMO='GRHUMO$';     //Replaced with current outside humidity graph.
$GRWINDCH='GRWINDCH$';     //Replaced with current wind chill graph.
$GRHEATI='GRHEATI$';     //Replaced with current heat index graph.
$GRSOLAR='GRSOLAR$';     //Replaced with current solar radiation graph.
$GRUV='GRUV$';     //Replaced with current U.V. graph.
$GRWINDD='GRWINDD$';     //Replaced with current wind direction graph.
$GRWINDS='GRWINDS$';     //Replaced with current wind speed graph.
$GRPRESSURE='GRPRESSURE$';     //Replaced with current barometric pressure graph.
$GRCLOUDB='GRCLOUDB$';     //Replaced with current calculated cloud base graph.
$GRRAIN1='GRRAIN1$';     //Replaced with current 1 hour rain rate graph.
$GRRAIN24='GRRAIN24$';     //Replaced with current daily rain rate graph.
$GRHUMI='GRHUMI$';     //Replaced with current internal humidity graph.
$GRTEMPI='GRTEMPI$';     //Replaced with current internal temperature graph.
$TEMPUNITS='TEMPUNITS$';     //Replaced with the current temperature units.
$RAINUNITS='RAINUNITS$';     //Replaced with the current rain units.
$PRESSUREUNITS='PRESSUREUNITS$';     //Replaced with the current pressure units.
$WINDSPEEDUNITS=strtolower('WINDSPEEDUNITS$');     //Replaced with the current wind speed units.

// Yesterdays Stats
$YESTMINT="STAT$TEMPERATURE:MIN:YESTERDAY$"; //Replaced with yesterdays Min. Temp
$YESTMINTT="STAT$TEMPERATURE:MIN:YESTERDAY:TIME$"; //Replaced with yesterdays Min. Temp Time

$YESTMAXT="STAT$TEMPERATURE:MAX:YESTERDAY$"; //Replaced with yesterdays Max. Temp
$YESTMAXTT="STAT$TEMPERATURE:MAX:YESTERDAY:TIME$"; //Replaced with yesterdays Max. Temp Time

$YESTMAXW="STAT$WINDSPEED:MAX:YESTERDAY$";
$YESTMAXWT="STAT$WINDSPEED:MAX:YESTERDAY:TIME$";

$YESTMINH="STAT$EXTHUMIDITY:MIN:YESTERDAY$"; //Replaced with yesterdays Min. Humidity
$YESTMINHT="STAT$EXTHUMIDITY:MIN:YESTERDAY:TIME$"; //Replaced with yesterdays Min. Humidity Time

$YESTMAXH="STAT$EXTHUMIDITY:MAX:YESTERDAY$"; //Replaced with yesterdays Max. Humidity
$YESTMAXHT="STAT$EXTHUMIDITY:MAX:YESTERDAY:TIME$"; //Replaced with yesterdays Max. Humidity Time

$YESTMINBAR="STAT$PRESSURE:MIN:YESTERDAY$"; //Replaced with yesterdays Min. Barometer
$YESTMINBART="STAT$PRESSURE:MIN:YESTERDAY:TIME$"; //Replaced with yesterdays Min. Barometer Time

$YESTMAXBAR="STAT$PRESSURE:MAX:YESTERDAY$"; //Replaced with yesterdays Max. Barometer
$YESTMAXBART="STAT$PRESSURE:MAX:YESTERDAY:TIME$"; //Replaced with yesterdays Min. Barometer Time

$YESTRAIN="STAT$RAIN:TOTAL:YESTERDAY$"; //Replaced with yesterdays Rain Total

// Week Stats
$WKMINT="STAT$TEMPERATURE:MIN:THISWEEK$"; //Replaced with yesterdays Min. Temp
$WKMINTT="STAT$TEMPERATURE:MIN:THISWEEK:TIME$"; //Replaced with yesterdays Min. Temp Time

$WKMAXT="STAT$TEMPERATURE:MAX:THISWEEK$"; //Replaced with yesterdays Max. Temp
$WKMAXTT="STAT$TEMPERATURE:MAX:THISWEEK:TIME$"; //Replaced with yesterdays Max. Temp Time

$WKMAXW="STAT$WINDSPEED:MAX:THISWEEK$";
$WKMAXWT="STAT$WINDSPEED:MAX:THISWEEK:TIME$";

$WKMINH="STAT$EXTHUMIDITY:MIN:THISWEEK$"; //Replaced with yesterdays Min. Humidity
$WKMINHT="STAT$EXTHUMIDITY:MIN:THISWEEK:TIME$"; //Replaced with yesterdays Min. Humidity Time

$WKMAXH="STAT$EXTHUMIDITY:MAX:THISWEEK$"; //Replaced with yesterdays Max. Humidity
$WKMAXHT="STAT$EXTHUMIDITY:MAX:THISWEEK:TIME$"; //Replaced with yesterdays Max. Humidity Time

$WKMINBAR="STAT$PRESSURE:MIN:THISWEEK$"; //Replaced with yesterdays Min. Barometer
$WKMINBART="STAT$PRESSURE:MIN:THISWEEK:TIME$"; //Replaced with yesterdays Min. Barometer Time

$WKMAXBAR="STAT$PRESSURE:MAX:THISWEEK$"; //Replaced with yesterdays Max. Barometer
$WKMAXBART="STAT$PRESSURE:MAX:THISWEEK:TIME$"; //Replaced with yesterdays Min. Barometer Time

$WKRAIN="STAT$RAIN:TOTAL:THISWEEK$"; //Replaced with yesterdays Rain Total

// Month Stats
$MTMINT="STAT$TEMPERATURE:MIN:THISMONTH$"; //Replaced with month Min. Temp
$MTMINTT="STAT$TEMPERATURE:MIN:THISMONTH:TIME$"; //Replaced with month Min. Temp Time

$MTMAXT="STAT$TEMPERATURE:MAX:THISMONTH$"; //Replaced with month Max. Temp
$MTMAXTT="STAT$TEMPERATURE:MAX:THISMONTH:TIME$"; //Replaced with month Max. Temp Time

$MTMAXW="STAT$WINDSPEED:MAX:THISMONTH$";
$MTMAXWT="STAT$WINDSPEED:MAX:THISMONTH:TIME$";

$MTMINH="STAT$EXTHUMIDITY:MIN:THISMONTH$"; //Replaced with month Min. Humidity
$MTMINHT="STAT$EXTHUMIDITY:MIN:THISMONTH:TIME$"; //Replaced with month Min. Humidity Time

$MTMAXH="STAT$EXTHUMIDITY:MAX:THISMONTH$"; //Replaced with month Max. Humidity
$MTMAXHT="STAT$EXTHUMIDITY:MAX:THISMONTH:TIME$"; //Replaced with month Max. Humidity Time

$MTMINBAR="STAT$PRESSURE:MIN:THISMONTH$"; //Replaced with month Min. Barometer
$MTMINBART="STAT$PRESSURE:MIN:THISMONTH:TIME$"; //Replaced with month Min. Barometer Time

$MTMAXBAR="STAT$PRESSURE:MAX:THISMONTH$"; //Replaced with month Max. Barometer
$MTMAXBART="STAT$PRESSURE:MAX:THISMONTH:TIME$"; //Replaced with month Min. Barometer Time

$MTRAIN="STAT$RAIN:TOTAL:THISMONTH$"; //Replaced with month Rain Total

// Year Stats
$YRMINT="STAT$TEMPERATURE:MIN:THISYEAR$"; //Replaced with year Min. Temp
$YRMINTT="STAT$TEMPERATURE:MIN:THISYEAR:TIME$"; //Replaced with year Min. Temp Time

$YRMAXT="STAT$TEMPERATURE:MAX:THISYEAR$"; //Replaced with year Max. Temp
$YRMAXTT="STAT$TEMPERATURE:MAX:THISYEAR:TIME$"; //Replaced with year Max. Temp Time

$YRMAXW="STAT$WINDSPEED:MAX:THISYEAR$";
$YRMAXWT="STAT$WINDSPEED:MAX:THISYEAR:TIME$";

$YRMINH="STAT$EXTHUMIDITY:MIN:THISYEAR$"; //Replaced with year Min. Humidity
$YRMINHT="STAT$EXTHUMIDITY:MIN:THISYEAR:TIME$"; //Replaced with year Min. Humidity Time

$YRMAXH="STAT$EXTHUMIDITY:MAX:THISYEAR$"; //Replaced with year Max. Humidity
$YRMAXHT="STAT$EXTHUMIDITY:MAX:THISYEAR:TIME$"; //Replaced with year Max. Humidity Time

$YRMINBAR="STAT$PRESSURE:MIN:THISYEAR$"; //Replaced with year Min. Barometer
$YRMINBART="STAT$PRESSURE:MIN:THISYEAR:TIME$"; //Replaced with year Min. Barometer Time

$YRMAXBAR="STAT$PRESSURE:MAX:THISYEAR$"; //Replaced with year Max. Barometer
$YRMAXBART="STAT$PRESSURE:MAX:THISYEAR:TIME$"; //Replaced with year Min. Barometer Time

$YRRAIN="STAT$RAIN:TOTAL:THISYEAR$"; //Replaced with year Rain Total

// All Time Stats
$ATMINT="STAT$TEMPERATURE:MIN:ALLTIME$"; //Replaced with year Min. Temp
$ATMINTT="STAT$TEMPERATURE:MIN:ALLTIME:TIME$"; //Replaced with year Min. Temp Time

$ATMAXT="STAT$TEMPERATURE:MAX:ALLTIME$"; //Replaced with year Max. Temp
$ATMAXTT="STAT$TEMPERATURE:MAX:ALLTIME:TIME$"; //Replaced with year Max. Temp Time

$ATMAXW="STAT$WINDSPEED:MAX:ALLTIME$";
$ATMAXWT="STAT$WINDSPEED:MAX:ALLTIME:TIME$";

$ATMINH="STAT$EXTHUMIDITY:MIN:ALLTIME$"; //Replaced with year Min. Humidity
$ATMINHT="STAT$EXTHUMIDITY:MIN:ALLTIME:TIME$"; //Replaced with year Min. Humidity Time

$ATMAXH="STAT$EXTHUMIDITY:MAX:ALLTIME$"; //Replaced with year Max. Humidity
$ATMAXHT="STAT$EXTHUMIDITY:MAX:ALLTIME:TIME$"; //Replaced with year Max. Humidity Time

$ATMINBAR="STAT$PRESSURE:MIN:ALLTIME$"; //Replaced with year Min. Barometer
$ATMINBART="STAT$PRESSURE:MIN:ALLTIME:TIME$"; //Replaced with year Min. Barometer Time

$ATMAXBAR="STAT$PRESSURE:MAX:ALLTIME$"; //Replaced with year Max. Barometer
$ATMAXBART="STAT$PRESSURE:MAX:ALLTIME:TIME$"; //Replaced with year Min. Barometer Time

$ATRAIN="STAT$RAIN:TOTAL:ALLTIME$"; //Replaced with year Rain Total

?>