本文整理汇总了PHP中Calendar::prepare方法的典型用法代码示例。如果您正苦于以下问题:PHP Calendar::prepare方法的具体用法?PHP Calendar::prepare怎么用?PHP Calendar::prepare使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Calendar
的用法示例。
在下文中一共展示了Calendar::prepare方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Calendar
<?php
/*
* Copyright(c) 2009 limitlink,Inc. All Rights Reserved.
* http://limitlink.jp/
* 文字コード UTF-8
*/
require_once '../application/loader.php';
$view->heading('スケジュール');
$calendar = new Calendar();
$data = $calendar->prepare($hash['list'], $_GET['year'], $_GET['month'], $_GET['day'], $_GET['year'], $_GET['month'], $_GET['day']);
$data = $data[$_GET['day']];
$week = array('日', '月', '火', '水', '木', '金', '土');
$previous = mktime(0, 0, 0, $_GET['month'], $_GET['day'] - 1, $_GET['year']);
$next = mktime(0, 0, 0, $_GET['month'], $_GET['day'] + 1, $_GET['year']);
if (strlen($hash['owner']['realname']) > 0 && (isset($_GET['member']) || $hash['owner']['userid'] != $_SESSION['userid'])) {
$caption = ' - ' . $hash['owner']['realname'];
}
?>
<div class="contentcontrol">
<h1>スケジュール<?php
echo $caption;
?>
</h1>
<table cellspacing="0"><tr>
<td><a href="index.php<?php
echo $calendar->parameter($_GET['year'], $_GET['month'], $_GET['day']);
?>
">カレンダー</a></td>
<td><a href="groupweek.php<?php
echo $calendar->parameter($_GET['year'], $_GET['month'], $_GET['day']);
示例2: array
echo '<table class="schedulegroup" cellspacing="0"><tr><th> </th>';
$week = array('日', '月', '火', '水', '木', '金', '土');
$style = array(0 => ' class="sunday"', 6 => ' class="saturday"');
$timestamp = $begin;
for ($i = 0; $i <= 6; $i++) {
$day = date('j', $timestamp);
$month = '';
if ($i <= 0 || $day == 1) {
$month = date('n/', $timestamp);
}
echo '<th' . $style[$i] . '><a href="groupday.php' . $calendar->parameter(date('Y', $timestamp), date('n', $timestamp), $day) . '">' . $month . $day . ' ' . $week[$i] . '</a></th>';
$timestamp = strtotime('+1 day', $timestamp);
}
echo '</tr>';
foreach ($hash['user'] as $key => $value) {
$data[$key] = $calendar->prepare($data[$key], date('Y', $begin), date('n', $begin), date('j', $begin), date('Y', $end), date('n', $end), date('j', $end));
echo '<tr><td><a href="index.php' . $calendar->parameter($_GET['year'], $_GET['month'], $_GET['day'], array('member' => $key)) . '">' . $value . '</a> </td>';
$timestamp = $begin;
for ($i = 0; $i <= 6; $i++) {
$day = date('j', $timestamp);
echo '<td' . $calendar->style(date('Y', $timestamp), date('n', $timestamp), $day, $i) . '>';
if (is_array($data[$key][$day]) && count($data[$key][$day]) > 0) {
foreach ($data[$key][$day] as $row) {
$parameter = $calendar->parameter(date('Y', $timestamp), date('n', $timestamp), $day, array('member' => $key));
echo sprintf('<a href="groupday.php%s"%s>%s%s</a><br />', $parameter, $calendar->share($row), $row['schedule_time'], $row['schedule_title']);
}
}
echo ' </td>';
$timestamp = strtotime('+1 day', $timestamp);
}
echo '</tr>';
示例3: Calendar
<?php
/*
* Copyright(c) 2009 limitlink,Inc. All Rights Reserved.
* http://limitlink.jp/
* 文字コード UTF-8
*/
require_once '../application/loader.php';
$view->heading('施設予約');
$calendar = new Calendar();
$data = $calendar->prepare($hash['list'], $_GET['year'], $_GET['month'], 1, $_GET['year'], $_GET['month'], date('t', mktime(0, 0, 0, $_GET['month'], 1, $_GET['year'])));
$timestamp = mktime(0, 0, 0, $_GET['month'], 1, $_GET['year']);
$previous = mktime(0, 0, 0, $_GET['month'] - 1, 1, $_GET['year']);
$next = mktime(0, 0, 0, $_GET['month'] + 1, 1, $_GET['year']);
if (strlen($hash['folder'][$_GET['facility']]) > 0) {
$caption = ' - ' . $hash['folder'][$_GET['facility']];
}
?>
<div class="contentcontrol">
<h1>施設予約<?php
echo $caption;
?>
</h1>
<table cellspacing="0"><tr>
<td><a href="index.php<?php
echo $calendar->parameter($_GET['year'], $_GET['month'], $_GET['day'], array('group' => '', 'member' => '', 'facility' => ''));
?>
">カレンダー</a></td>
<td><a href="groupweek.php<?php
echo $calendar->parameter($_GET['year'], $_GET['month'], $_GET['day'], array('group' => '', 'member' => '', 'facility' => ''));
?>
示例4: array
</td></tr></table>
<table class="schedulegroup paragraph" cellspacing="0"><tr>
<?php
$timestamp = $hash['begin'];
$style = array(0 => ' class="sunday"', 6 => ' class="saturday"');
for ($i = 0; $i <= 6; $i++) {
$day = date('j', $timestamp);
$month = '';
if ($i <= 0 || $day == 1) {
$month = date('n/', $timestamp);
}
echo '<th' . $style[$i] . '><a href="schedule/view.php' . $calendar->parameter(date('Y', $timestamp), date('n', $timestamp), $day) . '">' . $month . $day . ' ' . $week[$i] . '</a></th>';
$timestamp = strtotime('+1 day', $timestamp);
}
echo '</tr><tr>';
$data = $calendar->prepare($hash['schedule'], date('Y', $hash['begin']), date('n', $hash['begin']), date('j', $hash['begin']), date('Y', $hash['end']), date('n', $hash['end']), date('j', $hash['end']));
$timestamp = $hash['begin'];
for ($i = 0; $i <= 6; $i++) {
$day = date('j', $timestamp);
echo '<td' . $calendar->style(date('Y', $timestamp), date('n', $timestamp), $day, $i) . '>';
if (is_array($data[$day]) && count($data[$day]) > 0) {
foreach ($data[$day] as $row) {
$parameter = $calendar->parameter(date('Y', $timestamp), date('n', $timestamp), $day, array('id' => $row['id']));
echo sprintf('<a href="schedule/view.php%s"%s>%s%s </a><br />', $parameter, $calendar->share($row), $row['schedule_time'], $row['schedule_title']);
}
}
echo ' </td>';
$timestamp = strtotime('+1 day', $timestamp);
}
echo '</tr></table>';
?>