當前位置: 首頁>>代碼示例>>PHP>>正文


PHP calendar::highlightDay方法代碼示例

本文整理匯總了PHP中calendar::highlightDay方法的典型用法代碼示例。如果您正苦於以下問題:PHP calendar::highlightDay方法的具體用法?PHP calendar::highlightDay怎麽用?PHP calendar::highlightDay使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在calendar的用法示例。


在下文中一共展示了calendar::highlightDay方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: calendar

    $selected_month = $_POST['cal-month'];
} else {
    $selected_month = $current_month;
}
$calendar = new calendar($selected_month, $selected_year);
foreach ($articles->getContainers(0) as $container => $null) {
    $articles->setWorkContainer($container);
    if ($list = $articles->getStat('time')) {
        foreach ($list as $id => $time) {
            $id = explode('.', $id);
            if (rcms_format_time('n', $time) == $selected_month && rcms_format_time('Y', $time) == $selected_year) {
                $calendar->assignEvent(rcms_format_time('d', $time), '?module=articles&from=' . mktime(0, 0, 0, $selected_month, rcms_format_time('d', $time), $selected_year) . '&until=' . mktime(23, 59, 59, $selected_month, rcms_format_time('d', $time), $selected_year));
            }
        }
    }
}
$calendar->highlightDay(rcms_format_time('d', time()));
$date_pick = '<form action="" method="post" style="text-align: center">
               <select name="cal-month">';
foreach (array('January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December') as $num => $month) {
    $date_pick .= '<option value="' . ($num + 1) . '"' . ($num == $selected_month - 1 ? ' selected="selected"' : '') . '>' . $lang['datetime'][$month] . '</option>';
}
$date_pick .= '</select>
               <select name="cal-year">';
for ($y = $current_year - 6; $y <= $current_year; $y++) {
    $date_pick .= '<option value="' . $y . '"' . ($y == $selected_year ? ' selected="selected"' : '') . '>' . $y . '</option>';
}
$date_pick .= '</select>
               <input value="OK" type="submit" />
              </form>';
show_window(__('Articles calendar'), $calendar->returnCalendar() . $date_pick);
開發者ID:Parashutik,項目名稱:ReloadCMS,代碼行數:31,代碼來源:index.php


注:本文中的calendar::highlightDay方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。