*/
if (!isset($wfo)) {
$wfo='JKL';
$divWidth = '656'; // They are used for testing only
$leftMargin = 50; // Left margin to display text
$cache = './cache/';
$color = 'darkmagenta'; // Color for dropdown state names with subordinate entries
$siteOrder = false; // Use site names to alphabetize rather than states
}
/* End of testing code defaults and section to comment out */
if (isset($_POST['wfo'])) { # Are we using AJAX???
$wfo = $_POST['wfo']; # If so, set state.
if ($_SERVER["REMOTE_ADDR"]=='127.0.0.1') {
include ('Settings.php'); // AJAX forgets these on localhost!
}
}
if (isset($_POST['divWidth'])) { # Are we using AJAX???
$divWidth = $_POST['divWidth']; # If so, set state.
if ($_SERVER["REMOTE_ADDR"]=='127.0.0.1') {
include ('Settings.php'); // AJAX forgets these on localhost!
}
}
if (isset($_POST['leftMargin'])) { # Are we using AJAX???
$leftMargin = $_POST['leftMargin']; # If so, set state.
if ($_SERVER["REMOTE_ADDR"]=='127.0.0.1') {
include ('Settings.php'); // AJAX forgets these on localhost!
}
}
if (isset($_POST['color'])) { # Are we using AJAX???
$color = $_POST['color']; # If so, set state.
if ($_SERVER["REMOTE_ADDR"]=='127.0.0.1') {
include ('Settings.php'); // AJAX forgets these on localhost!
}
}
if (isset($_POST['siteOrder'])) { # Are we using AJAX???
$siteOrder = $_POST['siteOrder']; # If so, set state.
if ($_SERVER["REMOTE_ADDR"]=='127.0.0.1') {
include ('Settings.php'); // AJAX forgets these on localhost!
}
}
$wfoNames = array(
"ALY"=>"Albany, NY",
"ABQ"=>"Albuquerque, NM",
"AK"=>"Anchorage, AK",
"EWX"=>"Austin/San Antonio, TX",
"LWX"=>"Baltimore MD/Washington, DC",
"BGM"=>"Binghamton, NY",
"AL"=>"Birmingham, AL",
"BIS"=>"Bismarck, ND",
"ID"=>"Boise, ID",
"BOX"=>"Boston, MA",
"BTV"=>"Burlington, VT",
"CHS"=>"Charleston, SC",
"RLX"=>"Charleston, WV",
"WY"=>"Cheyenne, WY",
"IL"=>"Chicago, IL",
"CLE"=>"Cleveland, OH",
"CAE"=>"Columbia, SC",
"CO"=>"Denver, CO",
"IA"=>"Des Moines, IA",
"MI"=>"Detroit, MI",
"EKA"=>"Eureka, CA",
"FWD"=>"Fort Worth, TX",
"GGW"=>"Glasgow, MT",
"GLD"=>"Goodland, KS",
"FGF"=>"Grand Forks, ND",
"GYX"=>"Gray, ME",
"MT"=>"Great Falls, MT",
"GRB"=>"Green Bay, WI",
"GUM"=>"Guam",
"HFO"=>"Honolulu, HI",
"HUN"=>"Huntsville, AL",
"IN"=>"Indianapolis, IN",
"MS"=>"Jackson, MS",
"JKL"=>"Jackson, KY",
"EAX"=>"Kansas City, MO",
"KEY"=>"Key West, FL",
"LCH"=>"Lake Charles, LA",
"LZK"=>"Little Rock, AR",
"CA"=>"Sacramento, CA",
"KY"=>"Louisville, KY",
"LUB"=>"Lubbock, TX",
"MLB"=>"Melbourne, FL",
"MEG"=>"Memphis, TN",
"MAF"=>"Midland, TX",
"WI"=>"Milwaukee, WI",
"MOB"=>"Mobile, AL (41)",
"OHX"=>"Nashville, TN",
"LIX"=>"New Orleans/Baton Rouge, LA",
"MHX"=>"Newport, NC",
"IWX"=>"Northern Indiana",
"OK"=>"Norman, OK",
"NE"=>"Omaha, NE",
"GA"=>"Peachtree City, GA",
"PDT"=>"Pendleton, OR",
"PHI"=>"Philadelphia, PA",
"AZ"=>"Phoenix, AZ",
"OR"=>"Portland, OR",
"RAH"=>"Raleigh, NC",
"NV"=>"Reno, NV",
"STO"=>"Sacramento, CA",
"UT"=>"Salt Lake, UT",
"SJT"=>"San Angelo, TX",
"SGX"=>"San Diego, CA",
"PR"=>"San Juan, PR",
"WA"=>"Seattle, WA",
"SHV"=>"Shreveport, LA",
"FSD"=>"Sioux Falls, SD",
"OTX"=>"Spokane, WA (198)",
"CTP"=>"State College, PA",
"MO"=>"Springfield, MO",
"TBW"=>"Tampa Bay, FL",
"KS"=>"Topeka, KS",
"MN"=>"Twin Cities, MN",
"OKX"=>"Upton, NY",
"AKQ"=>"Wakefield, VA",
"ILM"=>"Wilmington, NC"
);
?>
|Usi',$html,$matches);
$discussion = isset($matches[0][0])?$matches[0][0]:''; // now have the forecast as a string with \n delimiters
if (strlen($discussion)) $discussion = trim($matches[0][0]); // prevent extra white space at beginning and end
print $Status;
if ($discussion == '') {
$discussion = 'NWS '.$productText.' for '.$wfoName.' not loaded. Refresh page and try again.';
}
// Finds if no reports are listed
preg_match_all('|(.*)
|Uis', $html, $noissue); // gets the noissue from NOAA
$nonereported = is_array($noissue[1])?$noissue[1]:'';
$noreport = "None issued by this office recently.";
?>
No reports issued by this office recently" . $nws_id . "\n";
}
else {
// Prints the report
// print "
\n"; // variable width
print "
\n"; // fixed width
print "
\n";
print "
" .$discussion ."
";
print "
\n";
print "
\n";
print "
\n";
}
// Prints the previous version, or page
print "