本文整理汇总了PHP中Calendar::display方法的典型用法代码示例。如果您正苦于以下问题:PHP Calendar::display方法的具体用法?PHP Calendar::display怎么用?PHP Calendar::display使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Calendar
的用法示例。
在下文中一共展示了Calendar::display方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: SkinTag
/**
* Event handler: SkinTag (widget)
*
* @param array Associative array of parameters. Valid keys are:
* - 'block_start' : (Default: '<div class="bSideItem">')
* - 'block_end' : (Default: '</div>')
* - 'title' : (Default: T_('Calendar'))
* - 'displaycaption'
* - 'monthformat'
* - 'linktomontharchive'
* - 'tablestart'
* - 'tableend'
* - 'monthstart'
* - 'monthend'
* - 'rowstart'
* - 'rowend'
* - 'headerdisplay'
* - 'headerrowstart'
* - 'headerrowend'
* - 'headercellstart'
* - 'headercellend'
* - 'cellstart'
* - 'cellend'
* - 'linkpostcellstart'
* - 'linkposttodaycellstart'
* - 'todaycellstart'
* - 'todaycellstartpost'
* - 'navigation' : Where do we want to have the navigation arrows? (Default: 'tfoot')
* - 'browseyears' : boolean Do we want arrows to move one year at a time?
* - 'min_timestamp' : Minimum unix timestamp the user can browse too or 'query' (Default: 2000-01-01)
* - 'max_timestamp' : Maximum unix timestamp the user can browse too or 'query' (Default: now + 1 year )
* - 'postcount_month_atitle'
* - 'postcount_month_atitle_one'
* - 'postcount_year_atitle'
* - 'postcount_year_atitle_one'
* - 'link_type' : 'canonic'|'context' (default: canonic)
* @return boolean did we display?
*/
function SkinTag($params)
{
// Prefix of the ItemList object
$itemlist_prefix = isset($params['itemlist_prefix']) ? $params['itemlist_prefix'] : '';
global $month;
global $Blog, $cat_array, $cat_modifier;
global $show_statuses;
global $author, $assgn, $status, $types;
global ${$itemlist_prefix . 'm'}, $w, $dstart;
global $s, $sentence, $exact;
global $posttypes_specialtypes;
/**
* Default params:
*/
// This is what will enclose the block in the skin:
if (!isset($params['block_start'])) {
$params['block_start'] = '<div class="bSideItem">';
}
if (!isset($params['block_end'])) {
$params['block_end'] = "</div>\n";
}
// Title:
if (!isset($params['block_title_start'])) {
$params['block_title_start'] = '<h3>';
}
if (!isset($params['block_title_end'])) {
$params['block_title_end'] = '</h3>';
}
if (!isset($params['title'])) {
$params['title'] = '';
}
$Calendar = new Calendar(${$itemlist_prefix . 'm'}, $params);
// TODO: automate with a table inside of Calendatr object. Table should also contain descriptions and default values to display in help screen.
// Note: minbrowse and maxbrowe already work this way.
if (isset($params['displaycaption'])) {
$Calendar->set('displaycaption', $params['displaycaption']);
}
if (isset($params['monthformat'])) {
$Calendar->set('monthformat', $params['monthformat']);
}
if (isset($params['linktomontharchive'])) {
$Calendar->set('linktomontharchive', $params['linktomontharchive']);
}
if (isset($params['tablestart'])) {
$Calendar->set('tablestart', $params['tablestart']);
}
if (isset($params['tableend'])) {
$Calendar->set('tableend', $params['tableend']);
}
if (isset($params['monthstart'])) {
$Calendar->set('monthstart', $params['monthstart']);
}
if (isset($params['monthend'])) {
$Calendar->set('monthend', $params['monthend']);
}
if (isset($params['rowstart'])) {
$Calendar->set('rowstart', $params['rowstart']);
}
if (isset($params['rowend'])) {
$Calendar->set('rowend', $params['rowend']);
}
if (isset($params['headerdisplay'])) {
//.........这里部分代码省略.........
示例2: Calendar
<html>
<head>
<title>日历demo</title>
<meta http-equiv="Content-Type" content="text/html" charset="UTF-8" />
<style type="text/css">
table.calendar {
border: 1px solid #050;
}
.calendar th, .calendar td {
width:30px;
text-align:center;
}
.calendar th {
background-color:#050;
color:#fff;
}
.today{
color:#fff;
background-color:#050;
}
</style>
</head>
<body>
<div style="align:center">
<?php
$cal = new Calendar($params);
$cal->display();
?>
</div>
</body>
</html>
示例3: SkinTag
/**
* Event handler: SkinTag (widget)
*
* @param array Associative array of parameters. Valid keys are:
* - 'block_start' : (Default: '<div class="bSideItem">')
* - 'block_end' : (Default: '</div>')
* - 'title' : (Default: T_('Calendar'))
* - 'displaycaption'
* - 'monthformat'
* - 'linktomontharchive'
* - 'tablestart'
* - 'tableend'
* - 'monthstart'
* - 'monthend'
* - 'rowstart'
* - 'rowend'
* - 'headerdisplay'
* - 'headerrowstart'
* - 'headerrowend'
* - 'headercellstart'
* - 'headercellend'
* - 'cellstart'
* - 'cellend'
* - 'linkpostcellstart'
* - 'linkposttodaycellstart'
* - 'todaycellstart'
* - 'todaycellstartpost'
* - 'navigation' : Where do we want to have the navigation arrows? (Default: 'tfoot')
* - 'browseyears' : boolean Do we want arrows to move one year at a time?
* - 'min_timestamp' : Minimum unix timestamp the user can browse too or 'query' (Default: 2000-01-01)
* - 'max_timestamp' : Maximum unix timestamp the user can browse too or 'query' (Default: now + 1 year )
* - 'postcount_month_atitle'
* - 'postcount_month_atitle_one'
* - 'postcount_year_atitle'
* - 'postcount_year_atitle_one'
* - 'link_type' : 'canonic'|'context' (default: canonic)
* @return boolean did we display?
*/
function SkinTag($params)
{
// Prefix of the ItemList object
$itemlist_prefix = isset($params['itemlist_prefix']) ? $params['itemlist_prefix'] : '';
global $month;
global $Blog, $cat_array, $cat_modifier;
global $show_statuses;
global $author, $assgn, $status, $types;
global ${$itemlist_prefix . 'm'}, $w, $dstart;
global $s, $sentence, $exact;
global $posttypes_specialtypes;
/**
* Default params:
*/
$params = array_merge(array('block_start' => '<div class="bSideItem">', 'block_end' => "</div>\n", 'block_title_start' => '<h3>', 'block_title_end' => '</h3>', 'block_body_start' => '', 'block_body_end' => ''), $params);
$Calendar = new Calendar(${$itemlist_prefix . 'm'}, $params);
// TODO: automate with a table inside of Calendatr object. Table should also contain descriptions and default values to display in help screen.
// Note: minbrowse and maxbrowe already work this way.
if (isset($params['displaycaption'])) {
$Calendar->set('displaycaption', $params['displaycaption']);
}
if (isset($params['monthformat'])) {
$Calendar->set('monthformat', $params['monthformat']);
}
if (isset($params['linktomontharchive'])) {
$Calendar->set('linktomontharchive', $params['linktomontharchive']);
}
if (isset($params['tablestart'])) {
$Calendar->set('tablestart', $params['tablestart']);
}
if (isset($params['tableend'])) {
$Calendar->set('tableend', $params['tableend']);
}
if (isset($params['monthstart'])) {
$Calendar->set('monthstart', $params['monthstart']);
}
if (isset($params['monthend'])) {
$Calendar->set('monthend', $params['monthend']);
}
if (isset($params['rowstart'])) {
$Calendar->set('rowstart', $params['rowstart']);
}
if (isset($params['rowend'])) {
$Calendar->set('rowend', $params['rowend']);
}
if (isset($params['headerdisplay'])) {
$Calendar->set('headerdisplay', $params['headerdisplay']);
}
if (isset($params['headerrowstart'])) {
$Calendar->set('headerrowstart', $params['headerrowstart']);
}
if (isset($params['headerrowend'])) {
$Calendar->set('headerrowend', $params['headerrowend']);
}
if (isset($params['headercellstart'])) {
$Calendar->set('headercellstart', $params['headercellstart']);
}
if (isset($params['headercellend'])) {
$Calendar->set('headercellend', $params['headercellend']);
}
if (isset($params['cellstart'])) {
$Calendar->set('cellstart', $params['cellstart']);
//.........这里部分代码省略.........
示例4: die
<?php
//This file is part of NOALYSS and is under GPL
//see licence.txt
/**
* @file
* @brief show the calendar
*/
if (!defined('ALLOWED')) {
die('Appel direct ne sont pas permis');
}
require_once NOALYSS_INCLUDE . '/class_calendar.php';
$cal = new Calendar();
$cal->default_periode = isset($_GET['in']) ? $_GET['in'] : $g_user->get_periode();
?>
<div id="calendar_zoom_div">
<?php
echo $cal->display('long', 1);
?>
</div>
示例5: Calendar
/**
* Access calendar package to display event calendar
*
* @package events
* @version $Header$
* @author nickpalmer
*/
/**
* required setup
*/
require_once '../kernel/setup_inc.php';
require_once EVENTS_PKG_PATH . 'BitEvents.php';
if ($gBitSystem->isPackageActive('calendar')) {
include_once CALENDAR_PKG_PATH . 'Calendar.php';
$gBitSystem->verifyPermission('p_calendar_view');
// now, lets get the ball rolling!
$gCalendar = new Calendar();
$gCalendar->processRequestHash($_REQUEST, $_SESSION['calendar']);
// Setup which content types we want to view.
$listHash['content_type_guid'] = array('bitevents');
$events = new BitEvents();
if (empty($_REQUEST['event_after'])) {
$_REQUEST['event_after'] = $gBitSystem->getUTCTime();
}
$listevents = $events->getList($_REQUEST);
// Build the calendar
$gCalendar->buildCalendar($listHash, $_SESSION['calendar']);
// And display it with a nice title.
$gCalendar->display(tra('Events Calendar'), FALSE, EVENTS_PKG_URL . 'calendar.php');
}
示例6: Calendar
<data>
<code>bkname</code>
<value>{$html}</value>
</data>
EOF;
break;
// display new calendar
// display new calendar
case 'cal':
require_once NOALYSS_INCLUDE . '/class_calendar.php';
/* others report */
$cal = new Calendar();
$cal->set_periode($per);
$notitle = HtmlInput::default_value_get("notitle", 0);
$html = "";
$html = $cal->display($_GET['t'], $notitle);
$html = escape_xml($html);
header('Content-type: text/xml; charset=UTF-8');
echo <<<EOF
<?xml version="1.0" encoding="UTF-8"?>
<data>
<code>{$html}</code>
</data>
EOF;
break;
/* rem a cat of document */
/* rem a cat of document */
case 'rem_cat_doc':
require_once NOALYSS_INCLUDE . '/class_document_type.php';
// if user can not return error message
$message = "";
示例7: Calendar
<?php
// $Header$
// Copyright( c ) 2002-2003, Luis Argerich, Garland Foster, Eduardo Polidor, et. al.
// All Rights Reserved. See below for details and a complete list of authors.
// Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See http://www.gnu.org/copyleft/lesser.html for details.
require_once '../kernel/setup_inc.php';
include_once CALENDAR_PKG_PATH . 'Calendar.php';
$gBitSystem->isPackageActive('calendar', TRUE);
$gBitSystem->verifyPermission('p_calendar_view');
// now, lets get the ball rolling!
$gCalendar = new Calendar();
// Handle the request hash storing into the session.
$gCalendar->processRequestHash($_REQUEST, $_SESSION['calendar']);
// Setup which content types we want to view.
if ($gBitUser->hasPermission("p_calendar_view_changes") && $_SESSION['calendar']['content_type_guid']) {
$listHash = $_SESSION['calendar'];
} else {
foreach ($gLibertySystem->mContentTypes as $key => $val) {
if ($gBitSystem->isFeatureActive('calendar_default_' . $key)) {
$listHash['content_type_guid'][] = $key;
}
}
}
// Build the calendar
$gCalendar->buildCalendar($listHash, $_SESSION['calendar']);
// And display it with a nice title.
$gCalendar->display(tra('Calendar'));
示例8: elseif
if ($m > 12) {
echo "Fehler!!! Kein gültiger Monat";
} elseif ($y >= date("Y") + 9) {
echo "Zu hohes Datum";
} elseif ($y <= date("Y") - 9) {
echo "Zu geringes Datum";
} elseif ($d > 31 || $d < 1) {
echo "kein gültiger Tag";
} else {
if ($action == "addNew") {
$cal->addMeeting($d, $m, $y);
echo "{$d} - {$m} - {$y}";
} else {
if ($action == "viewDay") {
$cal->viewDay($d, $m, $y, $id);
} else {
if ($action == "getAll") {
$cal->getAllMeetings($id);
} else {
if ($action == "insertDB") {
echo $date;
$date = explode(".", $date);
$cal->insertDB($date[0], $date[1], $date[2], $begin, $duration, $place, $description, $persons, $id);
} else {
$cal->display($m, $y, $id);
}
}
}
}
}
require "inc/footer.inc.php";