{
$lang = LanguageManager::singleton();
- return array("DATE"=>$lang->getDate($this->getStartTime()), "TIME"=>$lang->getTime($this->getStartTime()), "PLACE"=>$this->getRoomId(), "EVENTNAME"=>$this->getTitle(), "ARTIST"=>$this->getArtist(),"PRICE"=>$lang->getPrice($this->getDefaultPrice()), "ID"=>$this->getEventId(), "DESCRIPTION"=>$this->getDescription(), "LINK"=>"");
+ return array("DATE"=>$lang->getDate($this->getStartTime()), "TIME"=>$lang->getTime($this->getStartTime()), "PLACE"=>$this->getRoomId(), "EVENTNAME"=>$this->getTitle(), "ARTIST"=>$this->getArtist(),"PRICE"=>$lang->getPrice($this->getDefaultPrice()), "ID"=>$this->getEventId(), "DESCRIPTION"=>$this->getDescription(), "LINK"=>"","AVAILABLETICKETS"=>$this->availableTicketAmount());
}
/**returns how many tickets can still be sold*/
//get existing tickets
$res=$db->select("ticket","status","eventid=".$db->escapeInt($this->evid));
$amt=0;
- reset($res);
if(count($res)>0)
foreach($res as $tk){
- if(!($tk["status"]&TICKET_MBLOCK))$amt++;
+ if(($tk["status"] & TICKET_MBLOCK)!=0)$amt++;
}
return $this->capacity - $amt;
}
<i>@ARTIST@</i><br/>
Kartenpreis: @PRICE@ EUR<br/>
<a href="@SCRIPT@?mode=info&event=@ID@">Info</a>
+#if:AVAILABLETICKETS>0
<a href="@SCRIPT@?mode=eventDetails&event=@ID@">Bestellen</a>
+#if:AVAILABLETICKETS<=5
+<font color="red">*nur noch Restkarten*</font>
+#endif
+#endif
+#if:AVAILABLETICKETS==0
+<font color="red">*ausverkauft*</font>
+#endif
+
</p>
#endset