Php webtags: Difference between revisions

m
 
=== Based on original by David Jamieson and Ray Beriau ===
These all work with Cumulus 1. They all contain PHP variables for all the web tags available in Cumulus 1. For the files marked as for MX versions, the PHP variables that relate to web tags not available in MX have been given arbitrary fixed values, not nulls, so only really work for the system of the person who last updated the file. For recent history tags the PHP variables are set to report only the values for one day and one minute ago. Otherwise,These are apartused fromon a few"Now" webtype tagspage that reportcompares datesthe wherecurrent alternativevalues formatsto arethe addedvalues (asat shownthe below)closest usingtime outputyesterday. parametersThe andextra newminute variablehas names,to mostbe php variableadded names matchto the correspondingoutput webparameters tagsto name, there are no alternatives forcover the time-stamps and date-stampsdelay in any weather derivatives. You will noticeretrieving the USAold stylevalues monthcompared first bias ofto the original authorsspeed in someupdating of thecurrent date formats belowvalues.
Otherwise, apart from a few web tags that report dates where alternative formats are added (as shown below) using output parameters and new variable names, most php variable names match the corresponding web tags name, there are no alternatives for the time-stamps and date-stamps in any weather derivatives. You will notice the USA style month first bias of the original authors in some of the date formats below.
'''Note there is an error in these files''' - they contain a "?>" at the end, that should not be used in pure PHP files - see PHP manual instruction. Should white-space or new lines being added after the PHP closing tag, even accidentally, there may be unwanted effects because PHP will start output buffering when there is no intention from the programmer to send any output at that point in the script. That applies even if the extra is after the include/require in the script using this file.
<pre>$date2 = strtotime(str_replace('/','-',"<#date>")); // current date (example format: 1346569200)
$dateU = strtotime(str_replace('/','-',"<#date>")); // current date (Unix datestamp format)
5,838

edits