Exemplo n.º 1
0
function yrno_date_line($time)
{
    global $latitude, $longitude, $rowColor, $timeFormat, $imgDir, $srise, $sset, $cols;
    $srise = date_sunrise($time, SUNFUNCS_RET_TIMESTAMP, $latitude, $longitude);
    // standard time integer
    $sset = date_sunset($time, SUNFUNCS_RET_TIMESTAMP, $latitude, $longitude);
    $dlength = $sset - $srise;
    $dlengthHr = floor($dlength / 3600);
    $dlengthMin = round(($dlength - 3600 * $dlengthHr) / 60);
    $strDayLength = $dlengthHr . ':' . substr('00' . $dlengthMin, -2);
    $longDate = yrno_long_date($time);
    $string = '<tr class="dateline ' . $rowColor . '"><td colspan="' . $cols . '">
<span style="float:left; position:relative;">&nbsp;<b>' . $longDate . '</b></span>
<span style="float:right;position:relative;">
	<span class="rTxt">
		<img src="' . $imgDir . '/sunrise.png" width="24" height="12" alt="sunrise" />&nbsp;&nbsp;' . date($timeFormat, $srise) . '&nbsp;&nbsp;
		<img src="' . $imgDir . '/sunset.png"  width="24" height="12" alt="sunset" />&nbsp;&nbsp;' . date($timeFormat, $sset) . '&nbsp;&nbsp;&nbsp;' . yrnotransstr('Daylength') . ': ' . $strDayLength . '&nbsp;
	</span>
</span>
</td></tr>' . PHP_EOL;
    if ($rowColor == 'row-dark') {
        $rowColor = 'row-light';
    } else {
        $rowColor = 'row-dark';
    }
    return $string;
}
Exemplo n.º 2
0
    echo '<div id="containerTemp" ' . $style . '>';
    echo 'here the graph will be drawn</div>' . PHP_EOL;
    echo $graphPart1 . PHP_EOL;
    echo '</div>' . PHP_EOL;
}
if ($tableInTabs) {
    $style = 'style="padding: 0px;' . $tableHeight . '"';
    if ($yrnoTable) {
        echo '<div class="tabbertab" ' . $style . '>' . PHP_EOL;
        echo '<h2>' . yrnotransstr('Forecast by 6 hour intervals') . '</h2>' . PHP_EOL;
        echo $yrnoListTable . PHP_EOL;
        echo '</div>' . PHP_EOL;
    }
    if ($yrnoDetailTable) {
        echo '<div class="tabbertab" ' . $style . '>' . PHP_EOL;
        echo '<h2>' . yrnotransstr('Forecast details') . '</h2>' . PHP_EOL;
        echo $yrnoDetailTable . PHP_EOL;
        echo '</div>' . PHP_EOL;
    }
}
if ($tableInTabs || $MeteogramInTabs) {
    echo '</div>' . PHP_EOL;
}
if (!$tableInTabs) {
    $style = 'style="' . $topWidth . $margin . $tableHeight . ' overflow: auto;"';
    if ($yrnoTable) {
        echo '<div ' . $style . '>' . PHP_EOL;
        echo $yrnoListTable . PHP_EOL;
        echo '</div>' . PHP_EOL;
    }
    if ($yrnoDetailTable) {