Esempio n. 1
0
    $dayH = intval($daylength / 3600);
    $day = $daylength - 3600 * $dayH;
    $dayM = intval($day / 60);
    $dayS = $day - 60 * $dayM;
    return sprintf("%d:%02d:%02d", $dayH, $dayM, $dayS);
}
for ($i = 0; $i < $numStations; $i++) {
    $altitude = $mydevices[$i]['latlng']['altitude'];
    $place = $mydevices[$i]['address'];
    $int_name = $mydevices[$i]["module_name"];
    $ext_name = $mydevices[$i]["modules"][0]["module_name"];
    // Lever/Coucher du soleil
    $Zenith = 90 + 50 / 60;
    $lat = $mydevices[$i]['latlng']['latitude'];
    $long = $mydevices[$i]['latlng']['longitude'];
    $diff = daydiff($lat, $long);
    $arrow = $diff > 0 ? '&#10138;' : '&#10136;';
    if (abs($diff) < 1) {
        $arrow = '&#8596;';
    }
    $diff = abs($diff);
    $diffm = intval($diff / 60);
    $diffs = abs($diff % 60);
    $tdiff = sprintf("%2dm %2ds", $diffm, $diffs);
    $tdaylength = daylength($lat, $long);
    $soleil = date("H:i:s", date_sunrise(time(), SUNFUNCS_RET_TIMESTAMP, $lat, $long, $Zenith, $timeOffset)) . "&nbsp;&nbsp;" . date("H:i:s", date_sunset(time(), SUNFUNCS_RET_TIMESTAMP, $lat, $long, $Zenith, $timeOffset));
    //	$soleil = date_sunrise(time(),SUNFUNCS_RET_STRING,$lat,$long, $Zenith,$timeOffset)."&nbsp;&nbsp;"
    //	        .date_sunset(time(),SUNFUNCS_RET_STRING,$lat,$long, $Zenith,$timeOffset);
    // Lever/Coucher lune
    $mrise = $mset = 1;
    $moon = new moontime();
Esempio n. 2
0
    $bbcode_uid = make_bbcode_uid();
    $message = bbencode_first_pass($message, $bbcode_uid);
    $message = $board_config['allow_bbcode'] ? bbencode_second_pass($message, $bbcode_uid) : preg_replace('/\\:[0-9a-z\\:]+\\]/si', ']', $message);
    //              $message = ( $board_config['allow_bbcode'] ) ? bbencode_second_pass($message, 0) : preg_replace('/\:[0-9a-z\:]+\]/si', ']', $message);
}
$message = make_clickable($message);
// Parse smilies
if ($board_config['allow_smilies']) {
    $message = smilies_pass($message);
}
// END prepare message
$message = break_text($message);
// Create time-2-end-chart
if ($auction_offer_row['auction_offer_time_stop'] > time() and $auction_config_data['auction_show_timeline'] and $auction_offer_row['auction_offer_state'] != 2) {
    $time_to_end = daydiff(time(), $auction_offer_row['auction_offer_time_stop']);
    $time_total = daydiff($auction_offer_row['auction_offer_time_start'], $auction_offer_row['auction_offer_time_stop']);
    $template->assign_block_vars('timetoend_chart', array('TIME_TOTAL' => $time_total, 'TIME_TO_END' => $time_to_end));
    for ($i = 0; $i < $time_total - $time_to_end; $i++) {
        $template->assign_block_vars('timetoend_chart.timetoend_chart_over', array('TIME_TOTAL' => $time_total, 'TIME_TO_END' => $time_to_end));
    }
    for ($i = 0; $i < $time_to_end; $i++) {
        $template->assign_block_vars('timetoend_chart.timetoend_chart_running', array('TIME_TOTAL' => $time_total, 'TIME_TO_END' => $time_to_end));
    }
}
// Output page
$page_title = $lang['auction_user_rating_view_offer'] . ' (' . $lang['auction_offer_time_stop'] . ' ' . $auction_offer_time_stop . ') - ' . $auction_offer_row['auction_offer_title'];
include $phpbb_root_path . 'includes/page_header.' . $phpEx;
include $phpbb_root_path . 'auction/auction_header.' . $phpEx;
// Display bid-fields only if auction is still active
if ($auction_offer_row['auction_offer_time_stop'] > time() && $auction_offer_row['auction_offer_time_start'] < time() && $auction_offer_row['auction_offer_state'] != 2) {
    $template->assign_block_vars('bidnowrow', array('L_AUCTION_YOUR_NAME' => $lang['auction_your_name'], 'L_AUCTION_YOUR_AMOUT' => $lang['auction_your_amount'] . "  (" . $auction_config_data['currency'] . ") :", 'L_AUCTION_BID_NOW' => $lang['auction_bid_now']));