Beispiel #1
0
$sortcol = isset($_GET["sortcol"]) ? $_GET["sortcol"] : "peak";
$metar = isset($_GET["metar"]) ? $_GET['metar'] : "no";
$sorder = isset($_GET["sorder"]) ? $_GET["sorder"] : "desc";
$wfo = isset($_REQUEST["wfo"]) ? $_REQUEST["wfo"] : 'DMX';
$t->refresh = "<meta http-equiv=\"refresh\" content=\"60;\">";
$t->title = "Obs by NWS Forecast Office";
$t->thispage = "current-sort";
include "../../include/mlib.php";
include "../../include/network.php";
$nt = new NetworkTable("WFO");
include "../../include/forms.php";
include "../../include/station.php";
include "../../include/iemaccess.php";
include "../../include/iemaccessob.php";
$iem = new IEMAccess();
$asos = $iem->getWFO($wfo);
$vals = array("tmpf" => "Air Temperature [F]", "dwpf" => "Dew Point Temp [F]", "sknt" => "Wind Speed [knots]", "drct" => "Wind Direction [deg]", "alti" => "Altimeter [mb]", "peak" => "Today's Wind Gust [knots]", "peak_ts" => "Time of Peak Gust", "relh" => "Relative Humidity", "feel" => "Feels Like [F]", "vsby" => "Visibility [miles]", "ts" => "Observation Time", "phour" => "Last Hour Rainfall [inch]", "min_tmpf" => "Today's Low Temperature", "max_tmpf" => "Today's High Temperature", "pday" => "Today Rainfall [inch]");
$t->current_network = "By NWS WFO";
$wselect = "<select name=\"wfo\">";
while (list($key, $value) = each($nt->table)) {
    $wselect .= "<option value=\"{$key}\" ";
    if ($wfo == $key) {
        $wselect .= "SELECTED";
    }
    $wselect .= ">[" . $key . "] " . $nt->table[$key]["name"] . "\n";
}
$wselect .= "</select>";
function aSortBySecondIndex($multiArray, $secondIndex)
{
    global $sorder;
    while (list($firstIndex, $val) = each($multiArray)) {