Esempio n. 1
0
<?php 
if ($ws['moonset'] == '0' || $ws['moonset'] == '') {
    $ws['moonset'] = langtransstr('&gt; 24:00');
}
echo $ws['moonset'];
?>
</small></span>
	</p>

	<p class="mTxt">
	<?php 
echo langtransstr(wsmoonWord($ws['lunarPhasePerc'], $ws['lunarAge']));
?>
,&nbsp;
	<?php 
echo wsNumber($ws['lunarPhasePerc'], 0) . '%&nbsp;' . langtransstr('Illuminated');
?>
	</p>
	</div> <!-- col-almanac -->
	<div class="colMiddle" >
	<h3 class="ajaxHead"><?php 
echo langtransstr("Humidity");
?>
 &amp; <?php 
echo langtransstr("Barometer");
?>
</h3>
	<p>
	<span class="lTxt"><?php 
echo langtransstr("Humidity") . ":";
?>
Esempio n. 2
0
    if ($WVHT != '-') {
        $found_wvht = true;
        $height = wsConvertDistance($WVHT, $uom_in['wave'], $Units['wave']);
        if (!isset($SITE['decHeight'])) {
            $SITE['decHeight'] = 1;
        }
        $WVHT = wsNumber($height, $SITE['decHeight']);
    }
    # visibillity
    if ($VIS != '-') {
        $found_vis = true;
        $height = wsConvertDistance($VIS, $uom_in['dist']);
        if (!isset($SITE['decDistance'])) {
            $SITE['decDistance'] = 1;
        }
        $VIS = wsNumber($height, $SITE['decDistance']);
    }
    # list ($ID, $LAT, $LON, $TIME, $ATMP, $WTMP, $WDIR , $WDSC, $WSPD, $GST, $PRES, $PTDY,  $WVHT,  $VIS)
    $seenBuoy[$ID] = $ID . '|' . $LAT . '|' . $LON . '|' . $TIME . '|' . $ATMP . '|' . $WTMP . '|' . $WDIR . '|' . $WDSC . '|' . $WSPD . '|' . $GST . '|' . $PRES . '|' . $PTDY . '|' . $WVHT . '|' . $VIS;
}
// end for loop
# echo '<pre> $found_wtmp='.$found_wtmp.'  $found_pdty='.$found_pdty.' $found_wvht='.$found_wvht.' $found_gust='.$found_gust.'  $found_vis= '.$found_vis.PHP_EOL;  print_r($seenBuoy); exit;
# ------------------------------------------------------------------------------
# now generate the data table by looking at our buoys
# ------------------------------------------------------------------------------
prt_tablehead();
foreach ($Buoys as $key => $buoy) {
    // loop over buoys in config file
    prt_tabledata($key);
}
// eo for each buoy
Esempio n. 3
0
<td>&nbsp;&nbsp;' . langtransstr('Yesterday') . '</td>
<td>' . wsNumber($ws['gustMaxYday'], $decWind) . $uomWind . ' ' . langtransstr('at') . ' ' . string_date($ws['gustMaxYdayTime'], $timeOnlyFormat) . '</td>' . $extra . '
</tr>';
}
// end $maxgustyest
$windLines++;
$string .= '
<tr class="row-light">
<td>&nbsp;&nbsp;' . langtransstr('Month') . '</td>
<td>' . wsNumber($ws['gustMaxMonth'], $decWind) . $uomWind . ' ' . langtransstr('on') . ' ' . string_date($ws['gustMaxMonthTime'], $dateOnlyFormat) . '</td>' . $extra . '
</tr>';
$windLines++;
$string .= '
<tr class="row-dark">
<td>&nbsp;&nbsp;' . langtransstr('Year') . '</td>
<td>' . wsNumber($ws['gustMaxYear'], $decWind) . $uomWind . ' ' . langtransstr('on') . ' ' . string_date($ws['gustMaxYearTime'], $dateOnlyFormat) . '</td>' . $extra . '
</tr>';
for ($i = $windLines; $i < 9; $i++) {
    $windLines++;
    $class = 'class="row-light"';
    $string .= '<tr><td colspan="2" ' . $class . '>&nbsp;</td>' . $extra . '</tr>' . PHP_EOL;
    if ($class == 'class="row-light"') {
        $class = 'class="row-dark"';
    } else {
        $class = 'class="row-light"';
    }
}
$cnt = (string) ($windLines + 2);
$string = str_replace('##', $cnt, $string);
echo $string . '
</table>
Esempio n. 4
0
</span>
	<span class="small" id="itempuom" style="top:164px; left: 265px;"><?php 
echo $uomTemp;
?>
</span>

	<!-- HUMIDITY INSIDE -->
	<span class="small"  style="top:150px; right:350px;"><?php 
echo $h_humi_in;
?>
</span>
	<span class="vajax"  id="cajaxihumidity" style="top: 170px; right: 355px;"><?php 
if (!isset($ws['humiInAct'])) {
    echo '--';
} else {
    echo wsNumber($ws['humiInAct'], $SITE['decTemp']);
}
?>
</span>
	<span class="small"  style="top:164px; right:342px;">%</span>

	<!-- FEELS TEMP -->
	<span class="small"  style="top:150px; right:265px;"><?php 
echo $h_feels_like;
?>
</span>
	<span class="vajax"  id="cajaxapp" style="top: 170px; right: 265px;"><?php 
echo $vars['ajaxfeelslikeNoU'];
?>
</span>
	<span class="small"  style="top:164px; left: 440px;"><?php 
Esempio n. 5
0
    $string1 .= "\r\najaxVars['ajaxsolar']           = '" . wsNumber($ws['solarAct'], 0) . "';";
    if (isset($ws['solActPerc'])) {
        $string1 .= "\r\najaxVars['ajaxsolarpct']        = '" . wsNumber($ws['solActPerc'], 0) . "';";
    } elseif (isset($ws['solarActPerc'])) {
        $string1 .= "\r\najaxVars['ajaxsolarpct']        = '" . wsNumber($ws['solarActPerc'], 0) . "';";
    }
    $string1 .= "\r\najaxVars['ajaxsolarmax']        = '" . wsNumber($ws['solarMaxToday'], 0) . "';";
    if ($ws['solarMaxToday'] != 0) {
        $string1 .= "\r\najaxVars['ajaxsolarmaxtime']    = '" . string_date($ws['solarMaxTodayTime'], $SITE['timeOnlyFormat']) . "';";
    } else {
        $string1 .= "\r\najaxVars['ajaxsolarmaxtime']    = 'none';";
    }
}
// EO solar
if ($SITE['UV']) {
    $string1 .= "\r\najaxVars['ajaxuv']              = '" . wsNumber($ws['uvAct']) . "';\r\najaxVars['ajaxuvword']          = '" . wsgetUVword($ws['uvAct']) . "';\r\najaxVars['ajaxuvmax']           = '" . wsNumber($ws['uvMaxToday']) . "';";
    if ($ws['uvMaxTodayTime'] != 0) {
        $string1 .= "\r\najaxVars['ajaxuvmaxtime']       = '" . string_date($ws['uvMaxTodayTime'], $SITE['timeOnlyFormat']) . "';";
    } else {
        $string1 .= "\r\najaxVars['ajaxuvmaxtime']       = 'none';" . PHP_EOL;
    }
}
// eo UV
#
function wsGenArrow($nowTemp, $diff, $textUP, $textDN, $DP = 1)
{
    global $SITE, $wsDebug;
    if ($SITE['WXsoftware'] == 'WL' || $SITE['WXsoftware'] == 'DW') {
        return '';
    }
    $nowTemp = 1.0 * str_replace(',', '.', $nowTemp);
Esempio n. 6
0
function generate_value($value, $uom = '', $style = '')
{
    global $no_value, $decimals;
    if ($style == '') {
        $style = ' style="text-align: right;" ';
    } else {
        $style = ' style="text-align: left;" ';
    }
    $from = array('n/a', '---', '--');
    $repl = trim(str_replace($from, '', $value));
    if ($repl != '') {
        return '<td' . $style . '>' . wsNumber($value, $decimals) . $uom . '</td>';
    } else {
        return '<td' . $style . '>' . $no_value . '</td>';
    }
}