# TNET Services, Inc. # # Copyright: (c) 1992-2007 Copyright TNET Services, Inc. ############################################################################ # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA # # Version 1.01 - 02-Dec-2018 - added support for DarkSky forecasts # Version 1.02 - 23-Jan-2018 - added tabber CSS for DarkSky forecast day/hour display # Version 1.03 - 11-Apr-2020 - added support for Aerisweather forecasts # Version 1.04 - 13-May-2020 - Changed WU to WU/TWC (WC-forecast) script support # Version 1.05 - 18-Jan-2023 - added support for Pirateweather forecasts # Version 1.06 - 07-Feb-2023 - added support for OpenWeatherMap and VirtualCrossing forecasts # Version 1.07 - 09-Feb-2023 - fixes for ec-forecast alert display # Version 1.08 - 03-Apr-2023 - removed DarkSky forecast (API shutdown 31-Mar-2023) # Version 1.09 - 18-May-2023 - added styling for EC 'advisory' alert ############################################################################ # This document uses Tab 4 Settings ############################################################################ $viewSource = false; if (isset($_REQUEST['sce']) && strtolower($_REQUEST['sce']) == '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; } ############################################################################ require_once("Settings.php"); require_once("common.php"); ############################################################################ $TITLE= $SITE['organ'] . " - Forecast"; //$SITE['fcstscript'] = 'advforecast-json.php'; // Use the new script! $SITE['fcstscript'] = 'advforecast2.php'; // Use the old script $showGizmo = true; // set to false to exclude the gizmo include("top.php"); // $wideWidth = 850; // Widescreen width desired on page. Set from 656 to 850 (native width) //$narrowWidth = 800; // Original Narrowscreen width for old advforecast2.php $narrowWidth = 735; // Narrowscreen width for advforecast-json.php $divWidth = ($_SESSION['CSSwidescreen']==1 ? $wideWidth : $narrowWidth); // // $divWidth = 705; // Page width for both wide and narrow screens ############################################################################ // testing parameters $fcstby = isset($_REQUEST['fcstby'])?strtoupper($_REQUEST['fcstby']):''; if ($fcstby == 'NWS') { $SITE['fcstscript'] = 'advforecast2.php'; // USA-only NWS Forecast script $SITE['fcstorg'] = 'NWS'; // set to 'NWS' for NOAA NWS } if ($fcstby == 'EC' or $SITE['fcstorg'] == 'EC') { $SITE['fcstscript'] = 'ec-forecast.php'; // Canada forecasts from Environment Canada $SITE['fcstorg'] = 'EC'; // set to 'EC' for Environment Canada print ' '; } if ($fcstby == 'WU') { $SITE['fcstscript'] = 'WU-forecast.php'; // Non-USA, Non-Canada Wunderground Forecast Script $SITE['fcstorg'] = 'WU'; // set to 'WU' for WeatherUnderground } if ($fcstby == 'WC') { $SITE['fcstscript'] = 'WC-forecast.php'; // Non-USA, Non-Canada Wunderground Forecast Script $SITE['fcstorg'] = 'WU/TWC'; // set to 'WU' for WeatherUnderground } if ($fcstby == 'AW') { $SITE['fcstscript'] = 'AW-forecast.php'; // Non-USA, Non-Canada Aerisweather Forecast Script $SITE['fcstorg'] = 'Aerisweather'; // set to 'Aerisweather' for Aerisweather.com } if ($fcstby == 'WXSIM') { $SITE['fcstscript'] = 'plaintext-parser.php'; // WXSIM forecast $SITE['fcstorg'] = 'WXSIM'; // set to 'WXSIM' for WXSIM forecast } if ($fcstby == 'PW' or $SITE['fcstorg'] == 'PW' or $fcstby == 'OWM' or $SITE['fcstorg'] == 'OWM' or $fcstby == 'VC' or $SITE['fcstorg'] == 'VC') { print ' '; } if ($fcstby == 'PW' or $SITE['fcstorg'] == 'PW') { $SITE['fcstscript'] = 'PW-forecast.php'; // Pirateweather forecast $SITE['fcstorg'] = 'PW'; // set to 'PW' for Pirateweather.net forecast } if ($fcstby == 'OWM' or $SITE['fcstorg'] == 'OWM') { $SITE['fcstscript'] = 'OWM-forecast.php'; // OpenWeatherMap forecast $SITE['fcstorg'] = 'OWM'; // set to 'OWM' for OpenWeatherMap.org forecast } if ($fcstby == 'VC' or $SITE['fcstorg'] == 'VC') { $SITE['fcstscript'] = 'VC-forecast.php'; // OpenWeatherMap forecast $SITE['fcstorg'] = 'VC'; // set to 'OWM' for OpenWeatherMap.org forecast } // end of special testing parms ?>
0) { // Add nws-alerts alert box cache file include_once("nws-alerts-config.php"); include($cacheFileDir.$aboxFileName); // Insert nws-alerts alert box echo $alertBox; ?> \n"; $_REQUEST['inc'] = 'y'; $_REQUEST['summary'] = 'Y'; include_once("atom-advisory.php"); print "
\n"; } } $doIncludeNWS = true; // handle advforecast2.php include $doIncludeWC = true; // handle WU/TWC-forecast include also $doIncludeDS = true; // handle DS-forecast include also $doIncludePW = true; // handle PW-forecast include also $doIncludeAW = true; // handle AW-forecast include also $doIncludeOWM = true; // handle OWM-forecast include also $doIncludeVC = true; // handle VC-forecast include also $doInclude = true; // handle ec-forecast and WXSIM include also $doPrint = true; // ec-forecast.php setting ?>