Source for file cell.php
Documentation is available at cell.php
* Booking cell object for display in a table
* @author Stuart Prescott
* @copyright Copyright Stuart Prescott
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
/** Load ancillary functions */
require_once 'inc/typeinfo.php';
/** cell is in the middle of a booking */
/** cell is at the start of a booking */
/** cell is at the start of a day's calendar display */
define('START_BOOKING_DAY', 4);
* Booking cell object for display in a table
/** @var TimeSlot Vacancy or Booking object for this cell */
/** @var boolean Cell is at start of booking */
/** @var boolean Cell is at start of day */
/** @var integer Number of rows in cell */
/** @var array list of class names to use for cells */
/** @var string data on which to rotate through classes */
/** @var string class name to use if the cell is today */
* Create a new display cell
* @param TimeSlot $booking the timeslot (Booking or Vacancy object) to be represented
* @param integer $start type of cell (START_BOOKING, START_BOOKING_DAY, MIDDLE_BOOKING)
* @param integer $rows number of rows this cell should occupy
function BookingCell(&$book, $start=
START_BOOKING, $rows=
1) {
* use a number of different html/css classes for displaying cells
* @param array $arr list of class names
* @param string $roton data on which to rotate through classes
* html/css class to use if this day is today
* @param string $c class name
* prepare html representation of the cell
* @param string $class class name to use for the cell
* @param string $href base href to be used for making links to book/edit
* @param boolean $popup provide a popup layer with extra details of the booking
* @param boolean $isadmin provide an admin view of the data
function display($class, $href, $popup=
false, $isadmin=
0) {
$popupControl =
'onMouseOver="showCalendarPopup(\''.
$message.
'\');" '
.
'onMouseOut="hideCalendarPopup();" ';;
$t .=
'<td rowspan="'.
$this->rows.
'" class="'.
$class.
'" '
$t .=
$this->booking->displayInCell($isadmin);
static $onceOnly =
false;
<script type='text/javascript'>
function showCalendarPopup(message) {
showPopup(message, $width, $offsety);
function hideCalendarPopup() {
Documentation generated on Tue, 06 Mar 2007 10:01:01 +0000 by phpDocumentor 1.3.0