当前位置: 首页>>代码示例>>PHP>>正文


PHP calendar::show方法代码示例

本文整理汇总了PHP中calendar::show方法的典型用法代码示例。如果您正苦于以下问题:PHP calendar::show方法的具体用法?PHP calendar::show怎么用?PHP calendar::show使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在calendar的用法示例。


在下文中一共展示了calendar::show方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: get_text

    $month1 = 9;
}
if (empty($month2)) {
    $month2 = 12;
}
if (empty($maintabcolumns)) {
    $maintabcolumns = 6;
}
require_once "calendar.php";
$cal = new calendar();
if (!empty($maintabcolumns)) {
    foreach ($params as $param) {
        $cal->{$param} = ${$param};
    }
}
$text = $cal->show();
$selectedyear++;
if (!empty($month1)) {
    $month1 = 1;
}
if (!empty($month2)) {
    $month2 = 8;
}
if (!empty($maintabcolumns)) {
    foreach ($params as $param) {
        $cal->{$param} = ${$param};
    }
}
$text .= $cal->show();
echo get_text($cal, $text, $startyear);
?>
开发者ID:ShutovPS,项目名称:bsuir_poit,代码行数:31,代码来源:index.php

示例2: calendar

	//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 #####################################
	//get today's programms ;)
	//process limits
	$start = $myDate[2] . "-" . $myDate[1] . "-" . $myDate[0] . " 00:00:00";
	$end = $myDate[2] . "-" . $myDate[1] . "-" . $myDate[0] . " 23:59:59";
	
	//run the query
	$todays_shows = $db->getAll("SELECT 
										series.owner AS series_owner, 
										series.title AS series_title,
										programme.id AS prog_id,
										programme.title AS prog_title,
										EXTRACT(EPOCH FROM programme.intime) AS intime,
										EXTRACT(EPOCH FROM programme.outtime) AS outtime,
开发者ID:BackupTheBerlios,项目名称:sotf-svn,代码行数:31,代码来源:inside.php


注:本文中的calendar::show方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。