Source for file vacancy.php
Documentation is available at vacancy.php
* @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';
/** date manipulation routines */
require_once 'inc/date.php';
require_once 'timeslot.php';
* Create a new vacancy slot
* @param array $arr field => value
$this->TimeSlot($arr['bookwhen'], $arr['stoptime'], $arr['duration']);
#echo "Vacancy from ".$this->start->dateTimeString()." to ".$this->stop->dateTimeString()."<br />\n";
* Set the times for the slot
* @param SimpleDate $start start time/date
* @param SimpleDate $stop stop time/date
$duration =
new SimpleTime($stop->subtract($start));
* display the vacancy as a list of settings
* @return string html representation of the slot
* display the vacancy as a list of settings
* @return string html representation of the slot
.
'</td><td>'.
$this->start->getShortDateTimeString()
.
'</td><td>'.
$this->stop->getShortDateTimeString()
* display the vacancy in a table calendar cell
* @return string html representation of the slot
#echo $this->isDisabled ? 'disabled ' : 'active ';
$startticks =
$start->ticks;
$stopticks =
$stop->ticks;
static $timeDescStr =
null;
if ($timeDescStr ===
null) $timeDescStr =
T_('Make booking from %s to %s');
$timedescription =
sprintf($timeDescStr, $start->getShortDateTimeString(), $stop->getShortDateTimeString());
//$timedescription = $this->start->timeString().' - '.$this->stop->timeString();
$isodate =
$start->dateString();
$t .=
'<div style="float:right;">'
.
$this->href.
'&isodate='.
$isodate.
'&startticks='.
$startticks.
'&stopticks='.
$stopticks.
'" '
.
'class="but" title="'.
$timedescription.
'">'
.
'<img src="'.
$conf->BasePath.
'/theme/images/book.png" '
.
'alt="'.
$timedescription.
'" '
//echo 'Comment: '.$this->slotRule->comment.'<br/>';
$t .=
'<div class="calcomment" title="'.
xssqw($this->slotRule->comment).
'">'
//.xssqw(sprintf('%20.20s',$this->slotRule->comment))
$t .=
' '; // make sure there is some non-floating content in the table.
* work out the title (start and stop times) for the vacancy for display
static $unavailableStr =
null;
if ($unavailableStr ===
null) $unavailableStr =
T_('Unavailable from %s to %s');
$t =
sprintf($unavailableStr, $start->getShortDateTimeString(), $stop->getShortDateTimeString());
static $vacantStr =
null;
if ($vacantStr ===
null) $vacantStr =
T_('Vacant from %s to %s');
$t =
sprintf($vacantStr, $start->getShortDateTimeString(), $stop->getShortDateTimeString());
Documentation generated on Tue, 06 Mar 2007 10:02:10 +0000 by phpDocumentor 1.3.0