/** * Retrieval of update-data */ function getUpdatedata() { $installedversion = JemHelper::getParam(1,'version',1,'com_jem'); $updateFile = "http://www.joomlaeventmanager.net/updatecheck/update.xml"; $checkFile = self::CheckFile($updateFile); $updatedata = new stdClass(); if ($checkFile) { $xml = simplexml_load_file($updateFile); //version to check, not visible in table $updatedata->version = $xml->version; //in table $updatedata->versiondetail = $xml->versiondetail; $updatedata->date = JEMOutput::formatdate($xml->date); $updatedata->info = $xml->info; $updatedata->download = $xml->download; $updatedata->notes = $xml->notes; $updatedata->changes = explode(';', $xml->changes); $updatedata->failed = 0; $updatedata->installedversion = $installedversion; $updatedata->current = version_compare($installedversion, $updatedata->version); } else { $updatedata->failed = 1; $updatedata->installedversion = $installedversion; } return $updatedata; }
/** * Prepares the print screen * * @param $tpl * * */ protected function _displayprint($tpl = null) { // Load css JHtml::_('stylesheet', 'com_jem/backend.css', array(), true); $this->items = $this->get('Items'); $event = $this->get('Event'); if (JEMHelper::isValidDate($event->dates)) { $event->dates = JEMOutput::formatdate($event->dates); } else { $event->dates = JText::_('COM_JEM_OPEN_DATE'); } // assign data to template $this->event = $event; parent::display($tpl); }
<br /> <table class="adminlist"> <tr> <td> <b><?php echo JText::_('COM_JEM_TITLE') . ':'; ?> </b> <?php echo $this->escape($this->event->title); ?> <br /> <b><?php echo JText::_('COM_JEM_DATE') . ':'; ?> </b> <?php echo JEMOutput::formatLongDateTime($this->event->dates, $this->event->times, $this->event->enddates, $this->event->endtimes); ?> </td> </tr> </table> <br /> <table class="table table-striped" id="eventList"> <thead> <tr> <th class="title"><?php echo JText::_('COM_JEM_USERNAME'); ?> </th> <th class="title"><?php echo JText::_('COM_JEM_REGDATE'); ?>
<div class="files"> <h2 class="description"><?php echo JText::_('COM_JEM_FILES'); ?></h2> <table class="file"> <tbody> <?php foreach ($this->attachments as $file): ?> <tr> <td> <?php $overlib = JText::_('COM_JEM_FILE').': '.$this->escape($file->file); if (!empty($file->name)) { $overlib .= '<BR />'.JText::_('COM_JEM_FILE_NAME').': '.$this->escape($file->name); } if (!empty($file->description)) { $overlib .= '<BR />'.JText::_('COM_JEM_FILE_DESCRIPTION').': '.$this->escape($file->description); } ?> <span <?php echo JEMOutput::tooltip(JText::_('COM_JEM_DOWNLOAD'), $overlib, 'file-dl-icon file-name'); ?>> <?php $filename = $this->escape($file->name ? $file->name : $file->file); $image = JHtml::_('image','com_jem/download_16.png', JText::_('COM_JEM_DOWNLOAD'),NULL,true)." "."<span class=file-name>".$filename."</span>"; $attribs = array('class'=>'file-name'); echo JHtml::_('link','index.php?option=com_jem&task=getfile&format=raw&file='.$file->id,$image,$attribs); ?> </span> </td> </tr> <?php endforeach; ?> </tbody> </table> </div> <?php endif;
/** * Method to get the events * * @access public * @return array */ public static function getList(&$params) { mb_internal_encoding('UTF-8'); // Retrieve Eventslist model for the data $model = JModelLegacy::getInstance('Eventslist', 'JemModel', array('ignore_request' => true)); // Set params for the model // has to go before the getItems function $model->setState('params', $params); $model->setState('filter.access', true); # filter published # 0: unpublished # 1: published # 2: archived # -2: trashed $type = $params->get('type'); # archived events if ($type == 2) { $model->setState('filter.published', 2); $model->setState('filter.orderby', array('a.dates DESC', 'a.times DESC')); $cal_from = ""; } else { $model->setState('filter.published', 1); $model->setState('filter.orderby', array('a.dates ASC', 'a.times ASC')); $offset_minutes = 60 * $params->get('offset_hours', 0); $cal_from = "((TIMESTAMPDIFF(MINUTE, NOW(), CONCAT(a.dates,' ',IFNULL(a.times,'00:00:00'))) > {$offset_minutes}) "; $cal_from .= $type == 1 ? " OR (TIMESTAMPDIFF(MINUTE, NOW(), CONCAT(IFNULL(a.enddates,a.dates),' ',IFNULL(a.endtimes,'23:59:59'))) > {$offset_minutes})) " : ") "; } $model->setState('filter.calendar_from', $cal_from); $model->setState('filter.groupby', 'a.id'); # clean parameter data $catids = $params->get('catid'); $venids = $params->get('venid'); $eventids = $params->get('eventid'); # filter category's if ($catids) { $model->setState('filter.category_id', $catids); $model->setState('filter.category_id.include', true); } # filter venue's if ($venids) { $model->setState('filter.venue_id', $venids); $model->setState('filter.venue_id.include', true); } # filter event id's if ($eventids) { $model->setState('filter.event_id', $eventids); $model->setState('filter.event_id.include', true); } # count $count = $params->get('count', '2'); $model->setState('list.limit', $count); # Retrieve the available Events $events = $model->getItems(); # do we have $events? if (!$events) { return array(); } # Loop through the result rows and prepare data $i = 0; $lists = array(); $maxlength = $params->get('cuttitle', '18'); $settings = JemHelper::config(); $dateformat = $params->get('formatdate', $settings->formatShortDate); foreach ($events as $row) { //cut titel $length = mb_strlen($row->title); if ($length > $maxlength && $maxlength > 0) { $row->title = mb_substr($row->title, 0, $maxlength); $row->title = $row->title . '...'; } $lists[$i] = new stdClass(); $lists[$i]->link = JRoute::_(JEMHelperRoute::getEventRoute($row->slug)); $lists[$i]->dateinfo = JEMOutput::formatDateTime($row->dates, $row->times, $row->enddates, $row->endtimes, $dateformat); $lists[$i]->text = $params->get('showtitloc', 0) ? $row->title : htmlspecialchars($row->venue, ENT_COMPAT, 'UTF-8'); $lists[$i]->venue = htmlspecialchars($row->venue, ENT_COMPAT, 'UTF-8'); $lists[$i]->city = htmlspecialchars($row->city, ENT_COMPAT, 'UTF-8'); $lists[$i]->venueurl = !empty($row->venueslug) ? JRoute::_(JEMHelperRoute::getVenueRoute($row->venueslug)) : null; $i++; } return $lists; }
* @copyright (C) 2005-2009 Christoph Lukes * @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL */ defined('_JEXEC') or die; $gdv = JEMImage::gdVersion(); ?> <div class="width-100"> <fieldset class="adminform"> <legend><?php echo JText::_( 'COM_JEM_IMAGE_HANDLING' ); ?></legend> <ul class="adminformlist"> <li><?php echo $this->form->getLabel('sizelimit'); ?> <?php echo $this->form->getInput('sizelimit'); ?></li> <li><?php echo $this->form->getLabel('imagehight'); ?> <?php echo $this->form->getInput('imagehight'); ?></li> <li><?php echo $this->form->getLabel('imagewidth'); ?> <?php echo $this->form->getInput('imagewidth'); ?> <span <?php echo JEMOutput::tooltip(JText::_('COM_JEM_WARNING'), JText::_('COM_JEM_WARNING_MAX_IMAGEWIDTH'), 'error'); ?>> <?php echo $this->WarningIcon(); ?> </span> </li> <?php if ($gdv && $gdv >= 2) : //is the gd library installed on the server and its version > 2? ?> <li><?php echo $this->form->getLabel('gddisabled'); ?> <?php echo $this->form->getInput('gddisabled'); ?></li> <?php endif; ?> <li id="lb1" style="display:none"><?php echo $this->form->getLabel('lightbox'); ?> <?php echo $this->form->getInput('lightbox'); ?></li> </ul> </fieldset> </div>
for (var i = 0; i < selectBox.options.length; i++){ selectBox.options[i].selected = false; } } </script> <div id="jem" class="jem_jem"> <form action="index.php" method="post" name="adminForm" enctype="multipart/form-data" id="adminForm"> <div class="width-50 fltlft"> <fieldset class="adminform"> <legend><?php echo JText::_('COM_JEM_EXPORT_EVENTS_LEGEND');?></legend> <ul class="adminformlist"> <li><label <?php echo JEMOutput::tooltip(JText::_('COM_JEM_EXPORT_ADD_CATEGORYCOLUMN'), JText::_('COM_JEM_EXPORT_ADD_CATEGORYCOLUMN'), 'editlinktip'); ?>> <?php echo JText::_('COM_JEM_EXPORT_ADD_CATEGORYCOLUMN'); ?></label> <?php $categorycolumn = array(); $categorycolumn[] = JHtml::_('select.option', '0', JText::_('JNO')); $categorycolumn[] = JHtml::_('select.option', '1', JText::_('JYES')); $categorycolumn = JHtml::_('select.genericlist', $categorycolumn, 'categorycolumn', array('size'=>'1','class'=>'inputbox'), 'value', 'text', '1'); echo $categorycolumn;?></li> <li><label for="dates"><?php echo JText::_('COM_JEM_EXPORT_FROM_DATE').':'; ?></label> <?php echo JHtml::_('calendar', date("Y-m-d"), 'dates', 'dates', '%Y-%m-%d', array('class' => 'inputbox validate-date')); ?></li> <li><label for="enddates"><?php echo JText::_('COM_JEM_EXPORT_TO_DATE').':'; ?></label> <?php echo JHtml::_('calendar', date("Y-m-d"), 'enddates', 'enddates', '%Y-%m-%d', array('class' => 'inputbox validate-date')); ?></li> <li><label for="cid"><?php echo JText::_('COM_JEM_CATEGORY').':'; ?></label> <?php echo $this->categories; ?> <input class="button" name="selectall" value="<?php echo JText::_('COM_JEM_EXPORT_SELECT_ALL_CATEGORIES'); ?>" onclick="selectAll();"><br />
/** * Method to format date information * * @access public * @return array(string, string) returns date and time strings as array */ protected static function _format_date_time($row, &$params) { //Get needed timestamps and format $yesterday_stamp = mktime(0, 0, 0, date("m"), date("d") - 1, date("Y")); $yesterday = strftime("%Y-%m-%d", $yesterday_stamp); $today_stamp = mktime(0, 0, 0, date("m"), date("d"), date("Y")); $today = date('Y-m-d'); $tomorrow_stamp = mktime(0, 0, 0, date("m"), date("d") + 1, date("Y")); $tomorrow = strftime("%Y-%m-%d", $tomorrow_stamp); $dates_stamp = $row->dates ? strtotime($row->dates) : null; $enddates_stamp = $row->enddates ? strtotime($row->enddates) : null; //if datemethod show day difference if ($params->get('datemethod', 1) == 2) { //check if today or tomorrow if ($row->dates == $today) { $date = JText::_('MOD_JEM_WIDE_TODAY'); $time = $row->times ? JEMOutput::formattime($row->times, null, false) : ''; } elseif ($row->dates == $tomorrow) { $date = JText::_('MOD_JEM_WIDE_TOMORROW'); $time = $row->times ? JEMOutput::formattime($row->times, null, false) : ''; } elseif ($row->dates == $yesterday) { $date = JText::_('MOD_JEM_WIDE_YESTERDAY'); $time = $row->times ? JEMOutput::formattime($row->times, null, false) : ''; //This one isn't very different from the DAYS AGO output but it seems //adequate to use a different language string here. // //the event has an enddate and it's earlier than yesterday } elseif ($row->enddates && $enddates_stamp < $yesterday_stamp) { $days = round(($today_stamp - $enddates_stamp) / 86400); $date = JText::sprintf('MOD_JEM_WIDE_ENDED_DAYS_AGO', $days); $time = $row->times ? JEMOutput::formattime($row->endtimes, null, false) : ''; //the event has an enddate and it's later than today but the startdate is earlier than today //means a currently running event } elseif ($row->dates && $row->enddates && $enddates_stamp > $today_stamp && $dates_stamp < $today_stamp) { $days = round(($today_stamp - $dates_stamp) / 86400); $date = JText::sprintf('MOD_JEM_WIDE_STARTED_DAYS_AGO', $days); $time = $row->times ? JEMOutput::formattime($row->times, null, false) : ''; //the events date is earlier than yesterday } elseif ($row->dates && $dates_stamp < $yesterday_stamp) { $days = round(($today_stamp - $dates_stamp) / 86400); $date = JText::sprintf('MOD_JEM_WIDE_DAYS_AGO', $days); $time = $row->times ? JEMOutput::formattime($row->times, null, false) : ''; //the events date is later than tomorrow } elseif ($row->dates && $dates_stamp > $tomorrow_stamp) { $days = round(($dates_stamp - $today_stamp) / 86400); $date = JText::sprintf('MOD_JEM_WIDE_DAYS_AHEAD', $days); $time = $row->times ? JEMOutput::formattime($row->times, null, false) : ''; } } else { //Upcoming multidayevent (From 16.10.2008 Until 18.08.2008) if ($dates_stamp > $today_stamp && $enddates_stamp > $dates_stamp) { $startdate = JEMOutput::formatdate($row->dates, $params->get('formatdate', '%d.%m.%Y')); $enddate = JEMOutput::formatdate($row->enddates, $params->get('formatdate', '%d.%m.%Y')); $date = JText::sprintf('MOD_JEM_WIDE_FROM_UNTIL', $startdate, $enddate); $time = $row->times ? JEMOutput::formattime($row->times, null, false) : ''; // endtime always starts with separator, also if there is no starttime $time .= $row->endtimes ? ' - ' . JEMOutput::formattime($row->endtimes, null, false) : ''; } elseif ($row->enddates && $enddates_stamp > $today_stamp && $dates_stamp < $today_stamp) { //format date $date = JEMOutput::formatdate($row->enddates, $params->get('formatdate', '%d.%m.%Y')); $date = JText::sprintf('MOD_JEM_WIDE_UNTIL', $date); $time = $row->times ? JEMOutput::formattime($row->endtimes, null, false) : ''; } else { $date = JEMOutput::formatdate($row->dates, $params->get('formatdate', '%d.%m.%Y')); $date = JText::sprintf('MOD_JEM_WIDE_ON_DATE', $date); $time = $row->times ? JEMOutput::formattime($row->times, null, false) : ''; } } return array($date, $time); }
<p class="smallsub" title="<?php echo $this->escape($item->path);?>"> <?php echo str_repeat('<span class="gtr">|—</span>', $repeat) ?> <?php if (empty($item->note)) : ?> <?php echo JText::sprintf('JGLOBAL_LIST_ALIAS', $this->escape($item->alias));?> <?php else : ?> <?php echo JText::sprintf('JGLOBAL_LIST_ALIAS_NOTE', $this->escape($item->alias), $this->escape($item->note));?> <?php endif; ?></p> </td> <td class="center"> <div class="colorpreview" style="width: 20px; cursor:default;background-color: <?php echo ( $item->color == '' )?"transparent":$item->color; ?>;" title="<?php echo $item->color; ?>"> </div> </td> <td class="center"> <?php if ($item->catgroup) : ?> <span <?php echo JEMOutput::tooltip(JText::_('COM_JEM_GROUP_EDIT'), $item->catgroup, 'editlinktip'); ?>> <a href="<?php echo $grouplink; ?>"> <?php echo $this->escape($item->catgroup); ?> </a></span> <?php elseif ($item->groupid) : ?> <?php echo JText::sprintf('COM_JEM_CATEGORY_UNKNOWN_GROUP', $item->groupid); ?> <?php else : ?> <?php echo '-'; ?> <?php endif; ?> </td> <td class="center"> <?php echo $item->assignedevents; ?> </td> <td class="center"> <?php echo JHtml::_('jgrid.published', $item->published, $i, 'categories.', $canChange);?> </td>
<div class="clearfix"></div> <div class="info_container"> <?php if ($this->params->get('show_page_heading', 1)) { ?> <h1> <?php echo $this->escape($this->params->get('page_heading')); ?> </h1> <?php } ?> <!--table--> <?php echo $this->loadTemplate('venues'); ?> </div> <!--footer--> <div class="poweredby"> <?php echo JEMOutput::footer(); ?> </div> </div>
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL */ defined('_JEXEC') or die; ?> <!-- IMAGE --> <fieldset class="jem_fldst_image"> <legend><?php echo JText::_('COM_JEM_IMAGE'); ?> </legend> <?php if ($this->item->datimage) { echo JEMOutput::flyer($this->item, $this->dimage, 'event', 'datimage'); } ?> <div class="form-group"> <label for="userfile" class="col-sm-2 col-xs-12 control-label"> <?php echo JText::_('COM_JEM_IMAGE'); ?> </label> <div class="col-sm-6 col-xs-9"> <input class="inputbox <?php echo $this->jemsettings->imageenabled == 2 ? 'required' : ''; ?> form-control" name="userfile" id="userfile" type="file" aria-describedby="pictureHelp" /> </div> <div class="col-sm-2 col-xs-3">
echo $field->label; ?> </div> <div class="controls"><?php echo $field->input; ?> </div> </div> <?php } ?> </fieldset> <!-- IMAGE --> <fieldset class="form-horizontal"> <legend><span class="legendcolor"><?php echo JText::_('COM_JEM_IMAGE'); ?> </span></legend> <?php if (JFactory::getUser()->authorise('core.manage', 'com_jem')) { echo $this->form->renderField('locimage'); } ?> <?php if ($this->item->locimage) { echo JEMOutput::flyer($this->item, $this->limage, 'venue'); } ?> </fieldset> </div>
</ul> </fieldset> <!-- IMAGE --> <fieldset class="jem_fldst_image"> <legend><?php echo JText::_('COM_JEM_IMAGE'); ?></legend> <?php if ($this->item->datimage) : echo JEMOutput::flyer($this->item, $this->dimage, 'event', 'datimage'); endif; ?> <ul class="adminformlist"> <li> <label for="userfile"> <?php echo JText::_('COM_JEM_IMAGE'); ?> <small <?php echo JEMOutput::tooltip(JText::_('COM_JEM_NOTES'), JText::_('COM_JEM_MAX_IMAGE_FILE_SIZE').' '.$this->jemsettings->sizelimit.' kb', 'editlinktip'); ?>> <?php echo $this->infoimage; ?> </small> </label> <input class="inputbox <?php echo $this->jemsettings->imageenabled == 2 ? 'required' : ''; ?>" name="userfile" id="userfile" type="file" /> <button type="button" class="button3" onclick="document.getElementById('userfile').value = ''"><?php echo JText::_('JSEARCH_FILTER_CLEAR') ?></button> <?php if ($this->item->datimage) : echo JHtml::image('media/com_jem/images/publish_r.png', null, array('id' => 'userfile-remove', 'data-id' => $this->item->id, 'data-type' => 'events', 'title' => JText::_('COM_JEM_REMOVE_IMAGE'))); endif; ?> </li> </ul> <input type="hidden" name="removeimage" id="removeimage" value="0" /> </fieldset>
?> <div class="width-100"> <fieldset class="adminform"> <legend><?php echo JText::_( 'COM_JEM_DISPLAY_SETTINGS' ); ?></legend> <ul class="adminformlist"> <li><?php echo $this->form->getLabel('showdetails'); ?> <?php echo $this->form->getInput('showdetails'); ?></li> <li><?php echo $this->form->getLabel('formatShortDate'); ?> <?php echo $this->form->getInput('formatShortDate'); ?> <span <?php echo JEMOutput::tooltip(JText::_('COM_JEM_PHP_DATE_MANUAL'), JText::_('COM_JEM_PHP_DATE_MANUAL_DESC'), 'error'); ?>> <a href="http://php.net/manual/en/function.date.php" target="_blank"><?php echo $this->WarningIcon(); ?></a> </span> </li> <li><?php echo $this->form->getLabel('formatdate'); ?> <?php echo $this->form->getInput('formatdate'); ?> <span <?php echo JEMOutput::tooltip(JText::_('COM_JEM_PHP_DATE_MANUAL'), JText::_('COM_JEM_PHP_DATE_MANUAL_DESC'), 'error'); ?>> <a href="http://php.net/manual/en/function.date.php" target="_blank"><?php echo $this->WarningIcon(); ?></a> </span> </li> <li><?php echo $this->form->getLabel('formattime'); ?> <?php echo $this->form->getInput('formattime'); ?> <span <?php echo JEMOutput::tooltip(JText::_('COM_JEM_TIME_STRFTIME'), JText::_('COM_JEM_TIME_STRFTIME_DESC'), 'error'); ?>> <a href="http://www.php.net/strftime" target="_blank"><?php echo $this->WarningIcon(); ?></a> </span> </li> <li><?php echo $this->form->getLabel('timename'); ?> <?php echo $this->form->getInput('timename'); ?></li> <li><?php echo $this->form->getLabel('storeip'); ?> <?php echo $this->form->getInput('storeip'); ?></li> </ul> </fieldset> </div>
<?php if ($this->jemsettings->showlocate == 1) : ?> <td headers="jem_location_cat<?php echo $this->catrow->id; ?>" align="left" valign="top"> <?php if ($this->jemsettings->showlinkvenue == 1 ) : ?> <?php echo $row->locid != 0 ? "<a href='".JRoute::_(JEMHelperRoute::getVenueRoute($row->venueslug))."'>".$this->escape($row->venue)."</a>" : '-'; ?> <?php else : ?> <?php echo $row->locid ? $this->escape($row->venue) : '-'; ?> <?php endif; ?> </td> <?php endif; ?> <?php if ($this->jemsettings->showcity == 1) : ?> <td headers="jem_city_cat<?php echo $this->catrow->id; ?>" align="left" valign="top"><?php echo $row->city ? $this->escape($row->city) : '-'; ?></td> <?php endif; ?> <?php if ($this->jemsettings->showstate == 1) : ?> <td headers="jem_state_cat<?php echo $this->catrow->id; ?>" align="left" valign="top"><?php echo $row->state ? $this->escape($row->state) : '-'; ?></td> <?php endif; ?> <?php if ($this->jemsettings->showcat == 1) : ?> <td headers="jem_category_cat<?php echo $this->catrow->id; ?>" align="left" valign="top"> <?php echo implode(", ", JEMOutput::getCategoryList($row->categories, $this->jemsettings->catlinklist)); ?> </td> <?php endif; ?> </tr> <?php $odd = 1 - $odd; ?> <?php endforeach; ?> <?php endif; ?> </tbody> </table>
/** * Method to format date and time information * * @access protected * @return array(string, string) returns date and time strings as array */ protected static function _format_date_time($row, $method, $dateFormat = '', $timeFormat = '', $addSuffix = false) { if (empty($row->dates)) { // open date $date = JEMOutput::formatDateTime('', ''); // "Open date" $times = $row->times; $endtimes = $row->endtimes; } else { //Get needed timestamps and format $yesterday_stamp = mktime(0, 0, 0, date("m"), date("d") - 1, date("Y")); $yesterday = strftime("%Y-%m-%d", $yesterday_stamp); $today_stamp = mktime(0, 0, 0, date("m"), date("d"), date("Y")); $today = date('Y-m-d'); $tomorrow_stamp = mktime(0, 0, 0, date("m"), date("d") + 1, date("Y")); $tomorrow = strftime("%Y-%m-%d", $tomorrow_stamp); $dates_stamp = $row->dates ? strtotime($row->dates) : null; $enddates_stamp = $row->enddates ? strtotime($row->enddates) : null; $times = $row->times; // show starttime by default //if datemethod show day difference if ($method == 2) { //check if today or tomorrow if ($row->dates == $today) { $date = JText::_('MOD_JEM_WIDE_TODAY'); } elseif ($row->dates == $tomorrow) { $date = JText::_('MOD_JEM_WIDE_TOMORROW'); } elseif ($row->dates == $yesterday) { $date = JText::_('MOD_JEM_WIDE_YESTERDAY'); } elseif ($row->enddates && $enddates_stamp < $yesterday_stamp) { $days = round(($today_stamp - $enddates_stamp) / 86400); $date = JText::sprintf('MOD_JEM_WIDE_ENDED_DAYS_AGO', $days); // show endtime instead of starttime $times = false; $endtimes = $row->endtimes; } elseif ($row->dates && $row->enddates && $enddates_stamp > $today_stamp && $dates_stamp < $today_stamp) { $days = round(($today_stamp - $dates_stamp) / 86400); $date = JText::sprintf('MOD_JEM_WIDE_STARTED_DAYS_AGO', $days); } elseif ($row->dates && $dates_stamp < $yesterday_stamp) { $days = round(($today_stamp - $dates_stamp) / 86400); $date = JText::sprintf('MOD_JEM_WIDE_DAYS_AGO', $days); } elseif ($row->dates && $dates_stamp > $tomorrow_stamp) { $days = round(($dates_stamp - $today_stamp) / 86400); $date = JText::sprintf('MOD_JEM_WIDE_DAYS_AHEAD', $days); } else { $date = JEMOutput::formatDateTime('', ''); // Oops - say "Open date" } } else { // datemethod show date // TODO: check date+time to be more acurate //Upcoming multidayevent (From 16.10.2008 Until 18.08.2008) if ($dates_stamp >= $today_stamp && $enddates_stamp > $dates_stamp) { $startdate = JEMOutput::formatdate($row->dates, $dateFormat); $enddate = JEMOutput::formatdate($row->enddates, $dateFormat); $date = JText::sprintf('MOD_JEM_WIDE_FROM_UNTIL', $startdate, $enddate); // additionally show endtime $endtimes = $row->endtimes; } elseif ($row->enddates && $enddates_stamp >= $today_stamp && $dates_stamp < $today_stamp) { $enddate = JEMOutput::formatdate($row->enddates, $dateFormat); $date = JText::sprintf('MOD_JEM_WIDE_UNTIL', $enddate); // show endtime instead of starttime $times = false; $endtimes = $row->endtimes; } else { $startdate = JEMOutput::formatdate($row->dates, $dateFormat); $date = JText::sprintf('MOD_JEM_WIDE_ON_DATE', $startdate); // additionally show endtime, but on single day events only to prevent user confusion if (empty($row->enddates)) { $endtimes = $row->endtimes; } } } } $time = empty($times) ? '' : JEMOutput::formattime($times, $timeFormat, $addSuffix); $time .= empty($endtimes) ? '' : ' - ' . JEMOutput::formattime($row->endtimes, $timeFormat, $addSuffix); return array($date, $time); }
<?php if ($this->jemsettings->showcity == 1) : ?> <td headers="jem_city" align="left" valign="top"> <?php echo $row->city ? $this->escape($row->city) : '-'; ?> </td> <?php endif; ?> <?php if ($this->jemsettings->showstate == 1) : ?> <td headers="jem_state" align="left" valign="top"> <?php echo $row->state ? $this->escape($row->state) : '-'; ?> </td> <?php endif; ?> <?php if ($this->jemsettings->showcat == 1) : ?> <td headers="jem_category" align="left" valign="top"> <?php echo implode(", ", JEMOutput::getCategoryList($row->categories, $this->jemsettings->catlinklist)); ?> </td> <?php endif; ?> </tr> <?php $i = 1 - $i; ?> <?php endforeach; ?> <?php endif; ?> </tbody> </table> <input type="hidden" name="filter_order" value="<?php echo $this->lists['order']; ?>" /> <input type="hidden" name="filter_order_Dir" value="<?php echo $this->lists['order_Dir']; ?>" /> <input type="hidden" name="boxchecked" value="0" /> <input type="hidden" name="task" value="<?php echo $this->task; ?>" /> <input type="hidden" name="option" value="com_jem" />
<?php endif;?> <th class="center"><?php echo JText::_('COM_JEM_REMOVE_USER'); ?></th> </tr> </thead> <tbody> <?php foreach ($this->rows as $i => $row) : ?> <tr class="row<?php echo $i % 2; ?>"> <td class="center"><?php echo $this->pagination->getRowOffset($i); ?></td> <!--td class="center"><?php echo JHtml::_('grid.id', $i, $row->id); ?></td--> <td><?php echo $row->$namefield; ?></td> <?php if ($this->enableemailaddress == 1) {?> <td><a href="mailto:<?php echo $row->email; ?>"><?php echo $row->email; ?></a></td> <?php } ?> <td><?php echo JHtml::_('date',$row->uregdate,JText::_('DATE_FORMAT_LC2')); ?></td> <?php if ($this->event->waitinglist): ?> <td <?php echo JEMOutput::tooltip(JText::_($row->waiting ? 'COM_JEM_ATTENDEES_ON_WAITINGLIST' : 'COM_JEM_ATTENDEES_ATTENDING'), '', 'center'); ?> <?php if ($row->waiting):?> <?php echo JHtml::_('link',JRoute::_('index.php?option=com_jem&view=attendees&task=attendees.attendeetoggle&id='.$row->id),JHtml::_('image','com_jem/publish_y.png',JText::_('COM_JEM_ON_WAITINGLIST'),NULL,true)); ?> <?php else: ?> <?php echo JHtml::_('link',JRoute::_('index.php?option=com_jem&view=attendees&task=attendees.attendeetoggle&id='.$row->id),JHtml::_('image','com_jem/tick.png', JText::_('COM_JEM_ATTENDEES_ATTENDING'),NULL,true)); ?> <?php endif;?> </td> <?php endif;?> <td class="center"><a href="javascript: void(0);" onclick="return listItemTask('cb<?php echo $i;?>','attendees.attendeeremove')"><?php echo JHtml::_('image','com_jem/publish_r.png', JText::_('COM_JEM_ATTENDEES_DELETE'), array('title' => JText::_('COM_JEM_ATTENDEES_DELETE')), true); ?></a></td> </tr> <?php endforeach; ?> </tbody> </table> <?php echo JHtml::_('form.token'); ?>
defined('_JEXEC') or die; ?> <div id="jem" class="jem_day<?php echo $this->pageclass_sfx; ?> "> <div class="topbox"> <div class="btn-group pull-right"> <?php if ($this->print) { echo JemOutput::printbutton($this->print_link, $this->params); } else { ?> <div class="button_flyer icons"> <?php echo JEMOutput::printbutton($this->print_link, $this->params); ?> </div> <?php } ?> </div></div> <div class="clearfix"></div> <!-- info --> <div class="info_container"> <?php if ($this->params->get('show_page_heading', 1)) { ?> <h1> <?php echo $this->escape($this->params->get('page_heading'));
<?php echo JText::_( 'COM_JEM_EVENT_TIME' ); ?></option> <option value="[enddates]" <?php if(in_array("[enddates]",$meta_key)) { echo "selected=\"selected\""; } ?>> <?php echo JText::_( 'COM_JEM_ENDDATE' ); ?></option> <option value="[endtimes]" <?php if(in_array("[endtimes]",$meta_key)) { echo "selected=\"selected\""; } ?>> <?php echo JText::_( 'COM_JEM_END_TIME' ); ?></option> </select> </div> </li> <li><?php echo $this->form->getLabel('meta_description'); ?> <div style="display: inline-block;"> <input class="inputbox" type="button" onclick="insert_keyword('[title]')" value="<?php echo JText::_( 'COM_JEM_EVENT_TITLE' ); ?>" /> <input class="inputbox" type="button" onclick="insert_keyword('[a_name]')" value="<?php echo JText::_( 'COM_JEM_VENUE' ); ?>" /> <input class="inputbox" type="button" onclick="insert_keyword('[dates]')" value="<?php echo JText::_( 'COM_JEM_DATE' ); ?>" /> <input class="inputbox" type="button" onclick="insert_keyword('[times]')" value="<?php echo JText::_( 'COM_JEM_EVENT_TIME' ); ?>" /> <input class="inputbox" type="button" onclick="insert_keyword('[enddates]')" value="<?php echo JText::_( 'COM_JEM_ENDDATE' ); ?>" /> <input class="inputbox" type="button" onclick="insert_keyword('[endtimes]')" value="<?php echo JText::_( 'COM_JEM_END_TIME' ); ?>" /> <br/> <?php echo $this->form->getInput('meta_description'); ?> <br/> <input type="button" value="<?php echo JText::_( 'COM_JEM_META_DESCRIPTION_BUTTON' ); ?>" onclick="include_description()" /> <span <?php echo JEMOutput::tooltip(JText::_('COM_JEM_WARNING'), JText::_('COM_JEM_META_DESCRIPTION_WARN'), 'error'); ?>> <?php echo $this->WarningIcon(); ?> </span> </div> </li> </ul> </fieldset> </div>
* @copyright (C) 2013-2015 joomlaeventmanager.net * @copyright (C) 2005-2009 Christoph Lukes * @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL */ defined('_JEXEC') or die; $mapType = $this->mapType; ?> <div id="jem" class="jem_venue<?php echo $this->pageclass_sfx; ?> " itemscope="itemscope" itemtype="http://schema.org/Place"> <div class="topbox"> <div class="btn-group pull-left"> <?php echo JEMOutput::statuslabel($this->venue->published); ?> </div> <div class="btn-group pull-right hidden-phone"> <?php if ($this->print) { echo JemOutput::printbutton($this->print_link, $this->params); } else { ?> <div class="button_flyer icons"> <?php echo JemOutput::printbutton($this->print_link, $this->params); echo JemOutput::mailbutton($this->venue->slug, 'venue', $this->params); echo JemOutput::submitbutton($this->addeventlink, $this->params); echo JemOutput::addvenuebutton($this->addvenuelink, $this->params, $this->jemsettings); echo JemOutput::archivebutton($this->params, $this->task, $this->venue->slug);
<?php echo JText::_('COM_JEM_EMAIL').': '; ?><a href="mailto:<?php echo $row->email; ?>"><?php echo $row->email; ?></a><br /> <?php $created = JHtml::_('date',$row->created,JText::_('DATE_FORMAT_LC2')); $modified = JHtml::_('date',$row->modified,JText::_('DATE_FORMAT_LC2') ); $image = JHtml::_('image','com_jem/icon-16-info.png',NULL,NULL,true ); $overlib = JText::_('COM_JEM_CREATED_AT').': '.$created.'<br />'; if ($row->author_ip != '') { $overlib .= JText::_('COM_JEM_WITH_IP').': '.$row->author_ip.'<br />'; } if ($row->modified != '0000-00-00 00:00:00') { $overlib .= JText::_('COM_JEM_EDITED_AT').': '.$modified.'<br />'; $overlib .= JText::_('COM_JEM_GLOBAL_MODIFIEDBY').': '.$row->modified_by.'<br />'; } ?> <span <?php echo JEMOutput::tooltip(JText::_('COM_JEM_EVENTS_STATS'), $overlib, 'editlinktip'); ?>> <?php echo $image; ?> </span> </td> <td class="center"><?php echo $row->hits; ?></td> <td class="center"> <?php if ($row->registra == 1) { $linkreg = 'index.php?option=com_jem&view=attendees&id='.$row->id; $count = $row->regCount; if ($row->maxplaces) { $count .= '/'.$row->maxplaces; if ($row->waitinglist && $row->waiting) { $count .= ' +'.$row->waiting;
<th align="left" class="sectiontableheader"><?php echo JHtml::_('grid.sort', 'COM_JEM_STATE', 'con.state', $this->lists['order_Dir'], $this->lists['order'] ); ?></th> <?php if (0) : /* removed because it maybe forbidden to show */ ?> <th align="left" class="sectiontableheader"><?php echo JText::_('COM_JEM_EMAIL'); ?></th> <th align="left" class="sectiontableheader"><?php echo JText::_('COM_JEM_TELEPHONE'); ?></th> <?php endif; ?> </tr> </thead> <tbody> <?php if (empty($this->rows)) : ?> <tr align="center"><td colspan="0"><?php echo JText::_('COM_JEM_NOCONTACTS'); ?></td></tr> <?php else :?> <?php foreach ($this->rows as $i => $row) : ?> <tr class="row<?php echo $i % 2; ?>"> <td class="center"><?php echo $this->pagination->getRowOffset( $i ); ?></td> <td align="left"> <span <?php echo JEMOutput::tooltip(JText::_('COM_JEM_SELECT'), $row->name, 'editlinktip'); ?>> <a class="pointer;" onclick="if (window.parent) window.parent.<?php echo $this->escape($function);?>('<?php echo $row->id; ?>', '<?php echo $this->escape(addslashes($row->name)); ?>');"><?php echo $this->escape($row->name); ?></a> </span> </td> <?php if (0) : /* removed because it maybe forbidden to show */ ?> <td align="left"><?php echo $this->escape($row->address); ?></td> <?php endif; ?> <td align="left"><?php echo $this->escape($row->suburb); ?></td> <td align="left"><?php echo $this->escape($row->state); ?></td> <?php if (0) : /* removed because it maybe forbidden to show */ ?> <td align="left"><?php echo $this->escape($row->email_to); ?></td> <td align="left"><?php echo $this->escape($row->telephone); ?></td> <?php endif; ?> </tr> <?php endforeach; ?> <?php endif; ?>
<?php foreach ($this->catrow->events as $row) { ?> <tr class="sectiontableentry<?php echo $odd + 1 . $this->params->get('pageclass_sfx'); ?> " itemscope="itemscope" itemtype="http://schema.org/Event"> <td class="jem_date_cat<?php echo $this->catrow->id; ?> "> <?php echo JEMOutput::formatShortDateTime($row->dates, $row->times, $row->enddates, $row->endtimes); echo JEMOutput::formatSchemaOrgDateTime($row->dates, $row->times, $row->enddates, $row->endtimes); ?> </td> <?php if ($this->jemsettings->showtitle == 1 && $this->jemsettings->showdetails == 2) { ?> <?php if ($this->escape($row->introtext) != "") { ?> <td class="jem_title"> <a href="<?php echo JRoute::_(JemHelperRoute::getEventRoute($row->slug)); ?> " itemprop="url"> <span itemprop="name"><?php echo $this->escape($row->title);
/** * Method to format date and time information * * @access protected * @return array(string, string) returns date and time strings as array */ protected static function _format_date_time($row, $method, $dateFormat = '', $timeFormat = '', $addSuffix = false) { if (empty($row->dates)) { // open date $date = JEMOutput::formatDateTime('', ''); // "Open date" $times = $row->times; $endtimes = $row->endtimes; } else { //Get needed timestamps and format $yesterday_stamp = mktime(0, 0, 0, date("m"), date("d")-1, date("Y")); $yesterday = strftime("%Y-%m-%d", $yesterday_stamp); $today_stamp = mktime(0, 0, 0, date("m"), date("d"), date("Y")); $today = date('Y-m-d'); $tomorrow_stamp = mktime(0, 0, 0, date("m"), date("d")+1, date("Y")); $tomorrow = strftime("%Y-%m-%d", $tomorrow_stamp); $dates_stamp = $row->dates ? strtotime($row->dates) : null; $enddates_stamp = $row->enddates ? strtotime($row->enddates) : null; $times = $row->times; // show starttime by default //if datemethod show day difference if ($method == 2) { //check if today or tomorrow if ($row->dates == $today) { $date = JText::_('MOD_JEM_TEASER_TODAY'); } elseif ($row->dates == $tomorrow) { $date = JText::_('MOD_JEM_TEASER_TOMORROW'); } elseif ($row->dates == $yesterday) { $date = JText::_('MOD_JEM_TEASER_YESTERDAY'); } //This one isn't very different from the DAYS AGO output but it seems //adequate to use a different language string here. // //the event has an enddate and it's earlier than yesterday elseif ($row->enddates && ($enddates_stamp < $yesterday_stamp)) { $days = round(($today_stamp - $enddates_stamp) / 86400); $date = JText::sprintf('MOD_JEM_TEASER_ENDED_DAYS_AGO', $days); // show endtime instead of starttime $times = false; $endtimes = $row->endtimes; } //the event has an enddate and it's later than today but the startdate is earlier than today //means a currently running event elseif ($row->dates && $row->enddates && ($enddates_stamp > $today_stamp) && ($dates_stamp < $today_stamp)) { $days = round(($today_stamp - $dates_stamp) / 86400); $date = JText::sprintf('MOD_JEM_TEASER_STARTED_DAYS_AGO', $days); } //the events date is earlier than yesterday elseif ($row->dates && ($dates_stamp < $yesterday_stamp)) { $days = round(($today_stamp - $dates_stamp) / 86400); $date = JText::sprintf('MOD_JEM_TEASER_DAYS_AGO', $days); } //the events date is later than tomorrow elseif ($row->dates && ($dates_stamp > $tomorrow_stamp)) { $days = round(($dates_stamp - $today_stamp) / 86400); $date = JText::sprintf('MOD_JEM_TEASER_DAYS_AHEAD', $days); } else { $date = JEMOutput::formatDateTime('', ''); // Oops - say "Open date" } } else { // datemethod show date - not shown beause there is a calendar image // TODO: check date+time to be more acurate //Upcoming multidayevent (From 16.10.2008 Until 18.08.2008) if (($dates_stamp >= $today_stamp) && ($enddates_stamp > $dates_stamp)) { $startdate = JEMOutput::formatdate($row->dates, $dateFormat); $enddate = JEMOutput::formatdate($row->enddates, $dateFormat); $date = JText::sprintf('MOD_JEM_TEASER_FROM_UNTIL', $startdate, $enddate); // don't show endtime because calendar is shown } //current multidayevent (Until 18.08.2008) elseif ($row->enddates && ($enddates_stamp >= $today_stamp) && ($dates_stamp < $today_stamp)) { $enddate = JEMOutput::formatdate($row->enddates, $dateFormat); $date = JText::sprintf('MOD_JEM_TEASER_UNTIL', $enddate); // don't show endtime because calendar is shown } //single day event else { $startdate = JEMOutput::formatdate($row->dates, $dateFormat); $date = JText::sprintf('MOD_JEM_TEASER_ON_DATE', $startdate); // additionally show endtime, but on single day events only to prevent user confusion if (empty($row->enddates)) { $endtimes = $row->endtimes; } } } } $time = empty($times) ? '' : JEMOutput::formattime($times, $timeFormat, $addSuffix); $time .= empty($endtimes) ? '' : (' - ' . JEMOutput::formattime($row->endtimes, $timeFormat, $addSuffix)); return array($date, $time); }
* @package JEM * @copyright (C) 2013-2015 joomlaeventmanager.net * @copyright (C) 2005-2009 Christoph Lukes * @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL */ defined('_JEXEC') or die; ?> <div id="jem" class="jem_myvenues<?php echo $this->pageclass_sfx;?>"> <div class="buttons"> <?php $btn_params = array('task' => $this->task, 'print_link' => $this->print_link); echo JemOutput::createButtonBar($this->getName(), $this->permissions, $btn_params); ?> </div> <?php if ($this->params->get('show_page_heading', 1)) : ?> <h1 class="componentheading"> <?php echo $this->escape($this->params->get('page_heading')); ?> </h1> <?php endif; ?> <!--table--> <?php echo $this->loadTemplate('venues');?> <!--footer--> <div class="copyright"> <?php echo JEMOutput::footer( ); ?> </div> </div>
/** * Get a category names list * @param unknown $categories Category List * @param boolean $doLink Link the categories to the respective Category View * @param boolean $backend Used for backend (true) or frontend (false, default) * @return string|multitype: */ static function getCategoryList($categories, $doLink, $backend = false) { $output = array_map( function ($category) use ($doLink, $backend) { if ($doLink) { if ($backend) { $path = $category->path; $path = str_replace('/', ' » ', $path); $value = '<span '.JEMOutput::tooltip(JText::_('COM_JEM_EDIT_CATEGORY'), $path, 'editlinktip').'>'; $value .= '<a href="index.php?option=com_jem&task=category.edit&id='. $category->id.'">'. $category->catname.'</a>'; $value .= '</span>'; } else { $value = '<a href="'.JRoute::_(JemHelperRoute::getCategoryRoute($category->catslug)).'">'. $category->catname.'</a>'; } } else { $value = $category->catname; } return $value; }, $categories); return $output; }
protected function _display($rows, $parameters, $listevents_id) { if (!$rows) { return $parameters["eventsmsgnone"]; } $html_list = '<div class="listevents" id="listevents-' . $listevents_id . '">'; $html_list .= '<ul>'; $n_event = 0; foreach ($rows as $event) { require_once JPATH_BASE . "/components/com_jem/helpers/route.php"; $linkdetails = JRoute::_(JEMHelperRoute::getEventRoute($event->slug)); $linkdate = JRoute::_(JEMHelperRoute::getRoute(str_replace('-', '', $event->dates), 'day')); $linkvenue = JRoute::_(JEMHelperRoute::getVenueRoute($event->venueslug)); $jemsettings = JemHelper::config(); if ($parameters["eventstype"] == 'regprev' || $parameters["eventstype"] == 'regnext') { require_once JPATH_BASE . "/components/com_jem/models/eventlist.php"; $eventsmodel = new EventListModelEventList(); $query = 'SELECT COUNT(uid) as attendees from #__eventlist_register WHERE event = ' . $event->eventid; $eventsmodel->_db->setQuery($query); $_event = $eventsmodel->_db->loadObject(); $attendees = $_event->attendees; if ($attendees == 0) { continue; } } $html_list .= '<li id="listevent' . ($n_event + 1) . '">'; if ($parameters["eventstitle"] != 'off') { $html_list .= '<span id="eventtitle">'; $html_list .= $parameters["eventstitle"] == 'link' ? '<a href="' . $linkdetails . '">' : ''; $html_list .= $event->title; $html_list .= $parameters["eventstitle"] == 'link' ? '</a>' : ''; $html_list .= '</span>'; } if ($parameters["eventsdate"] != 'off' && $event->dates) { # display startdate require_once JPATH_BASE . "/components/com_jem/helpers/helper.php"; require_once JPATH_BASE . "/components/com_jem/classes/output.class.php"; $html_list .= ' : ' . '<span id="eventdate">'; $html_list .= $parameters["eventsdate"] == 'link' ? '<a href="' . $linkdate . '">' : ''; $html_list .= JEMOutput::formatdate($event->dates); $html_list .= $parameters["eventsdate"] == 'link' ? '</a>' : ''; $html_list .= '</span>'; } if ($parameters["eventstime"] != 'off' && $event->times) { # display starttime require_once JPATH_BASE . "/components/com_jem/helpers/helper.php"; require_once JPATH_BASE . "/components/com_jem/classes/output.class.php"; $html_list .= ' ' . '<span id="eventtime">'; $html_list .= JEMOutput::formattime($event->times); $html_list .= '</span>'; } if ($parameters["eventsvenue"] != 'off' && $event->venue) { $html_list .= ' : ' . '<span id="eventvenue">'; $html_list .= $parameters["eventsvenue"] == 'link' ? '<a href="' . $linkvenue . '">' : ''; $html_list .= $event->venue; $html_list .= $parameters["eventsvenue"] == 'link' ? '</a>' : ''; $html_list .= '</span>'; } if ($parameters["eventscategory"] != 'off' && $event->categories) { if ($parameters["eventscategory"] == 'link') { $catlink = 1; } else { $catlink = false; } $html_list .= " "; $html_list .= implode(", ", JemOutput::getCategoryList($event->categories, $catlink)); } $html_list .= '</li>'; $n_event++; if ($parameters["eventsmax"] && $n_event >= $parameters["eventsmax"]) { break; } } if ($n_event == 0) { $html_list .= $parameters["eventsmsgnone"]; } $html_list .= '</ul>'; $html_list .= '</div>'; return $html_list; }