本文整理汇总了PHP中CCalendar::generate_calendar方法的典型用法代码示例。如果您正苦于以下问题:PHP CCalendar::generate_calendar方法的具体用法?PHP CCalendar::generate_calendar怎么用?PHP CCalendar::generate_calendar使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CCalendar
的用法示例。
在下文中一共展示了CCalendar::generate_calendar方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: parseFloat
var month = parseFloat(raw[1]) - 1;
var year = parseFloat(raw[0]);
if(month == 0){ //month > dec, change to 1(january), add 1 to yr
month = 12;
year = year - 1;
}
joms.jQuery('.events-list').html('');
joms.events.getCalendar(month,year);
});
}
</script>
<div id="event">
<?php
$time = time();
echo CCalendar::generate_calendar(date('Y', $time), date('n', $time));
?>
</div>
<div class="community-calendar-result">
<strong class="happening_title" style="display:none"><?php
echo JText::_('COM_COMMUNITY_EVENTS_HAPPENING_TITLE');
?>
:</strong>
<img class="loading-icon" style="display:none" src="<?php
echo JURI::root();
?>
components/com_community/assets/ajax-loader.gif"/>
<div class="small">
<ul class="cEventNearby cResetList events-list" ></ul>
</div>
</div>
示例2: ajaxGetCalendar
public function ajaxGetCalendar($month, $year)
{
$response = new JAXResponse();
$filter = JFilterInput::getInstance();
$year = $filter->clean($year, 'int');
$month = $filter->clean($month, 'int');
$calendar_html = CCalendar::generate_calendar($year, $month);
$response->addScriptCall('joms.events.displayCalendar', $calendar_html);
return $response->sendResponse();
}