本文整理汇总了PHP中calendar::select方法的典型用法代码示例。如果您正苦于以下问题:PHP calendar::select方法的具体用法?PHP calendar::select怎么用?PHP calendar::select使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类calendar
的用法示例。
在下文中一共展示了calendar::select方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: date
* past and the future
************************/
include("init.inc.php"); # include the global framwork
include("classes/calendar.class.php"); # calendar handler
include("classes/dayview.class.php"); # current day calendar handler
$myNav->add($SECTION[INSIDE],'index.php'); # add entry to Navigation Bar Stack
authorize('edit_station',false); # check access rights
//fix missing date (if any)
if(!$_GET['date']){
$_GET['date'] = date("d-m-Y");
}
//create calendar
$myCal = new calendar($_GET['date']); # create new calendar object (the month overview thing)
$myCal->select($_GET['date']); # selects the selected day (default: today)
$myDay = new dayView('','',$_GET['date']); # create the new day representer
//mark full calendar days
//process limits
$myDate = explode("-",$_GET['date']);
$start = $myDate[2] . "-" . $myDate[1] . "-1 00:00:00";
$end = $myDate[2] . "-" . $myDate[1] . "-" . date("t",mktime(0,0,1,$myDate[1],1,$myDate[2])) . " 23:59:59";
//mark all the days that have content associated with them
$myCal->setLinks($db->getCol("SELECT DISTINCT EXTRACT(DAY FROM intime) AS day FROM programme WHERE intime > '$start' AND intime < '$end'"));
//show calendar
$smarty->assign('calendar',$myCal->show('inside.php'));
//#################################### TODAY'S SHOWS #####################################