本文整理匯總了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 #####################################