function prt_tablehead()
{
    global $updated, $maxDistance, $distUnits, $Units, $table, $scroller, $CSS, $LegendX, $LegendY, $ControlX, $ControlY;
    global $found_wtmp, $found_gust, $found_pdty, $found_wvht, $found_vis, $coloms;
    $table .= '<table class="genericTable" style=""><tr>' . PHP_EOL;
    $table .= '<th>ID</th>' . PHP_EOL;
    $table .= '<th>' . langtransstr('Name') . '</th>' . PHP_EOL;
    $table .= '<th>' . langtransstr('Time') . ' ' . $Units['time'] . '</th>' . PHP_EOL;
    $table .= '<th>' . langtransstr('Air') . ' ' . $Units['temp'] . '</th>' . PHP_EOL;
    $coloms = 4;
    if ($found_wtmp) {
        $table .= '<th>' . langtransstr('Water') . ' ' . $Units['temp'] . '</th>' . PHP_EOL;
        $coloms++;
    }
    $table .= '<th>' . langtransstr('Wind') . ' ' . $Units['wind'] . '</th>' . PHP_EOL;
    if ($found_gust) {
        $table .= '<th>' . langtransstr('Gust') . ' ' . $Units['wind'] . '</th>' . PHP_EOL;
        $coloms++;
    }
    $table .= '<th>' . langtransstr('Baro') . ' ' . $Units['baro'] . '</th>' . PHP_EOL;
    if ($found_pdty) {
        $table .= '<th>' . langtransstr('Trend') . ' ' . $Units['baro'] . '</th>' . PHP_EOL;
        $coloms++;
    }
    if ($found_wvht) {
        $table .= '<th>' . langtransstr('Waves') . ' ' . $Units['wave'] . '</th>' . PHP_EOL;
        $coloms++;
    }
    if ($found_vis) {
        $table .= '<th>' . langtransstr('Visibillity') . ' ' . $Units['dist'] . '</th>' . PHP_EOL;
        $coloms++;
    }
    $table .= '</tr>' . PHP_EOL;
    $scroller .= "<p id=\"mesolegend\">\r\n<span class=\"content0\">&nbsp;" . langtransstr('Air Temperature') . "&nbsp;</span>\r\n<span class=\"content1\">&nbsp;" . langtransstr('Water Temperature') . "&nbsp;</span>\r\n<span class=\"content2\">&nbsp;" . langtransstr('Wind Direction @ Speed') . "&nbsp;</span>\r\n<span class=\"content3\">&nbsp;" . langtransstr('Wind Gust Speed') . "&nbsp;</span>\r\n<span class=\"content4\">&nbsp;" . langtransstr('Barometer') . "&nbsp;</span>\r\n<span class=\"content5\">&nbsp;" . langtransstr('Barometer Trend') . "&nbsp;</span>\r\n<span class=\"content6\">&nbsp;" . langtransstr('Wave Height') . "&nbsp;</span>\r\n<span class=\"content7\">&nbsp;" . langtransstr('Visibillity') . "&nbsp;</span>\r\n<span class=\"content8\"></span>\r\n</p>\n";
    $Top = 5;
    // default location for values legend on map
    $Left = 5;
    if ($LegendX) {
        $Left = $LegendX;
    }
    if ($LegendY) {
        $Top = $LegendY;
    }
    $CSS .= "#mesolegend {\r\n\ttop:  {$Top}px;\r\n\tleft: {$Left}px;\r\n\tfont-size: 10pt;\r\n\tcolor: #0000FF;\r\n\tbackground-color: #FFFFFF;\r\n\tpadding: 3px 3px;\r\n}\r\n";
    // set up the run/pause/step controls
    $scroller .= '<form action="index.php"> 
<p id="BuoyControls">
<input type="button" value="Run"   name="run"   onclick="set_run(1);" />
<input type="button" value="Pause" name="pause" onclick="set_run(0);" />
<input type="button" value="Step"  name="step"  onclick="step_content();" />
</p>
</form>
';
    $Top = $Top + 25;
    // default start for controls is under legend
    if (trim($ControlX) != '') {
        $Left = $ControlX;
    }
    if (trim($ControlY) != '') {
        $Top = $ControlY;
    }
    $CSS .= "#BuoyControls {\r\n\ttop: {$Top}px;\r\n\tleft: {$Left}px;\r\n\tfont-family: Verdana, Arial, Helvetica, sans-serif; \r\n\tfont-size: 8pt;\r\n\tfont-weight: normal;\r\n\tposition: relative;\r\n\tdisplay: inline;\r\n\tpadding: 0 0;\r\n\tborder: none;\r\n\tz-index: 15;\r\n}\r\n#BuoyControls a {\r\n\tpadding: 3px 3px;\r\n\tbackground: #666666;\r\n\tcolor: white;\r\n\tborder: 1px solid white;\r\n}\r\n";
    return;
}
Beispiel #2
0
   $display = false;
   if ($SITE['stationShow']) {
       $display = true;
       $sideArrHwSw['station'] = array('name' => langtransstr('Weatherstation'), 'icon' => $SITE['stationJpg'], 'link' => $SITE['stationLink'], 'alt' => $SITE['stationTxt']);
   }
   if ($SITE['WXsoftwareShow']) {
       $display = true;
       $sideArrHwSw['program'] = array('name' => langtransstr('Weatherprogram'), 'icon' => $SITE['WXsoftwareIcon'], 'link' => $SITE['WXsoftwareURL'], 'alt' => $SITE['WXsoftwareLongName']);
   }
   if ($SITE['pcShow']) {
       $display = true;
       $sideArrHwSw['pc'] = array('name' => langtransstr('Weatherserver'), 'icon' => $SITE['pcJpg'], 'link' => $SITE['pcLink'], 'alt' => $SITE['pcTxt']);
   }
   if ($SITE['providerShow']) {
       $display = true;
       $sideArrHwSw['provider'] = array('name' => langtransstr('Provider'), 'icon' => $SITE['providerJpg'], 'link' => $SITE['providerLink'], 'alt' => $SITE['providerTxt']);
   }
   $count = count($sideArrHwSw);
   if ($display == true && $count > 0) {
       echo '<div class="blockDiv" style="margin: 5px 5px 0px 5px;">' . PHP_EOL;
       $width = round(100 / $count);
       $styleTd = 'style="width: ' . $width . '%;"';
       $string1 = '';
       // the names of the items displayed
       $string2 = '';
       // the immages
       foreach ($sideArrHwSw as $key => $arr) {
           $string1 .= '<td ' . $styleTd . '><p>' . $arr['name'] . '<br />' . $arr['alt'] . '</p></td>' . PHP_EOL;
           $string2 .= '<td ' . $styleTd . '><p>
 <a href="' . $arr['link'] . '" target="_blank">';
           if ($doIcons == 'yes') {
Beispiel #3
0
    $SITE['wsModules'][$pageFile] = 'this file loaded instead of ' . $pageName;
}
ws_message('<!-- module ' . $pageFile . ' ==== ' . $SITE['wsModules'][$pageFile] . ' -->');
#-------------------------------------------------------------------------------
# Settings:
#
$frameHeight = '1600px';
#
#-------------------------------------------------------------------------------------------------
$wnCode = $SITE['mesoID'];
//  Here the code of your Weather Network is inserted
$wnName = $SITE['mesoName'];
// and here the name of your Weahter Network
$wnScript = '../' . $SITE['mesoID'] . '-mesomap/' . $SITE['mesoID'] . '-mesomap-testpage.php';
#
if (file_exists($wnScript)) {
    $script_ok = true;
} else {
    $script_ok = false;
}
#
echo '<div class="blockDiv">' . PHP_EOL;
echo '<h3 class="blockHead">' . langtransstr($wnName) . '</h3>' . PHP_EOL;
if ($script_ok) {
    echo '<iframe src="' . $wnScript . '" style ="width:100%; height: ' . $frameHeight . ';"></iframe>' . PHP_EOL;
} else {
    echo '<h3 style="text-align: center;">Script not found: ' . $wnScript . '</h3>' . PHP_EOL;
}
echo '</div>' . PHP_EOL;
# ----------------------  version history
# 3.20 2015-08-26 release 2.8 version
Beispiel #4
0
}
if (isset($SITE['pages']['wsWuGraphs'])) {
    $graphbtn = $SITE['pages']['wsWuGraphs'];
    $graphbtntxt = langtransstr("Graphs for Last 48 hrs");
}
if (isset($SITE['pages']['trends'])) {
    $hilowbtn = $SITE['pages']['trends'];
    $hilowbtntxt = langtransstr('Trends - Records');
}
if (isset($SITE['pages']['historyv3'])) {
    $alarmbtn = $timebtn = $SITE['pages']['historyv3'];
    $alarmbtntxt = $timebtntxt = langtransstr('Annual Data');
}
$donebtn = './index.php';
// done button
$donebtntxt = langtransstr("Return to Homepage");
############################################################################
$fcsticon = c_get_fcsticon($vpforecast_en);
$moonage = $ws['lunarAge'];
$latitude = $SITE['latitude'];
$moonic = c_get_moon($moonage, $latitude);
$console_credit = '
Based on script by <a target="_blank" href="http://www.axelvold.net">Axelvold\'s weather &amp; Photo</a> and <a target="_blank" href="http://www.stenestad-vader.com/">Stenestads Vader</a><br />
Modification by  <a target="_blank" href="http://www.nordicweather.net/">Weatherstation Pertteli</a> and <a target="_blank" href="http://www.lokaltvader.se/">Saro/Budskars Vader</a><br />
Graphics, icons and code revised by <a target="_blank" href="http://silveracorn.co.nz/weather/">Silver Acorn Weather</a><span style="font-size:7px; color:gray">&nbsp;v2.3.0</span><br /><br />
Adapted for this template by<br /><a target="_blank" href="http://leuven-template.eu"> Leuven Template - Wim van der Kuil</a>
';
// END Settings
$page_title = 'My console';
#
?>
Beispiel #5
0
$links['software'][] = 'http://www.afterten.com/products/weathertracker/     |MAC Win        |Weather tracker                |http://www.afterten.com/support/ ';
#$links['software'][]    = 'xx    |en     |xx    |xx ';
$links['scripts'][] = 'http://leuven-template.eu/?lang=en            ||Leuven-template       |';
$links['scripts'][] = 'http://saratoga-weather.org/scripts.php       ||Saratoga-Weather.org  |';
$links['scripts'][] = 'http://www.carterlake.org/weatherphp.php      ||Carterlake.org        |';
$links['scripts'][] = 'http://www.jcweather.us/scripts.php           ||Jcweather.us          |';
$links['scripts'][] = 'http://www.642weather.com/weather/scripts.php ||Long Beach Weather    |';
$links['scripts'][] = 'http://www.tnetweather.com/scripts.php        ||TNETWeather.com       |';
#$links['scripts'][]    = 'xx    ||xx    |';
#
#-----------------------------------------------------------------------
$text_website = langtransstr('Website');
$text_forum = langtransstr('Forum');
echo '<div class="blockDiv" style="text-align: center;">' . PHP_EOL;
foreach ($chapters as $key => $description) {
    echo '<h3 class="blockHead">' . langtransstr($chapters[$key]) . '</h3>
<br />' . PHP_EOL;
    foreach ($links[$key] as $key2 => $info) {
        if (trim($info == '')) {
            continue;
        }
        list($url, $language, $description, $forum) = explode('|', $info . '||');
        echo '' . trim($description) . '&nbsp;&nbsp;';
        if (trim($language) != '') {
            echo '(' . trim($language) . ')&nbsp;&nbsp;' . PHP_EOL;
        }
        if (trim($url) != '') {
            echo '<a href="' . trim($url) . '"   title="' . trim($description) . '" target="_blank">' . $text_website . '</a>&nbsp;&nbsp;' . PHP_EOL;
        }
        if (trim($forum) != '') {
            echo '<a href="' . trim($forum) . '" title="' . $text_forum . '" target="_blank">' . $text_forum . '</a>' . PHP_EOL;
Beispiel #6
0
echo langtransstr('inside');
?>
</label>
	</td>
	<td>
		<div id="tip_4">
			<canvas id="canvas_hum" ></canvas>
		</div>
		<input id="rad_hum1" type="radio" name="rad_hum" value="out" checked onclick="doHum(this);">
		<label id="lab_hum1" for="rad_hum1"><?php 
echo langtransstr('outside');
?>
</label>
		<input id="rad_hum2" type="radio" name="rad_hum" value="in" onclick="doHum(this);">
		<label id="lab_hum2" for="rad_hum2"><?php 
echo langtransstr('inside');
?>
</label>
	</td>
	<td>
		<div id="tip_5" >
			<canvas id="canvas_baro" ></canvas>
		</div>
	</td>
<?php 
if ($count == 0) {
    # only 6 dials to display
    echo '</tr>
<tr>' . PHP_EOL;
}
?>
Beispiel #7
0
    $height = '1000px';
    $color = 'white';
} elseif ($s == 'awekas') {
    $width = '640px';
    $height = '700px';
    $color = 'transparent';
} elseif ($s == 'pws') {
    $width = '900px';
    $height = '1200px';
    $color = 'white';
} elseif ($s == 'wow') {
    $width = '960px';
    $height = '2200px';
    $color = 'white';
} else {
    $width = '100%';
    $height = '2200px';
    $color = 'transparent';
}
echo '<div class="blockDiv" style="background-color: ' . $color . ';">' . PHP_EOL;
echo '<h3 class="blockHead">' . langtransstr('Our weatherinformation as shown on') . ' ' . $arrPartners[$s]['name'] . '&nbsp;&nbsp;
<a href="' . $arrPartners[$s]['webLink'] . '" target="_blank">
<img src="./img/submit.png" style="margin: 1px; vertical-align: middle; width: 15px;" alt="link to ' . $arrPartners[$s]['name'] . '" title="link to ' . $arrPartners[$s]['name'] . '">
</a>
</h3>
<div style="text-align: center;">
<iframe src="' . $arrPartners[$s]['frame'] . '" name="targetFrame" style="width: ' . $width . '; margin: 0 auto; height: ' . $height . ';  border:0; vertical-align: bottom;">
Your browser cannot display iframes and or no support for Flash
</iframe>
</div>
</div>';
Beispiel #8
0
#
# 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
############################################################################
#	This document uses Tab 4 Settings
############################################################################
require_once "Settings.php";
require_once "common.php";
############################################################################
$TITLE = langtransstr($SITE['organ']) . " - " . langtransstr('NWS Alerts Details');
$showGizmo = true;
// set to false to exclude the gizmo
include "top.php";
############################################################################
?>
<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false&amp;libraries=weather"></script>
<script type="text/javascript" src="nws-alertmap.js"></script>
</head>
<body>
<?php 
############################################################################
include "header.php";
############################################################################
include "menubar.php";
############################################################################
Beispiel #9
0
                            $result .= "&#{$unicode};";
                            $i += 3;
                        }
                    }
                }
            }
        }
    }
    return $result;
}
$hourTab = '<li><a href="./wxwugraphs/WUG-tabsh.php?lang=' . $scLang . '"><span>' . utf8tohtml($Thourly) . '</span></a></li>';
$hrTab = $hGraphs ? $hourTab : '';
echo '
<div class="blockDiv">

<h3 class="blockHead">' . langtransstr('Weather Underground History page Graphs') . '</h3>
<br />
  <table id="WUG-tabbed" style="width:100%;">
    <tr><td style="vertical-align:top;"> 
    <noscript>
    <div style="color:red; text-align:center;"><b>' . $Tnojs . '</b></div>
    </noscript>
       
    <div id="WU-MDswitch" style="position:relative;">
';
if ($langSwitch) {
    $thLang = $_GET['lang'] ? $_GET['lang'] : $_COOKIE['cookie_lang'];
    echo '<div id="lang-switch" style="text-align: right; /*margin-top: 0px; float: right*/ position:absolute; right:0; top:0px;">
  <form name="languages" action="#" style="font-size: 14px;">
  Language: <select name="langSelect" onchange="location.href=\'' . $_SERVER["PHP_SELF"] . '?lang=\'+document.languages.langSelect.value;">';
    include './wxwugraphs/languages/langlist.php';
$image_width = '240';
// 240 is the normal width in pixels
#
$pageTitle = langtransstr('Precipitation radars');
$link_text = langtransstr('more information');
$title_text = langtransstr('Click image to enlarge');
#
#-----------------------------------------------------------------------
#                               EC radar --- regional
#-----------------------------------------------------------------------
$descGC_region = langtransstr('National radar');
$imgGC_region = 'http://weather.gc.ca/data/radar/detailed/temp_image/COMPOSITE_NAT/COMPOSITE_NAT_PRECIP_RAIN_' . $utc_date . '.GIF';
#-----------------------------------------------------------------------
#                              radar --- station 1
#-----------------------------------------------------------------------
$descGC_station = langtransstr('Radar station') . ' ' . $SITE['radarStation'];
$imgGC_station = 'http://weather.gc.ca/data/radar/detailed/temp_image/' . $SITE['radarStation'] . '/' . $SITE['radarStation'] . '_PRECIP_RAIN_' . $utc_date . '.GIF';
#-----------------------------------------------------------------------
# I realy mean it, no settings below this point
# Only change below if you realy know what you are doing.
# If in doubt, use a forum or the support site at http://leuven-template.eu/index.php
$link_to_page = $SITE['pages']['wsPrecipRadar'] . '&amp;lang=' . $lang . $extraP . $skiptopText;
$image_width = 1.0 * $image_width;
if ($image_width > 320 || $image_width < 100) {
    $image_width = '240';
}
$image_style = 'width: ' . $image_width . 'px; margin: 4px auto;  border: none; vertical-align: bottom;';
#
echo '<div class="blockDiv"><!-- rain_radar_canada_small -->
<table class="genericTable">
<tbody>
Beispiel #11
0
<td style="">' . sprintf("%01.1f", $ws['soilTempMaxMonth'][$i]) . '</td>
<td style = "border-right: 1px solid grey;">' . string_date($ws['soilTempMaxMonthTime'][$i], $SITE['dateMDFormat']) . '</td>';
    echo '
<td>' . string_date($ws['soilTempMinYearTime'][$i], $SITE['dateMDFormat']) . '</td>
<td style="">' . sprintf("%01.1f", $ws['soilTempMinYear'][$i]) . '</td>
<td style="">' . sprintf("%01.1f", $ws['soilTempMaxYear'][$i]) . '</td>
<td style = "border-right: 1px solid grey;">' . string_date($ws['soilTempMaxYearTime'][$i], $SITE['dateMDFormat']) . '</td>';
    echo '
<td>' . string_date($ws['soilTempMinAllTime'][$i], $SITE['dateOnlyFormat']) . '</td>
<td style="">' . sprintf("%01.1f", $ws['soilTempMinAll'][$i]) . '</td>
<td style="">' . sprintf("%01.1f", $ws['soilTempMaxAll'][$i]) . '</td>
<td>' . string_date($ws['soilTempMaxAllTime'][$i], $SITE['dateOnlyFormat']) . '</td>';
    echo '</tr>';
}
if (isset($ws['moistMinYearTime'])) {
    echo '<tr style="height: 15px;"><td class="blockHead"> </td><td colspan="13" class="blockHead">' . langtransstr('Soil Moisture') . '</td></tr>' . PHP_EOL;
    echo '<!-- loop for ' . $SITE['soilCount'] . ' sensors -->' . PHP_EOL;
    // sprintf("%01.1f", $money)
    for ($i = 1; $i <= $SITE['soilCount']; $i++) {
        echo '<tr>
<td style = "border-right: 1px solid grey;">' . $SITE['soilDepth_' . $i] . '</td>
<td>' . string_date($ws['moistMinMonthTime'][$i], $SITE['dateMDFormat']) . '</td>
<td style="">' . sprintf("%01.1f", $ws['moistMinMonth'][$i]) . '</td>
<td style="">' . sprintf("%01.1f", $ws['moistMaxMonth'][$i]) . '</td>
<td style = "border-right: 1px solid grey;">' . string_date($ws['moistMaxMonthTime'][$i], $SITE['dateMDFormat']) . '</td>';
        echo '
<td>' . string_date($ws['moistMinYearTime'][$i], $SITE['dateMDFormat']) . '</td>
<td style="">' . sprintf("%01.1f", $ws['moistMinYear'][$i]) . '</td>
<td style="">' . sprintf("%01.1f", $ws['moistMaxYear'][$i]) . '</td>
<td style = "border-right: 1px solid grey;">' . string_date($ws['moistMaxYearTime'][$i], $SITE['dateMDFormat']) . '</td>';
        echo '
Beispiel #12
0
ws_message('<!-- module wsDashYrno.php (' . __LINE__ . '): loading ' . $script . ' -->');
if (!(include $script)) {
    return;
}
$styleborder = '';
$margin = ' margin: 10px 0px;';
$topWidth = ' width: ' . $defaultWidth . ';';
if ($chartsMeteogramHeight != '') {
    $chartsMeteogramHeight = 'height: ' . $chartsMeteogramHeight . ';';
}
if ($tableHeight != '') {
    $tableHeight = 'height: ' . $tableHeight . ';';
}
echo '<!-- output of wsDashYrno -->
<div class="blockDiv" style="">' . PHP_EOL;
echo '<div class="blockHead" >' . langtransstr('Weather Forecast') . ' (' . langtransstr('summary') . ')&nbsp;&nbsp;';
if ($fullpage_link != '') {
    $yrnoLink = $SITE['pages'][$yrno_page] . '&amp;lang=' . $lang . $extraP . $skiptopText;
    // pagenumber for full forecast page
    echo '<a href="' . $yrnoLink . '"><img src="./img/submit.png" style="margin:1px; vertical-align: middle;" alt="more information" title="more information"></a>';
}
echo '
</div>' . PHP_EOL;
#
if ($end_forecast == 0) {
    $times = true;
}
// errors retrieving forecast data
#
if ($yrno_times) {
    $style = 'class="blockHead" style="" ';
Beispiel #13
0
# 3.10 2015-06-21 release verion / removed url error
# -------------------------------------------------------------------------------------------------
if (!isset($skiptopText)) {
    $skiptopText = '';
}
if (!isset($SITE['pages']['gaugePage'])) {
    $link = '';
} else {
    $link = '<a href="' . $SITE['pages']['gaugePage'] . '&amp;lang=' . $lang . $lang . $skiptopText . '">
<img src="./img/submit.png" style="margin:1px; vertical-align: middle;" alt="more information" title="more information"></a>';
}
?>
<!-- steelseries start -->
<div class="blockDiv">
<h1 class="blockHead"><?php 
echo langtransstr('Live Weather Data') . ' ' . $link;
?>
</h1>
<table class="gaugeTable" style="width: 100%; padding 3px;">
<tr>
	<td>
		<div id="tip_0">
		  <canvas id="canvas_temp" ></canvas>
		</div>
	</td>
	<td>
		<div id="tip_4">
			<canvas id="canvas_hum" ></canvas>
		</div>
	</td>
	<td>
Beispiel #14
0
    $link = '<a href="' . $SITE['pages']['incWdlive'] . '&amp;lang=' . $lang . '">
<img src="./img/submit.png" style="margin:1px; vertical-align: middle;" alt="more information" title="more information"></a>';
} else {
    $wdlHeight = '540px';
    $wdlWidth = '810px';
    $link = '';
}
$this_folder = './wdl/';
$this_config = $SITE['siteUrl'] . $SITE['clientrawDir'] . 'wdl-' . $lang . '-config.xml';
$default_config = $SITE['siteUrl'] . $SITE['clientrawDir'] . 'wdl-en-config.xml';
if (!file_exists($SITE['clientrawDir'] . 'wdl-' . $lang . '-config.xml')) {
    $this_config = $default_config;
}
#
$this_url = $this_folder . 'wdlv6_09.swf' . '?' . $this_config;
$head_text = langtransstr('Live Data') . ' ' . langtransstr('by WD live') . ' ' . $link;
?>
<!-- WD Live  -->
<div class="blockDiv">
<h3 class="blockHead"><?php 
echo $head_text;
?>
</h3>
  <div style = "width: <?php 
echo $wdlWidth;
?>
; padding: 5px; margin: 0px auto;">
	<div id="wdlwidget" >
<?php 
if (!isset($flash_replaced) && !isset($conflictSteel)) {
    $flash_replaced = true;
Beispiel #15
0
}
$form .= '  <input type="hidden" style="padding: 0px; border: 0px; margin: 0px" name="p" value="' . $p . '">
  <input type="submit" id="flight_simple" name="flight_simple" value="Normal view" ' . $style . '>' . PHP_EOL;
if ($page == 'normal') {
    $style = $style_selected;
} else {
    $style = $style_other;
}
$form .= '  <input type="submit" id="flight_normal" name="flight_normal" value="complex view" ' . $style . '>
</form>' . PHP_EOL;
$page_title = langtransstr('Flight radar');
if ($page == 'normal') {
    $frame_link = 'http://www.flightradar24.com/' . $SITE['latitude'] . ',' . $SITE['longitude'] . '/7';
} else {
    $frame_link = 'http://www.flightradar24.com/simple_index.php?lat=' . $SITE['latitude'] . '&amp;lon=' . $SITE['longitude'] . '&amp;z=6';
}
#
$link1 = 'http://www.flightradar24.com/';
$credit = langtransstr('Map created by') . ' Flightradar24.com <a href="' . $link1 . '" target="_blank"><img src="./img/submit.png" 
style="margin: 1px; vertical-align: bottom;" alt="more information" title="more information"></a>';
#
echo '<!-- flight radar -->
<div class="blockDiv">
<h3 class="blockHead">' . $page_title . '</h3>
<div class="blockHead">' . $form . '</div>
<iframe src="' . $frame_link . '" style="border: none; width: 100%; height: 800px; margin: 0px; padding: 0px; vertical-align: bottom;"></iframe>
<h3 class="blockHead" style="padding: 4px;">' . $credit . '</h3>
</div>
<!-- end of flightradar script -->' . PHP_EOL;
# ----------------------  version history
# 3.20 2015-07-29 release 2.8 version
	<span class="ajax" id="ajaxuvmaxtime"><?php 
        echo $vars['ajaxuvmaxtime'];
        ?>
</span>
	</p>
<?php 
    }
}
?>
	</div>	<!-- col-UV -->
	<hr style="border: 0px; clear: right;"/>  <!-- just reallign cols -->
<?php 
if ($gizmo && isset($SITE['ajaxGizmoShow']) && $SITE['ajaxGizmoShow'] && $SITE['header'] == '3') {
    echo '	
<div style="width: 100%; text-align: right;"><hr />
<small>
<span class="ajax" id="gizmoindicator">' . $vars['ajaxindicator'] . '</span>:&nbsp;
<span class="ajax" id="gizmodate">' . $vars['ajaxdate'] . '</span>&nbsp; 
<span class="ajax" id="gizmotime">' . $vars['ajaxtime'] . '</span>
<span id="ajaxcounter"></span>
&nbsp;' . langtransstr('seconds ago') . '&nbsp;
</small>
</div>
' . PHP_EOL;
}
?>
</div>
<!--  end of dashboard -->
<?php 
# ----------------------  version history
# 3.20 2015-09-29 release 2.8 version
Beispiel #17
0
# generate the td's to output later.
$max_cities = 1;
foreach ($my_metars as $key => $arr) {
    $line1 .= '<th class="blockHead" style="width:' . $width . '; "><small>' . $my_metars[$key]['name'] . '</small> ';
    if ($link_forecast != false) {
        $line1 .= '
<a href="' . $link_forecast . '&amp;lang=' . $lang . '&amp;city=' . $my_metars[$key]['key'] . $skiptopText . '">
<span style="float: right;"><img src="./img/submit.png" style="margin:1px; vertical-align: middle;" alt="more information" title="more information">&nbsp;</span></a> ';
    }
    $line1 .= '</th>' . PHP_EOL;
    $line2 .= '<td style="text-align: center;">' . ws_commontemp_color($my_metars[$key]['temp']) . '&nbsp;&nbsp;<img src="./' . $my_metars[$key]['iconurl'] . '" alt=" " style="width: 28px; vertical-align: bottom;"/></td>' . PHP_EOL;
    $line3 .= '<td style="text-align: center;">' . $my_metars[$key]['desc'] . '</td>' . PHP_EOL;
    $max_cities++;
    if ($max_cities > $number_cities) {
        break;
    }
}
# echo all data now
echo '<!-- dash_metar.php -->
<div class="blockDiv">
<h3 class="blockHead">', langtransstr('The weather in interesting cities nearby') . '</h3>' . PHP_EOL;
ws_message('<!-- module dash_metar.php (' . __LINE__ . '): loaded ' . $number_cities . ' ccn using METAR in ' . $seconds_metar . ' seconds -->', true);
echo '<table class="" style="width: 100%;">
<tr>' . PHP_EOL . $line2 . '</tr>
<tr style="">' . PHP_EOL . $line3 . '</tr>
<tr style="height: 16px;">' . PHP_EOL . $line1 . '</tr>
</table>
</div>
<!-- end of dash_metar.php -->' . PHP_EOL;
# ----------------------  version history
# 3.20 2015-08-26 release 2.8 version
Beispiel #18
0
    $SITE['wrnRain'] = true;
    if ($ecForecast['warnings']['raintype'] == 'RAIN') {
        $wrnSide = 'Rain';
    } else {
        $wrnSide = 'Snow/Ice';
    }
}
if (isset($ecForecast['warnings']['warnthunder'])) {
    $SITE['wrnLightning'] = true;
}
#
for ($i = 0; $i < count($ecForecast['warnings']['event']); $i++) {
    $arr = $ecForecast['warnings']['event'][$i];
    $severity = $arr['type'];
    $level = $arr['priority'];
    $description = $arr['description'];
    $keyColor = $validWarningTypes[$severity];
    $color = $validWarningcolors[$keyColor];
    $wrnStrings .= '<tr class="wrn' . $color . '">
	<td>' . langtransstr($severity) . '</td>
	<td>' . langtransstr($level) . ' ' . langtransstr('priority') . '</td>
	<td>' . $description . '</td>
	' . $first . '
	</tr>' . PHP_EOL;
    $first = '';
}
// eo for loop every warning
$wrnStrings .= '</table></div>' . PHP_EOL;
$wrnStrings .= '<!-- end warnings -->' . PHP_EOL;
# ----------------------  version history
# 3.20 2015-07-26 release 2.8 version
Beispiel #19
0
$ws['tempActInside'] = wsConvertTemperature($wx['tempActInside'], $from_temp);
$ws['tempActExtra1'] = wsConvertTemperature($wx['tempActExtra1'], $from_temp);
$ws['tempActExtra2'] = wsConvertTemperature($wx['tempActExtra2'], $from_temp);
$ws['tempToday'] = $ws['tempAct'];
if (isset($wx['fromhudx'])) {
    $from = $wx['fromhudx'];
} else {
    $from = $from_temp;
}
$ws['hudxAct'] = wsConvertTemperature($wx['hudxAct'], $from_temp);
# ------------------------------------------ pressure / baro -----------
$from_baro = trim(strtolower($wx['frombaro']));
// ' hPa', of ' mb', of ' inHg'
$ws['baroAct'] = wsConvertBaro($wx['baroAct'], $from_baro);
$ws['baroDelta'] = wsConvertBaro($wx['baroDelta'], $from_baro);
$ws['baroTrend'] = langtransstr($wx['baroTrend']);
$ws['baroMinToday'] = wsConvertBaro($wx['baroMinToday'], $from_baro);
$ws['baroMinTodayTime'] = wdDate($wx['baroMinTodayTime']);
$ws['baroMinYday'] = wsConvertBaro($wx['baroMinYday'], $from_baro);
$ws['baroMinYdayTime'] = wdDate($wx['baroMinYdayTime']);
$ws['baroMinMonth'] = wsConvertBaro($wx['baroMinMonth'], $from_baro);
$ws['baroMinMonthTime'] = wd_ymd($wx['baroMinMonthTime']);
$ws['baroMinYear'] = wsConvertBaro($wx['baroMinYear'], $from_baro);
$ws['baroMinYearTime'] = wd_ymd($wx['baroMinYearTime']);
$ws['baroMinAll'] = wsConvertBaro($wx['baroMinAll'], $from_baro);
$ws['baroMinAllTime'] = wd_ymd($wx['baroMinAllTime']);
$ws['baroMaxToday'] = wsConvertBaro($wx['baroMaxToday'], $from_baro);
$ws['baroMaxTodayTime'] = wdDate($wx['baroMaxTodayTime']);
$ws['baroMaxYday'] = wsConvertBaro($wx['baroMaxYday'], $from_baro);
$ws['baroMaxYdayTime'] = wdDate($wx['baroMaxYdayTime']);
$ws['baroMaxMonth'] = wsConvertBaro($wx['baroMaxMonth'], $from_baro);
Beispiel #20
0
$script = 'ec_fct_generate_html.php';
ws_message('<!-- module ec_print_fct.php (' . __LINE__ . '): loading ' . $script . ' -->');
$return = (include $script);
if ($return == false) {
    ws_message('<br />Module ec_print_fct.php (' . __LINE__ . '): No good data - ending script');
    return;
}
#
echo '<div class="blockDiv">' . PHP_EOL;
echo '<div class="blockHead" style="">';
if ($end_areas > 1) {
    echo '<div class="blockHead">
<table class="genericTable"><tr><td style="text-align: left;">
<form action="" method="get">
<fieldset style="border: 0px;">
<legend>' . langtransstr('Choose another area here') . '</legend>                
<select name="ec-city">';
    for ($n = 0; $n < $end_areas; $n++) {
        if ($n == $default) {
            $extra = 'selected="selected"';
        } else {
            $extra = '';
        }
        echo '<option value="' . $n . '" ' . $extra . '>' . $select_list[$n] . '</option>' . "\n";
    }
    echo '</select>
<input type="hidden" style="padding: 0px; border: 0px; margin: 0px" name="p" value="' . $p . '">
<input type="hidden" style="padding: 0px; border: 0px; margin: 0px" name="lang" value="' . $lang . '">' . PHP_EOL;
    if ($SITE['ipad']) {
        echo '<input type="hidden" style="padding: 0px; border: 0px; margin: 0px" name="ipad" value ="y"/>' . PHP_EOL;
    }
Beispiel #21
0
#echo "<pre>$areas[$default] \n latitude = $myLatitude -longitude= $myLongitude -default= $default - area = $myArea".'<br /></pre>';
# --------------- END OF SETTINGS ----------------------------------------
$script = $myfolder . 'wuforecast3.php';
ws_message('<!-- module wu_fct_page.php (' . __LINE__ . '): loading ' . $script . ' -->');
if (!(include $script)) {
    return;
}
#
echo '<div class="blockDiv">' . PHP_EOL;
#-----------------------------------------------------------------------
if ($end_areas > 1) {
    $multi_link = $SITE['pages']['wu_fct_page'] . '&amp;lang=' . $lang . $extraP . $skiptopText;
    echo '<div class="blockHead">
<table class="genericTable"><tr><td style="text-align: left;">
<form action="' . $multi_link . '" method="get">
<fieldset style="border: 0px;">' . langtransstr('Choose another city here') . ':                
<select name="city">';
    for ($n = 0; $n < $end_areas; $n++) {
        if ($n == $default) {
            $extra = 'selected="selected"';
        } else {
            $extra = '';
        }
        echo '<option value="' . $n . '" ' . $extra . '>' . $select_list[$n] . '</option>' . "\n";
    }
    echo '</select>
<input type="hidden" style="padding: 0px; border: 0px; margin: 0px" name="p" value="' . $p . '">
<input type="hidden" style="padding: 0px; border: 0px; margin: 0px" name="lang" value="' . $lang . '">' . PHP_EOL;
    if ($SITE['ipad']) {
        echo '<input type="hidden" style="padding: 0px; border: 0px; margin: 0px" name="ipad" value ="y"/>' . PHP_EOL;
    }
Beispiel #22
0
if (isset($wxsimTabHeight)) {
    $styleHeight = 'height:' . $wxsimTabHeight . ';';
} else {
    $styleHeight = '';
}
if ($displayTabs) {
    echo '<div class="tabber"  style="width: 100%;">' . PHP_EOL;
    if ($graphsDisplay && !$graphsSeparate) {
        // are the graphs separate on the page or are they in a tab  (=false)
        echo '<div class="tabbertab" style="overflow: hidden;"><h2>' . langtransstr('Graphs') . '</h2>' . PHP_EOL;
        echo '<br /><div style="width: ' . $width_graphs_x . '">';
        echo $stringGraphDivs;
        echo '</div>' . PHP_EOL;
        echo '</div>' . PHP_EOL;
    }
    echo '<div class="tabbertab" style="' . $styleHeight . '"><h2>' . langtransstr('Overview') . '</h2>' . PHP_EOL;
    echo $tablePlain;
    // plaintext.txt based information tab						// tooltips
    echo '</div>' . PHP_EOL;
    #
    for ($n = 0; $n < count($printTable); $n++) {
        // print all table strings
        echo '<div class="tabbertab" style="' . $styleHeight . '"><h2>' . $tableName[$n] . '</h2>' . PHP_EOL;
        echo $table[$n];
        echo '</div>' . PHP_EOL;
    }
    echo '</div>' . PHP_EOL;
}
if ($graphsDisplay) {
    echo $graphPart1;
    // javascripts with all  the graphs are shown in the divs outputted above
Beispiel #23
0
    exit;
}
$pageVersion = '3.00 2014-09-12';
$SITE['wsModules'][$pageName] = 'version: ' . $pageVersion;
$pageFile = basename(__FILE__);
// check to see this is the real script
if ($pageFile != $pageName) {
    $SITE['wsModules'][$pageFile] = 'this file loaded instead of ' . $pageName;
}
echo '<!-- module ' . $pageFile . ' ==== ' . $SITE['wsModules'][$pageFile] . " -->" . PHP_EOL;
#--------------------------------------------------------------------------------------------------
# 3.00 2014-09-12 release version
# -------------------------------------------------------------------------------------------------
#
$headText = langtransstr('Pages visited');
$extraText1 = langtransstr('You can sort the table on the values in the columns by clicking in the corresponding heading');
# get file into array
$file = $SITE['cacheDir'] . 'pagesVisited.txt';
if (!file_exists($file)) {
    echo '<h3> no data found</h3>';
    return;
}
$filestring = file_get_contents($file);
echo '<!--  visited pages (' . $file . ') loaded -->' . PHP_EOL;
$arrVisits = unserialize($filestring);
#  sort array on pagecode/nr
ksort($arrVisits);
foreach ($arrVisits as $key => $count) {
    if ($key == '') {
        continue;
    }
function ecLongDate($time)
{
    global $dateLongFormat;
    #
    $longDays = array("Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday");
    $longMonths = array("January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December");
    #
    $longDate = date($dateLongFormat, $time);
    $from = array();
    $to = array();
    for ($i = 0; $i < count($longDays); $i++) {
        if (ecfound($longDate, $longDays[$i])) {
            $from[] = $longDays[$i];
            $to[] = langtransstr($longDays[$i]);
            break;
        }
    }
    for ($i = 0; $i < count($longMonths); $i++) {
        if (ecfound($longDate, $longMonths[$i])) {
            $from[] = $longMonths[$i];
            $to[] = langtransstr($longMonths[$i]);
            break;
        }
    }
    $longDate = str_replace($from, $to, $longDate);
    return $longDate;
}
$linkYrno = 'http://www.yr.no/kart/#lat=' . $SITE['latitude'] . '&amp;lon=' . $SITE['longitude'] . '&amp;zoom=4&amp;laga=nedb%C3%B8r&amp;baseid=PunktUtlandet%3A2187922&amp;proj=900913';
$descYrno = langtransstr('Yrno radar');
// only displayed (on the tab) if there is more then 1 radar
#
#-----------------------------------------------------------------------
#                               other radar
#-----------------------------------------------------------------------
# just some code to jump-start with other radar stations
#
$OtherAvailable = false;
$imgOther = 'http:// we have no other radars yet';
#$linkOther              = '';                                         // if no link remove comment mark
$descrOther = langtransstr('Another radar description');
$linkOther = 'http:// link to main site for radar';
// if we have a link to the other radar
$linkOtherText = langtransstr('Click on image for the radar site with a lot of extra information');
# ---------------------- genreal settings all radars  ------------------
#
$imgStyle = 'style="width: 100%; vertical-align: bottom;"';
#
$tabsWanted = true;
// ONLY if we have more then 1 radar, do we want to put them in tabs - default is yes, who wants otherwise?
#
#------------------------  end of Settings   ---------------------------
#-----------------------------------------------------------------------
# I  mean it, no settings below this point
# Only change below if you realy know what you are doing.
# If in doubt, use a forum or the support site at http://leuven-template.eu/index.php
#
$count = 0;
// number of radars for this region
Beispiel #26
0
function check_range($value, $range)
{
    global $error_text, $region;
    #
    $value = trim($value);
    if (!is_numeric($value)) {
        $error_text .= langtransstr('numeric values only');
        return false;
    }
    if (trim($range) == '') {
        return true;
    }
    $arr = explode('!', $range . '!');
    for ($n = 0; $n < count($arr); $n++) {
        $string = trim($arr[$n]);
        if ($string == '') {
            continue;
        }
        list($lowest, $highest, $region_check) = explode('#', $string . '#');
        $region_check = trim($region_check);
        if ($region_check == '' || $region_check == $region) {
            break;
        }
    }
    $lowest = trim($lowest);
    $highest = trim($highest);
    if (!is_numeric($lowest) || !is_numeric($highest)) {
        echo '<h3> invalid settings for field check range: ' . $range . '  </h3>';
        exit;
    }
    if ($value < $lowest || $value > $highest) {
        $error_text .= langtransstr('value range allowed') . ' ' . $lowest . '&gt;= <i style="color: red;">' . $value . '</i> =&lt;' . $highest;
        return false;
    }
    return true;
}
# these are the friendly websites we want to display in the side area om every page
#
# A website starts with:	$sideArrCoop[] 	= array (
#
# and ends with			);
#
# The fields to fill in are::
#
#	"show"	=>	true,	// if set to true the information for this website is shown, you can temporarily hide a site bu setting this to false
#	"name"	=>	"set to the name of the site",
#	"icon"	=>	"if you have a link to an icon of the site set it here",
#	"link"	=>	"this is the URL of the website",
#	"alt"	=>	"any normal text is OK to be typed here"
#
#
$headString = '<p>' . langtransstr('Visit our other weathersites') . ':</p>' . PHP_EOL;
// this is the text printed just above the group of webnsites
#$headString = "";	// if you do not weant extra text before the website links, remove the comment mark on the first position
#
$doIcons = false;
# true = icons will be displayed if "icon" not empty  |  false = no icons will be displayed
#
#	this is an example to use which will be displayd as it has "show" => true,
#
$sideArrCoop[] = array("show" => true, "name" => "Template documentation <br /> and downloads", "icon" => "", "link" => "http://leuven-template.eu/index.php?lang=" . $lang, "alt" => "Documentation for the template used");
#
#	this is another example adapt as you like
#
$sideArrCoop[] = array("show" => true, "name" => "And another site", "icon" => "", "link" => 'http://www.weerstation-leuven.be/', "alt" => "Website of another weatherstation");
#
#	and the following examples will NOT be displayed as "show" => false,
Beispiel #28
0
    $imgCloudsI = 'http://www.sat24.com/image2.ashx?region=eu&amp;ir=True';
    // http://www.sat24.com/image2.ashx?region=eu&ir=True
    $imgAlt = langtransstr('Cloudradar') . ' Benelux';
    $strExtra = langtransstr('Click on image for the sat24.com site with a lot of extra information');
} else {
    $strHead = langtransstr('Cloud Radar by') . ' NOAA';
    $urlLink = 'http://www.goes.noaa.gov/nhemi.html';
    $imgClouds = 'http://www.ssd.noaa.gov/goes/comp/nhem/vis-animated.gif?time=' . time();
    // http://www.ssd.noaa.gov/goes/comp/nhem/
    $imgCloudsI = 'http://www.ssd.noaa.gov/goes/comp/nhem/rb-animated.gif?time=' . time();
    // http://www.ssd.noaa.gov/goes/comp/nhem/
    $imgAlt = langtransstr('Cloudradar');
    $strExtra = langtransstr('Click on image for the NOAA Geostationary Satellite Server site with a lot of extra information');
}
$buttonVis = langtransstr('Visible');
$buttonIR = langtransstr('Infrared');
$showVis = $showIR = false;
if (isset($_REQUEST['IR'])) {
    $showIR = true;
} else {
    $showVis = true;
}
# now we display the selected radar image
#
echo '<div class="blockDiv" style="background-color: grey; border: 1px solid grey;">
<div class="blockHead">
 <h3 class="blockHead">' . $strHead . ' - ' . $strExtra . '</h3>
 <div style="width: 320px; margin: 0 auto;">
  <form method="post" name="menu_select" action="index.php?p=42">
   <button id="vis"  name = "vis"  style="width: 100px;">' . $buttonVis . '</button>
   <button id="IR"   name = "IR"   style="width: 100px;">' . $buttonIR . '</button>
Beispiel #29
0
    $link = '';
}
if ($SITE['region'] == 'europe') {
    $units = 'metric';
} elseif ($SITE['region'] == 'america') {
    $units = 'imperial';
} else {
    $units = 'both';
}
#
$myUrl = "http://www.wunderground.com/swf/Rapid_Fire.swf?units=" . $units . "&station=" . $SITE['wuID'];
?>
<script type="text/javascript" src="javaScripts/swfobject.js"></script>
<div class="blockDiv" style="overflow:hidden; ">
<h3 class="blockHead"><?php 
echo langtransstr('Live Data') . ' ' . langtransstr('from Weather-Underground') . '. ' . $link;
?>
</h3>
<div style= "width: <?php 
echo $wulWidth;
?>
; padding: 5px; margin: 0px auto;">
  <div id="wulContent">
<?php 
if (!isset($flash_replaced) && !isset($conflictSteel)) {
    $flash_replaced = true;
    $script = 'gauges/gauge_no_flash.php';
    ws_message('<!-- module WU_Live.php (' . __LINE__ . '): loading ' . $script . ' -->');
    include $script;
    echo '</br />
<p style="text-align: center;"><small>No FLASH-support found in your browser.   Weather-Underground-live display is replaced with Steelseries</small></p>
<?php

if (!isset($SITE)) {
    header("Location: ../index.php");
    // back to index/startpage if someone tries an
    exit;
    //  page to load without our menu system
}
$pageName = 'wsnws-summary.php';
$pageVersion = '0.00 2014-04-20';
$SITE['wsModules'][$pageName] = 'version: ' . $pageVersion;
$pageFile = basename(__FILE__);
// check to see this is the real script
if ($pageFile != $pageName) {
    $SITE['wsModules'][$pageFile] = 'this file loaded instead of ' . $pageName;
}
echo '<!-- module ' . $pageFile . ' ==== ' . $SITE['wsModules'][$pageFile] . " -->" . PHP_EOL;
#---------------------------------------------------------------------------
#
#-------------------------------------------------------------------------------------------------
?>
<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false&amp;libraries=weather"></script>
<script type="text/javascript" src="usa/nws-alerts/nws-alertmap.js"></script>
<?php 
echo '
<div class="blockDiv">
<h3 class="blockHead">
' . langtransstr('nws warnings summary') . '</h3>
<br />' . PHP_EOL;
include 'nws-alerts-details-inc.php';
echo '</div>';