/** * Creates the output for the details view * * @since 0.9 */ function display($tpl = null) { $mainframe =& JFactory::getApplication(); $document = JFactory::getDocument(); // load event details $row = $this->get('Details'); $xreflinks = $this->get('XrefLinks'); $this->_eventlinks = $xreflinks; $document->setTitle($this->escape($row->full_title)); $document->setDescription(''); ob_start(); $this->setLayout('courseinfo_rss'); parent::display(); $contents = ob_get_contents(); ob_end_clean(); $link = JRoute::_(RedeventHelperRoute::getDetailsRoute($row->slug, $row->xslug)); // load individual item creator class $item = new JFeedItem(); $item->title = $row->full_title; $item->link = JRoute::_($link); $item->description = $contents; $item->date = ''; $item->category = ''; // loads item info into rss array $document->addItem($item); }
/** * Creates the Event Feed of the Venue * * @since 0.9 */ function display() { $mainframe =& JFactory::getApplication(); $doc =& JFactory::getDocument(); // Get some data from the model JRequest::setVar('limit', $mainframe->getCfg('feed_limit')); $rows =& $this->get('Data'); foreach ($rows as $row) { // strip html from feed item title $title = $this->escape($row->venue); $title = html_entity_decode($title); // url link to article // & used instead of & as this is converted by feed creator $link = RedeventHelperRoute::getVenueEventsRoute($row->slug); $link = JRoute::_($link); // strip html from feed item description text $description = $row->locdescription; @($created = $row->created ? date('r', strtotime($row->created)) : ''); // load individual item creator class $item = new JFeedItem(); $item->title = $title; $item->link = $link; $item->description = $description; $item->date = $created; // loads item info into rss array $doc->addItem($item); } }
function submitinfo() { jimport('joomla.mail.helper'); $app =& JFactory::getApplication(); $params = JComponentHelper::getParams('com_redevent'); if (!$params->get('enable_moreinfo', 1)) { echo Jtext::_('COM_REDEVENT_MOREINFO_ERROR_DISABLED_BY_ADMIN'); $app->close(403); } $xref = JRequest::getInt('xref'); $email = JRequest::getVar('email'); $model = $this->getModel('details'); $details = $model->getDetails(); if ($xref && $email && JMailHelper::isEmailAddress($email)) { $mailer =& JFactory::getMailer(); $mailer->IsHTML(true); $mailer->setSubject(JText::sprintf('COM_REDEVENT_MOREINFO_MAIL_SUBJECT', $details->full_title)); $mailer->AddAddress($app->getCfg('mailfrom'), $app->getCfg('sitename')); $mailer->AddReplyTo(array($email, JRequest::getVar('name'))); $data = array(); if ($d = JRequest::getVar('name')) { $data[] = array(Jtext::_('COM_REDEVENT_MOREINFO_LABEL_NAME'), $d); } if ($d = JRequest::getVar('email')) { $data[] = array(Jtext::_('COM_REDEVENT_MOREINFO_LABEL_EMAIL'), $d); } if ($d = JRequest::getVar('company')) { $data[] = array(Jtext::_('COM_REDEVENT_MOREINFO_LABEL_COMPANY'), $d); } if ($d = JRequest::getVar('phonenumber')) { $data[] = array(Jtext::_('COM_REDEVENT_MOREINFO_LABEL_PHONENUMBER'), $d); } if ($d = JRequest::getVar('comments')) { $data[] = array(Jtext::_('COM_REDEVENT_MOREINFO_LABEL_COMMENTS'), str_replace("\n", "<br/>", $d)); } $table = '<table>'; foreach ($data as $d) { $table .= '<tr><td>' . $d[0] . '</td><td>' . $d[1] . '</td></tr>'; } $table .= '</table>'; $link = JRoute::_(JURI::base() . RedeventHelperRoute::getDetailsRoute($details->did, $details->xslug)); $link = JHTML::link($link, $details->full_title); $body = JText::sprintf('COM_REDEVENT_MOREINFO_MAIL_BODY', $link, $table); $mailer->setBody($body); $mailer->send(); } // confirm sending JRequest::setVar('view', 'moreinfo'); Jrequest::setVar('layout', 'final'); $this->display(); }
/** * Creates the output * * @since 0.5 * @param int $tpl */ function display($tpl = null) { $params = JComponentHelper::getParams('com_redevent'); if (!$params->get('enable_moreinfo', 1)) { echo Jtext::_('COM_REDEVENT_MOREINFO_ERROR_DISABLED_BY_ADMIN'); return; } if ($this->getLayout() == 'final') { return $this->_displayFinal($tpl); } $xref = JRequest::getInt('xref'); $uri =& JFactory::getUri(); $document = JFactory::getDocument(); $user =& Jfactory::getUser(); if (!$xref) { echo JText::_('COM_REDEVENT_MOREINFO_ERROR_MISSING_XREF'); } $document->addStyleSheet($this->baseurl . '/components/com_redevent/assets/css/moreinfo.css'); $this->assign('xref', $xref); $this->assign('action', JRoute::_(RedeventHelperRoute::getMoreInfoRoute($xref))); $this->assignRef('user', $user); parent::display($tpl); }
<?php //loop through attendees foreach ($this->registers as $key => $register) { if ($register->submitter->waitinglist == 1) { if ($register->submitter->uid == $this->user->get('id')) { echo '<li><ul class="attendee myreg">'; } else { echo '<li><ul class="attendee">'; } foreach ($register->answers as $k => $name) { if (stristr($name, '~~~')) { $name = str_replace('~~~', '<br />', $name) . '<br />'; } echo "<li class='userfield " . strtolower($k) . "'>" . $name . "</li>"; } if ($this->unreg_check && $register->submitter->uid == $this->user->get('id') || $this->candeleteattendees) { $unreg_url = JRoute::_(RedeventHelperRoute::getDetailsRoute($this->row->slug, $this->row->xslug) . '&task=delreguser&rid=' . $register->attendee_id); echo '<li>' . JHTML::link($unreg_url, JText::_('COM_REDEVENT_UNREGISTER'), array('class' => 'unreglink')) . '</li>'; } echo '</ul></li>'; } } ?> </ul> </div> <?php } ?> </div> <?php }
?> </td> <?php } ?> <?php $edit_url = JRoute::_('index.php?option=com_redevent&controller=registration&task=manageredit&xref=' . $this->row->xref . '&submitter_id=' . $register->id); ?> <td class="edit"> <?php echo JHTML::link($edit_url, $edit_image, array('class' => 'editlink')); ?> </td> <?php $unreg_url = JRoute::_(RedeventHelperRoute::getManageAttendees($this->row->xref, 'managedelreguser') . '&rid=' . $register->attendee_id); ?> <td class="attendee"> <?php echo JHTML::link($unreg_url, $remove_image, array('class' => 'unreglink')); ?> </td> <td><?php echo $this->row->course_code . '-' . $this->row->xref . '-' . $register->attendee_id; ?> </td> </tr> <?php } else { $waiting_count++; ?>
<div class="description"> <div class="event-title" itemprop="name"> <a href="<?php echo $detaillink; ?> " itemprop="url"><?php echo $this->escape($row->full_title); ?> </a> </div> <div class="event-venue" itemprop="location" itemscope itemtype="http://schema.org/Place"> <?php if ($this->params->get('showlinkvenue', 1) == 1) { echo $row->xref != 0 ? JHTML::link(JRoute::_(RedeventHelperRoute::getVenueEventsRoute($row->venueslug)), '@ ' . $this->escape($row->venue), 'itemprop="url"') : '-'; } else { echo $row->xref ? $this->escape($row->venue) : '-'; } ?> </div> <div class="summary"><?php echo $row->summary; ?> </div> </div> </div> <?php } ?> </div>
/** * Logic to get the venue * * @return array */ function &getData() { $mainframe =& JFactory::getApplication(); if (empty($this->_venue)) { if ($this->_id) { // Load the Event data $query = ' SELECT v.id, v.venue, v.url, v.street, v.plz, v.city, v.state, v.country, v.locdescription, v.locimage, v.latitude, v.longitude, v.company, ' . ' COUNT( a.id ) AS assignedevents,' . ' CASE WHEN CHAR_LENGTH(v.alias) THEN CONCAT_WS(\':\', v.id, v.alias) ELSE v.id END as slug' . ' FROM #__redevent_venues as v' . ' LEFT JOIN #__redevent_event_venue_xref AS a ON a.venueid = v.id AND a.published = 1' . ' WHERE v.id = ' . $this->_db->Quote($this->_id) . ' GROUP BY v.id '; $this->_db->setQuery($query); $venue = $this->_db->loadObject(); //Create image information $venue->limage = redEVENTImage::flyercreator($venue->locimage); //Generate Venuedescription if (!empty($venue->locdescription)) { //execute plugins $venue->locdescription = JHTML::_('content.prepare', $venue->locdescription); } //build the url if (!empty($venue->url) && strtolower(substr($venue->url, 0, 7)) != "http://") { $venue->url = 'http://' . $venue->url; } //prepare the url for output if (strlen(htmlspecialchars($venue->url, ENT_QUOTES)) > 35) { $venue->urlclean = substr(htmlspecialchars($venue->url, ENT_QUOTES), 0, 35) . '...'; } else { $venue->urlclean = htmlspecialchars($venue->url, ENT_QUOTES); } //create flag if ($venue->country) { $venue->countryimg = REOutput::getFlag($venue->country); } //create target link $venue->targetlink = JRoute::_(RedeventHelperRoute::getVenueEventsRoute($venue->slug)); $venue->categories = $this->_getVenueCategories($this->_id); $this->_venue = $venue; } } return $this->_venue; }
function mkWeekNum($var) { $year = $this->actyear; $week = $this->getWeekNum($var); if ($week > 50 && $this->actmonth == 1) { $year = $this->actyear - 1; } $out = ""; if ($this->weekUrl || 1) { $out .= JHTML::link(RedeventHelperRoute::getWeekRoute(sprintf("%d-%02d", $year, $week)), $week); // if (strpos($this->weekUrl,"?") === false) $glue="?"; // else $glue="&"; // $out.="<a href=\"".$this->weekUrl.$glue.$this->yearID."=".$year."&".$this->weekID."=".$week."\">".$week."</a>"; } elseif ($this->javaScriptWeek) { $out .= "<a href=\"javascript:" . $this->javaScriptWeek . "(" . $year . "," . $week . ")\">" . $week . "</a>"; } else { $out .= $week; } return $out; }
function getObjectLink($id) { // url link creation for given object by id $link = JRoute::_(RedeventHelperRoute::getDetailsRoute($id)); return $link; }
echo $row->state ? $this->escape($row->state) : '-'; ?> </td> <?php break; ?> <?php case 'category': ?> <td class="re_category"> <?php $cats = array(); foreach ($row->categories as $cat) { if ($this->params->get('catlinklist', 1) == 1) { $cats[] = JHTML::link(RedeventHelperRoute::getCategoryEventsRoute($cat->slug), $cat->catname); } else { $cats[] = $this->escape($cat->catname); } } echo implode("<br/>", $cats); ?> </td> <?php break; ?> <?php case 'picture': ?> <td class="re_places" itemprop="image"><?php
* GNU General Public License for more details. * You should have received a copy of the GNU General Public License * along with redEVENT; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ defined('_JEXEC') or die('Restricted access'); ?> <ul class="rf_thumbevents vcalendar"> <?php foreach ($this->rows as $row) { ?> <?php $img = redEVENTImage::getThumbUrl($row->datimage); $img = $img ? JHTML::image($img, $row->full_title) : false; $detaillink = JRoute::_(RedeventHelperRoute::getDetailsRoute($row->slug, $row->xslug)); $venuelink = JRoute::_(RedeventHelperRoute::getVenueEventsRoute($row->venueslug)); ?> <li class="rf_thumbevent vevent<?php echo $row->featured ? ' featured' : ''; ?> "> <?php if ($img) { ?> <?php echo JHTML::_('link', JRoute::_($detaillink), $img, array('class' => 'rf_img')); ?> <?php } else { ?> <div class="rf_img"></div>
function deletexref() { $acl = new UserAcl(); $xref = JRequest::getInt('xref'); if (!$acl->canEditXref($xref)) { $msg = JText::_('COM_REDEVENT_MYEVENTS_DELETE_XREF_NOTE_ALLOWED'); $this->setRedirect(JRoute::_(RedeventHelperRoute::getMyEventsRoute(), false), $msg, 'error'); return; } $model = $this->getModel('editevent'); if ($model->deletexref($xref)) { $msg = JText::_('COM_REDEVENT_EVENT_DATE_DELETED'); $this->setRedirect(JRoute::_(RedeventHelperRoute::getMyEventsRoute(), false), $msg); } else { $msg = JText::_('COM_REDEVENT_EVENT_DATE_DELETION_ERROR') . '<br>' . $model->getError(); $this->setRedirect(JRoute::_(RedeventHelperRoute::getMyEventsRoute(), false), $msg, 'error'); } }
<?php if ($this->params->get('events_rsscal', 0)) { ?> <span class="events-rsscal"> <?php echo JHTML::link(JRoute::_(RedeventHelperRoute::getFeaturedRoute(null, 'rsscal') . '&format=feed'), JHTML::image('components/com_redevent/assets/images/rsscal2.0.png', JText::_('COM_REDEVENT_EXPORT_RSSCAL'))); ?> </span> <?php } ?> <?php if ($this->params->get('events_ical', 1)) { ?> <span class="events-ical"> <?php echo JHTML::link(JRoute::_(RedeventHelperRoute::getFeaturedRoute() . '&format=raw&layout=ics'), JHTML::image('components/com_redevent/assets/images/iCal2.0.png', JText::_('COM_REDEVENT_EXPORT_ICS'))); ?> </span> <?php } ?> </div> <!-- end: exports --> <?php } ?> </div>
/** * Method to store the venue * * @access public * @return id * @since 0.9 */ function store($data, $file) { $mainframe =& JFactory::getApplication(); $user =& JFactory::getUser(); $elsettings =& redEVENTHelper::config(); //Get mailinformation $SiteName = $mainframe->getCfg('sitename'); $MailFrom = $mainframe->getCfg('mailfrom'); $FromName = $mainframe->getCfg('fromname'); $tzoffset = $mainframe->getCfg('offset'); $params = $mainframe->getParams('com_redevent'); $row =& JTable::getInstance('redevent_venues', ''); //bind it to the table if (!$row->bind($data)) { RedeventError::raiseError(500, $this->_db->stderr()); return false; } //Are we saving from an item edit? if ($row->id) { $row->modified = gmdate('Y-m-d H:i:s'); $row->modified_by = $user->get('id'); } else { //get IP, time and userid $row->created = gmdate('Y-m-d H:i:s'); $row->author_ip = $elsettings->get('storeip', '1') ? getenv('REMOTE_ADDR') : 'DISABLED'; $row->created_by = $user->get('id'); } //Image upload //If image upload is required we will stop here if no file was attached if (empty($file['name']) && $params->get('edit_image', 1) == 2) { $this->setError(JText::_('COM_REDEVENT_IMAGE_EMPTY')); return false; } if (($params->get('edit_image', 1) == 2 || $params->get('edit_image', 1) == 1) && !empty($file['name'])) { jimport('joomla.filesystem.file'); if ($params->get('default_image_path', 'redevent')) { $reldirpath = $params->get('default_image_path', 'redevent') . DS . 'venues' . DS; } else { $reldirpath = ''; } $base_Dir = JPATH_SITE . DS . 'images' . DS . $reldirpath; //check the image $check = redEVENTImage::check($file, $elsettings); if ($check === false) { $mainframe->redirect($_SERVER['HTTP_REFERER']); } //sanitize the image filename $filename = redEVENTImage::sanitize($base_Dir, $file['name']); $filepath = $base_Dir . $filename; if (!JFile::upload($file['tmp_name'], $filepath)) { $this->setError(JText::_('COM_REDEVENT_UPLOAD_FAILED')); return false; } else { $row->locimage = 'images' . DS . $reldirpath . $filename; } } else { //keep image if edited and left blank $row->locimage = $row->curimage; } //end image upload if //Check description $editoruser = ELUser::editoruser(); if (!$editoruser) { //check description --> wipe out code $row->locdescription = strip_tags($row->locdescription, '<br><br/>'); //convert the linux \n (Mac \r, Win \r\n) to <br /> linebreaks $row->locdescription = str_replace(array("\r\n", "\r", "\n"), "<br />", $row->locdescription); //cut too long words $row->locdescription = wordwrap($row->locdescription, 75, " ", 1); //check length $length = JString::strlen($row->locdescription); if ($length > $params->get('max_description', 1000)) { // if required shorten it $row->locdescription = JString::substr($row->locdescription, 0, $params->get('max_description', 1000)); //if shortened add ... $row->locdescription = $row->locdescription . '...'; } } $row->venue = trim(JFilterOutput::ampReplace($row->venue)); //Make sure the data is valid if (!$row->check($elsettings)) { $this->setError($row->getError()); return false; } //is this an edited venue or not? //after store we allways have an id $edited = $row->id ? $row->id : false; //store it in the db if (!$row->store()) { $this->setError($this->_db->getErrorMsg()); return false; } // update the event category xref // first, delete current rows for this event $query = ' DELETE FROM #__redevent_venue_category_xref WHERE venue_id = ' . $this->_db->Quote($row->id); $this->_db->setQuery($query); if (!$this->_db->query()) { $this->setError($this->_db->getErrorMsg()); return false; } // insert new ref foreach ((array) $data['categories'] as $cat_id) { $query = ' INSERT INTO #__redevent_venue_category_xref (venue_id, category_id) VALUES (' . $this->_db->Quote($row->id) . ', ' . $this->_db->Quote($cat_id) . ')'; $this->_db->setQuery($query); if (!$this->_db->query()) { $this->setError($this->_db->getErrorMsg()); return false; } } // attachments if ($params->get('allow_attachments', 1)) { REAttach::store('venue' . $row->id); } jimport('joomla.utilities.mail'); $link = JRoute::_(JURI::base() . RedeventHelperRoute::getVenueEventsRoute($row->id), false); //create mail if ($params->get('mailinform') == 2 || $params->get('mailinform') == 3) { $mail = JFactory::getMailer(); $state = $row->published ? JText::sprintf('COM_REDEVENT_MAIL_VENUE_PUBLISHED', $link) : JText::_('COM_REDEVENT_MAIL_VENUE_UNPUBLISHED'); if ($edited) { $modified_ip = getenv('REMOTE_ADDR'); $edited = JHTML::Date($row->modified, JText::_('DATE_FORMAT_LC2')); $mailbody = JText::sprintf('COM_REDEVENT_MAIL_EDIT_VENUE', $user->name, $user->username, $user->email, $modified_ip, $edited, $row->venue, $row->url, $row->street, $row->plz, $row->city, $row->country, $row->locdescription, $state); $mail->setSubject($SiteName . JText::_('COM_REDEVENT_EDIT_VENUE_MAIL')); } else { $created = JHTML::Date($row->modified, JText::_('DATE_FORMAT_LC2')); $mailbody = JText::sprintf('COM_REDEVENT_MAIL_NEW_VENUE', $user->name, $user->username, $user->email, $row->author_ip, $created, $row->venue, $row->url, $row->street, $row->plz, $row->city, $row->country, $row->locdescription, $state); $mail->setSubject($SiteName . JText::_('COM_REDEVENT_NEW_VENUE_MAIL')); } $receivers = explode(',', trim($params->get('mailinformrec'))); $mail->addRecipient($receivers); $mail->setSender(array($MailFrom, $FromName)); $mail->setBody($mailbody); if (!$mail->Send()) { RedeventHelperLog::simpleLog('Error sending created/edited venue notification to site owner'); } } //create the mail for the user if ($params->get('mailinformuser') == 2 || $params->get('mailinformuser') == 3) { $usermail = JFactory::getMailer(); $state = $row->published ? JText::sprintf('COM_REDEVENT_USER_MAIL_VENUE_PUBLISHED', $link) : JText::_('COM_REDEVENT_USER_MAIL_VENUE_UNPUBLISHED'); if ($edited) { $edited = JHTML::Date($row->modified, JText::_('DATE_FORMAT_LC2')); $mailbody = JText::sprintf('COM_REDEVENT_USER_MAIL_EDIT_VENUE', $user->name, $user->username, $edited, $row->venue, $row->url, $row->street, $row->plz, $row->city, $row->country, $row->locdescription, $state); $usermail->setSubject($SiteName . JText::_('COM_REDEVENT_EDIT_USER_VENUE_MAIL')); } else { $created = JHTML::Date($row->modified, JText::_('DATE_FORMAT_LC2')); $mailbody = JText::sprintf('COM_REDEVENT_USER_MAIL_NEW_VENUE', $user->name, $user->username, $created, $row->venue, $row->url, $row->street, $row->plz, $row->city, $row->country, $row->locdescription, $state); $usermail->setSubject($SiteName . JText::_('COM_REDEVENT_NEW_USER_VENUE_MAIL')); } $usermail->addRecipient($user->email); $usermail->setSender(array($MailFrom, $FromName)); $usermail->setBody($mailbody); if (!$usermail->Send()) { RedeventHelperLog::simpleLog('Error sending created/edited venue notification to venue owner'); } } //update item order $row->reorder(); return $row->id; }
/** * Method to build the sortlists * * @access private * @return array * @since 0.9 */ function _buildSortLists() { $app =& JFactory::getApplication(); $uri =& JFactory::getURI(); // remove previously set filter in get $uri->delVar('filter'); $uri->delVar('filter_type'); $uri->delVar('filter_category'); $uri->delVar('filter_venuecategory'); $uri->delVar('filter_venue'); $uri->delVar('filter_event'); $uri->delVar('filtercustom'); $elsettings =& redEVENTHelper::config(); $params = $app->getParams(); $filter_order = JRequest::getCmd('filter_order', 'x.dates'); $filter_order_Dir = JRequest::getWord('filter_order_Dir', 'ASC'); $state = $this->get('state'); $filter = $state->get('filter'); $filter_type = $state->get('filter_type'); $filter_category = $state->get('filter_category'); $filter_venue = $state->get('filter_venue'); $filter_event = $state->get('filter_event'); $this->assign('action', JRoute::_(RedeventHelperRoute::getFeaturedRoute())); $sortselects = array(); if ($params->get('filter_type_event', 1)) { $sortselects[] = JHTML::_('select.option', 'title', JText::_('COM_REDEVENT_FILTER_SELECT_EVENT')); } if ($params->get('filter_type_venue', 1)) { $sortselects[] = JHTML::_('select.option', 'venue', JText::_('COM_REDEVENT_FILTER_SELECT_VENUE')); } if ($params->get('filter_type_city', 1)) { $sortselects[] = JHTML::_('select.option', 'city', JText::_('COM_REDEVENT_FILTER_SELECT_CITY')); } if ($params->get('filter_type_category', 1)) { $sortselects[] = JHTML::_('select.option', 'type', JText::_('COM_REDEVENT_FILTER_SELECT_CATEGORY')); } if (count($sortselects) == 0) { $sortselect = false; } else { if (count($sortselects) == 1) { $sortselect = '<input type="hidden" name="filter_type" value="' . $sortselects[0]->value . '" />'; } else { $sortselect = JHTML::_('select.genericlist', $sortselects, 'filter_type', 'size="1" class="inputbox"', 'value', 'text', $filter_type); } } // category filter $options = array(JHTML::_('select.option', '', JText::_('COM_REDEVENT_FILTER_SELECT_CATEGORY'))); $options = array_merge($options, $this->get('CategoriesOptions')); $lists['categoryfilter'] = JHTML::_('select.genericlist', $options, 'filter_category', 'size="1" class="inputbox dynfilter"', 'value', 'text', $filter_category); // venue filter $options = array(JHTML::_('select.option', '', JText::_('COM_REDEVENT_FILTER_SELECT_VENUE'))); $options = array_merge($options, $this->get('VenuesOptions')); $lists['venuefilter'] = JHTML::_('select.genericlist', $options, 'filter_venue', 'size="1" class="inputbox dynfilter"', 'value', 'text', $filter_venue); // events filter if ($params->get('lists_filter_event', 0)) { $options = array(JHTML::_('select.option', '', JText::_('COM_REDEVENT_FILTER_SELECT_EVENT'))); $options = array_merge($options, $this->get('EventsOptions')); $lists['eventfilter'] = JHTML::_('select.genericlist', $options, 'filter_event', 'size="1" class="inputbox dynfilter"', 'value', 'text', $filter_event); } $lists['order_Dir'] = $filter_order_Dir; $lists['order'] = $filter_order; $lists['filter'] = $filter; $lists['filter_type'] = $sortselect; return $lists; }
function icalAddEvent(&$calendartool, $event) { require_once JPATH_SITE . DS . 'components' . DS . 'com_redevent' . DS . 'classes' . DS . 'iCalcreator.class.php'; $mainframe =& JFactory::getApplication(); $params = $mainframe->getParams('com_redevent'); $offset = $params->get('ical_timezone', 1); $timezone_name = self::getTimeZone($offset); // get categories names $categories = array(); foreach ($event->categories as $c) { $categories[] = $c->catname; } if (!$event->dates || $event->dates == '0000-00-00') { // no start date... return false; } // make end date same as start date if not set if (!$event->enddates || $event->enddates == '0000-00-00') { $event->enddates = $event->dates; } // start if (!preg_match('/([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})/', $event->dates, $start_date)) { JError::raiseError(0, JText::_('COM_REDEVENT_ICAL_EXPORT_WRONG_STARTDATE_FORMAT')); } $date = array('year' => (int) $start_date[1], 'month' => (int) $start_date[2], 'day' => (int) $start_date[3]); // all day event if start time is not set if (!$event->times || $event->times == '00:00:00') { $dateparam = array('VALUE' => 'DATE'); // for ical all day events, dtend must be send to the next day $event->enddates = strftime('%Y-%m-%d', strtotime($event->enddates . ' +1 day')); if (!preg_match('/([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})/', $event->enddates, $end_date)) { JError::raiseError(0, JText::_('COM_REDEVENT_ICAL_EXPORT_WRONG_ENDDATE_FORMAT')); } $date_end = array('year' => $end_date[1], 'month' => $end_date[2], 'day' => $end_date[3]); $dateendparam = array('VALUE' => 'DATE'); } else { if (!preg_match('/([0-9]{2}):([0-9]{2}):([0-9]{2})/', $event->times, $start_time)) { JError::raiseError(0, JText::_('COM_REDEVENT_ICAL_EXPORT_WRONG_STARTTIME_FORMAT')); } $date['hour'] = $start_time[1]; $date['min'] = $start_time[2]; $date['sec'] = $start_time[3]; $dateparam = array('VALUE' => 'DATE-TIME'); if (!$params->get('ical_no_timezone', 0)) { $dateparam['TZID'] = $timezone_name; } if (!$event->endtimes || $event->endtimes == '00:00:00') { $event->endtimes = $event->times; } // if same day but end time < start time, change end date to +1 day if ($event->enddates == $event->dates && strtotime($event->dates . ' ' . $event->endtimes) < strtotime($event->dates . ' ' . $event->times)) { $event->enddates = strftime('%Y-%m-%d', strtotime($event->enddates . ' +1 day')); } if (!preg_match('/([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})/', $event->enddates, $end_date)) { JError::raiseError(0, JText::_('COM_REDEVENT_ICAL_EXPORT_WRONG_ENDDATE_FORMAT')); } $date_end = array('year' => $end_date[1], 'month' => $end_date[2], 'day' => $end_date[3]); if (!preg_match('/([0-9]{2}):([0-9]{2}):([0-9]{2})/', $event->endtimes, $end_time)) { JError::raiseError(0, JText::_('COM_REDEVENT_ICAL_EXPORT_WRONG_STARTTIME_FORMAT')); } $date_end['hour'] = $end_time[1]; $date_end['min'] = $end_time[2]; $date_end['sec'] = $end_time[3]; $dateendparam = array('VALUE' => 'DATE-TIME'); if (!$params->get('ical_no_timezone', 0)) { $dateendparam['TZID'] = $timezone_name; } } $title = isset($event->full_title) ? $event->full_title : $event->title; // item description text $description = $title . '\\n'; $description .= JText::_('COM_REDEVENT_CATEGORY') . ': ' . implode(', ', $categories) . '\\n'; // if (isset($event->summary) && $event->summary) { // $description .= $event->summary.'\\n'; // } // url link to event $link = JURI::base() . RedeventHelperRoute::getDetailsRoute($event->slug, $event->xref); $link = JRoute::_($link); $description .= JText::_('COM_REDEVENT_ICS_LINK') . ': ' . $link . '\\n'; if (!empty($event->icaldetails)) { $description .= $event->icaldetails; } // location $location = array(); if (isset($event->icalvenue) && !empty($event->icalvenue)) { $location[] = $event->icalvenue; } else { $location[] = $event->venue; if (isset($event->street) && !empty($event->street)) { $location[] = $event->street; } if (isset($event->city) && !empty($event->city)) { $location[] = $event->city; } if (isset($event->countryname) && !empty($event->countryname)) { $exp = explode(",", $event->countryname); $location[] = $exp[0]; } } $location = implode(",", $location); $e = new vevent(); // initiate a new EVENT $e->setProperty('summary', $title); // title $e->setProperty('categories', implode(', ', $categories)); // categorize $e->setProperty('dtstart', $date, $dateparam); if (count($date_end)) { $e->setProperty('dtend', $date_end, $dateendparam); } $e->setProperty('description', $description); // describe the event $e->setProperty('location', $location); // locate the event $e->setProperty('url', $link); $e->setProperty('uid', 'event' . $event->id . '-' . $event->xref . '@' . $mainframe->getCfg('sitename')); $calendartool->addComponent($e); // add component to calendar return true; }
function _displayRssCal() { define('CACHE', './cache'); $mainframe =& JFactory::getApplication(); $elsettings = redEVENTHelper::config(); $id = JRequest::getInt('id'); $offset = (double) $mainframe->getCfg('offset'); $hours = $offset >= 0 ? floor($offset) : ceil($offset); $mins = abs($offset - $hours) * 60; $utcoffset = sprintf('%+03d:%02d', $hours, $mins); $feed = new rsscalCreator('redEVENT feed', JURI::base(), ''); $feed->setFilename(CACHE, 'venue' . $id . '.rss'); $model = $this->getModel(); $model->setLimit($elsettings->get('ical_max_items', 100)); $model->setLimitstart(0); $rows =& $this->get('Data'); foreach ($rows as $row) { // strip html from feed item title $title = $this->escape($row->full_title); $title = html_entity_decode($title); // strip html from feed item category if (!empty($row->categories)) { $category = array(); foreach ($row->categories as $cat) { $category[] = $cat->catname; } $category = $this->escape(implode(', ', $category)); $category = html_entity_decode($category); } else { $category = ''; } //Format date $date = strftime($elsettings->get('formatdate', '%d.%m.%Y'), strtotime($row->dates)); $rssstartdate = $row->dates; if (!$row->enddates) { $displaydate = $date; $rssenddate = $row->dates; } else { $enddate = strftime($elsettings->get('formatdate', '%d.%m.%Y'), strtotime($row->enddates)); $rssenddate = $row->enddates; $displaydate = $date . ' - ' . $enddate; } //Format time if ($row->times) { $time = strftime($elsettings->get('formattime', '%H:%M'), strtotime($row->times)); $displaytime = $time; $rssstartdate .= 'T' . $row->times . $utcoffset; } if ($row->endtimes) { $endtime = strftime($elsettings->get('formattime', '%H:%M'), strtotime($row->endtimes)); $displaytime = $time . ' - ' . $endtime; $rssenddate .= 'T' . $row->endtimes . $utcoffset; } // url link to event $link = JURI::base() . RedeventHelperRoute::getDetailsRoute($row->id); $link = JRoute::_($link); $item = new rsscalItem($row->full_title, $link); $item->addElement('ev:type', $category); // $item->addElement( 'ev:organizer', "" ); $item->addElement('ev:location', $row->venue); $item->addElement('ev:startdate', $rssstartdate); $item->addElement('ev:enddate', $rssenddate); $item->addElement('dc:subject', $row->full_title); $feed->addItem($item); } $feed->returnRSS(CACHE); }
function _getTag_phonesignup() { $registration_status = $this->_canRegister(); if (!$registration_status->canregister) { $img = JHTML::_('image', JURI::root() . 'components/com_redevent/assets/images/agt_action_fail.png', $registration_status->status, array('class' => 'hasTip', 'title' => $registration_status->status)); return $img; } $mainframe =& JFactory::getApplication(); $base_url = JURI::root(); $iconspath = $base_url . 'administrator/components/com_redevent/assets/images/'; $elsettings = redEVENTHelper::config(); $text = '<span class="vlink phone">' . JHTML::_('link', $this->absoluteUrls(RedeventHelperRoute::getSignupRoute('phone', $this->getEvent()->getData()->slug, $this->getEvent()->getData()->xslug)), JHTML::_('image', $iconspath . $elsettings->get('signup_phone_img'), JText::_($elsettings->get('signup_phone_text')), 'width="24px" height="24px"')) . '</span> '; return $text; }
/** * Creates the Categoryevents View * * @since 0.9 */ function display($tpl = null) { $mainframe =& JFactory::getApplication(); $option = JRequest::getCmd('option'); //initialize variables $document =& JFactory::getDocument(); $menu =& JSite::getMenu(); $elsettings =& redEVENTHelper::config(); $item = $menu->getActive(); $params =& $mainframe->getParams(); $uri =& JFactory::getURI(); $pathway =& $mainframe->getPathWay(); if (!$this->getLayout()) { $this->setLayout($params->get('default_list_layout')); } /* Check if the item is an object */ if (!is_object($item)) { $item = new StdClass(); $item->title = ''; } //add css file if (!$params->get('custom_css')) { $document->addStyleSheet($this->baseurl . '/components/com_redevent/assets/css/redevent.css'); } else { $document->addStyleSheet($params->get('custom_css')); } $document->addCustomTag('<!--[if IE]><style type="text/css">.floattext{zoom:1;}, * html #eventlist dd { height: 1%; }</style><![endif]-->'); // add js JHTML::_('behavior.mootools'); // for filter hint $document->addScript($this->baseurl . '/components/com_redevent/assets/js/eventslist.js'); // Request variables $limitstart = JRequest::getInt('limitstart'); $limit = $mainframe->getUserStateFromRequest('com_redevent.categoryevents.limit', 'limit', $params->def('display_num', 0), 'int'); $task = JRequest::getWord('task'); $pop = JRequest::getBool('pop'); //get data from model $rows =& $this->get('Data'); $customs =& $this->get('ListCustomFields'); $customsfilters =& $this->get('CustomFilters'); $category =& $this->get('Category'); $total =& $this->get('Total'); //are events available? if (!$rows) { $noevents = 1; } else { $noevents = 0; } //does the category exist if ($category->id == 0) { return JError::raiseError(404, JText::sprintf('COM_REDEVENT_Category_d_not_found', $category->id)); } //Set Meta data if (!$item->title) { $document->setTitle($category->catname); } else { $document->setTitle($item->title . ' - ' . $category->catname); } $document->setMetadata('keywords', $category->meta_keywords); $document->setDescription(strip_tags($category->meta_description)); //Print function $params->def('print', !$mainframe->getCfg('hidePrint')); $params->def('icons', $mainframe->getCfg('icons')); if ($pop) { $params->set('popup', 1); } //add alternate feed link $link = RedeventHelperRoute::getCategoryEventsRoute($category->slug) . '&format=feed'; $attribs = array('type' => 'application/rss+xml', 'title' => 'RSS 2.0'); $document->addHeadLink(JRoute::_($link . '&type=rss'), 'alternate', 'rel', $attribs); $attribs = array('type' => 'application/atom+xml', 'title' => 'Atom 1.0'); $document->addHeadLink(JRoute::_($link . '&type=atom'), 'alternate', 'rel', $attribs); if ($task == 'archive') { $link = RedeventHelperRoute::getCategoryEventsRoute($category->slug, 'archive'); $pathway->addItem(JText::_('COM_REDEVENT_ARCHIVE') . ' - ' . $category->catname, JRoute::_($link)); $print_link = JRoute::_($link . '&pop=1&tmpl=component'); } else { $link = RedeventHelperRoute::getCategoryEventsRoute($category->slug); $pathway->addItem($category->catname, JRoute::_($link)); $print_link = JRoute::_($link . '&pop=1&tmpl=component'); } $thumb_link = RedeventHelperRoute::getCategoryEventsRoute($category->slug, null, 'thumb'); $list_link = RedeventHelperRoute::getCategoryEventsRoute($category->slug, null, 'default'); //Check if the user has access to the form $maintainer = ELUser::ismaintainer(); $genaccess = ELUser::validate_user($elsettings->get('evdelrec'), $elsettings->get('delivereventsyes')); if ($maintainer || $genaccess) { $dellink = 1; } // Create the pagination object jimport('joomla.html.pagination'); $pageNav = new JPagination($total, $limitstart, $limit); //Generate Categorydescription if (empty($category->catdescription)) { $catdescription = JText::_('COM_REDEVENT_NO_DESCRIPTION'); } else { //execute plugins $catdescription = JHTML::_('content.prepare', $category->catdescription); } //create select lists $lists = $this->_buildSortLists($elsettings); $state =& $this->get('state'); $filter_customs = $state->get('filter_customs'); $this->assign('lists', $lists); $this->assign('action', JRoute::_('index.php?option=com_redevent&view=categoryevents&id=' . $category->id)); $this->assignRef('rows', $rows); $this->assignRef('customs', $customs); $this->assignRef('noevents', $noevents); $this->assignRef('category', $category); $this->assignRef('print_link', $print_link); $this->assignRef('params', $params); $this->assignRef('dellink', $dellink); $this->assignRef('task', $task); $this->assignRef('catdescription', $catdescription); $this->assignRef('pageNav', $pageNav); $this->assignRef('elsettings', $elsettings); $this->assignRef('item', $item); $this->assignRef('config', $elsettings); $this->assignRef('thumb_link', $thumb_link); $this->assignRef('list_link', $list_link); $this->assignRef('customsfilters', $customsfilters); $this->assign('filter_customs', $filter_customs); $cols = explode(',', $params->get('lists_columns', 'date, title, venue, city, category')); $cols = redEVENTHelper::validateColumns($cols); $this->assign('columns', $cols); parent::display($tpl); }
/** * Creates the Day View * * @since 0.9 */ function display($tpl = null) { $mainframe =& JFactory::getApplication(); //initialize variables $document =& JFactory::getDocument(); $elsettings =& redEVENTHelper::config(); $menu =& JSite::getMenu(); $item = $menu->getActive(); $params =& $mainframe->getParams(); $uri =& JFactory::getURI(); //add css file if (!$params->get('custom_css')) { $document->addStyleSheet($this->baseurl . '/components/com_redevent/assets/css/redevent.css'); } else { $document->addStyleSheet($params->get('custom_css')); } $document->addCustomTag('<!--[if IE]><style type="text/css">.floattext{zoom:1;}, * html #eventlist dd { height: 1%; }</style><![endif]-->'); // add js JHTML::_('behavior.mootools'); // for filter hint $document->addScript($this->baseurl . '/components/com_redevent/assets/js/eventslist.js'); // get variables $limitstart = JRequest::getVar('limitstart', 0, '', 'int'); $limit = JRequest::getVar('limit', $params->get('display_num'), '', 'int'); $pop = JRequest::getBool('pop'); $pathway =& $mainframe->getPathWay(); //get data from model $rows =& $this->get('Data'); $customs =& $this->get('ListCustomFields'); $total =& $this->get('Total'); $day =& $this->get('Day'); $daydate = strftime($elsettings->get('formatdate', '%d.%m.%Y'), strtotime($day)); //are events available? if (!$rows) { $noevents = 1; } else { $noevents = 0; } //params if ($item) { $params->def('page_title', $item->title); } if ($pop) { //If printpopup set true $params->set('popup', 1); } $print_link = JRoute::_('index.php?view=day&tmpl=component&pop=1'); //pathway $pathway->addItem($daydate, ''); //Set Page title if ($item && !$item->title) { $document->setTitle($params->get('page_title')); $document->setMetadata('keywords', $params->get('page_title')); } //Check if the user has access to the form $maintainer = ELUser::ismaintainer(); $genaccess = ELUser::validate_user($elsettings->get('evdelrec'), $elsettings->get('delivereventsyes')); if ($maintainer || $genaccess) { $dellink = 1; } //add alternate feed link $link = 'index.php?option=com_redevent&view=simplelist&format=feed'; $attribs = array('type' => 'application/rss+xml', 'title' => 'RSS 2.0'); $document->addHeadLink(JRoute::_($link . '&type=rss'), 'alternate', 'rel', $attribs); $attribs = array('type' => 'application/atom+xml', 'title' => 'Atom 1.0'); $document->addHeadLink(JRoute::_($link . '&type=atom'), 'alternate', 'rel', $attribs); // Create the pagination object $page = $total - $limit; jimport('joomla.html.pagination'); $pageNav = new JPagination($total, $limitstart, $limit); //create select lists $lists = $this->_buildSortLists(); $this->assign('lists', $lists); $this->assignRef('rows', $rows); $this->assignRef('customs', $customs); $this->assignRef('noevents', $noevents); $this->assignRef('print_link', $print_link); $this->assignRef('params', $params); $this->assignRef('dellink', $dellink); $this->assignRef('pageNav', $pageNav); $this->assignRef('page', $page); $this->assignRef('elsettings', $elsettings); $this->assignRef('lists', $lists); $this->assignRef('daydate', $daydate); $this->assign('action', JRoute::_(RedeventHelperRoute::getDayRoute(JRequest::getInt('id')))); $cols = explode(',', $params->get('lists_columns', 'date, title, venue, city, category')); $cols = redEVENTHelper::validateColumns($cols); $this->assign('columns', $cols); parent::display($tpl); }
<div class="events-exports"> <?php if ($this->params->get('events_rsscal', 0)) { ?> <span class="events-rsscal"> <?php echo JHTML::link(JRoute::_(RedeventHelperRoute::getCategoryEventsRoute($this->category->id, null, 'rsscal') . '&format=feed'), JHTML::image('components/com_redevent/assets/images/rsscal2.0.png', JText::_('COM_REDEVENT_EXPORT_RSSCAL'))); ?> </span> <?php } ?> <?php if ($this->params->get('events_ical', 1)) { ?> <span class="events-ical"> <?php echo JHTML::link(JRoute::_(RedeventHelperRoute::getCategoryEventsRoute($this->category->id, null) . '&format=raw&layout=ics'), JHTML::image('components/com_redevent/assets/images/iCal2.0.png', JText::_('COM_REDEVENT_EXPORT_ICS'))); ?> </span> <?php } ?> </div> <!-- end: exports --> <?php } ?> </div>
/** * Creates the Venueevents View * * @since 0.9 */ function display($tpl = null) { $mainframe =& JFactory::getApplication(); $option = JRequest::getCmd('option'); //initialize variables $document =& JFactory::getDocument(); $menu =& JSite::getMenu(); $elsettings =& redEVENTHelper::config(); $item = $menu->getActive(); $params =& $mainframe->getParams('com_redevent'); $uri =& JFactory::getURI(); $acl = UserAcl::getInstance(); //add css file if (!$params->get('custom_css')) { $document->addStyleSheet($this->baseurl . '/components/com_redevent/assets/css/redevent.css'); } else { $document->addStyleSheet($params->get('custom_css')); } $document->addCustomTag('<!--[if IE]><style type="text/css">.floattext{zoom:1;}, * html #eventlist dd { height: 1%; }</style><![endif]-->'); // add js JHTML::_('behavior.mootools'); // for filter hint $document->addScript($this->baseurl . '/components/com_redevent/assets/js/eventslist.js'); // Request variables $limitstart = JRequest::getInt('limitstart'); $limit = $mainframe->getUserStateFromRequest('com_redevent.venueevents.limit', 'limit', $params->def('display_num', 0), 'int'); $pop = JRequest::getBool('pop'); $task = JRequest::getWord('task'); //get data from model $rows =& $this->get('Data'); $venue =& $this->get('Venue'); $total =& $this->get('Total'); $customs =& $this->get('ListCustomFields'); $customsfilters =& $this->get('CustomFilters'); //does the venue exist? if ($venue->id == 0) { return JError::raiseError(404, JText::sprintf('COM_REDEVENT_Venue_d_not_found', $venue->id)); } //are events available? if (!$rows) { $noevents = 1; } else { $noevents = 0; } // Add needed scripts if the lightbox effect is enabled JHTML::_('behavior.modal'); //add alternate feed link $link = 'index.php?option=com_redevent&view=venueevents&format=feed&id=' . $venue->id; $attribs = array('type' => 'application/rss+xml', 'title' => 'RSS 2.0'); $document->addHeadLink(JRoute::_($link . '&type=rss'), 'alternate', 'rel', $attribs); $attribs = array('type' => 'application/atom+xml', 'title' => 'Atom 1.0'); $document->addHeadLink(JRoute::_($link . '&type=atom'), 'alternate', 'rel', $attribs); //pathway $pathway =& $mainframe->getPathWay(); //create the pathway if ($task == 'archive') { $link = JRoute::_(RedeventHelperRoute::getVenueEventsRoute($venue->slug, 'archive')); $pathway->addItem(JText::_('COM_REDEVENT_ARCHIVE') . ' - ' . $venue->venue, $link); $print_link = JRoute::_('index.php?option=com_redevent&view=venueevents&id=' . $venue->slug . '&task=archive&pop=1&tmpl=component'); $pagetitle = $venue->venue . ' - ' . JText::_('COM_REDEVENT_ARCHIVE'); } else { $link = JRoute::_(RedeventHelperRoute::getVenueEventsRoute($venue->slug)); $pathway->addItem($venue->venue, $link); $print_link = JRoute::_('index.php?option=com_redevent&view=venueevents&id=' . $venue->slug . '&pop=1&tmpl=component'); $pagetitle = $venue->venue; } $thumb_link = RedeventHelperRoute::getVenueEventsRoute($venue->slug, null, 'thumb'); $list_link = RedeventHelperRoute::getVenueEventsRoute($venue->slug, null, 'default'); //set Page title $this->document->setTitle($pagetitle); $document->setMetadata('keywords', $venue->meta_keywords); $document->setDescription(strip_tags($venue->meta_description)); //Printfunction $params->def('print', !$mainframe->getCfg('hidePrint')); $params->def('icons', $mainframe->getCfg('icons')); if ($pop) { $params->set('popup', 1); } //Check if the user has access to the form $maintainer = $acl->canEditVenue($venue->id); //Generate Venuedescription if (!empty($venue->locdescription)) { //execute plugins $venuedescription = JHTML::_('content.prepare', $venue->locdescription); } //build the url if (!empty($venue->url) && strtolower(substr($venue->url, 0, 7)) != "http://") { $venue->url = 'http://' . $venue->url; } //prepare the url for output if (strlen(htmlspecialchars($venue->url, ENT_QUOTES)) > 35) { $venue->urlclean = substr(htmlspecialchars($venue->url, ENT_QUOTES), 0, 35) . '...'; } else { $venue->urlclean = htmlspecialchars($venue->url, ENT_QUOTES); } //create flag if ($venue->country) { $venue->countryimg = REOutput::getFlag($venue->country); } // Create the pagination object jimport('joomla.html.pagination'); $pageNav = new JPagination($total, $limitstart, $limit); //create select lists $lists = $this->_buildSortLists($elsettings); $state =& $this->get('state'); $filter_customs = $state->get('filter_customs'); $this->assign('lists', $lists); $this->assign('action', JRoute::_(RedeventHelperRoute::getVenueEventsRoute($venue->slug))); $this->assignRef('rows', $rows); $this->assignRef('customs', $customs); $this->assignRef('noevents', $noevents); $this->assignRef('venue', $venue); $this->assignRef('print_link', $print_link); $this->assignRef('params', $params); $this->assignRef('editlink', $maintainer); $this->assignRef('venuedescription', $venuedescription); $this->assignRef('pageNav', $pageNav); $this->assignRef('elsettings', $elsettings); $this->assignRef('item', $item); $this->assignRef('pagetitle', $pagetitle); $this->assignRef('task', $task); $this->assignRef('config', $elsettings); $this->assignRef('thumb_link', $thumb_link); $this->assignRef('list_link', $list_link); $this->assignRef('customsfilters', $customsfilters); $this->assign('filter_customs', $filter_customs); $cols = explode(',', $params->get('lists_columns', 'date, title, venue, city, category')); $cols = redEVENTHelper::validateColumns($cols); $this->assign('columns', $cols); parent::display($tpl); }
echo date('l, j F Y', strtotime(reset($this->weekdays))) . ' - ' . date('l, j F Y', strtotime(end($this->weekdays))); ?> </div> <table class="week-nav"> <tbody> <tr> <td class="week-prev"><?php echo JHTML::link(RedeventHelperRoute::getWeekRoute($this->previous), JText::_('COM_REDEVENT_PREVIOUS')); ?> </td> <td class="week-current"><?php echo JText::sprintf('COM_REDEVENT_WEEK_HEADER', $this->weeknumber, $this->year); ?> </td> <td class="week-next"><?php echo JHTML::link(RedeventHelperRoute::getWeekRoute($this->next), JText::_('COM_REDEVENT_NEXT')); ?> </td> </tr> </tbody> </table> <?php for ($i = 0; $i < 7; $i++) { ?> <div class="day-events"> <div class="day-title"><?php echo $this->getDayName($i); ?> </div> <?php if (isset($days[$i]) && count($days[$i])) {
/** * Creates the Venueevents View * * @since 0.9 */ function display() { $document =& JFactory::getDocument(); $document->link = JRoute::_('index.php?option=com_redevent&view=upcomingvenueevents'); $upcomingevents = $this->get('UpcomingVenueEvents'); $elsettings = redEVENTHelper::config(); $imagepath = JURI::root() . 'administrator/components/com_redevent/assets/images/'; foreach ((array) $upcomingevents as $key => $event) { $event_url = RedeventHelperRoute::getDetailsRoute($event->slug, $event->xslug); $venue_url = RedeventHelperRoute::getVenueEventsRoute($event->venueslug); $description = '<table> <tbody> <tr> <td width="100">Course:</td><td>' . JHTML::_('link', $event_url, $event->full_title, 'target="_blank"') . '</td> </tr><tr> <td>Where:</td><td>' . $event->location . ' ' . REOutput::getFlag($event->country) . '</td> </tr><tr> <td>Date:</td><td>' . REOutput::formatdate($event->dates, $event->times) . '</td> </tr><tr> <td>Duration:</td><td>' . $event->duration; if ($event->duration == 1) { $description .= JText::_('COM_REDEVENT_DAY'); } else { if ($event->duration > 1) { $description .= JText::_('COM_REDEVENT_DAYS'); } } $description .= '</td> </tr><tr> <td>Venue:</td><td>' . JHTML::_('link', $venue_url, $event->venue, 'target="_blank"') . '</td> </tr><tr> <td>Price:</td><td class="re-price">' . REOutput::formatListPrices($event->prices) . '</td> </tr><tr> <td>Credits:</td><td>' . $event->course_credit . '</td> </tr><tr> <td>Signup:</td><td>'; /* Get the different submission types */ $submissiontypes = explode(',', $event->submission_types); $venues_html = ''; foreach ($submissiontypes as $key => $subtype) { switch ($subtype) { case 'email': $venues_html .= ' ' . JHTML::_('link', JRoute::_('index.php?option=com_redevent&view=signup&task=signup&subtype=email&xref=' . $event->xref . '&id=' . $event->id), JHTML::_('image', $imagepath . $elsettings->get('signup_email_img'), JText::_($elsettings->get('signup_email_text')), 'width="24px" height="24px" border="0"'), 'target="_blank"') . ' '; break; case 'phone': $venues_html .= ' ' . JHTML::_('link', JRoute::_('index.php?option=com_redevent&view=signup&task=signup&subtype=phone&xref=' . $event->xref . '&id=' . $event->id), JHTML::_('image', $imagepath . $elsettings->get('signup_phone_img'), JText::_($elsettings->get('signup_phone_text')), 'width="24px" height="24px" border="0"'), 'target="_blank"') . ' '; break; case 'external': $venues_html .= ' ' . JHTML::_('link', $event->submission_type_external, JHTML::_('image', $imagepath . $elsettings->get('signup_external_img'), $elsettings->get('signup_external_text'), 'width="24px" height="24px" border="0"'), 'target="_blank"') . ' '; break; case 'webform': if ($event->prices && count($event->prices)) { foreach ($event->prices as $p) { $img = empty($p->image) ? JHTML::_('image', $imagepath . $elsettings->get('signup_webform_img'), JText::_($elsettings->get('signup_webform_text'))) : JHTML::_('image', $imagepath . $p->image, JText::_($p->name)); $link = JRoute::_(RedeventHelperRoute::getSignupRoute('webform', $event->slug, $event->xslug, $p->slug)); $venues_html .= ' ' . JHTML::_('link', $link, $img) . ' '; } } else { $venues_html .= ' ' . JHTML::_('link', JRoute::_(RedeventHelperRoute::getSignupRoute('webform', $event->slug, $event->xslug)), JHTML::_('image', $imagepath . $elsettings->get('signup_webform_img'), JText::_($elsettings->get('signup_webform_text')))) . ' '; } break; case 'formaloffer': $venues_html .= ' ' . JHTML::_('link', JRoute::_('index.php?option=com_redevent&view=signup&subtype=formaloffer&task=signup&xref=' . $event->xslug . '&id=' . $event->slug), JHTML::_('image', $imagepath . $elsettings->get('signup_formal_offer_img'), JText::_($elsettings->get('signup_formal_offer_text')), 'width="24px" height="24px" border="0"'), 'target="_blank"') . ' '; break; } } $description .= $venues_html; $description .= '</td></tr></tbody></table>'; $item = new JFeedItem(); $item->title = $event->full_title; $item->link = $event_url; $item->description = $description; $item->date = ''; $item->category = $event->venue; // loads item info into rss array $document->addItem($item); } }
case 'phone': $venues_html .= '<div class="vlink phone">' . JHTML::_('link', JRoute::_('index.php?option=com_redevent&view=signup&task=signup&subtype=phone&xref=' . $event->xref . '&id=' . $event->id), JHTML::_('image', $imagepath . $elsettings->get('signup_phone_img'), $elsettings->get('signup_phone_text'), 'width="24px" height="24px"')) . '</div> '; break; case 'external': $venues_html .= '<div class="vlink external hasTip" title="::' . $elsettings->get('signup_external_text') . '">' . JHTML::_('link', $event->submission_type_external, JHTML::_('image', $imagepath . $elsettings->get('signup_external_img'), $elsettings->get('signup_external_text')), 'target="_blank"') . '</div> '; break; case 'webform': if ($event->prices && count($event->prices)) { foreach ($event->prices as $p) { $title = ' title="' . $p->name . '::' . addslashes(str_replace("\n", "<br/>", $p->tooltip)) . '"'; $img = empty($p->image) ? JHTML::_('image', $imagepath . $elsettings->get('signup_webform_img'), JText::_($elsettings->get('signup_webform_text'))) : JHTML::_('image', $imagepath . $p->image, JText::_($p->name)); $link = JRoute::_(RedeventHelperRoute::getSignupRoute('webform', $event->slug, $event->xslug, $p->slug)); $venues_html .= '<div class="vlink webform hasTip ' . $p->alias . '"' . $title . '>' . JHTML::_('link', $link, $img) . '</div> '; } } else { $venues_html .= '<div class="vlink webform">' . JHTML::_('link', JRoute::_(RedeventHelperRoute::getSignupRoute('webform', $event->slug, $event->xslug)), JHTML::_('image', $imagepath . $elsettings->get('signup_webform_img'), JText::_($elsettings->get('signup_webform_text')))) . '</div> '; } break; case 'formaloffer': $venues_html .= '<div class="vlink formaloffer">' . JHTML::_('link', JRoute::_('index.php?option=com_redevent&view=signup&subtype=formaloffer&task=signup&xref=' . $event->xref . '&id=' . $event->id), JHTML::_('image', $imagepath . $elsettings->get('signup_formal_offer_img'), $elsettings->get('signup_formal_offer_text'), 'width="24px" height="24px"')) . '</div> '; break; } } echo $venues_html; ?> </td> </tr> <?php } ?> </tbody>
foreach ($this->registers as $key => $register) { if ($register->submitter->waitinglist == 1) { if ($register->submitter->uid == $this->user->get('id') || $this->candeleteattendees) { echo '<li><ul class="attendee myreg">'; } else { echo '<li><ul class="attendee">'; } foreach ($register->answers as $k => $name) { if (stristr($name, '~~~')) { $name = str_replace('~~~', '<br />', $name) . '<br />'; } echo "<li class='userfield " . strtolower($k) . "'>" . $name . "</li>"; } if ($this->unreg_check && $register->submitter->uid == $this->user->get('id') || $this->candeleteattendees) { $unreg_url = JRoute::_(RedeventHelperRoute::getDetailsRoute($this->row->slug, $this->row->xslug) . '&task=delreguser&rid=' . $register->attendee_id); echo '<li>' . JHTML::link($unreg_url, JText::_('COM_REDEVENT_UNREGISTER'), array('class' => 'unreglink')) . '</li>'; } echo '</ul></li>'; } } ?> </ul> </div> <?php } ?> </div> <?php } echo JHTML::_('link', JRoute::_(RedeventHelperRoute::getDetailsRoute($this->row->slug, $this->row->xslug)), JText::_('COM_REDEVENT_RETURN_EVENT_DETAILS'));
?> <?php echo $this->events_pageNav->getPagesLinks(); ?> </div> <?php } ?> <!-- pagination end --> <?php } ?> <?php if ($this->canAddXref) { ?> <div><?php echo JHTML::link(JRoute::_('index.php?option=com_redevent&view=editevent&layout=eventdate', false), JText::_('COM_REDEVENT_MYEVENTS_ADD_NEW_EVENT_SESSION')); ?> </div> <?php } if ($this->canAddEvent) { ?> <div><?php echo JHTML::link(RedeventHelperRoute::getEditEventRoute(), JText::_('COM_REDEVENT_MYEVENTS_ADD_NEW_EVENT')); ?> </div> <?php }
$venues_html .= '<div class="registration_method hasTip" title="::' . $this->elsettings->get('signup_external_text') . '">' . JHTML::_('link', $link, JHTML::_('image', $imagepath . $this->elsettings->get('signup_external_img'), $this->elsettings->get('signup_external_text')), 'target="_blank"') . '</div> '; break; case 'webform': if ($this->prices && count($this->prices)) { foreach ($this->prices as $p) { $title = ' title="' . $p->name . '::' . addslashes(str_replace("\n", "<br/>", $p->tooltip)) . '"'; $img = empty($p->image) ? JHTML::_('image', $imagepath . $this->elsettings->get('signup_webform_img'), JText::_($p->name)) : JHTML::_('image', JURI::root() . $p->image, JText::_($p->name)); $link = JRoute::_(RedeventHelperRoute::getSignupRoute('webform', $this->row->slug, $this->row->xslug, $p->slug)); $venues_html .= '<div class="registration_method hasTip ' . $p->alias . '"' . $title . '>' . JHTML::_('link', $link, $img) . '</div> '; } } else { $venues_html .= '<div class="registration_method webform">' . JHTML::_('link', JRoute::_(RedeventHelperRoute::getSignupRoute('webform', $this->row->slug, $this->row->xslug)), JHTML::_('image', $imagepath . $this->elsettings->get('signup_webform_img'), JText::_($this->elsettings->get('signup_webform_text')))) . '</div> '; } break; case 'formaloffer': $venues_html .= '<div class="registration_methodr">' . JHTML::_('link', JRoute::_(RedeventHelperRoute::getSignupRoute('formaloffer', $this->row->slug, $this->row->xslug)), JHTML::_('image', $imagepath . $this->elsettings->get('signup_formal_offer_img'), JText::_($this->elsettings->get('signup_formal_offer_text')), 'width="24px" height="24px"')) . '</div> '; break; } } echo $venues_html; ?> <?php } ?> <div class="clear"></div> </div> <?php } ?> <?php
/** * Creates the attendees edit button * * @param int xref id * @since 2.0 */ function xrefattendeesbutton($id) { JHTML::_('behavior.tooltip'); $image = JHTML::_('image', 'components/com_redevent/assets/images/attendees.png', JText::_('COM_REDEVENT_EDIT_ATTENDEES')); $overlib = JText::_('COM_REDEVENT_EDIT_ATTENDEES_TIP'); $text = JText::_('COM_REDEVENT_EDIT_ATTENDEES'); $link = RedeventHelperRoute::getManageAttendees($id, 'manageattendees'); $output = '<a href="' . JRoute::_($link) . '" class="editlinktip hasTip" title="' . $text . '::' . $overlib . '">' . $image . '</a>'; return $output; }