function display($tpl = null) { $mainframe =& JFactory::getApplication(); $dispatcher =& JDispatcher::getInstance(); /* Load the event details */ $course = $this->get('Details'); $venue = $this->get('Venue'); $pdf = new TCPDF("P", "mm", "A4", true); $pdf->SetCreator($mainframe->getCfg('sitename')); $pdf->SetAuthor($mainframe->getCfg('sitename')); $pdf->SetTitle($course->title); $pdf->SetSubject($course->title); $pdf->setHeaderFont(array('freesans', '', 8)); $pdf->setFooterFont(array('freesans', '', 8)); $pdf->setFont('freesans'); // disable header and footer $pdf->setPrintHeader(false); $pdf->setPrintFooter(true); //set the display mode $pdf->SetDisplayMode('default'); //initialize document $pdf->AliasNbPages(); // add a page $pdf->AddPage(); $pdf->SetFontSize(10); /* This loads the tags replacer */ JView::loadHelper('tags'); $tags = new redEVENT_tags(); $tags->setXref(JRequest::getInt('xref')); $message = $tags->ReplaceTags($course->submission_type_email_pdf); // convert urls $htmlmsg = REOutput::ImgRelAbs($message); $pdf->WriteHTML($message, true); // add the form data if requested if ($course->pdf_form_data) { JRequest::setVar('pdfform', $pdf); JPluginHelper::importPlugin('content'); $form = new stdClass(); $form->text = '{redform}' . $course->redform_id . ',1{/redform}'; $form->eventid = $course->did; $form->task = 'userregister'; $results = $dispatcher->trigger('onPrepareEvent', array(&$form, array(), 0)); $pdf->WriteHTML($form->text, true); } // output the file $pdf->Output($course->title . ".pdf", "I"); exit; }
/** * Method to get the Venues * * @access public * @return array */ function &getData() { $mainframe =& JFactory::getApplication(); $menu =& JSite::getMenu(); $item = $menu->getActive(); $params =& $menu->getParams($item->id); $elsettings =& redEVENTHelper::config(); // Lets load the content if it doesn't already exist if (empty($this->_data)) { $query = $this->_buildQuery(); // Get a reference to the global cache object. $cache =& JFactory::getCache('redevent'); $this->_data = $cache->call(array('RedeventModelCountriesmap', '_getResultList'), $query); $countrycoords = redEVENTHelperCountries::getCountrycoordArray(); $k = 0; for ($i = 0; $i < count($this->_data); $i++) { $country =& $this->_data[$i]; $country->flag = REOutput::getFlag($country->iso2); $country->flagurl = REOutput::getFlagUrl($country->iso2); $country->latitude = $countrycoords[$country->iso2][0]; $country->longitude = $countrycoords[$country->iso2][1]; //create target link $country->targetlink = JRoute::_(JURI::base() . 'index.php?option=com_redevent&view=countryevents&filter_country=' . $country->iso2); $k = 1 - $k; } } return $this->_data; }
<div class="when-where"> <div class="date"> <div class="day"> <?php if (!$date) { ?> <div class="open"> <?php echo JText::_('COM_REDEVENT_OPEN_DATE'); ?> </div> <?php } else { ?> <meta itemprop="startDate" content="<?php echo REOutput::getIsoDate($row->dates, $row->times); ?> "> <div class="month"><?php echo $date->format('M'); ?> </div> <div class="daynumber"><?php echo $date->format('d'); ?> </div> <div class="weekday"><?php echo $date->format('D'); ?> </div> <?php
//venue if ($this->params->get('showlocate', 1) == 1) { $venue = '<div class="location"><span class="label">' . JText::_('COM_REDEVENT_VENUE') . ': </span>'; if ($this->params->get('showlinkvenue', 1) == 1 && 0) { $venue .= $row->locid ? "<a href='" . 'index.php?option=com_redevent&view=venueevents&id=' . $row->venueslug . "'>" . $this->escape($row->venue) . "</a>" : '-'; } else { $venue .= $row->locid ? $this->escape($row->venue) : '-'; } $venue .= '</div>'; } else { $venue = ''; } //generate the output $content .= $colorpic; if ($this->params->get('show_start_time', 0)) { $content .= REOutput::formattime($row->dates, $row->times) . ' '; } // Text to display in calendar if ($this->params->get('session_display', 0) == 0 || !$row->datimage) { $text = $row->full_title; } elseif ($this->params->get('session_display', 0) == 1) { $img = redEVENTImage::getThumbUrl($row->datimage, $this->params->get('pic_size', 20)); $text = '<span class="session-image">' . JHTML::image($img, $row->full_title) . '</span>'; } else { $img = redEVENTImage::getThumbUrl($row->datimage, $this->params->get('pic_size', 20)); $text = '<span class="session-image">' . JHTML::image($img, $row->full_title) . '</span>'; $text .= $row->full_title; } $content .= $this->caltooltip($catname . $eventname . $timehtml . $venue, $eventdate, $text, $detaillink, 'eventTip'); $content .= $contentend; // add the event to the calendar
/** * Send the signup email */ public function getSendFormalOfferEmail($tags) { /* Initialise the mailer */ $this->Mailer(); /* Load the details for this course */ $db = JFactory::getDBO(); $q = "SELECT * \n\t\t\tFROM #__redevent_event_venue_xref x\n\t\t\tLEFT JOIN #__redevent_events e\n\t\t\tON e.id = x.eventid\n\t\t\tLEFT JOIN #__redevent_venues v\n\t\t\tON v.id = x.venueid\n\t\t\tWHERE x.id = " . JRequest::getInt('xref'); $db->setQuery($q); $details = $db->loadObject(); /* Add the recipient */ $this->mailer->AddAddress(JRequest::getVar('subemailaddress'), JRequest::getVar('subemailname')); /* Set the subject */ $this->mailer->setSubject($tags->ReplaceTags($details->submission_type_formal_offer_subject)); /* Add the body to the mail */ /* Read the template */ $message = $tags->ReplaceTags($details->submission_type_formal_offer_body); // convert urls $message = REOutput::ImgRelAbs($message); $this->mailer->setBody($message); /* Sent out the mail */ if (!$this->mailer->Send()) { RedeventError::raiseWarning(0, JText::_('COM_REDEVENT_NO_MAIL_SEND') . ' ' . $this->mailer->error); return false; } /* Clear the mail details */ $this->mailer->ClearAddresses(); return true; }
?> </td> <td><?php echo REOutput::formatdate($event->dates, $event->times); ?> </td> <td><?php echo redEVENTHelper::getEventDuration($event); ?> </td> <td><?php echo JHTML::_('link', $venue_url, $event->venue); ?> </td> <td class="re-price"><?php echo REOutput::formatprices($event->prices) . '/' . $event->course_credit; ?> </td> <td> <?php /* Get the different submission types */ $submissiontypes = explode(',', $event->submission_types); $venues_html = ''; foreach ($submissiontypes as $key => $subtype) { switch ($subtype) { case 'email': $venues_html .= '<div class="vlink email">' . 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'), $elsettings->get('signup_email_text'), 'width="24px" height="24px"')) . '</div> '; break; 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;
if ($this->params->def('show_page_title', 1)) { ?> <h1 class='componentheading'> <?php echo $this->escape($this->pagetitle); ?> </h1> <?php } ?> <!--Venue--> <?php //flyer echo redEVENTImage::modalimage($this->venue->locimage, $this->venue->venue); echo REOutput::mapicon($this->venue, array('class' => 'map')); ?> <dl class="location floattext"> <?php if (!empty($this->venue->url)) { ?> <dt class="venue"><?php echo JText::_('COM_REDEVENT_WEBSITE') . ':'; ?> </dt> <dd class="venue"> <a href="<?php echo $this->venue->url; ?> " target="_blank"> <?php
/** * 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); }
/** * send reminder emails */ function reminder() { jimport('joomla.filesystem.file'); $app =& JFactory::getApplication(); $params = $app->getParams('com_redevent'); $file = JPATH_COMPONENT_SITE . DS . 'reminder.txt'; if (JFile::exists($file)) { $date = (int) JFile::read($file); } else { $date = 0; } // only run this once a day echo sprintf("last update on %s<br/>", strftime('%Y-%m-%d %H:%M', $date)); if (time() - $date < 3600 * 23.9 && !JRequest::getVar('force', 0)) { echo "reminder sent less the 24 hours ago<br/>"; return; } $model = $this->getModel('attendees'); $events = $model->getReminderEvents($params->get('reminder_days', 14)); if ($events && count($events)) { $mailer =& JFactory::getMailer(); $MailFrom = $app->getCfg('mailfrom'); $FromName = $app->getCfg('fromname'); $mailer->setSender(array($MailFrom, $FromName)); $mailer->IsHTML(true); $subject = $params->get('reminder_subject'); $body = $params->get('reminder_body'); foreach ($events as $event) { echo "sending reminder for event: " . $event->full_title . "<br>"; $tags = new redEVENT_tags(); $tags->setXref($event->id); // get attendees $attendees = $model->getAttendeesEmails($event->id, $params->get('reminder_include_waiting', 1)); if (!$attendees) { continue; } foreach ($attendees as $sid => $a) { $msubject = $tags->ReplaceTags($subject, array('sids' => array($sid))); $mbody = '<html><body>' . $tags->ReplaceTags($body) . '</body></html>'; // convert urls $mbody = REOutput::ImgRelAbs($mbody); $mailer->setSubject($msubject); $mailer->setBody($mbody); $mailer->clearAllRecipients(); $mailer->addRecipient($a); $sent = $mailer->Send(); } } } else { echo 'No events for this reminder interval<br/>'; } // update file JFile::write($file, time()); }
* as published by the Free Software Foundation. * redEVENT is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 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. */ // no direct access defined('_JEXEC') or die('Restricted access'); ?> <div id="redevent" class="el_categoriesview"> <p class="buttons"> <?php echo REOutput::submitbutton($this->dellink, $this->params); ?> </p> <?php if ($this->params->def('show_pagepage_title', 1)) { ?> <h1 class="componentheading"> <?php echo $this->escape($this->pagetitle); ?> </h1> <?php } ?>
</div> <div class="coord"> <label for="longitude"> <?php echo JText::_('COM_REDEVENT_LONGITUDE') . ':'; ?> </label> <input class="inputbox" name="longitude" id="longitude" value="<?php echo $this->row->longitude; ?> " size="14" maxlength="25" /> </div> </div> <div class="coords-pinpoint"> <?php echo $pinpointicon = REOutput::pinpointicon($this->row); ?> </div> </td> </tr> <?php } ?> </tbody> </table> </fieldset> <?php if ($this->params->get('edit_image', 1) == 2 || $this->params->get('edit_image', 1) == 1) { ?>
/** * Method to get the Venues * * @access public * @return array */ function &getData() { $mainframe =& JFactory::getApplication(); $menu =& JSite::getMenu(); $item = $menu->getActive(); $params =& $menu->getParams($item->id); $elsettings =& redEVENTHelper::config(); // Lets load the content if it doesn't already exist if (empty($this->_data)) { $query = $this->_buildQuery(); // Get a reference to the global cache object. $cache =& JFactory::getCache('redevent'); $this->_data = $cache->call(array('RedeventModelVenuesmap', '_getResultList'), $query); $k = 0; for ($i = 0; $i < count($this->_data); $i++) { $venue =& $this->_data[$i]; //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)); $k = 1 - $k; } } return $this->_data; }
foreach ($this->rows as $row) { ?> <h2 class="eventlist"> <a href="<?php echo $row->targetlink; ?> "><?php echo $this->escape($row->venue); ?> </a> </h2> <?php echo redEVENTImage::modalimage($row->locimage, $row->venue); echo REOutput::mapicon($row, array('class' => 'map')); ?> <dl class="location floattext"> <?php if (!empty($row->url)) { ?> <dt class="venue_website"><?php echo JText::_('COM_REDEVENT_WEBSITE') . ':'; ?> </dt> <dd class="venue_website"> <a href="<?php echo $row->url; ?> " target="_blank"> <?php
/** * 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(); $pop = JRequest::getBool('pop'); $upcomingvenueevents = $this->get('UpcomingVenueEvents'); $model_venueevents = $this->getModel('Venueevents'); $rows =& $model_venueevents->getData(); $venue =& $model_venueevents->getVenue(); $total =& $model_venueevents->getTotal(); //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 rss link */ $link = '&format=feed'; $attribs = array('type' => 'application/rss+xml', 'title' => 'RSS 2.0'); $document->addHeadLink(JRoute::_($link . '&type=rss'), 'alternate', 'rel', $attribs); // Add needed scripts if the lightbox effect 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(); $task = JRequest::getVar('task'); //create the pathway if ($task == 'archive') { $pathway->addItem(JText::_('COM_REDEVENT_ARCHIVE') . ' - ' . $venue->venue, JRoute::_('index.php?option=' . $option . '&view=upcomingvenueevents&task=archive&id=' . $venue->slug)); $link = JRoute::_('index.php?option=com_redevent&view=upcomingvenueevents&id=' . $venue->slug . '&task=archive'); $print_link = JRoute::_('index.php?option=com_redevent&view=upcomingvenueevents&id=' . $venue->slug . '&task=archive&pop=1&tmpl=component'); $pagetitle = $venue->venue . ' - ' . JText::_('COM_REDEVENT_ARCHIVE'); } else { $pathway->addItem($venue->venue, JRoute::_('index.php?option=' . $option . '&view=upcomingvenueevents&id=' . $venue->slug)); $link = JRoute::_('index.php?option=com_redevent&view=upcomingvenueevents&id=' . $venue->slug); $print_link = JRoute::_('index.php?option=com_redevent&view=upcomingvenueevents&id=' . $venue->slug . '&pop=1&tmpl=component'); $pagetitle = $venue->venue . ' - ' . JText::_('COM_REDEVENT_UPCOMING_EVENTS_TITLE'); } //set Page title $document->setTitle($pagetitle); $document->setMetadata('keywords', $venue->meta_keywords); $document->setDescription(strip_tags($venue->meta_description)); //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; } //Printfunction $params->def('print', !$mainframe->getCfg('hidePrint')); $params->def('icons', $mainframe->getCfg('icons')); if ($pop) { $params->set('popup', 1); } //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 $limitstart = JRequest::getInt('limitstart'); $limit = $mainframe->getUserStateFromRequest('com_redevent.venueevents.limit', 'limit', $params->def('display_num', 0), 'int'); jimport('joomla.html.pagination'); $pageNav = new JPagination($total, $limitstart, $limit); $this->assignRef('upcomingvenueevents', $upcomingvenueevents); $this->assignRef('params', $params); $this->assignRef('rows', $rows); $this->assignRef('venue', $venue); $this->assignRef('pageNav', $pageNav); $this->assignRef('venuedescription', $venuedescription); $this->assignRef('elsettings', $elsettings); $this->assignRef('item', $item); $this->assignRef('pagetitle', $pagetitle); $this->assignRef('task', $task); $this->assignRef('print_link', $print_link); $this->assignRef('dellink', $dellink); $this->assign('action', JRoute::_(RedeventHelperRoute::getUpcomingVenueEventsRoute($venue->slug))); parent::display($tpl); }
function notifyManagers() { jimport('joomla.mail.helper'); $app =& JFactory::getApplication(); $params = $app->getParams('com_redevent'); $event = $this->getDetails(); $tags = new redEVENT_tags(); $tags->setXref($this->_xref); $tags->setSubmitkey(JRequest::getVar('submit_key')); $recipients = array(); // default recipients $default = $params->get('registration_default_recipients'); if (!empty($default)) { if (strstr($default, ';')) { $addresses = explode(";", $default); } else { $addresses = explode(",", $default); } foreach ($addresses as $a) { $a = trim($a); if (JMailHelper::isEmailAddress($a)) { $recipients[] = array('email' => $a, 'name' => ''); } } } // creator if ($params->get('registration_notify_creator', 1)) { if (JMailHelper::isEmailAddress($event->creator_email)) { $recipients[] = array('email' => $event->creator_email, 'name' => $event->creator_name); } } // group recipients $gprecipients = $this->_getXrefRegistrationRecipients(); foreach ($gprecipients as $r) { $recipients[] = array('email' => $r->email, 'name' => $r->name); } if (!count($recipients)) { return true; } $mailer =& JFactory::getMailer(); foreach ($recipients as $r) { $mailer->addAddress($r['email'], $r['name']); } $mailer->setSubject($tags->ReplaceTags($params->get('registration_notification_subject'))); // convert urls $htmlmsg = '<html><body>' . $tags->ReplaceTags($params->get('registration_notification_body')) . '</body></html>'; $htmlmsg = REOutput::ImgRelAbs($htmlmsg); $mailer->MsgHTML($htmlmsg); if (!$mailer->send()) { RedeventHelperLog::simplelog(JText::_('COM_REDEVENT_ERROR_REGISTRATION_MANAGERS_NOTIFICATION_FAILED')); $this->setError(JText::_('COM_REDEVENT_ERROR_REGISTRATION_MANAGERS_NOTIFICATION_FAILED')); return false; } return true; }
</td> <td class="courseinfo_prices re-price"><?php echo REOutput::formatListPrices($event->prices); ?> </td> <td class="courseinfo_credit"><?php echo $event->course_credit; ?> </td> <td class="courseinfo_signup" width="*"><div class="courseinfo_signupwrapper"> <?php $registration_status = redEVENTHelper::canRegister($event->xref); if (!$registration_status->canregister) { $imgpath = 'components/com_redevent/assets/images/' . $registration_status->error . '.png'; $img = JHTML::_('image', JURI::base() . $imgpath, $registration_status->status, array('class' => 'hasTip', 'title' => $registration_status->status)); echo REOutput::moreInfoIcon($event->xslug, $img, $registration_status->status); } else { $venues_html = ''; /* Get the different submission types */ $submissiontypes = explode(',', $event->submission_types); foreach ($submissiontypes as $key => $subtype) { switch ($subtype) { case 'email': $venues_html .= '<div class="courseinfo_vlink courseinfo_email">' . JHTML::_('link', JRoute::_(RedeventHelperRoute::getSignupRoute('email', $event->slug, $event->xslug)), JHTML::_('image', $imagepath . $elsettings->get('signup_email_img'), JText::_($elsettings->get('signup_email_text')), 'width="24px" height="24px"')) . '</div> '; break; case 'phone': $venues_html .= '<div class="courseinfo_vlink courseinfo_phone">' . JHTML::_('link', JRoute::_(RedeventHelperRoute::getSignupRoute('phone', $event->slug, $event->xslug)), JHTML::_('image', $imagepath . $elsettings->get('signup_phone_img'), JText::_($elsettings->get('signup_phone_text')), 'width="24px" height="24px"')) . '</div> '; break; case 'external': if (!empty($event->external_registration_url)) { $link = $event->external_registration_url;
function _getTag_paymentrequestlink() { $link = ''; if (!empty($this->_submitkey)) { $title = urlencode($this->getEvent()->getData()->title . ' ' . REOutput::formatdate($this->getEvent()->getData()->dates, $this->getEvent()->getData()->times)); $link = $this->absoluteUrls('index.php?option=com_redform&controller=payment&task=select&source=redevent&key=' . $this->_submitkey . '&paymenttitle=' . $title, false); } return $link; }
/** * 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; }
?> <div class="rf_img"></div> <?php } ?> <p class="rf_thumbevent_title"> <span class="summary"><?php echo JHTML::_('link', JRoute::_($detaillink), $row->full_title); ?> </span> @ <span class="location"><?php echo JHTML::_('link', JRoute::_($venuelink), $row->venue); ?> </span> </p> <p class="rf_thumbevent_date"> <span class="dtstart"><?php echo REOutput::formatdate($row->dates, $row->times); ?> </span> <?php if ($row->enddates && $row->enddates != '0000-00-00' && $row->enddates != $row->dates) { echo ' - <span class="dtend">' . REOutput::formatdate($row->enddates, $row->endtimes) . '</span>'; } ?> </p> </li> <?php } ?> </ul>
function display($tpl = null) { $mainframe =& JFactory::getApplication(); $params = JComponentHelper::getParams('com_redevent'); // Load pane behavior jimport('joomla.html.pane'); JHTML::_('behavior.framework'); //initialise variables $editor =& JFactory::getEditor(); $document =& JFactory::getDocument(); $pane =& JPane::getInstance('sliders'); $tabs =& JPane::getInstance('tabs'); $user =& JFactory::getUser(); $settings = JComponentHelper::getParams('com_redevent'); //get vars $cid = JRequest::getVar('cid'); $url = JURI::root(); $document->setTitle(JText::_('COM_REDEVENT_PAGETITLE_EDITVENUE')); //add css and js to document $document->addScript('../includes/js/joomla/popup.js'); $document->addStyleSheet('../includes/js/joomla/popup.css'); $document->addStyleSheet('components/com_redevent/assets/css/redeventbackend.css'); $document->addScript($url . '/components/com_redevent/assets/js/attachments.js'); $document->addScriptDeclaration('var removemsg = "' . JText::_('COM_REDEVENT_ATTACHMENT_CONFIRM_MSG') . '";'); // Get data from the model $model =& $this->getModel(); $row =& $this->get('Data'); // fail if checked out not by 'me' if ($row->id) { if ($model->isCheckedOut($user->get('id'))) { JError::raiseWarning('REDEVENT_GENERIC_ERROR', $row->venue . ' ' . JText::_('COM_REDEVENT_EDITED_BY_ANOTHER_ADMIN')); $mainframe->redirect('index.php?option=com_redevent&view=venues'); } } $task = JRequest::getVar('task'); //create the toolbar if ($task == 'copy') { JToolBarHelper::title(JText::_('COM_REDEVENT_COPY_VENUE'), 'venuesedit'); } elseif ($cid) { JToolBarHelper::title(JText::_('COM_REDEVENT_EDIT_VENUE'), 'venuesedit'); //makes data safe JFilterOutput::objectHTMLSafe($row, ENT_QUOTES, 'locdescription'); } else { JToolBarHelper::title(JText::_('COM_REDEVENT_ADD_VENUE'), 'venuesedit'); //set the submenu JSubMenuHelper::addEntry(JText::_('COM_REDEVENT'), 'index.php?option=com_redevent'); JSubMenuHelper::addEntry(JText::_('COM_REDEVENT_EVENTS'), 'index.php?option=com_redevent&view=events'); JSubMenuHelper::addEntry(JText::_('COM_REDEVENT_VENUES'), 'index.php?option=com_redevent&view=venues'); JSubMenuHelper::addEntry(JText::_('COM_REDEVENT_CATEGORIES'), 'index.php?option=com_redevent&view=categories'); JSubMenuHelper::addEntry(JText::_('COM_REDEVENT_ARCHIVESCREEN'), 'index.php?option=com_redevent&view=archive'); JSubMenuHelper::addEntry(JText::_('COM_REDEVENT_GROUPS'), 'index.php?option=com_redevent&view=groups'); JSubMenuHelper::addEntry(JText::_('COM_REDEVENT_HELP'), 'index.php?option=com_redevent&view=help'); } JToolBarHelper::apply(); JToolBarHelper::spacer(); JToolBarHelper::save(); JToolBarHelper::spacer(); JToolBarHelper::cancel(); JToolBarHelper::spacer(); //JToolBarHelper::help( 'el.editvenues', true ); $lists = array(); // categories selector $selected = array(); foreach ((array) $row->categories as $cat) { $selected[] = $cat; } $lists['categories'] = JHTML::_('select.genericlist', (array) $this->get('Categories'), 'categories[]', 'class="inputbox" multiple="multiple" size="10"', 'value', 'text', $selected); $countries = array(); $countries[] = JHTML::_('select.option', '', JText::_('COM_REDEVENT_Select_country')); $countries = array_merge($countries, redEVENTHelperCountries::getCountryOptions()); $lists['countries'] = JHTML::_('select.genericlist', $countries, 'country', 'class="inputbox"', 'value', 'text', $row->country); unset($countries); $pinpointicon = REOutput::pinpointicon($row); if ($task == 'copy') { $row->id = null; $row->venue .= ' ' . JText::_('COM_REDEVENT_copy'); $row->alias = ''; } //assign data to template $this->assignRef('row', $row); $this->assignRef('pane', $pane); $this->assignRef('tabs', $tabs); $this->assignRef('editor', $editor); $this->assignRef('settings', $settings); $this->assignRef('params', $params); $this->assignRef('lists', $lists); $this->assignRef('imageselect', $imageselect); $this->assignRef('pinpointicon', $pinpointicon); $this->assignRef('access', redEVENTHelper::getAccesslevelOptions()); $this->assignRef('form', $this->get('form')); parent::display($tpl); }
<td><?php echo JHTML::_('link', $event_url, $event->full_title); ?> </td> <td><?php echo $event->location; ?> </td> <td><?php echo REOutput::formatdate($event->dates, $event->times); ?> <?php echo redEVENTHelper::getEventDuration($event); ?> <?php echo JHTML::_('link', $venue_url, $event->venue); ?> </td> <td class="re-price"><?php echo REOutput::formatListPrices($event->prices); ?> </td> </tr> <?php } ?> </tbody> </table>
<?php case 'places': ?> <td class="re_places"><?php echo redEVENTHelper::getRemainingPlaces($row); ?> </td> <?php break; ?> <?php case 'price': ?> <td class="re_prices" class="re-price"><?php echo REOutput::formatListPrices($row->prices); ?> </td> <?php break; ?> <?php case 'credits': ?> <td class="re_credits"><?php echo $row->course_credit ? $row->course_credit : '-'; ?> </td> <?php break;
/** * 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); } }
<?php if (redEVENTHelper::isValidDate($row->enddates) && $row->enddates != $row->dates) { echo ' - ' . REOutput::formatdate($row->enddates, $row->endtimes); } ?> </strong> <?php if ($this->params->get('showtime', 1)) { ?> <br /> <?php echo REOutput::formattime($row->dates, $row->times); if ($row->endtimes) { echo ' - ' . REOutput::formattime($row->enddates, $row->endtimes); } } ?> </td> <td headers="el_title" align="left" valign="top"> <a onclick="insertEvent('<?php echo $row->id; ?> ', '<?php echo str_replace(array("'", "\""), array("\\'", ""), $row->title); ?> ', '<?php echo JURI::root() . RedeventHelperRoute::getDetailsRoute($row->slug, $row->xref); ?>
// no direct access defined('_JEXEC') or die('Restricted access'); if ($this->view_attendees_list && $this->registers) { ?> <div id="redevent" class="event_id<?php echo $this->row->did; ?> el_details"> <h2 class="register"><?php echo JText::_('COM_REDEVENT_REGISTERED_USERS') . ': ' . $this->row->full_title; ?> <?php if ($this->manage_attendees) { ?> <?php echo REOutput::xrefattendeesbutton($this->row->xref); ?> <?php } ?> </h2> <?php if (count($this->roles)) { ?> <?php $this->showRoles(); ?> <?php } ?>
function notifyManagers($unreg = false) { jimport('joomla.mail.helper'); $app =& JFactory::getApplication(); $params = $app->getParams('com_redevent'); $tags = new redEVENT_tags(); $tags->setXref($this->getXref()); $tags->setSubmitkey($this->load()->submit_key); $tags->addOptions(array('sids' => array($this->load()->sid))); $event = $this->getSessionDetails(); $recipients = $this->getAdminEmails(); if (!count($recipients)) { return true; } $mailer =& JFactory::getMailer(); if ($this->getEmail() && $params->get('allow_email_aliasing', 1)) { $sender = array($this->getEmail(), $this->getFullname()); } else { // default to site settings $sender = array($app->getCfg('mailfrom'), $app->getCfg('sitename')); } $mailer->setSender($sender); $mailer->addReplyTo($sender); foreach ($recipients as $r) { $mailer->addAddress($r['email'], $r['name']); } $mail = '<HTML><HEAD> <STYLE TYPE="text/css"> <!-- table.formanswers , table.formanswers td, table.formanswers th { border-color: darkgrey; border-style: solid; text-align:left; } table.formanswers { border-width: 0 0 1px 1px; border-spacing: 0; border-collapse: collapse; padding: 5px; } table.formanswers td, table.formanswers th { margin: 0; padding: 4px; border-width: 1px 1px 0 0; } --> </STYLE> </head> <BODY bgcolor="#FFFFFF"> ' . $tags->ReplaceTags($unreg ? $params->get('unregistration_notification_body') : $params->get('registration_notification_body')) . ' </body> </html>'; // convert urls $mail = REOutput::ImgRelAbs($mail); if (!$unreg && $params->get('registration_notification_attach_rfuploads', 1)) { // files submitted through redform $files = $this->getRFFiles(); $filessize = 0; foreach ($files as $f) { $filessize += filesize($f); } if ($filessize < $params->get('registration_notification_attach_rfuploads_maxsize', 1500) * 1000) { foreach ($files as $f) { $mailer->addAttachment($f); } } } $mailer->setSubject($tags->ReplaceTags($unreg ? $params->get('unregistration_notification_subject') : $params->get('registration_notification_subject'))); $mailer->MsgHTML($mail); if (!$mailer->send()) { RedeventHelperLog::simplelog(JText::_('COM_REDEVENT_ERROR_REGISTRATION_MANAGERS_NOTIFICATION_FAILED')); $this->setError(JText::_('COM_REDEVENT_ERROR_REGISTRATION_MANAGERS_NOTIFICATION_FAILED')); return false; } return true; }
* 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. */ // no direct access defined('_JEXEC') or die('Restricted access'); ?> <div id="redevent" class="el_categoryevents"> <p class="buttons"> <?php if (!$this->params->get('popup')) { //don't show in printpopup echo REOutput::submitbutton($this->dellink, $this->params); } echo REOutput::mailbutton($this->category->slug, 'venuecategory', $this->params); echo REOutput::printbutton($this->print_link, $this->params); ?> </p> <?php if ($this->params->def('show_page_title', 1)) { ?> <h1 class='componentheading'> <?php echo $this->task == 'archive' ? $this->escape($this->category->name . ' - ' . JText::_('COM_REDEVENT_ARCHIVE')) : $this->escape($this->category->name); ?> </h1> <?php }
echo $i + 1 . $this->params->get('pageclass_sfx'); ?> " > <td headers="el_date" align="left"> <?php if ($this->acl->canEditXref($row->xref)) { ?> <?php echo JHTML::link('index.php?option=com_redevent&view=editevent&layout=eventdate&id=' . $row->slug . '&xref=' . $row->xref, REOutput::formatEventDateTime($row), array('class' => 'hasTip', 'title' => JText::_('COM_REDEVENT_EDIT_XREF') . '::' . JText::_('COM_REDEVENT_EDIT_XREF_TIP'))); ?> <?php } else { ?> <?php echo REOutput::formatEventDateTime($row); ?> <?php } ?> </td> <?php //Link to details $detaillink = JRoute::_('index.php?option=com_redevent&view=details&id=' . $row->slug . '&xref=' . $row->xref); //title ?> <td headers="el_title" align="left" valign="top"> <a href="<?php echo $detaillink; ?>
?> <?php echo strftime('%F', strtotime($this->row->registrationend)); ?> <?php } ?> <?php $registration_status = redEVENTHelper::canRegister($this->row->xref); ?> <div class="event-registration"> <?php if (!$registration_status->canregister) { $imgpath = 'components/com_redevent/assets/images/' . $registration_status->error . '.png'; $img = JHTML::_('image', JURI::base() . $imgpath, $registration_status->status, array('class' => 'hasTip', 'title' => $registration_status->status)); echo REOutput::moreInfoIcon($this->row->xslug, $img, $registration_status->status); } else { ?> <?php $venues_html = ''; /* Get the different submission types */ $submissiontypes = explode(',', $this->row->submission_types); $imagepath = JURI::base() . 'administrator/components/com_redevent/assets/images/'; foreach ($submissiontypes as $key => $subtype) { switch ($subtype) { case 'email': $venues_html .= '<div class="registration_method">' . JHTML::_('link', JRoute::_(RedeventHelperRoute::getSignupRoute('email', $this->row->slug, $this->row->xslug)), JHTML::_('image', $imagepath . $this->elsettings->get('signup_email_img'), JText::_($this->elsettings->get('signup_email_text')), 'width="24px" height="24px"')) . '</div> '; break; case 'phone': $venues_html .= '<div class="registration_method">' . JHTML::_('link', JRoute::_(RedeventHelperRoute::getSignupRoute('phone', $this->row->slug, $this->row->xslug)), JHTML::_('image', $imagepath . $this->elsettings->get('signup_phone_img'), JText::_($this->elsettings->get('signup_phone_text')), 'width="24px" height="24px"')) . '</div> '; break;
/** * Confirms the users request */ function activate() { $mainframe =& JFactory::getApplication(); $msgtype = 'message'; /* Get the confirm ID */ $confirmid = JRequest::getVar('confirmid', '', 'get'); /* Get the details out of the confirmid */ list($uip, $xref, $uid, $register_id, $submit_key) = explode("x", $confirmid); /* Confirm sign up via mail */ $model = $this->getModel('Registration', 'RedEventModel'); $model->setXref($xref); $eventdata = $model->getSessionDetails(); /* This loads the tags replacer */ JRequest::setVar('xref', $xref); require_once JPATH_COMPONENT_SITE . DS . 'helpers' . DS . 'tags.php'; $tags = new redEVENT_tags(); $tags->setXref($xref); $tags->setSubmitkey($submit_key); /* Check the db if this entry exists */ $db = JFactory::getDBO(); $q = ' SELECT r.confirmed ' . ' FROM #__redevent_register r ' . ' WHERE r.uid = ' . $db->Quote($uid) . ' AND r.submit_key = ' . $db->Quote($submit_key) . ' AND r.xref = ' . $db->Quote($xref) . ' AND r.id = ' . $db->Quote($register_id); $db->setQuery($q); $regdata = $db->loadObject(); if ($regdata && $regdata->confirmed == 0) { $model->confirm($register_id); // send activation confirmation email if activated if ($eventdata->enable_activation_confirmation) { $this->_Mailer(); $rfcore = new RedFormCore(); $addresses = $rfcore->getSubmissionContactEmail($submit_key); /* Check if there are any addresses to be mailed */ if (count($addresses) > 0) { /* Start mailing */ foreach ($addresses as $key => $sid) { foreach ($sid as $email) { /* Send a off mailinglist mail to the submitter if set */ /* Add the email address */ $this->mailer->AddAddress($email['email']); /* Mail submitter */ $htmlmsg = '<html><head><title></title></title></head><body>' . $tags->ReplaceTags($eventdata->notify_confirm_body) . '</body></html>'; // convert urls $htmlmsg = REOutput::ImgRelAbs($htmlmsg); $this->mailer->setBody($htmlmsg); $this->mailer->setSubject($tags->ReplaceTags($eventdata->notify_confirm_subject)); /* Send the mail */ if (!$this->mailer->Send()) { $mainframe->enqueueMessage(JText::_('COM_REDEVENT_THERE_WAS_A_PROBLEM_SENDING_MAIL')); RedeventHelperLog::simpleLog('Error sending confirm email' . ': ' . $this->mailer->error); } /* Clear the mail details */ $this->mailer->ClearAddresses(); } } } } $msg = JText::_('COM_REDEVENT_REGISTRATION_ACTIVATION_SUCCESSFULL'); } else { if ($regdata && $regdata->confirmed == 1) { $msg = JText::_('COM_REDEVENT_YOUR_SUBMISSION_HAS_ALREADY_BEEN_CONFIRMED'); $msgtype = 'error'; } else { $msg = JText::_('COM_REDEVENT_YOUR_SUBMISSION_CANNOT_BE_CONFIRMED'); $msgtype = 'error'; } } $this->setRedirect(JRoute::_(RedeventHelperRoute::getDetailsRoute($eventdata->did, $xref)), $msg, $msgtype); }