Skip to content
This repository
tree: ec2079edf3
Fetching contributors…

Cannot retrieve contributors at this time

file 137 lines (127 sloc) 5.602 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137
<?php
include("../../config/settings.inc.php");
include("$rootpath/include/google_keys.php");
include("$rootpath/include/mobile_device_detect.php");

/* Mobile business logic */
$imobile = mobile_device_detect(true,true,true,true,true,true,true,false,false);
if ($imobile){
  echo "<html><head><script>
var tokens = window.location.href.split('#');
if (tokens.length == 2){
window.location = 'mobile.php?vtec='+ tokens[1];
} else {
window.location = 'mobile.php?vtec=2008-O-NEW-KJAX-TO-W-0048';
}
</script></head><body>";
  exit;
}

/* Pure IEM 2.0 App to do vtec stuff. Shorter url please as well */
$v = isset($_GET["vtec"]) ? $_GET["vtec"] : "2012-O-NEW-KBMX-TO-W-0001";
$tokens = preg_split('/-/', $v);
$year = $tokens[0];
$operation = $tokens[1];
$vstatus = $tokens[2];
$wfo4 = $tokens[3];
$wfo = substr($wfo4,1,3);
$phenomena = $tokens[4];
$significance = $tokens[5];
$eventid = intval( $tokens[6] );

$HEADEXTRA = '<meta property="og:image" content="/images/logo_small.png"/>
<link rel="stylesheet" type="text/css" href="http://extjs.cachefly.net/ext-3.4.0/resources/css/ext-all.css"/>
<link rel="stylesheet" type="text/css" href="../ext/ux/form/Spinner.css"/>
<script type="text/javascript" src="http://extjs.cachefly.net/ext-3.4.0/adapter/ext/ext-base.js"></script>
<script type="text/javascript" src="http://extjs.cachefly.net/ext-3.4.0/ext-all.js"></script>
<script src="http://maps.google.com/maps?file=api&amp;v=2.x&amp;key='. $GOOGLEKEYS[$rooturl]["vtec"] .'" type="text/javascript"></script>
<script src="OpenLayers.js"></script>';

if (isset($_REQUEST["devel"])){
    $HEADEXTRA .= '<script type="text/javascript" src="js/wfos.js"></script>
<script type="text/javascript" src="js/RowExpander.js"></script>
<script type="text/javascript" src="js/Printer-all.js"></script>
<script type="text/javascript" src="../ext/ux/menu/EditableItem.js"></script>
<script type="text/javascript" src="../ext/ux/grid/GridFilters.js"></script>
<script type="text/javascript" src="../ext/ux/grid/filter/Filter.js"></script>
<script type="text/javascript" src="../ext/ux/form/Spinner.js"></script>
<script type="text/javascript" src="../ext/ux/form/SpinnerStrategy.js"></script>
<script type="text/javascript" src="../ext/ux/grid/filter/StringFilter.js"></script>
<script type="text/javascript" src="js/overrides.js"></script>
<script type="text/javascript" src="js/RadarPanel.js"></script>
<script type="text/javascript" src="js/LSRFeatureStore.js"></script>
<script type="text/javascript" src="js/SBWFeatureStore.js"></script>
<script type="text/javascript" src="js/SBWIntersectionFeatureStore.js"></script>
<script type="text/javascript" src="js/Ext.ux.SliderTip.js"></script>
<script type="text/javascript" src="js/static.js"></script>';
} else {
$HEADEXTRA .= '<script src="app.js?v=1"></script>';
}

$HEADEXTRA .= '<script>
Ext.namespace("App");
App.server = "'. $rooturl .'";

Ext.namespace("cfg");
cfg.startYear = 1986;
cfg.header = "iem-header";
</script>';
$TITLE = "IEM Valid Time Extent Code (VTEC) App";
$NOCONTENT = 1;
$THISPAGE ="severe-vtec";
include("$rootpath/include/header.php");
?>

<div id="help">
<h2>IEM VTEC Product Browser 3.0</h2>

<p>This application allows easy navigation of National Weather Service
issued products with Valid Time Extent Coding (VTEC).</p>

<p style="margin-top: 10px;"><b>Tab Functionality:</b>
<br /><i>Above this section, you will notice 9 selectable tabs. Click on
the tab to show the information.</i>
<br /><ul>
<li><b>Help:</b> This page!</li>
<li><b>RADAR Map:</b> Simple map displaying the product geography.</li>
<li><b>Text Data:</b> The raw text based products issued by the National Weather Service. Any follow-up products are included as well.</li>
<li><b>Google Map:</b> Product and Storm Reports over Google Maps.</li>
<li><b>SBW History:</b> Displays changes in storm based warnings.</li>
<li><b>Storm Reports within SBW:</b> Storm Reports inside Storm Based Warning.</li>
<li><b>All Storm Reports:</b> Any Storm Reports during the time of the product for the issuing office.</li>
<li><b>Geography Included:</b> Counties/Zones affected by this product.</li>
<li><b>List Events:</b> List all events of the given phenomena, significance, year, and issuing office.</li>
</ul>
</div>
<div id="boilerplate"></div>
<div id="footer"></div>
<script>
Ext.ns("App");
Ext.onReady(function(){
var tokens = window.location.href.split('#');
cgiWfo = "<?php echo $wfo; ?>";
cgiPhenomena = "<?php echo $phenomena; ?>";
cgiSignificance = "<?php echo $significance; ?>";
cgiEventId = "<?php echo $eventid; ?>";
cgiYear = "<?php echo $year; ?>";
if (tokens.length == 2){
var subtokens = tokens[1].split("/");
var vtectokens = subtokens[0].split("-");
if (vtectokens.length == 7){
cgiWfo = vtectokens[3].substr(1,3);
cgiPhenomena = vtectokens[4];
cgiSignificance = vtectokens[5];
cgiEventId = vtectokens[6];
cgiYear = vtectokens[0];
}
if (subtokens.length > 1){
var radartokens = subtokens[1].split("-");
if (radartokens.length == 3){
App.initRadar = radartokens[0];
App.initRadarProduct = radartokens[1];
try{
App.initRadarTime = Date.parseDate(radartokens[2],'YmdHi');
} catch(err) {}
}
}
}
Ext.getCmp("wfoselector").setValue(cgiWfo);
Ext.getCmp("phenomenaselector").setValue(cgiPhenomena);
Ext.getCmp("significanceselector").setValue(cgiSignificance);
Ext.getCmp("eventid").setValue(cgiEventId);
Ext.getCmp("yearselector").setValue(cgiYear);
Ext.getCmp("mainPanel").activate(3);
});
</script>
</body></html>
Something went wrong with that request. Please try again.