109 lines
2.5 KiB
PHP
109 lines
2.5 KiB
PHP
<?php
|
|
|
|
/** Ticket Root
|
|
* root for all ticket reservation elements
|
|
*
|
|
* @version 2.1.0
|
|
* @since 2007-03-29
|
|
* @author martin lenzelbauer
|
|
*
|
|
* @change 2007-09-22
|
|
* added customer list
|
|
*
|
|
* @change 2008-02-14
|
|
* removed customer list
|
|
*/
|
|
class TicketRoot extends CmsObject{
|
|
|
|
|
|
/** C'tor
|
|
*/
|
|
//-----------------------------------------------
|
|
function TicketRoot($id, $parent){
|
|
//-----------------------------------------------
|
|
parent::CmsObject($id, $parent);
|
|
$this->name = "Programm";
|
|
}
|
|
|
|
|
|
/** @see CmsObject::load()
|
|
*/
|
|
//-----------------------------------------------
|
|
function load($path=array()){
|
|
//-----------------------------------------------
|
|
$this->childObjects = array();
|
|
$id = 0;
|
|
|
|
$t = FlexiconFactory::instanceByClass("TicketEventContainer", $this);
|
|
$t->setId(++$id);
|
|
$this->childObjects[] = $t;
|
|
|
|
if($_SESSION['userlevel'] == USER_ADMIN){
|
|
$t = FlexiconFactory::instanceByClass("TicketCategoryContainer", $this);
|
|
$t->setId(++$id);
|
|
$this->childObjects[] = $t;
|
|
|
|
$t = FlexiconFactory::instanceByClass("TicketGenreContainer", $this);
|
|
$t->setId(++$id);
|
|
$this->childObjects[] = $t;
|
|
}
|
|
|
|
$t = FlexiconFactory::instanceByClass("TicketReductionContainer", $this);
|
|
$t->setId(++$id);
|
|
$this->childObjects[] = $t;
|
|
|
|
$t = FlexiconFactory::instanceByClass("TicketRoomContainer", $this);
|
|
$t->setId(++$id);
|
|
$this->childObjects[] = $t;
|
|
|
|
#$c = FlexiconFactory::instanceByClass("CustomerList", $this);
|
|
#$c->setId(++$id);
|
|
#$this->childObjects[] = $c;
|
|
|
|
array_shift($path);
|
|
foreach($this->childObjects as $i=>$child){
|
|
$this->childObjects[$i]->load($path);
|
|
}
|
|
}
|
|
|
|
|
|
/** @see CmsObject::printContent()
|
|
*/
|
|
//-----------------------------------------------
|
|
function printContent(){
|
|
//-----------------------------------------------
|
|
$out = "";
|
|
foreach($this->childObjects as $i=>$child){
|
|
if($this->childObjects[$i]->isListable()){
|
|
$out .= $this->childObjects[$i]->printChildContent();
|
|
}
|
|
}
|
|
return $out;
|
|
}
|
|
|
|
|
|
/** @see CmsObject::getCssClass()
|
|
*/
|
|
|
|
//-----------------------------------------------
|
|
function getCssClass(){
|
|
//-----------------------------------------------
|
|
return "itemTickets";
|
|
}
|
|
|
|
|
|
// === ADDITIONAL METHODS ================================================================= //
|
|
|
|
|
|
/** sets the id
|
|
* @param id id
|
|
*/
|
|
//-----------------------------------------------
|
|
function setId($id){
|
|
//-----------------------------------------------
|
|
$this->id = $id;
|
|
}
|
|
|
|
};
|
|
|
|
?>
|