* @package Joomla! * @Copyright (C) 2012 - Yves Hoppe - compojoom.com * @All rights reserved * @Joomla ! is Free Software * @Released under GNU/GPL License : http://www.gnu.org/copyleft/gpl.html * @version $Revision: 1.0.0 $ **/ defined('_JEXEC') or die('Restricted access'); global $mainframe; $document = JFactory::getDocument(); $database = JFactory::getDBO(); $my = JFactory::getuser(); JHTML::_('behavior.modal'); JHTML::_('stylesheet', 'media/com_matukio/css/modern.css'); // Backward compatibilty $buchopt = MatukioHelperUtilsEvents::getEventBookableArray($this->art, $this->event, $my->id, $this->uuid); $nametemp = ""; $htxt = 2; $bezahlt = 0; if ($this->art == 1) { $bezahlt = $this->booking->paid; } if ($this->art > 2) { if ($usrid == 0) { $nametemp = MatukioHelperUtilsBasic::getBookedUserList($this->event); } elseif ($usrid > 0) { $nametemp = JFactory::getuser($usrid); $nametemp = $nametemp->name; } if ($nametemp == "") { $htxt = 2.2;
/** * @package Matukio * @author Yves Hoppe <*****@*****.**> * @date 03.04.13 * * @copyright Copyright (C) 2008 - 2014 Yves Hoppe - compojoom.com . All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE */ defined('_JEXEC') or die('Restricted access'); JHTML::_('stylesheet', 'media/com_matukio/css/matukio.css'); JHTML::_('script', 'media/com_matukio/js/matukio.js'); $document = JFactory::getDocument(); $my = JFactory::getuser(); JHTML::_('behavior.modal'); JHTML::_('behavior.tooltip'); $buchopt = MatukioHelperUtilsEvents::getEventBookableArray(0, $this->kurs, 0); $filterStatus = $this->filterStatus; ?> <form action="<?php echo JRoute::_("index.php?option=com_matukio&view=participants&cid=" . $this->kurs->id . "&art=2"); ?> " method="post" name="ParticipantsForm" id="ParticipantsForm"> <?php $knopfunten = ""; $zurueck = array(0, 1, 2, 24); $backlink = JRoute::_("index.php?option=com_matukio&"); $knopfoben = "<a title=\"" . JTEXT::_('COM_MATUKIO_BACK') . "\" href=\"javascript:history.go(-1)\"><img src=\"" . MatukioHelperUtilsBasic::getComponentImagePath() . "1032.png\" border=\"0\" align=\"absmiddle\"></a>"; if ($this->art > 1) { $knopfoben .= MatukioHelperUtilsEvents::getEmailWindow(MatukioHelperUtilsBasic::getComponentImagePath(), $this->kurs->id, 3); $knopfunten .= " " . MatukioHelperUtilsEvents::getEmailWindow(MatukioHelperUtilsBasic::getComponentImagePath(), $this->kurs->id, 4);
</noscript> </div> <div id="mat_pageone"> <table class="mat_table table" border="0" cellpadding="8" cellspacing="8"> <?php foreach ($this->fields_p1 as $field) { // Prints the field in the table <tr><td>label</td><td>field</td> MatukioHelperUtilsBooking::printFieldElement($field, true); } ?> </table> <?php // Old event only fields.. should be removed some time... // Zusatzfelder ausgeben $buchopt = MatukioHelperUtilsEvents::getEventBookableArray(0, $this->event, $this->user->id); $html = ""; $tempdis = ""; $hidden = ""; $reqfield = " <span class=\"sem_reqfield\">*</span>"; $reqnow = "\n<tr>" . MatukioHelperUtilsEvents::getTableCell(" " . $reqfield . " " . JTEXT::_('COM_MATUKIO_REQUIRED_FIELD'), 'd', 'r', '', 'sem_nav', 2) . "</tr>"; $zusreq = 0; $zusfeld = MatukioHelperUtilsEvents::getAdditionalFieldsFrontend($this->event); $zustemp = array('', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''); if (count($buchopt[2]) > 0) { $zustemp = MatukioHelperUtilsEvents::getAdditionalFieldsFrontend($buchopt[2][0]); $zustemp = $zustemp[0]; } for ($i = 0; $i < count($zusfeld[0]); $i++) { if ($zusfeld[0][$i] != "" and ($buchopt[0] > 1 or $this->art == 3)) { $zusart = explode("|", $zusfeld[0][$i]);
* @author Yves Hoppe <*****@*****.**> * @date 11.11.13 * * @copyright Copyright (C) 2008 - 2013 Yves Hoppe - compojoom.com . All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE * @since 2.0.0 */ defined('_JEXEC') or die('Restricted access'); ?> <div class="mat_events"> <div class="mat_events_holder clearfix"> <?php for ($i = 0; $i < count($this->myofferEvents); $i++) { $event = $this->myofferEvents[$i]; // Check if we are able to book $buchopt = MatukioHelperUtilsEvents::getEventBookableArray(2, $event, $user->id); $eventid_l = $event->id . ':' . JFilterOutput::stringURLSafe($event->title); $catid_l = $event->catid . ':' . JFilterOutput::stringURLSafe(MatukioHelperCategories::getCategoryAlias($event->catid)); // Edit event $link = JRoute::_("index.php?option=com_matukio&view=createevent&cid=" . $event->eventid); // Image $zusimage = ""; $zusbild = 0; $linksbild = MatukioHelperUtilsBasic::getComponentImagePath() . "2801.png"; if ($event->publisher == $user->id) { $zusimage = MatukioHelperUtilsBasic::getComponentImagePath() . "2607.png"; } if ($user->id == 0) { $zusimage = ""; } if ($event->cancelled == 1) {
echo $this->booking->coupon_code; ?> " /> </td> </tr> <?php } } } ?> </table> <?php // Old event only fields.. should be removed some time... // Zusatzfelder ausgeben $buchopt = MatukioHelperUtilsEvents::getEventBookableArray(0, $event, $this->booking->userid); $html = ""; $tempdis = ""; $hidden = ""; $reqfield = " <span class=\"sem_reqfield\">*</span>"; $reqnow = "\n<tr>" . MatukioHelperUtilsEvents::getTableCell(" " . $reqfield . " " . JTEXT::_('COM_MATUKIO_REQUIRED_FIELD'), 'd', 'r', '', 'sem_nav', 2) . "</tr>"; $zusreq = 0; $zusfeld = MatukioHelperUtilsEvents::getAdditionalFieldsFrontend($event); $zustemp = array('', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''); if (!empty($buchopt[2][0])) { $zustemp = MatukioHelperUtilsEvents::getAdditionalFieldsFrontend($event, $buchopt[2][0]); } else { $zustemp = MatukioHelperUtilsEvents::getAdditionalFieldsFrontend($event); } $zustemp = $zustemp[0]; for ($i = 0; $i < count($zusfeld[0]); $i++) {
/** * Gets the upcoming events * * @param object $events - The events * @param object $user - The user * * @return string - The html code */ public static function getUpcomingEventsHTML($events, $user) { JHTML::_('stylesheet', 'media/com_matukio/css/upcoming.css'); $html = ""; if (count($events)) { $dispatcher = JDispatcher::getInstance(); JPluginHelper::importPlugin('content'); $params = JComponentHelper::getParams('com_matukio'); foreach ($events as $event) { $buchopt = MatukioHelperUtilsEvents::getEventBookableArray(0, $event, $user->id); // Link $eventid_l = $event->id . ':' . JFilterOutput::stringURLSafe($event->title); $catid_l = $event->catid . ':' . JFilterOutput::stringURLSafe(MatukioHelperCategories::getCategoryAlias($event->catid)); $link = JRoute::_(MatukioHelperRoute::getEventRoute($eventid_l, $catid_l), false); // Event image -- TODO Add / Check for category image $linksbild = MatukioHelperUtilsBasic::getComponentImagePath() . "2601.png"; if ($event->image != "" and MatukioHelperSettings::getSettings('event_image', 1) == 1) { $linksbild = MatukioHelperUtilsBasic::getEventImagePath(1) . $event->image; } $hot = $event->hot_event ? " " : ""; $top = $event->top_event ? " mat_top_event" : ""; // Starting Row $html .= '<div class="mat_single_event' . $hot . $top . '">'; $html .= ' <div class="mat_event_header">'; $html .= ' <div class="mat_event_header_inner">'; $html .= ' <div class="mat_event_header_line">'; $html .= ' <div class="mat_event_image">'; $html .= ' <img src="' . $linksbild . '" alt="' . $event->title . '" align="absmiddle" />'; $html .= ' </div>'; $html .= ' <div class="mat_event_title">'; $html .= ' <h2><a href="' . $link . '" title="' . $event->title . '">' . $event->title . '</a></h2>'; $html .= ' </div>'; $html .= ' </div>'; $html .= ' <div class="mat_event_location">'; $begin = JHTML::_('date', $event->begin, MatukioHelperSettings::getSettings('date_format', 'd-m-Y, H:i')); $location = $event->place; $locobj = null; if ($event->place_id > 0) { $locobj = MatukioHelperUtilsEvents::getLocation($event->place_id); $placelink = JRoute::_("index.php?option=com_matukio&view=location&id=" . $locobj->id . ":" . JFilterOutput::stringURLSafe($locobj->title)); $location = '<a href="' . $placelink . '">' . $locobj->location . '</a>'; } if (MatukioHelperSettings::getSettings('show_timezone', '1')) { $begin .= " (GMT " . JHTML::_('date', $event->booked, 'P') . ")"; } if ($event->webinar == 1) { $locimg = MatukioHelperUtilsBasic::getComponentImagePath() . "webinar.png"; $html .= '<h4><img src="' . $locimg . '" title="' . JText::_("COM_MATUKIO_WEBINAR") . '" style="width: 22px; vertical-align:middle" /> ' . $location . " " . JText::_("COM_MATUKIO_AT") . " " . $begin . '</h4>'; } else { // TODO add map link $locimg = MatukioHelperUtilsBasic::getComponentImagePath() . "home.png"; $html .= '<h4><img src="' . $locimg . '" title="' . JText::_("COM_MATUKIO_FIELDS_CITY") . '" style="width: 22px; vertical-align:middle" /> ' . $location . " " . JText::_("COM_MATUKIO_AT") . " " . $begin . '</h4>'; } $html .= ' </div>'; $html .= ' </div>'; $html .= ' </div>'; $html .= ' <div class="mat_event_description">'; $html .= $event->shortdesc; $html .= '</div>'; $html .= ' <div class="mat_event_footer">'; $html .= ' <div class="mat_event_footer_inner">'; $html .= ' <div class="mat_event_infoline">'; $catlink = JRoute::_("index.php?option=com_matukio&view=eventlist&art=0&catid=" . $event->catid . ":" . JFilterOutput::stringURLSafe($event->category)); $html .= '<a href="' . $catlink . '">' . JTEXT::_($event->category) . '</a>'; // Infoline $gebucht = MatukioHelperUtilsEvents::calculateBookedPlaces($event); if (MatukioHelperSettings::getSettings('event_showinfoline', 1) == 1) { $html .= " | "; // Veranstaltungsnummer anzeigen if ($event->semnum != "") { $html .= JTEXT::_('COM_MATUKIO_NUMBER') . ": " . $event->semnum . " | "; } $html .= JTEXT::_('COM_MATUKIO_BOOKABLE') . ": " . $buchopt[4]; } // Seminarleiter anzeigen if ($event->teacher != "") { $html .= " | " . $event->teacher; } // Fees if ($event->fees > 0) { $html .= " | "; $gebuehr = MatukioHelperUtilsEvents::getFormatedCurrency($event->fees); $currency = MatukioHelperSettings::getSettings('currency_symbol', '$'); if ($currency == '€') { $html .= JTEXT::_('COM_MATUKIO_FEES') . ': ' . $gebuehr . " " . $currency; } else { $html .= JTEXT::_('COM_MATUKIO_FEES') . ': ' . $currency . " " . $gebuehr; } } $html .= '</div>'; $html .= ' <div class="mat_event_footer_buttons" align="right">'; // Detail Link $html .= " <a title=\"" . $event->title . "\" href=\"" . $link . "\">" . "<span class=\"mat_button\"><img src=\"" . MatukioHelperUtilsBasic::getComponentImagePath() . "0012.png\" border=\"0\" align=\"absmiddle\"> " . JTEXT::_('COM_MATUKIO_EVENT_DETAILS') . "</span></a> "; // Booking Link if (($user->id != 0 || MatukioHelperSettings::getSettings('booking_unregistered', 1) == 1) && MatukioHelperSettings::getSettings('oldbookingform', 0) != 1) { if ($event->nrbooked > 0) { $bookinglink = JRoute::_("index.php?option=com_matukio&view=bookevent&cid=" . $event->id . ":" . JFilterOutput::stringURLSafe($event->title)); $html .= " <a title=\"" . JTEXT::_('COM_MATUKIO_BOOK') . "\" href=\"" . $bookinglink . "\"><span class=\"mat_button mat_book\" type=\"button\"><img src=\"" . MatukioHelperUtilsBasic::getComponentImagePath() . "1116.png\" border=\"0\" align=\"absmiddle\"> " . JTEXT::_('COM_MATUKIO_BOOK') . "</span></a>"; } } $html .= ' <br />'; $results = $dispatcher->trigger('onContentAfterButton', array('com_matukio.upcomingevent', &$event, &$params, 0)); $html .= trim(implode("\n", $results)); $html .= ' </div>'; $html .= ' </div>'; $html .= ' </div>'; $html .= ' </div>'; } } return $html; }