Ejemplo n.º 1
0
Archivo: func.php Proyecto: bas2/diary
function h99()
{
    $adj = 0;
    // Set initially to no adjustment
    $local = @localtime();
    $isBST = $local[8];
    // 1 = BST; 0 = GMT (No DST adjustment was made)
    //echo $isBST; # Testing: Is DST/BST set on the server?
    if (BSTorGMT() == 'BST' && !$isBST) {
        // "We are now in BST!" and this script is running on a server in GMT(Not BST) = Add 1 hour
        $secs_in_one_hour = 60 * 60;
        //global $REMOTE_ADDR; if ($REMOTE_ADDR != '127.0.0.1')
        $adj = $secs_in_one_hour;
        // Before last Sunday in October +1hr (if in BST)
    }
    return time() + $adj;
}
Ejemplo n.º 2
0
}
$sel_yr_menu_content .= '</select>
<button id="goNextYear"' . $title2 . ' class="rbtn" title="Next Year">&gt;</button>';
// Display month and year drop downs
$str .= "  \r\n</p>\n";
$str .= "<p>{$sel_month_menu_content} {$sel_yr_menu_content}</p>";
// Display special buttons if the current month is not selected
// Whether to disable This month and This year buttons
$str_disable_mn = ($the_current_month != $gt_month or $the_current_year != $gt_year) ? '' : ' disabled="true"';
$str_disable_yr = $the_current_year != $gt_year ? '' : ' disabled="true"';
$str .= '
<button id="goThisMonth" title2="' . "{$mysql_dt}|{$the_current_month}|{$the_current_year}" . '" class="small"' . $str_disable_mn . '>This Month</button>
<button class="small" id="goThisYear" title2="' . "{$mysql_dt}|{$gt_month}|{$the_current_year}" . '"' . $str_disable_yr . '>This Year</button>
<button id="goToday" class="today_col" title2="' . "{$d_date5}|{$the_current_day}" . '">Today</button>';
// Display Current date and time when calendar pops up
$str .= "<p style=\"font-size:.8em;\">{$d_date1} <span id=\"timer\">{$d_date11}</span> UK/" . BSTorGMT() . "</p>\n";
// Start Calendar section
$str .= '<table id="tblDate">
<tr id="caldayrow">';
// Write the days of the week
$str .= '<tbody id="d"><td class="nohover">wk</td>';
// Week numbers column
for ($i = 0; $i < 7; $i++) {
    $str .= '<td width="10%">' . $arr_d[$i] . "</td>\n";
}
// Problem when first day of month lands on Sunday
if ($firstDayofmonthnumeric == 0) {
    $firstDayofmonthnumeric = 7;
}
$str .= "</tbody></tr>\n";
// First row -- Dates