本文整理汇总了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);