Thunder radar more information blitzortung!


Radar de pluja more information rain snow radar


Visita la nostra xarxa de llocs de meteo:

Template documentation
and downloads

And another site



No particular awareness of the weather is required.    There are no Weather-warnings

Display key values and files

_my_texts/wsUserSettings.php SettingsFiles should pe password protected - dated: 24-11-2017 17:09

    1 | <?php
    2 | $pageName	= "wsUserSettings.php";
    3 | $pageVersion	= "0.02 2015-09-19";
    4 | #
    5 | if (!isset($SITE)){echo "<h3>invalid call to script $pageName</h3>";exit;}
    6 | $SITE["wsModules"][$pageName] = "version: " . $pageVersion;
    7 | if (!isset($pathString)) {$pathString="";}
    8 | $pathString .= "<!-- module ".$pageName." ==== ".$SITE["wsModules"][$pageName]." -->".PHP_EOL;
    9 | #---------------------------------------------------------
   10 | # 0.02  generated 2015-09-19
   11 | #---------------------------------------------------------
   12 | $SITE["wsDebug"]         = true;         	##### 
   13 | #$SITE["wsDebug"]        = false;        	##### remove comment mark at position 1 when you are fully satisfied with your site.
   14 | #---------------------------------------------------------
   15 | # Two important questions to select the correct questions from now on
   16 | #---------------------------------------------------------
   17 | $SITE["WXsoftware"]     = "WD";                 # CU = Cumulus  |  CW = consoleWD  |  DW = Davis_WL.com  |  MB = Meteobridge  |  MH = Meteohub  |  MP = Meteoplug  |  VW = VWS  |  WC = WeatherCat  |  WD = WeatherDisplay  |  WL = WeatherLink  |  WS = WSWIN  |  WV = Wview
   18 | $SITE["region"]         = "europe";             # america = USA  |  canada = Canada  |  europe = Europe  |  other = Other
   19 | #---------------------------------------------------------
   20 | # General settings such as station location, identity
   21 | #---------------------------------------------------------
   22 | # 
   23 | # The name of your Weather-Station and the area it services
   24 | $SITE["organ"]          = "Meteo Sesrovires";
   25 | $SITE["yourArea"]       = "Sant Esteve Sesrovires, Barcelona";
   26 | # 
   27 | # The location of your weatherstation on the globe
   28 | $SITE["latitude"]       = "41.4961";           # 30 = 70
   29 | $SITE["longitude"]      = "1.8703";            # -30 = 40
   30 | # 
   31 | # The timezone you are in and the language you use
   32 | $SITE["tz"]             = "Europe/Madrid";
   33 | $SITE["lang"]           = "ct";                 # en = English  |  nl = Dutch  |  fr = French  |  de = German
   34 | # 
   35 | # Where to load the current conditions from
   36 | $SITE["curCondFrom"]    = "metar";              # yahoo = Yahoo - needs area code  |  metar = metar - uses your nearby metar  |  wd = WeatherDisplay if it has a solar sensor and is configured correctly
   37 | $SITE["yaPlaceID"]      = "973505";
   38 | $SITE["METAR"]          = "LEBL";               # 4
   39 | #---------------------------------------------------------
   40 | # The general parts for every page
   41 | #---------------------------------------------------------
   42 | # 
   43 | $googleAPI = 'AIzaSyB_o_Zn9sGS96tI6Ef5Gww_rkJ9_WFaJ9w';
   44 | $SITE['googleAPI'] = 'AIzaSyB_o_Zn9sGS96tI6Ef5Gww_rkJ9_WFaJ9w';
   45 | # Page and menu size
   46 | $SITE["pageWidth"]      = "1200";               # 1200 = 2400
   47 | $SITE["menuWidth"]      = "180";                # 180 = 220
   48 | $SITE["menuPlace"]      = "V";                  # V = Vertical left side  |  H = Horizontal
   49 | # 
   50 | # The  yellow box at the top
   51 | $SITE["maintenanceShow"]= false;                 # true = Display the yellow box on top of the page  |  false = Do not use
   52 | $SITE["maintenanceTxt"] = "./_my_texts/maintenance.txt";
   53 | # 
   54 | # Type of header and what color scheme
   55 | $SITE["header"]         = "3";                  # 3 = Header with gauges  |  2 = Normal header with blocks  |  1 = Lower header with less information
   56 | $SITE["colorNumber"]    = "0";                  # 0 = weather_adapted  |  1 = green  |  2 = blue  |  3 = pastel  |  4 = red  |  5 = orange  |  6 = none  |  7 = ws_clouds  |  8 = ws_cloudsn  |  9 = ws_mist  |  10 = ws_moon  |  11 = ws_pclouds  |  12 = ws_rain  |  13 = ws_snow  |  14 = ws_storm  |  15 = ws_sun  |  16 = ws_thunder
   57 | # 
   58 | # Optional side and bottom area
   59 | $SITE["sideDisplay"]    = true;                 # true = Side area will be used  |  false = Do not display
   60 | $SITE["bottomDisplay"]  = true;                 # true = Bottom area will be used  |  false = Do not display
   61 | # 
   62 | # Banners for adds , photo's and so on
   63 | $SITE["bannerTop"]      = true;                 # true = use my text file  |  false = Do not display
   64 | $SITE["bannerTopTxt"]   = "./_my_texts/banner.txt";
   65 | $SITE["bannerBottom"]   = false;                 # true = use my text file  |  false = Do not display
   66 | $SITE["bannerBottomTxt"]= "./_my_texts/banner.txt";
   67 | # 
   68 | # Do we strip parts of the page for joomla type use
   69 | $SITE["stripAll"]       = false;                # true = Remove all (optional) areas of a page  |  false = No "Joomla" needed. - We use the normal page setup
   70 | $SITE["stripMenu"]      = false;                # true = Menu will not be displayed  |  false = Leave menu as is
   71 | # 
   72 | # Will we display these optional information blocks (and where)
   73 | $SITE["langFlags"]      = true;                 # true = Displayed next to the language selection  |  false = Do not display
   74 | $SITE["partners"]       = "B";                  # B = In bottom area  |  V = In side area  |  false = Do not display
   75 | $SITE["equipment"]      = "B";                  # B = In bottom area  |  V = In side area  |  false = Do not display
   76 | $SITE["otherWS"]        = "V";                  # V = In side area  |  false = Do not display
   77 | # 
   78 | # Facebook - Twitter and other social sites
   79 | $SITE["socialSiteSupport"]= "V";                # H = In header small horizontal  |  V = In side area  |  false = Do not display
   80 | $SITE["socialSiteKey"]  = "4fd8a66b72fa8566";
   81 | $SITE["socialSiteCode"] = "./_widgets/social_buttons.txt";
   82 | # 
   83 | # Rain and Thunder-warnings
   84 | $SITE["showRain"]       = true;                # true = Always  |  false = Do not display  |  optional = Display with rain warning
   85 | $SITE["showLightning"]  = true;                # true = Always  |  false = Do not display  |  optional = Display with thunder warning
   86 | # 
   87 | # Donate button
   88 | $SITE["donateButton"]   = false;                # V = In side area  |  false = Do not display
   89 | $SITE["donateCode"]     = "./_widgets/donateButton.php";
   90 | # 
   91 | # Weatherwarnings and how are we going to display them
   92 | $SITE["warnings"]       = true;                # true = Use the weatherwarnings for your area  |  false = Do not display
   93 | $SITE["warnArea"]       = "ES001";              # 
   94 | $SITE["warningInside"]  = true;                # true = Display the warnings below the header  |  false = Display the warnings above all other information
   95 | $SITE["warningGreen"]   = true;                # true = Display a message also when there is no warning  |  false = Display only a message when there are warnings
   96 | $SITE["warningsXtnd"]   = false;                # true = Display the whole text of the warning   |  false = Display the main warning text only
   97 | $SITE["warningDetail"]  = "3";                  #
   98 | $SITE["warn1Box"]       = true;                # true = All warnings combined into one box  |  false = Every warning in a separate box
   99 | $SITE["warnPage"]       = true;                 # true = Use template page with detailed information  |  false = Go to warning site for detailed information
  100 | # 
  101 | # Widgets and other settings for all pages
  102 | $SITE["noChoice"]       = "wsStartPage";        # wsStartPage = Normal dashboard startpage (p=10)  |  gaugePage = Steelseries page  |  wsPrecipRadar = Rain radar page  |  wsForecast = Standard forecast page
  103 | # 
  104 | # Website trafic
  105 | $SITE["statsCode"]      = true;                 # true = Use the external statistics code in the footer  |  false = Do not use
  106 | $SITE["statsCodeTxt"]   = "./_widgets/histats.txt";
  107 | # 
  108 | # Visitors counter
  109 | $SITE["showVisitors"]   = true;                 # true = Use your own visitors counter  |  false = Do not use
  110 | $SITE["visitorsFile"]   = "wolExported.str";
  111 | $SITE["geoKey"]         = "";
  112 | # 
  113 | # Count all pages visited
  114 | $SITE["pages_visited"]  = false;                # true = Enable this page  |  false = Do not display
  115 | # 
  116 | # Back to top of page button
  117 | $SITE["floatTop"]       = true;                 # true = Use the floating go to top marker  |  false = Do not use
  118 | $SITE["floatTopTxt"]    = "./_widgets/float_top.php";
  119 | $SITE["skipTop"]        = true;                 # true = Go to data-part of page to display more information  |  false = Always display header
  120 | # 
  121 | # Rotating weather-values display
  122 | $SITE["ajaxGizmoShow"]  = true;                 # true = Enable this facility  |  false = Do not display
  123 | #---------------------------------------------------------
  124 | # Menu items / extra pages to display
  125 | #---------------------------------------------------------
  126 | # 
  127 | # Pages for some european countries only
  128 | $SITE["belgium"]        = false;                 # true = Weather-Station is located in Belgium  |  false = Not located in Belgium
  129 | $SITE["netherlands"]    = false;                 # true = Weather-Station is located in the Netherlands  |  false = Not located in the Netherlands
  130 | # 
  131 | # Special pages	for smartphone users
  132 | $SITE["useMobile"]      = true;                 # true = Use the mobile pages for "smartphone" users  |  false = Only allow main-site use
  133 | # 
  134 | # Contact page
  135 | $SITE["contactPage"]    = true;                 # true = Enable this page  |  false = Do not display
  136 | $SITE["contactName"]    = "Frederic";
  137 | $SITE["contactEmail"]   = "ea3bak@hotmail.com";
  138 | $SITE["contactEmailTo"] = "ea3bak@hotmail.com";
  139 | # 
  140 | # Do we have one or more webcam images to display.
  141 | $SITE["webcam"]         = false;                # true = Yes, we have a webcam we want to show  |  false = Do not display
  142 | $SITE["webcamSide"]     = true;                 # V = In side area  |  false = Do not display
  143 | $SITE["webcamPage"]     = false;                # true = Enable this page  |  false = Do not display
  144 | # 
  145 | # What will be displayed during night-time
  146 | $SITE["webcamNight"]    = true;                 # true = Use a "It is night" image  |  false = Use uploaded picture as normal
  147 | $SITE["webcamImgNight"] = "./img/webcam_night.png";
  148 | # 
  149 | # Webcam 1
  150 | $SITE["webcamName_1"]   = "My webcam";
  151 | $SITE["webcamImg_1"]    = "http://wiri.be/image.jpg";
  152 | # 
  153 | # Another webcam
  154 | $SITE["webcam_2"]       = false;                # true = Yes, we have a second webcam we want to show  |  false = Do not display
  155 | $SITE["webcamName_2"]   = "My webcam 2";
  156 | $SITE["webcamImg_2"]    = "http://wiri.be/image.jpg";
  157 | #---------------------------------------------------------
  158 | # Extra weather-programs used for this station
  159 | #---------------------------------------------------------
  160 | # 
  161 | # WXSIM weather-forecasting
  162 | $SITE["wxsimPage"]      = false;                # true = Yes, we use the WXSIM paid program to make our weather-forecasts  |  false = Do not display
  163 | $SITE["wxsimData"]      = "../";
  164 | $SITE["wxsim_file"]     = "latest.csv";         # latest.csv = lates.csv file will be used  |  lastret.txt = lastret.txt file will be used
  165 | $SITE["wxsimIconsOwn"]  = false;                # false = Use template standard icons  |  true = Use YrNo icons
  166 | # 
  167 | # Meteoplug: storage and graphs server
  168 | $SITE["meteoplug"]      = false;                # false = We do not use Meteoplug  |  true = We use Meteoplug and display the extra pages
  169 | # 
  170 | # WD-Live: Paid-for website script/program, uses clientraw files to display extensive customizable flash dashboard
  171 | $SITE["wd_live"]        = false;                # false = No WD-live user  |  true = We use WD-Live and display the dashboard
  172 | # 
  173 | # Meteroware-Live: free website script/program, it display a basic flash dashboard
  174 | $SITE["meteoware"]      = false;                # false = No interest in that dashboard  |  true = Yes, display the Meteoware dashboard
  175 | #---------------------------------------------------------
  176 | # Menu items / forecast pages
  177 | #---------------------------------------------------------
  178 | # 
  179 | # Default forecast on the start-page
  180 | $SITE["fctOrg"]         = "wu";              # yahoo = Yahoo - needs area code = all  |  wu = WeatherUnderground - needs key = all  |  wxsim = WXSIM needs extra program = all  |  yrno = Yrno needs area code = all  |  metno = MetNo = all  |  yowindow = YoWindow gadget = all  |  noaa = NOAA = america  |  ec = Environment Canada = canada  |  hwa = Het Weer Actueel - alleen voor leden = europe
  181 | # 
  182 | # Multiple selections on forecast pages
  183 | $SITE["multi_forecast"] = true;                 # true = Enable this facility  |  false = Do not display
  184 | $SITE["multi_fct_keys"] = "./_my_texts/eu_multi_fct.txt";
  185 | # 
  186 | # Weather Underground Forecast and Almanac
  187 | $SITE["wuPage"]         = true;                # true = Yes, we want this extra forecast  |  false = Do not display
  188 | $SITE["wuKey"]          = "506bd7cbf45ff457";
  189 | $SITE["wuIconsOwn"]     = false;                # false = Use template standard icons  |  true = Use WU icons
  190 | $SITE["wuIconsCache"]   = false;                # false = Use WU icons from uor cache  |  true = Use WU icons directly form their site
  191 | # 
  192 | # Met.no
  193 | $SITE["metnoPage"]      = false;                 # true = Yes, we want this extensive free forecast  |  false = Do not display
  194 | $SITE["metnoiconsOwn"]  = false;                # false = Use template standard icons  |  true = Use YrNo icons
  195 | # 
  196 | # YR.no  - This forecast is required for the "smart-phone / mobile" pages
  197 | $SITE["yrnoPage"]       = true;                 # true = Yes, we want this forecast, also for our Mobile pages  |  false = Do not display
  198 | $SITE["yrnoID"]         = "Spain/Catalonia/Sant_Esteve_Sesrovires~3110661/";
  199 | $SITE["yrnoIconsOwn"]   = true;                # false = Use template standard icons  |  true = Use YrNo icons
  200 | # 
  201 | # Het Weer Actueel
  202 | $SITE["hwaPage"]        = false;                # true = Yes, we are a registred HWA member  |  false = Do not display
  203 | $SITE["hwaXmlId"]       = "000";                # 000 = 999
  204 | $SITE["hwaXmlKey"]      = "";
  205 | $SITE["hwaIconsOwn"]    = false;                # false = Use template standard icons  |  true = Use HWA icons
  206 | # 
  207 | # Yahoo
  208 | $SITE["yahooPage"]      = true;                 # true = Yes, we want this extra forecast  |  false = Do not display
  209 | $SITE["yahooIconsOwn"]  = true;                # false = Use template standard icons  |  true = Use Yahoo icons
  210 | # 
  211 | # World Weather
  212 | $SITE["worldPage"]      = false;                # true = Yes, we want this extra forecast  |  false = Do not display
  213 | $SITE["worldAPI"]       = "2";                  # 1 = API version 1, only for users who have an old API-1 key  |  2 = Use API version 2, current version
  214 | $SITE["worldKey"]       = "";
  215 | $SITE["worldKey2"]      = "";
  216 | $SITE["worldIconsOwn"]  = false;                # false = Use template standard icons  |  true = Use Worldweather icons
  217 | # 
  218 | # Refresh-times
  219 | $SITE["autoRefresh"]    = "0";                  # 0 = 999
  220 | $SITE["wsAjaxDataTime"] = "30";                 # 10 = 999
  221 | $SITE["wsSteelTime"]    = "30";                 # 10 = 999
  222 | # 
  223 | # Miscellaneous
  224 | $SITE["charset"]        = "UTF-8";              # UTF-8 = default UTF-8 character set  |  windows-1252 = windows-1252
  225 | $SITE["topfolder"]      = "weather28/";
  226 | $SITE["password"]       = "";
  227 | #---------------------------------------------------------
  228 | # Partners
  229 | #---------------------------------------------------------
  230 | # 
  231 | # Your visitors can find your weather data also	at: Weather Underground
  232 | $SITE["wuMember"]       = true;                # false = We are not uploading to Weather Underground  |  true = We are a member of Weather Underground
  233 | $SITE["wuID"]           = "ICATALUA129";
  234 | $SITE["wuStart"]        = "01-01-2010";
  235 | # 
  236 | # Mesonet
  237 | $SITE["mesonetMember"]  = false;                # false = We are not member of a regional Mesonet of weather-Stations  |  true = We are a proud member of a regional Mesonet of weather-Stations
  238 | $SITE["mesoID"]         = "IPWN";
  239 | $SITE["mesoName"]       = "Iberian Peninsula Weather Network";
  240 | $SITE["mesoLink"]       = "http://www.meteoiberica.net/";
  241 | # 
  242 | # Het Weer Actueel
  243 | $SITE["hwaMember"]      = false;                # false = We are not uploading to Het Weer Actueel  |  true = We are a member of Het Weer Actueel
  244 | $SITE["hwaID"]          = "";
  245 | # 
  246 | # European Weather Network
  247 | $SITE["ewnMember"]      = "";
  248 | $SITE["ewnID"]          = "";
  249 | #---------------------------------------------------------
  250 | # Other organizations one can upload to
  251 | #---------------------------------------------------------
  252 | # 
  253 | # wow.metoffice.gov.uk/
  254 | $SITE["wowMember"]      = false;                # false = We are not uploading to wow-metoffice  |  true = We are a member of wow-metoffice
  255 | $SITE["wowID"]          = "";
  256 | # 
  257 | # Awekas
  258 | $SITE["awekasMember"]   = true;                # false = We are not uploading to Awekas  |  true = We are a member of Awekas
  259 | $SITE["awekasID"]       = "11100";
  260 | # 
  261 | # WeatherCloud
  262 | $SITE["wcloudMember"]   = false;                # false = We are not uploading to Weather Cloud  |  true = We are a member of Weather Cloud
  263 | $SITE["wcloudID"]       = "";
  264 | # 
  265 | # CWOP
  266 | $SITE["cwopMember"]     = false;                # false = We are not uploading to CWOP  |  true = We are a member of CWOP
  267 | $SITE["cwopID"]         = "";
  268 | # 
  269 | # Weatherlink.com
  270 | $SITE["wl_comMember"]   = false;                # false = We are not uploading to WeatherLink.com  |  true = We are uploading ouw weather-data to WeatherLink.com
  271 | $SITE["weatherlinkID"]  = "";
  272 | # 
  273 | # And some more
  274 | $SITE["anWeMember"]     = false;                # false = We are not uploading to Anything Weather  |  true = We are a member of Anything Weather
  275 | $SITE["anWeID"]         = "";
  276 | $SITE["pwsMember"]      = false;                # false = We are not uploading to PWS  |  true = We are a member of PWS
  277 | $SITE["pwsID"]          = "";
  278 | $SITE["wp24ID"]         = false;                # false = We are not uploading to wp24  |  true = We are uploading to wp24
  279 | $SITE["uswg"]           = false;                # false = We are not uploading to uswg  |  true = We are uploading to uswg
  280 | # 
  281 | # cookie support / visitors are allowed to do customization
  282 | $SITE["cookieSupport"]  = true;                 # true = Yes, we warn visitors if there adaptions need a cookie  |  false = Do not use customization / cookies
  283 | $SITE["userChangeDebug"]= true;                 # true = Allow user to change this setting  |  false = Do not use allow this one
  284 | $SITE["userChangeColors"]= true;                # true = Allow user to change this setting  |  false = Do not use allow this one
  285 | $SITE["userChangeMenu"] = true;                 # true = Allow user to change this setting  |  false = Do not use allow this one
  286 | $SITE["userChangeHeader"]= true;                # true = Allow user to change this setting  |  false = Do not use allow this one
  287 | $SITE["userChangeChoice"]= true;                # true = Allow user to change this setting  |  false = Do not use allow this one
  288 | $SITE["userChangeLang"] = true;                 # true = Allow user to change this setting  |  false = Do not use allow this one
  289 | $SITE["userChangeUOM"]  = true;                 # true = Allow user to change this setting  |  false = Do not use allow this one
  290 | $SITE["userChangeForecast"]= true;              # true = Allow user to change this setting  |  false = Do not use allow this one
  291 | #---------------------------------------------------------
  292 | # Optional components attached to your weatherstation
  293 | #---------------------------------------------------------
  294 | # 
  295 | # UV/ Solar sensors
  296 | $SITE["UV"]             = false;                # false = No UV sensor attached  |  true = We have an UV sensor on our station
  297 | $SITE["SOLAR"]          = false;                # false = No solar sensor attached  |  true = We have a Solar sensor on our station
  298 | # 
  299 | # Other often atttached sensors sensors
  300 | $SITE["tempInside"]     = false;                 # false = We will NOT use an inside temperature sensor  |  true = We want to display the inside temperature
  301 | $SITE["extraTemp1"]     = false;                # false = No need for an extra temperature sensor  |  true = We have an extra sensor on our station
  302 | $SITE["extraTemp2"]     = false;                # false = No need for another extra temperature sensor  |  true = We have a second extra sensor on our station
  303 | # 
  304 | # Soil / moisture sensors
  305 | $SITE["soilUsed"]       = false;                # false = There are no soil sensors attached  |  true = We have soil sensors on our station
  306 | $SITE["soilPage"]       = false;                # false = Still we do not want a extra soil mositure page  |  true = Display the soil/moisture page
  307 | $SITE["soilCount"]      = "2";                  # 0 = 4
  308 | $SITE["soilDepth_1"]    = "10";                 # 1 = 100
  309 | $SITE["soilDepth_2"]    = "20";                 # 1 = 100
  310 | $SITE["soilDepth_3"]    = "30";                 # 1 = 100
  311 | $SITE["soilDepth_4"]    = "40";                 # 1 = 100
  312 | $SITE["uomMoist"]       = "cb";
  313 | $SITE["leafUsed"]       = false;                # false = There are no leaf sensors attached  |  true = We have leaf sensors on our station
  314 | $SITE["leafCount"]      = "2";                  # 0 = 4
  315 | #---------------------------------------------------------
  316 | # Display some extra information about:
  317 | #---------------------------------------------------------
  318 | # 
  319 | # The type of weather-station
  320 | $SITE["DavisVP"]        = false;                # false = Our station is not a Davis one  |  true = We use a Davis weather-station station
  321 | $SITE["stationShow"]    = false;                # false = We do not show the weatherstation name/picture on our pages  |  true = We want to display the information about the weatherstation
  322 | $SITE["stationTxt"]     = "Davis VP2";
  323 | $SITE["stationJpg"]     = "img/davis_logo.png";
  324 | $SITE["stationLink"]    = "http://www.davisnet.com/weather/products/professional-home-weather-stations.asp";
  325 | # 
  326 | # The website / provider
  327 | $SITE["providerShow"]   = false;                # false = Do not show the name/picture of our privider  |  true = We want to display the information about the provider
  328 | $SITE["providerTxt"]    = "My provider";
  329 | $SITE["providerJpg"]    = "img/_provider.jpg";
  330 | $SITE["providerLink"]   = "http://www.provider.xyz/";
  331 | # 
  332 | # The computer (device) used
  333 | $SITE["pcShow"]         = false;                # false = Do not show the type and name of our weather-computer  |  true = We want to display the information our weather-computer
  334 | $SITE["pcTxt"]          = "My Computer";
  335 | $SITE["pcJpg"]          = "img/_computer.png";
  336 | $SITE["pcLink"]         = "http://www.computer.xyz";
  337 | # 
  338 | # The Weather-Program
  339 | $SITE["WXsoftwareShow"] = false;                # false = No information about our weather-program is needed  |  true = We want to display the information our weather-program
  340 | #---------------------------------------------------------
  341 | # units, time and date formats and some other settings
  342 | #---------------------------------------------------------
  343 | # 
  344 | # Some other settings first
  345 | $SITE["commaDecimal"]   = true;                 # false = Use a decimal point [22.50]  |  true = Use a comma [22,50] as decimal"point"
  346 | $SITE["tempSimple"]     = false;                # false = Use multicolored temperatures  |  true = Use blue/red temperatures only
  347 | $SITE["textLowerCase"]  = false;                # false = Use all texts as they are  |  true = convert all texts to lowercase
  348 | $SITE["nightDayBefore"] = true;                 # false = Dayparts start with Night then morning, afternoon to evening)  |  true = Dayparts start with Morning then Afternoon, Evening to Night
  349 | # 
  350 | # The units to be used for all weather-values, first one is temperature
  351 | $SITE["uomTemp"]        = "°C";             # °C = Celcius  |  °F = Fahrenheit
  352 | $SITE["decTemp"]        = "1";                  # 0 = No decimals 14 C  |  1 = One decimal 14.1 C
  353 | # 
  354 | # For pressure in inches you need one or two decimals
  355 | $SITE["uomBaro"]        = " hPa";               #  hPa = hPa  |   mb = milibar  |   inHg = inHg
  356 | $SITE["decBaro"]        = "1";                  # 0 = No decimals 1017 hPa  |  1 = One decimal  1017.1 hPa  |  2 = Two decimals 30,23 inHg
  357 | # 
  358 | # 
  359 | $SITE["uomWind"]        = " km/h";              #  km/h =  km/h  |   kts =  kts  |   m/s =  m/s  |   mph =  mph
  360 | $SITE["decWind"]        = "1";                  # 0 = No decimals 14 km/h  |  1 = One decimal 3.4 m/s
  361 | # 
  362 | # 
  363 | $SITE["uomRain"]        = " mm";                #  mm =  mm  |   in =  in
  364 | $SITE["decPrecip"]      = "1";                  # 0 = No decimals 4 mm  |  1 = One decimal 4.2 mm  |  2 = Two decimals 2.35 in
  365 | # 
  366 | # 
  367 | $SITE["uomSnow"]        = " cm";                #  cm =  cm  |   in =  in
  368 | $SITE["decSnow"]        = "0";                  # 0 = No decimals 22 cm  |  1 = One decimal 22.4 cm
  369 | # 
  370 | # 
  371 | $SITE["uomDistance"]    = " km";                #  km =  kilometer  |   mi =  mile
  372 | $SITE["decDistance"]    = "0";                  # 0 = No decimals 15 mi  |  1 = One decimal 14.8 mi
  373 | # 
  374 | # 
  375 | $SITE["uomPerHour"]     = " mm";                # /hr =  / hour
  376 | $SITE["decPerHour"]     = "1";                  # 0 = No decimals  |  1 = One decimal
  377 | # 
  378 | # 
  379 | $SITE["uomHeight"]      = " ft";                #  ft =  feet  |   m =  meter
  380 | $SITE["decHeight"]      = "1";                  # 0 = No decimals  |  1 = One decimal
  381 | # 
  382 | # How to display the date and time information
  383 | $SITE["hourDisplay"]    = "24";                 # 12 = 12 hours  |  24 = 24 hours
  384 | $SITE["timeFormat"]     = "d-m-Y H:i";          # M j Y g:i a = Dec 31 2013 2:03 pm  |  d-m-Y H:i = 31-03-2012 14:03
  385 | $SITE["timeOnlyFormat"] = "H:i";                # g:i a = 2:03 pm  |  H:i = 14:03
  386 | $SITE["hourOnlyFormat"] = "H";                  # ga = 2pm  |  H = 14
  387 | $SITE["dateOnlyFormat"] = "d-m-Y";              # M j Y = Dec 31 2013  |  d-m-Y = 31-03-2012
  388 | $SITE["dateMDFormat"]   = "d-m";                # M j = Dec 31  |  d-m = 31-03
  389 | $SITE["dateLongFormat"] = "l d F Y";            # l M j Y = Friday Jan 22 2015  |  l d F Y = Friday, 5 februari 2013
  390 | #---------------------------------------------------------
  391 | # All done
  392 | #---------------------------------------------------------
  393 | #
  394 | #---------------------------------------------------------
  395 | # COMPATIBILLITY     for WeatherDisplay / consoleWD users
  396 | # set to true ONLY if it is ABSOLUTELY  necessary to use testtags.php from Saratoga or Leuven
  397 | #---------------------------------------------------------
  398 | $SITE["use_testtags"]   = false;  
  399 | #
  400 | #---------------------------------------------------------
  401 | # IMPORTANT     will you be uploading to the default upload folder (uploadXX) where xx is the short code for your weather program
  402 | #---------------------------------------------------------
  403 | #
  404 | $SITE["standard_upload"]= true;
  405 | #
  406 | #       If you do not want or are not able to upload to the default folder set the correct upload folder here
  407 | #     
  408 | $SITE["uploadDir"]	= "./../";        	# example for upload to root
  409 | $SITE["clientrawDir"] 	= "./../";
  410 | $SITE["graphImageDir"] = "./../";
  411 | #
  412 | #---------------------------------------------------------
  413 | $SITE["tpl_version"]    = "2.80";
  414 | #---------------------------------------------------------
  415 | # If you add an language add the new language code to this array
  416 | #---------------------------------------------------------
  417 | #
  418 | $SITE["installedLanguages"] = array (
  419 | "nl" => "Nederlands",
  420 | "en" => "English",
  421 | "fr" => "Français",
  422 | "de" => "Deutsch",
  423 | 'es' => "Espaol",
  424 | 'ct' => "Catala",
  425 | );

wsLoadSettings.php SettingsFiles should pe password protected - dated: 02-08-2017 19:28

    1 | <?php # ini_set('display_errors', 'On');   error_reporting(E_ALL);
    2 | if (isset($_REQUEST['sce']) && strtolower($_REQUEST['sce']) == 'view' ) {
    3 |    $filenameReal = __FILE__;            # display source of script if requested so
    4 |    $download_size = filesize($filenameReal);
    5 |    header('Pragma: public');
    6 |    header('Cache-Control: private');
    7 |    header('Cache-Control: no-cache, must-revalidate');
    8 |    header("Content-type: text/plain");
    9 |    header("Accept-Ranges: bytes");
   10 |    header("Content-Length: $download_size");
   11 |    header('Connection: close');
   12 |    readfile($filenameReal);
   13 |    exit;
   14 | }
   15 | $pageName	= 'wsLoadSettings.php';
   16 | $pageVersion	= '3.20 2016-06-01';
   17 | #
   18 | if (!isset($SITE)){echo "<h3>invalid call to script $pageName</h3>";exit;}
   19 | $SITE['wsModules'][$pageName] = 'version: ' . $pageVersion;
   20 | $pageFile = basename(__FILE__);			// check to see this is the real script
   21 | if ($pageFile <> $pageName) { $SITE['wsModules'][$pageFile]	= 'this file loaded instead of '.$pageName; }
   22 | if (!isset($pathString)) {$pathString='';}
   23 | if (!function_exists ('ws_message') ){
   24 |         function ws_message ($message,$always=false,&$string=false) {
   25 |                 global $wsDebug, $SITE;
   26 |                 $echo	= $always;
   27 |                 if ( $echo == false && isset ($wsDebug) && $wsDebug == true ) 			{$echo = true;}
   28 |                 if ( $echo == false && isset ($SIE['wsDebug']) && $SIE['wsDebug'] == true ) 	{$echo = true;}
   29 |                 if ( $echo == true  && $string === false) {echo $message.PHP_EOL;}
   30 |                 if ( $echo == true  && $string <> false) {$string .= $message.PHP_EOL;}
   31 |         }
   32 | }
   33 | ws_message ('<!-- module '.$pageFile.' ==== '.$SITE['wsModules'][$pageFile].' -->',true,$pathString);
   34 | #---------------------------------------------------------------------------
   35 | # '3.20 2016-06-01 Release 2.8g version including australian warnings
   36 | #---------------------------------------------------------------------------
   37 | $ws_arr_supp_wx         = array ('CU', 'CW', 'DW', 'MB', 'MH', 'VW','WC', 'WD', 'WL', 'WS', 'WV', 'MP');
   38 | # Set all defaults
   39 | $SITE['noaaPage']       = $SITE['ecPage']       = $SITE['cwopPage']     = 'no';  // set to default / no values
   40 | $SITE['canada']         = $SITE['europe']       = $SITE['america']      = $SITE['other'] = false;
   41 | $SITE['belgium']        = $SITE['netherlands']  = $SITE['warnArea']     = false; // set to default / no values
   42 | #
   43 | $SITE['wdPage'] =       $SITE['cwPage']         = $SITE['wdlPage']      = $SITE['wlPage'] = 'no';
   44 | $SITE['wcPage'] =       $SITE['cuPage']         = $SITE['mhPage']       = $SITE['mbPage'] = 'no';
   45 | $SITE['MeteoplugPage'] =$SITE['cltrPage']       = $SITE['trendPage']    = $SITE['mwPage'] = 'no';
   46 | $SITE['graphsPage'] =   $SITE['wsYTags']  = 'no';
   47 | 
   48 | $SITE['cookieName']	= 'weatherv4';
   49 | 
   50 | $SITE['colorStyles']	= array ('weather adapted', 'green','blue','pastel','red','orange','none','ws_clouds','ws_cloudsn','ws_mist','ws_moon','ws_pclouds','ws_rain','ws_snow','ws_storm','ws_sun','ws_thunder');
   51 | if (!defined('ENT_HTML5')) {define ('ENT_HTML5' , (16|32) );}
   52 | $SITE['htmlVersion']	= ENT_HTML5; 	// html version of this template
   53 | $SITE['commaDecimal']	= false; 	// most europeans use a comma for a decimal point. others a point
   54 | $SITE['curlFollow']	= 'false';	// for sites using safe mode
   55 | #---------------------------------------------------------------------------
   56 | $SITE['imgDir']		= 'img/';		// directory under topfolder used for general images 
   57 | $SITE['cacheDir']	= 'cache/';		// directory to cache files 
   58 | $SITE['metarDir']	= 'metar/';		// directory for metar scripts 
   59 | $SITE['javascriptsDir']	= 'javaScripts/';	// all general javascripts
   60 | $SITE['forecastsDir']	= 'forecasts/';		//
   61 | $SITE['iconsDir']	= 'wsIcons/';
   62 | $SITE['defaultIconsDir']= $SITE['iconsDir'].'default_icons/';
   63 | $SITE['defaultIconsSml']= $SITE['iconsDir'].'default_icons_small/';
   64 | $SITE['windIcons']	= $SITE['iconsDir'].'windIcons/';
   65 | $SITE['windIconsSmall']	= $SITE['iconsDir'].'windIconsSmall/';
   66 | $SITE['yrnoFcst']       = 'wsyrnofct/startMobi.php'; 
   67 | #---------------------------------------------------------------------------
   68 | # load user settings
   69 | #---------------------------------------------------------------------------
   70 | ws_message ( '<!-- module wsLoadSettings.php ('.__LINE__.'): loading wsUserSettings.php  -->',true,$pathString);
   71 | include '_my_texts/wsUserSettings.php';
   72 | #
   73 | if (isset($_REQUEST['debug']) || $SITE['wsDebug'] == true) {
   74 |         $SITE['wsDebug']        = true;
   75 | 	$wsDebug	        = true;
   76 | 	ini_set('display_errors', 'On');   error_reporting(E_ALL);	
   77 | 	ws_message ( '<!-- module wsLoadSettings.php  ('.__LINE__.'): debug is switched on by user request - error reporting ALL -->',true,$pathString);
   78 | 	$SITE['colorNumber']	= '3';
   79 | } 
   80 | else {  $SITE['wsDebug']        = false;
   81 |         ini_set('display_errors', NULL);  error_reporting(E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED); 
   82 |         $wsDebug = false;
   83 | }
   84 | if ($SITE['region'] <> 'europe') { //  only works  in europe
   85 | 	$SITE['ewnID'] 	= false; $SITE['ewnMember'] = false;
   86 | 	$SITE['hwaID']  = false; $SITE['hwaMember'] = false;
   87 | }      //  only works  in europe
   88 | #
   89 | /*  as of 2.8 no dynamic switching of wp supported
   90 | if (isset($_REQUEST['wp']))  { 
   91 |         $wp     = substr(strtoupper($_REQUEST['wp']).$SITE['WXsoftware'],0,2);
   92 |         if (in_array ($wp, $ws_arr_supp_wx )) {
   93 |                 $SITE['switch_wp']      = $SITE['WXsoftware']   = $wp;
   94 |                 ws_message ( '<!-- module wsLoadSettings.php  ('.__LINE__.'): user switches the weatherprogram to '.$SITE['WXsoftware'].' -->',true,$pathString);
   95 |                 $extraP                 ='&wp='.$SITE['WXsoftware'];
   96 |         }       
   97 | }
   98 | */
   99 | if (!isset ($SITE['WXsoftware']) )      {
  100 |         $SITE['WXsoftware']    = 'CU';         
  101 |         ws_print_warning( 'WARNING - Please set your weather_program. Defaulted to '.$SITE['WXsoftware']);
  102 | }
  103 | if ($SITE['sideDisplay'] == false && $SITE['menuPlace'] == 'V') {$SITE['sideDisplay'] = true; };	
  104 | # 
  105 | if (!isset ($SITE['curCondFrom']))      {
  106 |         $SITE['curCondFrom']   = 'metar';      
  107 |         ws_print_warning( 'WARNING - Please set your current conddition source. Defaulted to '.$SITE['curCondFrom']);
  108 | }
  109 | if ($SITE['curCondFrom'] == 'wd' && ($SITE['WXsoftware'] <> 'WD' && $SITE['WXsoftware'] <> 'CW')) {$SITE['curCondFrom'] = 'yahoo';}
  110 | #
  111 | if ($SITE['skipTop']) {$skiptopText = '#data-area';} else {$skiptopText = '';}
  112 | #
  113 | #---------------------------------------------------------------------------
  114 | #      W A R N I N G S
  115 | #---------------------------------------------------------------------------
  116 | $SITE['warningsEuro']	= $SITE['warningsNOAA']	= $SITE['warningsNWS']	= $SITE['warningsec']	= false;  
  117 | $SITE['warnImg']        = false;  // set all default no
  118 | #---------------------------------------------------------------------------
  119 | #
  120 | if ($SITE['region'] ==	'america') {            # U S A
  121 |         $SITE['america']        = true;
  122 | 	if ($SITE['useCurly'] == true) {
  123 | 		$SITE['warningScript']	= './usa/nws-alerts/wsnws-alerts.php';
  124 | 		$SITE['warningsNWS']	= true;
  125 | 	} else {
  126 | 		$SITE['warningScript']	= './usa/noaa_warn/noaaWarning.php';
  127 | 		$SITE['warningsNOAA']	=  $SITE['warnings'] ;
  128 | 		$SITE['warnImg']	= './usa/warn_icons/';
  129 | 	}
  130 | } elseif ($SITE['region'] == 'canada') {         #   C A N A D A
  131 |          $SITE['canada']                = true;
  132 | 	 $SITE['warningScript']	        = './canada/ec_warning.php';
  133 | 	 $SITE['warningsec']	        = $SITE['warnings'];
  134 | } elseif ($SITE['region'] ==	'europe') {     #  E U R O P E
  135 |         $SITE['europe']         = true;
  136 | 	$SITE['warningScript']	= './europe/wrnWarningv3.php';		// Euro
  137 | 	$SITE['warningsEuro']	= $SITE['warnPage'];
  138 | 	$SITE['warnImg']	= './img/wrnImages/warn_';
  139 | } else {        // region = other
  140 |         $SITE['other']          = true;
  141 | #        $SITE['warningsMenu'] 	= false;
  142 | #        $SITE['warnings'] 	= false;
  143 | #        $SITE['warnPage']       = false;
  144 |         $SITE['warningScript']	= './other/warning.php';   
  145 | }
  146 | #							        // for more detailed info when there is a warning displayed
  147 | $SITE['noaawarningURL']	= 'http://alerts.weather.gov/cap/wwaatmget.php?x='.$SITE['warnArea'].'&y=1';
  148 | $SITE['EUwarningURL']	= 'http://www.meteoalarm.eu/index3.php?area='.$SITE['warnArea'].'&day=0&lang=ne_NL';
  149 | #
  150 | if  ($SITE['warnings'] <> true) {
  151 |         $SITE['warnPage']       = false;
  152 |         $SITE['warningsEuro']	= $SITE['warningsNOAA']	= $SITE['warningsNWS']	= $SITE['warningsec']	= false;  
  153 | }
  154 | #---------------------------------------------------------------------------
  155 | # mobile site
  156 | # detection which mobile device is used is done in index.php by loading mobi/ws_check_mobi.php
  157 | #---------------------------------------------------------------------------
  158 | $SITE['mobileDir']	= 'mobi/';
  159 | $SITE['mobileSite']	= $SITE['mobileDir'].'mobi.php';  	// for switching to mobile site; set to "" when no mobile support is needed
  160 | #---------------------------------------------------------------------------
  161 | # Ajax
  162 | #---------------------------------------------------------------------------
  163 | $SITE['imgAjaxDir']	= 'ajaxImages/';		// directory for ajaxImages with trailing slash
  164 | $SITE['wsAjaxScript']   = $SITE['javascriptsDir'].'ajax.js';	// for AJAX enabled display
  165 | $SITE['wsAjaxDataLoad'] = 'wsAjaxDataLoad_v3.php';      // load fresh data for ajax page at users site
  166 | $SITE['ajaxGizmojs']    = $SITE['javascriptsDir'].'ajaxgizmo.js'; 	// rotate gizmo info
  167 | $SITE['ajaxGizmo'] 	= 'wsAjaxGizmo.php'; 		// default Giozmo
  168 | #---------------------------------------------------------------------------
  169 | # Which scripts to use to process the supplied data
  170 | #---------------------------------------------------------------------------
  171 | $SITE['functions']	= 'wsFunctions.php';  		// weather functions, override
  172 | $SITE['langFunc']	= 'wsLangFunctions.php';	// general functions for languages
  173 | $SITE['menuXml'] 	= 'wsMenuData.xml';		// menu processes 'incMenuDataWilsele.xml';
  174 | $SITE['menuLoad'] 	= 'wsMenuLoad.php';
  175 | $SITE['spidersTxt']	= 'spiders.txt';
  176 | $SITE['uvScript']	= 'uvforecastv3.php';	        // worldwide forecast script for UV Index
  177 | $SITE['sideInc']	= 'wsSideColom.php';
  178 | $SITE['bottomInc']	= 'wsBottom.php';
  179 | $SITE['footer']  	= 'wsFooter.php';
  180 | #---------------------------------------------------------------------------
  181 | #  script names for conversion of weatherprogram data to website/ajax data
  182 | #---------------------------------------------------------------------------
  183 | $SITE['getData']	= 'wsDataGet.php';		// data from ws tags to intermidiate array
  184 | $SITE['loadData']	= 'wsDataLoad.php';		// load data into variables (mostly ajax)
  185 | #---------------------------------------------------------------------------
  186 | # Website CSS files
  187 | #---------------------------------------------------------------------------
  188 | $SITE['CSSscreen']	= 'styleMain30.css';		// general stylesheet all pages
  189 | $SITE['CSSprint']	= 'stylePrint20.css';		// general stylesheet all pages for printing
  190 | $SITE['CSStable']	= 'styleTable20.css';		// general stylesheet all tables
  191 | $SITE['CSSmenuHor']	= 'styleMenuDrop20.css';	// stylesheet horizontal drop down menus
  192 | $SITE['CSSmenuVer']	= 'styleMenuVert20x.css';	// stylesheet vertical fly-out menus
  193 | $SITE['CSSmood']	= 'styleMood20.css';		// stylesheet for adapting colors based on current  weathercondition
  194 | 
  195 | if ($SITE['noChoice'] = '10') {$SITE['noChoice'] = 'wsStartPage';}
  196 | $SITE['noChoiceBackup']	= $SITE['noChoice'];
  197 | $SITE['menuPlaceBackup']= $SITE['menuPlace'];
  198 | $SITE['colorBackup']  	= $SITE['colorNumber'];
  199 | $SITE['headerBackup']  	= $SITE['header'];
  200 | $SITE['langBackup']	= $SITE['lang'];
  201 | 
  202 | if (isset($_REQUEST['ipad']) )	{       // modify standard settings if page formatting ipad is requested
  203 |         $SITE['ipad']           = true;
  204 |         $SITE['sideDisplay']	= false;
  205 |         $SITE['bottomDisplay']	= false;											
  206 |         $SITE['stripAll']	= true;	
  207 |         $SITE['stripMenu']	= true;	
  208 |         $SITE['bannerTop']	= false;
  209 |         $SITE['bannerBottom']	= false;
  210 |         $SITE['warnings']       = false;
  211 |         $SITE['warningTxt']     = false;
  212 | } else {$SITE['ipad']           = false;}
  213 | #
  214 | $SITE['supported_regions'] = array ('america','canada','europe','other');
  215 | if (!in_array($SITE['region'], $SITE['supported_regions']) ) {$SITE['region'] = 'europe';}
  216 | #
  217 | $SITE['supportedUnits'] = array ();
  218 | $SITE['supportedUnits'] ['temp'] = array('°C', '°F');
  219 | $SITE['supportedUnits'] ['baro'] = array(' hPa',   ' inHg',' mb' );
  220 | $SITE['supportedUnits'] ['wind'] = array(' km/h',  ' mph', ' kts', ' m/s',	);
  221 | $SITE['supportedUnits'] ['rain'] = array(' mm',	   ' in' );
  222 | $SITE['supportedUnits'] ['snow'] = array(' cm',	   ' in' );
  223 | #
  224 | $region	= $SITE['region'];
  225 | #
  226 | if (!in_array($SITE['uomTemp'], $SITE['supportedUnits'] ['temp']) ){
  227 |         if ($region == 'europe') 
  228 |                 {$SITE['uomTemp'] = $SITE['supportedUnits']['temp'][0];
  229 |         } else  {$SITE['uomTemp'] = $SITE['supportedUnits']['temp'][1];}
  230 | }
  231 | if (!in_array($SITE['uomBaro'], $SITE['supportedUnits'] ['baro']) ){
  232 |         if ($region == 'europe') 
  233 |                 {$SITE['uomBaro'] = $SITE['supportedUnits']['baro'][0];
  234 |         } else  {$SITE['uomBaro'] = $SITE['supportedUnits']['baro'][1];}
  235 | }
  236 | if (!in_array($SITE['uomWind'], $SITE['supportedUnits'] ['wind']) ){
  237 |         if ($region == 'europe') 
  238 |                 {$SITE['uomWind'] = $SITE['supportedUnits']['wind'][0];
  239 |         } else  {$SITE['uomWind'] = $SITE['supportedUnits']['wind'][1];}
  240 | }
  241 | if (!in_array($SITE['uomRain'], $SITE['supportedUnits'] ['rain']) ){
  242 |         if ($region == 'europe') 
  243 |                 {$SITE['uomRain'] = $SITE['supportedUnits']['rain'][0];
  244 |         } else  {$SITE['uomRain'] = $SITE['supportedUnits']['rain'][1];}
  245 | }
  246 | if (!in_array($SITE['uomSnow'], $SITE['supportedUnits'] ['snow']) ){
  247 |         if ($region == 'europe') 
  248 |                 {$SITE['uomSnow'] = $SITE['supportedUnits']['snow'][0];
  249 |         } else  {$SITE['uomSnow'] = $SITE['supportedUnits']['snow'][1];}
  250 | }
  251 | #
  252 | # ------------------------   check if we are allowed to set cookie and process all cookies
  253 | #
  254 | $uomBackup = array ();
  255 | $uomBackup['uomTemp']   = $SITE['uomTemp'];
  256 | $uomBackup['uomBaro'] 	= $SITE['uomBaro'];
  257 | $uomBackup['uomWind'] 	= $SITE['uomWind'];
  258 | $uomBackup['uomRain']	= $SITE['uomRain'];
  259 | $uomBackup['uomSnow']	= $SITE['uomSnow'];
  260 | $uomBackup['uomDistance']= $SITE['uomDistance'];
  261 | $uomBackup['uomPerHour']= $SITE['uomPerHour'];
  262 | $uomBackup['uomHeight'] = $SITE['uomHeight'];
  263 | 
  264 | if (!isset ($SITE['fctOrg'] ) ) { $SITE['fctOrg'] = 'yahoo';}
  265 | $SITE['fctOrgBackup']	= $SITE['fctOrg'];
  266 | 
  267 | #
  268 | if ($SITE['cookieSupport'] == true) {
  269 | 	ws_message ( '<!-- module wsLoadSettings.php ('.__LINE__.'): loading wsCookie.php   -->',false,$pathString);
  270 | 	include 'wsCookie.php' ;
  271 | }
  272 | $uomTemp	= $SITE['uomTemp'];
  273 | $uomBaro	= $SITE['uomBaro'];
  274 | $uomRain	= $SITE['uomRain'];
  275 | $uomSnow	= $SITE['uomSnow'];
  276 | $uomDistance    = $SITE['uomDistance'];
  277 | $uomWind	= $SITE['uomWind'];
  278 | $uomPerHour	= $SITE['uomPerHour'];
  279 | $uomHeight	= $SITE['uomHeight'];
  280 | 
  281 | # set the Timezone abbreviation automatically based on $SITE['tz'];
  282 | if (!function_exists('date_default_timezone_set')) {
  283 | 	 putenv("TZ=" . $SITE['tz']);
  284 | } else {
  285 | 	 date_default_timezone_set($SITE['tz']);
  286 | }
  287 | $SITE['tzName']	= date("T",time());
  288 | #
  289 | #---------------------------------------------------------------------------
  290 | # Automatic Info we might need
  291 | #---------------------------------------------------------------------------
  292 | if(isset($_SERVER['REMOTE_ADDR']))   {$SITE['REMOTE_ADDR']	= $_SERVER['REMOTE_ADDR'];}
  293 | if(isset($_SERVER['REMOTE_HOST']))   {$SITE['REMOTE_HOST']	= $_SERVER['REMOTE_HOST'];}
  294 | if(isset($_SERVER['DOCUMENT_ROOT'])) {$SITE['WEBROOT']		= $_SERVER['DOCUMENT_ROOT'];}
  295 | if(isset($_SERVER['REQUEST_URI']))   {$SITE['REQURI']		= $_SERVER['REQUEST_URI'];}
  296 | if(isset($_SERVER['SERVER_NAME']))   {$SITE['SERVERNAME']	= $_SERVER['SERVER_NAME'];}
  297 | #---------------------------------------------------------------------------
  298 | #
  299 | if ($SITE['fctOrg'] == 'yahoo') {$SITE['yahooPage'] = true;}
  300 | if ($SITE['fctOrg'] == 'metno') {$SITE['metnoPage'] = true;}
  301 | if ($SITE['fctOrg'] == 'wxsim') {$SITE['wxsimPage'] = true;}
  302 | if ($SITE['fctOrg'] == 'hwa')   {$SITE['hwaPage']   = true;}
  303 | if ($SITE['fctOrg'] == 'noaa')  {$SITE['noaaPage']  = true;}
  304 | if ($SITE['fctOrg'] == 'ec')    {$SITE['ecPage']    = true;}
  305 | #
  306 | if ($SITE['region'] == 'america')       {$SITE['hwaPage'] = $SITE['ecPage']  = false; }
  307 | if ($SITE['region'] == 'canada')        {$SITE['hwaPage'] = $SITE['noaaPage']= false; }
  308 | if ($SITE['region'] == 'other')         {$SITE['hwaPage'] = $SITE['noaaPage']= $SITE['ecPage']  = false; }
  309 | if ($SITE['region'] == 'europe')        {$SITE['noaaPage']= $SITE['ecPage']  = false; }
  310 | if ($SITE['belgium'] == false && $SITE['netherlands'] == false) {$SITE['hwaPage'] = false;}
  311 | #
  312 | $string1  = '';
  313 | if(isset($_SERVER['HTTP_HOST']))   {$string1     .= $_SERVER['HTTP_HOST'];}
  314 | if(isset($_SERVER['PHP_SELF']))    {$string1     .= $_SERVER['PHP_SELF'];}
  315 | $SITE['siteUrl']= 'http://'.str_replace ('index.php','',$string1);
  316 | #
  317 | if (isset ($index) && $index) {check_topfolder ($wsDebug);}
  318 | #
  319 | if (!isset ($SITE['uploadDir']) )       {$SITE['uploadDir']	=  'upload'.$SITE['WXsoftware'].'/';}
  320 | if (!isset ($SITE['clientrawDir']) )    {$SITE['clientrawDir']	=  'upload'.$SITE['WXsoftware'].'/';}
  321 | if (!isset ($SITE['graphImageDir']) )   {$SITE['graphImageDir']	=  'upload'.$SITE['WXsoftware'].'/';}
  322 | 
  323 | $SITE['MeteoplugPage'] 	= $SITE['wdlPage'] = $SITE['cltrPage'] = 'no';
  324 | $SITE['generatePage']   = 'no';
  325 | if ($SITE['meteoplug']) {$SITE['MeteoplugPage'] = 'yes';}
  326 | if ($SITE['wd_live'])   {$SITE['wdlPage']       = $SITE['cltrPage'] = 'yes';}
  327 | if ($SITE['meteoware']) {$SITE['mwPage']        = 'yes';}
  328 | #
  329 | if (!isset ($SITE['wuID']) || !$SITE['wuID'] || $SITE['wuID'] == '') { $SITE['wuHistPage'] = 'no'; } else {$SITE['wuHistPage'] = 'yes';}
  330 | #
  331 | $SITE['meteowareFile']  = './mwlive/mwliveRT.php?wp='.$SITE['WXsoftware'];
  332 | $SITE['yrnoXmlName']	= 'yowindowRT.php?wp='.$SITE['WXsoftware'];
  333 | $SITE['alltime_values'] = true;                // weatherprogram supplies all-time values for temp and so on
  334 | #---------------------------------------------------------------------------
  335 | $save_to_cache          = true;
  336 | 
  337 | $SITE['wp_scripts']     = $SITE['uploadDir'];
  338 | 
  339 | switch ($SITE['WXsoftware']) {
  340 |   
  341 |     case 'MH':  #               required settings for     M E T E O H U B   
  342 | #
  343 | 	$SITE['generatePage']	= 'yes';
  344 | 	$SITE['trendPage'] 	= 'yes';	 
  345 | 	$SITE['graphsPage'] 	= 'yes';
  346 | #
  347 | 	$SITE['WXsoftwareURL']  = 'http://wiki.meteohub.de/Main_Page';
  348 | 	$SITE['WXsoftwareLongName']= 'Meteohub';
  349 | 	$SITE['WXsoftwareIcon'] = 'img/meteohub.jpg';
  350 | 	
  351 | 	$SITE['realtime']	= 'cltrw';
  352 |         $SITE['realtime_file']	= $SITE['clientrawDir'].'clientraw.txt';
  353 | 	$SITE['wp_scripts']     = 'scriptsMH/';
  354 | 	$SITE['wsTags'] 	= $SITE['uploadDir'].'tagsMH.txt';	
  355 | 	$SITE['ydayTags']  	= $SITE['uploadDir'].'tagsYdayMH.txt';
  356 | 	
  357 | 	$SITE['process']        = $SITE['wp_scripts'].'tagsMH.php'; 
  358 | 	$SITE['wsTagsSrc'] 	= $SITE['wp_scripts'].'tags.mh.html';	
  359 | 	$SITE['wsYTagsSrc']  	= $SITE['wp_scripts'].'tagsyday.mh.html';	
  360 |     break;
  361 | #---------------------------------------------------------------------------
  362 | case 'MB':      #               required settings for   M E T E O B R I D G E   
  363 | #
  364 | 	$SITE['mbPage'] 	= 'yes';
  365 | 	$SITE['trendPage'] 	= 'yes';
  366 | 	$SITE['graphsPage'] 	= 'yes';
  367 | 	$SITE['cltrPage']       = $SITE['wdlPage']      = 'no';
  368 | 	$SITE['wd_live']        = false;
  369 | #
  370 | 	$SITE['WXsoftwareURL']  = 'http://www.meteobridge.com/wiki/index.php/Main_Page';
  371 | 	$SITE['WXsoftwareLongName']= 'Meteobridge';
  372 | 	$SITE['WXsoftwareIcon'] = 'img/meteobridge.jpg';
  373 | 
  374 | 	$SITE['realtime']	= 'http';
  375 |         $SITE['realtime_file']	= $SITE['clientrawDir'].'realtime.txt';
  376 | 	$SITE['wp_scripts']     = 'scriptsMB/';
  377 | 	$SITE['wsTags'] 	= $SITE['uploadDir'].'tagsMB.txt';
  378 | 	$SITE['process']        = $SITE['wp_scripts'].'tagsMB.php'; 
  379 | 	$SITE['wsTagsSrc'] 	= $SITE['wp_scripts'].'tags.mb.txt';			
  380 |         break;
  381 | 
  382 | #---------------------------------------------------------------------------
  383 | case 'MP':      #               required settings for  Meteoplug
  384 | #
  385 | #        $SITE['DavisVP']  	= false;  	// false as Meteoplug does not support Davis forecast text in xml
  386 | #
  387 | 	$SITE['generatePage']	= 'yes';
  388 | 	$SITE['MeteoplugPage'] 	= $SITE['meteoplug'] 	= true;
  389 | 	$SITE['wdlPage'] 	= $SITE['cltrPage'] 	= 'no';
  390 | 	$SITE['wd_live']        = false;
  391 | 	$SITE['alltime_values'] = true;
  392 | #
  393 | 	$SITE['WXsoftwareURL']  = 'http://wiki.meteoplug.com/Main_Page';
  394 | 	$SITE['WXsoftwareLongName'] = 'Meteoplug';
  395 | 	$SITE['WXsoftwareIcon'] = 'img/meteoplug.jpg';
  396 | #
  397 |         $SITE['realtime']	= 'none';
  398 | 	$SITE['wp_scripts']     = 'scriptsMP/';       
  399 | 	$SITE['wsTags'] 	= $SITE['uploadDir'].'tagsMP.txt'; 
  400 | 	$SITE['moonSet']  	= 'inc/astronomy.php'; 	// to calculate moon set & rise values
  401 |         $SITE['cacheMP']        = 300;                  // cache time max allowed in seconds
  402 | 	$SITE['process']        = $SITE['wp_scripts'].'tagsMP.php'; 
  403 |         $SITE['wsTagsSrc'] 	= $SITE['wp_scripts'].'tags.mp.txt';
  404 |         $save_to_cache          = false;
  405 |         $SITE['meteoplugID']  	= '';
  406 |         
  407 |  #       echo 'halt'; exit;
  408 |         break;
  409 | 
  410 | #---------------------------------------------------------------------------
  411 | case 'WD':      #               required settings for   W E A T H E R   D I S P L A Y  
  412 | #
  413 | 	$SITE['wdPage'] 	= 'yes';
  414 | 	$SITE['trendPage'] 	= 'yes';
  415 | 	$SITE['graphsPage'] 	= 'yes';
  416 | 	$SITE['MeteoplugPage'] 	= 'no';
  417 | #
  418 | 	$SITE['WXsoftwareURL']  = 'http://www.weather-display.com/';
  419 | 	$SITE['WXsoftwareLongName'] = 'Weather Display';
  420 | 	$SITE['WXsoftwareIcon'] = 'img/wd.jpg';
  421 | #
  422 | 	$SITE['realtime']	= 'cltrw';
  423 | 	$SITE['realtime_file']	= $SITE['clientrawDir'].'clientraw.txt';
  424 | 	$SITE['wp_scripts']     = 'scriptsWD/';
  425 | 	if (isset ($SITE['use_testtags'])  && $SITE['use_testtags']) {
  426 | 	        $SITE['wsTags'] 	= $SITE['uploadDir'].'testtags.php'; 
  427 |  	        $SITE['process']        = 'ws_testtags.php';
  428 |   	        $SITE['wsTagsSrc'] 	= $SITE['wp_scripts'].'testtags.txt';
  429 |   	} else {
  430 |  	        $SITE['wsTags'] 	= $SITE['uploadDir'].'tagsWD.txt'; 
  431 |  	        $SITE['process']        = $SITE['wp_scripts'].'tagsWD.php';
  432 |   	        $SITE['wsTagsSrc'] 	= $SITE['wp_scripts'].'tags.wd.txt'; 	
  433 |   	}
  434 |         break;
  435 | #---------------------------------------------------------------------------
  436 | case 'CW':      #               required settings for   C O N S O L E  WD  (= on raspberryPI)
  437 | #
  438 | 	$SITE['cwPage'] 	= 'yes';
  439 | 	$SITE['trendPage'] 	= 'yes';
  440 | 	$SITE['wxsimPage']	= 'no';
  441 | 	$SITE['alltime_values'] = false;
  442 | 	$SITE['MeteoplugPage'] 	= 'no';
  443 | #
  444 | 	$SITE['WXsoftwareURL']  = 'http://www.weather-display.com/';
  445 | 	$SITE['WXsoftwareLongName'] = 'consoleWD';	
  446 | 	$SITE['WXsoftwareIcon'] = 'img/consolewd.png';
  447 | #
  448 | 	$SITE['realtime']	= 'cltrw';
  449 | 	$SITE['realtime_file']	= $SITE['clientrawDir'].'clientraw.txt';
  450 | 	$SITE['wp_scripts']     = 'scriptsCW/';
  451 | 	if (isset ($SITE['use_testtags'])  && $SITE['use_testtags']) {
  452 | 	        $SITE['wsTags'] 	= $SITE['uploadDir'].'testtags.php'; 
  453 |  	        $SITE['process']        = 'ws_testtags.php';
  454 |   	        $SITE['wsTagsSrc'] 	= $SITE['wp_scripts'].'wxlocal-testtags.html';
  455 |   	} else {
  456 |  	        $SITE['wsTags'] 	= $SITE['uploadDir'].'tagsCW.txt'; 
  457 |  	        $SITE['process']        = $SITE['wp_scripts'].'tagsCW.php';
  458 |   	        $SITE['wsTagsSrc'] 	= $SITE['wp_scripts'].'wxlocal.html'; 	
  459 |   	}
  460 |         break;
  461 | #---------------------------------------------------------------------------
  462 | case 'CU':      #               required settings for   C U M U L U S
  463 | #
  464 | 	$SITE['cuPage'] 	= 'yes';
  465 | 	$SITE['trendPage'] 	= 'yes';
  466 | 	$SITE['graphsPage'] 	= 'yes';
  467 | 	$SITE['MeteoplugPage'] 	= $SITE['wdlPage'] = $SITE['cltrPage'] = 'no';
  468 | 	$SITE['wd_live']        = $SITE['meteoplug']= false;
  469 | #
  470 | 	$SITE['WXsoftwareURL']  = 'http://sandaysoft.com/products/cumulus';	
  471 | 	$SITE['WXsoftwareLongName'] = 'Cumulus';
  472 | 	$SITE['WXsoftwareIcon'] = 'img/cumulus.gif';
  473 | #
  474 | 	$SITE['realtime']	= 'json';
  475 | 	$SITE['realtime_file']	= $SITE['clientrawDir'].'realtimeTags.txt';
  476 | 
  477 | 	$SITE['wsTags'] 	= $SITE['uploadDir'].'tagsCU.txt'; 	
  478 | 	$SITE['wp_scripts']     = 'scriptsCU/';       
  479 | 	$SITE['process']        = $SITE['wp_scripts'].'tagsCU.php';
  480 | 	$SITE['wsTagsSrc'] 	= $SITE['wp_scripts'].'tags.cu.txt';
  481 |         break;
  482 | #---------------------------------------------------------------------------
  483 | case 'WL':      #               required settings for   W E A T H E R L I N K
  484 | #
  485 | 	$SITE['wlPage'] 	= 'yes';			
  486 | 	$SITE['graphsPage'] 	= 'yes';
  487 | 	$SITE['alltime_values'] = false;
  488 | 	$SITE['MeteoplugPage'] 	= $SITE['wdlPage'] = $SITE['cltrPage'] = 'no';
  489 | 	$SITE['wd_live']        = $SITE['meteoplug']= false;
  490 | #
  491 | 	$SITE['WXsoftwareURL']  = 'http://www.davisnet.com/index.asp';	
  492 | 	$SITE['WXsoftwareLongName'] = 'WeatherLink';
  493 | 	$SITE['WXsoftwareIcon'] = 'img/weatherlink.png';
  494 | #
  495 | 	$SITE['realtime']	= 'weatherlink';
  496 | 	$SITE['realtime_file']	= $SITE['clientrawDir'].'realtimev3.txt';
  497 | 	$SITE['wp_scripts']     = 'scriptsWL/';
  498 | 	$SITE['wsTags'] 	= $SITE['uploadDir'].'tags.wl.txt'; 
  499 | 	$SITE['ydayTags']  	= $SITE['uploadDir'].'tagsyday.wl.txt';
  500 | 	$SITE['moonSet']  	= 'inc/astronomy.php'; 	// to calculate moon set & rise values
  501 | 	
  502 | 	$SITE['process']        = $SITE['wp_scripts'].'tagsWL.php';  
  503 | 	$SITE['wsTagsSrc'] 	= $SITE['wp_scripts'].'tags.wl.htx';	
  504 | 	$SITE['wsYTagsSrc']  	= $SITE['wp_scripts'].'tagsyday.wl.htx';	
  505 | 
  506 |         if (!ws_date_format()) {ws_print_warning( 'WARNING - Please set the date format correct in your settings');} 
  507 |         break;
  508 | #---------------------------------------------------------------------------
  509 | case 'WC':      #               required settings for   W E A T H E R   C A T  (for Mac)
  510 | #
  511 | 	$SITE['wcPage'] 	= 'yes';			
  512 | 	$SITE['graphsPage'] 	= 'yes';
  513 | 	$SITE['MeteoplugPage'] 	= $SITE['wdlPage'] = $SITE['cltrPage'] = 'no';
  514 | 	$SITE['wd_live']        = $SITE['meteoplug']= false;
  515 | #
  516 | 	$SITE['WXsoftwareURL']  = 'http://trixology.com/weathercat/';	
  517 | 	$SITE['WXsoftwareLongName'] = 'WeatherCat';
  518 | 	$SITE['WXsoftwareIcon'] = 'img/weathercat.png';
  519 | #
  520 | 	$SITE['realtime']	= 'json';
  521 | 	$SITE['realtime_file']	= $SITE['clientrawDir'].'realtime.wc.txt';
  522 | 	$SITE['wp_scripts']     = 'scriptsWC/';
  523 | 	$SITE['wsTags'] 	= $SITE['uploadDir'].'tags.wc.txt'; 
  524 | 	$SITE['moonSet']  	= 'inc/astronomy.php'; 	// to calculate moon set & rise values
  525 | 	$SITE['process']        = $SITE['wp_scripts'].'tagsWC.php';
  526 | 	$SITE['wsTagsSrc'] 	= $SITE['wp_scripts'].'tags.wc.txt';		
  527 |         break;
  528 | #---------------------------------------------------------------------------
  529 | case 'DW':      #               required settings for   WeatherLink.com
  530 | #---------------------------------------------------------------------------
  531 | #
  532 |         $SITE['DavisVP']  	= false;  	// false as wl.com does not support Davis forecast text in xml
  533 | #
  534 | 	$SITE['MeteoplugPage'] 	= $SITE['wdlPage'] = $SITE['cltrPage'] = 'no';
  535 | 	$SITE['wd_live']        = $SITE['meteoplug']= false;
  536 | 	$SITE['alltime_values'] = false;
  537 | #
  538 | 	$SITE['WXsoftwareURL']  = 'http://www.weatherlink.com/user/'.$SITE['wlink_key'].'/index.php';	
  539 | 	$SITE['WXsoftwareLongName'] = 'Davis Weatherlink.Com';
  540 | 	$SITE['WXsoftwareIcon'] = 'img/wl_top.png';
  541 | #
  542 |         $SITE['realtime']	= 'none';
  543 | 	$SITE['wp_scripts']     = 'scriptsDW/';       
  544 | 	$SITE['wsTags'] 	= $SITE['wp_scripts'].'tagsWLCOM.php'; 
  545 | 	$SITE['ydayTags']  	= $SITE['uploadDir'].'tagsydayWLCOM.txt';
  546 | 	$SITE['moonSet']  	= 'inc/astronomy.php'; 	// to calculate moon set & rise values
  547 |         $SITE['cacheDW']        = 140;                  // cache time max allowed in seconds
  548 | 	$SITE['process']        = $SITE['wp_scripts'].'tagsWLCOM.php'; 
  549 |         $SITE['wsTagsSrc'] 	= '';
  550 |         $SITE['wsYTagsSrc']  	= $SITE['wp_scripts'].'tagsyday.cron.txt';	
  551 |         $save_to_cache          = false;
  552 |         $SITE['weatherlinkID']  = $SITE['wlink_key'];
  553 |         break;
  554 | #---------------------------------------------------------------------------
  555 | case 'WS':      #               required settings for   WSWIN / 
  556 | #
  557 |         $SITE['trendPage'] 	= 'yes';		// trendpage 
  558 | 	$SITE['MeteoplugPage'] 	= $SITE['cltrPage'] = 'no';
  559 | 	$SITE['wd_live']        = $SITE['meteoplug']= false;
  560 | 	$SITE['alltime_values'] = false;
  561 | 	$SITE['WXsoftwareURL']  = 'http://www.pc-wetterstation.de/en1index.html';	
  562 | 	$SITE['WXsoftwareLongName'] = 'WSWIN';
  563 | 	$SITE['WXsoftwareIcon'] = 'img/wswin.gif';
  564 | 
  565 |         $SITE['realtime']	= 'cltrw';
  566 |         $SITE['realtime_file']	= $SITE['clientrawDir'].'clientraw.txt';
  567 | 
  568 | 	$SITE['wp_scripts']     = 'scriptsWS/';	
  569 | 	$SITE['wsTags'] 	= $SITE['uploadDir'].'tagsws.txt'; 
  570 | 	$SITE['ydayTags']  	= $SITE['uploadDir'].'tagsydayWS.txt';
  571 | 
  572 |         $SITE['process']        = $SITE['wp_scripts'].'tagsWS.php';
  573 |         $SITE['wsTagsSrc'] 	= $SITE['wp_scripts'].'tags.ws.txt';
  574 |         $SITE['wsYTagsSrc']  	= $SITE['wp_scripts'].'tagsyday.cron.txt';	
  575 | 
  576 |         break;
  577 | #---------------------------------------------------------------------------
  578 | case 'WV':      #               required settings for   WVIEW / 
  579 | #
  580 | 	$SITE['WXsoftwareURL']  = 'http://www.wviewweather.com/';	
  581 | 	$SITE['WXsoftwareLongName'] = 'WVIEW';
  582 | 	$SITE['WXsoftwareIcon'] = 'img/wview.png';
  583 | 	$SITE['alltime_values'] = false;
  584 | 	$SITE['MeteoplugPage'] 	= $SITE['wdlPage'] = $SITE['cltrPage'] = 'no';
  585 | 	$SITE['wd_live']        = $SITE['meteoplug']= false;
  586 |         $SITE['realtime']	= 'none';         
  587 | 	$SITE['wsTags'] 	= $SITE['uploadDir'].'tagsWV.htm'; 
  588 | 	
  589 | #       $SITE['wview_day_txt']  = $SITE['uploadDir'].'tags.htm';
  590 | #	$SITE['wsCronTags']  	= $SITE['uploadDir'].'yesterdayTagsWVIEW.php';
  591 | 	$SITE['ydayTags']  	= $SITE['uploadDir'].'tagsydayWV.txt';
  592 | 	$SITE['moonSet']  	= 'inc/astronomy.php'; 	// to calculate moon set & rise values
  593 | 	$SITE['wp_scripts']     = 'scriptsWV/';
  594 |         $SITE['process']        = $SITE['wp_scripts'].'tagsWV.php'; 
  595 |         $SITE['wsTagsSrc'] 	= $SITE['wp_scripts'].'tagsWV.htx';
  596 |         $SITE['wsYTagsSrc']  	= $SITE['wp_scripts'].'tagsyday.cron.txt';		
  597 | #
  598 |         if (!ws_date_format()) {ws_print_warning( 'WARNING - Please set the date format correct in your settings');} 
  599 |         $SITE['soilUsed']       = false;      
  600 |        
  601 |         break;
  602 | #---------------------------------------------------------------------------
  603 | case 'VW':      #               required settings for   VWS / 
  604 | #
  605 | 	$SITE['alltime_values'] = false;
  606 | 	$SITE['MeteoplugPage'] 	= $SITE['wdlPage'] = $SITE['cltrPage'] = 'no';
  607 | 	$SITE['wd_live']        = $SITE['meteoplug']= false;
  608 | 	$SITE['WXsoftwareURL']  = 'http://www.ambientweather.com/virtualstation.html';	
  609 | 	$SITE['WXsoftwareLongName'] = 'VWS';
  610 | 	$SITE['WXsoftwareIcon'] = 'img/vws.gif';
  611 | 
  612 |         if (!ws_date_format()) {ws_print_warning( 'WARNING - Please set the date format correct in your settings');} 
  613 | #
  614 | 	$SITE['wsTags'] 	= $SITE['uploadDir'].'tagsVW.txt';        // ##### location and name of the uploaded tags file 
  615 |         $SITE['vws_day_txt']    = $SITE['wsTags'];
  616 | 
  617 |         $SITE['wp_scripts']     = 'scriptsVW/';
  618 |         $SITE['process']        = $SITE['wp_scripts'].'tagsVWS.php';
  619 |         $SITE['wsTagsSrc'] 	= $SITE['wp_scripts'].'tags.vws.htx';
  620 | 
  621 | # ---- VWS realtime ---------------------------------------------------------      		
  622 |         $SITE['realtime']	= 'wflash';             // type of realtime file supported
  623 |         $SITE['wflash_folder']  = $SITE['clientrawDir'];   // location of wflash files => if we started to use wflash
  624 |         $SITE['realtime_file']	= $SITE['wflash_folder'].'wflash.txt';  // default names of realtime files
  625 |         $SITE['realtime_file2'] = $SITE['wflash_folder'].'wflash2.txt';       
  626 | #    
  627 |         $SITE['soilUsed']       = false; 
  628 |         $SITE['clientrawDir'] 	= false; 
  629 |         $SITE['MeteoplugPage'] 	= $SITE['wdlPage'] = $SITE['cltrPage'] = 'no'; 
  630 |         $SITE['trendPage'] 	= 'no';
  631 |         $SITE['wd_live']        = $SITE['meteoplug']= false;
  632 | 
  633 |         break;
  634 | #---------------------------------------------------------------------------
  635 | default:
  636 | 	echo '<H3>Other software not supported (yet)</h3>'.PHP_EOL; exit;
  637 | }
  638 | #---------------------------------------------------------------------------
  639 | $SITE['wsRealTime'] 	= 1*60+30;	// number of seconds before realtime (or clntraw) data is considered obsolete
  640 | $SITE['wsNormTime'] 	= 5*60+30;      // number of seconds before (tags) data is considered obsolete
  641 | $SITE['wsFtpTime'] 	= 60*60+30;	// number of seconds before all data (graphs) is considered obsolete
  642 | $SITE['wsDataTime'] 	= 5*60+30;      // number of seconds before all data (actual internal time) is considered obsolete
  643 | #---------------------------------------------------------------------------
  644 | $SITE['steelTime']      = $SITE['wsSteelTime']; // 2015-10-01  older gauge scripts
  645 | $SITE['langDir']	= 'lang/';		// all language translation files are store here
  646 | 
  647 | return;
  648 | # --------------- functions for checking settings --------------------------------------
  649 | function ws_print_warning ($message) {
  650 |         global $SITE;
  651 |         if ($SITE['wsDebug']) {
  652 |         	if (!isset ($SITE['message']) ) {$SITE['message']='';}
  653 |         	$SITE['message'] .=  $message.'<br />'.PHP_EOL;
  654 |         }
  655 | }
  656 | function ws_check_setting (&$setting) {
  657 |         global $SITE;
  658 |         if (!isset ($setting) )         {return false;}
  659 |         elseif ($setting == false)      {return false;}
  660 |         elseif ($setting === true)      {return true;}
  661 |         elseif ($setting == 'yes')      {return true;}
  662 |         elseif ($setting == '1')        {return true;}
  663 |         else return false;         
  664 | }
  665 | function check_topfolder ($check=true) {
  666 |         global $SITE;
  667 |         if ($check <> true) {return true;}
  668 |         
  669 | 	$docRoot 		= $_SERVER['DOCUMENT_ROOT'].'/';
  670 | #	$docRoot 		= str_replace ('//','/',$docRoot);
  671 | 	$string 		= $_SERVER['SCRIPT_FILENAME'];
  672 | 	$folders		= str_replace($docRoot , '', $string);
  673 | 	$folders		= str_replace('\\' , '/', $folders);
  674 | 	$arr 			= explode ('/', $folders);
  675 | 	$count			= count($arr);
  676 | 	$n			= $count - 1;
  677 | 	switch ($count) {
  678 | 		case 2:
  679 | 			$FIND['topfolder']	= $arr['0'].'/';
  680 | 			break;
  681 | 		case 1:
  682 | 			$FIND['topfolder']	= './';
  683 | 			break;
  684 | 		default:
  685 |                         $end                    = $count - 2;
  686 | 			$FIND['topfolder']	= '';
  687 | 			for ($i = 0; $i <= ($end); $i++) {		// assemble the topfolder 
  688 | 				$FIND['topfolder'] .= $arr[$i].'/';
  689 | 			}
  690 | 			$end++;
  691 | 	}
  692 | 	if ($SITE["topfolder"]	<> $FIND['topfolder']) {
  693 | 		ws_print_warning ('WARNING - Change wsUserSettings.php:  $SITE["topfolder"]  from : '.$SITE["topfolder"].' to: '.$FIND['topfolder']);
  694 |         }
  695 | }
  696 | function ws_date_format() {
  697 |         global $SITE, $my_date_format, $my_char_sep, $my_month, $my_year, $my_day;
  698 |         $my_date_format = $SITE['my_date_format'];
  699 |         $my_char_sep    = $SITE["my_char_sep"];
  700 |         $my_day         = $SITE["my_day"];
  701 |         $my_month       = $SITE["my_month"];
  702 |         $my_year        = $SITE["my_year"];
  703 |         if     ($my_date_format == 'dd-mm-yyyy')  {$SITE['tags_ymd'] = array (3,2,1); $SITE['tags_ymd_sep']   = '-'; return true;}
  704 |         elseif ($my_date_format == 'dd-mm-yy')    {$SITE['tags_ymd'] = array (3,2,1); $SITE['tags_ymd_sep']   = '-'; return true;}
  705 |         elseif ($my_date_format == 'dd/mm/yyyy')  {$SITE['tags_ymd'] = array (3,2,1); $SITE['tags_ymd_sep']   = '/'; return true;}
  706 |         elseif ($my_date_format == 'dd/mm/yy')    {$SITE['tags_ymd'] = array (3,2,1); $SITE['tags_ymd_sep']   = '/'; return true;}
  707 |        
  708 |         elseif ($my_date_format == 'mm-dd-yyyy')  {$SITE['tags_ymd'] = array (3,1,2); $SITE['tags_ymd_sep']   = '-'; return true;}
  709 |         elseif ($my_date_format == 'mm-dd-yy')    {$SITE['tags_ymd'] = array (3,1,2); $SITE['tags_ymd_sep']   = '-'; return true;}
  710 |         elseif ($my_date_format == 'mm/dd/yyyy')  {$SITE['tags_ymd'] = array (3,1,2); $SITE['tags_ymd_sep']   = '/'; return true;}
  711 |         elseif ($my_date_format == 'mm/dd/yy')    {$SITE['tags_ymd'] = array (3,1,2); $SITE['tags_ymd_sep']   = '/'; return true;}
  712 | # no valid setting found so far
  713 |         if (!isset ($my_char_sep) )               {$SITE['tags_ymd'] = array (3,2,1); $SITE['tags_ymd_sep']   = '/'; return false;}
  714 |         
  715 |         $SITE['tags_ymd_sep']   = trim($my_char_sep);
  716 |         if (strlen ($SITE['tags_ymd_sep']) <> 1)  {$SITE['tags_ymd'] = array (3,2,1); $SITE['tags_ymd_sep']   = '/'; return false;}
  717 | # the separator is Ok, lets check the yy mm dd 
  718 |         if (!isset ($my_month) || !isset ($my_year) || !isset ($my_day) ) 
  719 |                                                   {$SITE['tags_ymd'] = array (3,2,1); $SITE['tags_ymd_sep']   = '/'; return false;}
  720 |         if (!is_numeric($my_month) || !is_numeric($my_year) || !is_numeric($my_day) )
  721 |                                                   {$SITE['tags_ymd'] = array (3,2,1); $SITE['tags_ymd_sep']   = '/'; return false;}
  722 |         $my_month      = (int) $my_month;     
  723 |         $my_year       = (int) $my_year;     
  724 |         $my_day        = (int) $my_day; 
  725 |         $total         =  $my_month +  $my_year  + $my_day;
  726 |         if ($total <> 6)                        {$SITE['tags_ymd'] = array (3,2,1); $SITE['tags_ymd_sep']   = '/'; return false;}
  727 |         $error = false;
  728 |         if ($my_month > 3 || $my_month < 1)     {$error = true;}
  729 |         if ($my_year > 3  || $my_year < 1)      {$error = true;}
  730 |         if ($my_day > 3   || $my_day  < 1)      {$error = true;}
  731 |         if ($error)                             {$SITE['tags_ymd'] = array (3,2,1); $SITE['tags_ymd_sep']   = '/'; return false;}
  732 |         $SITE['tags_ymd']       = array ($my_year,$my_month,$my_day);
  733 |         return true;
  734 | }
  735 | # ----------------------  version history
  736 | # 3.20 2015-10-12 release 2.8b version 

Trobareu la nostra informacio del temps tambe a:

Weather Underground

AWEKAS