<?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']);
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>';
<?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' => '')); ?>
</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>'; ?>