';
} ?>
';
$doDebug = false; // Enable Debugging
$standAlone = false; // Displays outside Saratoga template
$sector = 'umv'; // Default sector type is set here
/* USE ONE of THESE for $sector!
"pnw" is Pacific Northwest
"nr" is Northern Rockies
"umv" is Upper Mississippi Valley
"cgl" is Great Lakes
"ne" is Northeast
"psw" is Pacific Southwest
"sr" is Southern Rockies
"sp" is Southern Plains
"smv" is Southern Mississippi Valley
"se" is Southeast
"taw" is Tropical Atlantic-Wide
"gm" is Gulf of Mexico
"car" is Caribbean
"eus" is U.S. Atlantic Coast
"pr" is Puerto Rico
"cam" is Central America
"eep" is Equatorial Eastern Pacific
"eus" is Eastern US
"mex" is Mexico
"nsa" is Northern South America
"ssa" is Southern South America */
$satBand = 'GEOCOLOR'; // IMPORTAMT!!! Default image type is set here
$satBandisNumeric = ($satBand!='GEOCOLOR'&&$satBand!='AirMass'&&$satBand!='Sandwich'&&$satBand!='DayCloudPhase'&&$satBand!='NightMicrophysics')?true:false;
$satBand = $satBandisNumeric?($satBand<10?('0'.intval($satBand)):$satBand):$satBand;
// $autoRefresh = true; // Use Autorefresh? true or false -- Determines whether AutoRefresh even appears
// $autoRefreshTime = 10; // Number of minutes between autorefreshes. IMPORTANT: use 2, 3, 4, 5, 6, 8, 10, 15, 20, or 30 ONLY!!!
// $autoRefreshOff = false; // Begin with Autorefresh Off? true or false -- 'OFF' or 'ON"
$bgndColor = 'silver'; // Set HAniS Background Color Here
$btnColor = 'darkslategray'; // Set Button Color here
$btnTextColor = 'white'; // Set Button Text Color here
$pauseSeconds = 1; // Pause on last image, in seconds
$animRate = 30; // Frame Rate of animation: 5 is glacial, 10 is slow, 15 is leisurely, 20 is good, and 50 is fast - set with integer
$numbImages = 12; // Number of Radar Images to Animate - 3 to around 25
$smoothingOn = true; // Enable image smoothing - new in HAniS 2.5
$checkFiles = false; // Check images before adding them to the filename list?
$addTime = false; // Add date & time to images
$addTimePixels = 70; // Add height for image date/times
$ratioAdjust = false; // Adjust ratio
$wideScreen = false;
}
/************************ End Test Parameters for Debugging Purposes ********************/
if (isset($_GET['sector'])) {
$sector = $_GET['sector'];
}
if (isset($_GET['satBand'])) {
$satBand = $_GET['satBand'];
}
if (isset($_GET['imageWidth'])) {
$imageWidth = $_GET['imageWidth'];
}
if (isset($_GET['imageHeight'])) {
$imageHeight = $_GET['imageHeight'];
}
if (isset($_GET['standAlone'])) {
$standAlone = $_GET['standAlone'];
}
if (isset($_GET['bgndColor'])) {
$bgndColor = $_GET['bgndColor'];
}
if (isset($_GET['btnColor'])) {
$btnColor = $_GET['btnColor'];
}
if (isset($_GET['btnTextColor'])) {
$btnTextColor = $_GET['btnTextColor'];
}
if (isset($_GET['animRate'])) {
$animRate = $_GET['animRate'];
}
if (isset($_GET['pauseSeconds'])) {
$pauseSeconds = $_GET['pauseSeconds'];
}
/* if (isset($_GET['autoRefresh'])) {
$autoRefresh = $_GET['autoRefresh'];
}
*/
if (isset($_GET['numbImages'])) {
$numbImages = $_GET['numbImages'];
}
if (isset($_GET['smoothingOn'])) {
$smoothingOn = $_GET['smoothingOn'];
}
if (isset($_GET['doDebug'])) {
$doDebug = $_GET['doDebug'];
if ($doDebug) $debugText = 'Setting $debug
';
}
if (isset($_GET['checkFiles'])) {
$checkFiles = $_GET['checkFiles'];
}
if (isset($_GET['wideScreen'])) {
$wideScreen = $_GET['wideScreen'];
}
if (isset($_GET['addTime'])) {
$addTime = $_GET['addTime'];
}
if (isset($_GET['addTimePixels'])) {
$addTimePixels = $_GET['addTimePixels'];
}
if (isset($_GET['restrictedWidth'])) {
$restrictWidth = $_GET['restrictedWidth'];
}
if (isset($_GET['maxWidth'])) {
$maxWidth = $_GET['maxWidth'];
}
$sectorTypes = array('standard', 'FD', 'CONUS','gm-eus-eep-cam-mex-car','taw-nsa-ssa','can'); // Pointers to the various possible image dimensions
if ($sector=='FD') $ourSectorType = $sectorTypes[1]; // Logic to select our array of dimensions
else if ($sector=='CONUS') $ourSectorType = $sectorTypes[2];
else if ($sector=='cam'||$sector=='eus'||$sector=='car'||$sector=='eep'||$sector=='gm'||$sector=='mex') $ourSectorType = $sectorTypes[3];
else if ($sector=='taw'||$sector=='nsa'||$sector=='ssa') $ourSectorType = $sectorTypes[4];
else if ($sector=='can') $ourSectorType = $sectorTypes[5];
else $ourSectorType = $sectorTypes[0];
$sectorDimensions = array('width','height');
$satBandSectors = array( // Array of arrays of possible image dimensions
'standard'=>array( // The US Regional Image Dimensions
'widthA'=>1200,
'iframeWidthA'=>1242,
'heightA'=>1200,
'iframeHeightA'=>1200,
'widthB'=>600,
'iframeWidthB'=>600,
'heightB'=>600,
'iframeHeightB'=>600,
'widthC'=>300,
'iframeWidthC'=>342,
'heightC'=>300,
'iframeHeightC'=>358),
'FD'=>array( // The Full Disk Dimensions
'widthA'=>678,
'iframeWidthA'=>678,
'heightA'=>678,
'iframeHeightA'=>678,
'widthB'=>339,
'iframeWidthB'=>339,
'heightB'=>339,
'iframeHeightB'=>339,
'widthC'=>339,
'iframeWidthC'=>339,
'heightC'=>339,
'iframeHeightC'=>440),
'CONUS'=>array( // The Continental US Image Dimensions
'widthA'=>1250,
'iframeWidthA'=>1292,
'heightA'=>750,
'iframeHeightA'=>750,
'widthB'=>625,
'iframeWidthB'=>625,
'heightB'=>375,
'iframeHeightB'=>375,
'widthC'=>416,
'iframeWidthC'=>342,
'heightC'=>250,
'iframeHeightC'=>358),
'gm-eus-eep-cam-mex-car'=>array( // The Gulf of Mexico, Caribbean, Eastern US Image Dimensions
'widthA'=>1000,
'iframeWidthA'=>1042,
'heightA'=>1000,
'iframeHeightA'=>1000,
'widthB'=>500,
'iframeWidthB'=>500,
'heightB'=>500,
'iframeHeightB'=>500,
'widthC'=>250,
'iframeWidthC'=>339,
'heightC'=>250,
'iframeHeightC'=>339),
'taw-nsa-ssa'=>array( // The Tropical Atlantic - Wide Dimensions
'widthA'=>900,
'iframeWidthA'=>942,
'heightA'=>540,
'iframeHeightA'=>540,
'widthB'=>450,
'iframeWidthB'=>450,
'heightB'=>270,
'iframeHeightB'=>270,
'widthC'=>450,
'iframeWidthC'=>324,
'heightC'=>270,
'iframeHeightC'=>242),
'can'=>array( // Canadian Dimensions
'widthA'=>1125,
'iframeWidthA'=>1167,
'heightA'=>560,
'iframeHeightA'=>602,
'widthB'=>560,
'iframeWidthB'=>602,
'heightB'=>280,
'iframeHeightB'=>322,
'widthC'=>560,
'iframeWidthC'=>560,
'heightC'=>280,
'iframeHeightC'=>242)
);
/* Debug Code *
if ($doDebug) {
var_dump($satBandSectors);
var_dump($satBandSectors['standard']['iframeHeightB']);
foreach ($satBandSectors as $key1=>$value1) {
foreach ($value1 as $key=>$value)
echo '$key1: '.$key1.'=> '.$key.': '.$value.'
';
}
echo '$ourSectorType: '.$ourSectorType.'
';
var_dump($satBandSectors[$ourSectorType]['iframeHeightB']);
// exit;
}
/* End Debug Code */
$imageWidth = $satBandSectors[$ourSectorType]['widthC'];
$iframeWidth = $satBandSectors[$ourSectorType]['iframeWidthC'];
$imageHeight = $satBandSectors[$ourSectorType]['heightC'];
$iframeHeight = $satBandSectors[$ourSectorType]['iframeHeightC'];
$iframeHeight += $addTime?20:0;
$ratioAdjust = 1;
if ($iframeWidth>324) {
$ratioAdjust = 324/$iframeWidth;
$iframeWidth = ceil($iframeWidth*$ratioAdjust);
$iframeHeight = ceil($iframeHeight*$ratioAdjust);
}
/* Debug Code */
if ($doDebug) {
$debugText .= '$satBand: '.$satBand.', $sector: '.$sector.', $ourSectorType: '.$ourSectorType.'
';
$debugText .= '$imageWidth: '.$imageWidth.', $iframeWidth: '.$iframeWidth.', $imageHeight: '.$imageHeight.', $iframeHeight: '.$iframeHeight.', $ratioAdjust: '.$ratioAdjust.'
';
// exit;
}
/* End Debug Code */
?>
Starting \'handiv\' declaration
';
}
$fileNameList = '';
$fileTimes = '';
get_file_names($sector,', ',$imageWidth,$imageHeight);
if ($doDebug) $debugText .= '
Raw FilenameList:
'.$fileNameList.'
';
$fileNames = $fileNameList.' ';
if ($doDebug) {
$debugText .= '
Filenames:
'.$fileNames.'
';
$debugText .= 'Filetimes: '.$fileTimes.'
';
}
if ($fileNames=='Satellite Images Currently Unavailable!'||$fileNames=='Too Many Images Requested') {
print ('
'.$fileNames.'
');
exit;
}
?>