primo commit
This commit is contained in:
2126
components/com_jem/classes/Zebra_Image.php
Normal file
2126
components/com_jem/classes/Zebra_Image.php
Normal file
File diff suppressed because it is too large
Load Diff
211
components/com_jem/classes/activecalendarweek.php
Normal file
211
components/com_jem/classes/activecalendarweek.php
Normal file
@ -0,0 +1,211 @@
|
||||
<?php
|
||||
/**
|
||||
* @package JEM
|
||||
* @copyright (C) 2013-2024 joomlaeventmanager.net
|
||||
* @copyright (C) 2005-2009 Christoph Lukes
|
||||
* @license https://www.gnu.org/licenses/gpl-3.0 GNU/GPL
|
||||
*/
|
||||
|
||||
/**
|
||||
* @subclass: activeCalendarWeek
|
||||
* @class: activeCalendar
|
||||
* @project: Active Calendar
|
||||
* @license: GNU LESSER GENERAL PUBLIC LICENSE;
|
||||
* Special thanks to Jeremy D. Frens, Professor, Computer Science <jdfrens@calvin.edu> for his help developing this code
|
||||
* This subclass generates weekly calendars as a html table (XHTML Valid) using the activeCalendar class
|
||||
* Support, feature requests and bug reports please at : https://www.micronetwork.de/activecalendar/
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
require_once('calendar.class.php');
|
||||
|
||||
class ActiveCalendarWeek extends JEMCalendar {
|
||||
/*
|
||||
********************************************************************************
|
||||
Names of the generated html classes. You may change them to avoid any conflicts with your existing CSS
|
||||
********************************************************************************
|
||||
*/
|
||||
var $cssWeeksTable="week";
|
||||
var $cssMonthWeek="monthweek";
|
||||
/*
|
||||
----------------------
|
||||
@START PUBLIC METHODS
|
||||
----------------------
|
||||
*/
|
||||
/*
|
||||
********************************************************************************
|
||||
PUBLIC class constructor. Calls the main class constructor
|
||||
********************************************************************************
|
||||
*/
|
||||
public function __construct($year=false, $month=false, $day=false, $GMTDiff="none") {
|
||||
parent::__construct($year, $month, $day, $GMTDiff);
|
||||
$this->GMT=$GMTDiff;
|
||||
}
|
||||
/*
|
||||
********************************************************************************
|
||||
PUBLIC showWeeks() -> returns the week view as html table string
|
||||
The week calendar starts on the date set in the constructor
|
||||
It generates as many rows as set in $numberOfWeeks
|
||||
********************************************************************************
|
||||
*/
|
||||
function showWeeks($numberOfWeeks=1) {
|
||||
$out=$this->mkWeeksHead();
|
||||
$out.=$this->mkWeekDayz();
|
||||
$out.=$this->mkWeeksBody($numberOfWeeks);
|
||||
$out.=$this->mkWeeksFoot();
|
||||
|
||||
return $out;
|
||||
}
|
||||
/*
|
||||
********************************************************************************
|
||||
PUBLIC showWeeksByID() -> returns the week view as html table string
|
||||
The week calendar starts with the week row, that has the same week number of the year as set in the weekID
|
||||
It generates as many rows as set in $numberOfWeeks
|
||||
********************************************************************************
|
||||
*/
|
||||
function showWeeksByID($weekID=1, $numberOfWeeks=1) {
|
||||
$xday=1;
|
||||
$from = ($weekID-2) * 7;
|
||||
$to = ($weekID+1) * 7;
|
||||
for ($day = $from; $day < $to; $day++) {
|
||||
$tmp=parent::getWeekNum($day);
|
||||
if ($tmp==$weekID) {
|
||||
$xday=$day;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if ($this->startOnSun) $xday=$xday-1;
|
||||
$this->__construct($this->actyear, $this->actmonth, $xday, $this->GMT);
|
||||
return $this->showWeeks($numberOfWeeks);
|
||||
}
|
||||
|
||||
/*
|
||||
********************************************************************************
|
||||
PUBLIC getFirstDayTime() -> returns the first day of given week as unixtime
|
||||
********************************************************************************
|
||||
*/
|
||||
function getFirstDayTimeOfWeek($weekID = 1) {
|
||||
$unixdate = false;
|
||||
/* There should be an inverse function but for now trying some days is ok */
|
||||
$from = ($weekID-2) * 7;
|
||||
$to = ($weekID+1) * 7;
|
||||
for ($day = $from; $day < $to; $day++) {
|
||||
$tmp = parent::getWeekNum($day);
|
||||
if ($tmp == $weekID) {
|
||||
$xday = ($this->startOnSun) ? $day - 1 : $day;
|
||||
$unixdate = $this->mkActiveTime(0, 0, 1, $this->actmonth, $xday, $this->actyear);
|
||||
break;
|
||||
}
|
||||
}
|
||||
return $unixdate;
|
||||
}
|
||||
|
||||
/*
|
||||
----------------------
|
||||
@START PRIVATE METHODS
|
||||
----------------------
|
||||
*/
|
||||
/*
|
||||
********************************************************************************
|
||||
PRIVATE mkWeeksHead() -> creates the week table tag
|
||||
********************************************************************************
|
||||
*/
|
||||
function mkWeeksHead() {
|
||||
return "<table class=\"".$this->cssWeeksTable."\">\n";
|
||||
}
|
||||
/*
|
||||
********************************************************************************
|
||||
PRIVATE mkWeekDayz() -> creates the tr tag of the week table for the weekdays
|
||||
********************************************************************************
|
||||
*/
|
||||
function mkWeekDayz() {
|
||||
$out='<tr class="daynamesRow">';
|
||||
if ($this->weekNum) {
|
||||
$out .= "<td class=\"" . $this->cssWeekNumTitle . "\">" . $this->weekNumTitle . "</td>";
|
||||
}
|
||||
for ($x=0; $x<=6; $x++) {
|
||||
$out.=$this->mkSingleWeekDay($this->actday+$x);
|
||||
}
|
||||
$out.="</tr>\n";
|
||||
return $out;
|
||||
}
|
||||
/*
|
||||
********************************************************************************
|
||||
PRIVATE mkWeeksBody() -> creates the tr tags of the week table
|
||||
********************************************************************************
|
||||
*/
|
||||
function mkWeeksBody($numberOfWeeks) {
|
||||
$this->resetSelectedToToday();
|
||||
$out = $this->mkMonthRow();
|
||||
for ($week = 0; $week < $numberOfWeeks; $week++) {
|
||||
$out .= '<tr class="daysRow">';
|
||||
$weeknumber=parent::mkWeekNum($this->actday);
|
||||
$weekday=parent::getWeekday($this->actday);
|
||||
if ($this->startOnSun && ($weekday>4 || $weekday==0)) $weeknumber=parent::mkWeekNum($this->actday+1); // week starts on Monday in date("w")
|
||||
if ($this->weekNum) $out.="<td class=\"".$this->cssWeekNum."\">".$weeknumber."</td>";
|
||||
for ($i = 0; $i <= 6; $i++) {
|
||||
$out.=$this->mkDay($this->actday);
|
||||
$this->__construct($this->actyear, $this->actmonth, $this->actday+1, $this->GMT);
|
||||
$this->resetSelectedToToday();
|
||||
}
|
||||
$out.="</tr>\n";
|
||||
if ($this->actday+6>$this->getDaysThisMonth() && $week<$numberOfWeeks-1) $out.= $this->mkMonthRow(false);
|
||||
elseif ($this->actday==1 && $week<$numberOfWeeks-1) $out.=$this->mkMonthRow();
|
||||
}
|
||||
return $out;
|
||||
}
|
||||
/*
|
||||
********************************************************************************
|
||||
PRIVATE mkWeeksFoot() -> closes the week table tag
|
||||
********************************************************************************
|
||||
*/
|
||||
function mkWeeksFoot() {
|
||||
return "</table>\n";
|
||||
}
|
||||
/*
|
||||
********************************************************************************
|
||||
PRIVATE mkMonthRow() -> creates the tr tag of the week table to tisplay month names when needed
|
||||
The parameter indicates if the name of the first month is needed (at the beginning of the weekly calendar).
|
||||
********************************************************************************
|
||||
*/
|
||||
function mkMonthRow($bothMonths=true) {
|
||||
$colspanLeft = min($this->getDaysThisMonth() - $this->actday + 1, 7);
|
||||
$colspanRight = 7 - $colspanLeft;
|
||||
$out = '<tr class="newMonthRow">';
|
||||
if ($this->weekNum) $out.='<td class="'.$this->cssWeekNum.'"></td>';
|
||||
$out .= '<td class="' . $this->cssMonthWeek . '" colspan="' . $colspanLeft . '">';
|
||||
if ($bothMonths) $out .= parent::getMonthName($this->actmonth).$this->monthYearDivider.$this->actyear;
|
||||
$out .= '</td>';
|
||||
if ($colspanRight>0) {
|
||||
if ($this->actmonth+1>12) {
|
||||
$calmonth=1;
|
||||
$calyear=$this->actyear+1;
|
||||
} else {
|
||||
$calmonth=$this->actmonth+1;
|
||||
$calyear=$this->actyear;
|
||||
}
|
||||
$out .= '<td class="' . $this->cssMonthWeek . '" colspan="' . $colspanRight . '">'.parent::getMonthName($calmonth).$this->monthYearDivider.$calyear.'</td>';
|
||||
}
|
||||
return $out;
|
||||
}
|
||||
|
||||
/* Helper methods */
|
||||
function mkSingleWeekDay($var) {
|
||||
$weekday=parent::getWeekday($var);
|
||||
$out ="<td class=\"".$this->cssWeekDay."\">".parent::getDayName($weekday)."</td>";
|
||||
return $out;
|
||||
}
|
||||
|
||||
function getDaysThisMonth() {
|
||||
return $this->getMonthDays($this->actmonth, $this->actyear);
|
||||
}
|
||||
|
||||
function resetSelectedToToday() {
|
||||
$this->selectedyear = $this->yeartoday;
|
||||
$this->selectedmonth = $this->monthtoday;
|
||||
// Setting to an invalid day to prevent selection
|
||||
$this->selectedday = -2; // $this->daytoday;
|
||||
}
|
||||
}
|
||||
?>
|
||||
301
components/com_jem/classes/attachment.class.php
Normal file
301
components/com_jem/classes/attachment.class.php
Normal file
@ -0,0 +1,301 @@
|
||||
<?php
|
||||
/**
|
||||
* @package JEM
|
||||
* @copyright (C) 2013-2024 joomlaeventmanager.net
|
||||
* @copyright (C) 2005-2009 Christoph Lukes
|
||||
* @license https://www.gnu.org/licenses/gpl-3.0 GNU/GPL
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Filesystem\File;
|
||||
use Joomla\CMS\Filesystem\Folder;
|
||||
use Joomla\CMS\Table\Table;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\Object\CMSObject;
|
||||
use Joomla\CMS\Filesystem\Path;
|
||||
|
||||
// ensure JemFactory is loaded (because this class is used by modules or plugins too)
|
||||
require_once(JPATH_SITE.'/components/com_jem/factory.php');
|
||||
|
||||
/**
|
||||
* Holds the logic for attachments manipulation
|
||||
*
|
||||
* @package JEM
|
||||
*/
|
||||
class JemAttachment extends CMSObject
|
||||
{
|
||||
/**
|
||||
* upload files for the specified object
|
||||
*
|
||||
* @param array data from JInputFiles (as array of n arrays of params, [n][params])
|
||||
* @param string object identification (should be event<eventid>, category<categoryid>, etc...)
|
||||
*/
|
||||
static public function postUpload($post_files, $object)
|
||||
{
|
||||
require_once JPATH_SITE.'/components/com_jem/classes/image.class.php';
|
||||
|
||||
$user = JemFactory::getUser();
|
||||
$jemsettings = JemHelper::config();
|
||||
|
||||
$path = JPATH_SITE.'/'.$jemsettings->attachments_path.'/'.$object;
|
||||
|
||||
if (!(is_array($post_files) && count($post_files))) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$allowed = explode(",", $jemsettings->attachments_types);
|
||||
foreach ($allowed as $k => $v) {
|
||||
$allowed[$k] = ($v ? trim($v) : $v);
|
||||
}
|
||||
|
||||
$maxsizeinput = $jemsettings->attachments_maxsize*1024; //size in kb
|
||||
|
||||
foreach ($post_files as $k => $rec)
|
||||
{
|
||||
$file = array_key_exists('name', $rec) ? $rec['name'] : '';
|
||||
if (empty($file)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
// check if the filetype is valid
|
||||
$fileext = strtolower(File::getExt($file));
|
||||
if (!in_array($fileext, $allowed)) {
|
||||
Factory::getApplication()->enqueueMessage(Text::_('COM_JEM_ERROR_ATTACHEMENT_EXTENSION_NOT_ALLOWED').': '.$file, 'warning');
|
||||
continue;
|
||||
}
|
||||
// check size
|
||||
if ($rec['size'] > $maxsizeinput) {
|
||||
Factory::getApplication()->enqueueMessage(Text::sprintf('COM_JEM_ERROR_ATTACHEMENT_FILE_TOO_BIG', $file, $rec['size'], $maxsizeinput), 'warning');
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!Folder::exists($path)) {
|
||||
// try to create it
|
||||
$res = Folder::create($path);
|
||||
if (!$res) {
|
||||
Factory::getApplication()->enqueueMessage(Text::_('COM_JEM_ERROR_COULD_NOT_CREATE_FOLDER').': '.$path, 'warning');
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: Probably move this to a helper class
|
||||
|
||||
$sanitizedFilename = JemImage::sanitize($path, $file);
|
||||
|
||||
// Make sure that the full file path is safe.
|
||||
$filepath = Path::clean( $path.'/'.$sanitizedFilename);
|
||||
// Since Joomla! 3.4.0 File::upload has some more params to control new security parsing
|
||||
// switch off parsing archives for byte sequences looking like a script file extension
|
||||
// but keep all other checks running
|
||||
File::upload($rec['tmp_name'], $filepath, false, false, array('fobidden_ext_in_content' => false));
|
||||
|
||||
$table = Table::getInstance('jem_attachments', '');
|
||||
$table->file = $sanitizedFilename;
|
||||
$table->object = $object;
|
||||
if (isset($rec['customname']) && !empty($rec['customname'])) {
|
||||
$table->name = $rec['customname'];
|
||||
}
|
||||
if (isset($rec['description']) && !empty($rec['description'])) {
|
||||
$table->description = $rec['description'];
|
||||
}
|
||||
if (isset($rec['access'])) {
|
||||
$table->access = intval($rec['access']);
|
||||
}
|
||||
|
||||
$table->added = date('Y-m-d H:i:s');
|
||||
$table->added_by = $user->get('id');
|
||||
|
||||
if (!($table->check() && $table->store())) {
|
||||
\Joomla\CMS\Factory::getApplication()->enqueueMessage(Text::_('COM_JEM_ERROR_ATTACHMENT_SAVING_TO_DB').': '.$table->getError(), 'warning');
|
||||
}
|
||||
} // foreach
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* update attachment record in db
|
||||
* @param array (id, name, description, access)
|
||||
*/
|
||||
static public function update($attach)
|
||||
{
|
||||
if (!is_array($attach) || !isset($attach['id']) || !(intval($attach['id']))) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$table = Table::getInstance('jem_attachments', '');
|
||||
$table->load($attach['id']);
|
||||
$table->bind($attach);
|
||||
|
||||
if (!($table->check() && $table->store())) {
|
||||
\Joomla\CMS\Factory::getApplication()->enqueueMessage(Text::_('COM_JEM_ERROR_ATTACHMENT_UPDATING_RECORD').': '.$table->getError(), 'warning');
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* return attachments for objects
|
||||
* @param string object identification (should be event<eventid>, category<categoryid>, etc...)
|
||||
* @return array
|
||||
*/
|
||||
static public function getAttachments($object)
|
||||
{
|
||||
$jemsettings = JemHelper::config();
|
||||
|
||||
$path = JPATH_SITE.'/'.$jemsettings->attachments_path.'/'.$object;
|
||||
|
||||
if (!file_exists($path)) {
|
||||
return array();
|
||||
}
|
||||
|
||||
// first list files in the folder
|
||||
$files = Folder::files($path, null, false, false);
|
||||
|
||||
// then get info for files from db
|
||||
$db = Factory::getContainer()->get('DatabaseDriver');
|
||||
$fnames = array();
|
||||
foreach ($files as $f) {
|
||||
$fnames[] = $db->Quote($f);
|
||||
}
|
||||
|
||||
if (!count($fnames)) {
|
||||
return array();
|
||||
}
|
||||
|
||||
// Check access level if not a Super User on Backend.
|
||||
$user = JemFactory::getUser();
|
||||
if (Factory::getApplication()->isClient('administrator') && $user->authorise('core.manage')) {
|
||||
$qAccess = '';
|
||||
} else {
|
||||
$levels = $user->getAuthorisedViewLevels();
|
||||
$qAccess = ' AND access IN (' . implode(',', $levels) . ')';
|
||||
}
|
||||
|
||||
$query = 'SELECT * '
|
||||
. ' FROM #__jem_attachments '
|
||||
. ' WHERE file IN ('. implode(',', $fnames) .')'
|
||||
. ' AND object = '. $db->Quote($object)
|
||||
. $qAccess
|
||||
. ' ORDER BY ordering ASC ';
|
||||
|
||||
$db->setQuery($query);
|
||||
$res = $db->loadObjectList();
|
||||
|
||||
return $res;
|
||||
}
|
||||
|
||||
/**
|
||||
* get the file
|
||||
*
|
||||
* @param int $id
|
||||
*/
|
||||
static public function getAttachmentPath($id)
|
||||
{
|
||||
$jemsettings = JemHelper::config();
|
||||
|
||||
$user = JemFactory::getUser();
|
||||
// Support Joomla access levels instead of single group id
|
||||
$levels = $user->getAuthorisedViewLevels();
|
||||
|
||||
$db = Factory::getContainer()->get('DatabaseDriver');
|
||||
$query = 'SELECT * '
|
||||
. ' FROM #__jem_attachments '
|
||||
. ' WHERE id = '. $db->Quote(intval($id));
|
||||
|
||||
$db->setQuery($query);
|
||||
$res = $db->loadObject();
|
||||
|
||||
if (!$res) {
|
||||
throw new Exception(Text::_('COM_JEM_FILE_NOT_FOUND'), 404);
|
||||
}
|
||||
|
||||
if (!in_array($res->access, $levels)) {
|
||||
throw new Exception(Text::_('COM_JEM_NO_ACCESS'), 403);
|
||||
}
|
||||
|
||||
$path = JPATH_SITE.'/'.$jemsettings->attachments_path.'/'.$res->object.'/'.$res->file;
|
||||
if (!file_exists($path)) {
|
||||
throw new Exception(Text::_('COM_JEM_FILE_NOT_FOUND'), 404);
|
||||
}
|
||||
|
||||
return $path;
|
||||
}
|
||||
|
||||
/**
|
||||
* remove attachment for objects
|
||||
*
|
||||
* @param id from db
|
||||
* @param string object identification (should be event<eventid>, category<categoryid>, etc...)
|
||||
* @return boolean
|
||||
*/
|
||||
static public function remove($id)
|
||||
{
|
||||
$jemsettings = JemHelper::config();
|
||||
|
||||
$user = JemFactory::getUser();
|
||||
// Support Joomla access levels instead of single group id
|
||||
$levels = $user->getAuthorisedViewLevels();
|
||||
$userid = $user->get('id');
|
||||
|
||||
// then get info for files from db
|
||||
$db = Factory::getContainer()->get('DatabaseDriver');
|
||||
|
||||
$query = 'SELECT file, object, added_by '
|
||||
. ' FROM #__jem_attachments '
|
||||
. ' WHERE id = ' . $db->Quote($id) . ' AND access IN (0,' . implode(',', $levels) . ')';
|
||||
|
||||
$db->setQuery($query);
|
||||
$res = $db->loadObject();
|
||||
|
||||
if (!$res) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// check permission
|
||||
if (empty($userid) || ($userid != $res->added_by)) {
|
||||
if (strncasecmp($res->object, 'event', 5) == 0) {
|
||||
$type = 'event';
|
||||
$itemid = (int)substr($res->object, 5);
|
||||
$table = '#__jem_events';
|
||||
} elseif (strncasecmp($res->object, 'venue', 5) == 0) {
|
||||
$type = 'venue';
|
||||
$itemid = (int)substr($res->object, 5);
|
||||
$table = '#__jem_venues';
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
|
||||
// get item owner
|
||||
$query = 'SELECT created_by FROM ' . $table . ' WHERE id = ' . $db->Quote($itemid);
|
||||
$db->setQuery($query);
|
||||
$created_by = $db->loadResult();
|
||||
|
||||
if (!$user->can('edit', $type, $itemid, $created_by)) {
|
||||
JemHelper::addLogEntry("User {$userid} is not permritted to remove attachment " . $res->object, __METHOD__);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
JemHelper::addLogEntry("User {$userid} removes attachment " . $res->object.'/'.$res->file, __METHOD__);
|
||||
$path = JPATH_SITE.'/'.$jemsettings->attachments_path.'/'.$res->object.'/'.$res->file;
|
||||
if (file_exists($path)) {
|
||||
File::delete($path);
|
||||
}
|
||||
|
||||
$query = 'DELETE FROM #__jem_attachments '
|
||||
. ' WHERE id = '. $db->Quote($id);
|
||||
|
||||
$db->setQuery($query);
|
||||
$res = $db->execute();
|
||||
|
||||
if (!$res) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
985
components/com_jem/classes/calendar.class.php
Normal file
985
components/com_jem/classes/calendar.class.php
Normal file
@ -0,0 +1,985 @@
|
||||
<?php
|
||||
/**
|
||||
* @package JEM
|
||||
* @copyright (C) 2013-2024 joomlaeventmanager.net
|
||||
* @copyright (C) 2005-2009 Christoph Lukes
|
||||
* @license https://www.gnu.org/licenses/gpl-3.0 GNU/GPL
|
||||
*/
|
||||
|
||||
/**
|
||||
* Based on
|
||||
* @class: activeCalendar
|
||||
* @project: Active Calendar
|
||||
* @version: 1.2.0;
|
||||
* @author: Giorgos Tsiledakis;
|
||||
* @date: 23 Feb 2006;
|
||||
* @copyright: Giorgos Tsiledakis;
|
||||
* @license: GNU LESSER GENERAL PUBLIC LICENSE;
|
||||
* Support, feature requests and bug reports please at : https://www.micronetwork.de/activecalendar/
|
||||
* Special thanks to Corissia S.A (https://www.corissia.com) for the permission to publish the source code
|
||||
* Thanks to Maik Lindner (https://nifox.com) for his help developing this class
|
||||
*/
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\Router\Route;
|
||||
|
||||
#[AllowDynamicProperties]
|
||||
class JemCalendar
|
||||
{
|
||||
/*
|
||||
----------------------
|
||||
@START CONFIGURATION
|
||||
----------------------
|
||||
*/
|
||||
/*
|
||||
********************************************************************************
|
||||
You can change below the month and day names, according to your language
|
||||
This is just the default configuration. You may set the month and day names by calling setMonthNames() and setDayNames()
|
||||
********************************************************************************
|
||||
*/
|
||||
var $jan="January";
|
||||
var $feb="February";
|
||||
var $mar="March";
|
||||
var $apr="April";
|
||||
var $may="May";
|
||||
var $jun="June";
|
||||
var $jul="July";
|
||||
var $aug="August";
|
||||
var $sep="September";
|
||||
var $oct="October";
|
||||
var $nov="November";
|
||||
var $dec="December";
|
||||
var $sun="Sun";
|
||||
var $mon="Mon";
|
||||
var $tue="Tue";
|
||||
var $wed="Wed";
|
||||
var $thu="Thu";
|
||||
var $fri="Fri";
|
||||
var $sat="Sat";
|
||||
|
||||
/*
|
||||
********************************************************************************
|
||||
$startOnSun = false: first day of week is Monday
|
||||
$startOnSun = true: first day of week is Sunday
|
||||
You may use the method setFirstWeekDay() instead
|
||||
********************************************************************************
|
||||
*/
|
||||
var $startOnSun=false;
|
||||
/*
|
||||
********************************************************************************
|
||||
$rowCount : defines the number of months in a row in yearview (can be also set by the method showYear())
|
||||
********************************************************************************
|
||||
*/
|
||||
var $rowCount=4;
|
||||
/*
|
||||
********************************************************************************
|
||||
Names of the generated html classes. You may change them to avoid any conflicts with your existing CSS
|
||||
********************************************************************************
|
||||
*/
|
||||
var $cssYearTable="year"; // table tag: calendar year
|
||||
var $cssYearTitle="yearname"; // td tag: calendar year title
|
||||
var $cssYearNav="yearnavigation"; // td tag: calendar year navigation
|
||||
var $cssMonthTable="month"; // table tag: calendar month
|
||||
var $cssMonthTitle="monthname"; // td tag: calendar month title
|
||||
var $cssMonthNav="monthnavigation"; // td tag: calendar month navigation
|
||||
var $cssWeekDay="dayname"; // td tag: calendar weekdays
|
||||
var $cssWeekNumTitle="weeknumtitle"; // td tag: title of the week numbers
|
||||
var $cssWeekNum="weeknum"; // td tag: week numbers
|
||||
var $cssPicker="datepicker"; // td tag: date picker
|
||||
var $cssPickerForm="datepickerform"; // form tag: date picker form
|
||||
var $cssPickerMonth="monthpicker"; // select tag: month picker
|
||||
var $cssPickerYear="yearpicker"; // select tag: year picker
|
||||
var $cssPickerButton="pickerbutton"; // input (submit) tag: date picker button
|
||||
var $cssMonthDay="monthday"; // td tag: days, that belong to the current month
|
||||
var $cssNoMonthDay="nomonthday"; // td tag: days, that do not belong to the current month
|
||||
var $cssToday="today"; // td tag: the current day
|
||||
var $cssSelecDay="selectedday"; // td tag: the selected day
|
||||
var $cssSunday="sunday"; // td tag: all Sundays (can be disabled, see below)
|
||||
var $cssSaturday="saturday"; // td tag: all Saturdays (can be disabled, see below)
|
||||
var $cssEvent="event"; // td tag: event day set by setEvent(). Multiple class names can be generated
|
||||
var $cssPrefixSelecEvent="selected"; // prefix for the event class name if the event is selected
|
||||
var $cssPrefixTodayEvent="today"; // prefix for the event class name if the event is the current day
|
||||
var $cssEventContent="eventcontent"; // table tag: calendar event content. Multiple class names can be generated
|
||||
var $crSunClass=true; // true: creates a td class on every Sunday (set above)
|
||||
var $crSatClass=true; // true: creates a td class on every Saturday (set above)
|
||||
/*
|
||||
********************************************************************************
|
||||
You can change below the GET VARS NAMES [url parameter names] (navigation + day links)
|
||||
You should modify the private method mkUrl() or mkWeekNum(), if you want to change the structure of the generated links
|
||||
********************************************************************************
|
||||
*/
|
||||
var $yearID="yearID";
|
||||
var $monthID="monthID";
|
||||
var $dayID="dayID";
|
||||
var $weekID="weekID";
|
||||
/*
|
||||
********************************************************************************
|
||||
Default start and end year for the date picker (can be changed, if using the ADOdb Date Library)
|
||||
********************************************************************************
|
||||
*/
|
||||
var $startYear=1971;
|
||||
var $endYear=2037;
|
||||
/*
|
||||
----------------------
|
||||
@START PUBLIC METHODS
|
||||
----------------------
|
||||
*/
|
||||
/*
|
||||
********************************************************************************
|
||||
PUBLIC activeCalendar() -> class constructor, does the initial date calculation
|
||||
$GMTDiff: GMT Zone for current day calculation, do not set to use local server time
|
||||
********************************************************************************
|
||||
*/
|
||||
public function __construct($year=false,$month=false,$day=false,$GMTDiff="none") {
|
||||
$this->timetoday=time();
|
||||
$this->selectedday=-2;
|
||||
$this->selectedyear=$year;
|
||||
$this->selectedmonth=$month;
|
||||
if (!$month) $month=1;
|
||||
if (!$day) $day=1;
|
||||
else $this->selectedday=$day;
|
||||
$h=$this->mkActiveGMDate("H");
|
||||
$m=$this->mkActiveGMDate("i");
|
||||
$s=$this->mkActiveGMDate("s");
|
||||
$d=$this->mkActiveGMDate("j");
|
||||
$mo=$this->mkActiveGMDate("n");
|
||||
$y=$this->mkActiveGMDate("Y");
|
||||
$is_dst=$this->mkActiveDate("I");
|
||||
if ($GMTDiff!="none") $this->timetoday=$this->mkActiveTime($h,$m,$s,$mo,$d,$y)+(3600*($GMTDiff+$is_dst));
|
||||
$this->unixtime=$this->mkActiveTime($h,$m,$s,$month,$day,$year);
|
||||
if ($this->unixtime==-1 || !$year) $this->unixtime=$this->timetoday;
|
||||
$this->daytoday=$this->mkActiveDate("j");
|
||||
$this->monthtoday=$this->mkActiveDate("n");
|
||||
$this->yeartoday=$this->mkActiveDate("Y");
|
||||
if (!$day) $this->actday=$this->daytoday;
|
||||
else $this->actday=$this->mkActiveDate("j",$this->unixtime);
|
||||
if (!$month) $this->actmonth=$this->monthtoday;
|
||||
else $this->actmonth=$this->mkActiveDate("n",$this->unixtime);
|
||||
if (!$year) $this->actyear=$this->yeartoday;
|
||||
else $this->actyear=$this->mkActiveDate("Y",$this->unixtime);
|
||||
$this->has31days=checkdate($this->actmonth,31,$this->actyear);
|
||||
$this->isSchalt=checkdate(2,29,$this->actyear);
|
||||
if ($this->isSchalt==1 && $this->actmonth==2) $this->maxdays=29;
|
||||
elseif ($this->isSchalt!=1 && $this->actmonth==2) $this->maxdays=28;
|
||||
elseif ($this->has31days==1) $this->maxdays=31;
|
||||
else $this->maxdays=30;
|
||||
$this->firstday=$this->mkActiveDate("w", $this->mkActiveTime(0,0,1,$this->actmonth,1,$this->actyear));
|
||||
$this->GMTDiff=$GMTDiff;
|
||||
|
||||
/*
|
||||
********************************************************************************
|
||||
You can change below the default year's and month's view navigation controls
|
||||
********************************************************************************
|
||||
*/
|
||||
|
||||
if (version_compare(JVERSION, '5.0.0', '>=')) {
|
||||
// Joomla 5
|
||||
$this->yearNavBack=" <i class='fa-solid fa-backward'></i> "; // Previous year
|
||||
$this->yearNavForw=" <i class='fa-solid fa-forward'></i> "; // Next year
|
||||
$this->monthNavBack=" <i class='fa-solid fa-backward-step'></i> "; // Previous month
|
||||
$this->monthNavForw=" <i class='fa-solid fa-forward-step'></i> "; // Next month
|
||||
} elseif (version_compare(JVERSION, '4.0.0', '>=')) {
|
||||
// Joomla 4
|
||||
$this->yearNavBack=" << "; // Previous year, this could be an image link
|
||||
$this->yearNavForw=" >> "; // Next year, this could be an image link
|
||||
$this->monthNavBack=" << "; // Previous month, this could be an image link
|
||||
$this->monthNavForw=" >> "; // Next month, this could be an image link
|
||||
}
|
||||
$this->selBtn="Go"; // value of the date picker button (if enabled)
|
||||
$this->monthYearDivider=" "; // the divider between month and year in the month`s title
|
||||
}
|
||||
/*
|
||||
********************************************************************************
|
||||
PUBLIC enableYearNav() -> enables the year's navigation controls
|
||||
********************************************************************************
|
||||
*/
|
||||
function enableYearNav($link=false,$arrowBack=false,$arrowForw=false) {
|
||||
if ($link) $this->urlNav=$link;
|
||||
if ($arrowBack) $this->yearNavBack=$arrowBack;
|
||||
if ($arrowForw) $this->yearNavForw=$arrowForw;
|
||||
$this->yearNav=true;
|
||||
}
|
||||
/*
|
||||
********************************************************************************
|
||||
PUBLIC enableMonthNav() -> enables the month's navigation controls
|
||||
********************************************************************************
|
||||
*/
|
||||
function enableMonthNav($link=false,$arrowBack=false,$arrowForw=false) {
|
||||
if ($link) $this->urlNav=$link;
|
||||
if ($arrowBack) $this->monthNavBack=$arrowBack;
|
||||
if ($arrowForw) $this->monthNavForw=$arrowForw;
|
||||
$this->monthNav=true;
|
||||
}
|
||||
/*
|
||||
********************************************************************************
|
||||
PUBLIC enableDayLinks() -> enables the day links
|
||||
param javaScript: sets a Javascript function on each day link
|
||||
********************************************************************************
|
||||
*/
|
||||
function enableDayLinks($link=false,$javaScript=false) {
|
||||
if ($link) $this->url=$link;
|
||||
if ($javaScript) $this->javaScriptDay=$javaScript;
|
||||
$this->dayLinks=true;
|
||||
}
|
||||
/*
|
||||
********************************************************************************
|
||||
PUBLIC enableNewEventLinks() -> enables links on each day to create new events
|
||||
param link: full html template with token "{date}" to get day's date
|
||||
********************************************************************************
|
||||
*/
|
||||
function enableNewEventLinks($link) {
|
||||
if ($link && (stripos($link, '{date}') !== false)) {
|
||||
$this->htmlNewEventLink = $link;
|
||||
$this->dayNewEventLinks = true;
|
||||
} else {
|
||||
$this->dayNewEventLinks = false;
|
||||
}
|
||||
|
||||
return $this->dayNewEventLinks;
|
||||
}
|
||||
/*
|
||||
********************************************************************************
|
||||
PUBLIC enableDatePicker() -> enables the day picker control
|
||||
********************************************************************************
|
||||
*/
|
||||
function enableDatePicker($startYear=false,$endYear=false,$link=false,$button=false) {
|
||||
if ($link) $this->urlPicker=$link;
|
||||
if ($startYear && $endYear) {
|
||||
if ($startYear>=$this->startYear && $startYear<$this->endYear) $this->startYear=$startYear;
|
||||
if ($endYear>$this->startYear && $endYear<=$this->endYear) $this->endYear=$endYear;
|
||||
}
|
||||
if ($button) $this->selBtn=$button;
|
||||
$this->datePicker=true;
|
||||
}
|
||||
/*
|
||||
********************************************************************************
|
||||
PUBLIC enableWeekNum() -> enables a week number column
|
||||
********************************************************************************
|
||||
*/
|
||||
function enableWeekNum($title="",$link=false,$javaScript=false) {
|
||||
// checking before enabling, as week number calulation works only if php version > 4.1.0 [php function: date ("W")]
|
||||
if (is_integer($this->getWeekNum($this->actday))) {
|
||||
$this->weekNum=true;
|
||||
$this->weekNumTitle=$title;
|
||||
$this->monthSpan++;
|
||||
|
||||
if (empty($link)) {
|
||||
$this->weekUrl='';
|
||||
} else {
|
||||
$this->weekUrl=$link;
|
||||
}
|
||||
|
||||
if (empty($javaScript)) {
|
||||
$this->javaScriptWeek='';
|
||||
} else {
|
||||
$this->javaScriptWeek=$javaScript;
|
||||
}
|
||||
}
|
||||
}
|
||||
/*
|
||||
********************************************************************************
|
||||
PUBLIC setEvent() -> sets a calendar event, $id: the HTML class (css layout)
|
||||
********************************************************************************
|
||||
*/
|
||||
function setEvent($year,$month,$day,$id=false,$url=false) {
|
||||
$eventTime=$this->mkActiveTime(0,0,1,$month,$day,$year);
|
||||
if (!$id) $id=$this->cssEvent;
|
||||
$this->calEvents[$eventTime]=$id;
|
||||
$this->calEventsUrl[$eventTime]=$url;
|
||||
}
|
||||
/*
|
||||
********************************************************************************
|
||||
PUBLIC setEventContent() -> sets a calendar event content,
|
||||
$content: can be a string or an array, $id: the HTML class (css layout)
|
||||
********************************************************************************
|
||||
*/
|
||||
/**
|
||||
* set event content
|
||||
*
|
||||
* @param int $year
|
||||
* @param int $month
|
||||
* @param int $day
|
||||
* @param string or array $content
|
||||
* @param string $url
|
||||
* @param string $id the HTML class
|
||||
*/
|
||||
function setEventContent($year, $month, $day, $content, $url=false, $id=false)
|
||||
{
|
||||
// event time
|
||||
$eventTime = $this->mkActiveTime(0, 0, 1, $month, $day, $year);
|
||||
|
||||
// add to eventcontent array
|
||||
$eventContent[$eventTime] = $content;
|
||||
$this->calEventContent[] = $eventContent;
|
||||
|
||||
// add specific id
|
||||
if (!$id) $id = $this->cssEventContent;
|
||||
$this->calEventContentId[] = $id;
|
||||
|
||||
// add url
|
||||
if ($url) $this->calEventContentUrl[] = $url;
|
||||
else $this->calEventContentUrl[] = $this->calInit++;
|
||||
}
|
||||
/*
|
||||
********************************************************************************
|
||||
PUBLIC setMonthNames() -> sets the month names, $namesArray must be an array of 12 months starting with January
|
||||
********************************************************************************
|
||||
*/
|
||||
function setMonthNames($namesArray) {
|
||||
if (!is_array($namesArray) || count($namesArray)!=12) return false;
|
||||
else $this->monthNames=$namesArray;
|
||||
}
|
||||
/*
|
||||
********************************************************************************
|
||||
PUBLIC setDayNames() -> sets the week day names, $namesArray must be an array of 7 days starting with Sunday
|
||||
********************************************************************************
|
||||
*/
|
||||
function setDayNames($namesArray) {
|
||||
if (!is_array($namesArray) || count($namesArray)!=7) return false;
|
||||
else $this->dayNames=$namesArray;
|
||||
}
|
||||
/*
|
||||
********************************************************************************
|
||||
PUBLIC setFirstWeekDay() -> sets the first day of the week, currently only Sunday and Monday supported, $daynum=0 -> Sunday
|
||||
********************************************************************************
|
||||
*/
|
||||
function setFirstWeekDay($daynum) {
|
||||
if ($daynum==0) $this->startOnSun=true;
|
||||
else $this->startOnSun=false;
|
||||
}
|
||||
/*
|
||||
********************************************************************************
|
||||
PUBLIC showYear() -> returns the year's view as html table string
|
||||
Each private method returns a tr tag of the table as a string.
|
||||
You can change the calendar structure by simply calling these private methods in another order
|
||||
********************************************************************************
|
||||
*/
|
||||
function showYear($rowCount=false,$startMonth=false) {
|
||||
if ($rowCount) $this->rowCount=$rowCount;
|
||||
$this->monthNav=false; // disables month navigation in yearview
|
||||
$out=$this->mkYearHead(); // this should remain first: opens table tag
|
||||
$out.=$this->mkYearTitle(); // tr tag: year title and navigation
|
||||
$out.=$this->mkDatePicker("yearonly"); // tr tag: year date picker (only year selection)
|
||||
$this->datePicker=false; // disables month date picker in yearview
|
||||
$out.=$this->mkYearBody($startMonth); // tr tag(s): year month (html tables)
|
||||
$out.=$this->mkYearFoot(); // this should remain last: closes table tag
|
||||
return $out;
|
||||
}
|
||||
/*
|
||||
********************************************************************************
|
||||
PUBLIC showMonth() -> returns the month's view as html table string
|
||||
Each private method returns a tr tag of the table as a string.
|
||||
You can change the calendar structure by simply calling these private methods in another order
|
||||
$showNoMonthDays = false: days, that do not belong to the current month, will not be displayed
|
||||
$showNoMonthDays = true: days, that do not belong to the current month, will be displayed
|
||||
(note: these 'noMonthDays' will not contain any events or eventcontents!)
|
||||
********************************************************************************
|
||||
*/
|
||||
function showMonth($showNoMonthDays=false) {
|
||||
$this->showNoMonthDays=$showNoMonthDays;
|
||||
$out=$this->mkMonthHead(); // this should remain first: opens table tag
|
||||
$out.=$this->mkMonthTitle(); // tr tag: month title and navigation
|
||||
$out.=$this->mkDatePicker(); // tr tag: month date picker (month and year selection)
|
||||
$out.=$this->mkWeekDays(); // tr tag: the weekday names
|
||||
if ($this->showNoMonthDays==false) $out.=$this->mkMonthBody(); // tr tags: the days of the month
|
||||
else $out.=$this->mkMonthBody(1); // tr tags: the days of the month
|
||||
$out.=$this->mkMonthFoot(); // this should remain last: closes table tag
|
||||
return $out;
|
||||
}
|
||||
/*
|
||||
----------------------
|
||||
@START PRIVATE METHODS
|
||||
----------------------
|
||||
*/
|
||||
/*
|
||||
********************************************************************************
|
||||
THE FOLLOWING METHODS AND VARIABLES ARE PRIVATE. PLEASE DO NOT CALL OR MODIFY THEM
|
||||
********************************************************************************
|
||||
*/
|
||||
var $version="1.2.0";
|
||||
var $releaseDate="23 Feb 2006";
|
||||
var $monthSpan=7;
|
||||
var $timezone=false;
|
||||
var $yearNav=false;
|
||||
var $monthNav=false;
|
||||
var $dayLinks=false;
|
||||
var $dayNewEventLinks=false;
|
||||
var $datePicker=false;
|
||||
var $url=false;
|
||||
var $urlNav=false;
|
||||
var $urlPicker=false;
|
||||
var $htmlNewEventLink=false;
|
||||
var $calEvents=false;
|
||||
var $calEventsUrl=false;
|
||||
var $eventUrl=false;
|
||||
var $javaScriptDay=false;
|
||||
var $monthNames=false;
|
||||
var $dayNames=false;
|
||||
var $calEventContent=[];
|
||||
var $calEventContentUrl=[];
|
||||
var $calEventContentId=[];
|
||||
var $calInit=0;
|
||||
var $weekNum=false;
|
||||
var $WeekUrl=false;
|
||||
var $javaScriptWeek=false;
|
||||
|
||||
/*
|
||||
********************************************************************************
|
||||
PRIVATE mkYearHead() -> creates the year table tag
|
||||
********************************************************************************
|
||||
*/
|
||||
function mkYearHead() {
|
||||
return "<table class=\"".$this->cssYearTable."\">\n";
|
||||
}
|
||||
/*
|
||||
********************************************************************************
|
||||
PRIVATE mkYearTitle() -> creates the tile and navigation tr tag of the year table
|
||||
********************************************************************************
|
||||
*/
|
||||
function mkYearTitle() {
|
||||
if ($this->rowCount<1 || $this->rowCount>12) $this->rowCount=4;
|
||||
if (!$this->yearNav) {
|
||||
$out="<tr><td colspan=\"".$this->rowCount."\" class=\"".$this->cssYearTitle."\">";
|
||||
$out.=$this->actyear;
|
||||
$out.="</td></tr>\n";
|
||||
} else {
|
||||
$out="<tr><td colspan=\"".$this->rowCount."\" align=\"center\">";
|
||||
$out.="<table><tr><td class=\"".$this->cssYearNav."\">";
|
||||
$out.=$this->mkUrl($this->actyear-1);
|
||||
$out.=$this->yearNavBack."</a></td>";
|
||||
$out.="<td class=\"".$this->cssYearTitle."\">".$this->actyear."</td>";
|
||||
$out.="<td class=\"".$this->cssYearNav."\">";
|
||||
$out.=$this->mkUrl($this->actyear+1);
|
||||
$out.=$this->yearNavForw."</a></td></tr></table></td></tr>\n";
|
||||
}
|
||||
return $out;
|
||||
}
|
||||
/*
|
||||
********************************************************************************
|
||||
PRIVATE mkYearBody() -> creates the tr tags of the year table
|
||||
********************************************************************************
|
||||
*/
|
||||
function mkYearBody($stmonth=false) {
|
||||
if (!$stmonth || $stmonth>12) $stmonth=1;
|
||||
$TrMaker = $this->rowCount;
|
||||
$curyear = $this->actyear;
|
||||
$out="<tr>\n";
|
||||
for ($x=1; $x<=12; $x++) {
|
||||
$this->activeCalendar($curyear,$stmonth,false,$this->GMTDiff);
|
||||
$out.="<td valign=\"top\">\n".$this->showMonth()."</td>\n";
|
||||
if ($x == $TrMaker && $x < 12) {
|
||||
$out.="</tr><tr>";
|
||||
$TrMaker = ($TrMaker+$this->rowCount);
|
||||
}
|
||||
if ($stmonth == 12) {
|
||||
$stmonth = 1;
|
||||
$curyear++;
|
||||
}
|
||||
else $stmonth++;
|
||||
}
|
||||
$out.="</tr>\n";
|
||||
return $out;
|
||||
}
|
||||
/*
|
||||
********************************************************************************
|
||||
PRIVATE mkYearFoot() -> closes the year table tag
|
||||
********************************************************************************
|
||||
*/
|
||||
function mkYearFoot() {
|
||||
return "</table>\n";
|
||||
}
|
||||
/*
|
||||
********************************************************************************
|
||||
PRIVATE mkMonthHead() -> creates the month table tag
|
||||
********************************************************************************
|
||||
*/
|
||||
function mkMonthHead() {
|
||||
return "<table class=\"".$this->cssMonthTable."\">\n";
|
||||
}
|
||||
/*
|
||||
********************************************************************************
|
||||
PRIVATE mkMonthTitle() -> creates the tile and navigation tr tag of the month table
|
||||
********************************************************************************
|
||||
*/
|
||||
function mkMonthTitle() {
|
||||
if (!$this->monthNav) {
|
||||
$out="<tr><td class=\"".$this->cssMonthTitle."\" colspan=\"".$this->monthSpan."\">";
|
||||
$out.=$this->getMonthName().$this->monthYearDivider.$this->actyear;
|
||||
$out.="</td></tr>\n";
|
||||
} else {
|
||||
$out = "<tr><td class=\"".$this->cssMonthNav."\" colspan=\"2\" style=\"text-align:right;\">";
|
||||
if ($this->actmonth==1) { // january
|
||||
$out.=$this->mkUrl($this->actyear-1,"12");
|
||||
} else {
|
||||
$out.=$this->mkUrl($this->actyear,$this->actmonth-1);
|
||||
}
|
||||
$out .= $this->monthNavBack."</a></td>";
|
||||
$out .= "<td class=\"".$this->cssMonthTitle."\" colspan=\"".($this->monthSpan-4)."\">";
|
||||
$out .= $this->getMonthName().$this->monthYearDivider.$this->actyear."</td>";
|
||||
$out .= "<td class=\"".$this->cssMonthNav."\" colspan=\"2\" style=\"text-align:left;\">";
|
||||
if ($this->actmonth==12) { //december
|
||||
$out.=$this->mkUrl($this->actyear+1,"1");
|
||||
}
|
||||
else {
|
||||
$out.=$this->mkUrl($this->actyear,$this->actmonth+1);
|
||||
}
|
||||
$out.=$this->monthNavForw."</a></td></tr>\n";
|
||||
}
|
||||
return $out;
|
||||
}
|
||||
/*
|
||||
********************************************************************************
|
||||
PRIVATE mkDatePicker() -> creates the tr tag for the date picker
|
||||
********************************************************************************
|
||||
*/
|
||||
function mkDatePicker($yearpicker=false) {
|
||||
if ($this->datePicker && !empty($this->urlPicker)) {
|
||||
if ($yearpicker) $pickerSpan=$this->rowCount;
|
||||
else $pickerSpan=$this->monthSpan;
|
||||
$out="<tr><td class=\"".$this->cssPicker."\" colspan=\"".$pickerSpan."\">\n";
|
||||
$out.="<form name=\"".$this->cssPickerForm."\" class=\"".$this->cssPickerForm."\" action=\"".$this->urlPicker."\" method=\"get\">\n";
|
||||
if (!$yearpicker) {
|
||||
$out.="<select name=\"".$this->monthID."\" class=\"".$this->cssPickerMonth."\">\n";
|
||||
for ($z=1;$z<=12;$z++) {
|
||||
if ($z==$this->actmonth) $out.="<option value=\"".$z."\" selected=\"selected\">".$this->getMonthName($z)."</option>\n";
|
||||
else $out.="<option value=\"".$z."\">".$this->getMonthName($z)."</option>\n";
|
||||
}
|
||||
$out.="</select>\n";
|
||||
}
|
||||
$out.="<select name=\"".$this->yearID."\" class=\"".$this->cssPickerYear."\">\n";
|
||||
for ($z=$this->startYear;$z<=$this->endYear;$z++) {
|
||||
if ($z==$this->actyear) $out.="<option value=\"".$z."\" selected=\"selected\">".$z."</option>\n";
|
||||
else $out.="<option value=\"".$z."\">".$z."</option>\n";
|
||||
}
|
||||
$out.="</select>\n";
|
||||
$out.="<input type=\"submit\" value=\"".$this->selBtn."\" class=\"".$this->cssPickerButton."\"></input>\n";
|
||||
$out.="</form>\n";
|
||||
$out.="</td></tr>\n";
|
||||
}
|
||||
else $out="";
|
||||
return $out;
|
||||
}
|
||||
/*
|
||||
********************************************************************************
|
||||
PRIVATE mkWeekDays() -> creates the tr tag of the month table for the weekdays
|
||||
********************************************************************************
|
||||
*/
|
||||
function mkWeekDays() {
|
||||
if ($this->startOnSun) {
|
||||
$out='<tr class="daynamesRow">';
|
||||
if ($this->weekNum) $out.="<td class=\"".$this->cssWeekNumTitle."\">".$this->weekNumTitle."</td>";
|
||||
for ($x=0;$x<=6;$x++) $out.="<td class=\"".$this->cssWeekDay."\">".$this->getDayName($x)."</td>";
|
||||
$out.="</tr>\n";
|
||||
} else {
|
||||
$out='<tr class="daynamesRow">';
|
||||
if ($this->weekNum) $out.="<td class=\"".$this->cssWeekNumTitle."\">".$this->weekNumTitle."</td>";
|
||||
for ($x=1;$x<=6;$x++) $out.="<td class=\"".$this->cssWeekDay."\">".$this->getDayName($x)."</td>";
|
||||
$out.="<td class=\"".$this->cssWeekDay."\">".$this->getDayName(0)."</td>";
|
||||
$out.="</tr>\n";
|
||||
$this->firstday=$this->firstday-1;
|
||||
if ($this->firstday<0) $this->firstday=6;
|
||||
}
|
||||
return $out;
|
||||
}
|
||||
/*
|
||||
********************************************************************************
|
||||
PRIVATE mkMonthBody() -> creates the tr tags of the month table
|
||||
********************************************************************************
|
||||
*/
|
||||
function mkMonthBody($showNoMonthDays=0) {
|
||||
if ($this->actmonth==1) {
|
||||
$pMonth=12;
|
||||
$pYear=$this->actyear-1;
|
||||
} else{
|
||||
$pMonth=$this->actmonth-1;
|
||||
$pYear=$this->actyear;
|
||||
}
|
||||
$out='<tr class="daysRow">';
|
||||
$cor=0;
|
||||
if ($this->startOnSun) {
|
||||
$cor=1;
|
||||
}
|
||||
if ($this->weekNum) {
|
||||
$out.="<td class=\"".$this->cssWeekNum."\">".$this->mkWeekNum(1+$cor)."</td>";
|
||||
}
|
||||
$monthday=0;
|
||||
$nmonthday=1;
|
||||
for ($x=0; $x<=6; $x++) {
|
||||
if ($x>=$this->firstday) {
|
||||
$monthday++;
|
||||
$out.=$this->mkDay($monthday);
|
||||
} else {
|
||||
if ($showNoMonthDays==0) {
|
||||
$out.="<td class=\"".$this->cssNoMonthDay."\"></td>";
|
||||
} else {
|
||||
$out.="<td class=\"".$this->cssNoMonthDay."\">".($this->getMonthDays($pMonth,$pYear)-($this->firstday-1)+$x)."</td>";
|
||||
}
|
||||
}
|
||||
}
|
||||
$out.="</tr>\n";
|
||||
$goon=$monthday+1;
|
||||
$stop=0;
|
||||
for ($x=0; $x<=6; $x++) {
|
||||
if ($goon>$this->maxdays) {
|
||||
break;
|
||||
}
|
||||
if ($stop==1) {
|
||||
break;
|
||||
}
|
||||
$out.='<tr class="daysRow">';
|
||||
if ($this->weekNum) $out.="<td class=\"".$this->cssWeekNum."\">".$this->mkWeekNum($goon+$cor)."</td>";
|
||||
for ($i=$goon; $i<=$goon+6; $i++) {
|
||||
if ($i>$this->maxdays) {
|
||||
if ($showNoMonthDays==0) {
|
||||
$out.="<td class=\"".$this->cssNoMonthDay."\"></td>";
|
||||
}
|
||||
else {
|
||||
$out.='<td class="'.$this->cssNoMonthDay.'"><div class="daynum">'.$nmonthday++.'</div></td>';
|
||||
}
|
||||
$stop=1;
|
||||
} else {
|
||||
$out.=$this->mkDay($i);
|
||||
}
|
||||
}
|
||||
$goon=$goon+7;
|
||||
$out.="</tr>\n";
|
||||
}
|
||||
$this->selectedday="-2";
|
||||
return $out;
|
||||
}
|
||||
/*
|
||||
********************************************************************************
|
||||
PRIVATE mkDay() -> creates each td tag of the month body
|
||||
********************************************************************************
|
||||
*/
|
||||
function mkDay($var) {
|
||||
$eventContent = $this->mkEventContent($var);
|
||||
$linktext = $var;
|
||||
if ($this->dayLinks) {
|
||||
if ($eventContent) {
|
||||
if ($this->javaScriptDay) {
|
||||
$linktext="<a href=\"javascript:".$this->javaScriptDay."(".$this->actyear.",".$this->actmonth.",".$var.")\">".$var."</a>";
|
||||
} elseif (!empty($this->url)) {
|
||||
$dayurl= Route::_($this->url.(strpos($this->url,"?") === false ? '?' : '&').'id='.sprintf('%04d%02d%02d',$this->actyear,$this->actmonth,$var));
|
||||
$linktext="<a href=\"".$dayurl."\">".$var."</a>";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$htmlNewEventLink = '';
|
||||
if ($this->dayNewEventLinks) {
|
||||
$htmlNewEventLink = preg_replace('/{date}/', sprintf('%04d-%02d-%02d', $this->actyear, $this->actmonth, $var), $this->htmlNewEventLink);
|
||||
}
|
||||
|
||||
if ($this->isEvent($var)) {
|
||||
if ($this->eventUrl) {
|
||||
$out="<td class=\"".$this->eventID."\"><div class=\"daynum\">".$htmlNewEventLink."<a href=\"".$this->eventUrl."\">".$var."</a></div>".$eventContent."</td>";
|
||||
$this->eventUrl=false;
|
||||
} else {
|
||||
$out="<td class=\"".$this->eventID."\"><div class=\"daynum\">".$htmlNewEventLink.$linktext.'</div>'.$eventContent."</td>";
|
||||
}
|
||||
} else {
|
||||
/* allow styling of multiple things like "today is Sunday" */
|
||||
$cssClass = array($this->cssMonthDay);
|
||||
if (($var == $this->selectedday) && ($this->actmonth == $this->selectedmonth) && ($this->actyear == $this->selectedyear)) {
|
||||
$cssClass[] = $this->cssSelecDay;
|
||||
}
|
||||
if (($var == $this->daytoday) && ($this->actmonth == $this->monthtoday) && ($this->actyear == $this->yeartoday)) {
|
||||
$cssClass[] = $this->cssToday;
|
||||
}
|
||||
if (($this->getWeekday($var) == 0) && $this->crSunClass) {
|
||||
$cssClass[] = $this->cssSunday;
|
||||
}
|
||||
if (($this->getWeekday($var) == 6) && $this->crSatClass) {
|
||||
$cssClass[] = $this->cssSaturday;
|
||||
}
|
||||
$out = "<td class=\"".implode(' ', $cssClass)."\"><div class=\"daynum\" jem-monthname=\"".$this->getMonthName()."\" jem-dayname=\"".$this->getDayName($this->getWeekday($var))."\">".$htmlNewEventLink.$linktext.'</div>'.$eventContent."</td>";
|
||||
}
|
||||
|
||||
return $out;
|
||||
}
|
||||
/*
|
||||
********************************************************************************
|
||||
PRIVATE mkMonthFoot() -> closes the month table
|
||||
********************************************************************************
|
||||
*/
|
||||
function mkMonthFoot() {
|
||||
return "</table>\n";
|
||||
}
|
||||
/*
|
||||
********************************************************************************
|
||||
PRIVATE mkUrl() -> creates the day and navigation link structure
|
||||
********************************************************************************
|
||||
*/
|
||||
function mkUrl($year, $month=false, $day=false) {
|
||||
if (strpos($this->url,"?") === false) {
|
||||
$glue="?";
|
||||
} else {
|
||||
$glue="&";
|
||||
}
|
||||
if (strpos($this->urlNav,"?") === false) {
|
||||
$glueNav="?";
|
||||
} else {
|
||||
$glueNav="&";
|
||||
}
|
||||
$yearNavLink = empty($this->urlNav) ? '' : "<a href=\"".Route::_($this->urlNav.$glueNav.$this->yearID."=".$year)."\" rel=\"noindex, nofollow\">";
|
||||
$monthNavLink = empty($this->urlNav) ? '' : "<a href=\"".Route::_($this->urlNav.$glueNav.$this->yearID."=".$year."&".$this->monthID."=".$month)."\" rel=\"noindex, nofollow\">";
|
||||
$dayLink = empty($this->url) ? $day : "<a href=\"".Route::_($this->url.$glue.$this->yearID."=".$year."&".$this->monthID."=".$month."&".$this->dayID."=".$day)."\">".$day."</a>";
|
||||
if ($year && $month && $day) return $dayLink;
|
||||
if ($year && !$month && !$day) return $yearNavLink;
|
||||
if ($year && $month && !$day) return $monthNavLink;
|
||||
}
|
||||
/*
|
||||
********************************************************************************
|
||||
PRIVATE mkEventContent() -> creates the table for the event content
|
||||
********************************************************************************
|
||||
*/
|
||||
/* see below
|
||||
function mkEventContent_old($var)
|
||||
{
|
||||
$hasContent=$this->hasEventContent($var);
|
||||
$out="";
|
||||
if ($hasContent) {
|
||||
for ($x=0;$x<count($hasContent);$x++) {
|
||||
foreach($hasContent[$x] as $eventContentid => $eventContentData) {
|
||||
foreach($eventContentData as $eventContentUrl => $eventContent) {
|
||||
$out.="<table class=\"".$eventContentid."\">";
|
||||
if (is_string($eventContent)) {
|
||||
if (is_int($eventContentUrl)) {
|
||||
$out.="<tr><td>".$eventContent."</td></tr></table>";
|
||||
} else {
|
||||
$out.="<tr><td><a href=\"".$eventContentUrl."\">".$eventContent."</a></td></tr></table>";
|
||||
}
|
||||
} else if (is_array($eventContent)) {
|
||||
foreach($eventContent as $arrayContent) {
|
||||
if (is_int($eventContentUrl)) {
|
||||
$out.="<tr><td>".$arrayContent."</td></tr>";
|
||||
} else {
|
||||
$out.="<tr><td><a href=\"".$eventContentUrl."\">".$arrayContent."</a></td></tr>";
|
||||
}
|
||||
}
|
||||
$out.="</table>";
|
||||
}
|
||||
else $out="";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return $out;
|
||||
}
|
||||
*/
|
||||
|
||||
/**
|
||||
* creates the div for the event content
|
||||
*
|
||||
* @param int $var the day
|
||||
* @return string
|
||||
*/
|
||||
function mkEventContent($var) {
|
||||
$hasContent=$this->hasEventContent($var);
|
||||
$out="";
|
||||
if ($hasContent) {
|
||||
$n = is_array($hasContent) ? count($hasContent) : 0;
|
||||
for ($x = 0; $x < $n; $x++) {
|
||||
foreach ($hasContent[$x] as $eventContentid => $eventContentData) {
|
||||
foreach ($eventContentData as $eventContentUrl => $eventContent) {
|
||||
if (is_string($eventContent)) {
|
||||
$eventContent = array($eventContent);
|
||||
}
|
||||
|
||||
foreach($eventContent as $arrayContent) {
|
||||
$out .= '<div class="'.$eventContentid.'">';
|
||||
if (is_int($eventContentUrl)) {
|
||||
$out.= $arrayContent;
|
||||
} else {
|
||||
$out.='<a href="'.$eventContentUrl.'">'.$arrayContent.'</a>';
|
||||
}
|
||||
$out.='</div>';
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return $out;
|
||||
}
|
||||
/*
|
||||
********************************************************************************
|
||||
PRIVATE mkWeekNum() -> returns the week number and optionally creates a link
|
||||
********************************************************************************
|
||||
*/
|
||||
function mkWeekNum($var) {
|
||||
$year=$this->actyear;
|
||||
$week=$this->getWeekNum($var);
|
||||
if ($week>50 && $this->actmonth==1) $year=$this->actyear-1;
|
||||
$out="";
|
||||
if ($this->weekUrl) {
|
||||
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;
|
||||
}
|
||||
/*
|
||||
********************************************************************************
|
||||
PRIVATE getMonthName() -> returns the month's name, according to the configuration
|
||||
********************************************************************************
|
||||
*/
|
||||
function getMonthName($var=false) {
|
||||
if (!$var) $var=@$this->actmonth;
|
||||
if ($this->monthNames) return $this->monthNames[$var-1];
|
||||
switch($var) {
|
||||
case 1: return Text::_($this->jan);
|
||||
case 2: return Text::_($this->feb);
|
||||
case 3: return Text::_($this->mar);
|
||||
case 4: return Text::_($this->apr);
|
||||
case 5: return Text::_($this->may);
|
||||
case 6: return Text::_($this->jun);
|
||||
case 7: return Text::_($this->jul);
|
||||
case 8: return Text::_($this->aug);
|
||||
case 9: return Text::_($this->sep);
|
||||
case 10: return Text::_($this->oct);
|
||||
case 11: return Text::_($this->nov);
|
||||
case 12: return Text::_($this->dec);
|
||||
}
|
||||
}
|
||||
/*
|
||||
********************************************************************************
|
||||
PRIVATE getDayName() -> returns the day's name, according to the configuration
|
||||
********************************************************************************
|
||||
*/
|
||||
function getDayName($var=false) {
|
||||
if ($this->dayNames) return $this->dayNames[$var];
|
||||
switch($var) {
|
||||
case 0: return Text::_($this->sun);
|
||||
case 1: return Text::_($this->mon);
|
||||
case 2: return Text::_($this->tue);
|
||||
case 3: return Text::_($this->wed);
|
||||
case 4: return Text::_($this->thu);
|
||||
case 5: return Text::_($this->fri);
|
||||
case 6: return Text::_($this->sat);
|
||||
}
|
||||
}
|
||||
/*
|
||||
********************************************************************************
|
||||
PRIVATE getMonthDays() -> returns the number of days of the month specified
|
||||
********************************************************************************
|
||||
*/
|
||||
function getMonthDays($month,$year) {
|
||||
$has31days=checkdate($month,31,$year);
|
||||
$isSchalt=checkdate(2,29,$year);
|
||||
if ($isSchalt==1 && $month==2) $maxdays=29;
|
||||
elseif ($isSchalt!=1 && $month==2) $maxdays=28;
|
||||
elseif ($has31days==1) $maxdays=31;
|
||||
else $maxdays=30;
|
||||
return $maxdays;
|
||||
}
|
||||
/*
|
||||
********************************************************************************
|
||||
PRIVATE getWeekday() -> returns the weekday's number, 0 = Sunday ... 6 = Saturday
|
||||
********************************************************************************
|
||||
*/
|
||||
function getWeekday($var) {
|
||||
return $this->mkActiveDate("w", $this->mkActiveTime(0,0,1,$this->actmonth,$var,$this->actyear));
|
||||
}
|
||||
/*
|
||||
********************************************************************************
|
||||
PRIVATE getWeekNum() -> returns the week number, php version > 4.1.0, unsupported by the ADOdb Date Library
|
||||
********************************************************************************
|
||||
*/
|
||||
function getWeekNum($var) {
|
||||
return date("W", $this->mkActiveTime(0,0,1,$this->actmonth,$var,$this->actyear))+0;
|
||||
}
|
||||
/*
|
||||
********************************************************************************
|
||||
PRIVATE isEvent() -> checks if a date was set as an event and creates the eventID (css layout) and eventUrl
|
||||
********************************************************************************
|
||||
*/
|
||||
function isEvent($var) {
|
||||
if ($this->calEvents) {
|
||||
$checkTime=$this->mkActiveTime(0,0,1,$this->actmonth,$var,$this->actyear);
|
||||
$selectedTime=$this->mkActiveTime(0,0,1,$this->selectedmonth,$this->selectedday,$this->selectedyear);
|
||||
$todayTime=$this->mkActiveTime(0,0,1,$this->monthtoday,$this->daytoday,$this->yeartoday);
|
||||
foreach($this->calEvents as $eventTime => $eventID) {
|
||||
if ($eventTime==$checkTime) {
|
||||
if ($eventTime==$selectedTime) $this->eventID=$this->cssPrefixSelecEvent.$eventID;
|
||||
elseif ($eventTime==$todayTime) $this->eventID=$this->cssPrefixTodayEvent.$eventID;
|
||||
else $this->eventID=$eventID;
|
||||
if ($this->calEventsUrl[$eventTime]) $this->eventUrl=$this->calEventsUrl[$eventTime];
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
/*
|
||||
********************************************************************************
|
||||
PRIVATE hasEventContent() -> checks if an event content was set
|
||||
********************************************************************************
|
||||
*/
|
||||
/**
|
||||
* checks if an event content was set for the day
|
||||
*
|
||||
* @param int $var day of the month
|
||||
* @return array
|
||||
*/
|
||||
function hasEventContent($var) {
|
||||
$hasContent = [];
|
||||
if ($this->calEventContent) {
|
||||
$checkTime = $this->mkActiveTime(0, 0, 1, $this->actmonth, $var, $this->actyear);
|
||||
$n = is_array($this->calEventContent) ? count($this->calEventContent) : 0;
|
||||
for ($x = 0; $x < $n; $x++) {
|
||||
$eventContent = $this->calEventContent[$x];
|
||||
$eventContentUrl = $this->calEventContentUrl[$x];
|
||||
$eventContentId = $this->calEventContentId[$x];
|
||||
foreach ($eventContent as $eventTime => $eventContent) {
|
||||
if ($eventTime == $checkTime) $hasContent[][$eventContentId][$eventContentUrl] = $eventContent;
|
||||
}
|
||||
}
|
||||
}
|
||||
return $hasContent;
|
||||
}
|
||||
/*
|
||||
********************************************************************************
|
||||
PRIVATE mkActiveDate() -> checks if ADOdb Date Library is loaded and calls the date function
|
||||
********************************************************************************
|
||||
*/
|
||||
function mkActiveDate($param,$acttime=false) {
|
||||
if (!$acttime) $acttime=$this->timetoday;
|
||||
if (function_exists("adodb_date")) return adodb_date($param,$acttime);
|
||||
else return date($param,$acttime);
|
||||
}
|
||||
/*
|
||||
********************************************************************************
|
||||
PRIVATE mkActiveGMDate() -> checks if ADOdb Date Library is loaded and calls the gmdate function
|
||||
********************************************************************************
|
||||
*/
|
||||
function mkActiveGMDate($param,$acttime=false) {
|
||||
if (!$acttime) $acttime=time();
|
||||
if (function_exists("adodb_gmdate")) return adodb_gmdate($param,$acttime);
|
||||
else return gmdate($param,$acttime);
|
||||
}
|
||||
/*
|
||||
********************************************************************************
|
||||
PRIVATE mkActiveTime() -> checks if ADOdb Date Library is loaded and calls the mktime function
|
||||
********************************************************************************
|
||||
*/
|
||||
/**
|
||||
* checks if ADOdb Date Library is loaded and calls the mktime function
|
||||
*
|
||||
* @param int $hr
|
||||
* @param int $min
|
||||
* @param int $sec
|
||||
* @param int $month [optional]
|
||||
* @param int $day [optional]
|
||||
* @param int $year [optional]
|
||||
* @return int
|
||||
*/
|
||||
function mkActiveTime($hr,$min,$sec,$month=false,$day=false,$year=false) {
|
||||
if (function_exists("adodb_mktime")) return adodb_mktime($hr,$min,$sec,$month,$day,$year);
|
||||
else return mktime($hr,$min,$sec,$month,$day,$year);
|
||||
}
|
||||
}
|
||||
?>
|
||||
1286
components/com_jem/classes/categories.class.php
Normal file
1286
components/com_jem/classes/categories.class.php
Normal file
File diff suppressed because it is too large
Load Diff
226
components/com_jem/classes/config.class.php
Normal file
226
components/com_jem/classes/config.class.php
Normal file
@ -0,0 +1,226 @@
|
||||
<?php
|
||||
/**
|
||||
* @package JEM
|
||||
* @copyright (C) 2013-2024 joomlaeventmanager.net
|
||||
* @license https://www.gnu.org/licenses/gpl-3.0 GNU/GPL
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\Registry\Registry;
|
||||
|
||||
/**
|
||||
* JemConfig class to handle JEM configuration
|
||||
*
|
||||
* @package JEM
|
||||
*/
|
||||
class JemConfig
|
||||
{
|
||||
/**
|
||||
* Data Object
|
||||
*
|
||||
* @var Registry object
|
||||
* @since 2.1.6
|
||||
*/
|
||||
protected $_data;
|
||||
|
||||
/**
|
||||
* Class instance.
|
||||
*
|
||||
* @var object
|
||||
* @since 2.1.6
|
||||
*/
|
||||
protected static $instance;
|
||||
|
||||
/**
|
||||
* Returns a reference to the global JemConfig object, only creating it
|
||||
* if it doesn't already exist.
|
||||
*
|
||||
* This method must be invoked as:
|
||||
* <pre>$jemConfig = JemConfig::getInstance();</pre>
|
||||
*
|
||||
* @return JemConfig The JemConfig object.
|
||||
*
|
||||
* @since 2.1.6
|
||||
*/
|
||||
public static function getInstance()
|
||||
{
|
||||
if (empty(self::$instance))
|
||||
{
|
||||
self::$instance = new self;
|
||||
}
|
||||
|
||||
return self::$instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param mixed $data The data to bind to the new Registry object.
|
||||
*
|
||||
* @since 1.0
|
||||
*/
|
||||
protected function __construct()
|
||||
{
|
||||
// Instantiate the internal data object.
|
||||
$this->_data = new Registry($this->loadData());
|
||||
|
||||
// Load data from database
|
||||
;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets configuration data as Registry.
|
||||
*
|
||||
* @return object An object holding the configuration data
|
||||
*
|
||||
* @since 2.1.6
|
||||
*/
|
||||
public function toRegistry()
|
||||
{
|
||||
return $this->_data;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets configuration data as object.
|
||||
*
|
||||
* @return object An object holding the configuration data
|
||||
*
|
||||
* @since 2.1.6
|
||||
*/
|
||||
public function toObject()
|
||||
{
|
||||
return $this->_data->toObject();
|
||||
}
|
||||
|
||||
/**
|
||||
* Loading the table data
|
||||
*/
|
||||
protected function loadData()
|
||||
{
|
||||
$db = Factory::getContainer()->get('DatabaseDriver');
|
||||
|
||||
// new table
|
||||
$query = $db->getQuery(true);
|
||||
$query->select(array($db->quoteName('keyname'), $db->quoteName('value')));
|
||||
$query->from('#__jem_config');
|
||||
$db->setQuery($query);
|
||||
try {
|
||||
$list = $db->loadAssocList('keyname', 'value');
|
||||
} catch (Exception $e) {}
|
||||
|
||||
if (!empty($list)) {
|
||||
$data = (object)$list;
|
||||
} else {
|
||||
// old table
|
||||
$query = $db->getQuery(true);
|
||||
$query->select(array('*'));
|
||||
$query->from('#__jem_settings');
|
||||
$query->where(array('id = 1 '));
|
||||
|
||||
$db->setQuery($query);
|
||||
try {
|
||||
$data = $db->loadObject();
|
||||
} catch (Exception $e) {}
|
||||
}
|
||||
|
||||
// Convert the params field to an array.
|
||||
if (!empty($data->globalattribs)) {
|
||||
$registry = new Registry;
|
||||
$registry->loadString($data->globalattribs);
|
||||
$data->globalattribs = $registry->toObject();
|
||||
}
|
||||
|
||||
// Convert Css settings to an array
|
||||
if (!empty($data->css)) {
|
||||
$registryCss = new Registry;
|
||||
$registryCss->loadString($data->css);
|
||||
$data->css = $registryCss->toObject();
|
||||
}
|
||||
|
||||
return $data;
|
||||
}
|
||||
|
||||
/**
|
||||
* Bind the data
|
||||
*
|
||||
*/
|
||||
public function bind($data)
|
||||
{
|
||||
$reg = new Registry($data);
|
||||
$this->_data->loadObject($reg->toObject());
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set a singla value.
|
||||
*
|
||||
* @param string $key The key.
|
||||
* @param string $value Value to set.
|
||||
* @return mixed The value set or null.
|
||||
*/
|
||||
public function set($key, $value)
|
||||
{
|
||||
$result = $this->_data->set($key, $value);
|
||||
|
||||
if (!is_null($result)) {
|
||||
if (!$this->store()) {
|
||||
$result = null;
|
||||
}
|
||||
}
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Store data
|
||||
*
|
||||
*/
|
||||
public function store()
|
||||
{
|
||||
$data = $this->_data->toArray();
|
||||
|
||||
// Convert the params field to an array.
|
||||
if (isset($data['globalattribs'])) {
|
||||
$registry = new Registry($data['globalattribs']);
|
||||
$data['globalattribs'] = $registry->toString();
|
||||
}
|
||||
|
||||
// Convert Css settings to an array
|
||||
if (isset($data['css'])) {
|
||||
$registryCss = new Registry($data['css']);
|
||||
$data['css'] = $registryCss->toString();
|
||||
}
|
||||
|
||||
// Store into new table
|
||||
$db = Factory::getContainer()->get('DatabaseDriver');
|
||||
$query = $db->getQuery(true);
|
||||
$query->select(array($db->quoteName('keyname'), $db->quoteName('value')));
|
||||
$query->from('#__jem_config');
|
||||
$db->setQuery($query);
|
||||
$list = $db->loadAssocList('keyname', 'value');
|
||||
$keys = array_keys($list);
|
||||
|
||||
foreach ($data as $k => $v) {
|
||||
$query = $db->getQuery(true);
|
||||
if (in_array($k, $keys)) {
|
||||
if ($v == $list[$k]) {
|
||||
continue; // skip if unchanged
|
||||
}
|
||||
$query->update('#__jem_config');
|
||||
$query->where(array($db->quoteName('keyname') . ' = ' . $db->quote($k)));
|
||||
} else {
|
||||
$query->insert('#__jem_config');
|
||||
$query->set(array($db->quoteName('keyname') . ' = ' . $db->quote($k)));
|
||||
}
|
||||
$query->set(array($db->quoteName('value') . ' = ' . $db->quote($v)));
|
||||
$db->setQuery($query);
|
||||
$db->execute();
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
46
components/com_jem/classes/controller.form.class.php
Normal file
46
components/com_jem/classes/controller.form.class.php
Normal file
@ -0,0 +1,46 @@
|
||||
<?php
|
||||
/**
|
||||
* @package JEM
|
||||
* @copyright (C) 2013-2024 joomlaeventmanager.net
|
||||
* @copyright (C) 2005-2009 Christoph Lukes
|
||||
* @license https://www.gnu.org/licenses/gpl-3.0 GNU/GPL
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
use Joomla\CMS\MVC\Controller\FormController;
|
||||
use Joomla\CMS\MVC\Model\BaseDatabaseModel;
|
||||
|
||||
abstract class JemControllerForm extends FormController
|
||||
{
|
||||
/**
|
||||
* Function that allows child controller access to model data
|
||||
* after the data has been saved.
|
||||
*
|
||||
* @see JemControllerForm::postSaveHook()
|
||||
*
|
||||
* @since JEM 2.1.5
|
||||
*/
|
||||
protected function _postSaveHook($model, $validData = array())
|
||||
{
|
||||
// Derived class will provide its own implementation if required.
|
||||
}
|
||||
|
||||
/**
|
||||
* Function that allows child controller access to model data
|
||||
* after the data has been saved. - wrapper
|
||||
*
|
||||
* @param BaseDatabaseModel $model The data model object.
|
||||
* @param array $validData The validated data.
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @since 12.2
|
||||
*/
|
||||
protected function postSaveHook(BaseDatabaseModel $model, $validData = array())
|
||||
{
|
||||
$this->_postSaveHook($model, $validData);
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
10558
components/com_jem/classes/iCalcreator.class.php
Normal file
10558
components/com_jem/classes/iCalcreator.class.php
Normal file
File diff suppressed because it is too large
Load Diff
318
components/com_jem/classes/image.class.php
Normal file
318
components/com_jem/classes/image.class.php
Normal file
@ -0,0 +1,318 @@
|
||||
<?php
|
||||
/**
|
||||
* @package JEM
|
||||
* @copyright (C) 2013-2024 joomlaeventmanager.net
|
||||
* @copyright (C) 2005-2009 Christoph Lukes
|
||||
* @license https://www.gnu.org/licenses/gpl-3.0 GNU/GPL
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Filesystem\File;
|
||||
use Joomla\CMS\Language\Text;
|
||||
|
||||
require_once(JPATH_SITE.'/components/com_jem/classes/Zebra_Image.php');
|
||||
|
||||
/**
|
||||
* Holds the logic for image manipulation
|
||||
*
|
||||
* @package JEM
|
||||
*/
|
||||
class JemImage
|
||||
{
|
||||
static public function thumb($name,$filename,$new_w,$new_h)
|
||||
{
|
||||
// load the image manipulation class
|
||||
//require 'path/to/Zebra_Image.php';
|
||||
|
||||
// create a new instance of the class
|
||||
$image = new Zebra_Image();
|
||||
|
||||
// indicate a source image (a GIF, PNG or JPEG file)
|
||||
$image->source_path = $name;
|
||||
|
||||
// indicate a target image
|
||||
// note that there's no extra property to set in order to specify the target
|
||||
// image's type -simply by writing '.jpg' as extension will instruct the script
|
||||
// to create a 'jpg' file
|
||||
$image->target_path = $filename;
|
||||
|
||||
// since in this example we're going to have a jpeg file, let's set the output
|
||||
// image's quality (95% has no visible effect but saves some bytes)
|
||||
$image->jpeg_quality = 95;
|
||||
|
||||
// some additional properties that can be set
|
||||
// read about them in the documentation
|
||||
$image->preserve_aspect_ratio = true;
|
||||
$image->enlarge_smaller_images = false;
|
||||
$image->preserve_time = true;
|
||||
$image->auto_handle_exif_orientation = true;
|
||||
|
||||
// resize the image to at best 100x100 pixels by using the "not boxed" method
|
||||
// (read more in the overview section or in the documentation)
|
||||
// and if there is an error, check what the error is about
|
||||
if (!$image->resize($new_w, $new_h, ZEBRA_IMAGE_NOT_BOXED, -1)) {
|
||||
|
||||
//only admins will see these errors
|
||||
if (Factory::getApplication()->getIdentity()->authorise('core.manage')) {
|
||||
|
||||
// if there was an error, let's see what the error is about
|
||||
switch ($image->error) {
|
||||
case 1:
|
||||
Factory::getApplication()->enqueueMessage("Source file $name could not be found!", 'warning');
|
||||
break;
|
||||
case 2:
|
||||
Factory::getApplication()->enqueueMessage("Source file $name is not readable!", 'warning');
|
||||
break;
|
||||
case 3:
|
||||
Factory::getApplication()->enqueueMessage("Could not write target file $filename !", 'warning');
|
||||
break;
|
||||
case 4:
|
||||
Factory::getApplication()->enqueueMessage('Unsupported source file format!', 'warning');
|
||||
break;
|
||||
case 5:
|
||||
Factory::getApplication()->enqueueMessage('Unsupported target file format!', 'warning');
|
||||
break;
|
||||
case 6:
|
||||
Factory::getApplication()->enqueueMessage('GD library version does not support target file format!', 'warning');
|
||||
break;
|
||||
case 7:
|
||||
Factory::getApplication()->enqueueMessage('GD library is not installed!', 'warning');
|
||||
break;
|
||||
case 8:
|
||||
Factory::getApplication()->enqueueMessage('"chmod" command is disabled via configuration', 'warning');
|
||||
break;
|
||||
case 9:
|
||||
Factory::getApplication()->enqueueMessage('"exif_read_data" function is not available', 'warning');
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine the GD version
|
||||
* Code from php.net
|
||||
*
|
||||
* @param int
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
static public function gdVersion($user_ver = 0)
|
||||
{
|
||||
if (! extension_loaded('gd')) {
|
||||
return;
|
||||
}
|
||||
static $gd_ver = 0;
|
||||
|
||||
// Just accept the specified setting if it's 1.
|
||||
if ($user_ver == 1) {
|
||||
$gd_ver = 1;
|
||||
return 1;
|
||||
}
|
||||
// Use the static variable if function was called previously.
|
||||
if ($user_ver != 2 && $gd_ver > 0) {
|
||||
return $gd_ver;
|
||||
}
|
||||
// Use the gd_info() function if possible.
|
||||
if (function_exists('gd_info')) {
|
||||
$ver_info = gd_info();
|
||||
preg_match('/\d/', $ver_info['GD Version'], $match);
|
||||
$gd_ver = $match[0];
|
||||
return $match[0];
|
||||
}
|
||||
// If phpinfo() is disabled use a specified / fail-safe choice...
|
||||
if (preg_match('/phpinfo/', ini_get('disable_functions'))) {
|
||||
if ($user_ver == 2) {
|
||||
$gd_ver = 2;
|
||||
return 2;
|
||||
} else {
|
||||
$gd_ver = 1;
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
// ...otherwise use phpinfo().
|
||||
ob_start();
|
||||
phpinfo(8);
|
||||
$info = ob_get_contents();
|
||||
ob_end_clean();
|
||||
$info = stristr($info, 'gd version');
|
||||
preg_match('/\d/', $info, $match);
|
||||
$gd_ver = $match[0];
|
||||
|
||||
return $match[0];
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates image information of an image
|
||||
*
|
||||
* @param string $image The image name
|
||||
* @param array $settings
|
||||
* @param string $type event or venue
|
||||
*
|
||||
* @return imagedata if available
|
||||
*/
|
||||
static public function flyercreator($image, $type)
|
||||
{
|
||||
$settings = JemHelper::config();
|
||||
|
||||
if (($settings->imagewidth < 1) || ($settings->imagehight < 1)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
//define the environment based on the type
|
||||
if ($type == 'event') {
|
||||
$folder = 'events';
|
||||
} else if ($type == 'category') {
|
||||
$folder = 'categories';
|
||||
} else if ($type == 'venue') {
|
||||
$folder = 'venues';
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
|
||||
if ($image) {
|
||||
$img_orig = 'images/jem/'.$folder.'/'.$image;
|
||||
$img_thumb = 'images/jem/'.$folder.'/small/'.$image;
|
||||
|
||||
$filepath = JPATH_SITE.'/'.$img_orig;
|
||||
$save = JPATH_SITE.'/'.$img_thumb;
|
||||
|
||||
// At least original image must exist
|
||||
if (!file_exists($filepath)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
//Create thumbnail if enabled and it does not exist already
|
||||
if ($settings->gddisabled == 1 && !file_exists($save)) {
|
||||
JemImage::thumb($filepath, $save, $settings->imagewidth, $settings->imagehight);
|
||||
}
|
||||
|
||||
//set paths
|
||||
$dimage['original'] = $img_orig;
|
||||
$dimage['thumb'] = $img_thumb;
|
||||
|
||||
//get imagesize of the original
|
||||
$iminfo = @getimagesize($img_orig);
|
||||
|
||||
// and it should be an image
|
||||
if (!is_array($iminfo) || count($iminfo) < 2) {
|
||||
return false;
|
||||
}
|
||||
|
||||
//if the width or height is too large this formula will resize them accordingly
|
||||
if (($iminfo[0] > $settings->imagewidth) || ($iminfo[1] > $settings->imagehight)) {
|
||||
$iRatioW = $settings->imagewidth / $iminfo[0];
|
||||
$iRatioH = $settings->imagehight / $iminfo[1];
|
||||
|
||||
if ($iRatioW < $iRatioH) {
|
||||
$dimage['width'] = round($iminfo[0] * $iRatioW);
|
||||
$dimage['height'] = round($iminfo[1] * $iRatioW);
|
||||
} else {
|
||||
$dimage['width'] = round($iminfo[0] * $iRatioH);
|
||||
$dimage['height'] = round($iminfo[1] * $iRatioH);
|
||||
}
|
||||
} else {
|
||||
$dimage['width'] = $iminfo[0];
|
||||
$dimage['height'] = $iminfo[1];
|
||||
}
|
||||
|
||||
if (File::exists(JPATH_SITE.'/'.$img_thumb)) {
|
||||
//get imagesize of the thumbnail
|
||||
$thumbiminfo = @getimagesize($img_thumb);
|
||||
$dimage['thumbwidth'] = $thumbiminfo[0];
|
||||
$dimage['thumbheight'] = $thumbiminfo[1];
|
||||
}
|
||||
|
||||
return $dimage;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
static public function check($file, $jemsettings)
|
||||
{
|
||||
$sizelimit = $jemsettings->sizelimit*1024; //size limit in kb
|
||||
$imagesize = $file['size'];
|
||||
$filetypes = $jemsettings->image_filetypes ?: 'jpg,gif,png,webp';
|
||||
|
||||
//check if the upload is an image...getimagesize will return false if not
|
||||
if (!getimagesize($file['tmp_name'])) {
|
||||
Factory::getApplication()->enqueueMessage(Text::_('COM_JEM_UPLOAD_FAILED_NOT_AN_IMAGE').': '.htmlspecialchars($file['name'], ENT_COMPAT, 'UTF-8'), 'warning');
|
||||
return false;
|
||||
}
|
||||
|
||||
//check if the imagefiletype is valid
|
||||
$fileext = strtolower(File::getExt($file['name']));
|
||||
|
||||
$allowable = explode(',', strtolower($filetypes));
|
||||
array_walk($allowable, function(&$v){$v = trim($v);});
|
||||
if (!in_array($fileext, $allowable)) {
|
||||
Factory::getApplication()->enqueueMessage(Text::_('COM_JEM_WRONG_IMAGE_FILE_TYPE').': '.htmlspecialchars($file['name'], ENT_COMPAT, 'UTF-8'), 'warning');
|
||||
return false;
|
||||
}
|
||||
|
||||
//Check filesize
|
||||
if ($imagesize > $sizelimit) {
|
||||
Factory::getApplication()->enqueueMessage(Text::_('COM_JEM_IMAGE_FILE_SIZE').': '.htmlspecialchars($file['name'], ENT_COMPAT, 'UTF-8'), 'warning');
|
||||
return false;
|
||||
}
|
||||
|
||||
//XSS check
|
||||
//$xss_check = File::read($file['tmp_name'], false, 256);
|
||||
$xss_check = file_get_contents($file['tmp_name'], false, NULL, 0, 256);
|
||||
$html_tags = array('abbr','acronym','address','applet','area','audioscope','base','basefont','bdo','bgsound','big','blackface','blink','blockquote','body','bq','br','button','caption','center','cite','code','col','colgroup','comment','custom','dd','del','dfn','dir','div','dl','dt','em','embed','fieldset','fn','font','form','frame','frameset','h1','h2','h3','h4','h5','h6','head','hr','html','iframe','ilayer','img','input','ins','isindex','keygen','kbd','label','layer','legend','li','limittext','link','listing','map','marquee','menu','meta','multicol','nobr','noembed','noframes','noscript','nosmartquotes','object','ol','optgroup','option','param','plaintext','pre','rt','ruby','s','samp','script','select','server','shadow','sidebar','small','spacer','span','strike','strong','style','sub','sup','table','tbody','td','textarea','tfoot','th','thead','title','tr','tt','ul','var','wbr','xml','xmp','!DOCTYPE', '!--');
|
||||
foreach ($html_tags as $tag) {
|
||||
// A tag is '<tagname ', so we need to add < and a space or '<tagname>'
|
||||
if (stristr($xss_check, '<'.$tag.' ') || stristr($xss_check, '<'.$tag.'>')) {
|
||||
Factory::getApplication()->enqueueMessage(Text::_('COM_JEM_WARN_IE_XSS'), 'warning');
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sanitize the image file name and return an unique string
|
||||
*
|
||||
*
|
||||
* @param string $base_Dir the target directory
|
||||
* @param string $filename the unsanitized imagefile name
|
||||
*
|
||||
* @return string $filename the sanitized and unique image file name
|
||||
*/
|
||||
static public function sanitize($base_Dir, $filename)
|
||||
{
|
||||
//check for any leading/trailing dots and remove them (trailing shouldn't be possible cause of the getEXT check)
|
||||
$filename = preg_replace("/^[.]*/", '', $filename);
|
||||
$filename = preg_replace("/[.]*$/", '', $filename); //shouldn't be necessary, see above
|
||||
|
||||
//we need to save the last dot position cause preg_replace will also replace dots
|
||||
$lastdotpos = strrpos($filename, '.');
|
||||
|
||||
//replace invalid characters
|
||||
$filename = strtolower(preg_replace("/[^0-9a-zA-Z_-]/", '_', $filename));
|
||||
|
||||
//get the parts before and after the dot (assuming we have an extension...check was done before)
|
||||
$beforedot = substr($filename, 0, $lastdotpos);
|
||||
$afterdot = substr($filename, $lastdotpos + 1);
|
||||
|
||||
//make a unique filename for the image and check it is not already taken
|
||||
//if it is already taken keep trying till success
|
||||
//$now = time();
|
||||
|
||||
$now = rand();
|
||||
|
||||
while (File::exists($base_Dir . $beforedot . '_' . $now . '.' . $afterdot)) {
|
||||
$now++;
|
||||
}
|
||||
|
||||
//create out of the seperated parts the new filename
|
||||
$filename = $beforedot . '_' . $now . '.' . $afterdot;
|
||||
|
||||
return $filename;
|
||||
}
|
||||
}
|
||||
?>
|
||||
1
components/com_jem/classes/index.html
Normal file
1
components/com_jem/classes/index.html
Normal file
@ -0,0 +1 @@
|
||||
<!DOCTYPE html><title></title>
|
||||
1635
components/com_jem/classes/output.class.php
Normal file
1635
components/com_jem/classes/output.class.php
Normal file
File diff suppressed because it is too large
Load Diff
559
components/com_jem/classes/user.class.php
Normal file
559
components/com_jem/classes/user.class.php
Normal file
@ -0,0 +1,559 @@
|
||||
<?php
|
||||
/**
|
||||
* @package JEM
|
||||
* @copyright (C) 2013-2024 joomlaeventmanager.net
|
||||
* @copyright (C) 2005-2009 Christoph Lukes
|
||||
* @license https://www.gnu.org/licenses/gpl-3.0 GNU/GPL
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\User\User;
|
||||
|
||||
/**
|
||||
* JEM user class with additional functions.
|
||||
* Because User::getInstance has different paramters on different versions
|
||||
* we must split out class.
|
||||
*
|
||||
* @package JEM
|
||||
*/
|
||||
abstract class JemUserAbstract extends User
|
||||
{
|
||||
/**
|
||||
* @var array JemUser instances container.
|
||||
*/
|
||||
protected static $instances_jemuser = array();
|
||||
|
||||
|
||||
static protected function _getInstance($id = 0)
|
||||
{
|
||||
$id = (int)$id;
|
||||
|
||||
// Check if the user ID is already cached.
|
||||
if (empty(self::$instances_jemuser[$id]) || !(self::$instances_jemuser[$id] instanceof JemUser))
|
||||
{
|
||||
$user = new JemUser($id);
|
||||
self::$instances_jemuser[$id] = $user;
|
||||
}
|
||||
|
||||
return self::$instances_jemuser[$id];
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks access permissions of the user regarding on the groupid
|
||||
*
|
||||
* @param int $recurse
|
||||
* @param int $level
|
||||
* @return boolean True on success
|
||||
*/
|
||||
public function validate_user($recurse, $level)
|
||||
{
|
||||
// Only check when user is logged in
|
||||
if ($this->id) {
|
||||
//open for superuser or registered and thats all what is needed
|
||||
//level = -1 all registered users
|
||||
//level = -2 disabled
|
||||
if ((($level == -1) && $this->id) || (($level == -2) && ($this->authorise('core.manage')))) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
// User has no permissions
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if the user is allowed to edit an item
|
||||
*
|
||||
*
|
||||
* @param int $allowowner
|
||||
* @param int $ownerid
|
||||
* @param int $recurse
|
||||
* @param int $level
|
||||
* @return boolean True on success
|
||||
*/
|
||||
public function editaccess($allowowner, $ownerid, $recurse, $level)
|
||||
{
|
||||
$generalaccess = $this->validate_user($recurse, $level);
|
||||
|
||||
if ((($allowowner == 1) || $this->authorise('core.edit.own','com_jem')) && ($this->id == $ownerid) && ($ownerid != 0)) {
|
||||
return true;
|
||||
} elseif (($generalaccess == 1) || $this->authorise('core.edit','com_jem')) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if the user is a superuser
|
||||
* A superuser will allways have access if the feature is activated
|
||||
*
|
||||
* @return boolean True on success
|
||||
*
|
||||
* @deprecated since version 2.1.5
|
||||
*/
|
||||
static function superuser()
|
||||
{
|
||||
$user = Factory::getApplication()->getIdentity();
|
||||
|
||||
if ($user->authorise('core.manage', 'com_jem')) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if the user has the privileges to use the wysiwyg editor
|
||||
*
|
||||
* We could use the validate_user method instead of this to allow to set a groupid
|
||||
* Not sure if this is a good idea
|
||||
*
|
||||
* @return boolean True on success
|
||||
*
|
||||
* @deprecated since version 2.1.5
|
||||
*/
|
||||
static function editoruser()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if the user is a maintainer of a category
|
||||
*
|
||||
* @return NULL int of maintained categories or null
|
||||
*
|
||||
* @deprecated Use JemUser::can($action, 'event', $eventid) instead.
|
||||
*/
|
||||
public function ismaintainer($action, $eventid = false)
|
||||
{
|
||||
// lets look if the user is a maintainer
|
||||
$db = Factory::getContainer()->get('DatabaseDriver');
|
||||
|
||||
$query = 'SELECT gr.id' . ' FROM #__jem_groups AS gr'
|
||||
. ' LEFT JOIN #__jem_groupmembers AS g ON g.group_id = gr.id'
|
||||
. ' WHERE g.member = ' . (int)$this->id
|
||||
. ' AND ' . $db->quoteName('gr.' . $action . 'event') . ' = 1 '
|
||||
. ' AND g.member NOT LIKE 0';
|
||||
$db->setQuery($query);
|
||||
$groupnumber = $db->loadColumn();
|
||||
|
||||
// no results, the user is not within a group with the required right
|
||||
if (!$groupnumber) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// the user is in a group with the required right but is there a
|
||||
// published category where he is allowed to post in?
|
||||
|
||||
$categories = implode(' OR groupid = ', $groupnumber);
|
||||
|
||||
if ($action == 'edit') {
|
||||
$query = 'SELECT a.catid' . ' FROM #__jem_cats_event_relations AS a'
|
||||
. ' LEFT JOIN #__jem_categories AS c ON c.id = a.catid'
|
||||
. ' WHERE c.published = 1'
|
||||
. ' AND (c.groupid = ' . $categories . ')'
|
||||
. ' AND a.itemid = ' . $eventid;
|
||||
$db->setQuery($query);
|
||||
}
|
||||
else {
|
||||
$query = 'SELECT id' . ' FROM #__jem_categories'
|
||||
. ' WHERE published = 1'
|
||||
. ' AND (groupid = ' . $categories . ')';
|
||||
$db->setQuery($query);
|
||||
}
|
||||
|
||||
$maintainer = $db->loadResult();
|
||||
|
||||
if (!$maintainer) {
|
||||
return false;
|
||||
}
|
||||
else {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Checks if an user is a groupmember and if so
|
||||
* if the group is allowed for $action on venues
|
||||
*
|
||||
*/
|
||||
public function venuegroups($action)
|
||||
{
|
||||
/*
|
||||
* just a basic check to see if the current user is in an usergroup with
|
||||
* access for submitting venues. if a result then return true, otherwise false
|
||||
*
|
||||
* Actions: addvenue, publishvenue, editvenue
|
||||
*
|
||||
* views: venues, venue, editvenue
|
||||
*/
|
||||
$db = Factory::getContainer()->get('DatabaseDriver');
|
||||
$query = 'SELECT gr.id'
|
||||
. ' FROM #__jem_groups AS gr'
|
||||
. ' LEFT JOIN #__jem_groupmembers AS g ON g.group_id = gr.id'
|
||||
. ' AND '.$db->quoteName('gr.'.$action.'venue').' = 1 '
|
||||
. ' WHERE g.member = ' . (int)$this->id
|
||||
. ' AND g.member NOT LIKE 0';
|
||||
;
|
||||
$db->setQuery($query);
|
||||
|
||||
$groupnumber = $db->loadResult();
|
||||
|
||||
return !empty($groupnumber);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns all JEM groups user is member of.
|
||||
* The array returned is keyed by group id where the value is
|
||||
* an assoziative array of ['field_name' => 'row_value'] pairs.
|
||||
*
|
||||
* @param $asset mixed false, string or array of strings to restrict to groups
|
||||
* with at least one of this asset(s) set;
|
||||
* must be valid field names of #__jem_groups table. (optional)
|
||||
* @return mixed List of JEM groups or null
|
||||
*/
|
||||
public function getJemGroups($asset = false)
|
||||
{
|
||||
$userId = (int)$this->id;
|
||||
|
||||
// no registered user -> no groups
|
||||
if (empty($userId)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$db = Factory::getContainer()->get('DatabaseDriver');
|
||||
|
||||
if (is_array($asset) && !empty($asset)) {
|
||||
array_walk($asset, function(&$v, $k, $db) { $v = $db->quoteName($v); }, $db);
|
||||
$field = ' AND (' . implode(' > 0 OR ', $asset) . ' > 0)';
|
||||
} else {
|
||||
$field = empty($asset) ? '' : ' AND ' . $db->quoteName($asset) . ' > 0';
|
||||
}
|
||||
|
||||
$query = 'SELECT gr.*'
|
||||
. ' FROM #__jem_groups AS gr'
|
||||
. ' LEFT JOIN #__jem_groupmembers AS gm ON gm.group_id = gr.id'
|
||||
. ' WHERE gm.member = '. $userId . $field
|
||||
. ' GROUP BY gr.id';
|
||||
$db->setQuery($query);
|
||||
|
||||
$groups = $db->loadAssocList('id');
|
||||
return $groups;
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to return a list of all JEM categories that a user has permission for a given action
|
||||
*
|
||||
* @param mixed $action One or array of 'add', 'edit', 'publish'
|
||||
* @param string $type One of 'event', 'venue'
|
||||
* @param array $options additional options as 'option' => value, supported are:
|
||||
* 'ignore_access' (bool) true if access level should be ignored
|
||||
* 'use_disable' (bool) true to include non-allowed categories with attribute 'disable' set to true
|
||||
* 'owner' (bbol) true if 'edit.own' can be used
|
||||
*
|
||||
* @return array List of categories that this user can do this action (empty array if none).
|
||||
* Other categories will be returned too (with disable = true) if option 'disable' is set.
|
||||
*/
|
||||
public function getJemCategories($action, $type, $options = array())
|
||||
{
|
||||
$action = (array)$action;
|
||||
$ignore_access = array_key_exists('ignore_access', $options) ? (bool)$options['ignore_access'] : false;
|
||||
$use_disable = array_key_exists('use_disable', $options) ? (bool)$options['use_disable'] : false;
|
||||
$owner = array_key_exists('owner', $options) ? (bool)$options['owner'] : false;
|
||||
|
||||
$jemsettings = JemHelper::config();
|
||||
$asset = 'com_jem';
|
||||
|
||||
$all = (bool)$this->authorise('core.manage', $asset);
|
||||
|
||||
if (!$all) {
|
||||
foreach ($action as $act) {
|
||||
switch ($act) {
|
||||
case 'add':
|
||||
$all = (bool)$this->authorise('core.create', $asset);
|
||||
break;
|
||||
case 'edit':
|
||||
$all = (bool)$this->authorise('core.edit', $asset) || (bool)$this->authorise('core.edit.own', $asset);
|
||||
break;
|
||||
case 'publish':
|
||||
$all = (bool)$this->authorise('core.edit.state', $asset);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$jemgroups = array();
|
||||
if (!$all && (($type == 'event') || ($type == 'venue'))) {
|
||||
$fields = array();
|
||||
foreach ($action as $act) {
|
||||
switch ($act) {
|
||||
case 'add':
|
||||
$fields[] = $act . $type;
|
||||
break;
|
||||
case 'edit':
|
||||
$fields[] = $act . $type;
|
||||
break;
|
||||
case 'publish':
|
||||
$fields[] = $act . $type;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
switch ($type) {
|
||||
case 'event':
|
||||
$create = ($jemsettings->delivereventsyes == -1);
|
||||
$edit = ($jemsettings->eventedit == -1);
|
||||
$edit_own = ($jemsettings->eventowner == 1) && $owner;
|
||||
break;
|
||||
case 'venue':
|
||||
$create = ($jemsettings->deliverlocsyes == -1);
|
||||
$edit = ($jemsettings->venueedit == -1);
|
||||
$edit_own = ($jemsettings->venueowner == 1) && $owner;
|
||||
break;
|
||||
default:
|
||||
$create = $edit = $edit_own = false;
|
||||
break;
|
||||
}
|
||||
|
||||
// Get all JEM groups with requested permissions and user is member of.
|
||||
$jemgroups = empty($fields) ? array() : $this->getJemGroups($fields);
|
||||
// If registered users are generally allowed (by JEM Settings) to edit events/venues
|
||||
// add JEM group 0 and make category check
|
||||
if (($create && in_array('add', $action)) || (($edit || $edit_own) && in_array('edit', $action))) {
|
||||
$jemgroups[0] = true;
|
||||
}
|
||||
}
|
||||
|
||||
$disable = '';
|
||||
$where = $ignore_access ? '' : ' AND c.access IN (' . implode(',', $this->getAuthorisedViewLevels()) . ')';
|
||||
|
||||
if (!empty($jemgroups)) {
|
||||
if ($use_disable) {
|
||||
$disable = ', IF (c.groupid IN (' . implode(',', array_keys($jemgroups)) . '), 0, 1) AS disable';
|
||||
} else {
|
||||
$where .= ' AND c.groupid IN (' . implode(',', array_keys($jemgroups)) . ')';
|
||||
}
|
||||
}
|
||||
|
||||
// We have to check ALL categories, also those not seen by user.
|
||||
$db = Factory::getContainer()->get('DatabaseDriver');
|
||||
$query = 'SELECT DISTINCT c.*' . $disable
|
||||
. ' FROM #__jem_categories AS c'
|
||||
. ' WHERE c.published = 1'
|
||||
. $where
|
||||
. ' ORDER BY c.lft';
|
||||
$db->setQuery( $query );
|
||||
$cats = $db->loadObjectList('id');
|
||||
|
||||
return $cats;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if user is allowed to do actions on objects.
|
||||
* Respects Joomla and JEM group permissions.
|
||||
*
|
||||
* @param $action mixed One or array of 'add', 'edit', 'publish', 'delete'
|
||||
* @param $type string One of 'event', 'venue'
|
||||
* @param $id mixed The event or venue id or false (default)
|
||||
* @param $created_by mixed User id of creator or false (default)
|
||||
* @param $categoryIds mixed List of category IDs to limit for or false (default)
|
||||
* @return true if allowed, false otherwise
|
||||
* @note If nno categoryIds are given this functions checks if there is any potential way
|
||||
* to allow requested action. To prevent this check set categoryIds to 1 (root category)
|
||||
*/
|
||||
public function can($action, $type, $id = false, $created_by = false, $categoryIds = false)
|
||||
{
|
||||
$userId = (int)$this->id;
|
||||
|
||||
// guests are not allowed to do anything except looking
|
||||
if (empty($userId) || $this->get('guest', 0)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$action = (array)$action;
|
||||
|
||||
if (!empty($categoryIds)) {
|
||||
$categoryIds = (array)$categoryIds;
|
||||
$catIds = array();
|
||||
foreach ($categoryIds as $catId) {
|
||||
if ((int)$catId > 0) { // allow 'root' category with which caller can skip "potentially allowed" check
|
||||
$catIds[] = (int)$catId;
|
||||
}
|
||||
}
|
||||
$categoryIds = $catIds; // non-zero integers
|
||||
} else {
|
||||
$categoryIds = array();
|
||||
}
|
||||
|
||||
$created_by = (int)$created_by;
|
||||
$id = ($id === false) ? $id : (int)$id;
|
||||
$asset = 'com_jem';
|
||||
$jemsettings = JemHelper::config();
|
||||
|
||||
switch ($type) {
|
||||
case 'event':
|
||||
$create = ($jemsettings->delivereventsyes == -1);
|
||||
$edit = ($jemsettings->eventedit == -1);
|
||||
$edit_own = ($jemsettings->eventowner == 1);
|
||||
$autopubl = ($jemsettings->autopubl == -1); // auto-publish new events
|
||||
// not supported yet
|
||||
//if (!empty($id)) {
|
||||
// $asset .= '.event.' . $id;
|
||||
//}
|
||||
break;
|
||||
case 'venue':
|
||||
$create = ($jemsettings->deliverlocsyes == -1);
|
||||
$edit = ($jemsettings->venueedit == -1);
|
||||
$edit_own = ($jemsettings->venueowner == 1);
|
||||
$autopubl = ($jemsettings->autopublocate == -1); // auto-publish new venues
|
||||
// not supported yet
|
||||
//if (!empty($id)) {
|
||||
// $asset .= '.venue.' . $id;
|
||||
//}
|
||||
break;
|
||||
default:
|
||||
$create = $edit = $edit_own = $autopubl = false;
|
||||
break;
|
||||
}
|
||||
$assets[] = $asset;
|
||||
// not supported yet
|
||||
//foreach($categoryIds as $catId) {
|
||||
// $assets[] = 'com_jem.category.'.$catId;
|
||||
//}
|
||||
|
||||
// Joomla ACL system, JEM global settings
|
||||
|
||||
$authorised = false;
|
||||
foreach ($assets as $asset) {
|
||||
if ($authorised) { break; }
|
||||
$authorised |= (boolean)$this->authorise('core.manage', $asset);
|
||||
|
||||
foreach ($action as $act) {
|
||||
if ($authorised) { break; }
|
||||
switch ($act) {
|
||||
case 'add':
|
||||
$authorised |= $create || $this->authorise('core.create', $asset);
|
||||
break;
|
||||
case 'edit':
|
||||
$authorised |= $this->authorise('core.edit', $asset); // $edit is limited to events not attached to jem groups
|
||||
// user is owner and edit-own is enabled
|
||||
$authorised |= ($edit_own || $this->authorise('core.edit.own', $asset)) &&
|
||||
!empty($created_by) && ($userId == $created_by);
|
||||
break;
|
||||
case 'publish':
|
||||
$authorised |= $this->authorise('core.edit.state', $asset);
|
||||
// user is creator of new item and auto-publish is enabled
|
||||
$authorised |= $autopubl && ($id === 0) &&
|
||||
(empty($created_by) || ($userId == $created_by));
|
||||
// user is creator, can edit this item and auto-publish is enabled
|
||||
// (that's because we allowed user to not publish new item with auto-puplish enabled)
|
||||
$authorised |= $autopubl && ($edit || $edit_own) && ($id !== 0) &&
|
||||
!empty($created_by) && ($userId == $created_by);
|
||||
break;
|
||||
case 'delete':
|
||||
$authorised |= $this->authorise('core.delete', $asset);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// JEM User groups
|
||||
if (!$authorised) {
|
||||
if (($type == 'event') || ($type == 'venue')) {
|
||||
$fields = array();
|
||||
foreach ($action as $act) {
|
||||
switch ($act) {
|
||||
case 'add':
|
||||
case 'edit':
|
||||
case 'publish':
|
||||
$fields[] = $act.$type;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// Get all JEM groups with requested permissions and user is member of.
|
||||
$jemgroups = empty($fields) ? array() : $this->getJemGroups($fields);
|
||||
// If registered users are generally allowed (by JEM Settings) to edit events/venues
|
||||
// add JEM group 0 and make category check
|
||||
if ($edit && (in_array('edit', $action))) {
|
||||
$jemgroups[0] = true;
|
||||
}
|
||||
if (!empty($jemgroups)) {
|
||||
if (empty($categoryIds) && (($type != 'event') || (empty($id) && (!in_array('publish', $action))))) {
|
||||
$authorised = true; // new events and venues have no limiting categories, so generally authorised
|
||||
} else { // we have a valid event object so check event's categories against jem groups
|
||||
$whereCats = empty($categoryIds) ? '' : ' AND c.id IN ('.implode(',', $categoryIds).')';
|
||||
|
||||
$levels = $this->getAuthorisedViewLevels();
|
||||
// We have to check ALL categories, also those not seen by user.
|
||||
$db = Factory::getContainer()->get('DatabaseDriver');
|
||||
$query = 'SELECT DISTINCT c.id, c.groupid, c.access'
|
||||
. ' FROM #__jem_categories AS c';
|
||||
if (!empty($id)) {
|
||||
$query .= ' LEFT JOIN #__jem_cats_event_relations AS rel ON rel.catid = c.id'
|
||||
. ' WHERE rel.itemid = ' . $id
|
||||
. ' AND c.published = 1';
|
||||
} else {
|
||||
$query .= ' WHERE c.published = 1';
|
||||
}
|
||||
$query .= $whereCats;
|
||||
$db->setQuery( $query );
|
||||
$cats = $db->loadObjectList();
|
||||
}
|
||||
|
||||
if (!empty($cats)) {
|
||||
$unspecific = in_array('publish', $action) ? -1 : 0; // publish requires jemgroup
|
||||
foreach($cats as $cat) {
|
||||
if (empty($cat->groupid)) {
|
||||
if ($unspecific === 0) {
|
||||
$unspecific = 1;
|
||||
}
|
||||
} else {
|
||||
$unspecific = -1; // at least one group assigned so group permissions take precedence
|
||||
if (in_array($cat->access, $levels) && array_key_exists($cat->groupid, $jemgroups)) {
|
||||
// user can "see" this category and is member of connected jem group granting permission
|
||||
$authorised = true;
|
||||
break; // foreach cats
|
||||
}
|
||||
}
|
||||
}
|
||||
if ($unspecific === 1) {
|
||||
// only categories without connected JEM group found, so user is authorised
|
||||
$authorised = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return (bool)$authorised;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* JEM user class with additional functions.
|
||||
* Compatible with Joomla since 3.4.0.
|
||||
*
|
||||
* @package JEM
|
||||
*
|
||||
* @see JemUserAbstract
|
||||
*/
|
||||
class JemUser extends JemUserAbstract
|
||||
{
|
||||
static function getInstance($id = 0, JUserWrapperHelper $userHelper = null)
|
||||
{
|
||||
// we don't need this helper
|
||||
return parent::_getInstance($id);
|
||||
}
|
||||
}
|
||||
118
components/com_jem/classes/view.class.php
Normal file
118
components/com_jem/classes/view.class.php
Normal file
@ -0,0 +1,118 @@
|
||||
<?php
|
||||
/**
|
||||
* @package JEM
|
||||
* @copyright (C) 2013-2024 joomlaeventmanager.net
|
||||
* @license https://www.gnu.org/licenses/gpl-3.0 GNU/GPL
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\MVC\View\HtmlView;
|
||||
|
||||
/**
|
||||
* JemView class with JEM specific extensions
|
||||
*
|
||||
* @package JEM
|
||||
*/
|
||||
class JemView extends HtmlView
|
||||
{
|
||||
/**
|
||||
* Layout style suffix
|
||||
*
|
||||
* @var string
|
||||
* @since 2.3
|
||||
*/
|
||||
protected $_layoutStyleSuffix = null;
|
||||
|
||||
public function __construct($config = array())
|
||||
{
|
||||
parent::__construct($config);
|
||||
|
||||
// additional path for layout style + corresponding override path
|
||||
$suffix = JemHelper::getLayoutStyleSuffix();
|
||||
if (!empty($suffix)) {
|
||||
$this->_layoutStyleSuffix = $suffix;
|
||||
if (is_dir($this->_basePath . '/view')) {
|
||||
$this->addTemplatePath($this->_basePath . '/view/' . $this->getName() . '/tmpl/' . $suffix);
|
||||
}
|
||||
else {
|
||||
$this->addTemplatePath($this->_basePath . '/views/' . $this->getName() . '/tmpl/' . $suffix);
|
||||
}
|
||||
$this->addTemplatePath(JPATH_THEMES . '/' . Factory::getApplication()->getTemplate() . '/html/com_jem/' . $this->getName() . '/' . $suffix);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a row to data indicating even/odd row number
|
||||
*
|
||||
* @return object $rows
|
||||
*/
|
||||
public function getRows($rowname = "rows")
|
||||
{
|
||||
if (!isset($this->$rowname) || !is_array($this->$rowname) || !count($this->$rowname)) {
|
||||
return;
|
||||
}
|
||||
|
||||
$k = 0;
|
||||
foreach($this->$rowname as $row) {
|
||||
$row->odd = $k;
|
||||
$k = 1 - $k;
|
||||
}
|
||||
|
||||
return $this->$rowname;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add path for common templates.
|
||||
*/
|
||||
protected function addCommonTemplatePath()
|
||||
{
|
||||
// additional path for list part + corresponding override path
|
||||
$this->addTemplatePath(JPATH_COMPONENT.'/common/views/tmpl');
|
||||
$this->addTemplatePath(JPATH_THEMES . '/' . Factory::getApplication()->getTemplate() . '/html/com_jem/common');
|
||||
|
||||
if (!empty($this->_layoutStyleSuffix)) {
|
||||
$this->addTemplatePath(JPATH_COMPONENT.'/common/views/tmpl/'.$this->_layoutStyleSuffix);
|
||||
$this->addTemplatePath(JPATH_THEMES . '/' . Factory::getApplication()->getTemplate() . '/html/com_jem/common/'.$this->_layoutStyleSuffix);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Prepares the document.
|
||||
*/
|
||||
protected function prepareDocument()
|
||||
{
|
||||
$app = Factory::getApplication();
|
||||
$menus = $app->getMenu();
|
||||
$menu = $menus->getActive();
|
||||
$print = $app->input->getBool('print', false);
|
||||
|
||||
if ($print) {
|
||||
JemHelper::loadCss('print');
|
||||
$this->document->setMetaData('robots', 'noindex, nofollow');
|
||||
}
|
||||
|
||||
if ($menu) {
|
||||
$this->params->def('page_heading', $this->params->get('page_title', $menu->title));
|
||||
} else {
|
||||
// TODO
|
||||
$this->params->def('page_heading', Text::_('COM_JEM_DEFAULT_PAGE_TITLE_DAY'));
|
||||
}
|
||||
|
||||
$title = $this->params->get('page_title', '');
|
||||
|
||||
if (empty($title)) {
|
||||
$title = $app->get('sitename');
|
||||
} elseif ($app->get('sitename_pagetitles', 0) == 1) {
|
||||
$title = Text::sprintf('JPAGETITLE', $app->get('sitename'), $title);
|
||||
} elseif ($app->get('sitename_pagetitles', 0) == 2) {
|
||||
$title = Text::sprintf('JPAGETITLE', $title, $app->get('sitename'));
|
||||
}
|
||||
$this->document->setTitle($title);
|
||||
|
||||
// TODO: Metadata
|
||||
$this->document->setMetadata('keywords', $this->params->get('page_title'));
|
||||
}
|
||||
}
|
||||
1
components/com_jem/common/index.html
Normal file
1
components/com_jem/common/index.html
Normal file
@ -0,0 +1 @@
|
||||
<!DOCTYPE html><title></title>
|
||||
1
components/com_jem/common/views/index.html
Normal file
1
components/com_jem/common/views/index.html
Normal file
@ -0,0 +1 @@
|
||||
<!DOCTYPE html><title></title>
|
||||
@ -0,0 +1,235 @@
|
||||
<?php
|
||||
/**
|
||||
* @version 2.3.6
|
||||
* @package JEM
|
||||
* @copyright (C) 2013-2021 joomlaeventmanager.net
|
||||
* @copyright (C) 2005-2009 Christoph Lukes
|
||||
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
JHtml::_('behavior.tooltip');
|
||||
?>
|
||||
|
||||
<script type="text/javascript">
|
||||
function tableOrdering(order, dir, view)
|
||||
{
|
||||
var form = document.getElementById("adminForm");
|
||||
|
||||
form.filter_order.value = order;
|
||||
form.filter_order_Dir.value = dir;
|
||||
form.submit(view);
|
||||
}
|
||||
</script>
|
||||
|
||||
<script type="text/javascript">
|
||||
function fullOrdering(id, view)
|
||||
{
|
||||
var form = document.getElementById("adminForm");
|
||||
var field = form.getElementById(id);
|
||||
var parts = field.value.split(' ');
|
||||
|
||||
if (parts.length > 1) {
|
||||
form.filter_order.value = parts[0];
|
||||
form.filter_order_Dir.value = parts[1];
|
||||
}
|
||||
form.submit(view);
|
||||
}
|
||||
</script>
|
||||
|
||||
<?php
|
||||
$sort_by = array();
|
||||
|
||||
$sort_by[] = JHtml::_('select.option', 'a.dates ASC', JText::_('COM_JEM_DATE') . ' ' . JText::_('COM_JEM_ORDER_ASCENDING'));
|
||||
$sort_by[] = JHtml::_('select.option', 'a.dates DESC', JText::_('COM_JEM_DATE') . ' ' . JText::_('COM_JEM_ORDER_DESCENDING'));
|
||||
|
||||
if ($this->jemsettings->showtitle == 1) {
|
||||
$sort_by[] = JHtml::_('select.option', 'a.title ASC', JText::_('COM_JEM_TITLE') . ' ' . JText::_('COM_JEM_ORDER_ASCENDING'));
|
||||
$sort_by[] = JHtml::_('select.option', 'a.title DESC', JText::_('COM_JEM_TITLE') . ' ' . JText::_('COM_JEM_ORDER_DESCENDING'));
|
||||
}
|
||||
if ($this->jemsettings->showlocate == 1) {
|
||||
$sort_by[] = JHtml::_('select.option', 'l.venue ASC', JText::_('COM_JEM_VENUE') . ' ' . JText::_('COM_JEM_ORDER_ASCENDING'));
|
||||
$sort_by[] = JHtml::_('select.option', 'l.venue DESC', JText::_('COM_JEM_VENUE') . ' ' . JText::_('COM_JEM_ORDER_DESCENDING'));
|
||||
}
|
||||
if ($this->jemsettings->showcity == 1) {
|
||||
$sort_by[] = JHtml::_('select.option', 'l.city ASC', JText::_('COM_JEM_CITY') . ' ' . JText::_('COM_JEM_ORDER_ASCENDING'));
|
||||
$sort_by[] = JHtml::_('select.option', 'l.city DESC', JText::_('COM_JEM_CITY') . ' ' . JText::_('COM_JEM_ORDER_DESCENDING'));
|
||||
}
|
||||
if ($this->jemsettings->showstate == 1) {
|
||||
$sort_by[] = JHtml::_('select.option', 'l.state ASC', JText::_('COM_JEM_STATE') . ' ' . JText::_('COM_JEM_ORDER_ASCENDING'));
|
||||
$sort_by[] = JHtml::_('select.option', 'l.state DESC', JText::_('COM_JEM_STATE') . ' ' . JText::_('COM_JEM_ORDER_DESCENDING'));
|
||||
}
|
||||
if ($this->jemsettings->showcat == 1) {
|
||||
$sort_by[] = JHtml::_('select.option', 'c.catname ASC', JText::_('COM_JEM_CATEGORY') . ' ' . JText::_('COM_JEM_ORDER_ASCENDING'));
|
||||
$sort_by[] = JHtml::_('select.option', 'c.catname DESC', JText::_('COM_JEM_CATEGORY') . ' ' . JText::_('COM_JEM_ORDER_DESCENDING'));
|
||||
}
|
||||
$this->lists['sort_by'] = JHtml::_('select.genericlist', $sort_by, 'sort_by', array('size'=>'1','class'=>'inputbox','onchange'=>'fullOrdering(\'sort_by\', \'\');'), 'value', 'text', $this->lists['order'] . ' ' . $this->lists['order_Dir']);
|
||||
?>
|
||||
|
||||
<?php if ($this->settings->get('global_show_filter',1) || $this->settings->get('global_display',1)) : ?>
|
||||
<div id="jem_filter" class="floattext">
|
||||
<?php if ($this->settings->get('global_show_filter',1)) : ?>
|
||||
<div class="jem_fleft">
|
||||
<label for="filter"><?php echo JText::_('COM_JEM_FILTER'); ?></label>
|
||||
<?php echo $this->lists['filter'].' '; ?>
|
||||
<input type="text" name="filter_search" id="filter_search" value="<?php echo $this->lists['search'];?>" class="inputbox" onchange="document.adminForm.submit();" />
|
||||
<button class="buttonfilter" type="submit"><?php echo JText::_('JSEARCH_FILTER_SUBMIT'); ?></button>
|
||||
<button class="buttonfilter" type="button" onclick="document.id('filter_search').value='';this.form.submit();"><?php echo JText::_('JSEARCH_FILTER_CLEAR'); ?></button>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($this->settings->get('global_display',1)) : ?>
|
||||
<div class="jem_fright">
|
||||
<label for="sort_by"><?php echo JText::_('COM_JEM_ORDERING'); ?></label>
|
||||
<?php echo $this->lists['sort_by'].' '; ?>
|
||||
<label for="limit"><?php echo JText::_('COM_JEM_DISPLAY_NUM'); ?></label>
|
||||
<?php echo $this->pagination->getLimitBox(); ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php
|
||||
$hide = (array_key_exists('hide', $this->lists)) ? $this->lists['hide'] : array();
|
||||
// calculate span of columns to show, summary must be 12
|
||||
$default_span = array('date' => 2, 'title' => 3, 'venue' => 3, 'category' => 2, 'attendees' => 2);
|
||||
$a_span = array('date' => $default_span['date']); // always shown
|
||||
if ($this->jemsettings->showtitle == 1) {
|
||||
$a_span['title'] = $default_span['title'];
|
||||
}
|
||||
if (!array_key_exists('venue', $hide) && (($this->jemsettings->showlocate == 1) || ($this->jemsettings->showcity == 1) || ($this->jemsettings->showstate == 1))) {
|
||||
$a_span['venue'] = $default_span['venue'];
|
||||
}
|
||||
if (!array_key_exists('category', $hide) && ($this->jemsettings->showcat == 1)) {
|
||||
$a_span['category'] = $default_span['category'];
|
||||
}
|
||||
if (!array_key_exists('attendees', $hide) && ($this->jemsettings->showatte == 1)) {
|
||||
$a_span['attendees'] = $default_span['attendees'];
|
||||
}
|
||||
$total = array_sum($a_span);
|
||||
if (!array_key_exists('title', $a_span) && !array_key_exists('venue', $a_span) && !array_key_exists('category', $a_span)) {
|
||||
$a_span['date'] += 12 - $total;
|
||||
} else {
|
||||
while ($total < 12) {
|
||||
if (array_key_exists('title', $a_span)) {
|
||||
++$a_span['title'];
|
||||
++$total;
|
||||
}
|
||||
if ($total < 12 && ($a_span['date'] <= $default_span['date'])) {
|
||||
++$a_span['date'];
|
||||
++$total;
|
||||
}
|
||||
if (($total < 12) && array_key_exists('venue', $a_span)) {
|
||||
++$a_span['venue'];
|
||||
++$total;
|
||||
}
|
||||
if (($total < 12) && array_key_exists('category', $a_span)) {
|
||||
++$a_span['category'];
|
||||
++$total;
|
||||
}
|
||||
} // while
|
||||
}
|
||||
?>
|
||||
<div class="eventtable">
|
||||
<div class="row-fluid sectiontableheader">
|
||||
<div class="span<?php echo $a_span['date']; ?>"><?php echo JText::_('COM_JEM_TABLE_DATE'); ?></div>
|
||||
<?php if (array_key_exists('title', $a_span)) : ?>
|
||||
<div class="span<?php echo $a_span['title']; ?>"><?php echo JText::_('COM_JEM_TABLE_TITLE'); ?></div>
|
||||
<?php endif; ?>
|
||||
<?php if (array_key_exists('venue', $a_span)) : ?>
|
||||
<div class="span<?php echo $a_span['venue']; ?>"><?php echo JText::_('COM_JEM_TABLE_LOCATION'); ?></div>
|
||||
<?php endif; ?>
|
||||
<?php if (array_key_exists('category', $a_span)) : ?>
|
||||
<div class="span<?php echo $a_span['category']; ?>"><?php echo JText::_('COM_JEM_TABLE_CATEGORY'); ?></div>
|
||||
<?php endif; ?>
|
||||
<?php if (array_key_exists('attendees', $a_span)) : ?>
|
||||
<div class="span<?php echo $a_span['attendees']; ?>"><?php echo JText::_('COM_JEM_TABLE_ATTENDEES'); ?></div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
||||
<?php if (empty($this->rows)) : ?>
|
||||
<div class="row-fluid sectiontableentry<?php echo $this->params->get('pageclass_sfx'); ?>" >
|
||||
<div class="span12">
|
||||
<strong><i><?php echo JText::_('COM_JEM_NO_EVENTS'); ?></i></strong>
|
||||
</div>
|
||||
</div>
|
||||
<?php else : ?>
|
||||
<?php foreach ($this->rows as $row) : ?>
|
||||
<?php if (!empty($row->featured)) : ?>
|
||||
<div class="row-fluid sectiontableentry featured featured<?php echo $row->id.$this->params->get('pageclass_sfx'); ?>" itemscope="itemscope" itemtype="https://schema.org/Event">
|
||||
<?php else : ?>
|
||||
<div class="row-fluid sectiontableentry<?php echo $this->params->get('pageclass_sfx'); ?>" itemscope="itemscope" itemtype="https://schema.org/Event">
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="span<?php echo $a_span['date']; ?> date">
|
||||
<?php
|
||||
echo JemOutput::formatShortDateTime($row->dates, $row->times, $row->enddates, $row->endtimes, $this->jemsettings->showtime);
|
||||
echo JemOutput::formatSchemaOrgDateTime($row->dates, $row->times, $row->enddates, $row->endtimes);
|
||||
?>
|
||||
</div>
|
||||
|
||||
<?php if (array_key_exists('title', $a_span)) : ?>
|
||||
<div class="span<?php echo $a_span['title']; ?>">
|
||||
<?php if (($this->jemsettings->showeventimage == 1) && !empty($row->datimage)) : ?>
|
||||
<div class="image">
|
||||
<?php echo JemOutput::flyer($row, JemImage::flyercreator($row->datimage, 'event'), 'event'); ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php if ($this->jemsettings->showdetails == 1) : ?>
|
||||
<div class="event">
|
||||
<a href="<?php echo JRoute::_(JemHelperRoute::getEventRoute($row->slug)); ?>" itemprop="url">
|
||||
<span itemprop="name"><?php echo $this->escape($row->title) . JemOutput::recurrenceicon($row); ?></span>
|
||||
</a><?php echo JemOutput::publishstateicon($row); ?>
|
||||
</div>
|
||||
<?php else : ?>
|
||||
<div class="event" itemprop="name">
|
||||
<?php echo $this->escape($row->title) . JemOutput::recurrenceicon($row) . JemOutput::publishstateicon($row); ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if (array_key_exists('venue', $a_span)) : ?>
|
||||
<div class="span<?php echo $a_span['venue']; ?> venue">
|
||||
<?php
|
||||
$venue = array();
|
||||
if ($this->jemsettings->showlocate == 1) {
|
||||
if (!empty($row->venue)) {
|
||||
if (($this->jemsettings->showlinkvenue == 1) && !empty($row->venueslug)) {
|
||||
$venue[] = "<a href='".JRoute::_(JemHelperRoute::getVenueRoute($row->venueslug))."'>".$this->escape($row->venue)."</a>";
|
||||
} else {
|
||||
$venue[] = $this->escape($row->venue);
|
||||
}
|
||||
} else {
|
||||
$venue[] = '-';
|
||||
}
|
||||
}
|
||||
// if no city skip if also no state, else add hyphen
|
||||
if (($this->jemsettings->showcity == 1) && (!empty($row->city) || !empty($row->state))) {
|
||||
$venue[] = !empty($row->city) ? $this->escape($row->city) : '-';
|
||||
}
|
||||
if (($this->jemsettings->showstate == 1) && !empty($row->state)) {
|
||||
$venue[] = $this->escape($row->state);
|
||||
}
|
||||
echo implode(', ', $venue);
|
||||
?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if (array_key_exists('category', $a_span)) : ?>
|
||||
<div class="span<?php echo $a_span['category']; ?> category">
|
||||
<?php echo implode(", ", JemOutput::getCategoryList($row->categories, $this->jemsettings->catlinklist)); ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if (array_key_exists('attendees', $a_span)) : ?>
|
||||
<div class="span<?php echo $a_span['attendees']; ?> users">
|
||||
<?php echo !empty($row->regCount) ? $this->escape($row->regCount) : '-'; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
<?php endif; /* noevents */ ?>
|
||||
</div>
|
||||
|
||||
47
components/com_jem/common/views/tmpl/default_attachments.php
Normal file
47
components/com_jem/common/views/tmpl/default_attachments.php
Normal file
@ -0,0 +1,47 @@
|
||||
<?php
|
||||
/**
|
||||
* @package JEM
|
||||
* @copyright (C) 2013-2024 joomlaeventmanager.net
|
||||
* @copyright (C) 2005-2009 Christoph Lukes
|
||||
* @license https://www.gnu.org/licenses/gpl-3.0 GNU/GPL
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\HTML\HTMLHelper;
|
||||
use Joomla\CMS\Session\Session;
|
||||
?>
|
||||
|
||||
<?php if (isset($this->attachments) && is_array($this->attachments) && (count($this->attachments) > 0)) : ?>
|
||||
<div class="files">
|
||||
<h2 class="description"><?php echo Text::_('COM_JEM_FILES'); ?></h2>
|
||||
<table class="file">
|
||||
<tbody>
|
||||
<?php foreach ($this->attachments as $file) : ?>
|
||||
<tr>
|
||||
<td>
|
||||
<?php
|
||||
$overlib = Text::_('COM_JEM_FILE').': '.$this->escape($file->file);
|
||||
if (!empty($file->name)) {
|
||||
$overlib .= '<BR />'.Text::_('COM_JEM_FILE_NAME').': '.$this->escape($file->name);
|
||||
}
|
||||
if (!empty($file->description)) {
|
||||
$overlib .= '<BR />'.Text::_('COM_JEM_FILE_DESCRIPTION').': '.$this->escape($file->description);
|
||||
}
|
||||
?>
|
||||
<span <?php echo JEMOutput::tooltip(Text::_('COM_JEM_DOWNLOAD'), $overlib, 'file-dl-icon file-name'); ?>>
|
||||
<?php
|
||||
$filename = $this->escape($file->name ? $file->name : $file->file);
|
||||
$image = HTMLHelper::_('image','com_jem/download_16.png', Text::_('COM_JEM_DOWNLOAD'),NULL,true)." "."<span class=file-name>".$filename."</span>";
|
||||
$attribs = array('class'=>'file-name');
|
||||
echo HTMLHelper::_('link','index.php?option=com_jem&task=getfile&format=raw&file='.$file->id.'&'.Session::getFormToken().'=1',$image,$attribs);
|
||||
?>
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<?php endif;
|
||||
@ -0,0 +1,54 @@
|
||||
<?php
|
||||
/**
|
||||
* @package JEM
|
||||
* @copyright (C) 2013-2024 joomlaeventmanager.net
|
||||
* @copyright (C) 2005-2009 Christoph Lukes
|
||||
* @license https://www.gnu.org/licenses/gpl-3.0 GNU/GPL
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\HTML\HTMLHelper;
|
||||
use Joomla\CMS\Session\Session;
|
||||
?>
|
||||
<fieldset class="jem_fldst_attachments">
|
||||
<legend><?php echo Text::_('COM_JEM_EVENT_ATTACHMENTS_TAB'); ?></legend>
|
||||
<table class="adminform" id="el-attachments">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="width:25%"><?php echo Text::_('COM_JEM_ATTACHMENT_FILE'); ?></th>
|
||||
<th style="width:15%"><?php echo Text::_('COM_JEM_ATTACHMENT_NAME'); ?></th>
|
||||
<th style="width:40%"><?php echo Text::_('COM_JEM_ATTACHMENT_DESCRIPTION'); ?></th>
|
||||
<th style="width:20px"><?php echo Text::_('COM_JEM_ATTACHMENT_ACCESS'); ?></th>
|
||||
<th style="width:5px"> </th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach ($this->row->attachments as $file): ?>
|
||||
<tr>
|
||||
<td><?php echo wordwrap($file->file, 30, "<br>", true); ?><input style="width:200px" type="hidden" name="attached-id[]" value="<?php echo $file->id; ?>"/></td>
|
||||
<td><input type="text" name="attached-name[]" value="<?php echo $file->name; ?>" style="width:100px" /></td>
|
||||
<td><input type="text" name="attached-desc[]" value="<?php echo $file->description; ?>" style="width:100px" /></td>
|
||||
<td><?php echo HTMLHelper::_('select.genericlist', $this->access, 'attached-access[]', array('class'=>'inputbox','style'=>'width:100px;','size'=>'3'), 'value', 'text', $file->access); ?></td>
|
||||
<td><?php echo JemOutput::removebutton(Text::_('COM_JEM_GLOBAL_REMOVE_ATTACHEMENT'), array('id' => 'attach-remove'.$file->id.':'.Session::getFormToken(),'class' => 'attach-remove','title'=>Text::_('COM_JEM_GLOBAL_REMOVE_ATTACHEMENT'))); ?></td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
<tr>
|
||||
<td>
|
||||
<input type="file" name="attach[]" class="attach-field" size="10" style="width:200px"></input>
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" name="attach-name[]" value="" />
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" name="attach-desc[]" value="" />
|
||||
</td>
|
||||
<td>
|
||||
<?php echo HTMLHelper::_('select.genericlist', $this->access, 'attach-access[]', array('class'=>'inputbox','style'=>'width:100px;','size'=>'3'), 'value', 'text', 0); ?>
|
||||
</td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</fieldset>
|
||||
208
components/com_jem/common/views/tmpl/default_events_table.php
Normal file
208
components/com_jem/common/views/tmpl/default_events_table.php
Normal file
@ -0,0 +1,208 @@
|
||||
<?php
|
||||
/**
|
||||
* @package JEM
|
||||
* @copyright (C) 2013-2024 joomlaeventmanager.net
|
||||
* @copyright (C) 2005-2009 Christoph Lukes
|
||||
* @license https://www.gnu.org/licenses/gpl-3.0 GNU/GPL
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\HTML\HTMLHelper;
|
||||
use Joomla\CMS\Router\Route;
|
||||
|
||||
?>
|
||||
|
||||
<script>
|
||||
function tableOrdering(order, dir, view)
|
||||
{
|
||||
var form = document.getElementById("adminForm");
|
||||
|
||||
form.filter_order.value = order;
|
||||
form.filter_order_Dir.value = dir;
|
||||
form.submit(view);
|
||||
}
|
||||
</script>
|
||||
|
||||
<?php if ($this->settings->get('global_show_filter',1) || $this->settings->get('global_display',1)) : ?>
|
||||
<div id="jem_filter" class="floattext">
|
||||
<?php if ($this->settings->get('global_show_filter',1)) : ?>
|
||||
<div class="jem_fleft">
|
||||
<?php echo $this->lists['filter'].' '; ?>
|
||||
<input type="text" name="filter_search" id="filter_search" class="inputbox form-control" value="<?php echo $this->lists['search'];?>" onchange="document.adminForm.submit();" />
|
||||
<label for="filter_month"><?php echo Text::_('COM_JEM_SEARCH_MONTH'); ?></label>
|
||||
<input type="month" name="filter_month" id="filter_month" pattern="[0-9]{4}-[0-9]{2}" title="<?php echo Text::_('COM_JEM_SEARCH_YYYY-MM_FORMAT'); ?>" required class="inputbox form-control" placeholder="<?php echo Text::_('COM_JEM_SEARCH_YYYY-MM'); ?>" size="7" value="<?php echo $this->lists['month'] ?? '';?>">
|
||||
<button class="btn btn-primary" type="submit"><?php echo Text::_('JSEARCH_FILTER_SUBMIT'); ?></button>
|
||||
<button class="btn btn-secondary" type="button" onclick="document.getElementById('filter_search').value='';document.getElementById('filter_month').value='';this.form.submit();"><?php echo Text::_('JSEARCH_FILTER_CLEAR'); ?></button>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($this->settings->get('global_display',1)) : ?>
|
||||
<div class="jem_fright">
|
||||
<label for="limit"><?php echo Text::_('COM_JEM_DISPLAY_NUM'); ?></label>
|
||||
<?php echo $this->pagination->getLimitBox(); ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="eventtable table table-striped" style="width:<?php echo !empty($this->jemsettings->tablewidth) ? $this->jemsettings->tablewidth : '100%'; ?>;">
|
||||
<colgroup>
|
||||
<?php if ($this->jemsettings->showeventimage == 1) : ?>
|
||||
<col style="width:<?php echo $this->jemsettings->tableeventimagewidth; ?>" class="jem_col_event_image" />
|
||||
<?php endif; ?>
|
||||
<col style="width:<?php echo $this->jemsettings->datewidth; ?>" class="jem_col_date" />
|
||||
<?php if ($this->jemsettings->showtitle == 1) : ?>
|
||||
<col style="width:<?php echo $this->jemsettings->titlewidth; ?>" class="jem_col_title" />
|
||||
<?php endif; ?>
|
||||
<?php if ($this->jemsettings->showlocate == 1) : ?>
|
||||
<col style="width:<?php echo $this->jemsettings->locationwidth; ?>" class="jem_col_venue" />
|
||||
<?php endif; ?>
|
||||
<?php if ($this->jemsettings->showcity == 1) : ?>
|
||||
<col style="width:<?php echo $this->jemsettings->citywidth; ?>" class="jem_col_city" />
|
||||
<?php endif; ?>
|
||||
<?php if ($this->jemsettings->showstate == 1) : ?>
|
||||
<col style="width:<?php echo $this->jemsettings->statewidth; ?>" class="jem_col_state" />
|
||||
<?php endif; ?>
|
||||
<?php if ($this->jemsettings->showcat == 1) : ?>
|
||||
<col style="width:<?php echo $this->jemsettings->catfrowidth; ?>" class="jem_col_category" />
|
||||
<?php endif; ?>
|
||||
<?php if ($this->jemsettings->showatte == 1) : ?>
|
||||
<col style="width:<?php echo $this->jemsettings->attewidth; ?>" class="jem_col_attendees" />
|
||||
<?php endif; ?>
|
||||
</colgroup>
|
||||
|
||||
<thead>
|
||||
<tr>
|
||||
<?php if ($this->jemsettings->showeventimage == 1) : ?>
|
||||
<th id="jem_eventimage" class="sectiontableheader"><?php echo Text::_('COM_JEM_TABLE_EVENTIMAGE'); ?></th>
|
||||
<?php endif; ?>
|
||||
<th id="jem_date" class="sectiontableheader"><?php echo HTMLHelper::_('grid.sort', 'COM_JEM_TABLE_DATE', 'a.dates', $this->lists['order_Dir'], $this->lists['order']); ?></th>
|
||||
<?php if ($this->jemsettings->showtitle == 1) : ?>
|
||||
<th id="jem_title" class="sectiontableheader"><?php echo HTMLHelper::_('grid.sort', 'COM_JEM_TABLE_TITLE', 'a.title', $this->lists['order_Dir'], $this->lists['order']); ?></th>
|
||||
<?php endif; ?>
|
||||
<?php if ($this->jemsettings->showlocate == 1) : ?>
|
||||
<th id="jem_location" class="sectiontableheader"><?php echo HTMLHelper::_('grid.sort', 'COM_JEM_TABLE_LOCATION', 'l.venue', $this->lists['order_Dir'], $this->lists['order']); ?></th>
|
||||
<?php endif; ?>
|
||||
<?php if ($this->jemsettings->showcity == 1) : ?>
|
||||
<th id="jem_city" class="sectiontableheader"><?php echo HTMLHelper::_('grid.sort', 'COM_JEM_TABLE_CITY', 'l.city', $this->lists['order_Dir'], $this->lists['order']); ?></th>
|
||||
<?php endif; ?>
|
||||
<?php if ($this->jemsettings->showstate == 1) : ?>
|
||||
<th id="jem_state" class="sectiontableheader"><?php echo HTMLHelper::_('grid.sort', 'COM_JEM_TABLE_STATE', 'l.state', $this->lists['order_Dir'], $this->lists['order']); ?></th>
|
||||
<?php endif; ?>
|
||||
<?php if ($this->jemsettings->showcat == 1) : ?>
|
||||
<th id="jem_category" class="sectiontableheader"><?php echo HTMLHelper::_('grid.sort', 'COM_JEM_TABLE_CATEGORY', 'c.catname', $this->lists['order_Dir'], $this->lists['order']); ?></th>
|
||||
<?php endif; ?>
|
||||
<?php if ($this->jemsettings->showatte == 1) : ?>
|
||||
<th id="jem_attendees" class="sectiontableheader"><?php echo Text::_('COM_JEM_TABLE_ATTENDEES'); ?></th>
|
||||
<?php endif; ?>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
<?php if (empty($this->rows)) : ?>
|
||||
<tr class="no_events"><td colspan="20"><?php echo Text::_('COM_JEM_NO_EVENTS'); ?></td></tr>
|
||||
<?php else : ?>
|
||||
<?php $odd = 0; ?>
|
||||
<?php foreach ($this->rows as $row) : ?>
|
||||
<?php $odd = 1 - $odd; ?>
|
||||
<?php if (!empty($row->featured)) : ?>
|
||||
<tr class="featured featured<?php echo $row->id.$this->params->get('pageclass_sfx') . ' event_id' . $this->escape($row->id); ?>" itemscope="itemscope" itemtype="https://schema.org/Event">
|
||||
<?php else : ?>
|
||||
<tr class="sectiontableentry<?php echo ($odd + 1) . $this->params->get('pageclass_sfx') . ' event_id' . $this->escape($row->id); ?>" itemscope="itemscope" itemtype="https://schema.org/Event">
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($this->jemsettings->showeventimage == 1) : ?>
|
||||
<td headers="jem_eventimage" class="header-td">
|
||||
<?php if (!empty($row->datimage)) : ?>
|
||||
<?php
|
||||
$dimage = JemImage::flyercreator($row->datimage, 'event');
|
||||
echo JemOutput::flyer($row, $dimage, 'event');
|
||||
?>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
<?php endif; ?>
|
||||
|
||||
<td headers="jem_date" class="header-td">
|
||||
<?php
|
||||
echo JemOutput::formatShortDateTime($row->dates, $row->times, $row->enddates, $row->endtimes, $this->jemsettings->showtime);
|
||||
echo JemOutput::formatSchemaOrgDateTime($row->dates, $row->times, $row->enddates, $row->endtimes);
|
||||
?>
|
||||
</td>
|
||||
|
||||
<?php if (($this->jemsettings->showtitle == 1) && ($this->jemsettings->showdetails == 1)) : ?>
|
||||
<td headers="jem_title" class="header-td">
|
||||
<a href="<?php echo Route::_(JemHelperRoute::getEventRoute($row->slug)); ?>">
|
||||
<span itemprop="name"><?php echo $this->escape($row->title) . JemOutput::recurrenceicon($row); ?></span>
|
||||
</a><?php echo JemOutput::publishstateicon($row);
|
||||
echo "<meta itemprop='url' content='" . Route::_(JemHelperRoute::getEventRoute($row->slug)) . "'>"; ?>
|
||||
</td>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if (($this->jemsettings->showtitle == 1) && ($this->jemsettings->showdetails == 0)) : ?>
|
||||
<td headers="jem_title" class="header-td" itemprop="name">
|
||||
<?php echo $this->escape($row->title) . JemOutput::recurrenceicon($row) . JemOutput::publishstateicon($row);
|
||||
echo "<meta itemprop='url' content='" . Route::_(JemHelperRoute::getEventRoute($row->slug)) . "'>"; ?>
|
||||
</td>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($this->jemsettings->showlocate == 1) : ?>
|
||||
<td headers="jem_location" class="header-td" itemtype="https://schema.org/Place" itemscope itemprop="location">
|
||||
<?php
|
||||
if (!empty($row->venue)) :
|
||||
if (($this->jemsettings->showlinkvenue == 1) && !empty($row->venueslug)) :
|
||||
echo "<a href='".Route::_(JemHelperRoute::getVenueRoute($row->venueslug))."'><span itemprop='name'>".$this->escape($row->venue)."</span></a>";
|
||||
else :
|
||||
echo "<span itemprop='name'>" . $this->escape($row->venue)."</span>";
|
||||
endif;
|
||||
else :
|
||||
echo "-<meta itemprop='name' content='' />";
|
||||
endif; ?>
|
||||
<div itemprop="address" itemscope itemtype="https://schema.org/PostalAddress" style="display:none;">
|
||||
<meta itemprop="streetAddress" content="<?php echo $this->escape($row->street); ?>" />
|
||||
<meta itemprop="addressLocality" content="<?php echo $this->escape($row->city); ?>" />
|
||||
<meta itemprop="addressRegion" content="<?php echo $this->escape($row->state); ?>" />
|
||||
<meta itemprop="postalCode" content="<?php echo $this->escape($row->postalCode); ?>" />
|
||||
</div>
|
||||
|
||||
</td>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($this->jemsettings->showcity == 1) : ?>
|
||||
<td headers="jem_city" class="header-td">
|
||||
<?php echo !empty($row->city) ? $this->escape($row->city) : "-"; ?>
|
||||
</td>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($this->jemsettings->showstate == 1) : ?>
|
||||
<td headers="jem_state" class="header-td">
|
||||
<?php echo !empty($row->state) ? $this->escape($row->state) : "-"; ?>
|
||||
</td>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($this->jemsettings->showcat == 1) : ?>
|
||||
<td headers="jem_category" class="header-td">
|
||||
<?php echo implode(", ", JemOutput::getCategoryList($row->categories, $this->jemsettings->catlinklist)); ?>
|
||||
</td>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($this->jemsettings->showatte == 1) : ?>
|
||||
<td headers="jem_attendees" class="header-td">
|
||||
<?php
|
||||
if (!empty($row->regCount)) :
|
||||
echo $this->escape($row->regCount), " / ", $this->escape($row->maxplaces);
|
||||
else :
|
||||
echo "- / ", $this->escape ($row->maxplaces);
|
||||
endif;
|
||||
?>
|
||||
</td>
|
||||
<?php endif; ?>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
<?php endif; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<?php echo JemOutput::lightbox(); ?>
|
||||
1
components/com_jem/common/views/tmpl/index.html
Normal file
1
components/com_jem/common/views/tmpl/index.html
Normal file
@ -0,0 +1 @@
|
||||
<!DOCTYPE html><title></title>
|
||||
@ -0,0 +1,48 @@
|
||||
<?php
|
||||
/**
|
||||
* @package JEM
|
||||
* @copyright (C) 2013-2024 joomlaeventmanager.net
|
||||
* @copyright (C) 2005-2009 Christoph Lukes
|
||||
* @license https://www.gnu.org/licenses/gpl-3.0 GNU/GPL
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\HTML\HTMLHelper;
|
||||
use Joomla\CMS\Session\Session;
|
||||
|
||||
if (isset($this->attachments) && is_array($this->attachments) && (count($this->attachments) > 0)) : ?>
|
||||
<hr class="jem-hr" style="display: none;" />
|
||||
<div class="jem-files">
|
||||
<?php if (count($this->attachments) > 1) : ?>
|
||||
<h2 class="jem-files"><?php echo Text::_('COM_JEM_FILES') ; ?></h2>
|
||||
<?php else : ?>
|
||||
<h2 class="jem-files"><?php echo Text::_('COM_JEM_FILE') ; ?></h2>
|
||||
<?php endif; ?>
|
||||
<dl class="jem-dl">
|
||||
<?php foreach ($this->attachments as $index=>$file) : ?>
|
||||
<dt class="jem-files" data-placement="bottom" data-original-title="<?php echo Text::_('COM_JEM_FILE'); ?>"><?php echo Text::_('COM_JEM_FILE').' '.($index+1); ?>:</dt>
|
||||
<dd class="jem-files">
|
||||
<?php
|
||||
$overlib = Text::_('COM_JEM_FILE').': '.$this->escape($file->file);
|
||||
if (!empty($file->name)) {
|
||||
$overlib .= '<br />'.Text::_('COM_JEM_FILE_NAME').': '.$this->escape($file->name);
|
||||
}
|
||||
if (!empty($file->description)) {
|
||||
$overlib .= '<br />'.Text::_('COM_JEM_FILE_DESCRIPTION').': '.$this->escape($file->description);
|
||||
}
|
||||
?>
|
||||
<span <?php echo JEMOutput::tooltip(Text::_('COM_JEM_DOWNLOAD'), $overlib, 'jem-files'); ?>>
|
||||
<?php
|
||||
$filename = $this->escape($file->name ? $file->name : $file->file);
|
||||
$image = $filename.' <i class="fa fa-download"></i>';
|
||||
$attribs = array('class'=>'jem-files');
|
||||
echo HTMLHelper::_('link','index.php?option=com_jem&task=getfile&format=raw&file='.$file->id.'&'.Session::getFormToken().'=1',$image, $attribs);
|
||||
?>
|
||||
</span>
|
||||
</dd>
|
||||
<?php endforeach; ?>
|
||||
</dl>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
@ -0,0 +1,18 @@
|
||||
<?php
|
||||
/**
|
||||
* @package JEM
|
||||
* @copyright (C) 2013-2024 joomlaeventmanager.net
|
||||
* @copyright (C) 2005-2009 Christoph Lukes
|
||||
* @license https://www.gnu.org/licenses/gpl-3.0 GNU/GPL
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
if (empty($this->jemsettings->tablewidth)) :
|
||||
echo $this->loadTemplate('jem_eventslist'); // The new layout
|
||||
else :
|
||||
echo $this->loadTemplate('jem_eventslist_small'); // Similar to the old table-layout
|
||||
endif;
|
||||
|
||||
echo JemOutput::lightbox();
|
||||
?>
|
||||
@ -0,0 +1,382 @@
|
||||
<?php
|
||||
/**
|
||||
* @package JEM
|
||||
* @copyright (C) 2013-2024 joomlaeventmanager.net
|
||||
* @copyright (C) 2005-2009 Christoph Lukes
|
||||
* @license https://www.gnu.org/licenses/gpl-3.0 GNU/GPL
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
use Joomla\CMS\Uri\Uri;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\HTML\HTMLHelper;
|
||||
use Joomla\CMS\Router\Route;
|
||||
use Joomla\CMS\Factory;
|
||||
?>
|
||||
|
||||
<script>
|
||||
function tableOrdering(order, dir, view) {
|
||||
var form = document.getElementById("adminForm");
|
||||
|
||||
form.filter_order.value = order;
|
||||
form.filter_order_Dir.value = dir;
|
||||
form.submit(view);
|
||||
}
|
||||
</script>
|
||||
|
||||
<?php
|
||||
$imagewidth = 'inherit';
|
||||
if ($this->jemsettings->imagewidth != 0) {
|
||||
$imagewidth = $this->jemsettings->imagewidth / 2;
|
||||
$imagewidth = $imagewidth.'px';
|
||||
}
|
||||
$imagewidthstring = 'jem-imagewidth';
|
||||
if (JemHelper::jemStringContains($this->params->get('pageclass_sfx'), $imagewidthstring)) {
|
||||
$pageclass_sfx = $this->params->get('pageclass_sfx');
|
||||
$imagewidthpos = strpos($pageclass_sfx, $imagewidthstring);
|
||||
$spacepos = strpos($pageclass_sfx, ' ', $imagewidthpos);
|
||||
if ($spacepos === false) {
|
||||
$spacepos = strlen($pageclass_sfx);
|
||||
}
|
||||
$startpos = $imagewidthpos + strlen($imagewidthstring);
|
||||
$endpos = $spacepos - $startpos;
|
||||
$imagewidth = substr($pageclass_sfx, $startpos, $endpos);
|
||||
}
|
||||
$imageheight = 'auto';
|
||||
$imageheigthstring = 'jem-imageheight';
|
||||
if (JemHelper::jemStringContains($this->params->get('pageclass_sfx'), $imageheigthstring)) {
|
||||
$pageclass_sfx = $this->params->get('pageclass_sfx');
|
||||
$imageheightpos = strpos($pageclass_sfx, $imageheigthstring);
|
||||
$spacepos = strpos($pageclass_sfx, ' ', $imageheightpos);
|
||||
if ($spacepos === false) {
|
||||
$spacepos = strlen($pageclass_sfx);
|
||||
}
|
||||
$startpos = $imageheightpos + strlen($imageheigthstring);
|
||||
$endpos = $spacepos - $startpos;
|
||||
$imageheight = substr($pageclass_sfx, $startpos, $endpos);
|
||||
}
|
||||
|
||||
$document = Factory::getDocument();
|
||||
$css = '
|
||||
#jem .jem-list-img {
|
||||
width: ' . $imagewidth . ';
|
||||
}
|
||||
|
||||
#jem .jem-list-img img {
|
||||
width: ' . $imagewidth . ';
|
||||
height: ' . $imageheight . ';
|
||||
}
|
||||
|
||||
@media not print {
|
||||
@media only all and (max-width: 47.938rem) {
|
||||
#jem .jem-list-img {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
#jem .jem-list-img img {
|
||||
width: ' . $imagewidth . ';
|
||||
height: ' . $imageheight . ';
|
||||
}
|
||||
}
|
||||
}';
|
||||
$document->addStyleDeclaration($css);
|
||||
|
||||
$uri = Uri::getInstance();
|
||||
function jem_common_show_filter(&$obj)
|
||||
{
|
||||
if ($obj->settings->get('global_show_filter', 1) && !JemHelper::jemStringContains($obj->params->get('pageclass_sfx'), 'jem-hidefilter')) {
|
||||
return true;
|
||||
}
|
||||
if (JemHelper::jemStringContains($obj->params->get('pageclass_sfx'), 'jem-showfilter')) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
?>
|
||||
<?php if (jem_common_show_filter($this) && !JemHelper::jemStringContains($this->params->get('pageclass_sfx'), 'jem-filterbelow')): ?>
|
||||
<div id="jem_filter" class="floattext jem-form jem-row jem-justify-start">
|
||||
<div class="jem-row jem-justify-start jem-nowrap">
|
||||
<?php echo $this->lists['filter']; ?>
|
||||
<input type="text" name="filter_search" id="filter_search" class="inputbox form-control" value="<?php echo $this->lists['search'];?>" onchange="document.adminForm.submit();" />
|
||||
</div>
|
||||
<div>
|
||||
<label for="filter_month"><?php echo Text::_('COM_JEM_SEARCH_MONTH'); ?></label>
|
||||
</div>
|
||||
<div class="jem-row jem-justify-start jem-nowrap">
|
||||
<input type="month" name="filter_month" id="filter_month" pattern="[0-9]{4}-[0-9]{2}" title="<?php echo Text::_('COM_JEM_SEARCH_YYYY-MM_FORMAT'); ?>" required class="inputbox form-control" placeholder="<?php echo Text::_('COM_JEM_SEARCH_YYYY-MM'); ?>" size="7" value="<?php echo $this->lists['month'] ?? '';?>">
|
||||
</div>
|
||||
<div class="jem-row jem-justify-start jem-nowrap">
|
||||
<button class="btn btn-primary" type="submit"><?php echo Text::_('JSEARCH_FILTER_SUBMIT'); ?></button>
|
||||
<button class="btn btn-secondary" type="button" onclick="document.getElementById('filter_search').value='';document.getElementById('filter_month').value='';this.form.submit();"><?php echo Text::_('JSEARCH_FILTER_CLEAR'); ?></button>
|
||||
</div>
|
||||
<?php if ($this->settings->get('global_display', 1)) : ?>
|
||||
<div class="jem-limit-smallist">
|
||||
<label for="limit"><?php echo Text::_('COM_JEM_DISPLAY_NUM'); ?></label>
|
||||
<?php echo $this->pagination->getLimitBox(); ?>
|
||||
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="jem-misc jem-row">
|
||||
<div class="jem-sort jem-row jem-justify-start jem-nowrap">
|
||||
<i class="fa fa-sort fa-lg jem-sort-icon" aria-hidden="true"></i>
|
||||
<div class="jem-row jem-justify-start jem-sort-parts">
|
||||
<div id="jem_date" class="sectiontableheader"><i class="far fa-clock" aria-hidden="true"></i> <?php echo HTMLHelper::_('grid.sort', 'COM_JEM_TABLE_DATE', 'a.dates', $this->lists['order_Dir'], $this->lists['order']); ?></div>
|
||||
<div id="jem_title" class="sectiontableheader"><i class="fa fa-comment" aria-hidden="true"></i> <?php echo HTMLHelper::_('grid.sort', 'COM_JEM_TABLE_TITLE', 'a.title', $this->lists['order_Dir'], $this->lists['order']); ?></div>
|
||||
<?php if ($this->jemsettings->showlocate == 1) : ?>
|
||||
<div id="jem_location" class="sectiontableheader"><i class="fa fa-map-marker" aria-hidden="true"></i> <?php echo HTMLHelper::_('grid.sort', 'COM_JEM_TABLE_LOCATION', 'l.venue', $this->lists['order_Dir'], $this->lists['order']); ?></div>
|
||||
<?php endif; ?>
|
||||
<?php if ($this->jemsettings->showcity == 1) : ?>
|
||||
<div id="jem_city" class="sectiontableheader"><i class="fa fa-building" aria-hidden="true"></i> <?php echo HTMLHelper::_('grid.sort', 'COM_JEM_TABLE_CITY', 'l.city', $this->lists['order_Dir'], $this->lists['order']); ?></div>
|
||||
<?php endif; ?>
|
||||
<?php if ($this->jemsettings->showstate == 1) : ?>
|
||||
<div id="jem_state" class="sectiontableheader"><i class="fa fa-map" aria-hidden="true"></i> <?php echo HTMLHelper::_('grid.sort', 'COM_JEM_TABLE_STATE', 'l.state', $this->lists['order_Dir'], $this->lists['order']); ?></div>
|
||||
<?php endif; ?>
|
||||
<?php if ($this->jemsettings->showcat == 1) : ?>
|
||||
<div id="jem_category" class="sectiontableheader"><i class="fa fa-tag" aria-hidden="true"></i> <?php echo HTMLHelper::_('grid.sort', 'COM_JEM_TABLE_CATEGORY', 'c.catname', $this->lists['order_Dir'], $this->lists['order']); ?></div>
|
||||
<?php endif; ?>
|
||||
<?php if ($this->jemsettings->showatte == 1) : ?>
|
||||
<div id="jem_atte" class="sectiontableheader"><i class="fa fa-user" aria-hidden="true"></i> <?php echo Text::_('COM_JEM_TABLE_ATTENDEES'); ?></div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<ul class="eventlist">
|
||||
<?php if ($this->noevents == 1) : ?>
|
||||
<li class="jem-event"><?php echo Text::_('COM_JEM_NO_EVENTS'); ?></li>
|
||||
<?php else : ?>
|
||||
<?php
|
||||
// Safari has problems with the "onclick" element in the <li>. It covers the links to location and category etc.
|
||||
// This detects the browser and just writes the onclick attribute if the broswer is not Safari.
|
||||
$isSafari = false;
|
||||
if (strpos($_SERVER['HTTP_USER_AGENT'], 'Safari') && !strpos($_SERVER['HTTP_USER_AGENT'], 'Chrome')) {
|
||||
$isSafari = true;
|
||||
}
|
||||
?>
|
||||
<?php
|
||||
$this->rows = $this->getRows();
|
||||
$showMonthRow = false;
|
||||
$previousYearMonth = '';
|
||||
$paramShowMonthRow = $this->params->get('showmonthrow', '');
|
||||
?>
|
||||
|
||||
<?php foreach ($this->rows as $row) : ?>
|
||||
<?php
|
||||
if ($paramShowMonthRow && $row->dates) {
|
||||
//get event date
|
||||
$year = date('Y', strtotime($row->dates));
|
||||
$month = date('F', strtotime($row->dates));
|
||||
$YearMonth = Text::_('COM_JEM_'.strtoupper ($month)) . ' ' . $year;
|
||||
|
||||
if (!$previousYearMonth || $previousYearMonth != $YearMonth) {
|
||||
$showMonthRow = $YearMonth;
|
||||
}
|
||||
|
||||
//Publish month row
|
||||
if ($showMonthRow) { ?>
|
||||
<li class="jem-event jem-row jem-justify-center bg-body-secondary" itemscope="itemscope"><span class="row-month"><?php echo $showMonthRow;?></span></li>
|
||||
<?php }
|
||||
} ?>
|
||||
<?php if (!empty($row->featured)) : ?>
|
||||
<li class="jem-event jem-row jem-justify-start jem-featured <?php echo $this->params->get('pageclass_sfx') . ' event_id' . $this->escape($row->id); if (!empty($row->locid)) { echo ' venue_id' . $this->escape($row->locid); } ?>" itemscope="itemscope" itemtype="https://schema.org/Event" <?php if ($this->jemsettings->showdetails == 1 && (!$isSafari)) : echo 'onclick="location.href=\''.Route::_(JemHelperRoute::getEventRoute($row->slug)) .'\'"'; endif; ?> >
|
||||
<?php else : ?>
|
||||
<li class="jem-event jem-row jem-justify-start jem-odd<?php echo ($row->odd + 1) . $this->params->get('pageclass_sfx') . ' event_id' . $this->escape($row->id); if (!empty($row->locid)) { echo ' venue_id' . $this->escape($row->locid); } ?>" itemscope="itemscope" itemtype="https://schema.org/Event" <?php if (($this->jemsettings->showdetails == 1) && (!$isSafari) && ($this->jemsettings->gddisabled == 0)) : echo 'onclick="location.href=\''. Route::_(JemHelperRoute::getEventRoute($row->slug)) .'\'"'; endif; ?>>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($this->jemsettings->showeventimage == 1) : ?>
|
||||
<div class="jem-list-img">
|
||||
<?php if (!empty($row->datimage)) : ?>
|
||||
<?php
|
||||
$dimage = JemImage::flyercreator($row->datimage, 'event');
|
||||
echo JemOutput::flyer($row, $dimage, 'event');
|
||||
?>
|
||||
<?php else : ?>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="jem-event-details" <?php if (($this->jemsettings->showdetails == 1) && (!$isSafari) && ($this->jemsettings->gddisabled == 1)) : echo 'onclick="location.href=\''. Route::_(JemHelperRoute::getEventRoute($row->slug)) .'\'"'; endif; ?>>
|
||||
<?php if (($this->jemsettings->showtitle == 1) && ($this->jemsettings->showdetails == 1)) : // Display title as title of jem-event with link ?>
|
||||
<h3 title="<?php echo Text::_('COM_JEM_TABLE_TITLE') . ': ' . $this->escape($row->title); ?>">
|
||||
|
||||
<a href="<?php echo Route::_(JemHelperRoute::getEventRoute($row->slug)); ?>"><?php echo $this->escape($row->title); ?></a>
|
||||
<?php echo JemOutput::recurrenceicon($row); ?>
|
||||
<?php echo JemOutput::publishstateicon($row); ?>
|
||||
<?php if (!empty($row->featured)) : ?>
|
||||
<i class="jem-featured-icon fa fa-exclamation-circle" aria-hidden="true"></i>
|
||||
<?php endif; ?>
|
||||
</h3>
|
||||
|
||||
<?php elseif (($this->jemsettings->showtitle == 1) && ($this->jemsettings->showdetails == 0)) : //Display title as title of jem-event without link ?>
|
||||
<h4 title="<?php echo Text::_('COM_JEM_TABLE_TITLE') . ': ' . $this->escape($row->title); ?>">
|
||||
<?php echo $this->escape($row->title) . JemOutput::recurrenceicon($row) . JemOutput::publishstateicon($row); ?>
|
||||
<?php if (!empty($row->featured)) : ?>
|
||||
<i class="jem-featured-icon fa fa-exclamation-circle" aria-hidden="true"></i>
|
||||
<?php endif; ?>
|
||||
</h4>
|
||||
|
||||
<?php elseif (($this->jemsettings->showtitle == 0) && ($this->jemsettings->showdetails == 1)) : // Display date as title of jem-event with link ?>
|
||||
<h4>
|
||||
<a href="<?php echo Route::_(JemHelperRoute::getEventRoute($row->slug)); ?>">
|
||||
<?php
|
||||
echo JemOutput::formatShortDateTime($row->dates, $row->times,
|
||||
$row->enddates, $row->endtimes, $this->jemsettings->showtime);
|
||||
echo JemOutput::formatSchemaOrgDateTime($row->dates, $row->times,
|
||||
$row->enddates, $row->endtimes);
|
||||
?>
|
||||
</a>
|
||||
<?php echo JemOutput::recurrenceicon($row); ?>
|
||||
<?php echo JemOutput::publishstateicon($row); ?>
|
||||
<?php if (!empty($row->featured)) : ?>
|
||||
<i class="jem-featured-icon fa fa-exclamation-circle" aria-hidden="true"></i>
|
||||
<?php endif; ?>
|
||||
</h4>
|
||||
|
||||
<?php else : // Display date as title of jem-event without link ?>
|
||||
<h4>
|
||||
<?php
|
||||
echo JemOutput::formatShortDateTime($row->dates, $row->times,
|
||||
$row->enddates, $row->endtimes, $this->jemsettings->showtime);
|
||||
echo JemOutput::formatSchemaOrgDateTime($row->dates, $row->times,
|
||||
$row->enddates, $row->endtimes);
|
||||
?>
|
||||
<?php echo JemOutput::recurrenceicon($row); ?>
|
||||
<?php echo JemOutput::publishstateicon($row); ?>
|
||||
<?php if (!empty($row->featured)) : ?>
|
||||
<i class="jem-featured-icon fa fa-exclamation-circle" aria-hidden="true"></i>
|
||||
<?php endif; ?>
|
||||
</h4>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php // Display other information below in a row ?>
|
||||
<div class="jem-list-row">
|
||||
<?php if ($this->jemsettings->showtitle == 1) : ?>
|
||||
<div class="jem-event-info" title="<?php echo Text::_('COM_JEM_TABLE_DATE').': '.strip_tags(JemOutput::formatShortDateTime($row->dates, $row->times, $row->enddates, $row->endtimes, $this->jemsettings->showtime)); ?>">
|
||||
<i class="far fa-clock" aria-hidden="true"></i>
|
||||
<?php
|
||||
echo JemOutput::formatShortDateTime($row->dates, $row->times,
|
||||
$row->enddates, $row->endtimes, $this->jemsettings->showtime);
|
||||
echo JemOutput::formatSchemaOrgDateTime($row->dates, $row->times,
|
||||
$row->enddates, $row->endtimes);
|
||||
?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($this->jemsettings->showtitle == 0) : ?>
|
||||
<div class="jem-event-info" title="<?php echo Text::_('COM_JEM_TABLE_TITLE').': '.$this->escape($row->title); ?>">
|
||||
<i class="fa fa-comment" aria-hidden="true"></i>
|
||||
<?php echo $this->escape($row->title); ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if (($this->jemsettings->showlocate == 1) && (!empty($row->locid))) : ?>
|
||||
<div class="jem-event-info" title="<?php echo Text::_('COM_JEM_TABLE_LOCATION').': '.$this->escape($row->venue); ?>">
|
||||
<i class="fa fa-map-marker" aria-hidden="true"></i>
|
||||
<?php if ($this->jemsettings->showlinkvenue == 1) : ?>
|
||||
<?php echo "<a href='" . Route::_(JemHelperRoute::getVenueRoute($row->venueslug)) . "'>" . $this->escape($row->venue) . "</a>"; ?>
|
||||
<?php else : ?>
|
||||
<?php echo $this->escape($row->venue); ?>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if (($this->jemsettings->showcity == 1) && (!empty($row->city))) : ?>
|
||||
<div class="jem-event-info" title="<?php echo Text::_('COM_JEM_TABLE_CITY').': '.$this->escape($row->city); ?>">
|
||||
<i class="fa fa-building" aria-hidden="true"></i>
|
||||
<?php echo $this->escape($row->city); ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if (($this->jemsettings->showstate == 1) && (!empty($row->state))): ?>
|
||||
<div class="jem-event-info" title="<?php echo Text::_('COM_JEM_TABLE_STATE').': '.$this->escape($row->state); ?>">
|
||||
<i class="fa fa-map" aria-hidden="true"></i>
|
||||
<?php echo $this->escape($row->state); ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($this->jemsettings->showcat == 1) : ?>
|
||||
<div class="jem-event-info" title="<?php echo strip_tags(Text::_('COM_JEM_TABLE_CATEGORY').': '.implode(", ", JemOutput::getCategoryList($row->categories, $this->jemsettings->catlinklist))); ?>">
|
||||
<i class="fa fa-tag" aria-hidden="true"></i>
|
||||
<?php echo implode(", ", JemOutput::getCategoryList($row->categories, $this->jemsettings->catlinklist)); ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
|
||||
<?php if ($this->jemsettings->showatte == 1) : ?>
|
||||
<?php if (!empty($row->regCount)) : ?>
|
||||
<div class="jem-event-info" title="<?php echo Text::_('COM_JEM_TABLE_ATTENDEES').': '.$this->escape($row->regCount); ?>">
|
||||
<i class="fa fa-user" aria-hidden="true"></i>
|
||||
<?php echo $this->escape($row->regCount), " / ", $this->escape($row->maxplaces); ?>
|
||||
</div>
|
||||
<?php elseif ($this->escape($row->maxplaces) == 0) : ?>
|
||||
<div>
|
||||
<i class="fa fa-user" aria-hidden="true"></i>
|
||||
<?php echo " > 0 "; ?>
|
||||
</div>
|
||||
<?php else : ?>
|
||||
<div class="jem-event-info-small jem-event-attendees">
|
||||
<i class="fa fa-user" aria-hidden="true"></i>
|
||||
<?php echo " < ", $this->escape($row->maxplaces); ?>
|
||||
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
if ($paramShowMonthRow) {
|
||||
$previousYearMonth = $YearMonth ?? '';
|
||||
$showMonthRow = false;
|
||||
}
|
||||
?>
|
||||
|
||||
<meta itemprop="name" content="<?php echo $this->escape($row->title); ?>"/>
|
||||
<meta itemprop="url" content="<?php echo rtrim($uri->base(), '/').Route::_(JemHelperRoute::getEventRoute($row->slug)); ?>" />
|
||||
<meta itemprop="identifier" content="<?php echo rtrim($uri->base(), '/').Route::_(JemHelperRoute::getEventRoute($row->slug)); ?>" />
|
||||
<div itemtype="https://schema.org/Place" itemscope itemprop="location" style="display: none;">
|
||||
<?php if (!empty($row->locid)) : ?>
|
||||
<meta itemprop="name" content="<?php echo $this->escape($row->venue); ?>"/>
|
||||
<?php else : ?>
|
||||
<meta itemprop="name" content="None"/>
|
||||
<?php endif; ?>
|
||||
<?php
|
||||
$microadress = '';
|
||||
if (!empty($row->city)) {
|
||||
$microadress .= $this->escape($row->city);
|
||||
}
|
||||
if (!empty($microadress)) {
|
||||
$microadress .= ', ';
|
||||
}
|
||||
if (!empty($row->state)) {
|
||||
$microadress .= $this->escape($row->state);
|
||||
}
|
||||
if (empty($microadress)) {
|
||||
$microadress .= '-';
|
||||
}
|
||||
?>
|
||||
<meta itemprop="address" content="<?php echo $microadress; ?>"/>
|
||||
</div>
|
||||
|
||||
</li>
|
||||
<?php endforeach; ?>
|
||||
<?php endif; ?>
|
||||
</ul>
|
||||
<?php if (jem_common_show_filter($this) && JemHelper::jemStringContains($this->params->get('pageclass_sfx'), 'jem-filterbelow')) : ?>
|
||||
<div id="jem_filter" class="floattext jem-form jem-row jem-justify-start">
|
||||
<div class="jem-row jem-justify-start jem-nowrap">
|
||||
<?php echo $this->lists['filter']; ?>
|
||||
<input type="text" name="filter_search" id="filter_search" value="<?php echo $this->lists['search'];?>" class="inputbox" onchange="document.adminForm.submit();" />
|
||||
</div>
|
||||
<div class="jem-row jem-justify-start jem-nowrap">
|
||||
<button class="btn btn-primary" type="submit"><?php echo Text::_('JSEARCH_FILTER_SUBMIT'); ?></button>
|
||||
<button class="btn btn-secondary" type="button" onclick="document.getElementById('filter_search').value='';document.getElementById('filter_month').value='';this.form.submit();"><?php echo Text::_('JSEARCH_FILTER_CLEAR'); ?></button>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
@ -0,0 +1,349 @@
|
||||
<?php
|
||||
/**
|
||||
* @package JEM
|
||||
* @copyright (C) 2013-2024 joomlaeventmanager.net
|
||||
* @copyright (C) 2005-2009 Christoph Lukes
|
||||
* @license https://www.gnu.org/licenses/gpl-3.0 GNU/GPL
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
use Joomla\CMS\Uri\Uri;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\HTML\HTMLHelper;
|
||||
use Joomla\CMS\Router\Route;
|
||||
|
||||
$uri = Uri::getInstance();
|
||||
?>
|
||||
|
||||
<script>
|
||||
function tableOrdering(order, dir, view)
|
||||
{
|
||||
var form = document.getElementById("adminForm");
|
||||
|
||||
form.filter_order.value = order;
|
||||
form.filter_order_Dir.value = dir;
|
||||
form.submit(view);
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
<?php if (!empty($this->jemsettings->tablewidth)) : ?>
|
||||
#jem #adminForm {
|
||||
width: <?php echo ($this->jemsettings->tablewidth); ?>;
|
||||
}
|
||||
<?php endif; ?>
|
||||
|
||||
.jem-sort #jem_date,
|
||||
#jem .jem-event .jem-event-date {
|
||||
<?php if (!empty($this->jemsettings->datewidth)) : ?>
|
||||
flex: 1 <?php echo ($this->jemsettings->datewidth); ?>;
|
||||
<?php else : ?>
|
||||
flex: 1;
|
||||
<?php endif; ?>
|
||||
}
|
||||
|
||||
.jem-sort #jem_title,
|
||||
#jem .jem-event .jem-event-title {
|
||||
<?php if (($this->jemsettings->showtitle == 1) && (!empty($this->jemsettings->titlewidth))) : ?>
|
||||
flex: 1 <?php echo ($this->jemsettings->titlewidth); ?>;
|
||||
<?php else : ?>
|
||||
flex: 1;
|
||||
<?php endif; ?>
|
||||
}
|
||||
|
||||
.jem-sort #jem_location,
|
||||
#jem .jem-event .jem-event-venue {
|
||||
<?php if (($this->jemsettings->showlocate == 1) && (!empty($this->jemsettings->locationwidth))) : ?>
|
||||
flex: 1 <?php echo ($this->jemsettings->locationwidth); ?>;
|
||||
<?php else : ?>
|
||||
flex: 1;
|
||||
<?php endif; ?>
|
||||
}
|
||||
|
||||
.jem-sort #jem_city,
|
||||
#jem .jem-event .jem-event-city {
|
||||
<?php if (($this->jemsettings->showcity == 1) && (!empty($this->jemsettings->citywidth))) : ?>
|
||||
flex: 1 <?php echo ($this->jemsettings->citywidth); ?>;
|
||||
<?php else : ?>
|
||||
flex: 1;
|
||||
<?php endif; ?>
|
||||
}
|
||||
|
||||
.jem-sort #jem_state,
|
||||
#jem .jem-event .jem-event-state {
|
||||
<?php if (($this->jemsettings->showstate == 1) && (!empty($this->jemsettings->statewidth))) : ?>
|
||||
flex: 1 <?php echo ($this->jemsettings->statewidth); ?>;
|
||||
<?php else : ?>
|
||||
flex: 1;
|
||||
<?php endif; ?>
|
||||
}
|
||||
|
||||
.jem-sort #jem_category,
|
||||
#jem .jem-event .jem-event-category {
|
||||
<?php if (($this->jemsettings->showcat == 1) && (!empty($this->jemsettings->catfrowidth))) : ?>
|
||||
flex: 1 <?php echo ($this->jemsettings->catfrowidth); ?>;
|
||||
<?php else : ?>
|
||||
flex: 1;
|
||||
<?php endif; ?>
|
||||
}
|
||||
|
||||
.jem-sort #jem_atte,
|
||||
#jem .jem-event .jem-event-attendees {
|
||||
<?php if (($this->jemsettings->showatte == 1) && (!empty($this->jemsettings->attewidth))) : ?>
|
||||
flex: 1 <?php echo ($this->jemsettings->attewidth); ?>;
|
||||
<?php else : ?>
|
||||
flex: 1;
|
||||
<?php endif; ?>
|
||||
}
|
||||
</style>
|
||||
|
||||
<?php
|
||||
function jem_common_show_filter(&$obj) {
|
||||
if ($obj->settings->get('global_show_filter',1) && !JemHelper::jemStringContains($obj->params->get('pageclass_sfx'), 'jem-hidefilter')) {
|
||||
return true;
|
||||
}
|
||||
if (JemHelper::jemStringContains($obj->params->get('pageclass_sfx'), 'jem-showfilter')) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
?>
|
||||
<?php if (jem_common_show_filter($this) && !JemHelper::jemStringContains($this->params->get('pageclass_sfx'), 'jem-filterbelow')): ?>
|
||||
<div id="jem_filter" class="floattext jem-form jem-row jem-justify-start">
|
||||
<div class="jem-row jem-justify-start jem-nowrap">
|
||||
<?php echo $this->lists['filter']; ?>
|
||||
<input type="text" name="filter_search" id="filter_search" class="inputbox form-control" value="<?php echo $this->lists['search'];?>" onchange="document.adminForm.submit();" />
|
||||
</div>
|
||||
<div>
|
||||
<label for="filter_month"><?php echo Text::_('COM_JEM_SEARCH_MONTH'); ?></label>
|
||||
</div>
|
||||
<div class="jem-row jem-justify-start jem-nowrap">
|
||||
<input type="month" name="filter_month" id="filter_month" pattern="[0-9]{4}-[0-9]{2}" title="<?php echo Text::_('COM_JEM_SEARCH_YYYY-MM_FORMAT'); ?>" required class="inputbox form-control" placeholder="<?php echo Text::_('COM_JEM_SEARCH_YYYY-MM'); ?>" size="7" value="<?php echo $this->lists['month'] ?? '';?>">
|
||||
</div>
|
||||
<div class="jem-row jem-justify-start jem-nowrap">
|
||||
<button class="btn btn-primary" type="submit"><?php echo Text::_('JSEARCH_FILTER_SUBMIT'); ?></button>
|
||||
<button class="btn btn-secondary" type="button" onclick="document.getElementById('filter_search').value='';this.form.submit();"><?php echo Text::_('JSEARCH_FILTER_CLEAR'); ?></button>
|
||||
</div>
|
||||
<?php if ($this->settings->get('global_display',1)) : ?>
|
||||
<div class="jem-limit-smallist">
|
||||
<?php
|
||||
echo '<label for="limit" class="jem-limit-text">'.Text::_('COM_JEM_DISPLAY_NUM').'</label> ';
|
||||
//echo '<span class="jem-limit-text">'.Text::_('COM_JEM_DISPLAY_NUM').'</span> ';
|
||||
echo $this->pagination->getLimitBox();
|
||||
?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="jem-sort jem-sort-small">
|
||||
<div class="jem-list-row jem-small-list">
|
||||
<div id="jem_date" class="sectiontableheader"><i class="far fa-clock" aria-hidden="true"></i> <?php echo HTMLHelper::_('grid.sort', 'COM_JEM_TABLE_DATE', 'a.dates', $this->lists['order_Dir'], $this->lists['order']); ?></div>
|
||||
<?php if ($this->jemsettings->showtitle == 1) : ?>
|
||||
<div id="jem_title" class="sectiontableheader"><i class="fa fa-comment" aria-hidden="true"></i> <?php echo HTMLHelper::_('grid.sort', 'COM_JEM_TABLE_TITLE', 'a.title', $this->lists['order_Dir'], $this->lists['order']); ?></div>
|
||||
<?php endif; ?>
|
||||
<?php if ($this->jemsettings->showlocate == 1) : ?>
|
||||
<div id="jem_location" class="sectiontableheader"><i class="fa fa-map-marker" aria-hidden="true"></i> <?php echo HTMLHelper::_('grid.sort', 'COM_JEM_TABLE_LOCATION', 'l.venue', $this->lists['order_Dir'], $this->lists['order']); ?></div>
|
||||
<?php endif; ?>
|
||||
<?php if ($this->jemsettings->showcity == 1) : ?>
|
||||
<div id="jem_city" class="sectiontableheader"><i class="fa fa-building" aria-hidden="true"></i> <?php echo HTMLHelper::_('grid.sort', 'COM_JEM_TABLE_CITY', 'l.city', $this->lists['order_Dir'], $this->lists['order']); ?></div>
|
||||
<?php endif; ?>
|
||||
<?php if ($this->jemsettings->showstate == 1) : ?>
|
||||
<div id="jem_state" class="sectiontableheader"><i class="fa fa-map" aria-hidden="true"></i> <?php echo HTMLHelper::_('grid.sort', 'COM_JEM_TABLE_STATE', 'l.state', $this->lists['order_Dir'], $this->lists['order']); ?></div>
|
||||
<?php endif; ?>
|
||||
<?php if ($this->jemsettings->showcat == 1) : ?>
|
||||
<div id="jem_category" class="sectiontableheader"><i class="fa fa-tag" aria-hidden="true"></i> <?php echo HTMLHelper::_('grid.sort', 'COM_JEM_TABLE_CATEGORY', 'c.catname', $this->lists['order_Dir'], $this->lists['order']); ?></div>
|
||||
<?php endif; ?>
|
||||
<?php if ($this->jemsettings->showatte == 1) : ?>
|
||||
<div id="jem_atte" class="sectiontableheader"><i class="fa fa-user" aria-hidden="true"></i> <?php echo Text::_('COM_JEM_TABLE_ATTENDEES'); ?></div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<ul class="eventlist">
|
||||
<?php if ($this->noevents == 1) : ?>
|
||||
<li class="jem-event"><?php echo Text::_('COM_JEM_NO_EVENTS'); ?></li>
|
||||
<?php else : ?>
|
||||
<?php
|
||||
// Safari has problems with the "onclick" element in the <li>. It covers the links to location and category etc.
|
||||
// This detects the browser and just writes the onclick attribute if the broswer is not Safari.
|
||||
$isSafari = false;
|
||||
if (strpos($_SERVER['HTTP_USER_AGENT'], 'Safari') && !strpos($_SERVER['HTTP_USER_AGENT'], 'Chrome')) {
|
||||
$isSafari = true;
|
||||
}
|
||||
?>
|
||||
<?php
|
||||
$this->rows = $this->getRows();
|
||||
$showMonthRow = false;
|
||||
$previousYearMonth = '';
|
||||
$paramShowMonthRow = $this->params->get('showmonthrow', '');
|
||||
?>
|
||||
|
||||
<?php foreach ($this->rows as $row) : ?>
|
||||
<?php
|
||||
if ($paramShowMonthRow && $row->dates) {
|
||||
//get event date
|
||||
$year = date('Y', strtotime($row->dates));
|
||||
$month = date('F', strtotime($row->dates));
|
||||
$YearMonth = Text::_('COM_JEM_'.strtoupper ($month)) . ' ' . $year;
|
||||
|
||||
if (!$previousYearMonth || $previousYearMonth != $YearMonth) {
|
||||
$showMonthRow = $YearMonth;
|
||||
}
|
||||
|
||||
//Publish month row
|
||||
if ($showMonthRow) { ?>
|
||||
<li class="jem-event jem-row jem-justify-center bg-body-secondary" itemscope="itemscope"><span class="row-month"><?php echo $showMonthRow;?></span></li>
|
||||
<?php }
|
||||
} ?>
|
||||
<?php if (!empty($row->featured)) : ?>
|
||||
<li class="jem-event jem-list-row jem-small-list jem-featured <?php echo $this->params->get('pageclass_sfx') . ' event_id' . $this->escape($row->id); if (!empty($row->locid)) { echo ' venue_id' . $this->escape($row->locid); } ?>" itemscope="itemscope" itemtype="https://schema.org/Event" <?php if ($this->jemsettings->showdetails == 1 && (!$isSafari)) : echo 'onclick="location.href=\''.Route::_(JemHelperRoute::getEventRoute($row->slug)).'\'"';; endif; ?> > <?php else : ?>
|
||||
<li class="jem-event jem-list-row jem-small-list jem-odd<?php echo ($row->odd +1) . $this->params->get('pageclass_sfx') . ' event_id' . $this->escape($row->id); if (!empty($row->locid)) { echo ' venue_id' . $this->escape($row->locid); } ?>" itemscope="itemscope" itemtype="https://schema.org/Event" <?php if ($this->jemsettings->showdetails == 1 && (!$isSafari)) : echo 'onclick="location.href=\''.Route::_(JemHelperRoute::getEventRoute($row->slug)).'\'"';; endif; ?> > <?php endif; ?>
|
||||
<div class="jem-event-info-small jem-event-date" title="<?php echo Text::_('COM_JEM_TABLE_DATE').': '.strip_tags(JemOutput::formatShortDateTime($row->dates, $row->times, $row->enddates, $row->endtimes, $this->jemsettings->showtime)); ?>">
|
||||
<i class="far fa-clock" aria-hidden="true"></i>
|
||||
<?php
|
||||
echo JemOutput::formatShortDateTime($row->dates, $row->times,
|
||||
$row->enddates, $row->endtimes, $this->jemsettings->showtime);
|
||||
echo JemOutput::formatSchemaOrgDateTime($row->dates, $row->times,
|
||||
$row->enddates, $row->endtimes);
|
||||
?>
|
||||
<?php if ($this->jemsettings->showtitle == 0) : ?>
|
||||
<?php echo JemOutput::recurrenceicon($row); ?>
|
||||
<?php echo JemOutput::publishstateicon($row); ?>
|
||||
<?php if (!empty($row->featured)) :?>
|
||||
<i class="jem-featured-icon fa fa-exclamation-circle" aria-hidden="true"></i>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
||||
<?php if ($this->jemsettings->showtitle == 1) : ?>
|
||||
<div class="jem-event-info-small jem-event-title">
|
||||
<h4 title="<?php echo Text::_('COM_JEM_TABLE_TITLE').': '.$this->escape($row->title); ?>">
|
||||
|
||||
|
||||
<a href="<?php echo Route::_(JemHelperRoute::getEventRoute($row->slug)); ?>"><?php echo $this->escape($row->title); ?></a>
|
||||
<?php echo JemOutput::recurrenceicon($row) . JemOutput::publishstateicon($row); ?>
|
||||
<?php if (!empty($row->featured)) :?>
|
||||
<i class="jem-featured-icon fa fa-exclamation-circle" aria-hidden="true"></i>
|
||||
<?php endif; ?>
|
||||
</h4>
|
||||
</div>
|
||||
<?php else : ?>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($this->jemsettings->showlocate == 1) : ?>
|
||||
<?php if (!empty($row->locid)) : ?>
|
||||
<div class="jem-event-info-small jem-event-venue" title="<?php echo Text::_('COM_JEM_TABLE_LOCATION').': '.$this->escape($row->venue); ?>">
|
||||
<i class="fa fa-map-marker" aria-hidden="true"></i>
|
||||
<?php if ($this->jemsettings->showlinkvenue == 1) : ?>
|
||||
<?php echo "<a href='".Route::_(JemHelperRoute::getVenueRoute($row->venueslug))."'>".$this->escape($row->venue)."</a>"; ?>
|
||||
<?php else : ?>
|
||||
<?php echo $this->escape($row->venue); ?>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?php else : ?>
|
||||
<div class="jem-event-info-small jem-event-venue">
|
||||
<i class="fa fa-map-marker" aria-hidden="true"></i> -
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($this->jemsettings->showcity == 1) : ?>
|
||||
<?php if (!empty($row->city)) : ?>
|
||||
<div class="jem-event-info-small jem-event-city" title="<?php echo Text::_('COM_JEM_TABLE_CITY').': '.$this->escape($row->city); ?>">
|
||||
<i class="fa fa-building" aria-hidden="true"></i>
|
||||
<?php echo $this->escape($row->city); ?>
|
||||
</div>
|
||||
<?php else : ?>
|
||||
<div class="jem-event-info-small jem-event-city"><i class="fa fa-building" aria-hidden="true"></i> -</div>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($this->jemsettings->showstate == 1) : ?>
|
||||
<?php if (!empty($row->state)) : ?>
|
||||
<div class="jem-event-info-small jem-event-state" title="<?php echo Text::_('COM_JEM_TABLE_STATE').': '.$this->escape($row->state); ?>">
|
||||
<i class="fa fa-map" aria-hidden="true"></i>
|
||||
<?php echo $this->escape($row->state); ?>
|
||||
</div>
|
||||
<?php else : ?>
|
||||
<div class="jem-event-info-small jem-event-state"><i class="fa fa-map" aria-hidden="true"></i> -</div>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($this->jemsettings->showcat == 1) : ?>
|
||||
<div class="jem-event-info-small jem-event-category" title="<?php echo strip_tags(Text::_('COM_JEM_TABLE_CATEGORY').': '.implode(", ", JemOutput::getCategoryList($row->categories, $this->jemsettings->catlinklist))); ?>">
|
||||
<i class="fa fa-tag" aria-hidden="true"></i>
|
||||
<?php echo implode(", ", JemOutput::getCategoryList($row->categories, $this->jemsettings->catlinklist)); ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($this->jemsettings->showatte == 1) : ?>
|
||||
<?php if (!empty($row->regCount)) : ?>
|
||||
<div class="jem-event-info-small jem-event-attendees" title="<?php echo Text::_('COM_JEM_TABLE_ATTENDEES').': '.$this->escape($row->regCount); ?>">
|
||||
<i class="fa fa-user" aria-hidden="true"></i>
|
||||
<?php echo $this->escape($row->regCount), " / ", $this->escape($row->maxplaces); ?>
|
||||
</div>
|
||||
<?php else : ?>
|
||||
<div class="jem-event-info-small jem-event-attendees">
|
||||
<i class="fa fa-user" aria-hidden="true"></i>
|
||||
<?php echo " - / ", $this->escape ($row->maxplaces); ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
<?php
|
||||
if ($paramShowMonthRow) {
|
||||
$previousYearMonth = $YearMonth ?? '';
|
||||
$showMonthRow = false;
|
||||
}
|
||||
?>
|
||||
|
||||
<meta itemprop="name" content="<?php echo $this->escape($row->title); ?>" />
|
||||
<meta itemprop="url" content="<?php echo rtrim($uri->base(), '/').Route::_(JemHelperRoute::getEventRoute($row->slug)); ?>" />
|
||||
<meta itemprop="identifier" content="<?php echo rtrim($uri->base(), '/').Route::_(JemHelperRoute::getEventRoute($row->slug)); ?>" />
|
||||
<div itemtype="https://schema.org/Place" itemscope itemprop="location" style="display: none;" >
|
||||
<?php if (!empty($row->locid)) : ?>
|
||||
<meta itemprop="name" content="<?php echo $this->escape($row->venue); ?>" />
|
||||
<?php else : ?>
|
||||
<meta itemprop="name" content="None" />
|
||||
<?php endif; ?>
|
||||
<?php
|
||||
$microadress = '';
|
||||
if (!empty($row->city)) {
|
||||
$microadress .= $this->escape($row->city);
|
||||
}
|
||||
if (!empty($microadress)) {
|
||||
$microadress .= ', ';
|
||||
}
|
||||
if (!empty($row->state)) {
|
||||
$microadress .= $this->escape($row->state);
|
||||
}
|
||||
if (empty($microadress)) {
|
||||
$microadress .= '-';
|
||||
}
|
||||
?>
|
||||
<meta itemprop="address" content="<?php echo $microadress; ?>" />
|
||||
</div>
|
||||
</li>
|
||||
<?php endforeach; ?>
|
||||
<?php endif; ?>
|
||||
</ul>
|
||||
|
||||
<div class="jem-row valign-baseline">
|
||||
<div style="margin:0; padding: 0;">
|
||||
<?php if (jem_common_show_filter($this) && JemHelper::jemStringContains($this->params->get('pageclass_sfx'), 'jem-filterbelow')): ?>
|
||||
<div id="jem_filter" class="floattext jem-form jem-row jem-justify-start">
|
||||
<div class="jem-row jem-justify-start jem-nowrap">
|
||||
<?php echo $this->lists['filter']; ?>
|
||||
<input type="text" name="filter_search" id="filter_search" value="<?php echo $this->lists['search'];?>" class="inputbox" onchange="document.adminForm.submit();" />
|
||||
</div>
|
||||
<div class="jem-row jem-justify-start jem-nowrap">
|
||||
<button class="buttonfilter btn" type="submit"><?php echo Text::_('JSEARCH_FILTER_SUBMIT'); ?></button>
|
||||
<button class="buttonfilter btn" type="button" onclick="document.getElementById('filter_search').value='';this.form.submit();"><?php echo Text::_('JSEARCH_FILTER_CLEAR'); ?></button>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
172
components/com_jem/controller.php
Normal file
172
components/com_jem/controller.php
Normal file
@ -0,0 +1,172 @@
|
||||
<?php
|
||||
/**
|
||||
* @package JEM
|
||||
* @copyright (C) 2013-2024 joomlaeventmanager.net
|
||||
* @copyright (C) 2005-2009 Christoph Lukes
|
||||
* @license https://www.gnu.org/licenses/gpl-3.0 GNU/GPL
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\MVC\Controller\BaseController;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\Session\Session;
|
||||
|
||||
/**
|
||||
* JEM Component Controller
|
||||
*
|
||||
* @package JEM
|
||||
*
|
||||
*/
|
||||
class JemController extends BaseController
|
||||
{
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
}
|
||||
|
||||
/**
|
||||
* Display the view
|
||||
*/
|
||||
public function display($cachable = false, $urlparams = false)
|
||||
{
|
||||
$app = Factory::getApplication();
|
||||
$document = $app->getDocument();
|
||||
$user = JemFactory::getUser();
|
||||
|
||||
// Set the default view name and format from the Request.
|
||||
$jinput = $app->input;
|
||||
$id = $jinput->getInt('a_id', 0);
|
||||
$viewName = $jinput->getCmd('view', 'eventslist');
|
||||
$viewFormat = $document->getType();
|
||||
$layoutName = $jinput->getCmd('layout', 'edit');
|
||||
|
||||
// Check for edit form.
|
||||
if ($viewName == 'editevent' && !$this->checkEditId('com_jem.edit.event', $id)) {
|
||||
// Somehow the person just went to the form - we don't allow that.
|
||||
throw new Exception(Text::sprintf('JLIB_APPLICATION_ERROR_UNHELD_ID', $id), 403);
|
||||
}
|
||||
|
||||
$view = $this->getView($viewName, $viewFormat);
|
||||
if ($view) {
|
||||
// Do any specific processing by view.
|
||||
switch ($viewName) {
|
||||
case 'attendees':
|
||||
case 'calendar':
|
||||
case 'categories':
|
||||
case 'categoriesdetailed':
|
||||
case 'category':
|
||||
case 'day':
|
||||
case 'editevent':
|
||||
case 'editvenue':
|
||||
case 'event':
|
||||
case 'eventslist':
|
||||
case 'myattendances':
|
||||
case 'myevents':
|
||||
case 'myvenues':
|
||||
case 'search':
|
||||
case 'venue':
|
||||
case 'venues':
|
||||
case 'venueslist':
|
||||
case 'mailto':
|
||||
case 'weekcal':
|
||||
$model = $this->getModel($viewName);
|
||||
break;
|
||||
default:
|
||||
$model = $this->getModel('eventslist');
|
||||
break;
|
||||
}
|
||||
|
||||
// Push the model into the view
|
||||
if ($viewName == 'venue') {
|
||||
$model1 = $this->getModel('Venue');
|
||||
$model2 = $this->getModel('VenueCal');
|
||||
|
||||
$view->setModel($model1, true);
|
||||
$view->setModel($model2);
|
||||
} elseif($viewName == 'category') {
|
||||
$model1 = $this->getModel('Category');
|
||||
$model2 = $this->getModel('CategoryCal');
|
||||
|
||||
$view->setModel($model1, true);
|
||||
$view->setModel($model2);
|
||||
} else {
|
||||
$view->setModel($model, true);
|
||||
}
|
||||
|
||||
$view->setLayout($layoutName);
|
||||
|
||||
// Push document object into the view.
|
||||
$view->document = $document;
|
||||
|
||||
JemHelper::loadIconFont();
|
||||
|
||||
$view->display();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* for attachment downloads
|
||||
*/
|
||||
public function getfile()
|
||||
{
|
||||
// Check for request forgeries
|
||||
Session::checkToken('request') or jexit('Invalid Token');
|
||||
|
||||
$id = Factory::getApplication()->input->getInt('file', 0);
|
||||
$path = JemAttachment::getAttachmentPath($id);
|
||||
|
||||
header("Content-Type: application/application/octet-stream\n");
|
||||
header('Content-Disposition: attachment; filename="' . basename($path) . '"');
|
||||
|
||||
ob_clean();
|
||||
ob_end_flush();
|
||||
readfile($path);
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete attachment
|
||||
*
|
||||
* @return true on sucess
|
||||
* @access public
|
||||
*/
|
||||
public function ajaxattachremove()
|
||||
{
|
||||
// Check for request forgeries
|
||||
Session::checkToken('request') or jexit('Invalid Token');
|
||||
|
||||
$jemsettings = JemHelper::config();
|
||||
$res = 0;
|
||||
|
||||
if ($jemsettings->attachmentenabled > 0) {
|
||||
$id = Factory::getApplication()->input->getInt('id', 0);
|
||||
$res = JemAttachment::remove($id);
|
||||
} // else don't delete anything
|
||||
|
||||
if (!$res) {
|
||||
echo 0; // The caller expects an answer!
|
||||
jexit();
|
||||
}
|
||||
|
||||
$cache = Factory::getCache('com_jem');
|
||||
$cache->clean();
|
||||
|
||||
echo 1; // The caller expects an answer!
|
||||
jexit();
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove image
|
||||
* @deprecated since version 1.9.7
|
||||
*/
|
||||
public function ajaximageremove()
|
||||
{
|
||||
// prevent unwanted usage
|
||||
jexit();
|
||||
}
|
||||
}
|
||||
?>
|
||||
358
components/com_jem/controllers/attendees.php
Normal file
358
components/com_jem/controllers/attendees.php
Normal file
@ -0,0 +1,358 @@
|
||||
<?php
|
||||
/**
|
||||
* @package JEM
|
||||
* @copyright (C) 2013-2024 joomlaeventmanager.net
|
||||
* @copyright (C) 2005-2009 Christoph Lukes
|
||||
* @license https://www.gnu.org/licenses/gpl-3.0 GNU/GPL
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\MVC\Controller\BaseController;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\HTML\HTMLHelper;
|
||||
use Joomla\CMS\Plugin\PluginHelper;
|
||||
use Joomla\CMS\Router\Route;
|
||||
use Joomla\CMS\Session\Session;
|
||||
use Joomla\CMS\Log\Log;
|
||||
|
||||
/**
|
||||
* JEM Component Attendees Controller
|
||||
*
|
||||
* @package JEM
|
||||
*
|
||||
*/
|
||||
class JemControllerAttendees extends BaseController
|
||||
{
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
}
|
||||
|
||||
/**
|
||||
* redirect to events page
|
||||
*/
|
||||
public function back()
|
||||
{
|
||||
$this->setRedirect(Route::_(JemHelperRoute::getMyEventsRoute(), false));
|
||||
$this->redirect();
|
||||
}
|
||||
|
||||
/**
|
||||
* addtask
|
||||
*/
|
||||
public function attendeeadd()
|
||||
{
|
||||
// Check for request forgeries
|
||||
Session::checkToken('request') or jexit('Invalid Token');
|
||||
|
||||
$jinput = Factory::getApplication()->input;
|
||||
$eventid = $jinput->getInt('id', 0);
|
||||
$status = $jinput->getInt('status', 0);
|
||||
$checkseries = $jinput->getString('series', '');
|
||||
$comment = '';
|
||||
$fid = $jinput->getInt('Itemid', 0);
|
||||
$uids = explode(',', $jinput->getString('uids', ''));
|
||||
\Joomla\Utilities\ArrayHelper::toInteger($uids);
|
||||
$uids = array_filter($uids);
|
||||
$uids = array_unique($uids);
|
||||
$total = is_array($uids) ? count($uids) : 0;
|
||||
$msg = '';
|
||||
|
||||
if ($jinput->get('task', 0,'string')=="attendeeadd") {
|
||||
$places = $jinput->input->getInt('places', 0);
|
||||
} else {
|
||||
if ($status == 1)
|
||||
{
|
||||
$places = $jinput->input->getInt('addplaces', 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
$places = $jinput->input->getInt('cancelplaces', 0);
|
||||
}
|
||||
}
|
||||
|
||||
if($checkseries == "on"){
|
||||
$checkseries = 1;
|
||||
}else{
|
||||
$checkseries = 0;
|
||||
}
|
||||
|
||||
JemHelper::addLogEntry("Got attendee add - event: {$eventid}, status: {$status}, users: " . implode(',', $uids), __METHOD__, Log::DEBUG);
|
||||
|
||||
if ($total < 1) {
|
||||
$msg = '0 ' . Text::_('COM_JEM_REGISTERED_USERS_ADDED');
|
||||
} else {
|
||||
PluginHelper::importPlugin('jem');
|
||||
$dispatcher = JemFactory::getDispatcher();
|
||||
|
||||
// We have to check all users first if there are already records for given event.
|
||||
// If not we have to add the records and than on success send the emails.
|
||||
$modelEventItem = $this->getModel('event');
|
||||
$modelAttendees = $this->getModel('attendees'); // required to ensure JemModelAttendees is loaded
|
||||
$regs = JemModelAttendees::getRegisteredUsers($eventid);
|
||||
$errMsgs = array();
|
||||
$errMsg = '';
|
||||
$skip = 0;
|
||||
$error = 0;
|
||||
$changed = 0;
|
||||
|
||||
// Get event
|
||||
try {
|
||||
$event = $modelEventItem->getItem($eventId);
|
||||
}
|
||||
catch (Exception $e) {
|
||||
$event = false;
|
||||
}
|
||||
|
||||
// If event has 'seriesbooking' active and $series is true then get all recurrence events of series from now (register or unregister)
|
||||
if($event->recurrence_type){
|
||||
if(($event->seriesbooking && $checkseries)) {
|
||||
$events = $modelEventItem->getListRecurrenceEventsbyId($eventid, $event->recurrence_first_id, time());
|
||||
}
|
||||
}
|
||||
|
||||
if (!isset($events) || !count ($events)){
|
||||
$events [] = clone $event;
|
||||
}
|
||||
|
||||
foreach ($events as $key => $row) {
|
||||
|
||||
$skip = $error = $changed = 0;
|
||||
|
||||
foreach ($uids as $uid) {
|
||||
if (array_key_exists($uid, $regs)) {
|
||||
$reg = $regs[$uid];
|
||||
$old_status = ($reg->status == 1 && $reg->waiting == 1) ? 2 : $reg->status;
|
||||
if (!empty($reg->id) && ($old_status != $status)) {
|
||||
JemHelper::addLogEntry("Change user {$uid} already registered for event {$row->id}.", __METHOD__, Log::DEBUG);
|
||||
$reg_id = $modelEventItem->adduser($row->id, $uid, $status, $places, $comment, $errMsg, $reg->id);
|
||||
if ($reg_id) {
|
||||
$res = $dispatcher->triggerEvent('onEventUserRegistered', array($reg_id));
|
||||
++$changed;
|
||||
} else {
|
||||
JemHelper::addLogEntry(implode(' - ', array("Model returned error while changing registration of user {$uid}", $errMsg)), __METHOD__, Log::DEBUG);
|
||||
if (!empty($errMsg)) {
|
||||
$errMsgs[] = $errMsg;
|
||||
}
|
||||
++$error;
|
||||
}
|
||||
} else {
|
||||
JemHelper::addLogEntry("Skip user {$uid} already registered for event {$row->id}.", __METHOD__, Log::DEBUG);
|
||||
++$skip;
|
||||
}
|
||||
} else {
|
||||
$reg_id = $modelEventItem->adduser($row->id, $uid, $status, $places, $comment, $errMsg);
|
||||
if ($reg_id) {
|
||||
$res = $dispatcher->triggerEvent('onEventUserRegistered', array($reg_id));
|
||||
} else {
|
||||
JemHelper::addLogEntry(implode(' - ', array("Model returned error while adding user {$uid}", $errMsg)), __METHOD__, Log::DEBUG);
|
||||
if (!empty($errMsg)) {
|
||||
$errMsgs[] = $errMsg;
|
||||
}
|
||||
++$error;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$cache = Factory::getCache('com_jem');
|
||||
$cache->clean();
|
||||
|
||||
$msg = ($total - $skip - $error - $changed) . ' ' . Text::_('COM_JEM_REGISTERED_USERS_ADDED') . ' [ID: ' . $row->id . ']';
|
||||
if ($changed > 0) {
|
||||
$msg .= ', ' . $changed . ' ' . Text::_('COM_JEM_REGISTERED_USERS_CHANGED');
|
||||
}
|
||||
$errMsgs = array_unique($errMsgs);
|
||||
|
||||
if (count($errMsgs)) {
|
||||
$msg .= '<br />' . implode('<br />', $errMsgs);
|
||||
}
|
||||
}
|
||||
}
|
||||
$this->setRedirect(Route::_('index.php?option=com_jem&view=attendees&id='.$eventid.'&Itemid='.$fid, false), $msg);
|
||||
}
|
||||
|
||||
/**
|
||||
* removetask
|
||||
*/
|
||||
public function attendeeremove()
|
||||
{
|
||||
// Check for request forgeries
|
||||
Session::checkToken('request') or jexit('Invalid Token');
|
||||
|
||||
$jinput = Factory::getApplication()->input;
|
||||
$cid = $jinput->get('cid', array(), 'array');
|
||||
$id = $jinput->getInt('id', 0);
|
||||
$fid = $jinput->getInt('Itemid', 0);
|
||||
$total = is_array($cid) ? count($cid) : 0;
|
||||
|
||||
if ($total < 1) {
|
||||
throw new Exception(Text::_('COM_JEM_SELECT_ITEM_TO_DELETE'), 500);
|
||||
}
|
||||
|
||||
$modelAttendeeList = $this->getModel('attendees');
|
||||
|
||||
PluginHelper::importPlugin('jem');
|
||||
$dispatcher = JemFactory::getDispatcher();
|
||||
|
||||
$modelAttendeeItem = $this->getModel('attendee');
|
||||
|
||||
// We need information about every entry to delete for mailer.
|
||||
// But we should first delete the entry and than on success send the mails.
|
||||
foreach ($cid as $reg_id) {
|
||||
$modelAttendeeItem->setId($reg_id);
|
||||
$entry = $modelAttendeeItem->getData();
|
||||
if($modelAttendeeList->remove(array($reg_id))) {
|
||||
$res = $dispatcher->triggerEvent('onEventUserUnregistered', array($entry->event, $entry));
|
||||
} else {
|
||||
$error = true;
|
||||
}
|
||||
}
|
||||
if (!empty($error)) {
|
||||
echo "<script> alert('".$modelAttendeeList->getError()."'); window.history.go(-1); </script>\n";
|
||||
}
|
||||
|
||||
$cache = Factory::getCache('com_jem');
|
||||
$cache->clean();
|
||||
|
||||
$msg = $total.' '.Text::_('COM_JEM_REGISTERED_USERS_DELETED');
|
||||
|
||||
$this->setRedirect(Route::_('index.php?option=com_jem&view=attendees&id='.$id.'&Itemid='.$fid, false), $msg);
|
||||
}
|
||||
|
||||
///@todo Add function to change registration status.
|
||||
|
||||
/**
|
||||
* toggletask
|
||||
*/
|
||||
public function attendeetoggle()
|
||||
{
|
||||
// Check for request forgeries
|
||||
Session::checkToken('request') or jexit('Invalid Token');
|
||||
|
||||
$jinput = Factory::getApplication()->input;
|
||||
$id = $jinput->getInt('id', 0);
|
||||
$fid = $jinput->getInt('Itemid', 0);
|
||||
|
||||
$model = $this->getModel('attendee');
|
||||
$model->setId($id);
|
||||
|
||||
$attendee = $model->getData();
|
||||
$res = $model->toggle();
|
||||
|
||||
$type = 'message';
|
||||
|
||||
if ($res)
|
||||
{
|
||||
PluginHelper::importPlugin('jem');
|
||||
$dispatcher = JemFactory::getDispatcher();
|
||||
$res = $dispatcher->triggerEvent('onUserOnOffWaitinglist', array($id));
|
||||
|
||||
if ($attendee->waiting) {
|
||||
$msg = Text::_('COM_JEM_ADDED_TO_ATTENDING');
|
||||
} else {
|
||||
$msg = Text::_('COM_JEM_ADDED_TO_WAITING');
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$msg = Text::_('COM_JEM_WAITINGLIST_TOGGLE_ERROR').': '.$model->getError();
|
||||
$type = 'error';
|
||||
}
|
||||
|
||||
$this->setRedirect(Route::_('index.php?option=com_jem&view=attendees&id='.$attendee->event.'&Itemid='.$fid, false), $msg, $type);
|
||||
$this->redirect();
|
||||
}
|
||||
|
||||
/**
|
||||
* Exporttask
|
||||
* view: attendees
|
||||
*/
|
||||
public function export()
|
||||
{
|
||||
// Check for request forgeries
|
||||
Session::checkToken('request') or jexit('Invalid Token');
|
||||
|
||||
$app = Factory::getApplication();
|
||||
$params = $app->getParams();
|
||||
$jemconfig = JemConfig::getInstance()->toRegistry();
|
||||
|
||||
$enableemailadress = $params->get('enableemailaddress', 0);
|
||||
$separator = $jemconfig->get('csv_separator', ';');
|
||||
$delimiter = $jemconfig->get('csv_delimiter', '"');
|
||||
$csv_bom = $jemconfig->get('csv_bom', '1');
|
||||
$userfield = $jemconfig->get('globalattribs.global_regname', 1) ? 'name' : 'username';
|
||||
$comments = $jemconfig->get('regallowcomments', 0);
|
||||
|
||||
$model = $this->getModel('attendees');
|
||||
$datas = $model->getData();
|
||||
$event = $model->getEvent();
|
||||
$waitinglist = isset($event->waitinglist) ? $event->waitinglist : false;
|
||||
|
||||
header('Content-Type: text/csv; charset=utf-8');
|
||||
header('Expires: ' . gmdate('D, d M Y H:i:s') . ' GMT');
|
||||
header('Content-Disposition: attachment; filename=attendees_event_' . $event->id . '.csv');
|
||||
header('Pragma: no-cache');
|
||||
|
||||
$export = fopen('php://output', 'w');
|
||||
ob_end_clean();
|
||||
if ($csv_bom ==1 ) {
|
||||
//add BOM to fix UTF-8 in Excel
|
||||
fputs($export, $bom =( chr(0xEF) . chr(0xBB) . chr(0xBF) ));
|
||||
}
|
||||
|
||||
$cols = array();
|
||||
$cols[] = Text::_('COM_JEM_NUM');
|
||||
$cols[] = Text::_($jemconfig->get('globalattribs.global_regname', 1) ? 'COM_JEM_NAME' : 'COM_JEM_USERNAME');
|
||||
if ($enableemailadress == 1) {
|
||||
$cols[] = Text::_('COM_JEM_EMAIL');
|
||||
}
|
||||
$cols[] = Text::_('COM_JEM_REGDATE');
|
||||
$cols[] = Text::_('COM_JEM_STATUS');
|
||||
$cols[] = Text::_('COM_JEM_PLACES');
|
||||
if ($comments) {
|
||||
$cols[] = Text::_('COM_JEM_COMMENT');
|
||||
}
|
||||
|
||||
fputcsv($export, $cols, $separator, $delimiter);
|
||||
|
||||
$i = 0;
|
||||
foreach ($datas as $data)
|
||||
{
|
||||
$cols = array();
|
||||
|
||||
$cols[] = ++$i;
|
||||
$cols[] = $data->$userfield;
|
||||
if ($enableemailadress == 1) {
|
||||
$cols[] = $data->email;
|
||||
}
|
||||
$cols[] = empty($data->uregdate) ? '' : HTMLHelper::_('date',$data->uregdate, Text::_('DATE_FORMAT_LC5'));
|
||||
|
||||
$status = isset($data->status) ? $data->status : 1;
|
||||
if ($status < 0) {
|
||||
$txt_stat = 'COM_JEM_ATTENDEES_NOT_ATTENDING';
|
||||
} elseif ($status > 0) {
|
||||
$txt_stat = $data->waiting ? 'COM_JEM_ATTENDEES_ON_WAITINGLIST' : 'COM_JEM_ATTENDEES_ATTENDING';
|
||||
} else {
|
||||
$txt_stat = 'COM_JEM_ATTENDEES_INVITED';
|
||||
}
|
||||
$cols[] = Text::_($txt_stat);
|
||||
$cols[] = $data->places;
|
||||
if ($comments) {
|
||||
$comment = strip_tags($data->comment);
|
||||
// comments are limited to 255 characters in db so we don't need to truncate them on export
|
||||
$cols[] = $comment;
|
||||
}
|
||||
|
||||
fputcsv($export, $cols, $separator, $delimiter);
|
||||
}
|
||||
|
||||
fclose($export);
|
||||
$app->close();
|
||||
}
|
||||
}
|
||||
?>
|
||||
376
components/com_jem/controllers/event.php
Normal file
376
components/com_jem/controllers/event.php
Normal file
@ -0,0 +1,376 @@
|
||||
<?php
|
||||
/**
|
||||
* @package JEM
|
||||
* @copyright (C) 2013-2024 joomlaeventmanager.net
|
||||
* @copyright (C) 2005-2009 Christoph Lukes
|
||||
* @license https://www.gnu.org/licenses/gpl-3.0 GNU/GPL
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Uri\Uri;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\Plugin\PluginHelper;
|
||||
use Joomla\CMS\Router\Route;
|
||||
use Joomla\CMS\Session\Session;
|
||||
|
||||
require_once (JPATH_COMPONENT_SITE.'/classes/controller.form.class.php');
|
||||
|
||||
/**
|
||||
* Event Controller
|
||||
*/
|
||||
class JemControllerEvent extends JemControllerForm
|
||||
{
|
||||
protected $view_item = 'editevent';
|
||||
protected $view_list = 'eventslist';
|
||||
protected $_id = 0;
|
||||
|
||||
/**
|
||||
* Method to add a new record.
|
||||
*
|
||||
* @return boolean True if the event can be added, false if not.
|
||||
*/
|
||||
public function add()
|
||||
{
|
||||
if (!parent::add()) {
|
||||
// Redirect to the return page.
|
||||
$this->setRedirect($this->getReturnPage());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Method override to check if you can add a new record.
|
||||
*
|
||||
* @param array An array of input data.
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
protected function allowAdd($data = array())
|
||||
{
|
||||
// Initialise variables.
|
||||
$user = JemFactory::getUser();
|
||||
$categoryId = \Joomla\Utilities\ArrayHelper::getValue($data, 'catid', Factory::getApplication()->input->getInt('catid', 0), 'int');
|
||||
|
||||
if ($user->can('add', 'event', false, $categoryId ? $categoryId : false)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
// In the absense of better information, revert to the component permissions.
|
||||
return parent::allowAdd();
|
||||
}
|
||||
|
||||
/**
|
||||
* Method override to check if you can edit an existing record.
|
||||
*
|
||||
* @param array $data An array of input data.
|
||||
* @param string $key The name of the key for the primary key.
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
protected function allowEdit($data = array(), $key = 'id')
|
||||
{
|
||||
// Initialise variables.
|
||||
$recordId = (int) isset($data[$key]) ? $data[$key] : 0;
|
||||
$user = JemFactory::getUser();
|
||||
|
||||
if (isset($data['access'])) {
|
||||
$access = $data['access'];
|
||||
} else {
|
||||
$record = $this->getModel()->getItem($recordId);
|
||||
$access = isset($record->access) ? $record->access : 0;
|
||||
}
|
||||
|
||||
if (!in_array($access, $user->getAuthorisedViewLevels())) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (isset($data['created_by'])) {
|
||||
$created_by = $data['created_by'];
|
||||
} else {
|
||||
$record = $this->getModel()->getItem($recordId);
|
||||
$created_by = isset($record->created_by) ? $record->created_by : false;
|
||||
}
|
||||
|
||||
if ($user->can('edit', 'event', $recordId, $created_by)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
// Since there is no asset tracking, revert to the component permissions.
|
||||
return parent::allowEdit($data, $key);
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to cancel an edit.
|
||||
*
|
||||
* @param string $key The name of the primary key of the URL variable.
|
||||
*
|
||||
* @return boolean True if access level checks pass, false otherwise.
|
||||
*/
|
||||
public function cancel($key = 'a_id')
|
||||
{
|
||||
// Check for request forgeries
|
||||
Session::checkToken() or jexit('Invalid Token');
|
||||
|
||||
parent::cancel($key);
|
||||
|
||||
// Redirect to the return page.
|
||||
$this->setRedirect($this->getReturnPage());
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to edit an existing record.
|
||||
*
|
||||
* @param string $key The name of the primary key of the URL variable.
|
||||
* @param string $urlVar The name of the URL variable if different from the primary key (sometimes required to avoid router collisions).
|
||||
*
|
||||
* @return boolean True if access level check and checkout passes, false otherwise.
|
||||
*/
|
||||
public function edit($key = null, $urlVar = 'a_id')
|
||||
{
|
||||
$result = parent::edit($key, $urlVar);
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to add a new record based on existing record.
|
||||
*
|
||||
* @return boolean True if the event can be added, false if not.
|
||||
*/
|
||||
public function copy()
|
||||
{
|
||||
if (!parent::add()) {
|
||||
// Redirect to the return page.
|
||||
$this->setRedirect($this->getReturnPage());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to get a model object, loading it if required.
|
||||
*
|
||||
* @param string $name The model name. Optional.
|
||||
* @param string $prefix The class prefix. Optional.
|
||||
* @param array $config Configuration array for model. Optional.
|
||||
*
|
||||
* @return object The model.
|
||||
*/
|
||||
public function getModel($name = 'editevent', $prefix = '', $config = array('ignore_request' => true))
|
||||
{
|
||||
$model = parent::getModel($name, $prefix, $config);
|
||||
|
||||
return $model;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the URL arguments to append to an item redirect.
|
||||
*
|
||||
* @param int $recordId The primary key id for the item.
|
||||
* @param string $urlVar The name of the URL variable for the id.
|
||||
*
|
||||
* @return string The arguments to append to the redirect URL.
|
||||
*/
|
||||
protected function getRedirectToItemAppend($recordId = null, $urlVar = 'a_id')
|
||||
{
|
||||
// Need to override the parent method completely.
|
||||
$jinput = Factory::getApplication()->input;
|
||||
$tmpl = $jinput->getCmd('tmpl', '');
|
||||
$layout = $jinput->getCmd('layout', 'edit');
|
||||
$task = $jinput->getCmd('task', '');
|
||||
$append = '';
|
||||
|
||||
// Setup redirect info.
|
||||
if ($tmpl) {
|
||||
$append .= '&tmpl='.$tmpl;
|
||||
}
|
||||
|
||||
$append .= '&layout=edit';
|
||||
|
||||
if ($recordId) {
|
||||
$append .= '&'.$urlVar.'='.$recordId;
|
||||
}
|
||||
elseif (($task === 'copy') && ($fromId = $jinput->getInt('a_id', 0))) {
|
||||
$append .= '&from_id='.$fromId;
|
||||
}
|
||||
|
||||
$itemId = $jinput->getInt('Itemid', 0);
|
||||
$catId = $jinput->getInt('catid', 0);
|
||||
$locId = $jinput->getInt('locid', 0);
|
||||
$date = $jinput->getCmd('date', '');
|
||||
$return = $this->getReturnPage();
|
||||
|
||||
if ($itemId) {
|
||||
$append .= '&Itemid='.$itemId;
|
||||
}
|
||||
|
||||
if ($catId) {
|
||||
$append .= '&catid='.$catId;
|
||||
}
|
||||
|
||||
if ($locId) {
|
||||
$append .= '&locid='.$locId;
|
||||
}
|
||||
|
||||
if ($date) {
|
||||
$append .= '&date='.$date;
|
||||
}
|
||||
|
||||
if ($return) {
|
||||
$append .= '&return='.base64_encode($return);
|
||||
}
|
||||
|
||||
return $append;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the return URL.
|
||||
*
|
||||
* If a "return" variable has been passed in the request
|
||||
*
|
||||
* @return string The return URL.
|
||||
*/
|
||||
protected function getReturnPage()
|
||||
{
|
||||
$uri = Uri::getInstance();
|
||||
$return = Factory::getApplication()->input->get('return', null, 'base64');
|
||||
|
||||
if (empty($return) || !Uri::isInternal(base64_decode($return))) {
|
||||
if (!empty($this->_id)) {
|
||||
return Route::_(JemHelperRoute::getEventRoute($this->_id));
|
||||
}
|
||||
return $uri->base();
|
||||
}
|
||||
else {
|
||||
return base64_decode($return);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Function that allows child controller access to model data
|
||||
* after the data has been saved.
|
||||
* Here used to trigger the jem plugins, mainly the mailer.
|
||||
*
|
||||
* @param JModel(Legacy) $model The data model object.
|
||||
* @param array $validData The validated data.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
protected function _postSaveHook($model, $validData = array())
|
||||
{
|
||||
$task = $this->getTask();
|
||||
if ($task == 'save') {
|
||||
$isNew = $model->getState('editevent.new');
|
||||
$this->_id = $model->getState('editevent.id');
|
||||
|
||||
// trigger all jem plugins
|
||||
PluginHelper::importPlugin('jem');
|
||||
$dispatcher = JemFactory::getDispatcher();
|
||||
$dispatcher->triggerEvent('onEventEdited', array($this->_id, $isNew));
|
||||
|
||||
// but show warning if mailer is disabled
|
||||
if (!PluginHelper::isEnabled('jem', 'mailer')) {
|
||||
Factory::getApplication()->enqueueMessage(Text::_('COM_JEM_GLOBAL_MAILERPLUGIN_DISABLED'), 'notice');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to save a record.
|
||||
*
|
||||
* @param string $key The name of the primary key of the URL variable.
|
||||
* @param string $urlVar The name of the URL variable if different from the primary key (sometimes required to avoid router collisions).
|
||||
*
|
||||
* @return boolean True if successful, false otherwise.
|
||||
*/
|
||||
public function save($key = null, $urlVar = 'a_id')
|
||||
{
|
||||
// echo "<pre/>";print_R($_POST);die;
|
||||
// Check for request forgeries
|
||||
Session::checkToken() or jexit('Invalid Token');
|
||||
|
||||
$result = parent::save($key, $urlVar);
|
||||
|
||||
// If ok, redirect to the return page.
|
||||
if ($result) {
|
||||
$this->setRedirect($this->getReturnPage());
|
||||
}
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Saves the registration to the database
|
||||
*/
|
||||
public function userregister()
|
||||
{
|
||||
// Check for request forgeries
|
||||
Session::checkToken() or jexit('Invalid Token');
|
||||
|
||||
$id = Factory::getApplication()->input->getInt('rdid', 0);
|
||||
$rid = Factory::getApplication()->input->getInt('regid', 0);
|
||||
|
||||
// Get the model
|
||||
$model = $this->getModel('Event', 'JemModel');
|
||||
|
||||
$reg = $model->getUserRegistration($id);
|
||||
if ($reg !== false && $reg->id != $rid) {
|
||||
$msg = Text::_('COM_JEM_ALREADY_REGISTERED') . ' [id: ' . $reg->id . ']';
|
||||
$this->setRedirect(Route::_(JemHelperRoute::getEventRoute($id), false), $msg, 'error');
|
||||
$this->redirect();
|
||||
return;
|
||||
}
|
||||
|
||||
$model->setId($id);
|
||||
$register_id = $model->userregister();
|
||||
|
||||
if (!$register_id)
|
||||
{
|
||||
$msg = $model->getError();
|
||||
$this->setRedirect(Route::_(JemHelperRoute::getEventRoute($id), false), $msg, 'error');
|
||||
$this->redirect();
|
||||
return;
|
||||
}
|
||||
|
||||
JemHelper::updateWaitingList($id);
|
||||
|
||||
PluginHelper::importPlugin('jem');
|
||||
$dispatcher = JemFactory::getDispatcher();
|
||||
$dispatcher->triggerEvent('onEventUserRegistered', array($register_id, $reg->places));
|
||||
|
||||
$cache = Factory::getCache('com_jem');
|
||||
$cache->clean();
|
||||
|
||||
$msg = Text::_('COM_JEM_REGISTRATION_THANKS_FOR_RESPONSE');
|
||||
|
||||
$this->setRedirect(Route::_(JemHelperRoute::getEventRoute($id), false), $msg);
|
||||
}
|
||||
|
||||
/**
|
||||
* Deletes a registered user
|
||||
*/
|
||||
public function delreguser()
|
||||
{
|
||||
// Check for request forgeries
|
||||
Session::checkToken() or jexit('Invalid Token');
|
||||
|
||||
$id = Factory::getApplication()->input->getInt('rdid', 0);
|
||||
|
||||
// Get/Create the model
|
||||
$model = $this->getModel('Event', 'JemModel');
|
||||
|
||||
$model->setId($id);
|
||||
$model->delreguser();
|
||||
|
||||
JemHelper::updateWaitingList($id);
|
||||
|
||||
PluginHelper::importPlugin('jem');
|
||||
$dispatcher = JemFactory::getDispatcher();
|
||||
$dispatcher->triggerEvent('onEventUserUnregistered', array($id));
|
||||
|
||||
$cache = Factory::getCache('com_jem');
|
||||
$cache->clean();
|
||||
|
||||
$msg = Text::_('COM_JEM_UNREGISTERED_SUCCESSFULL');
|
||||
$this->setRedirect(Route::_(JemHelperRoute::getEventRoute($id), false), $msg);
|
||||
}
|
||||
}
|
||||
1
components/com_jem/controllers/index.html
Normal file
1
components/com_jem/controllers/index.html
Normal file
@ -0,0 +1 @@
|
||||
<!DOCTYPE html><title></title>
|
||||
165
components/com_jem/controllers/mailto.php
Normal file
165
components/com_jem/controllers/mailto.php
Normal file
@ -0,0 +1,165 @@
|
||||
<?php
|
||||
/**
|
||||
* @package JEM
|
||||
* @copyright (C) 2013-2024 joomlaeventmanager.net
|
||||
* @copyright (C) 2005-2009 Christoph Lukes
|
||||
* @license https://www.gnu.org/licenses/gpl-3.0 GNU/GPL
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Uri\Uri;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\Session\Session;
|
||||
|
||||
require_once (JPATH_COMPONENT_SITE.'/classes/controller.form.class.php');
|
||||
|
||||
/**
|
||||
* Event Controller
|
||||
*/
|
||||
class JemControllerMailto extends JemControllerForm
|
||||
{
|
||||
// protected $view_item = 'editevent';
|
||||
// protected $view_list = 'eventslist';
|
||||
protected $_id = 0;
|
||||
|
||||
|
||||
public function getModel($name = 'mailto', $prefix = '', $config = array('ignore_request' => true))
|
||||
{
|
||||
$model = parent::getModel($name, $prefix, $config);
|
||||
|
||||
return $model;
|
||||
}
|
||||
|
||||
public function save($key = NULL, $urlVar = NULL){
|
||||
Session::checkToken() or jexit(Text::_('JINVALID_TOKEN'));
|
||||
|
||||
$app = Factory::getApplication();
|
||||
$model = $this->getModel('mailto');
|
||||
$data = $model->getData();
|
||||
$uri = Uri::getInstance();
|
||||
$form = $model->getForm();
|
||||
$post_link = $this->input->post->get('link', '', 'post');
|
||||
$currentUri = $uri->toString() . '&link='.$post_link;
|
||||
|
||||
if (!$form)
|
||||
{
|
||||
$app->enqueueMessage($model->getError(), 'error');
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!$model->validate($form, $data))
|
||||
{
|
||||
$errors = $model->getErrors();
|
||||
|
||||
foreach ($errors as $error)
|
||||
{
|
||||
$errorMessage = $error;
|
||||
|
||||
if ($error instanceof Exception)
|
||||
{
|
||||
$errorMessage = $error->getMessage();
|
||||
}
|
||||
|
||||
$app->enqueueMessage($errorMessage, 'error');
|
||||
}
|
||||
|
||||
$this->setRedirect($currentUri);
|
||||
}
|
||||
|
||||
$headers = array (
|
||||
'Content-Type:',
|
||||
'MIME-Version:',
|
||||
'Content-Transfer-Encoding:',
|
||||
'bcc:',
|
||||
'cc:'
|
||||
);
|
||||
foreach ($data as $key => $value)
|
||||
{
|
||||
foreach ($headers as $header)
|
||||
{
|
||||
if (is_string($value) && strpos($value, $header) !== false)
|
||||
{
|
||||
$app->enqueueMessage(403, 'error');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
unset($headers, $fields);
|
||||
|
||||
$siteName = $app->get('sitename');
|
||||
$link = JemMailtoHelper::validateHash($this->input->post->get('link', '', 'post'));
|
||||
|
||||
// Verify that this is a local link
|
||||
if (!$link || !Uri::isInternal($link))
|
||||
{
|
||||
// Non-local url...
|
||||
$app->enqueueMessage( Text::_('COM_JEM_MAILTO_EMAIL_NOT_SENT'), 'error');
|
||||
$this->setRedirect($currentUri);
|
||||
}
|
||||
|
||||
$subject_default = Text::sprintf('COM_JEM_MAILTO_SENT_BY', $data['sender']);
|
||||
$subject = $data['subject'] !== '' ? $data['subject'] : $subject_default;
|
||||
$error = false;
|
||||
|
||||
if (!$data['emailto'] || !JMailHelper::isEmailAddress($data['emailto']))
|
||||
{
|
||||
$error = Text::sprintf('COM_JEM_MAILTO_EMAIL_INVALID', $data['emailto']);
|
||||
|
||||
$app->enqueueMessage( $error, 'error');
|
||||
}
|
||||
|
||||
// Check for a valid from address
|
||||
if (!$data['emailfrom'] || !JMailHelper::isEmailAddress($data['emailfrom']))
|
||||
{
|
||||
$error = Text::sprintf('COM_JEM_MAILTO_EMAIL_INVALID', $data['emailfrom']);
|
||||
|
||||
$app->enqueueMessage( $error, 'error');
|
||||
}
|
||||
|
||||
if ($error)
|
||||
{
|
||||
return $this->setRedirect($currentUri);
|
||||
return false;
|
||||
}
|
||||
$msg = Text::_('COM_JEM_MAILTO_EMAIL_MSG');
|
||||
$body = sprintf($msg, $siteName, $data['sender'], $data['emailfrom'], $link);
|
||||
|
||||
// To send we need to use punycode.
|
||||
$data['emailfrom'] = JStringPunycode::emailToPunycode($data['emailfrom']);
|
||||
$data['emailfrom'] = JMailHelper::cleanAddress($data['emailfrom']);
|
||||
$data['emailto'] = JStringPunycode::emailToPunycode($data['emailto']);
|
||||
$from = array($data['emailfrom'], $data['sender']);
|
||||
|
||||
// Clean the email data
|
||||
$subject = JMailHelper::cleanSubject($subject);
|
||||
$body = JMailHelper::cleanBody($body);
|
||||
|
||||
//--------------start new code ------------
|
||||
$mailer = Factory::getMailer();
|
||||
$mailer->setSender($from);
|
||||
$mailer->addRecipient($data['emailto']);
|
||||
$mailer->setSubject($subject);
|
||||
$mailer->setBody($body);
|
||||
$mailer->isHTML();
|
||||
try{
|
||||
if (!$mailer->send())
|
||||
{
|
||||
$app->enqueueMessage( Text::_('COM_JEM_MAILTO_EMAIL_NOT_SENT'), 'error');
|
||||
$this->setRedirect($currentUri);
|
||||
return false;
|
||||
}
|
||||
}catch(Exception $e){
|
||||
$app->enqueueMessage($e->getMessage(), 'notice');
|
||||
$this->setRedirect($currentUri);
|
||||
return false;
|
||||
}
|
||||
$currentUri .= '&layout=sent';
|
||||
$this->setRedirect($currentUri);
|
||||
//--------------end new code ------------
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
128
components/com_jem/controllers/myevents.php
Normal file
128
components/com_jem/controllers/myevents.php
Normal file
@ -0,0 +1,128 @@
|
||||
<?php
|
||||
/**
|
||||
* @package JEM
|
||||
* @copyright (C) 2013-2024 joomlaeventmanager.net
|
||||
* @copyright (C) 2005-2009 Christoph Lukes
|
||||
* @license https://www.gnu.org/licenses/gpl-3.0 GNU/GPL
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\MVC\Controller\BaseController;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\Session\Session;
|
||||
|
||||
/**
|
||||
* JEM Component Myevents Controller
|
||||
*
|
||||
* @package JEM
|
||||
*
|
||||
*/
|
||||
class JemControllerMyevents extends BaseController
|
||||
{
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
}
|
||||
|
||||
/**
|
||||
* Logic to publish events
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function publish()
|
||||
{
|
||||
// Check for request forgeries
|
||||
Session::checkToken() or jexit('Invalid Token');
|
||||
|
||||
$app = Factory::getApplication();
|
||||
$input = $app->input;
|
||||
|
||||
$cid = $input->get('cid', array(), 'array');
|
||||
|
||||
if (empty($cid)) {
|
||||
Factory::getApplication()->enqueueMessage(Text::_('COM_JEM_SELECT_ITEM_TO_PUBLISH'), 'notice');
|
||||
$this->setRedirect(JemHelperRoute::getMyEventsRoute());
|
||||
return;
|
||||
}
|
||||
|
||||
$model = $this->getModel('myevents');
|
||||
if (!$model->publish($cid, 1)) {
|
||||
echo "<script> alert('".$model->getError()."'); window.history.go(-1); </script>\n";
|
||||
}
|
||||
|
||||
$total = count($cid);
|
||||
$msg = $total.' '.Text::_('COM_JEM_EVENT_PUBLISHED');
|
||||
|
||||
$this->setRedirect(JemHelperRoute::getMyEventsRoute(), $msg);
|
||||
}
|
||||
|
||||
/**
|
||||
* Logic for canceling an event and proceed to add a venue
|
||||
*/
|
||||
public function unpublish()
|
||||
{
|
||||
// Check for request forgeries
|
||||
Session::checkToken() or jexit('Invalid Token');
|
||||
|
||||
$app = Factory::getApplication();
|
||||
$input = $app->input;
|
||||
|
||||
$cid = $input->get('cid', array(), 'array');
|
||||
|
||||
if (empty($cid)) {
|
||||
Factory::getApplication()->enqueueMessage(Text::_('COM_JEM_SELECT_ITEM_TO_UNPUBLISH'), 'notice');
|
||||
$this->setRedirect(JemHelperRoute::getMyEventsRoute());
|
||||
return;
|
||||
}
|
||||
|
||||
$model = $this->getModel('myevents');
|
||||
if (!$model->publish($cid, 0)) {
|
||||
echo "<script> alert('".$model->getError()."'); window.history.go(-1); </script>\n";
|
||||
}
|
||||
|
||||
$total = count($cid);
|
||||
$msg = $total.' '.Text::_('COM_JEM_EVENT_UNPUBLISHED');
|
||||
|
||||
$this->setRedirect(JemHelperRoute::getMyEventsRoute(), $msg);
|
||||
}
|
||||
|
||||
/**
|
||||
* Logic to trash events
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function trash()
|
||||
{
|
||||
// Check for request forgeries
|
||||
Session::checkToken() or jexit('Invalid Token');
|
||||
|
||||
$app = Factory::getApplication();
|
||||
$input = $app->input;
|
||||
|
||||
$cid = $input->get('cid', array(), 'array');
|
||||
|
||||
if (empty($cid)) {
|
||||
Factory::getApplication()->enqueueMessage(Text::_('COM_JEM_SELECT_ITEM_TO_TRASH'), 'notice');
|
||||
$this->setRedirect(JemHelperRoute::getMyEventsRoute());
|
||||
return;
|
||||
}
|
||||
|
||||
$model = $this->getModel('myevents');
|
||||
if (!$model->publish($cid, -2)) {
|
||||
echo "<script> alert('".$model->getError()."'); window.history.go(-1); </script>\n";
|
||||
}
|
||||
|
||||
$total = count($cid);
|
||||
$msg = $total.' '.Text::_('COM_JEM_EVENT_TRASHED');
|
||||
|
||||
$this->setRedirect(JemHelperRoute::getMyEventsRoute(), $msg);
|
||||
}
|
||||
}
|
||||
?>
|
||||
97
components/com_jem/controllers/myvenues.php
Normal file
97
components/com_jem/controllers/myvenues.php
Normal file
@ -0,0 +1,97 @@
|
||||
<?php
|
||||
/**
|
||||
* @package JEM
|
||||
* @copyright (C) 2013-2024 joomlaeventmanager.net
|
||||
* @copyright (C) 2005-2009 Christoph Lukes
|
||||
* @license https://www.gnu.org/licenses/gpl-3.0 GNU/GPL
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\MVC\Controller\BaseController;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\Session\Session;
|
||||
|
||||
/**
|
||||
* JEM Component Myvenues Controller
|
||||
*
|
||||
* @package JEM
|
||||
*
|
||||
*/
|
||||
class JemControllerMyvenues extends BaseController
|
||||
{
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
}
|
||||
|
||||
/**
|
||||
* Logic to publish venues
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function publish()
|
||||
{
|
||||
$this->setStatus(1, 'COM_JEM_VENUE_PUBLISHED');
|
||||
}
|
||||
|
||||
/**
|
||||
* Logic unpublish venues
|
||||
*/
|
||||
public function unpublish()
|
||||
{
|
||||
$this->setStatus(0, 'COM_JEM_VENUE_UNPUBLISHED');
|
||||
}
|
||||
|
||||
/**
|
||||
* Logic to trash venues - NOT SUPPORTED YET
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
/*
|
||||
public function trash()
|
||||
{
|
||||
$this->setStatus(-2, 'COM_JEM_VENUE_TRASHED');
|
||||
}
|
||||
*/
|
||||
|
||||
/**
|
||||
* Logic to publish/unpublish/trash venues
|
||||
*
|
||||
* @access protected
|
||||
* @return void
|
||||
*/
|
||||
protected function setStatus($status, $message)
|
||||
{
|
||||
// Check for request forgeries
|
||||
Session::checkToken() or jexit('Invalid Token');
|
||||
|
||||
$app = Factory::getApplication();
|
||||
$input = $app->input;
|
||||
|
||||
$cid = $input->get('cid', array(), 'array');
|
||||
|
||||
if (empty($cid)) {
|
||||
Factory::getApplication()->enqueueMessage(Text::_('COM_JEM_SELECT_ITEM_TO_PUBLISH'), 'notice');
|
||||
$this->setRedirect(JemHelperRoute::getMyVenuesRoute());
|
||||
return;
|
||||
}
|
||||
|
||||
$model = $this->getModel('myvenues');
|
||||
if (!$model->publish($cid, $status)) {
|
||||
echo "<script> alert('" . $model->getError() . "'); window.history.go(-1); </script>\n";
|
||||
}
|
||||
|
||||
$total = count($cid);
|
||||
$msg = $total . ' ' . Text::_($message);
|
||||
|
||||
$this->setRedirect(JemHelperRoute::getMyVenuesRoute(), $msg);
|
||||
}
|
||||
}
|
||||
?>
|
||||
275
components/com_jem/controllers/venue.php
Normal file
275
components/com_jem/controllers/venue.php
Normal file
@ -0,0 +1,275 @@
|
||||
<?php
|
||||
/**
|
||||
* @package JEM
|
||||
* @copyright (C) 2013-2024 joomlaeventmanager.net
|
||||
* @copyright (C) 2005-2009 Christoph Lukes
|
||||
* @license https://www.gnu.org/licenses/gpl-3.0 GNU/GPL
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Uri\Uri;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\Plugin\PluginHelper;
|
||||
use Joomla\CMS\Session\Session;
|
||||
|
||||
require_once (JPATH_COMPONENT_SITE.'/classes/controller.form.class.php');
|
||||
|
||||
/**
|
||||
* Venue Controller
|
||||
*/
|
||||
class JemControllerVenue extends JemControllerForm
|
||||
{
|
||||
protected $view_item = 'editvenue';
|
||||
protected $view_list = 'venues';
|
||||
|
||||
/**
|
||||
* Method to add a new record.
|
||||
*
|
||||
* @return boolean True if the event can be added, false if not.
|
||||
*/
|
||||
public function add()
|
||||
{
|
||||
if (!parent::add()) {
|
||||
// Redirect to the return page.
|
||||
$this->setRedirect($this->getReturnPage());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Method override to check if you can add a new record.
|
||||
*
|
||||
* @param array An array of input data.
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
protected function allowAdd($data = array())
|
||||
{
|
||||
// Initialise variables.
|
||||
$user = JemFactory::getUser();
|
||||
// venues don't have a category yet
|
||||
//$categoryId = \Joomla\Utilities\ArrayHelper::getValue($data, 'catid', Factory::getApplication()->input->getInt('catid', 0), 'int');
|
||||
|
||||
if ($user->can('add', 'venue')) {
|
||||
return true;
|
||||
}
|
||||
|
||||
// In the absense of better information, revert to the component permissions.
|
||||
return parent::allowAdd();
|
||||
}
|
||||
|
||||
/**
|
||||
* Method override to check if you can edit an existing record.
|
||||
* @todo: check if the user is allowed to edit/save
|
||||
*
|
||||
* @param array $data An array of input data.
|
||||
* @param string $key The name of the key for the primary key.
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
protected function allowEdit($data = array(), $key = 'id')
|
||||
{
|
||||
// Initialise variables.
|
||||
$recordId = (int) isset($data[$key]) ? $data[$key] : 0;
|
||||
$user = JemFactory::getUser();
|
||||
|
||||
if (isset($data['created_by'])) {
|
||||
$created_by = $data['created_by'];
|
||||
} else {
|
||||
$record = $this->getModel()->getItem($recordId);
|
||||
$created_by = isset($record->created_by) ? $record->created_by : false;
|
||||
}
|
||||
|
||||
if ($user->can('edit', 'venue', $recordId, $created_by)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
// Since there is no asset tracking, revert to the component permissions.
|
||||
return parent::allowEdit($data, $key);
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to cancel an edit.
|
||||
*
|
||||
* @param string $key The name of the primary key of the URL variable.
|
||||
*
|
||||
* @return Boolean True if access level checks pass, false otherwise.
|
||||
*/
|
||||
public function cancel($key = 'a_id')
|
||||
{
|
||||
// Check for request forgeries
|
||||
Session::checkToken() or jexit('Invalid Token');
|
||||
|
||||
parent::cancel($key);
|
||||
|
||||
// Redirect to the return page.
|
||||
$this->setRedirect($this->getReturnPage());
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to edit an existing record.
|
||||
*
|
||||
* @param string $key The name of the primary key of the URL variable.
|
||||
* @param string $urlVar The name of the URL variable if different from the primary key (sometimes required to avoid router collisions).
|
||||
*
|
||||
* @return boolean True if access level check and checkout passes, false otherwise.
|
||||
*/
|
||||
public function edit($key = null, $urlVar = 'a_id')
|
||||
{
|
||||
$result = parent::edit($key, $urlVar);
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to add a new record based on existing record.
|
||||
*
|
||||
* @return boolean True if the venue can be added, false if not.
|
||||
*/
|
||||
public function copy()
|
||||
{
|
||||
if (!parent::add()) {
|
||||
// Redirect to the return page.
|
||||
$this->setRedirect($this->getReturnPage());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to get a model object, loading it if required.
|
||||
*
|
||||
* @param string $name The model name. Optional.
|
||||
* @param string $prefix The class prefix. Optional.
|
||||
* @param array $config Configuration array for model. Optional.
|
||||
*
|
||||
* @return object The model.
|
||||
*/
|
||||
public function getModel($name = 'editvenue', $prefix = '', $config = array('ignore_request' => true))
|
||||
{
|
||||
$model = parent::getModel($name, $prefix, $config);
|
||||
|
||||
return $model;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the URL arguments to append to an item redirect.
|
||||
*
|
||||
* @param int $recordId The primary key id for the item.
|
||||
* @param string $urlVar The name of the URL variable for the id.
|
||||
*
|
||||
* @return string The arguments to append to the redirect URL.
|
||||
*/
|
||||
protected function getRedirectToItemAppend($recordId = null, $urlVar = 'a_id')
|
||||
{
|
||||
// Need to override the parent method completely.
|
||||
$jinput = Factory::getApplication()->input;
|
||||
$tmpl = $jinput->getCmd('tmpl', '');
|
||||
$layout = $jinput->getCmd('layout', 'edit');
|
||||
$task = $jinput->getCmd('task', '');
|
||||
$append = '';
|
||||
|
||||
// Setup redirect info.
|
||||
if ($tmpl) {
|
||||
$append .= '&tmpl='.$tmpl;
|
||||
}
|
||||
|
||||
$append .= '&layout=edit';
|
||||
|
||||
if ($recordId) {
|
||||
$append .= '&'.$urlVar.'='.$recordId;
|
||||
}
|
||||
elseif (($task === 'copy') && ($fromId = $jinput->getInt('a_id', 0))) {
|
||||
$append .= '&from_id='.$fromId;
|
||||
}
|
||||
|
||||
$itemId = $jinput->getInt('Itemid', 0);
|
||||
//$catId = $jinput->getInt('catid', 0);
|
||||
$return = $this->getReturnPage();
|
||||
|
||||
if ($itemId) {
|
||||
$append .= '&Itemid='.$itemId;
|
||||
}
|
||||
|
||||
//if ($catId) {
|
||||
// $append .= '&catid='.$catId;
|
||||
//}
|
||||
|
||||
if ($return) {
|
||||
$append .= '&return='.base64_encode($return);
|
||||
}
|
||||
|
||||
return $append;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the return URL.
|
||||
*
|
||||
* If a "return" variable has been passed in the request
|
||||
*
|
||||
* @return string The return URL.
|
||||
*/
|
||||
protected function getReturnPage()
|
||||
{
|
||||
$uri = Uri::getInstance();
|
||||
$return = Factory::getApplication()->input->get('return', null, 'base64');
|
||||
|
||||
if (empty($return) || !Uri::isInternal(base64_decode($return))) {
|
||||
return $uri->base();
|
||||
}
|
||||
else {
|
||||
return base64_decode($return);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Function that allows child controller access to model data
|
||||
* after the data has been saved.
|
||||
* Here used to trigger the jem plugins, mainly the mailer.
|
||||
*
|
||||
* @param JModel(Legacy) $model The data model object.
|
||||
* @param array $validData The validated data.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
protected function _postSaveHook($model, $validData = array())
|
||||
{
|
||||
$task = $this->getTask();
|
||||
if ($task == 'save') {
|
||||
$isNew = $model->getState('editvenue.new');
|
||||
$id = $model->getState('editvenue.id');
|
||||
|
||||
// trigger all jem plugins
|
||||
PluginHelper::importPlugin('jem');
|
||||
$dispatcher = JemFactory::getDispatcher();
|
||||
$dispatcher->triggerEvent('onVenueEdited', array($id, $isNew));
|
||||
|
||||
// but show warning if mailer is disabled
|
||||
if (!PluginHelper::isEnabled('jem', 'mailer')) {
|
||||
Factory::getApplication()->enqueueMessage(Text::_('COM_JEM_GLOBAL_MAILERPLUGIN_DISABLED'), 'notice');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to save a record.
|
||||
*
|
||||
* @param string $key The name of the primary key of the URL variable.
|
||||
* @param string $urlVar The name of the URL variable if different from the primary key (sometimes required to avoid router collisions).
|
||||
*
|
||||
* @return boolean True if successful, false otherwise.
|
||||
*/
|
||||
public function save($key = null, $urlVar = 'a_id')
|
||||
{
|
||||
// Check for request forgeries
|
||||
Session::checkToken() or jexit('Invalid Token');
|
||||
|
||||
$result = parent::save($key, $urlVar);
|
||||
|
||||
// If ok, redirect to the return page.
|
||||
if ($result) {
|
||||
$this->setRedirect($this->getReturnPage());
|
||||
}
|
||||
|
||||
return $result;
|
||||
}
|
||||
}
|
||||
81
components/com_jem/factory.php
Normal file
81
components/com_jem/factory.php
Normal file
@ -0,0 +1,81 @@
|
||||
<?php
|
||||
/**
|
||||
* @package JEM
|
||||
* @copyright (C) 2013-2024 joomlaeventmanager.net
|
||||
* @license https://www.gnu.org/licenses/gpl-3.0 GNU/GPL
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\User\User;
|
||||
|
||||
// Can't use JPATH_COMPONENT_SITE because factory maybe used in module or plugin!
|
||||
require_once (JPATH_SITE.'/components/com_jem/classes/user.class.php');
|
||||
require_once (JPATH_SITE.'/components/com_jem/classes/config.class.php');
|
||||
|
||||
|
||||
/**
|
||||
* JEM Factory class
|
||||
*
|
||||
* @package JEM
|
||||
* @since 2.1.5
|
||||
*/
|
||||
abstract class JemFactory extends Factory
|
||||
{
|
||||
/**
|
||||
* Get a JEM user object.
|
||||
*
|
||||
* Returns the global {@link JemUser} object, only creating it if it doesn't already exist.
|
||||
*
|
||||
* @param integer $id The user to load - Must be an integer or null for current user.
|
||||
*
|
||||
* @return JemUser object
|
||||
*
|
||||
* @see JemUser
|
||||
* @since 2.1.5
|
||||
*/
|
||||
public static function getUser($id = null)
|
||||
{
|
||||
$app = Factory::getApplication();
|
||||
if (is_null($id))
|
||||
{
|
||||
$instance = $app->getSession()->get('user');
|
||||
$id = ($instance instanceof User) ? $instance->id : 0;
|
||||
}
|
||||
|
||||
return JemUser::getInstance($id);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the JEM configuration object.
|
||||
*
|
||||
* Returns the global {@link JemConfig} object, only creating it if it doesn't already exist.
|
||||
*
|
||||
* @return JemConfig object
|
||||
*
|
||||
* @note Because parent's getConfig() is limited to php files we don't override this function.
|
||||
*
|
||||
* @see JemConfig
|
||||
* @since 2.1.6
|
||||
*/
|
||||
public static function getJemConfig()
|
||||
{
|
||||
return JemConfig::getInstance();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the dispatcher.
|
||||
*
|
||||
* Returns the static {@link JDispatcher} or {@link JEventDispatcher} object, depending on Joomla version.
|
||||
*
|
||||
* @return JDispatcher or JEventDispatcher object
|
||||
*
|
||||
* @see JDispatcher, JEventDispatcher
|
||||
* @since 2.1.7
|
||||
*/
|
||||
public static function getDispatcher()
|
||||
{
|
||||
return Factory::getApplication();
|
||||
}
|
||||
}
|
||||
97
components/com_jem/helpers/buttons.php
Normal file
97
components/com_jem/helpers/buttons.php
Normal file
@ -0,0 +1,97 @@
|
||||
<?php
|
||||
/**
|
||||
* @package JEM
|
||||
* @copyright (C) 2013-2024 joomlaeventmanager.net
|
||||
* @copyright (C) 2005-2009 Christoph Lukes
|
||||
* @license https://www.gnu.org/licenses/gpl-3.0 GNU/GPL
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\HTML\HTMLHelper;
|
||||
use Joomla\CMS\Toolbar\ToolbarButton;
|
||||
|
||||
/**
|
||||
* Holds the logic for attachments manipulation
|
||||
*
|
||||
* @package JEM
|
||||
*/
|
||||
class JButtonFrontend extends ToolbarButton {
|
||||
|
||||
|
||||
/**
|
||||
* Button type
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $_name = 'Standard';
|
||||
|
||||
|
||||
|
||||
//Goes inside JButtonFrontend class definition.
|
||||
public function fetchButton($type = 'Standard', $name = '', $text = '', $task = '', $list = true)
|
||||
{
|
||||
$i18n_text = Text::_($text);
|
||||
$class = $this->fetchIconClass($name);
|
||||
$doTask = $this->_getCommand($text, $task, $list);
|
||||
|
||||
$html = "<a href=\"javascript: void( $doTask);\" onclick=\"$doTask\" class=\"toolbar\">\n";
|
||||
$html .= "<span class=\"$class\">\n";
|
||||
$html .= "</span>\n";
|
||||
$html .= "$i18n_text\n";
|
||||
$html .= "</a>\n";
|
||||
|
||||
return $html;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the button CSS Id
|
||||
*
|
||||
* @param string $type Unused string.
|
||||
* @param string $name Name to be used as apart of the id
|
||||
* @param string $text Button text
|
||||
* @param string $task The task associated with the button
|
||||
* @param boolean $list True to allow use of lists
|
||||
* @param boolean $hideMenu True to hide the menu on click
|
||||
*
|
||||
* @return string Button CSS Id
|
||||
*
|
||||
*
|
||||
*/
|
||||
public function fetchId($type = 'Standard', $name = '', $text = '', $task = '', $list = true, $hideMenu = false)
|
||||
{
|
||||
return $this->_parent->getName() . '-' . $name;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the JavaScript command for the button
|
||||
*
|
||||
* @param string $name The task name as seen by the user
|
||||
* @param string $task The task used by the application
|
||||
* @param boolean $list True is requires a list confirmation.
|
||||
*
|
||||
* @return string JavaScript command string
|
||||
*
|
||||
*
|
||||
*/
|
||||
protected function _getCommand($name, $task, $list)
|
||||
{
|
||||
HTMLHelper::_('behavior.framework');
|
||||
$message = Text::_('JLIB_HTML_PLEASE_MAKE_A_SELECTION_FROM_THE_LIST');
|
||||
$message = addslashes($message);
|
||||
|
||||
if ($list)
|
||||
{
|
||||
$cmd = "if (document.adminForm.boxchecked.value==0){alert('$message');}else{ Joomla.submitbutton('$task')}";
|
||||
}
|
||||
else
|
||||
{
|
||||
$cmd = "Joomla.submitbutton('$task')";
|
||||
}
|
||||
|
||||
return $cmd;
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
24
components/com_jem/helpers/category.php
Normal file
24
components/com_jem/helpers/category.php
Normal file
@ -0,0 +1,24 @@
|
||||
<?php
|
||||
/**
|
||||
* @package JEM
|
||||
* @copyright (C) 2013-2024 joomlaeventmanager.net
|
||||
* @copyright (C) 2005-2009 Christoph Lukes
|
||||
* @license https://www.gnu.org/licenses/gpl-3.0 GNU/GPL
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
use Joomla\CMS\Categories\Categories;
|
||||
|
||||
/**
|
||||
* Content Component Category Tree
|
||||
*/
|
||||
class JEM2Categories extends Categories
|
||||
{
|
||||
public function __construct($options = array())
|
||||
{
|
||||
$options['table'] = '#__jem_categories';
|
||||
$options['extension'] = 'com_jem';
|
||||
parent::__construct($options);
|
||||
}
|
||||
}
|
||||
1166
components/com_jem/helpers/countries.php
Normal file
1166
components/com_jem/helpers/countries.php
Normal file
File diff suppressed because it is too large
Load Diff
1784
components/com_jem/helpers/helper.php
Normal file
1784
components/com_jem/helpers/helper.php
Normal file
File diff suppressed because it is too large
Load Diff
1
components/com_jem/helpers/index.html
Normal file
1
components/com_jem/helpers/index.html
Normal file
@ -0,0 +1 @@
|
||||
<!DOCTYPE html><title></title>
|
||||
78
components/com_jem/helpers/mailtohelper.php
Normal file
78
components/com_jem/helpers/mailtohelper.php
Normal file
@ -0,0 +1,78 @@
|
||||
<?php
|
||||
/**
|
||||
* @package JEM
|
||||
* @copyright (C) 2013-2024 joomlaeventmanager.net
|
||||
* @copyright (C) 2005-2009 Christoph Lukes
|
||||
* @license https://www.gnu.org/licenses/gpl-3.0 GNU/GPL
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
use Joomla\CMS\Factory;
|
||||
|
||||
class JemMailtoHelper {
|
||||
public static function addLink($url)
|
||||
{
|
||||
$hash = sha1($url);
|
||||
self::cleanHashes();
|
||||
|
||||
$app = Factory::getApplication();
|
||||
$session = $app->getSession();
|
||||
$mailto_links = $session->get('com_jem.links', array());
|
||||
|
||||
if (!isset($mailto_links[$hash]))
|
||||
{
|
||||
$mailto_links[$hash] = new stdClass;
|
||||
}
|
||||
|
||||
$mailto_links[$hash]->link = $url;
|
||||
$mailto_links[$hash]->expiry = time();
|
||||
$session->set('com_jem.links', $mailto_links);
|
||||
|
||||
return $hash;
|
||||
}
|
||||
|
||||
public static function cleanHashes($lifetime = 1440)
|
||||
{
|
||||
// Flag for if we've cleaned on this cycle
|
||||
static $cleaned = false;
|
||||
|
||||
if (!$cleaned)
|
||||
{
|
||||
$past = time() - $lifetime;
|
||||
$app = Factory::getApplication();
|
||||
$session = $app->getSession();
|
||||
$mailto_links = $session->get('com_jem.links', array());
|
||||
|
||||
foreach ($mailto_links as $index => $link)
|
||||
{
|
||||
if ($link->expiry < $past)
|
||||
{
|
||||
unset($mailto_links[$index]);
|
||||
}
|
||||
}
|
||||
|
||||
$session->set('com_jem.links', $mailto_links);
|
||||
$cleaned = true;
|
||||
}
|
||||
}
|
||||
|
||||
public static function validateHash($hash)
|
||||
{
|
||||
$retval = false;
|
||||
$app = Factory::getApplication();
|
||||
$session = $app->getSession();
|
||||
|
||||
self::cleanHashes();
|
||||
$mailto_links = $session->get('com_jem.links', array());
|
||||
|
||||
if (isset($mailto_links[$hash]))
|
||||
{
|
||||
$retval = $mailto_links[$hash]->link;
|
||||
}
|
||||
|
||||
return $retval;
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
318
components/com_jem/helpers/route.php
Normal file
318
components/com_jem/helpers/route.php
Normal file
@ -0,0 +1,318 @@
|
||||
<?php
|
||||
/**
|
||||
* @package JEM
|
||||
* @copyright (C) 2013-2024 joomlaeventmanager.net
|
||||
* @copyright (C) 2005-2009 Christoph Lukes
|
||||
* @license https://www.gnu.org/licenses/gpl-3.0 GNU/GPL
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Component\ComponentHelper;
|
||||
use Joomla\CMS\Log\Log;
|
||||
|
||||
require_once(JPATH_SITE.'/components/com_jem/helpers/helper.php');
|
||||
require_once(JPATH_SITE.'/components/com_jem/classes/categories.class.php');
|
||||
|
||||
/**
|
||||
* JEM Component Route Helper
|
||||
* based on Joomla ContentHelperRoute
|
||||
*
|
||||
* @static
|
||||
* @package JEM
|
||||
*
|
||||
*/
|
||||
abstract class JEMHelperRoute
|
||||
{
|
||||
protected static $lookup;
|
||||
const ARTIFICALID = 0;
|
||||
|
||||
/**
|
||||
* Determines an JEM Link
|
||||
*
|
||||
* @param int The id of an JEM item
|
||||
* @param string The view
|
||||
* @param string The category of the item
|
||||
* @deprecated Use specific Route methods instead!
|
||||
*
|
||||
* @return string determined Link
|
||||
*/
|
||||
public static function getRoute($id, $view = 'event', $category = null)
|
||||
{
|
||||
|
||||
// Deprecation warning.
|
||||
Log::add('JEMHelperRoute::getRoute() is deprecated, use specific route methods instead.', Log::WARNING, 'deprecated');
|
||||
|
||||
$needles = array(
|
||||
$view => array((int) $id)
|
||||
);
|
||||
|
||||
if ($item = self::_findItem($needles)) {
|
||||
$link = 'index.php?Itemid='.$item;
|
||||
}
|
||||
else {
|
||||
// Create the link
|
||||
$link = 'index.php?option=com_jem&view='.$view.'&id='. $id;
|
||||
|
||||
// Add category, if available
|
||||
if(!is_null($category)) {
|
||||
$link .= '&catid='.$category;
|
||||
}
|
||||
|
||||
if ($item = self::_findItem($needles)) {
|
||||
$link .= '&Itemid='.$item;
|
||||
}
|
||||
elseif ($item = self::_findItem()) {
|
||||
$link .= '&Itemid='.$item;
|
||||
}
|
||||
}
|
||||
|
||||
return $link;
|
||||
}
|
||||
|
||||
public static function getCategoryRoute($id, $task = '')
|
||||
{
|
||||
$settings = JEMHelper::globalattribs();
|
||||
$defaultItemid = $settings->get('default_Itemid');
|
||||
|
||||
$needles = array(
|
||||
'category' => array((int) $id)
|
||||
);
|
||||
|
||||
// Create the link
|
||||
$link = 'index.php?option=com_jem&view=category&id='. $id;
|
||||
|
||||
// If no category view works try categories
|
||||
$needles['categories'] = array(self::ARTIFICALID);
|
||||
|
||||
$category = new JEMCategories($id);
|
||||
if($category) {
|
||||
$needles['categories'] = array_reverse($category->getPath());
|
||||
}
|
||||
|
||||
if (!empty($task)) {
|
||||
$link .= '&task='.$task;
|
||||
}
|
||||
|
||||
if ($item = self::_findItem($needles)) {
|
||||
$link .= '&Itemid='.$item;
|
||||
}
|
||||
elseif ($item = self::_findItem()) {
|
||||
if (isset($defaultItemid))
|
||||
{
|
||||
$link .= '&Itemid='.$defaultItemid;
|
||||
}
|
||||
}
|
||||
|
||||
return $link;
|
||||
}
|
||||
|
||||
public static function getEventRoute($id, $catid = null)
|
||||
{
|
||||
$settings = JEMHelper::globalattribs();
|
||||
$defaultItemid = $settings->get('default_Itemid');
|
||||
|
||||
$needles = array(
|
||||
'event' => array((int) $id)
|
||||
);
|
||||
|
||||
// Create the link
|
||||
$link = 'index.php?option=com_jem&view=event&id='. $id;
|
||||
|
||||
// Add category, if available
|
||||
if(!is_null($catid)) {
|
||||
// TODO
|
||||
//$needles['categories'] = $needles['category'];
|
||||
$link .= '&catid='.$catid;
|
||||
}
|
||||
|
||||
if ($item = self::_findItem($needles)) {
|
||||
$link .= '&Itemid='.$item;
|
||||
}
|
||||
elseif ($item = self::_findItem()) {
|
||||
// $link .= '&Itemid='.$item;
|
||||
if (isset($defaultItemid))
|
||||
{
|
||||
$link .= '&Itemid='.$defaultItemid;
|
||||
}
|
||||
}
|
||||
|
||||
return $link;
|
||||
}
|
||||
|
||||
public static function getVenueRoute($id)
|
||||
{
|
||||
$settings = JEMHelper::globalattribs();
|
||||
$defaultItemid = $settings->get('default_Itemid');
|
||||
|
||||
$needles = array(
|
||||
'venue' => array((int) $id)
|
||||
);
|
||||
|
||||
// Create the link
|
||||
$link = 'index.php?option=com_jem&view=venue&id='. $id;
|
||||
|
||||
// If no venue view works try venues
|
||||
$needles['venues'] = array(self::ARTIFICALID);
|
||||
|
||||
if ($item = self::_findItem($needles)) {
|
||||
$link .= '&Itemid='.$item;
|
||||
}
|
||||
elseif ($item = self::_findItem()) {
|
||||
if (isset($defaultItemid))
|
||||
{
|
||||
$link .= '&Itemid='.$defaultItemid;
|
||||
}
|
||||
}
|
||||
|
||||
return $link;
|
||||
}
|
||||
|
||||
protected static function getRouteWithoutId($my)
|
||||
{
|
||||
$settings = JEMHelper::globalattribs();
|
||||
$defaultItemid = $settings->get('default_Itemid');
|
||||
|
||||
$needles = array();
|
||||
$needles[$my] = array(self::ARTIFICALID);
|
||||
|
||||
// Create the link
|
||||
$link = 'index.php?option=com_jem&view='.$my;
|
||||
|
||||
if ($item = self::_findItem($needles)) {
|
||||
$link .= '&Itemid='.$item;
|
||||
}
|
||||
elseif ($item = self::_findItem()) {
|
||||
if (isset($defaultItemid))
|
||||
{
|
||||
$link .= '&Itemid='.$defaultItemid;
|
||||
} else {
|
||||
$link .= '&Itemid='.$item;
|
||||
}
|
||||
}
|
||||
|
||||
return $link;
|
||||
}
|
||||
|
||||
public static function getMyAttendancesRoute()
|
||||
{
|
||||
return self::getRouteWithoutId('myattendances');
|
||||
}
|
||||
|
||||
public static function getMyEventsRoute()
|
||||
{
|
||||
return self::getRouteWithoutId('myevents');
|
||||
}
|
||||
|
||||
public static function getMyVenuesRoute()
|
||||
{
|
||||
return self::getRouteWithoutId('myvenues');
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Determines the Itemid
|
||||
*
|
||||
* searches if a menuitem for this item exists
|
||||
* if not the active menuitem will be returned
|
||||
*
|
||||
* @param array The id and view
|
||||
*
|
||||
*
|
||||
* @return int Itemid
|
||||
*/
|
||||
protected static function _findItem($needles = null)
|
||||
{
|
||||
$app = Factory::getApplication();
|
||||
$menus = $app->getMenu('site');
|
||||
|
||||
// Prepare the reverse lookup array.
|
||||
if (self::$lookup === null) {
|
||||
self::$lookup = array();
|
||||
|
||||
$component = ComponentHelper::getComponent('com_jem');
|
||||
$items = $menus->getItems('component_id', $component->id);
|
||||
|
||||
if ($items) {
|
||||
foreach ($items as $item)
|
||||
{
|
||||
if (isset($item->query) && isset($item->query['view'])) {
|
||||
if (isset($item->query['layout']) && ($item->query['layout'] == 'calendar')) {
|
||||
continue; // skip calendars
|
||||
}
|
||||
|
||||
$view = $item->query['view'];
|
||||
|
||||
if (!isset(self::$lookup[$view])) {
|
||||
self::$lookup[$view] = array();
|
||||
}
|
||||
|
||||
if (isset($item->query['id'])) {
|
||||
self::$lookup[$view][$item->query['id']] = $item->id;
|
||||
}
|
||||
// Some views have no ID, but we have to set one
|
||||
else {
|
||||
self::$lookup[$view][self::ARTIFICALID] = $item->id;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ($needles) {
|
||||
foreach ($needles as $view => $ids)
|
||||
{
|
||||
if (isset(self::$lookup[$view])) {
|
||||
foreach($ids as $id)
|
||||
{
|
||||
if (isset(self::$lookup[$view][(int)$id])) {
|
||||
// TODO: Check on access. See commented code below
|
||||
return self::$lookup[$view][(int)$id];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
$active = $menus->getActive();
|
||||
if ($active) {
|
||||
return $active->id;
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
|
||||
// $user = JemFactory::getUser();
|
||||
|
||||
// //false if there exists no menu item at all
|
||||
// if (!$items) {
|
||||
// return false;
|
||||
// } else {
|
||||
// //Not needed currently but kept because of a possible hierarchic link structure in future
|
||||
// foreach($needles as $needle => $id)
|
||||
// {
|
||||
// foreach($items as $item)
|
||||
// {
|
||||
// if (($item->query['view'] == $needle) && ($item->query['id'] == $id)) {
|
||||
// return $item;
|
||||
// }
|
||||
// }
|
||||
|
||||
// /*
|
||||
// //no menuitem exists -> return first possible match
|
||||
// foreach($items as $item)
|
||||
// {
|
||||
// if ($item->published == 1 && $item->access <= $gid) {
|
||||
// return $item;
|
||||
// }
|
||||
// }
|
||||
// */
|
||||
// }
|
||||
// }
|
||||
|
||||
// return false;
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
1
components/com_jem/index.html
Normal file
1
components/com_jem/index.html
Normal file
@ -0,0 +1 @@
|
||||
<!DOCTYPE html><title></title>
|
||||
54
components/com_jem/jem.php
Normal file
54
components/com_jem/jem.php
Normal file
@ -0,0 +1,54 @@
|
||||
<?php
|
||||
/**
|
||||
* @package JEM
|
||||
* @copyright (C) 2013-2024 joomlaeventmanager.net
|
||||
* @copyright (C) 2005-2009 Christoph Lukes
|
||||
* @license https://www.gnu.org/licenses/gpl-3.0 GNU/GPL
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\HTML\HTMLHelper;
|
||||
use Joomla\CMS\MVC\Controller\BaseController;
|
||||
use Joomla\CMS\Table\Table;
|
||||
|
||||
// include files
|
||||
require_once (JPATH_COMPONENT_SITE.'/factory.php');
|
||||
require_once (JPATH_COMPONENT_SITE.'/helpers/helper.php');
|
||||
require_once (JPATH_COMPONENT_SITE.'/helpers/mailtohelper.php');
|
||||
require_once (JPATH_COMPONENT_SITE.'/helpers/route.php');
|
||||
require_once (JPATH_COMPONENT_SITE.'/helpers/countries.php');
|
||||
require_once (JPATH_COMPONENT_SITE.'/classes/config.class.php');
|
||||
require_once (JPATH_COMPONENT_SITE.'/classes/user.class.php');
|
||||
require_once (JPATH_COMPONENT_SITE.'/classes/image.class.php');
|
||||
require_once (JPATH_COMPONENT_SITE.'/classes/output.class.php');
|
||||
require_once (JPATH_COMPONENT_SITE.'/classes/view.class.php');
|
||||
require_once (JPATH_COMPONENT_SITE.'/classes/attachment.class.php');
|
||||
require_once (JPATH_COMPONENT_SITE.'/classes/categories.class.php');
|
||||
require_once (JPATH_COMPONENT_SITE.'/classes/calendar.class.php');
|
||||
require_once (JPATH_COMPONENT_SITE.'/classes/activecalendarweek.php');
|
||||
require_once (JPATH_COMPONENT_SITE.'/helpers/category.php');
|
||||
|
||||
// Set the table directory
|
||||
Table::addIncludePath(JPATH_COMPONENT_ADMINISTRATOR.'/tables');
|
||||
$document = Factory::getApplication()->getDocument();
|
||||
$wa = $document->getWebAssetManager();
|
||||
$wa->useScript('jquery');
|
||||
// create JEM's file logger
|
||||
JemHelper::addFileLogger();
|
||||
|
||||
//perform cleanup if it wasn't done today (archive, delete, recurrence)
|
||||
JemHelper::cleanup();
|
||||
|
||||
// Get an instance of the controller
|
||||
$controller = BaseController::getInstance('Jem');
|
||||
|
||||
// Perform the Request task
|
||||
$input = Factory::getApplication()->input;
|
||||
$controller->execute($input->getCmd('task'));
|
||||
|
||||
// Redirect if set by the controller
|
||||
$controller->redirect();
|
||||
HTMLHelper::_('bootstrap.framework');
|
||||
HTMLHelper::_('bootstrap.tooltip','.hasTooltip');
|
||||
651
components/com_jem/language/de-DE/de-DE.com_jem.ini
Normal file
651
components/com_jem/language/de-DE/de-DE.com_jem.ini
Normal file
@ -0,0 +1,651 @@
|
||||
; @version 2.2.3
|
||||
; @package JEM
|
||||
; @copyright (C) 2013-2018 joomlaeventmanager.net
|
||||
; @copyright (C) 2005-2009 Christoph Lukes
|
||||
; @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
|
||||
;
|
||||
; All translations can be found at https://www.transifex.com/projects/p/JEM/
|
||||
; Please join the translation team if you want to contribute your changes to the translations
|
||||
;
|
||||
; Note : All ini files need to be saved as UTF-8 - No BOM
|
||||
;
|
||||
; Frontend file
|
||||
|
||||
COM_JEM_DELIVER_NEW_EVENT="Veranstaltung einreichen"
|
||||
COM_JEM_DELIVER_NEW_VENUE="Veranstaltungsort anlegen"
|
||||
COM_JEM_SHOW_ARCHIVE="Archiv anzeigen"
|
||||
COM_JEM_ADD_NAME="Bitte geben Sie hier Ihren Namen ein"
|
||||
COM_JEM_ADD_EMAIL="Bitte geben Sie hier Ihre E-Mail Adresse an"
|
||||
COM_JEM_WRONG_EMAIL_FORMAT="FEHLER: Die E-Mail hat das falsche Format!"
|
||||
COM_JEM_ADD_DATE="Bitte Datum eingeben!"
|
||||
COM_JEM_DATE_WRONG="FEHLER: Das Datum hat das falsche Format!"
|
||||
COM_JEM_ADD_TITLE="Bitte Titel eingeben!"
|
||||
COM_JEM_ADD_TIME="Bitte Zeit eingeben!"
|
||||
COM_JEM_TIME_WRONG="Fehler: Die Zeit hat das falsche Format!"
|
||||
COM_JEM_ENDTIME_WRONG="Fehler: Die Endzeit hat das falsche Format!"
|
||||
COM_JEM_SELECT_CATEGORY="Bitte Kategorie auswählen!"
|
||||
COM_JEM_SELECT_VENUE="Bitte Veranstaltungsort auswählen!"
|
||||
COM_JEM_SELECT_USERS_AND_STATUS="Bitte Benutzer und Teilnahmerückmeldung wählen"
|
||||
COM_JEM_SELECT_USERS_TO_INVITE="Bitte die einzuladenden Benutzer auswählen."
|
||||
COM_JEM_TITLE="Titel"
|
||||
COM_JEM_TITLE_SHORT="Titel"
|
||||
COM_JEM_SAVE="Speichern"
|
||||
COM_JEM_CANCEL="Abbrechen"
|
||||
COM_JEM_USERINFO="Benutzerdaten"
|
||||
COM_JEM_YOUR_NAME="Ihr Name"
|
||||
COM_JEM_YOUR_EMAIL="Ihre E-Mail"
|
||||
COM_JEM_NORMAL_INFO="Allgemein"
|
||||
COM_JEM_VENUE="Veranstaltungsort"
|
||||
COM_JEM_VENUE_SHORT="Ort"
|
||||
COM_JEM_CATEGORY="Kategorie"
|
||||
COM_JEM_DATE="Datum"
|
||||
COM_JEM_DATE_HINT="Format yyyy-mm-dd!"
|
||||
COM_JEM_DATEFIELD_HINT="Format: %s"
|
||||
COM_JEM_TIME="Zeit"
|
||||
COM_JEM_TIME_SHORT="Zeit"
|
||||
COM_JEM_TIME_HINT="Format: hh:mm!"
|
||||
COM_JEM_ENDTIME_HINT="Format: hh:mm! (optional)"
|
||||
COM_JEM_ENDTIME="Endzeit"
|
||||
COM_JEM_SUBMIT_REGISTER="Anmelden erlauben"
|
||||
COM_JEM_SUBMIT_UNREGISTER="Abmelden erlauben"
|
||||
COM_JEM_SELECT_IMAGE="Bild zum hochladen auswählen"
|
||||
COM_JEM_SELECT_IMAGE_EDIT="Bild. Leerlassen, um nichts zu verändern"
|
||||
COM_JEM_MAX_IMAGE_FILE_SIZE="Max. Bildgröße"
|
||||
COM_JEM_UPLOAD_IMAGE="Bild zum Hochladen wählen"
|
||||
COM_JEM_MAX_FILE_SIZE_1="Dateigrösse ist begrenzt auf %d kB."
|
||||
COM_JEM_DESCRIPTION="Beschreibung"
|
||||
COM_JEM_EVENT_DESCRIPTION="Beschreibung"
|
||||
COM_JEM_VENUE_DESCRIPTION="Beschreibung"
|
||||
COM_JEM_NO_HTML="HTML ist nicht erlaubt!"
|
||||
COM_JEM_AVAILABLE="verfügbar"
|
||||
COM_JEM_REFRESH="aktualisieren"
|
||||
COM_JEM_DETAILS="Details"
|
||||
COM_JEM_NO_ACCESS="Zugriff ist nicht erlaubt"
|
||||
COM_JEM_EVENT="Veranstaltung"
|
||||
COM_JEM_WHAT="Was"
|
||||
COM_JEM_WHEN="Wann"
|
||||
COM_JEM_WHERE="Wo"
|
||||
COM_JEM_MAP="Karte"
|
||||
COM_JEM_WEBSITE="Webseite"
|
||||
COM_JEM_STREET="Straße"
|
||||
COM_JEM_STATE="Bundesland"
|
||||
COM_JEM_ZIP="Postleitzahl"
|
||||
COM_JEM_CITY="Stadt"
|
||||
COM_JEM_SELECT_CITY="Wähle eine Stadt"
|
||||
COM_JEM_COUNTRY="Land"
|
||||
COM_JEM_SELECT_COUNTRY="Wähle ein Land"
|
||||
COM_JEM_CONTINENT="Kontinent"
|
||||
COM_JEM_SELECT_CONTINENT="Wähle einen Kontinent"
|
||||
COM_JEM_NO_DESCRIPTION="Zur Zeit keine Beschreibung verfügbar"
|
||||
COM_JEM_REGISTERED_USERS="Bereits angemeldete Benutzer"
|
||||
COM_JEM_YOUR_REGISTRATION="Ihre An-/Abmeldung"
|
||||
COM_JEM_YOU_ARE_UNREGISTERED="Von dir gibt es noch keine Rückmeldung. Zur Anmeldung für diesen Event bitte eine der untenstehenden Optionen wählen und abschicken."
|
||||
COM_JEM_YOU_ARE_INVITED="Du bist zur Teilnahme für diesen Event eingeladen. Bitte eine der untenstehenden Optionen wählen und ihre Entscheidung abschicken."
|
||||
COM_JEM_YOU_ARE_ATTENDING="Du bist angemeldet und stehst auf der Teilnehmerliste. Du kannst deine Entscheidung allenfalls unten ändern."
|
||||
COM_JEM_YOU_ARE_ON_WAITINGLIST="Du bist angemeldet, aber stehst noch auf der Warteliste. Du kannst deine Entscheidung unten noch ändern. "
|
||||
COM_JEM_YOU_ARE_NOT_ATTENDING="Du bist vom Event abgemeldet. Du kannst deine Entscheidung unten noch ändern."
|
||||
COM_JEM_I_WILL_GO="Ich möchte an dieser Veranstaltung teilnehmen"
|
||||
COM_JEM_I_WILL_NOT_GO="Ich kann NICHT an diesen Event"
|
||||
COM_JEM_REGISTER="Anmeldung"
|
||||
COM_JEM_ALLREADY_REGISTERED="Sie haben sich bereits zu dieser Veranstaltung angemeldet."
|
||||
COM_JEM_UNREGISTER_BOX="Von Veranstaltung abmelden"
|
||||
COM_JEM_UNREGISTER="Abmelden"
|
||||
COM_JEM_LOGIN_FOR_REGISTER="Zur Anmeldung für Veranstaltungen bitte zuerst einloggen!"
|
||||
COM_JEM_NEED_LOGGED_IN="Sie müssen sich anmelden."
|
||||
COM_JEM_TOO_LATE_REGISTER="Der Anmeldezeitraum ist abgelaufen."
|
||||
COM_JEM_TOO_LATE_UNREGISTER="Es ist zu spät, sich noch abzumelden!"
|
||||
COM_JEM_WRONG_STATE_FOR_REGISTER="Die Veranstaltung muss freigegeben sein, um Anmeldung zu erlauben"
|
||||
COM_JEM_NOT_ALLOWED_TO_REGISTER="Du kannst dich nicht für diesen Event anmelden."
|
||||
COM_JEM_NOT_ALLOWED_TO_ANNULATE="Annullierung der Anmeldung für diesen Event ist nicht erlaubt."
|
||||
COM_JEM_ERROR_ANNULATION_NOT_ALLOWED="FEHLER: Annullierung der Anmeldung ist nicht erlaubt."
|
||||
COM_JEM_ERROR_REGISTRATION="FEHLER: Registrierung für Veranstaltung misslungen!"
|
||||
COM_JEM_ERROR_ADD_VENUE="FEHLER: Veranstaltungsort eingeben"
|
||||
COM_JEM_ERROR_ADD_STREET="FEHLER: Bitte Straße eingeben!"
|
||||
COM_JEM_ERROR_ADD_ZIP="FEHLER: Bitte Postleitzahl eingeben!"
|
||||
COM_JEM_ERROR_ADD_CITY="FEHLER: Bitte Stadt eingeben!"
|
||||
COM_JEM_ERROR_ADD_COUNTRY="FEHLER: Bitte Ländercode eingeben!"
|
||||
COM_JEM_WEBSITE_HINT="URL muss im Format http://www.google.com sein!"
|
||||
COM_JEM_SHOW_EVENTS="Veranstaltungen anzeigen"
|
||||
COM_JEM_EVENTS="Veranstaltungen"
|
||||
COM_JEM_CATEGORY_EMPTY="Kategorie auswählen"
|
||||
COM_JEM_IMAGE_EMPTY="Bitte Bild zum hochladen auswählen"
|
||||
COM_JEM_UPLOAD_FAILED_NOT_AN_IMAGE="Upload fehlgeschlagen. Die hochgeladene Datei ist kein Bild."
|
||||
COM_JEM_WRONG_IMAGE_FILE_TYPE="Die Bilddatei muss vom Typ gif, png, jpg sein."
|
||||
COM_JEM_UPLOAD_FAILED="Upload fehlgeschlagen"
|
||||
COM_JEM_IMAGE_FILE_SIZE="Datei ist zu groß!"
|
||||
COM_JEM_REMOVE_IMAGE="Bild entfernen"
|
||||
COM_JEM_ERROR_ADD_ADDRESS="Fehler: Adresse ausfüllen"
|
||||
COM_JEM_ERROR_NAME_LONG="FEHLER: Name ist zu lang!"
|
||||
COM_JEM_ERROR_URL_LONG="FEHLER: URL ist zu lang!"
|
||||
COM_JEM_ERROR_URL_WRONG_FORMAT="FEHLER: URL hat falsches Format!"
|
||||
COM_JEM_ERROR_STREET_LONG="FEHLER: Straße ist zu lang!"
|
||||
COM_JEM_ERROR_STATE_LONG="FEHLER: Bundesland ist zu lang!"
|
||||
COM_JEM_ERROR_ZIP_LONG="FEHLER: Postleitzahl ist zu lang!"
|
||||
COM_JEM_ERROR_CITY_LONG="FEHLER: Stadt ist zu lang!"
|
||||
COM_JEM_ERROR_COUNTRY_LONG="FEHLER: Ländercode ist zu lang!"
|
||||
COM_JEM_INVALID_DATE_REQUESTED_USING_CURRENT="Ungültiges Datum! Es wird stattdessen das heutige verwendet."
|
||||
COM_JEM_PRINT_DESC="Diese Seite drucken"
|
||||
COM_JEM_EMAIL_DESC="Diese Seite via E-Mail weiter empfehlen"
|
||||
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;;;;;;;; Submission mailtexts for the administration ;;;;;;;;;;;;;
|
||||
|
||||
COM_JEM_NEW_EVENT_MAIL=" : Neue Veranstaltung"
|
||||
COM_JEM_MAIL_NEW_EVENT="Es wurde von %s ( %s ) eine neue Veranstaltung eingereicht.\n\nMailadresse: %s \nIP: %s \nZeit des Einreichens: %s \n\nTitel: %s \nDatum: %s \nBeginn: %s \nVeranstaltungsort: %s / %s \n\nBeschreibung:\n%s \n\n%s"
|
||||
COM_JEM_EDIT_EVENT_MAIL=" : Eine Veranstaltung wurde editiert"
|
||||
COM_JEM_MAIL_EDIT_EVENT="Eine Veranstaltung wurde von %s ( %s ) bearbeitet.\n\nMailadresse: %s \nIP: %s \nZeit der Bearbeitung: %s \n\nTitel: %s \nDatum: %s \nBeginn: %s \nVeranstaltungsort: %s / %s \n\nBeschreibung:\n %s \n\n%s"
|
||||
COM_JEM_MAIL_EVENT_PUBLISHED="Die Veranstaltung ist veröffentlicht und kann unter folgendem Link erreicht werden: %s"
|
||||
COM_JEM_MAIL_EVENT_UNPUBLISHED="Die Veranstaltung ist gesperrt und muss geprüft werden."
|
||||
|
||||
COM_JEM_NEW_VENUE_MAIL=" : Neuer Veranstaltungsort"
|
||||
COM_JEM_MAIL_NEW_VENUE="Es wurde von %s ( %s ) ein neuer Veranstaltungsort eingereicht.\n\nMailadresse: %s \nIP: %s \nZeit des Einreichens: %s \n\nName: %s \nHomepage: %s \nStraße: %s \nPostleitzahl: %s \nStadt: %s \nLand: %s \n\nBeschreibung:\n%s \n\n%s"
|
||||
COM_JEM_EDIT_VENUE_MAIL=" : Ein Veranstaltungsort wurde editiert"
|
||||
COM_JEM_MAIL_EDIT_VENUE="Es wurde von %s ( %s ) ein Veranstaltungsort bearbeitet.\n\nMailadresse: %s \nIP: %s \nZeit des Einreichens: %s \n\nName: %s \nHomepage: %s \nStraße: %s \nPostleitzahl: %s \nStadt: %s \nLand: %s \n\nBeschreibung:\n%s \n\n%s"
|
||||
COM_JEM_MAIL_VENUE_PUBLISHED="Der Veranstaltungsort ist veröffentlicht und kann unter folgendem Link erreicht werden: %s"
|
||||
COM_JEM_MAIL_VENUE_UNPUBLISHED="Der Veranstaltungsort ist gesperrt und muss geprüft werden."
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;;;;;;;; Submission mailtexts for the user ;;;;;;;;;;;;;
|
||||
|
||||
COM_JEM_NEW_USER_EVENT_MAIL=" : Danke für Ihren Veranstaltungsvorschlag"
|
||||
COM_JEM_USER_MAIL_NEW_EVENT="Hallo %s ( %s ), \n\nWir haben Ihren Veranstaltungsvorschlag erhalten\nHier noch einmal die uns mitgeteilten Daten:\nZeit des Einreichens: %s \n\nTitel: %s \nDatum: %s \nBeginn: %s \nVeranstaltungsort: %s / %s \n\nBeschreibung:\n%s \n\n%s"
|
||||
COM_JEM_EDIT_USER_EVENT_MAIL=" : Ihre Veranstaltungsbearbeitung"
|
||||
COM_JEM_USER_MAIL_EDIT_EVENT="Hallo %s ( %s ), \n\nSie haben erfolgreich folgende Veranstaltung bearbeitet:\nZeit der Bearbeitung: %s \n\nTitel: %s \nDatum: %s \nBeginn: %s \nVeranstaltungsort: %s / %s \n\nBeschreibung:\n %s \n\n%s"
|
||||
COM_JEM_USER_MAIL_EVENT_PUBLISHED="Die Veranstaltung ist veröffentlicht und kann unter folgendem Link erreicht werden: %s"
|
||||
COM_JEM_USER_MAIL_EVENT_UNPUBLISHED="Ihr Veranstaltungsvorschlag wird bald von uns geprüft und veröffentlicht. Vielen Dank!"
|
||||
|
||||
COM_JEM_USER_NEW_VENUE_MAIL=" : Danke für die Eingabe eines neuen Veranstaltungsorts"
|
||||
COM_JEM_USER_MAIL_NEW_VENUE="Hallo %s ( %s ), \n\nWir haben Ihren Vorschlag erhalten\nHier noch einmal die uns mitgeteilten Daten:\n\nZeit des Einreichens: %s \n\nName: %s \nHomepage: %s \nStraße: %s \nPostleitzahl: %s \nStadt: %s \nLand: %s \n\nBeschreibung:\n%s \n\n%s"
|
||||
COM_JEM_USER_EDIT_VENUE_MAIL=" : Bearbeitung eines Veranstaltungsorts"
|
||||
COM_JEM_USER_MAIL_EDIT_VENUE="Hallo %s ( %s ), \n\nSie haben erfolgreich folgende Veranstaltung bearbeitet:\n\nZeit der Bearbeitung: %s \n\nName: %s \nHomepage: %s \nStraße: %s \nPostleitzahl: %s \nStadt: %s \nLand: %s \n\nBeschreibung:\n%s \n\n%s"
|
||||
COM_JEM_USER_MAIL_VENUE_PUBLISHED="Der Veranstaltungsort ist veröffentlicht und kann unter folgendem Link erreicht werden: %s"
|
||||
COM_JEM_USER_MAIL_VENUE_UNPUBLISHED="Ihr Vorschlag wird bald von uns geprüft und veröffentlicht. Vielen Dank!"
|
||||
|
||||
COM_JEM_VENUE_SAVED="Veranstaltungsort gespeichert"
|
||||
COM_JEM_EVENT_SAVED="Veranstaltung gespeichert"
|
||||
COM_JEM_ERROR_TITLE_LONG="FEHLER: Titel ist zu lang oder leer!"
|
||||
COM_JEM_ARCHIVE="Archiv"
|
||||
COM_JEM_REGISTERED_SUCCESSFULL="Sie haben sich erfolgreich zu dieser Veranstaltung angemeldet."
|
||||
COM_JEM_UNREGISTERED_SUCCESSFULL="Sie haben sich erfolgreich von dieser Veranstaltung abgemeldet."
|
||||
COM_JEM_REGISTRATION_THANKS_FOR_RESPONSE="Danke für Deine Antwort. Deine Rückmeldung wurde gespeichert."
|
||||
COM_JEM_EDIT_EVENT="Veranstaltung editieren"
|
||||
COM_JEM_EDIT_EVENT_DESC="Klicken Sie hier, um diese Veranstaltung zu bearbeiten"
|
||||
COM_JEM_EDIT_VENUE="Veranstaltungsort editieren"
|
||||
COM_JEM_EDIT_VENUE_DESC="Klicken Sie hier, um diesen Veranstaltungsort zu bearbeiten"
|
||||
COM_JEM_COPY_EVENT="Veranstaltung kopieren"
|
||||
COM_JEM_COPY_EVENT_DESC="Klicken Sie hier, um eine neue Veranstaltung hinzuzufügen, die auf dieser Veranstaltung basiert."
|
||||
COM_JEM_COPY_VENUE="Veranstaltungsort kopieren"
|
||||
COM_JEM_COPY_VENUE_DESC="Klicken Sie hier, um einen neuen Veranstaltungsort auf der Grundlage dieses Veranstaltungsortes hinzuzufügen."
|
||||
COM_JEM_SUBMIT_EVENT_DESC="Klicken, um Veranstaltung hinzuzufügen"
|
||||
COM_JEM_SHOW_EVENTS_DESC="Klicken, um aktuelle Veranstaltungen anzuzeigen"
|
||||
COM_JEM_SHOW_ARCHIVE_DESC="Klicken, um das Archiv anzuzeigen"
|
||||
COM_JEM_ENDDATE="Enddatum"
|
||||
COM_JEM_NO_EVENTS="Zur Zeit sind keine Veranstaltungen verfügbar"
|
||||
COM_JEM_ADDRESS="Adresse"
|
||||
COM_JEM_ADD_VENUE="Veranstaltungsort hinzufügen"
|
||||
COM_JEM_ADD_EVENT="Veranstaltung hinzufügen"
|
||||
COM_JEM_THE_EVENT="Die Veranstaltung"
|
||||
COM_JEM_EDITED_BY_ANOTHER_ADMIN="wird derzeitig bereits von einem anderen Nutzer editiert"
|
||||
COM_JEM_CURRENT_IMAGE="Derzeitiges Bild"
|
||||
COM_JEM_SELECTED_IMAGE="Neues Bild"
|
||||
COM_JEM_SELECTVENUE="Veranstaltungsort auswählen"
|
||||
COM_JEM_NO_VENUE="keiner"
|
||||
COM_JEM_SELECT="Wählen"
|
||||
COM_JEM_NOTES="Anmerkungen"
|
||||
COM_JEM_COUNTRY_HINT="ISO-CODE (US,DE,AT,CH, etc.)"
|
||||
COM_JEM_SEARCH="Suche:"
|
||||
COM_JEM_REGISTRATION="Anmeldung"
|
||||
COM_JEM_CLICK_TO_ENLARGE="Klicken um zu vergrößern"
|
||||
COM_JEM_VENUE_NAME_ALREADY_EXIST="Der Veranstaltungsort: %s ist bereits in der Datenbank. Wählen Sie bitte einen anderen Namen!"
|
||||
COM_JEM_SHOW_USER_PROFILE="Klicken, um das Benutzerprofil anzuzeigen"
|
||||
|
||||
COM_JEM_METADATA_INFORMATION="Metadaten"
|
||||
COM_JEM_META_DESCRIPTION="Beschreibung editieren"
|
||||
COM_JEM_META_KEYWORDS="Keywords editieren"
|
||||
COM_JEM_ADD_VENUE_CITY="Veranstaltungsort/Stadt einfügen"
|
||||
COM_JEM_ENABLE_MAP="Kartendienst aktivieren"
|
||||
COM_JEM_ADDRESS_NOTICE="Die Adressfelder sind nicht zwingend auszufüllen, außer Sie aktivieren hier einen der Kartendienste."
|
||||
|
||||
;Recurrence
|
||||
COM_JEM_RECURRING_EVENTS="Wiederholende Veranstaltungen"
|
||||
COM_JEM_RECURRING_EVENT="Wiederholte Veranstaltung"
|
||||
COM_JEM_RECURRING_EVENT_DESC="Diese Veranstaltung ist Teil einer Wiederholungsserie."
|
||||
COM_JEM_RECURRING_FIRST_EVENT_DESC="Diese Veranstaltung ist die erste einer Wiederholungsserie."
|
||||
COM_JEM_RECURRENCE="Wiederholung"
|
||||
COM_JEM_NOTHING="keine"
|
||||
COM_JEM_DAYLY="täglich"
|
||||
COM_JEM_WEEKLY="wöchentlich"
|
||||
COM_JEM_MONTHLY="monatlich"
|
||||
COM_JEM_WEEKDAY="Wochentag"
|
||||
COM_JEM_OUTPUT_DAY="Alle [placeholder] Tage wiederholen"
|
||||
COM_JEM_OUTPUT_WEEK="Alle [placeholder] Wochen wiederholen"
|
||||
COM_JEM_OUTPUT_MONTH="Alle [placeholder] Monate wiederholen"
|
||||
COM_JEM_OUTPUT_WEEKDAY="Jeden [placeholder]. [placeholder_weekday] pro Monat wiederholen"
|
||||
COM_JEM_RECURRENCE_COUNTER="Bis Ende"
|
||||
COM_JEM_UNLIMITED="unendlich"
|
||||
COM_JEM_RECURRING_INFO_TITLE="(Zur Information:) Diese Veranstaltung gehört zu einer Serie mit folgender Einstellung:"
|
||||
|
||||
COM_JEM_LAST=" letzte"
|
||||
COM_JEM_BEFORE_LAST=" vorletzte"
|
||||
|
||||
COM_JEM_MONDAY="Montag"
|
||||
COM_JEM_TUESDAY="Dienstag"
|
||||
COM_JEM_WEDNESDAY="Mittwoch"
|
||||
COM_JEM_THURSDAY="Donnerstag"
|
||||
COM_JEM_FRIDAY="Freitag"
|
||||
COM_JEM_SATURDAY="Samstag"
|
||||
COM_JEM_SUNDAY="Sonntag"
|
||||
|
||||
COM_JEM_GO="Los"
|
||||
COM_JEM_RESET="Löschen"
|
||||
COM_JEM_DISPLAY_NUM="Limit"
|
||||
COM_JEM_FILTER="Filter"
|
||||
|
||||
COM_JEM_PROPOSED_BY="Vorgeschlagen von"
|
||||
|
||||
COM_JEM_MY_ITEMS="Meine Seite"
|
||||
COM_JEM_MY_EVENTS="Meine Veranstaltungen"
|
||||
COM_JEM_MY_VENUES="Meine Veranstaltungsorte"
|
||||
COM_JEM_NO_VENUES="Keine Veranstaltungsorte"
|
||||
COM_JEM_REGISTERED_TO="Registriert für"
|
||||
COM_JEM_IMAGE="Bild"
|
||||
|
||||
;
|
||||
COM_JEM_CALENDAR_SHOWALL="Zeige Alles"
|
||||
COM_JEM_CALENDAR_HIDEALL="Verstecke Alles"
|
||||
|
||||
;
|
||||
COM_JEM_MAX_PLACES="Max. Teilnehmerzahl"
|
||||
COM_JEM_MAX_PLACES_DESC="Wieviele Benutzer können maximal teilnehmen"
|
||||
COM_JEM_ENABLE_WAITINGLIST="Warteliste"
|
||||
COM_JEM_ENABLE_WAITINGLIST_DESC="Warteliste aktivieren"
|
||||
COM_JEM_EVENT_FULL_REGISTER_TO_WAITING_LIST="Die Veranstaltung ist ausgebucht, bitte registrieren Sie sich für die Warteliste."
|
||||
COM_JEM_EVENT_FULL_NOTICE="Diese Veranstaltung ist voll ausgebucht und es gibt keine Warteliste"
|
||||
COM_JEM_BOOKED_PLACES="Belegte Plätze"
|
||||
COM_JEM_AVAILABLE_PLACES="verfügbare Plätze"
|
||||
COM_JEM_WAITINGLIST_UNREGISTER_BOX="Abmeldung von Warteliste"
|
||||
|
||||
COM_JEM_SEARCH_FILTER = "Filter"
|
||||
COM_JEM_SEARCH_RESET = "Löschen"
|
||||
COM_JEM_SEARCH_GO = "Los"
|
||||
COM_JEM_SEARCH_FROM = "Von"
|
||||
COM_JEM_SEARCH_TO ="Bis"
|
||||
COM_JEM_SEARCH_SUBMITSEARCH = "Suche übertragen"
|
||||
COM_JEM_SEARCH_DISPLAYNUM = "Zeige Anzahl"
|
||||
COM_JEM_SEARCH_NOEVENTS = "keine Veranstaltungen"
|
||||
COM_JEM_SEARCH_OPENDATE = "öffne Datum"
|
||||
COM_JEM_SEARCH_DATE = "Datum"
|
||||
COM_JEM_SEARCH_SUBMIT="Suche"
|
||||
COM_JEM_WAITINGLIST_UNREGISTER_BOX_ONWAITINGLIST="Auf der Warteliste"
|
||||
|
||||
;Custom Fields
|
||||
COM_JEM_EVENT_CUSTOM_FIELD1="Veranstaltungsfeld 1"
|
||||
COM_JEM_EVENT_CUSTOM_FIELD2="Veranstaltungsfeld 2"
|
||||
COM_JEM_EVENT_CUSTOM_FIELD3="Veranstaltungsfeld 3"
|
||||
COM_JEM_EVENT_CUSTOM_FIELD4="Veranstaltungsfeld 4"
|
||||
COM_JEM_EVENT_CUSTOM_FIELD5="Veranstaltungsfeld 5"
|
||||
COM_JEM_EVENT_CUSTOM_FIELD6="Veranstaltungsfeld 6"
|
||||
COM_JEM_EVENT_CUSTOM_FIELD7="Veranstaltungsfeld 7"
|
||||
COM_JEM_EVENT_CUSTOM_FIELD8="Veranstaltungsfeld 8"
|
||||
COM_JEM_EVENT_CUSTOM_FIELD9="Veranstaltungsfeld 9"
|
||||
COM_JEM_EVENT_CUSTOM_FIELD10="Veranstaltungsfeld 10"
|
||||
COM_JEM_EVENT_CUSTOM_FIELD1_DESC="Veranstaltungsfeld 1 ist mit Sprachoverrides im Backend umzubenennen. Siehe dazu Hilfe.\\nLeere Felder werden im Frontend nicht angezeigt"
|
||||
COM_JEM_EVENT_CUSTOM_FIELD2_DESC="Veranstaltungsfeld 2 ist mit Sprachoverrides im Backend umzubenennen. Siehe dazu Hilfe.\\nLeere Felder werden im Frontend nicht angezeigt"
|
||||
COM_JEM_EVENT_CUSTOM_FIELD3_DESC="Veranstaltungsfeld 3 ist mit Sprachoverrides im Backend umzubenennen. Siehe dazu Hilfe.\\nLeere Felder werden im Frontend nicht angezeigt"
|
||||
COM_JEM_EVENT_CUSTOM_FIELD4_DESC="Veranstaltungsfeld 4 ist mit Sprachoverrides im Backend umzubenennen. Siehe dazu Hilfe.\\nLeere Felder werden im Frontend nicht angezeigt"
|
||||
COM_JEM_EVENT_CUSTOM_FIELD5_DESC="Veranstaltungsfeld 5 ist mit Sprachoverrides im Backend umzubenennen. Siehe dazu Hilfe.\\nLeere Felder werden im Frontend nicht angezeigt"
|
||||
COM_JEM_EVENT_CUSTOM_FIELD6_DESC="Veranstaltungsfeld 6 ist mit Sprachoverrides im Backend umzubenennen. Siehe dazu Hilfe.\\nLeere Felder werden im Frontend nicht angezeigt"
|
||||
COM_JEM_EVENT_CUSTOM_FIELD7_DESC="Veranstaltungsfeld 7 ist mit Sprachoverrides im Backend umzubenennen. Siehe dazu Hilfe.\\nLeere Felder werden im Frontend nicht angezeigt"
|
||||
COM_JEM_EVENT_CUSTOM_FIELD8_DESC="Veranstaltungsfeld 8 ist mit Sprachoverrides im Backend umzubenennen. Siehe dazu Hilfe.\\nLeere Felder werden im Frontend nicht angezeigt"
|
||||
COM_JEM_EVENT_CUSTOM_FIELD9_DESC="Veranstaltungsfeld 9 ist mit Sprachoverrides im Backend umzubenennen. Siehe dazu Hilfe.\\nLeere Felder werden im Frontend nicht angezeigt"
|
||||
COM_JEM_EVENT_CUSTOM_FIELD10_DESC="Veranstaltungsfeld 10 ist mit Sprachoverrides im Backend umzubenennen. Siehe dazu Hilfe.\\nLeere Felder werden im Frontend nicht angezeigt"
|
||||
|
||||
COM_JEM_VENUE_CUSTOM_FIELD1="Orts-Feld 1"
|
||||
COM_JEM_VENUE_CUSTOM_FIELD2="Orts-Feld 2"
|
||||
COM_JEM_VENUE_CUSTOM_FIELD3="Orts-Feld 3"
|
||||
COM_JEM_VENUE_CUSTOM_FIELD4="Orts-Feld 4"
|
||||
COM_JEM_VENUE_CUSTOM_FIELD5="Orts-Feld 5"
|
||||
COM_JEM_VENUE_CUSTOM_FIELD6="Orts-Feld 6"
|
||||
COM_JEM_VENUE_CUSTOM_FIELD7="Orts-Feld 7"
|
||||
COM_JEM_VENUE_CUSTOM_FIELD8="Orts-Feld 8"
|
||||
COM_JEM_VENUE_CUSTOM_FIELD9="Orts-Feld 9"
|
||||
COM_JEM_VENUE_CUSTOM_FIELD10="Orts-Feld 10"
|
||||
COM_JEM_VENUE_CUSTOM_FIELD1_DESC="Orts-Feld 1 ist mit Sprachoverrides im Backend umzubenennen. Siehe dazu Hilfe.\\nLeere Felder werden im Frontend nicht angezeigt"
|
||||
COM_JEM_VENUE_CUSTOM_FIELD2_DESC="Orts-Feld 2 ist mit Sprachoverrides im Backend umzubenennen. Siehe dazu Hilfe.\\nLeere Felder werden im Frontend nicht angezeigt"
|
||||
COM_JEM_VENUE_CUSTOM_FIELD3_DESC="Orts-Feld 3 ist mit Sprachoverrides im Backend umzubenennen. Siehe dazu Hilfe.\\nLeere Felder werden im Frontend nicht angezeigt"
|
||||
COM_JEM_VENUE_CUSTOM_FIELD4_DESC="Orts-Feld 4 ist mit Sprachoverrides im Backend umzubenennen. Siehe dazu Hilfe.\\nLeere Felder werden im Frontend nicht angezeigt"
|
||||
COM_JEM_VENUE_CUSTOM_FIELD5_DESC="Orts-Feld 5 ist mit Sprachoverrides im Backend umzubenennen. Siehe dazu Hilfe.\\nLeere Felder werden im Frontend nicht angezeigt"
|
||||
COM_JEM_VENUE_CUSTOM_FIELD6_DESC="Orts-Feld 6 ist mit Sprachoverrides im Backend umzubenennen. Siehe dazu Hilfe.\\nLeere Felder werden im Frontend nicht angezeigt"
|
||||
COM_JEM_VENUE_CUSTOM_FIELD7_DESC="Orts-Feld 7 ist mit Sprachoverrides im Backend umzubenennen. Siehe dazu Hilfe.\\nLeere Felder werden im Frontend nicht angezeigt"
|
||||
COM_JEM_VENUE_CUSTOM_FIELD8_DESC="Orts-Feld 8 ist mit Sprachoverrides im Backend umzubenennen. Siehe dazu Hilfe.\\nLeere Felder werden im Frontend nicht angezeigt"
|
||||
COM_JEM_VENUE_CUSTOM_FIELD9_DESC="Orts-Feld 9 ist mit Sprachoverrides im Backend umzubenennen. Siehe dazu Hilfe.\\nLeere Felder werden im Frontend nicht angezeigt"
|
||||
COM_JEM_VENUE_CUSTOM_FIELD10_DESC="Orts-Feld 10 ist mit Sprachoverrides im Backend umzubenennen. Siehe dazu Hilfe.\\nLeere Felder werden im Frontend nicht angezeigt"
|
||||
|
||||
|
||||
COM_JEM_EVENT_FILES="Dateien"
|
||||
COM_JEM_FILES="Dateien"
|
||||
|
||||
COM_JEM_EVENT_ATTACHMENTS_TAB="Anhänge"
|
||||
|
||||
COM_JEM_ATTACHMENT_FILE="Datei"
|
||||
COM_JEM_ATTACHMENT_NAME="Name"
|
||||
COM_JEM_ATTACHMENT_DESCRIPTION="Beschreibung"
|
||||
COM_JEM_ATTACHMENT_ACCESS="Zugang"
|
||||
COM_JEM_ATTACHMENT_REMOVE="Entfernen"
|
||||
|
||||
COM_JEM_PLEASE_LOGIN="Melden Sie sich bitte an, um Veranstaltungen hinzuzufügen!"
|
||||
COM_JEM_LINK="Verlinkung"
|
||||
COM_JEM_NUM="#"
|
||||
COM_JEM_CALENDAR_ANDMORE="mehr..."
|
||||
COM_JEM_ERROR_ATTACHEMENT_EXTENSION_NOT_ALLOWED="Ist als Anhang nicht erlaubt"
|
||||
COM_JEM_PRINT="Drucken"
|
||||
|
||||
|
||||
COM_JEM_ERROR_ATTACHEMENT_FILE_TOO_BIG="FEHLER: Der Anhang ist zu groß!"
|
||||
COM_JEM_ERROR_ATTACHMENT_SAVING_TO_DB="Fehler beim Speichern der Information zum Anhang."
|
||||
COM_JEM_ERROR_ATTACHMENT_UPDATING_RECORD="Fehler beim Aktualisieren der Information zum Anhang."
|
||||
COM_JEM_ERROR_COULD_NOT_CREATE_FOLDER="Konnte Verzeichnis nicht erstellen."
|
||||
COM_JEM_DOWNLOAD="Download"
|
||||
|
||||
COM_JEM_ICAL="iCal"
|
||||
COM_JEM_ICAL_DESC="Klicken, um Daten in andere Kalender zu übernehmen"
|
||||
COM_JEM_CATEGORIES="Kategorien"
|
||||
COM_JEM_LOCATION="Standort"
|
||||
COM_JEM_SUBCATEGORIES="Unterkategorien"
|
||||
|
||||
COM_JEM_SHOWALL="Zeige Alles"
|
||||
COM_JEM_HIDEALL="Verstecke Alles"
|
||||
|
||||
;
|
||||
COM_JEM_EXPORT_ICS="Exportiere ICS"
|
||||
COM_JEM_ICS_LINK="ICS-Link"
|
||||
COM_JEM_LATITUDE="Breitengrad"
|
||||
COM_JEM_LATITUDE_HINT="Breitengrad Hinweis"
|
||||
COM_JEM_LONGITUDE="Längengrad"
|
||||
COM_JEM_LONGITUDE_HINT="Längengrad Hinweis"
|
||||
COM_JEM_NO_IMAGE="Kein Bild"
|
||||
COM_JEM_WRONG_URL_FORMAT="FEHLER: Falsches URL Format"
|
||||
COM_JEM_MAX_PLACES_DESC="Wieviele Benutzer können maximal teilnehmen"
|
||||
|
||||
COM_JEM_OPEN_DATE="Noch offen"
|
||||
COM_JEM_CONTACT="Kontakt Information"
|
||||
COM_JEM_TELEPHONE="Telefon"
|
||||
|
||||
COM_JEM_TABLE_EVENTIMAGE="Bild"
|
||||
COM_JEM_TABLE_DATE="Datum"
|
||||
COM_JEM_TABLE_TITLE="Titel"
|
||||
COM_JEM_TABLE_LOCATION="Ort"
|
||||
COM_JEM_TABLE_CITY="Stadt"
|
||||
COM_JEM_TABLE_STATE="Bundesland"
|
||||
COM_JEM_TABLE_CATEGORY="Kategorie"
|
||||
COM_JEM_TABLE_ATTENDEES="Teilnehmer"
|
||||
|
||||
COM_JEM_FORMAT_SHORT_DATE="j.m.y"
|
||||
COM_JEM_CUSTOM_FIELDS="Benutzerdefinierte Felder"
|
||||
COM_JEM_ADD_ZIP="PLZ hinzufügen"
|
||||
|
||||
COM_JEM_META_HANDLING="Metadaten"
|
||||
|
||||
COM_JEM_META_KEYWORDS_DESC="In diese Eingabebox können mit Drücken der CTRL-Taste mehrere Keywords eingegeben werden"
|
||||
|
||||
COM_JEM_META_DESCRIPTION_DESC="Mit dem Editor können eigene Meta-Beschreibungen erstellt werden. Den Vorschlag-Schalter für ein Beispiel benutzen"
|
||||
COM_JEM_META_DESCRIPTION_STANDARD="Die Veranstaltung mit dem Titel [title] findet am [dates] statt!"
|
||||
COM_JEM_META_DESCRIPTION_BUTTON="Meta Beschreibung Vorschlag"
|
||||
COM_JEM_META_ERROR="Bitte vor dem Einfügen der Keywords das Eingabefeld wählen"
|
||||
COM_JEM_META_DESCRIPTION_WARN="Bitte keine Hochkommas oder Anführungszeichen in der Beschreibung benutzen, da dies HTML-Fehler verursacht."
|
||||
|
||||
COM_JEM_EVENT_INFO_TAB="Info"
|
||||
COM_JEM_EVENT_MAIN_TAB="Haupteingaben"
|
||||
COM_JEM_EVENT_SECOND_TAB="Weitere Eingaben"
|
||||
|
||||
|
||||
COM_JEM_EVENT_UNPUBLISHED=" Veranstaltung gesperrt"
|
||||
COM_JEM_EVENT_PUBLISHED=" Veranstaltung freigegeben"
|
||||
COM_JEM_EVENT_TRASHED=" Veranstaltung neu in Papierkorb"
|
||||
COM_JEM_VENUE_UNPUBLISHED="Veranstaltungsort(e) erfolgreich gesperrt"
|
||||
COM_JEM_VENUE_PUBLISHED="Veranstaltungsort(e) erfolgreich freigegeben"
|
||||
COM_JEM_VENUE_TRASHED="Veranstaltungsorte im Papierkorb"
|
||||
;TODO: No COM_JEM_ prefix here?
|
||||
JGLOBAL_CHECK_ALL="Alles überprüfen"
|
||||
JGRID_CHECKBOX_ROW_N="Checkbox für Reihe %d"
|
||||
|
||||
;Registered Users
|
||||
COM_JEM_REGISTERED_USER="Angemeldete Teilnehmer"
|
||||
COM_JEM_NAME="Name"
|
||||
COM_JEM_USERNAME="Benutzername"
|
||||
COM_JEM_EMAIL="E-Mail"
|
||||
COM_JEM_IP_ADDRESS="IP-Adresse"
|
||||
COM_JEM_REGDATE="Anmeldedatum"
|
||||
COM_JEM_USER_ID="Benutzer-ID"
|
||||
COM_JEM_COMMENT="Kommentar"
|
||||
COM_JEM_OPTIONAL_COMMENT="Optionaler Kommentar zur Anmeldung"
|
||||
COM_JEM_REMOVE_USER="Anmeldung entfernen"
|
||||
COM_JEM_REGISTERED_USERS_ADDED="Benutz(er) hinzugefügt"
|
||||
COM_JEM_REGISTERED_USERS_DELETED=" angemeldete(r) Teilnehmer gelöscht"
|
||||
COM_JEM_REGISTERED_USERS_CHANGED="Benutz(er) bearbeitet"
|
||||
COM_JEM_SELECT_ITEM_TO_ADD="Bitte etwas zum hinzufügen auswählen"
|
||||
COM_JEM_SELECT_ITEM_TO_DELETE="Zum Löschen etwas auswählen."
|
||||
COM_JEM_CSV_EXPORT="CSV-Export der Anmeldungen"
|
||||
COM_JEM_ADD_USER_REGISTRATIONS="Hinzufügen"
|
||||
COM_JEM_ADD_USER_REGISTRATIONS_DESC="Hinzufügen oder Bearbeiten von Benutzern, die sich selber nicht anmelden können."
|
||||
|
||||
COM_JEM_ATT_FILTER_ALL="Alle"
|
||||
COM_JEM_ATT_FILTER_INVITED="Eingeladen"
|
||||
COM_JEM_ATT_FILTER_NOT_ATTENDING="Nicht teilnehmend"
|
||||
COM_JEM_ATT_FILTER_ATTENDING="Angemeldet"
|
||||
COM_JEM_ATT_FILTER_WAITING="Auf Warteliste"
|
||||
COM_JEM_EDIT_ATTENDEE="Teilnehmer editieren"
|
||||
COM_JEM_STATUS="Status"
|
||||
COM_JEM_STATUS_DESC="Teilnahmestatus des Benutzers wählen."
|
||||
COM_JEM_HEADER_WAITINGLIST_STATUS="Status"
|
||||
COM_JEM_STATUS_UNKNOWN="Teilnahmestatus ist unbekannt"
|
||||
COM_JEM_INVITED="Benutzer ist eingeladen"
|
||||
COM_JEM_ATTENDING="Benutzer nimmt teil."
|
||||
COM_JEM_ATTENDING_MOVE_TO_WAITINGLIST="Benutzer ist auf Teilnehmerliste<br>Klicken zum Verschieben auf Warteliste."
|
||||
COM_JEM_NOT_ATTENDING="Benutzer ist abgemeldet"
|
||||
COM_JEM_ON_WAITINGLIST="Benutzer ist auf der Warteliste."
|
||||
COM_JEM_ON_WAITINGLIST_MOVE_TO_ATTENDING="Benutzer ist auf Warteliste<br>Klicken zum Verschieben auf Teilnehmerliste."
|
||||
COM_JEM_ADDED_TO_ATTENDING="Benutzer wurde zur Teilnehmerliste hinzugefügt."
|
||||
COM_JEM_ADDED_TO_WAITING="Benutzer ist nun auf der Warteliste."
|
||||
COM_JEM_WAITINGLIST_TOGGLE_ERROR="Fehler beim Wechsel des Teilnahmestatus"
|
||||
COM_JEM_NO_WAITINGLIST="Es gibt keine Warteliste."
|
||||
|
||||
COM_JEM_DISPLAY_ATTENDEECOLUMN="Teilnehmer"
|
||||
COM_JEM_DISPLAY_ATTENDEECOLUMN_DESC="Soll die Teilnehmerspalte angezeigt werden?"
|
||||
|
||||
|
||||
; Calendar View
|
||||
COM_JEM_AND_MORE="Und weiter"
|
||||
|
||||
; My-Events View
|
||||
COM_JEM_MYEVENT_MANAGEATTENDEES="Anmeldungsmanager"
|
||||
|
||||
; General, used in my-events/attendees
|
||||
COM_JEM_PUBLISH="Freigeben"
|
||||
COM_JEM_PUBLISH_DESC="Klicken um Veranstaltung freizugeben"
|
||||
COM_JEM_TRASH="in Papierkorb"
|
||||
COM_JEM_TRASH_DESC="Klicken um Veranstaltung in den Papierkorb zu tun"
|
||||
COM_JEM_UNPUBLISH="Sperren"
|
||||
COM_JEM_UNPUBLISH_DESC="Klicken um Veranstaltung zu sperren"
|
||||
COM_JEM_BACK="Zurück"
|
||||
COM_JEM_EXPORT="Exportieren"
|
||||
COM_JEM_EXPORT_DESC="Teilnehmerliste exportieren"
|
||||
|
||||
; Attendees View
|
||||
COM_JEM_ATTENDEES_ATTENDING="Angemeldet"
|
||||
COM_JEM_ATTENDEES_ON_WAITINGLIST="Auf der Warteliste"
|
||||
COM_JEM_ATTENDEES_NOT_ATTENDING="Nicht teilnehmend"
|
||||
COM_JEM_ATTENDEES_INVITED="Eingeladen"
|
||||
COM_JEM_ATTENDEES_STATUS_UNKNOWN="Teilnahmestatus unbekannt"
|
||||
COM_JEM_ATTENDEES_DELETE="Angemeldeten Benutzer löschen"
|
||||
|
||||
; Venue View
|
||||
COM_JEM_DELIVER_NEW_VENUE_DESC="Klicken, um neuen Veranstaltungsort einzugeben"
|
||||
|
||||
; Controller
|
||||
COM_JEM_SELECT_ITEM_TO_PUBLISH="Etwas auswählen, um freizugeben"
|
||||
COM_JEM_SELECT_ITEM_TO_UNPUBLISH="Etwas auswählen, um zu sperren"
|
||||
COM_JEM_SELECT_ITEM_TO_TRASH="Etwas auswählen, um in den Papierkorb zu tun"
|
||||
|
||||
|
||||
; Week Calendar
|
||||
COM_JEM_WKCAL_WEEK="Woche"
|
||||
|
||||
; Editevent
|
||||
COM_JEM_NOVENUE="keiner"
|
||||
COM_JEM_EDITEVENT_FIELD_DESCRIPTION="Beschreibung"
|
||||
COM_JEM_EDITEVENT_FIELD_DESCRIPTION_DESC="Beschreibung"
|
||||
COM_JEM_EDITEVENT_NOTICE_GENSHIELD="Anmerkung: Erstellungs-Schild ist gesetzt bis <b> %s </b>"
|
||||
COM_JEM_EDITEVENT_WARN_RECURRENCE_TITLE="ACHTUNG!"
|
||||
COM_JEM_EDITEVENT_WARN_RECURRENCE_TEXT="Diese Veranstaltung ist Teil einer Wiederholungsserie. Beim Klick auf Speichern wird sie von der Serie getrennt, auch wenn nichts verändert wurde.<br>Bei der Wahl einer Wiederholung dieser Veranstaltung, wird eine neue Wiederholungsserie erstellt."
|
||||
COM_JEM_EDITEVENT_WARN_RECURRENCE_FIRST_TEXT="Diese Veranstaltung ist die erste einer Serie. Beim Klick auf Speichern wird die ganze Serie getrennt, auch wenn nichts verändert wurde.<br>Wenn Wiederholungen gewählt werden, wird eine neue Serie erstellt."
|
||||
COM_JEM_NOVENUES="Kein Veranstaltungsort gefunden"
|
||||
COM_JEM_NOCONTACTS="Keine Kontaktpersonen gefunden"
|
||||
COM_JEM_NOUSERS="Kein Benutzer gefunden."
|
||||
|
||||
; Search
|
||||
COM_JEM_AFRICA="Afrika"
|
||||
COM_JEM_ASIA="Asien"
|
||||
COM_JEM_OCEANIA="Ozeanien"
|
||||
COM_JEM_NORTH_AMERICA="Nord-Amerika"
|
||||
COM_JEM_SOUTH_AMERICA="Süd-Amerika"
|
||||
COM_JEM_ANTARCTICA="Antarktis"
|
||||
COM_JEM_EUROPE="Europa"
|
||||
|
||||
COM_JEM_DEFAULT_PAGE_TITLE_DAY="Tagesansicht"
|
||||
|
||||
|
||||
; EVENT-View
|
||||
COM_JEM_EVENT_HITS_LABEL="Aufrufe"
|
||||
COM_JEM_EVENT_HITS="%s"
|
||||
COM_JEM_EVENT_CREATED_BY_LABEL="Autor"
|
||||
COM_JEM_EVENT_CREATED_BY="%s"
|
||||
COM_JEM_EVENT_READ_MORE="Weiterlesen:"
|
||||
COM_JEM_EVENT_READ_MORE_TITLE="Weiterlesen..."
|
||||
COM_JEM_EVENT_REGISTER_TO_READ_MORE="Für mehr Details bitte einloggen."
|
||||
COM_JEM_EVENT_CONTACT="%s"
|
||||
|
||||
; EDITEVENT-View
|
||||
COM_JEM_EDITEVENT_FIELD_CATEGORIES="Kategorien"
|
||||
COM_JEM_EDITEVENT_FIELD_CATEGORIES_DESC="Kategorien auswählen"
|
||||
COM_JEM_EDITEVENT_FIELD_EVENT_TITLE="Titel"
|
||||
COM_JEM_EDITEVENT_FIELD_EVENT_TITLE_DESC="Dieser Veranstaltungstitel wird angezeigt"
|
||||
COM_JEM_EDITEVENT_FIELD_CONTACT="Kontaktperson"
|
||||
COM_JEM_EDITEVENT_FIELD_CONTACT_DESC="Kontakt wählen"
|
||||
COM_JEM_EDITEVENT_FIELD_DATE="Startdatum"
|
||||
COM_JEM_EDITEVENT_FIELD_DATE_DESC="Startdatum wählen"
|
||||
COM_JEM_EDITEVENT_FIELD_ENDDATE="Enddatum"
|
||||
COM_JEM_EDITEVENT_FIELD_ENDDATE_DESC="Enddatum wählen"
|
||||
COM_JEM_EDITEVENT_FIELD_END_TIME="Schlusszeit"
|
||||
COM_JEM_EDITEVENT_FIELD_END_TIME_DESC="Schlusszeit lösen"
|
||||
COM_JEM_EDITEVENT_FIELD_EVENTTEXT_DESC="Eine Beschreibung der Veranstaltung"
|
||||
COM_JEM_EDITEVENT_FIELD_EVENTTEXT_LABEL="Beschreibung"
|
||||
COM_JEM_EDITEVENT_FIELD_EVENT_TIME="Startzeit"
|
||||
COM_JEM_EDITEVENT_FIELD_EVENT_TIME_DESC="Startzeit wählen"
|
||||
COM_JEM_EDITEVENT_FIELD_FEATURED_DESC="Diese Veranstaltung als Hauptveranstaltung hervorheben"
|
||||
COM_JEM_EDITEVENT_FIELD_PUBLISHED_DESC="Status der Veranstaltung wählen"
|
||||
COM_JEM_EDITEVENT_FIELD_VENUE="Ort"
|
||||
COM_JEM_EDITEVENT_FIELD_VENUE_DESC="Veranstaltungsort auswählen"
|
||||
COM_JEM_EDITEVENT_FIELD_ALIAS="Alias"
|
||||
COM_JEM_EDITEVENT_FIELD_ALIAS_DESC="Alias"
|
||||
COM_JEM_EDITEVENT_EDIT_EVENT = "%s wird bearbeitet"
|
||||
COM_JEM_EDITEVENT_ADD_EVENT = "Veranstaltung hinzufügen"
|
||||
COM_JEM_EDITEVENT_INFO_TAB="Veranstaltung"
|
||||
COM_JEM_EDITEVENT_DETAILS_LEGEND="Allgemein"
|
||||
COM_JEM_EDITEVENT_FIELD_ENABLE_REGISTRATION="Anmeldung"
|
||||
COM_JEM_EDITEVENT_FIELD_ENABLE_REGISTRATION_DESC="aktiviert, kann der Benutzer sich für die Veranstaltung anmelden"
|
||||
COM_JEM_EDITEVENT_FIELD_ENABLE_ANNULATION="Annullierung von Anmeldung ermöglichen"
|
||||
COM_JEM_EDITEVENT_FIELD_ENABLE_ANNULATION_DESC="Aktiviert kann ein angemeldeter Benutzer seine Anmeldung für den Event annullieren. Möglich ist Ja, Nein oder Bis N Stunden vor Beginn des Events."
|
||||
COM_JEM_EDITEVENT_FIELD_ANNULATION_UNTIL="Bis"
|
||||
COM_JEM_EDITEVENT_FIELD_ANNULATION_UNTIL_DESC="Anzahl Stunden vor Beginn des Events, solange eine Annullierung einer Anmeldung möglich ist."
|
||||
COM_JEM_EDITEVENT_FIELD_ANNULATION_UNTIL_POSTFIX="Stunden vor Beginn des Events"
|
||||
COM_JEM_UNTIL="Bis"
|
||||
COM_JEM_INVITED_USERS_ONLY="Nur eingeladene Benutzer"
|
||||
COM_JEM_EDITEVENT_FIELD_REG_INVITED_ONLY="Nur für Eingeladene Benutzer"
|
||||
COM_JEM_EDITEVENT_FIELD_REG_INVITED_ONLY_DESC="An-/Abmeldung nur auf eingeladene Benutzer beschränken."
|
||||
COM_JEM_EDITEVENT_FIELD_ENABLE_UNREGISTRATION="Abmeldung aktivieren"
|
||||
COM_JEM_EDITEVENT_FIELD_ENABLE_UNREGISTRATION_DESC="ABGELAUFEN - Ermöglicht angemeldeten Benutzern die Anmeldung zu annullieren"
|
||||
COM_JEM_EDITEVENT_FIELD_MAX_PLACES="Max. Plätze"
|
||||
COM_JEM_EDITEVENT_FIELD_MAX_PLACES_DESC="Hier kann die Maximalzahl der Teilnehmer eingegeben werden, der Rest kommt auf eine Warteliste, wenn dies aktiviert ist."
|
||||
COM_JEM_EDITEVENT_FIELD_INVITED_USERS="Eingeladene Benutzer"
|
||||
COM_JEM_EDITEVENT_FIELD_INVITED_USERS_DESC="Anzahl eingeladener Benutzer -zur Info. Klicken auf Auswählen, um Benutzer einzuladen."
|
||||
COM_JEM_EDITEVENT_FIELD_BOOKED_PLACES="Belegte Plätze"
|
||||
COM_JEM_EDITEVENT_FIELD_BOOKED_PLACES_DESC="Anzahl bereits belegter Plätze - zur Info."
|
||||
COM_JEM_EDITEVENT_FIELD_AVAILABLE_PLACES="Freie Plätze"
|
||||
COM_JEM_EDITEVENT_FIELD_AVAILABLE_PLACES_DESC="Anzahl noch freier Plätze - zur Info"
|
||||
COM_JEM_EDITEVENT_FIELD_ENABLE_WAITINGLIST="Warteliste aktivieren"
|
||||
COM_JEM_EDITEVENT_FIELD_ENABLE_WAITINGLIST_DESC="Wenn aktiviert kommen überzählige Teilnehmer auf eine Warteliste und automatisch auf die Teilnehmerliste verschoben, wenn ein Platz frei wird."
|
||||
COM_JEM_EDITEVENT_FIELD_RECURRENCE="Wiederholung"
|
||||
COM_JEM_EDITEVENT_FIELD_RECURRENCE_DESC="Wiederholung"
|
||||
COM_JEM_EDITEVENT_FIELD_RECURRENCE_COUNTER="Wiederholungszähler"
|
||||
COM_JEM_EDITEVENT_FIELD_RECURRENCE_COUNTER_DESC=""
|
||||
|
||||
; EDITVENUE-View
|
||||
COM_JEM_EDITVENUE_INFO_TAB="Allgemein"
|
||||
COM_JEM_EDITVENUE_ATTACHMENTS_TAB="Anhänge"
|
||||
COM_JEM_EDITVENUE_OTHER_TAB="Mehr"
|
||||
COM_JEM_EDITVENUE_CUSTOMFIELDS="Benutzerdefinierte Felder"
|
||||
COM_JEM_GEODATA="Geodata"
|
||||
COM_JEM_EDITVENUE_VENUE_EDIT="Ort %s wird bearbeitet"
|
||||
COM_JEM_EDITVENUE_DETAILS_LEGEND="Adresse"
|
||||
COM_JEM_EDITVENUE_VENUE_ADD="Veranstaltungsort hinzufügen"
|
||||
COM_JEM_EDITVENUE_FIELD_ALIAS="Alias"
|
||||
COM_JEM_EDITVENUE_FIELD_ALIAS_DESC="Alias"
|
||||
COM_JEM_VENUE_ADDRPLACEHOLDER="Hier Adresse eingeben"
|
||||
COM_JEM_VENUE_ADDR_FINDVENUEDATA="Suchen mit - in JEM eingegebenen - Daten"
|
||||
COM_JEM_VENUE_COPY_DATA="Übernehme alles nach JEM"
|
||||
COM_JEM_VENUE_COPY_ADDRESS="Übernehme nur Adresse"
|
||||
COM_JEM_VENUE_COPY_VENUE="Übernehme nur Bezeichnung des Veranstaltungsorts"
|
||||
COM_JEM_VENUE_COPY_COORDINATES="nur Koordinaten übernehmen (nach Pfeilkorrektur)"
|
||||
|
||||
|
||||
; ERRORS
|
||||
COM_JEM_EVENT_ERROR_END_BEFORE_START="Veranstaltungsbeginn muss vor dem Ende sein"
|
||||
COM_JEM_EVENT_ERROR_NAME="Titel einsetzen"
|
||||
COM_JEM_EVENT_ERROR_EVENT_NOT_FOUND="Veranstaltung nicht gefunden!"
|
||||
COM_JEM_EVENT_ERROR_STORE_CATEGORIES="Fehler beim Speichern von Kategorien"
|
||||
COM_JEM_EVENT_ERROR_STORE_INVITED_USERS="Fehler beim Speichern eingeladener Benutzer."
|
||||
COM_JEM_VENUE_ERROR_CITY="Stadt ist zu lang"
|
||||
COM_JEM_VENUE_ERROR_COUNTRY="Bundesland ist zu lang"
|
||||
COM_JEM_VENUE_ERROR_MAP_ADDRESS="Sind Felder: Strasse, Stadt, Bundesland, PLZ ausgefüllt"
|
||||
COM_JEM_VENUE_ERROR_NAME="Bezeichnung des Veranstaltungsorts fehlt"
|
||||
COM_JEM_VENUE_ERROR_POSTALCODE="PLZ ist zu lang"
|
||||
COM_JEM_VENUE_ERROR_STREET="Strasse ist zu lang"
|
||||
COM_JEM_VENUE_ERROR_STATE="Staat ist zu lang"
|
||||
COM_JEM_VENUE_ERROR_URL_FORMAT="Das URL-Format ist falsch"
|
||||
COM_JEM_VENUE_ERROR_URL_LENGTH="URL ist zu lang"
|
||||
COM_JEM_VENUE_ERROR_VENUE_NOT_FOUND="Kein Veranstaltungsort gefunden"
|
||||
|
||||
COM_JEM_WRITTEN_BY="Verfasst von %s"
|
||||
COM_JEM_SELECT_CONTACT="Kontakt wählen"
|
||||
COM_JEM_METADATA="Metadaten"
|
||||
COM_JEM_ATTACHMENTS_LEGEND="Anhänge"
|
||||
COM_JEM_EVENT_OTHER_TAB="Mehr"
|
||||
COM_JEM_EVENT_CUSTOMFIELDS_LEGEND="Benutzerdefinierte Felder"
|
||||
COM_JEM_EVENT_REGISTRATION_LEGEND="Anmeldung"
|
||||
COM_JEM_NOCONTACT="Keine Kontaktperson"
|
||||
COM_JEM_COUNTRY_DESC="Anzuzeigendes Land"
|
||||
COM_JEM_WEBSITE_DESC="Format wie: http://www.webseite.de"
|
||||
|
||||
COM_JEM_GLOBAL_CHECKED_OUT_BY="ausgecheckt durch %s"
|
||||
COM_JEM_FILE="Datei"
|
||||
COM_JEM_FILE_NAME="Dateiname"
|
||||
COM_JEM_FILE_DESCRIPTION="Beschreibung"
|
||||
COM_JEM_FILE_NOT_FOUND="Datei nicht gefunden."
|
||||
|
||||
COM_JEM_FIELD_METADESCRIPTION_DESC="Hier kann man eine Meta-Beschreibung einsetzen"
|
||||
COM_JEM_FIELD_METAKEYWORDS_DESC="Hier kann man Keywords einsetzen"
|
||||
COM_JEM_VENUE_DESCRIPTION_DESC="Hier kann man eine Beschreibung des Veranstaltungsortes einsetzen"
|
||||
|
||||
COM_JEM_CATEGORY_ERROR_404="Kategorie #%d nicht gefunden"
|
||||
|
||||
|
||||
|
||||
COM_JEM_VENUES_EVENTS_ARCHIVED="Archivierte Veranstaltungen"
|
||||
COM_JEM_VENUES_EVENTS_PUBLISHED="Veröffentlichte Veranstaltungen"
|
||||
|
||||
|
||||
; GLOBAL
|
||||
COM_JEM_GLOBAL_MAILERPLUGIN_DISABLED="Mailer-Plugin ist deaktiviert.<br>Es wurden keine E-Mails versandt!"
|
||||
COM_JEM_GLOBAL_REMOVE_ATTACHEMENT="Anhang entfernen"
|
||||
673
components/com_jem/language/de-DE/de-DE.com_jem.ini_
Normal file
673
components/com_jem/language/de-DE/de-DE.com_jem.ini_
Normal file
@ -0,0 +1,673 @@
|
||||
; @version 2.3.1
|
||||
; @package JEM
|
||||
; @copyright (C) 2013-2021 joomlaeventmanager.net
|
||||
; @copyright (C) 2005-2009 Christoph Lukes
|
||||
; @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
|
||||
;
|
||||
; All translations can be found at https://www.transifex.com/projects/p/JEM/
|
||||
; Please join the translation team if you want to contribute your changes to the translations
|
||||
;
|
||||
; Note : All ini files need to be saved as UTF-8 - No BOM
|
||||
;
|
||||
; Frontend file
|
||||
COM_JEM_SIGNUPHERE_AS_GUEST="Ohne Login als Gast anmelden (nicht empfohlen)"
|
||||
COM_JEM_SHOWSTATE="Bundeslandspalte anzeigen"
|
||||
COM_JEM_SHOWSTATE_DESC="Zeigt die Spalte Bundesland/Region an"
|
||||
COM_JEM_GEODATA_LEGEND="Geodata"
|
||||
COM_JEM_EDITEVENT_IMAGE_LEGEND="Event- Bild"
|
||||
COM_JEM_DELIVER_NEW_EVENT="Veranstaltung einreichen"
|
||||
COM_JEM_DELIVER_NEW_VENUE="Veranstaltungsort anlegen"
|
||||
COM_JEM_SHOW_ARCHIVE="Archiv anzeigen"
|
||||
COM_JEM_ADD_NAME="Bitte geben Sie hier Ihren Namen ein"
|
||||
COM_JEM_ADD_EMAIL="Bitte geben Sie hier Ihre E-Mail Adresse an"
|
||||
COM_JEM_WRONG_EMAIL_FORMAT="FEHLER: Die E-Mail hat das falsche Format!"
|
||||
COM_JEM_ADD_DATE="Bitte Datum eingeben!"
|
||||
COM_JEM_DATE_WRONG="FEHLER: Das Datum hat das falsche Format!"
|
||||
COM_JEM_ADD_TITLE="Bitte Titel eingeben!"
|
||||
COM_JEM_ADD_TIME="Bitte Zeit eingeben!"
|
||||
COM_JEM_TIME_WRONG="Fehler: Die Zeit hat das falsche Format!"
|
||||
COM_JEM_ENDTIME_WRONG="Fehler: Die Endzeit hat das falsche Format!"
|
||||
COM_JEM_SELECT_CATEGORY="Bitte Kategorie auswählen!"
|
||||
COM_JEM_SELECT_VENUE="Bitte Veranstaltungsort auswählen!"
|
||||
COM_JEM_SELECT_USERS_AND_STATUS="Bitte Benutzer und Teilnahmerückmeldung wählen"
|
||||
COM_JEM_SELECT_USERS_TO_INVITE="Bitte die einzuladenden Benutzer auswählen."
|
||||
COM_JEM_TITLE="Titel"
|
||||
COM_JEM_TITLE_SHORT="Titel"
|
||||
COM_JEM_SAVE="Speichern"
|
||||
COM_JEM_CANCEL="Abbrechen"
|
||||
COM_JEM_USERINFO="Benutzerdaten"
|
||||
COM_JEM_YOUR_NAME="Ihr Name"
|
||||
COM_JEM_YOUR_EMAIL="Ihre E-Mail"
|
||||
COM_JEM_NORMAL_INFO="Allgemein"
|
||||
COM_JEM_VENUE="Veranstaltungsort"
|
||||
COM_JEM_VENUE_SHORT="Ort"
|
||||
COM_JEM_CATEGORY="Kategorie"
|
||||
COM_JEM_DATE="Datum"
|
||||
COM_JEM_DATE_HINT="Format yyyy-mm-dd!"
|
||||
COM_JEM_DATEFIELD_HINT="Format: %s"
|
||||
COM_JEM_TIME="Zeit"
|
||||
COM_JEM_TIME_SHORT="Zeit"
|
||||
COM_JEM_TIME_HINT="Format: hh:mm!"
|
||||
COM_JEM_ENDTIME_HINT="Format: hh:mm! (optional)"
|
||||
COM_JEM_ENDTIME="Endzeit"
|
||||
COM_JEM_SUBMIT_REGISTER="Anmelden erlauben"
|
||||
COM_JEM_SUBMIT_UNREGISTER="Abmelden erlauben"
|
||||
COM_JEM_SELECT_IMAGE="Bild zum hochladen auswählen"
|
||||
COM_JEM_SELECT_IMAGE_EDIT="Bild. Leerlassen, um nichts zu verändern"
|
||||
COM_JEM_MAX_IMAGE_FILE_SIZE="Max. Bildgröße"
|
||||
COM_JEM_UPLOAD_IMAGE="Bild zum Hochladen wählen"
|
||||
COM_JEM_MAX_FILE_SIZE_1="Dateigrösse ist begrenzt auf %d kB."
|
||||
COM_JEM_DESCRIPTION="Beschreibung"
|
||||
COM_JEM_EVENT_DESCRIPTION="Beschreibung"
|
||||
COM_JEM_VENUE_DESCRIPTION="Beschreibung"
|
||||
COM_JEM_NO_HTML="HTML ist nicht erlaubt!"
|
||||
COM_JEM_AVAILABLE="verfügbar"
|
||||
COM_JEM_REFRESH="aktualisieren"
|
||||
COM_JEM_DETAILS="Details"
|
||||
COM_JEM_NO_ACCESS="Zugriff ist nicht erlaubt"
|
||||
COM_JEM_EVENT="Veranstaltung"
|
||||
COM_JEM_WHAT="Was"
|
||||
COM_JEM_WHEN="Wann"
|
||||
COM_JEM_WHERE="Wo"
|
||||
COM_JEM_MAP="Karte"
|
||||
COM_JEM_WEBSITE="Webseite"
|
||||
COM_JEM_STREET="Straße"
|
||||
COM_JEM_STATE="Bundesland"
|
||||
COM_JEM_ZIP="Postleitzahl"
|
||||
COM_JEM_CITY="Stadt"
|
||||
COM_JEM_SELECT_CITY="Wähle eine Stadt"
|
||||
COM_JEM_COUNTRY="Land"
|
||||
COM_JEM_SELECT_COUNTRY="Wähle ein Land"
|
||||
COM_JEM_CONTINENT="Kontinent"
|
||||
COM_JEM_SELECT_CONTINENT="Wähle einen Kontinent"
|
||||
COM_JEM_NO_DESCRIPTION="Zur Zeit keine Beschreibung verfügbar"
|
||||
COM_JEM_REGISTERED_USERS="Bereits angemeldete Benutzer"
|
||||
COM_JEM_YOUR_REGISTRATION="Ihre An-/Abmeldung"
|
||||
COM_JEM_YOU_ARE_UNREGISTERED="Von dir gibt es noch keine Rückmeldung. Zur Anmeldung für diesen Event bitte eine der untenstehenden Optionen wählen und abschicken."
|
||||
COM_JEM_YOU_ARE_INVITED="Du bist zur Teilnahme für diesen Event eingeladen. Bitte eine der untenstehenden Optionen wählen und ihre Entscheidung abschicken."
|
||||
COM_JEM_YOU_ARE_ATTENDING="Du bist angemeldet und stehst auf der Teilnehmerliste. Du kannst deine Entscheidung allenfalls unten ändern."
|
||||
COM_JEM_YOU_ARE_ON_WAITINGLIST="Du bist angemeldet, aber stehst noch auf der Warteliste. Du kannst deine Entscheidung unten noch ändern. "
|
||||
COM_JEM_YOU_ARE_NOT_ATTENDING="Du bist vom Event abgemeldet. Du kannst deine Entscheidung unten noch ändern."
|
||||
COM_JEM_I_WILL_GO="Ich möchte an dieser Veranstaltung teilnehmen"
|
||||
COM_JEM_I_WILL_NOT_GO="Ich kann NICHT an diesen Event"
|
||||
COM_JEM_REGISTER="Anmeldung"
|
||||
COM_JEM_ALLREADY_REGISTERED="Sie haben sich bereits zu dieser Veranstaltung angemeldet."
|
||||
COM_JEM_UNREGISTER_BOX="Von Veranstaltung abmelden"
|
||||
COM_JEM_UNREGISTER="Abmelden"
|
||||
COM_JEM_LOGIN_FOR_REGISTER="Zur Anmeldung für Veranstaltungen bitte zuerst einloggen!"
|
||||
COM_JEM_NEED_LOGGED_IN="Sie müssen sich anmelden."
|
||||
COM_JEM_TOO_LATE_REGISTER="Der Anmeldezeitraum ist abgelaufen."
|
||||
COM_JEM_TOO_LATE_UNREGISTER="Es ist zu spät, sich noch abzumelden!"
|
||||
COM_JEM_WRONG_STATE_FOR_REGISTER="Die Veranstaltung muss freigegeben sein, um Anmeldung zu erlauben"
|
||||
COM_JEM_NOT_ALLOWED_TO_REGISTER="Du kannst dich nicht für diesen Event anmelden."
|
||||
COM_JEM_NOT_ALLOWED_TO_ANNULATE="Annullierung der Anmeldung für diesen Event ist nicht (mehr) erlaubt."
|
||||
COM_JEM_ERROR_ANNULATION_NOT_ALLOWED="FEHLER: Annullierung der Anmeldung ist nicht erlaubt."
|
||||
COM_JEM_ERROR_REGISTRATION="FEHLER: Registrierung für Veranstaltung misslungen!"
|
||||
COM_JEM_ERROR_ADD_VENUE="FEHLER: Veranstaltungsort eingeben"
|
||||
COM_JEM_ERROR_ADD_STREET="FEHLER: Bitte Straße eingeben!"
|
||||
COM_JEM_ERROR_ADD_ZIP="FEHLER: Bitte Postleitzahl eingeben!"
|
||||
COM_JEM_ERROR_ADD_CITY="FEHLER: Bitte Stadt eingeben!"
|
||||
COM_JEM_ERROR_ADD_COUNTRY="FEHLER: Bitte Ländercode eingeben!"
|
||||
COM_JEM_WEBSITE_HINT="URL muss im Format http://www.google.com sein!"
|
||||
COM_JEM_SHOW_EVENTS="Veranstaltungen anzeigen"
|
||||
COM_JEM_EVENTS="Veranstaltungen"
|
||||
COM_JEM_CATEGORY_EMPTY="Kategorie auswählen"
|
||||
COM_JEM_IMAGE_EMPTY="Bitte Bild zum hochladen auswählen"
|
||||
COM_JEM_UPLOAD_FAILED_NOT_AN_IMAGE="Upload fehlgeschlagen. Die hochgeladene Datei ist kein Bild."
|
||||
COM_JEM_WRONG_IMAGE_FILE_TYPE="Die Bilddatei muss vom Typ gif, png, jpg sein."
|
||||
COM_JEM_UPLOAD_FAILED="Upload fehlgeschlagen"
|
||||
COM_JEM_IMAGE_FILE_SIZE="Datei ist zu groß!"
|
||||
COM_JEM_REMOVE_IMAGE="Bild entfernen"
|
||||
COM_JEM_ERROR_ADD_ADDRESS="Fehler: Adresse ausfüllen"
|
||||
COM_JEM_ERROR_NAME_LONG="FEHLER: Name ist zu lang!"
|
||||
COM_JEM_ERROR_URL_LONG="FEHLER: URL ist zu lang!"
|
||||
COM_JEM_ERROR_URL_WRONG_FORMAT="FEHLER: URL hat falsches Format!"
|
||||
COM_JEM_ERROR_STREET_LONG="FEHLER: Straße ist zu lang!"
|
||||
COM_JEM_ERROR_STATE_LONG="FEHLER: Bundesland ist zu lang!"
|
||||
COM_JEM_ERROR_ZIP_LONG="FEHLER: Postleitzahl ist zu lang!"
|
||||
COM_JEM_ERROR_CITY_LONG="FEHLER: Stadt ist zu lang!"
|
||||
COM_JEM_ERROR_COUNTRY_LONG="FEHLER: Ländercode ist zu lang!"
|
||||
COM_JEM_INVALID_DATE_REQUESTED_USING_CURRENT="Ungültiges Datum! Es wird stattdessen das heutige verwendet."
|
||||
COM_JEM_PRINT_DESC="Diese Seite drucken"
|
||||
COM_JEM_EMAIL_DESC="Diese Seite via E-Mail weiter empfehlen"
|
||||
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;;;;;;;; Submission mailtexts for the administration ;;;;;;;;;;;;;
|
||||
|
||||
COM_JEM_NEW_EVENT_MAIL=" : Neue Veranstaltung"
|
||||
COM_JEM_MAIL_NEW_EVENT="Es wurde von %s ( %s ) eine neue Veranstaltung eingereicht.\n\nMailadresse: %s \nIP: %s \nZeit des Einreichens: %s \n\nTitel: %s \nDatum: %s \nBeginn: %s \nVeranstaltungsort: %s / %s \n\nBeschreibung:\n%s \n\n%s"
|
||||
COM_JEM_EDIT_EVENT_MAIL=" : Eine Veranstaltung wurde editiert"
|
||||
COM_JEM_MAIL_EDIT_EVENT="Eine Veranstaltung wurde von %s ( %s ) bearbeitet.\n\nMailadresse: %s \nIP: %s \nZeit der Bearbeitung: %s \n\nTitel: %s \nDatum: %s \nBeginn: %s \nVeranstaltungsort: %s / %s \n\nBeschreibung:\n %s \n\n%s"
|
||||
COM_JEM_MAIL_EVENT_PUBLISHED="Die Veranstaltung ist veröffentlicht und kann unter folgendem Link erreicht werden: %s"
|
||||
COM_JEM_MAIL_EVENT_UNPUBLISHED="Die Veranstaltung ist gesperrt und muss geprüft werden."
|
||||
|
||||
COM_JEM_NEW_VENUE_MAIL=" : Neuer Veranstaltungsort"
|
||||
COM_JEM_MAIL_NEW_VENUE="Es wurde von %s ( %s ) ein neuer Veranstaltungsort eingereicht.\n\nMailadresse: %s \nIP: %s \nZeit des Einreichens: %s \n\nName: %s \nHomepage: %s \nStraße: %s \nPostleitzahl: %s \nStadt: %s \nLand: %s \n\nBeschreibung:\n%s \n\n%s"
|
||||
COM_JEM_EDIT_VENUE_MAIL=" : Ein Veranstaltungsort wurde editiert"
|
||||
COM_JEM_MAIL_EDIT_VENUE="Es wurde von %s ( %s ) ein Veranstaltungsort bearbeitet.\n\nMailadresse: %s \nIP: %s \nZeit des Einreichens: %s \n\nName: %s \nHomepage: %s \nStraße: %s \nPostleitzahl: %s \nStadt: %s \nLand: %s \n\nBeschreibung:\n%s \n\n%s"
|
||||
COM_JEM_MAIL_VENUE_PUBLISHED="Der Veranstaltungsort ist veröffentlicht und kann unter folgendem Link erreicht werden: %s"
|
||||
COM_JEM_MAIL_VENUE_UNPUBLISHED="Der Veranstaltungsort ist gesperrt und muss geprüft werden."
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;;;;;;;; Submission mailtexts for the user ;;;;;;;;;;;;;
|
||||
|
||||
COM_JEM_NEW_USER_EVENT_MAIL=" : Danke für Ihren Veranstaltungsvorschlag"
|
||||
COM_JEM_USER_MAIL_NEW_EVENT="Hallo %s ( %s ), \n\nWir haben Ihren Veranstaltungsvorschlag erhalten\nHier noch einmal die uns mitgeteilten Daten:\nZeit des Einreichens: %s \n\nTitel: %s \nDatum: %s \nBeginn: %s \nVeranstaltungsort: %s / %s \n\nBeschreibung:\n%s \n\n%s"
|
||||
COM_JEM_EDIT_USER_EVENT_MAIL=" : Ihre Veranstaltungsbearbeitung"
|
||||
COM_JEM_USER_MAIL_EDIT_EVENT="Hallo %s ( %s ), \n\nSie haben erfolgreich folgende Veranstaltung bearbeitet:\nZeit der Bearbeitung: %s \n\nTitel: %s \nDatum: %s \nBeginn: %s \nVeranstaltungsort: %s / %s \n\nBeschreibung:\n %s \n\n%s"
|
||||
COM_JEM_USER_MAIL_EVENT_PUBLISHED="Die Veranstaltung ist veröffentlicht und kann unter folgendem Link erreicht werden: %s"
|
||||
COM_JEM_USER_MAIL_EVENT_UNPUBLISHED="Ihr Veranstaltungsvorschlag wird bald von uns geprüft und veröffentlicht. Vielen Dank!"
|
||||
|
||||
COM_JEM_USER_NEW_VENUE_MAIL=" : Danke für die Eingabe eines neuen Veranstaltungsorts"
|
||||
COM_JEM_USER_MAIL_NEW_VENUE="Hallo %s ( %s ), \n\nWir haben Ihren Vorschlag erhalten\nHier noch einmal die uns mitgeteilten Daten:\n\nZeit des Einreichens: %s \n\nName: %s \nHomepage: %s \nStraße: %s \nPostleitzahl: %s \nStadt: %s \nLand: %s \n\nBeschreibung:\n%s \n\n%s"
|
||||
COM_JEM_USER_EDIT_VENUE_MAIL=" : Bearbeitung eines Veranstaltungsorts"
|
||||
COM_JEM_USER_MAIL_EDIT_VENUE="Hallo %s ( %s ), \n\nSie haben erfolgreich folgende Veranstaltung bearbeitet:\n\nZeit der Bearbeitung: %s \n\nName: %s \nHomepage: %s \nStraße: %s \nPostleitzahl: %s \nStadt: %s \nLand: %s \n\nBeschreibung:\n%s \n\n%s"
|
||||
COM_JEM_USER_MAIL_VENUE_PUBLISHED="Der Veranstaltungsort ist veröffentlicht und kann unter folgendem Link erreicht werden: %s"
|
||||
COM_JEM_USER_MAIL_VENUE_UNPUBLISHED="Ihr Vorschlag wird bald von uns geprüft und veröffentlicht. Vielen Dank!"
|
||||
|
||||
COM_JEM_VENUE_SAVED="Veranstaltungsort gespeichert"
|
||||
COM_JEM_EVENT_SAVED="Veranstaltung gespeichert"
|
||||
COM_JEM_ERROR_TITLE_LONG="FEHLER: Titel ist zu lang oder leer!"
|
||||
COM_JEM_ARCHIVE="Archiv"
|
||||
COM_JEM_REGISTERED_SUCCESSFULL="Sie haben sich erfolgreich zu dieser Veranstaltung angemeldet."
|
||||
COM_JEM_UNREGISTERED_SUCCESSFULL="Sie haben sich erfolgreich von dieser Veranstaltung abgemeldet."
|
||||
COM_JEM_REGISTRATION_THANKS_FOR_RESPONSE="Danke für Deine Antwort. Deine Rückmeldung wurde gespeichert."
|
||||
COM_JEM_EDIT_EVENT="Veranstaltung editieren"
|
||||
COM_JEM_EDIT_EVENT_DESC="Klicken Sie hier, um diese Veranstaltung zu bearbeiten"
|
||||
COM_JEM_EDIT_VENUE="Veranstaltungsort editieren"
|
||||
COM_JEM_EDIT_VENUE_DESC="Klicken Sie hier, um diesen Veranstaltungsort zu bearbeiten"
|
||||
COM_JEM_COPY_EVENT="Veranstaltung kopieren"
|
||||
COM_JEM_COPY_EVENT_DESC="Klicken Sie hier, um eine neue Veranstaltung hinzuzufügen, die auf dieser Veranstaltung basiert."
|
||||
COM_JEM_COPY_VENUE="Veranstaltungsort kopieren"
|
||||
COM_JEM_COPY_VENUE_DESC="Klicken Sie hier, um einen neuen Veranstaltungsort auf der Grundlage dieses Veranstaltungsortes hinzuzufügen."
|
||||
COM_JEM_SUBMIT_EVENT_DESC="Klicken, um Veranstaltung hinzuzufügen"
|
||||
COM_JEM_SHOW_EVENTS_DESC="Klicken, um aktuelle Veranstaltungen anzuzeigen"
|
||||
COM_JEM_SHOW_ARCHIVE_DESC="Klicken, um das Archiv anzuzeigen"
|
||||
COM_JEM_ENDDATE="Enddatum"
|
||||
COM_JEM_NO_EVENTS="Zur Zeit sind keine Veranstaltungen verfügbar"
|
||||
COM_JEM_NO_EVENTS_FOUND="Keine solchen Events gefunden."
|
||||
COM_JEM_ADDRESS="Adresse"
|
||||
COM_JEM_ADD_VENUE="Veranstaltungsort hinzufügen"
|
||||
COM_JEM_ADD_EVENT="Veranstaltung hinzufügen"
|
||||
COM_JEM_THE_EVENT="Die Veranstaltung"
|
||||
COM_JEM_EDITED_BY_ANOTHER_ADMIN="wird derzeitig bereits von einem anderen Nutzer editiert"
|
||||
COM_JEM_CURRENT_IMAGE="Derzeitiges Bild"
|
||||
COM_JEM_SELECTED_IMAGE="Neues Bild"
|
||||
COM_JEM_SELECTVENUE="Veranstaltungsort auswählen"
|
||||
COM_JEM_NO_VENUE="keiner"
|
||||
COM_JEM_SELECT="Wählen"
|
||||
COM_JEM_NOTES="Anmerkungen"
|
||||
COM_JEM_COUNTRY_HINT="ISO-CODE (US,DE,AT,CH, etc.)"
|
||||
COM_JEM_SEARCH="Suche:"
|
||||
COM_JEM_REGISTRATION="Anmeldung"
|
||||
COM_JEM_CLICK_TO_ENLARGE="Klicken um zu vergrößern"
|
||||
COM_JEM_VENUE_NAME_ALREADY_EXIST="Der Veranstaltungsort: %s ist bereits in der Datenbank. Wählen Sie bitte einen anderen Namen!"
|
||||
COM_JEM_SHOW_USER_PROFILE="Klicken, um das Benutzerprofil anzuzeigen"
|
||||
|
||||
COM_JEM_METADATA_INFORMATION="Metadaten"
|
||||
COM_JEM_META_DESCRIPTION="Beschreibung editieren"
|
||||
COM_JEM_META_KEYWORDS="Keywords editieren"
|
||||
COM_JEM_ADD_VENUE_CITY="Veranstaltungsort/Stadt einfügen"
|
||||
COM_JEM_ENABLE_MAP="Kartendienst aktivieren"
|
||||
COM_JEM_ADDRESS_NOTICE="Die Adressfelder sind nicht zwingend auszufüllen, außer Sie aktivieren hier einen der Kartendienste."
|
||||
|
||||
;Recurrence
|
||||
COM_JEM_RECURRING_EVENTS="Wiederholende Veranstaltungen"
|
||||
COM_JEM_RECURRING_EVENT="Wiederholte Veranstaltung"
|
||||
COM_JEM_RECURRING_EVENT_DESC="Diese Veranstaltung ist Teil einer Wiederholungsserie."
|
||||
COM_JEM_RECURRING_FIRST_EVENT_DESC="Diese Veranstaltung ist die erste einer Wiederholungsserie."
|
||||
COM_JEM_RECURRENCE="Wiederholung"
|
||||
COM_JEM_NOTHING="keine"
|
||||
COM_JEM_DAYLY="täglich"
|
||||
COM_JEM_WEEKLY="wöchentlich"
|
||||
COM_JEM_MONTHLY="monatlich"
|
||||
COM_JEM_WEEKDAY="Wochentag"
|
||||
COM_JEM_OUTPUT_DAY="Alle [placeholder] Tage wiederholen"
|
||||
COM_JEM_OUTPUT_WEEK="Alle [placeholder] Wochen wiederholen"
|
||||
COM_JEM_OUTPUT_MONTH="Alle [placeholder] Monate wiederholen"
|
||||
COM_JEM_OUTPUT_WEEKDAY="Jeden [placeholder]. [placeholder_weekday] pro Monat wiederholen"
|
||||
COM_JEM_RECURRENCE_COUNTER="Bis Ende"
|
||||
COM_JEM_UNLIMITED="unendlich"
|
||||
COM_JEM_RECURRING_INFO_TITLE="(Zur Information:) Diese Veranstaltung gehört zu einer Serie mit folgender Einstellung:"
|
||||
|
||||
COM_JEM_LAST=" letzte"
|
||||
COM_JEM_BEFORE_LAST=" vorletzte"
|
||||
|
||||
COM_JEM_MONDAY="Montag"
|
||||
COM_JEM_TUESDAY="Dienstag"
|
||||
COM_JEM_WEDNESDAY="Mittwoch"
|
||||
COM_JEM_THURSDAY="Donnerstag"
|
||||
COM_JEM_FRIDAY="Freitag"
|
||||
COM_JEM_SATURDAY="Samstag"
|
||||
COM_JEM_SUNDAY="Sonntag"
|
||||
|
||||
COM_JEM_GO="Los"
|
||||
COM_JEM_RESET="Löschen"
|
||||
COM_JEM_DISPLAY_NUM="Limit"
|
||||
COM_JEM_FILTER="Filter"
|
||||
COM_JEM_ORDERING="Ordnen nach"
|
||||
|
||||
COM_JEM_PROPOSED_BY="Vorgeschlagen von"
|
||||
|
||||
COM_JEM_MY_ITEMS="Meine Seite"
|
||||
COM_JEM_MY_EVENTS="Meine Veranstaltungen"
|
||||
COM_JEM_MY_VENUES="Meine Veranstaltungsorte"
|
||||
COM_JEM_NO_VENUES="Keine Veranstaltungsorte"
|
||||
COM_JEM_REGISTERED_TO="Registriert für"
|
||||
COM_JEM_IMAGE="Bild"
|
||||
|
||||
;
|
||||
COM_JEM_CALENDAR_SHOWALL="Zeige Alles"
|
||||
COM_JEM_CALENDAR_HIDEALL="Verstecke Alles"
|
||||
|
||||
;
|
||||
COM_JEM_MAX_PLACES="Max. Teilnehmerzahl"
|
||||
COM_JEM_MAX_PLACES_DESC="Wieviele Benutzer können maximal teilnehmen"
|
||||
COM_JEM_ENABLE_WAITINGLIST="Warteliste"
|
||||
COM_JEM_ENABLE_WAITINGLIST_DESC="Warteliste aktivieren"
|
||||
COM_JEM_EVENT_FULL_REGISTER_TO_WAITING_LIST="Die Veranstaltung ist ausgebucht, bitte registrieren Sie sich für die Warteliste."
|
||||
COM_JEM_EVENT_FULL_NOTICE="Diese Veranstaltung ist voll ausgebucht und es gibt keine Warteliste"
|
||||
COM_JEM_BOOKED_PLACES="Belegte Plätze"
|
||||
COM_JEM_AVAILABLE_PLACES="verfügbare Plätze"
|
||||
COM_JEM_WAITINGLIST_UNREGISTER_BOX="Abmeldung von Warteliste"
|
||||
|
||||
COM_JEM_SEARCH_FILTER = "Filter"
|
||||
COM_JEM_SEARCH_RESET = "Löschen"
|
||||
COM_JEM_SEARCH_GO = "Los"
|
||||
COM_JEM_SEARCH_FROM = "Von"
|
||||
COM_JEM_SEARCH_TO ="Bis"
|
||||
COM_JEM_SEARCH_SUBMITSEARCH = "Suche übertragen"
|
||||
COM_JEM_SEARCH_DISPLAYNUM = "Zeige Anzahl"
|
||||
COM_JEM_SEARCH_NOEVENTS = "keine Veranstaltungen"
|
||||
COM_JEM_SEARCH_OPENDATE = "noch offenes Datum"
|
||||
COM_JEM_SEARCH_DATE = "Datum"
|
||||
COM_JEM_SEARCH_SUBMIT="Suche"
|
||||
COM_JEM_WAITINGLIST_UNREGISTER_BOX_ONWAITINGLIST="Auf der Warteliste"
|
||||
|
||||
;Custom Fields
|
||||
COM_JEM_EVENT_CUSTOM_FIELD1="Veranstaltungsfeld 1"
|
||||
COM_JEM_EVENT_CUSTOM_FIELD2="Veranstaltungsfeld 2"
|
||||
COM_JEM_EVENT_CUSTOM_FIELD3="Veranstaltungsfeld 3"
|
||||
COM_JEM_EVENT_CUSTOM_FIELD4="Veranstaltungsfeld 4"
|
||||
COM_JEM_EVENT_CUSTOM_FIELD5="Veranstaltungsfeld 5"
|
||||
COM_JEM_EVENT_CUSTOM_FIELD6="Veranstaltungsfeld 6"
|
||||
COM_JEM_EVENT_CUSTOM_FIELD7="Veranstaltungsfeld 7"
|
||||
COM_JEM_EVENT_CUSTOM_FIELD8="Veranstaltungsfeld 8"
|
||||
COM_JEM_EVENT_CUSTOM_FIELD9="Veranstaltungsfeld 9"
|
||||
COM_JEM_EVENT_CUSTOM_FIELD10="Veranstaltungsfeld 10"
|
||||
COM_JEM_EVENT_CUSTOM_FIELD1_DESC="Veranstaltungsfeld 1 ist mit Sprachoverrides im Backend umzubenennen. Siehe dazu Hilfe.\\nLeere Felder werden im Frontend nicht angezeigt"
|
||||
COM_JEM_EVENT_CUSTOM_FIELD2_DESC="Veranstaltungsfeld 2 ist mit Sprachoverrides im Backend umzubenennen. Siehe dazu Hilfe.\\nLeere Felder werden im Frontend nicht angezeigt"
|
||||
COM_JEM_EVENT_CUSTOM_FIELD3_DESC="Veranstaltungsfeld 3 ist mit Sprachoverrides im Backend umzubenennen. Siehe dazu Hilfe.\\nLeere Felder werden im Frontend nicht angezeigt"
|
||||
COM_JEM_EVENT_CUSTOM_FIELD4_DESC="Veranstaltungsfeld 4 ist mit Sprachoverrides im Backend umzubenennen. Siehe dazu Hilfe.\\nLeere Felder werden im Frontend nicht angezeigt"
|
||||
COM_JEM_EVENT_CUSTOM_FIELD5_DESC="Veranstaltungsfeld 5 ist mit Sprachoverrides im Backend umzubenennen. Siehe dazu Hilfe.\\nLeere Felder werden im Frontend nicht angezeigt"
|
||||
COM_JEM_EVENT_CUSTOM_FIELD6_DESC="Veranstaltungsfeld 6 ist mit Sprachoverrides im Backend umzubenennen. Siehe dazu Hilfe.\\nLeere Felder werden im Frontend nicht angezeigt"
|
||||
COM_JEM_EVENT_CUSTOM_FIELD7_DESC="Veranstaltungsfeld 7 ist mit Sprachoverrides im Backend umzubenennen. Siehe dazu Hilfe.\\nLeere Felder werden im Frontend nicht angezeigt"
|
||||
COM_JEM_EVENT_CUSTOM_FIELD8_DESC="Veranstaltungsfeld 8 ist mit Sprachoverrides im Backend umzubenennen. Siehe dazu Hilfe.\\nLeere Felder werden im Frontend nicht angezeigt"
|
||||
COM_JEM_EVENT_CUSTOM_FIELD9_DESC="Veranstaltungsfeld 9 ist mit Sprachoverrides im Backend umzubenennen. Siehe dazu Hilfe.\\nLeere Felder werden im Frontend nicht angezeigt"
|
||||
COM_JEM_EVENT_CUSTOM_FIELD10_DESC="Veranstaltungsfeld 10 ist mit Sprachoverrides im Backend umzubenennen. Siehe dazu Hilfe.\\nLeere Felder werden im Frontend nicht angezeigt"
|
||||
|
||||
COM_JEM_VENUE_CUSTOM_FIELD1="Orts-Feld 1"
|
||||
COM_JEM_VENUE_CUSTOM_FIELD2="Orts-Feld 2"
|
||||
COM_JEM_VENUE_CUSTOM_FIELD3="Orts-Feld 3"
|
||||
COM_JEM_VENUE_CUSTOM_FIELD4="Orts-Feld 4"
|
||||
COM_JEM_VENUE_CUSTOM_FIELD5="Orts-Feld 5"
|
||||
COM_JEM_VENUE_CUSTOM_FIELD6="Orts-Feld 6"
|
||||
COM_JEM_VENUE_CUSTOM_FIELD7="Orts-Feld 7"
|
||||
COM_JEM_VENUE_CUSTOM_FIELD8="Orts-Feld 8"
|
||||
COM_JEM_VENUE_CUSTOM_FIELD9="Orts-Feld 9"
|
||||
COM_JEM_VENUE_CUSTOM_FIELD10="Orts-Feld 10"
|
||||
COM_JEM_VENUE_CUSTOM_FIELD1_DESC="Orts-Feld 1 ist mit Sprachoverrides im Backend umzubenennen. Siehe dazu Hilfe.\\nLeere Felder werden im Frontend nicht angezeigt"
|
||||
COM_JEM_VENUE_CUSTOM_FIELD2_DESC="Orts-Feld 2 ist mit Sprachoverrides im Backend umzubenennen. Siehe dazu Hilfe.\\nLeere Felder werden im Frontend nicht angezeigt"
|
||||
COM_JEM_VENUE_CUSTOM_FIELD3_DESC="Orts-Feld 3 ist mit Sprachoverrides im Backend umzubenennen. Siehe dazu Hilfe.\\nLeere Felder werden im Frontend nicht angezeigt"
|
||||
COM_JEM_VENUE_CUSTOM_FIELD4_DESC="Orts-Feld 4 ist mit Sprachoverrides im Backend umzubenennen. Siehe dazu Hilfe.\\nLeere Felder werden im Frontend nicht angezeigt"
|
||||
COM_JEM_VENUE_CUSTOM_FIELD5_DESC="Orts-Feld 5 ist mit Sprachoverrides im Backend umzubenennen. Siehe dazu Hilfe.\\nLeere Felder werden im Frontend nicht angezeigt"
|
||||
COM_JEM_VENUE_CUSTOM_FIELD6_DESC="Orts-Feld 6 ist mit Sprachoverrides im Backend umzubenennen. Siehe dazu Hilfe.\\nLeere Felder werden im Frontend nicht angezeigt"
|
||||
COM_JEM_VENUE_CUSTOM_FIELD7_DESC="Orts-Feld 7 ist mit Sprachoverrides im Backend umzubenennen. Siehe dazu Hilfe.\\nLeere Felder werden im Frontend nicht angezeigt"
|
||||
COM_JEM_VENUE_CUSTOM_FIELD8_DESC="Orts-Feld 8 ist mit Sprachoverrides im Backend umzubenennen. Siehe dazu Hilfe.\\nLeere Felder werden im Frontend nicht angezeigt"
|
||||
COM_JEM_VENUE_CUSTOM_FIELD9_DESC="Orts-Feld 9 ist mit Sprachoverrides im Backend umzubenennen. Siehe dazu Hilfe.\\nLeere Felder werden im Frontend nicht angezeigt"
|
||||
COM_JEM_VENUE_CUSTOM_FIELD10_DESC="Orts-Feld 10 ist mit Sprachoverrides im Backend umzubenennen. Siehe dazu Hilfe.\\nLeere Felder werden im Frontend nicht angezeigt"
|
||||
|
||||
|
||||
COM_JEM_EVENT_FILES="Dateien"
|
||||
COM_JEM_FILES="Dateien"
|
||||
|
||||
COM_JEM_EVENT_ATTACHMENTS_TAB="Anhänge"
|
||||
|
||||
COM_JEM_ATTACHMENT_FILE="Datei"
|
||||
COM_JEM_ATTACHMENT_NAME="Name"
|
||||
COM_JEM_ATTACHMENT_DESCRIPTION="Beschreibung"
|
||||
COM_JEM_ATTACHMENT_ACCESS="Zugang"
|
||||
COM_JEM_ATTACHMENT_REMOVE="Entfernen"
|
||||
|
||||
COM_JEM_PLEASE_LOGIN="Melden Sie sich bitte an, um Veranstaltungen hinzuzufügen!"
|
||||
COM_JEM_LINK="Verlinkung"
|
||||
COM_JEM_NUM="#"
|
||||
COM_JEM_CALENDAR_ANDMORE="mehr..."
|
||||
COM_JEM_ERROR_ATTACHEMENT_EXTENSION_NOT_ALLOWED="Ist als Anhang nicht erlaubt"
|
||||
COM_JEM_PRINT="Drucken"
|
||||
|
||||
|
||||
COM_JEM_ERROR_ATTACHEMENT_FILE_TOO_BIG="FEHLER: Der Anhang ist zu groß!"
|
||||
COM_JEM_ERROR_ATTACHMENT_SAVING_TO_DB="Fehler beim Speichern der Information zum Anhang."
|
||||
COM_JEM_ERROR_ATTACHMENT_UPDATING_RECORD="Fehler beim Aktualisieren der Information zum Anhang."
|
||||
COM_JEM_ERROR_COULD_NOT_CREATE_FOLDER="Konnte Verzeichnis nicht erstellen."
|
||||
COM_JEM_DOWNLOAD="Download"
|
||||
|
||||
COM_JEM_ICAL="iCal"
|
||||
COM_JEM_ICAL_DESC="Klicken, um Daten in andere Kalender zu übernehmen"
|
||||
COM_JEM_CATEGORIES="Kategorien"
|
||||
COM_JEM_LOCATION="Standort"
|
||||
COM_JEM_SUBCATEGORIES="Unterkategorien"
|
||||
|
||||
COM_JEM_SHOWALL="Zeige Alles"
|
||||
COM_JEM_HIDEALL="Verstecke Alles"
|
||||
|
||||
;
|
||||
COM_JEM_EXPORT_ICS="Exportiere ICS"
|
||||
COM_JEM_ICS_LINK="ICS-Link"
|
||||
COM_JEM_LATITUDE="Breitengrad"
|
||||
COM_JEM_LATITUDE_HINT="Breitengrad Hinweis"
|
||||
COM_JEM_LONGITUDE="Längengrad"
|
||||
COM_JEM_LONGITUDE_HINT="Längengrad Hinweis"
|
||||
COM_JEM_NO_IMAGE="Kein Bild"
|
||||
COM_JEM_WRONG_URL_FORMAT="FEHLER: Falsches URL Format"
|
||||
COM_JEM_MAX_PLACES_DESC="Wieviele Benutzer können maximal teilnehmen"
|
||||
|
||||
COM_JEM_OPEN_DATE="Noch offen"
|
||||
COM_JEM_CONTACT="Kontakt Information"
|
||||
COM_JEM_TELEPHONE="Telefon"
|
||||
|
||||
COM_JEM_TABLE_EVENTIMAGE="Bild"
|
||||
COM_JEM_TABLE_DATE="Datum"
|
||||
COM_JEM_TABLE_TITLE="Titel"
|
||||
COM_JEM_TABLE_LOCATION="Ort"
|
||||
COM_JEM_TABLE_CITY="Stadt"
|
||||
COM_JEM_TABLE_STATE="Bundesland"
|
||||
COM_JEM_TABLE_COUNTRY="Land"
|
||||
COM_JEM_TABLE_CATEGORY="Kategorie"
|
||||
COM_JEM_TABLE_ATTENDEES="Teilnehmer"
|
||||
|
||||
COM_JEM_FORMAT_SHORT_DATE="j.m.y"
|
||||
COM_JEM_CUSTOM_FIELDS="Benutzerdefinierte Felder"
|
||||
COM_JEM_ADD_ZIP="PLZ hinzufügen"
|
||||
|
||||
COM_JEM_META_HANDLING="Metadaten"
|
||||
|
||||
COM_JEM_META_KEYWORDS_DESC="In diese Eingabebox können mit Drücken der CTRL-Taste mehrere Keywords eingegeben werden"
|
||||
|
||||
COM_JEM_META_DESCRIPTION_DESC="Mit dem Editor können eigene Meta-Beschreibungen erstellt werden. Den Vorschlag-Schalter für ein Beispiel benutzen"
|
||||
COM_JEM_META_DESCRIPTION_STANDARD="Die Veranstaltung mit dem Titel [title] findet am [dates] statt!"
|
||||
COM_JEM_META_DESCRIPTION_BUTTON="Meta Beschreibung Vorschlag"
|
||||
COM_JEM_META_ERROR="Bitte vor dem Einfügen der Keywords das Eingabefeld wählen"
|
||||
COM_JEM_META_DESCRIPTION_WARN="Bitte keine Hochkommas oder Anführungszeichen in der Beschreibung benutzen, da dies HTML-Fehler verursacht."
|
||||
|
||||
COM_JEM_EVENT_INFO_TAB="Info"
|
||||
COM_JEM_EVENT_MAIN_TAB="Haupteingaben"
|
||||
COM_JEM_EVENT_SECOND_TAB="Weitere Eingaben"
|
||||
|
||||
|
||||
COM_JEM_EVENT_UNPUBLISHED=" Veranstaltung gesperrt"
|
||||
COM_JEM_EVENT_PUBLISHED=" Veranstaltung freigegeben"
|
||||
COM_JEM_EVENT_TRASHED=" Veranstaltung neu in Papierkorb"
|
||||
COM_JEM_VENUE_UNPUBLISHED="Veranstaltungsort(e) erfolgreich gesperrt"
|
||||
COM_JEM_VENUE_PUBLISHED="Veranstaltungsort(e) erfolgreich freigegeben"
|
||||
COM_JEM_VENUE_TRASHED="Veranstaltungsorte im Papierkorb"
|
||||
;TODO: No COM_JEM_ prefix here? - remove or rename
|
||||
;JGLOBAL_CHECK_ALL="Alles überprüfen"
|
||||
COM_JEM_ORDER_ASCENDING="Aufsteigend"
|
||||
COM_JEM_ORDER_DESCENDING="Absteigend"
|
||||
JGRID_CHECKBOX_ROW_N="Checkbox für Reihe %d"
|
||||
|
||||
;Registered Users
|
||||
COM_JEM_REGISTRATION_DISABLED="Event-Rückmeldung"
|
||||
COM_JEM_REGISTRATION_DISABLED_GLOBAL_HINT="Registrierung ist global deaktiviert. Benutzer können sich nicht an- oder abmelden. Um das zu ändern, Meldung an Webseiten-Administrator"
|
||||
COM_JEM_REGISTRATION_DISABLED_EVENT_HINT="Eventrückmeldung ist für diesen Event deaktiviert. Benutzer können sich nicht an- oder abmelden.\nEs ist möglich, dies im Rückmeldungsblock auf dem Erweitert-Tab der Eventeingabe zu ändern."
|
||||
COM_JEM_REGISTERED_USER="Angemeldete Teilnehmer"
|
||||
COM_JEM_NAME="Name"
|
||||
COM_JEM_USERNAME="Benutzername"
|
||||
COM_JEM_EMAIL="E-Mail"
|
||||
COM_JEM_IP_ADDRESS="IP-Adresse"
|
||||
COM_JEM_REGDATE="Anmeldedatum"
|
||||
COM_JEM_USER_ID="Benutzer-ID"
|
||||
COM_JEM_COMMENT="Kommentar"
|
||||
COM_JEM_OPTIONAL_COMMENT="Optionaler Kommentar zur Anmeldung"
|
||||
COM_JEM_REMOVE_USER="Anmeldung entfernen"
|
||||
COM_JEM_REGISTERED_USERS_ADDED="Benutz(er) hinzugefügt"
|
||||
COM_JEM_REGISTERED_USERS_DELETED=" angemeldete(r) Teilnehmer gelöscht"
|
||||
COM_JEM_REGISTERED_USERS_CHANGED="Benutz(er) bearbeitet"
|
||||
COM_JEM_SELECT_ITEM_TO_ADD="Bitte etwas zum hinzufügen auswählen"
|
||||
COM_JEM_SELECT_ITEM_TO_DELETE="Zum Löschen etwas auswählen."
|
||||
COM_JEM_CSV_EXPORT="CSV-Export der Anmeldungen"
|
||||
COM_JEM_ADD_USER_REGISTRATIONS="Hinzufügen"
|
||||
COM_JEM_ADD_USER_REGISTRATIONS_DESC="Hinzufügen oder Bearbeiten von Benutzern, die sich selber nicht anmelden können."
|
||||
|
||||
COM_JEM_ATT_FILTER_ALL="Alle"
|
||||
COM_JEM_ATT_FILTER_INVITED="Eingeladen"
|
||||
COM_JEM_ATT_FILTER_NOT_ATTENDING="Nicht teilnehmend"
|
||||
COM_JEM_ATT_FILTER_ATTENDING="Angemeldet"
|
||||
COM_JEM_ATT_FILTER_WAITING="Auf Warteliste"
|
||||
COM_JEM_EDIT_ATTENDEE="Teilnehmer editieren"
|
||||
COM_JEM_STATUS="Status"
|
||||
COM_JEM_STATUS_DESC="Teilnahmestatus des Benutzers wählen."
|
||||
COM_JEM_HEADER_WAITINGLIST_STATUS="Status"
|
||||
COM_JEM_STATUS_UNKNOWN="Teilnahmestatus ist unbekannt"
|
||||
COM_JEM_INVITED="Benutzer ist eingeladen"
|
||||
COM_JEM_ATTENDING="Benutzer nimmt teil."
|
||||
COM_JEM_ATTENDING_MOVE_TO_WAITINGLIST="Benutzer ist auf Teilnehmerliste<br>Klicken zum Verschieben auf Warteliste."
|
||||
COM_JEM_NOT_ATTENDING="Benutzer ist abgemeldet"
|
||||
COM_JEM_ON_WAITINGLIST="Benutzer ist auf der Warteliste."
|
||||
COM_JEM_ON_WAITINGLIST_MOVE_TO_ATTENDING="Benutzer ist auf Warteliste<br>Klicken zum Verschieben auf Teilnehmerliste."
|
||||
COM_JEM_ADDED_TO_ATTENDING="Benutzer wurde zur Teilnehmerliste hinzugefügt."
|
||||
COM_JEM_ADDED_TO_WAITING="Benutzer ist nun auf der Warteliste."
|
||||
COM_JEM_WAITINGLIST_TOGGLE_ERROR="Fehler beim Wechsel des Teilnahmestatus"
|
||||
COM_JEM_NO_WAITINGLIST="Es gibt keine Warteliste."
|
||||
|
||||
COM_JEM_DISPLAY_ATTENDEECOLUMN="Teilnehmer"
|
||||
COM_JEM_DISPLAY_ATTENDEECOLUMN_DESC="Soll die Teilnehmerspalte angezeigt werden?"
|
||||
|
||||
|
||||
; Calendar View
|
||||
COM_JEM_AND_MORE="Und weiter"
|
||||
|
||||
; My-Events View
|
||||
COM_JEM_MYEVENT_MANAGEATTENDEES="Anmeldungsmanager"
|
||||
COM_JEM_MYEVENT_ATTENDEES_HINT="Lesen wie folgt: "_QQ_"(Angemeldet)/(max. Plätze) + (auf Warteliste) - (abgemeldet), (eingeladen) ?"_QQ_" Dabei werden leere Teile ausgelassen. Anklicken, um Rückmeldungen zu managen."
|
||||
|
||||
; General, used in my-events/attendees
|
||||
COM_JEM_PUBLISH="Freigeben"
|
||||
COM_JEM_PUBLISH_DESC="Klicken um Veranstaltung freizugeben"
|
||||
COM_JEM_TRASH="in Papierkorb"
|
||||
COM_JEM_TRASH_DESC="Klicken um Veranstaltung in den Papierkorb zu tun"
|
||||
COM_JEM_UNPUBLISH="Sperren"
|
||||
COM_JEM_UNPUBLISH_DESC="Klicken um Veranstaltung zu sperren"
|
||||
COM_JEM_BACK="Zurück"
|
||||
COM_JEM_EXPORT="Exportieren"
|
||||
COM_JEM_EXPORT_DESC="Teilnehmerliste exportieren"
|
||||
|
||||
; Attendees View
|
||||
COM_JEM_ATTENDEES_EMPTY_YET="Aktuell keine Rückmeldungen zu diesem Event."
|
||||
COM_JEM_ATTENDEES_ATTENDING="Angemeldet"
|
||||
COM_JEM_ATTENDEES_ON_WAITINGLIST="Auf der Warteliste"
|
||||
COM_JEM_ATTENDEES_NOT_ATTENDING="Nicht teilnehmend"
|
||||
COM_JEM_ATTENDEES_INVITED="Eingeladen"
|
||||
COM_JEM_ATTENDEES_STATUS_UNKNOWN="Teilnahmestatus unbekannt"
|
||||
COM_JEM_ATTENDEES_DELETE="Angemeldeten Benutzer löschen"
|
||||
|
||||
; Venue View
|
||||
COM_JEM_DELIVER_NEW_VENUE_DESC="Klicken, um neuen Veranstaltungsort einzugeben"
|
||||
|
||||
; Controller
|
||||
COM_JEM_SELECT_ITEM_TO_PUBLISH="Etwas auswählen, um freizugeben"
|
||||
COM_JEM_SELECT_ITEM_TO_UNPUBLISH="Etwas auswählen, um zu sperren"
|
||||
COM_JEM_SELECT_ITEM_TO_TRASH="Etwas auswählen, um in den Papierkorb zu tun"
|
||||
|
||||
|
||||
; Week Calendar
|
||||
COM_JEM_WKCAL_WEEK="Woche"
|
||||
|
||||
; Editevent
|
||||
COM_JEM_NOVENUE="keiner"
|
||||
COM_JEM_EDITEVENT_FIELD_DESCRIPTION="Beschreibung"
|
||||
COM_JEM_EDITEVENT_FIELD_DESCRIPTION_DESC="Beschreibung"
|
||||
COM_JEM_EDITEVENT_NOTICE_GENSHIELD="Anmerkung: Erstellungs-Schild ist gesetzt bis <b> %s </b>"
|
||||
COM_JEM_EDITEVENT_WARN_RECURRENCE_TITLE="ACHTUNG!"
|
||||
COM_JEM_EDITEVENT_WARN_RECURRENCE_TEXT="Diese Veranstaltung ist Teil einer Wiederholungsserie. Beim Klick auf Speichern wird sie von der Serie getrennt, auch wenn nichts verändert wurde.<br>Bei der Wahl einer Wiederholung dieser Veranstaltung, wird eine neue Wiederholungsserie erstellt."
|
||||
COM_JEM_EDITEVENT_WARN_RECURRENCE_FIRST_TEXT="Diese Veranstaltung ist die erste einer Serie. Beim Klick auf Speichern wird die ganze Serie getrennt, auch wenn nichts verändert wurde.<br>Wenn Wiederholungen gewählt werden, wird eine neue Serie erstellt."
|
||||
COM_JEM_NOVENUES="Kein Veranstaltungsort gefunden"
|
||||
COM_JEM_NOCONTACTS="Keine Kontaktpersonen gefunden"
|
||||
COM_JEM_NOUSERS="Kein Benutzer gefunden."
|
||||
|
||||
; Search
|
||||
COM_JEM_AFRICA="Afrika"
|
||||
COM_JEM_ASIA="Asien"
|
||||
COM_JEM_OCEANIA="Ozeanien"
|
||||
COM_JEM_NORTH_AMERICA="Nord-Amerika"
|
||||
COM_JEM_SOUTH_AMERICA="Süd-Amerika"
|
||||
COM_JEM_ANTARCTICA="Antarktis"
|
||||
COM_JEM_EUROPE="Europa"
|
||||
|
||||
COM_JEM_DEFAULT_PAGE_TITLE_DAY="Tagesansicht"
|
||||
|
||||
|
||||
; EVENT-View
|
||||
COM_JEM_EVENT_HITS_LABEL="Aufrufe"
|
||||
COM_JEM_EVENT_HITS="%s"
|
||||
COM_JEM_EVENT_CREATED_BY_LABEL="Autor"
|
||||
COM_JEM_EVENT_CREATED_BY="%s"
|
||||
COM_JEM_EVENT_READ_MORE="Weiterlesen:"
|
||||
COM_JEM_EVENT_READ_MORE_TITLE="Weiterlesen..."
|
||||
COM_JEM_EVENT_REGISTER_TO_READ_MORE="Für mehr Details bitte einloggen."
|
||||
COM_JEM_EVENT_CONTACT="%s"
|
||||
|
||||
; EDITEVENT-View
|
||||
COM_JEM_EDITEVENT_FIELD_CATEGORIES="Kategorien"
|
||||
COM_JEM_EDITEVENT_FIELD_CATEGORIES_DESC="Kategorien auswählen"
|
||||
COM_JEM_EDITEVENT_FIELD_EVENT_TITLE="Titel"
|
||||
COM_JEM_EDITEVENT_FIELD_EVENT_TITLE_DESC="Dieser Veranstaltungstitel wird angezeigt"
|
||||
COM_JEM_EDITEVENT_FIELD_CONTACT="Kontaktperson"
|
||||
COM_JEM_EDITEVENT_FIELD_CONTACT_DESC="Kontakt wählen"
|
||||
COM_JEM_EDITEVENT_FIELD_DATE="Startdatum"
|
||||
COM_JEM_EDITEVENT_FIELD_DATE_DESC="Startdatum wählen"
|
||||
COM_JEM_EDITEVENT_FIELD_ENDDATE="Enddatum"
|
||||
COM_JEM_EDITEVENT_FIELD_ENDDATE_DESC="Enddatum wählen"
|
||||
COM_JEM_EDITEVENT_FIELD_END_TIME="Schlusszeit"
|
||||
COM_JEM_EDITEVENT_FIELD_END_TIME_DESC="Schlusszeit lösen"
|
||||
COM_JEM_EDITEVENT_FIELD_EVENTTEXT_DESC="Eine Beschreibung der Veranstaltung"
|
||||
COM_JEM_EDITEVENT_FIELD_EVENTTEXT_LABEL="Beschreibung"
|
||||
COM_JEM_EDITEVENT_FIELD_EVENT_TIME="Startzeit"
|
||||
COM_JEM_EDITEVENT_FIELD_EVENT_TIME_DESC="Startzeit wählen"
|
||||
COM_JEM_EDITEVENT_FIELD_FEATURED_DESC="Diese Veranstaltung als Hauptveranstaltung hervorheben"
|
||||
COM_JEM_EDITEVENT_FIELD_PUBLISHED_DESC="Status der Veranstaltung wählen"
|
||||
COM_JEM_EDITEVENT_FIELD_VENUE="Ort"
|
||||
COM_JEM_EDITEVENT_FIELD_VENUE_DESC="Veranstaltungsort auswählen"
|
||||
COM_JEM_EDITEVENT_FIELD_ALIAS="Alias"
|
||||
COM_JEM_EDITEVENT_FIELD_ALIAS_DESC="Alias"
|
||||
COM_JEM_EDITEVENT_EDIT_EVENT = "%s wird bearbeitet"
|
||||
COM_JEM_EDITEVENT_ADD_EVENT = "Veranstaltung hinzufügen"
|
||||
COM_JEM_EDITEVENT_INFO_TAB="Veranstaltung"
|
||||
COM_JEM_EDITEVENT_DETAILS_LEGEND="Grundlegendes (Was Wann Wo)"
|
||||
COM_JEM_EDITEVENT_FIELD_ENABLE_REGISTRATION="Anmeldung"
|
||||
COM_JEM_EDITEVENT_FIELD_ENABLE_REGISTRATION_DESC="aktiviert, kann der Benutzer sich für die Veranstaltung anmelden"
|
||||
COM_JEM_EDITEVENT_FIELD_ENABLE_ANNULATION="Annullierung von Anmeldung ermöglichen"
|
||||
COM_JEM_EDITEVENT_FIELD_ENABLE_ANNULATION_DESC="Aktiviert kann ein angemeldeter Benutzer seine Anmeldung für den Event annullieren. Möglich ist Ja, Nein oder Bis N Stunden vor Beginn des Events."
|
||||
COM_JEM_EDITEVENT_FIELD_ANNULATION_UNTIL="Bis"
|
||||
COM_JEM_EDITEVENT_FIELD_ANNULATION_UNTIL_DESC="Anzahl Stunden vor Beginn des Events, solange eine Annullierung einer Anmeldung möglich ist."
|
||||
COM_JEM_EDITEVENT_FIELD_ANNULATION_UNTIL_POSTFIX="Stunden vor Beginn des Events"
|
||||
COM_JEM_UNTIL="Bis"
|
||||
COM_JEM_INVITED_USERS_ONLY="Nur eingeladene Benutzer"
|
||||
COM_JEM_EDITEVENT_FIELD_REG_INVITED_ONLY="Nur für Eingeladene Benutzer"
|
||||
COM_JEM_EDITEVENT_FIELD_REG_INVITED_ONLY_DESC="An-/Abmeldung nur auf eingeladene Benutzer beschränken."
|
||||
COM_JEM_EDITEVENT_FIELD_ENABLE_UNREGISTRATION="Abmeldung aktivieren"
|
||||
COM_JEM_EDITEVENT_FIELD_ENABLE_UNREGISTRATION_DESC="ABGELAUFEN - Ermöglicht angemeldeten Benutzern die Anmeldung zu annullieren"
|
||||
COM_JEM_EDITEVENT_FIELD_MAX_PLACES="Max. Plätze"
|
||||
COM_JEM_EDITEVENT_FIELD_MAX_PLACES_DESC="Hier kann die Maximalzahl der Teilnehmer eingegeben werden, der Rest kommt auf eine Warteliste, wenn dies aktiviert ist."
|
||||
COM_JEM_EDITEVENT_FIELD_INVITED_USERS="Eingeladene Benutzer"
|
||||
COM_JEM_EDITEVENT_FIELD_INVITED_USERS_DESC="Anzahl eingeladener Benutzer -zur Info. Klicken auf Auswählen, um Benutzer einzuladen."
|
||||
COM_JEM_EDITEVENT_FIELD_BOOKED_PLACES="Belegte Plätze"
|
||||
COM_JEM_EDITEVENT_FIELD_BOOKED_PLACES_DESC="Anzahl bereits belegter Plätze - zur Info."
|
||||
COM_JEM_EDITEVENT_FIELD_AVAILABLE_PLACES="Freie Plätze"
|
||||
COM_JEM_EDITEVENT_FIELD_AVAILABLE_PLACES_DESC="Anzahl noch freier Plätze - zur Info"
|
||||
COM_JEM_EDITEVENT_FIELD_ENABLE_WAITINGLIST="Warteliste aktivieren"
|
||||
COM_JEM_EDITEVENT_FIELD_ENABLE_WAITINGLIST_DESC="Wenn aktiviert kommen überzählige Teilnehmer auf eine Warteliste und automatisch auf die Teilnehmerliste verschoben, wenn ein Platz frei wird."
|
||||
COM_JEM_EDITEVENT_FIELD_RECURRENCE="Wiederholung"
|
||||
COM_JEM_EDITEVENT_FIELD_RECURRENCE_DESC="Wiederholung"
|
||||
COM_JEM_EDITEVENT_FIELD_RECURRENCE_COUNTER="Wiederholungszähler"
|
||||
COM_JEM_EDITEVENT_FIELD_RECURRENCE_COUNTER_DESC=""
|
||||
|
||||
; EDITVENUE-View
|
||||
COM_JEM_EDITVENUE_INFO_TAB="Allgemein"
|
||||
COM_JEM_EDITVENUE_ATTACHMENTS_TAB="Anhänge"
|
||||
COM_JEM_EDITVENUE_OTHER_TAB="Mehr"
|
||||
COM_JEM_EDITVENUE_CUSTOMFIELDS="Benutzerdefinierte Felder"
|
||||
COM_JEM_GEODATA="Geodata"
|
||||
COM_JEM_EDITVENUE_VENUE_EDIT="Ort %s wird bearbeitet"
|
||||
COM_JEM_EDITVENUE_DETAILS_LEGEND="Adresse"
|
||||
COM_JEM_EDITVENUE_VENUE_ADD="Veranstaltungsort hinzufügen"
|
||||
COM_JEM_EDITVENUE_FIELD_ALIAS="Alias"
|
||||
COM_JEM_EDITVENUE_FIELD_ALIAS_DESC="Alias"
|
||||
COM_JEM_VENUE_ADDRPLACEHOLDER="Hier Adresse eingeben"
|
||||
COM_JEM_VENUE_ADDR_FINDVENUEDATA="Suchen mit - in JEM eingegebenen - Daten"
|
||||
COM_JEM_VENUE_COPY_DATA="Übernehme alles nach JEM"
|
||||
COM_JEM_VENUE_COPY_ADDRESS="Übernehme nur Adresse"
|
||||
COM_JEM_VENUE_COPY_VENUE="Übernehme nur Bezeichnung des Veranstaltungsorts"
|
||||
COM_JEM_VENUE_COPY_COORDINATES="nur Koordinaten übernehmen (nach Pfeilkorrektur)"
|
||||
COM_JEM_EDITEVENT_EXTENDED_TAB="Erweitert"
|
||||
COM_JEM_EDITEVENT_PUBLISH_TAB="Veröffentlichen"
|
||||
COM_JEM_EDITVENUE_EXTENDED_TAB="Erweitert"
|
||||
COM_JEM_EDITVENUE_PUBLISH_TAB="Veröffentlichen"
|
||||
COM_JEM_EDITVENUE_IMAGE_LEGEND="Bild"
|
||||
COM_JEM_EDITVENUE_URL_LEGEND="URL"
|
||||
COM_JEM_EDITVENUE_PUBLISHING_LEGEND="Veröffentlichen"
|
||||
COM_JEM_EDITVENUE_DESCRIPTION_LEGEND="Beschreibung"
|
||||
|
||||
|
||||
; ERRORS
|
||||
COM_JEM_EVENT_ERROR_END_BEFORE_START="Veranstaltungsbeginn muss vor dem Ende sein"
|
||||
COM_JEM_EVENT_ERROR_NAME="Titel einsetzen"
|
||||
COM_JEM_EVENT_ERROR_EVENT_NOT_FOUND="Veranstaltung nicht gefunden!"
|
||||
COM_JEM_EVENT_ERROR_STORE_CATEGORIES="Fehler beim Speichern von Kategorien"
|
||||
COM_JEM_EVENT_ERROR_STORE_INVITED_USERS="Fehler beim Speichern eingeladener Benutzer."
|
||||
COM_JEM_VENUE_ERROR_CITY="Stadt ist zu lang"
|
||||
COM_JEM_VENUE_ERROR_COUNTRY="Bundesland ist zu lang"
|
||||
COM_JEM_VENUE_ERROR_MAP_ADDRESS="Sind Felder: Strasse, Stadt, Bundesland, PLZ ausgefüllt"
|
||||
COM_JEM_VENUE_ERROR_NAME="Bezeichnung des Veranstaltungsorts fehlt"
|
||||
COM_JEM_VENUE_ERROR_POSTALCODE="PLZ ist zu lang"
|
||||
COM_JEM_VENUE_ERROR_STREET="Strasse ist zu lang"
|
||||
COM_JEM_VENUE_ERROR_STATE="Staat ist zu lang"
|
||||
COM_JEM_VENUE_ERROR_URL_FORMAT="Das URL-Format ist falsch"
|
||||
COM_JEM_VENUE_ERROR_URL_LENGTH="URL ist zu lang"
|
||||
COM_JEM_VENUE_ERROR_VENUE_NOT_FOUND="Kein Veranstaltungsort gefunden"
|
||||
|
||||
COM_JEM_WRITTEN_BY="Verfasst von %s"
|
||||
COM_JEM_SELECT_CONTACT="Kontakt wählen"
|
||||
COM_JEM_METADATA="Metadaten"
|
||||
COM_JEM_ATTACHMENTS_LEGEND="Anhänge"
|
||||
COM_JEM_EVENT_OTHER_TAB="Mehr"
|
||||
COM_JEM_EVENT_CUSTOMFIELDS_LEGEND="Benutzerdefinierte Felder"
|
||||
COM_JEM_EVENT_REGISTRATION_LEGEND="Anmeldung"
|
||||
COM_JEM_NOCONTACT="Keine Kontaktperson"
|
||||
COM_JEM_COUNTRY_DESC="Anzuzeigendes Land"
|
||||
COM_JEM_WEBSITE_DESC="Format wie: http://www.webseite.de"
|
||||
|
||||
COM_JEM_GLOBAL_CHECKED_OUT_BY="ausgecheckt durch %s"
|
||||
COM_JEM_FILE="Datei"
|
||||
COM_JEM_FILE_NAME="Dateiname"
|
||||
COM_JEM_FILE_DESCRIPTION="Beschreibung"
|
||||
COM_JEM_FILE_NOT_FOUND="Datei nicht gefunden."
|
||||
|
||||
COM_JEM_FIELD_METADESCRIPTION_DESC="Hier kann man eine Meta-Beschreibung einsetzen"
|
||||
COM_JEM_FIELD_METAKEYWORDS_DESC="Hier kann man Keywords einsetzen"
|
||||
COM_JEM_VENUE_DESCRIPTION_DESC="Hier kann man eine Beschreibung des Veranstaltungsortes einsetzen"
|
||||
|
||||
COM_JEM_CATEGORY_ERROR_404="Kategorie #%d nicht gefunden"
|
||||
|
||||
|
||||
|
||||
COM_JEM_VENUES_EVENTS_ARCHIVED="Archivierte Veranstaltungen"
|
||||
COM_JEM_VENUES_EVENTS_PUBLISHED="Veröffentlichte Veranstaltungen"
|
||||
|
||||
|
||||
; GLOBAL
|
||||
COM_JEM_GLOBAL_MAILERPLUGIN_DISABLED="Mailer-Plugin ist deaktiviert.<br>Es wurden keine E-Mails versandt!"
|
||||
COM_JEM_GLOBAL_REMOVE_ATTACHEMENT="Anhang entfernen"
|
||||
778
components/com_jem/language/en-GB/com_jem.ini
Normal file
778
components/com_jem/language/en-GB/com_jem.ini
Normal file
@ -0,0 +1,778 @@
|
||||
; @package JEM
|
||||
; @copyright (C) 2013-2024 joomlaeventmanager.net
|
||||
; @copyright (C) 2005-2009 Christoph Lukes
|
||||
; @license https://www.gnu.org/licenses/gpl-3.0 GNU/GPL
|
||||
;
|
||||
; All translations can be found at https://app.transifex.com/jemproject/
|
||||
; Please join the translation team if you want to contribute your changes to the translations
|
||||
;
|
||||
; Note: All ini files need to be saved as UTF-8, no BOM
|
||||
;
|
||||
; Frontend file
|
||||
COM_JEM_EDITEVENT_DESCRIPTION_LEGEND="Eventdescription"
|
||||
COM_JEM_SHOWSTATE="Show County/Region"
|
||||
COM_JEM_SHOWSTATE_DESC="Adds County/Region column"
|
||||
COM_JEM_GEODATA_LEGEND="Geodata"
|
||||
; COM_JEM_EDITEVENT_IMAGE_LEGEND="Event-Image"
|
||||
COM_JEM_DELIVER_NEW_EVENT="Submit new event"
|
||||
COM_JEM_DELIVER_NEW_VENUE="Submit new venue"
|
||||
COM_JEM_SHOW_ARCHIVE="Show Archive"
|
||||
COM_JEM_ADD_NAME="Please add your name here"
|
||||
; COM_JEM_ADD_EMAIL="Please add your Email address here"
|
||||
; COM_JEM_WRONG_EMAIL_FORMAT="ERROR: Email is in the wrong format!"
|
||||
; COM_JEM_ADD_DATE="Please add a date!"
|
||||
COM_JEM_DATE_WRONG="ERROR: Date has wrong format"
|
||||
COM_JEM_ADD_TITLE="Please add a title!"
|
||||
; COM_JEM_ADD_TIME="Please add a time!"
|
||||
; COM_JEM_TIME_WRONG="ERROR: Time is in the wrong format"
|
||||
; COM_JEM_ENDTIME_WRONG="ERROR: Endtime is in the wrong format"
|
||||
COM_JEM_SELECT_CATEGORY="Please select a category!"
|
||||
COM_JEM_SELECT_VENUE="Please select a venue!"
|
||||
COM_JEM_SELECT_USERS_AND_STATUS="Please choose status and users to register."
|
||||
COM_JEM_SELECT_USERS_TO_INVITE="Please select the users you want to invite."
|
||||
COM_JEM_TITLE="Title"
|
||||
COM_JEM_TITLE_SHORT="Title"
|
||||
COM_JEM_SAVE="Save"
|
||||
; COM_JEM_CANCEL="Cancel"
|
||||
; COM_JEM_USERINFO="User Information"
|
||||
; COM_JEM_YOUR_NAME="Your name"
|
||||
; COM_JEM_YOUR_EMAIL="Your Email"
|
||||
; COM_JEM_NORMAL_INFO="Details"
|
||||
COM_JEM_VENUE="Venue"
|
||||
COM_JEM_VENUE_SHORT="Venue"
|
||||
COM_JEM_CATEGORY="Category"
|
||||
COM_JEM_DATE="Date"
|
||||
COM_JEM_STARTDATE="Start Date"
|
||||
; COM_JEM_DATE_HINT="Format yyyy-mm-dd!"
|
||||
COM_JEM_DATEFIELD_HINT="Format: %s"
|
||||
COM_JEM_TIME="Time"
|
||||
COM_JEM_STARTTIME="Start Time"
|
||||
COM_JEM_TIME_SHORT="Time"
|
||||
; COM_JEM_TIME_HINT="Format: hh:mm!"
|
||||
; COM_JEM_ENDTIME_HINT="Format: hh:mm! (optional)"
|
||||
COM_JEM_ENDTIME="End Time"
|
||||
COM_JEM_SUBMIT_REGISTER="Allow registration"
|
||||
COM_JEM_SUBMIT_UNREGISTER="Allow deregistration"
|
||||
COM_JEM_SELECT_IMAGE="Select image to upload"
|
||||
; COM_JEM_SELECT_IMAGE_EDIT="Image. Leave blank to keep the current image"
|
||||
; COM_JEM_MAX_IMAGE_FILE_SIZE="Max. image file size"
|
||||
COM_JEM_UPLOAD_IMAGE="Select an image file to upload."
|
||||
COM_JEM_MAX_FILE_SIZE_1="File size is limited to %d kByte."
|
||||
COM_JEM_DESCRIPTION="Description"
|
||||
COM_JEM_EVENT_DESCRIPTION="Description"
|
||||
COM_JEM_VENUE_DESCRIPTION="Description"
|
||||
; COM_JEM_NO_HTML="HTML is not allowed!"
|
||||
COM_JEM_AVAILABLE="available"
|
||||
; COM_JEM_REFRESH="refresh"
|
||||
COM_JEM_DETAILS="Details"
|
||||
COM_JEM_NO_ACCESS="Access is not allowed"
|
||||
COM_JEM_CLOSE="Close"
|
||||
COM_JEM_EVENT="Event"
|
||||
; COM_JEM_WHAT="What"
|
||||
COM_JEM_WHEN="When"
|
||||
COM_JEM_WHERE="Where"
|
||||
COM_JEM_MAP="Map"
|
||||
COM_JEM_LINK_TO_GOOGLE_MAP="Show %s on Google Maps"
|
||||
COM_JEM_GOOGLE_NO_API_KEY="Google map cannot be displayed: Google api-key missing"
|
||||
COM_JEM_LINK_TO_OSM="Show %s on OpenStreetMap"
|
||||
COM_JEM_OSM_NO_MAP="OpenStreetMap cannot be displayed: the address data is incorrect or incomplete. Please try with a <a href='%s' target='_blank'>direct link</a>."
|
||||
COM_JEM_WEBSITE="Website"
|
||||
COM_JEM_STREET="Street"
|
||||
COM_JEM_STATE="County"
|
||||
COM_JEM_ZIP="Postcode"
|
||||
COM_JEM_CITY="City"
|
||||
COM_JEM_SELECT_CITY="Select a city"
|
||||
COM_JEM_COUNTRY="Country"
|
||||
COM_JEM_SELECT_COUNTRY="Select a country"
|
||||
COM_JEM_CONTINENT="Continent"
|
||||
COM_JEM_SELECT_CONTINENT="Select a continent"
|
||||
COM_JEM_NO_DESCRIPTION="Sorry, no description available"
|
||||
COM_JEM_REGISTERED_USERS="Registered Users"
|
||||
COM_JEM_YOUR_REGISTRATION="Your Registration"
|
||||
COM_JEM_SEND_UNREGISTRATION="Please communicate Absences too!"
|
||||
COM_JEM_YOU_ARE_UNDECIDED="You are not yet decided"
|
||||
COM_JEM_YOU_ARE_UNREGISTERED="You are not registered yet.<br>To register for this event, please choose one of the options below and send your decision."
|
||||
COM_JEM_YOU_ARE_INVITED="You are invited to attend this event.<br>Please choose one of the options below and send your decision."
|
||||
COM_JEM_YOU_ARE_ATTENDING="You are registered as attending and on the list of attendees.<br>You can change your decision below and select the number places."
|
||||
COM_JEM_YOU_ARE_ON_WAITINGLIST="You are registered as attending but on the waiting list.<br>You can change your decision below and select the number places."
|
||||
COM_JEM_YOU_ARE_NOT_ATTENDING="You are registered as not attending.<br>You can change your decision below and select the number of places."
|
||||
COM_JEM_I_WILL_GO="I will go to this event."
|
||||
COM_JEM_I_WILL_GO_2="I want to book "
|
||||
COM_JEM_I_WILL_GO_3="additional places."
|
||||
COM_JEM_I_WILL_GO_SERIES_1="This event is part of a series of recurring events."
|
||||
COM_JEM_I_WILL_GO_SERIES_2="I will attend all events in this series from now on."
|
||||
COM_JEM_I_WILL_GO_SERIES_3="You will be registered from all events in this series from now on."
|
||||
COM_JEM_I_WILL_GO_SERIES_4="The events in this series are as follows:"
|
||||
COM_JEM_I_WILL_NOT_GO="I will NOT go to this event."
|
||||
COM_JEM_I_WILL_NOT_GO_2="I want to cancel "
|
||||
COM_JEM_I_WILL_NOT_GO_3="booked places."
|
||||
COM_JEM_I_WILL_NOT_GO_SERIES_1="This event is part of a series of recurring events."
|
||||
COM_JEM_I_WILL_NOT_GO_SERIES_2="I will NOT attend any other events in the series for which I have booked places either."
|
||||
COM_JEM_I_WILL_NOT_GO_SERIES_3="You will be deregistered from all events in this series from now on."
|
||||
COM_JEM_I_WILL_NOT_GO_SERIES_4="The current registration status for events in this series is as follows:"
|
||||
COM_JEM_I_WILL_NOT_GO_SERIES_5="You are not registered for any further events in the series."
|
||||
COM_JEM_NOT_AVAILABLE_PLACES_EVENT="There are no more places available for this event from now on."
|
||||
COM_JEM_NOT_AVAILABLE_PLACES_USER="You can't book more places."
|
||||
COM_JEM_PLACES="Places"
|
||||
COM_JEM_PLACES_REG="places"
|
||||
COM_JEM_REGISTER="Register"
|
||||
COM_JEM_SEND_REGISTER="Send"
|
||||
COM_JEM_ALREADY_REGISTERED="You are already registered to attend this event."
|
||||
COM_JEM_UNREGISTER_BOX="Cancel your registration for this event"
|
||||
COM_JEM_UNREGISTER="Cancel Registration"
|
||||
COM_JEM_LOGIN_FOR_REGISTER="You have to login to register for this event."
|
||||
COM_JEM_LOGIN_TO_ACCESS="To see this information, first click to login"
|
||||
COM_JEM_NEED_LOGGED_IN="You need to be logged in."
|
||||
COM_JEM_TOO_LATE_REGISTER="It's too late to register for this event."
|
||||
COM_JEM_TOO_LATE_UNREGISTER="It's too late to cancel your registration from this event."
|
||||
COM_JEM_WRONG_STATE_FOR_REGISTER="The event must be published to allow registration."
|
||||
COM_JEM_NOT_ALLOWED_TO_REGISTER="You are not entitled to register for this event."
|
||||
; COM_JEM_NOT_ALLOWED_TO_CANCEL="Deregistration is not allowed."
|
||||
COM_JEM_NOT_ALLOWED_TO_ANNULATE="Cancellation of event registration is not allowed."
|
||||
; COM_JEM_ERROR_CANCEL_NOT_ALLOWED="ERROR: Deregistration is not allowed."
|
||||
COM_JEM_ERROR_REGISTRATION="ERROR: Registration failed!"
|
||||
; COM_JEM_ERROR_ADD_VENUE="ERROR: Add a venue"
|
||||
; COM_JEM_ERROR_ADD_STREET="ERROR: Please enter a street!"
|
||||
; COM_JEM_ERROR_ADD_ZIP="ERROR: Please enter a Poscode!"
|
||||
; COM_JEM_ERROR_ADD_CITY="ERROR: Please add a city!"
|
||||
; COM_JEM_ERROR_ADD_COUNTRY="ERROR: Please enter a country code!"
|
||||
; COM_JEM_WEBSITE_HINT="URL must be in the format https://www.google.com!"
|
||||
COM_JEM_SHOW_EVENTS="Show events"
|
||||
COM_JEM_EVENTS="Events"
|
||||
; COM_JEM_CATEGORY_EMPTY="Empty category"
|
||||
COM_JEM_IMAGE_EMPTY="Please select an image to upload."
|
||||
COM_JEM_UPLOAD_FAILED_NOT_AN_IMAGE="Upload FAILED. The uploaded file is not an image."
|
||||
COM_JEM_WRONG_IMAGE_FILE_TYPE="The file must be gif, png, or jpg."
|
||||
COM_JEM_UPLOAD_FAILED="Upload FAILED."
|
||||
COM_JEM_IMAGE_FILE_SIZE="File size is wrong."
|
||||
COM_JEM_REMOVE_IMAGE="Remove image"
|
||||
; COM_JEM_ERROR_ADD_ADDRESS="ERROR: Fill in the address details."
|
||||
; COM_JEM_ERROR_NAME_LONG="ERROR: Name is too long!"
|
||||
COM_JEM_ERROR_URL_LONG="ERROR: URL is too long."
|
||||
COM_JEM_ERROR_URL_WRONG_FORMAT="ERROR: Wrong URL format!"
|
||||
COM_JEM_ERROR_STREET_LONG="ERROR: Street is too long!"
|
||||
COM_JEM_ERROR_STATE_LONG="ERROR: County is too long!"
|
||||
COM_JEM_ERROR_ZIP_LONG="ERROR: Postcode is too long!"
|
||||
COM_JEM_ERROR_CITY_LONG="ERROR: City is too long!"
|
||||
COM_JEM_ERROR_COUNTRY_LONG="ERROR: Country code is too long!"
|
||||
COM_JEM_INVALID_DATE_REQUESTED_USING_CURRENT="Invalid date requested. Using current date."
|
||||
COM_JEM_PRINT_DESC="Print this screen"
|
||||
COM_JEM_EMAIL_DESC="Email to a friend"
|
||||
|
||||
|
||||
; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
; ;;;;;;; Submission mailtexts for the administration ;;;;;;;;;;;;;
|
||||
|
||||
; COM_JEM_NEW_EVENT_MAIL=" : New Event"
|
||||
; COM_JEM_MAIL_NEW_EVENT="You got a new submission from %s ( %s ) \n\nMailadress: %s \nIP: %s \nSubmission time: %s \n\nTitle: %s \nDate: %s \nTime: %s \nVenue: %s / %s \n\nDescription:\n%s \n\n%s"
|
||||
; COM_JEM_EDIT_EVENT_MAIL=" : Edited Event"
|
||||
; COM_JEM_MAIL_EDIT_EVENT="An Event was edited from %s ( %s ) \n\nMailadress: %s \nIP: %s \nModified at: %s \n\nTitle: %s \nDate: %s \nTime: %s \nVenue: %s / %s \n\nDescription:\n%s \n\n%s"
|
||||
; COM_JEM_MAIL_EVENT_PUBLISHED="The Event is published and can be viewed by clicking this link: %s"
|
||||
; COM_JEM_MAIL_EVENT_UNPUBLISHED="The Event is unpublished and needs to be reviewed"
|
||||
; COM_JEM_NEW_VENUE_MAIL=" : New Venue"
|
||||
; COM_JEM_MAIL_NEW_VENUE="You received a new submission from %s ( %s ) \n\nMailadress: %s \nIP: %s \nSubmission time: %s \n\nName: %s \nWebsite: %s \nStreet: %s \nZIP: %s \nCity: %s \nCountry: %s \n\nDescription:\n%s \n\n%s"
|
||||
; COM_JEM_EDIT_VENUE_MAIL=" : Edited Venue"
|
||||
; COM_JEM_MAIL_EDIT_VENUE="A Venue was edited from %s ( %s ) \n\nMailadress: %s \nIP: %s \nModified at: %s \n\nName: %s \nWebsite: %s \nStreet: %s \nZIP: %s \nCity: %s \nCountry: %s \n\nDescription:\n%s \n\n%s"
|
||||
; COM_JEM_MAIL_VENUE_PUBLISHED="The Venue is published and can be viewed by clicking this link: %s"
|
||||
; COM_JEM_MAIL_VENUE_UNPUBLISHED="The Venue is unpublished and needs to be reviewed"
|
||||
|
||||
; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
; ;;;;;;; Submission mailtexts for the user ;;;;;;;;;;;;;
|
||||
|
||||
; COM_JEM_NEW_USER_EVENT_MAIL="Thank you for your Event submission"
|
||||
; COM_JEM_USER_MAIL_NEW_EVENT="Hello %s (%s),\n\nWe have successfully received your submission with the following details:\nSubmission time: %s\nTitle: %s\nDate: %s\nTime: %s\nVenue: %s/%s\n\nDescription:\n%s\n\n%s"
|
||||
; COM_JEM_EDIT_USER_EVENT_MAIL="Event modification"
|
||||
; COM_JEM_USER_MAIL_EDIT_EVENT="Hello %s (%s),\n\nYou have successfully edited the following event:\nModified at: %s\n\nTitle: %s\nDate: %s\nTime: %s\nVenue: %s/%s\n\nDescription:\n%s\n\n%s"
|
||||
; COM_JEM_USER_MAIL_EVENT_PUBLISHED="The event has been published and can be viewed by clicking this link: %s"
|
||||
; COM_JEM_USER_MAIL_EVENT_UNPUBLISHED="Your event submission will be reviewed and activated soon by an administrator"
|
||||
|
||||
; COM_JEM_USER_NEW_VENUE_MAIL="Thank you for your Venue submission"
|
||||
; COM_JEM_USER_MAIL_NEW_VENUE="Hello %s (%s),\n\nWe have successfully received your submission with the following details:\nSubmission time: %s\nName: %s\nWebsite: %s\nStreet: %s\nZIP: %s\nCity: %s\nCountry: %s\n\nDescription:\n%s\n\n%s"
|
||||
; COM_JEM_USER_EDIT_VENUE_MAIL="Venue modification"
|
||||
; COM_JEM_USER_MAIL_EDIT_VENUE="Hello %s (%s),\n\nYou have successfully edited the following venue:\nModified at: %s\n\nName: %s\nWebsite: %s\nStreet: %s\nZIP: %s\nCity: %s\nCountry: %s\n\nDescription:\n%s\n\n%s"
|
||||
; COM_JEM_USER_MAIL_VENUE_PUBLISHED="Your venue submission has been published and can be reviewed by clicking this link: %s"
|
||||
; COM_JEM_USER_MAIL_VENUE_UNPUBLISHED="Your venue submission will be reviewed and activated soon by an administrator"
|
||||
|
||||
; COM_JEM_VENUE_SAVED="Venue saved"
|
||||
; COM_JEM_EVENT_SAVED="Event saved"
|
||||
COM_JEM_ERROR_TITLE_LONG="ERROR: title is too long or empty!"
|
||||
COM_JEM_ARCHIVE="Archive"
|
||||
; COM_JEM_REGISTERED_SUCCESSFULLY="You have successfully registered for this event."
|
||||
; COM_JEM_UNREGISTERED_SUCCESSFULLY="You are no longer registered to attend this event."
|
||||
COM_JEM_REGISTRATION_THANKS_FOR_RESPONSE="Thank you for your response. Your decision has been stored."
|
||||
COM_JEM_EDIT_EVENT="Edit Event"
|
||||
COM_JEM_EDIT_EVENT_DESC="Click to edit this event."
|
||||
COM_JEM_EDIT_EVENT_ROOT="Edit Root Event"
|
||||
COM_JEM_EDIT_EVENT_ROOT_DESC="Click to edit the first event of the serie."
|
||||
COM_JEM_EDIT_VENUE="Edit Venue"
|
||||
COM_JEM_EDIT_VENUE_DESC="Click to edit this venue."
|
||||
COM_JEM_COPY_EVENT="Copy Event"
|
||||
COM_JEM_COPY_EVENT_DESC="Click to add a new event based on this event."
|
||||
COM_JEM_COPY_VENUE="Copy Venue"
|
||||
COM_JEM_COPY_VENUE_DESC="Click to add a new venue based on this venue."
|
||||
COM_JEM_SUBMIT_EVENT_DESC="Click to add an event."
|
||||
COM_JEM_SHOW_EVENTS_DESC="Click to return to the current events."
|
||||
COM_JEM_SHOW_ARCHIVE_DESC="Click to view the archive."
|
||||
COM_JEM_ENDDATE="End Date"
|
||||
COM_JEM_NO_EVENTS="Currently, no events are available."
|
||||
COM_JEM_NO_EVENTS_FOUND="No matching events found."
|
||||
COM_JEM_ADDRESS="Address"
|
||||
COM_JEM_ADD_VENUE="Add Venue"
|
||||
COM_JEM_ADD_EVENT="Add Event"
|
||||
; COM_JEM_THE_EVENT="The Event"
|
||||
; COM_JEM_EDITED_BY_ANOTHER_ADMIN="This event is currently locked by another editor."
|
||||
; COM_JEM_CURRENT_IMAGE="Current Image"
|
||||
; COM_JEM_SELECTED_IMAGE="Selected Image"
|
||||
COM_JEM_SELECT_VENUE="Select Venue"
|
||||
COM_JEM_NO_VENUE="No Venue"
|
||||
COM_JEM_SELECT="Select"
|
||||
COM_JEM_NOTES="Notes"
|
||||
; COM_JEM_COUNTRY_HINT="ISO-CODE (US, DE, AT, CH, etc.)"
|
||||
COM_JEM_SEARCH="Search:"
|
||||
COM_JEM_REGISTRATION="Registration"
|
||||
COM_JEM_CLICK_TO_ENLARGE="Click to enlarge"
|
||||
; COM_JEM_VENUE_NAME_ALREADY_EXISTS="The Venue %s already exists. Please choose another name!"
|
||||
COM_JEM_SHOW_USER_PROFILE="Click to view the user profile."
|
||||
|
||||
COM_JEM_METADATA_INFORMATION="Metadata Information"
|
||||
COM_JEM_META_DESCRIPTION="Edit description"
|
||||
COM_JEM_META_KEYWORDS="Edit keywords"
|
||||
COM_JEM_ADD_VENUE_CITY="Add Venue/City"
|
||||
COM_JEM_ENABLE_MAP="Add a map link"
|
||||
; COM_JEM_ADDRESS_NOTICE="Note: The address fields are only optional if you don't enable a map link!"
|
||||
|
||||
; Recurrence
|
||||
COM_JEM_RECURRING_EVENTS="Repeating Events"
|
||||
COM_JEM_RECURRING_EVENT="Repeating event"
|
||||
COM_JEM_RECURRING_EVENT_DESC="This event is part of a set of recurring events."
|
||||
COM_JEM_RECURRING_FIRST_EVENT_DESC="This event is the first one of a set of recurring events."
|
||||
COM_JEM_RECURRENCE="Repetition"
|
||||
COM_JEM_NOTHING="nothing"
|
||||
COM_JEM_DAILY="daily"
|
||||
COM_JEM_WEEKLY="weekly"
|
||||
COM_JEM_MONTHLY="monthly"
|
||||
COM_JEM_WEEKDAY="weekday"
|
||||
COM_JEM_YEARLY="yearly"
|
||||
COM_JEM_OUTPUT_DAY="repeating every [placeholder] days"
|
||||
COM_JEM_OUTPUT_WEEK="repeating every [placeholder] week"
|
||||
COM_JEM_OUTPUT_MONTH="repeating every [placeholder] month"
|
||||
COM_JEM_OUTPUT_WEEKDAY="repeating every [placeholder] [placeholder_weekday] per month"
|
||||
COM_JEM_OUTPUT_YEAR="repeating every [placeholder] year"
|
||||
COM_JEM_RECURRENCE_COUNTER="By the end of"
|
||||
COM_JEM_UNLIMITED="unlimited"
|
||||
COM_JEM_RECURRING_INFO_TITLE="Current recurrence settings (informational)"
|
||||
|
||||
COM_JEM_LAST=" last"
|
||||
COM_JEM_BEFORE_LAST=" before last"
|
||||
|
||||
COM_JEM_MONDAY="Monday"
|
||||
COM_JEM_TUESDAY="Tuesday"
|
||||
COM_JEM_WEDNESDAY="Wednesday"
|
||||
COM_JEM_THURSDAY="Thursday"
|
||||
COM_JEM_FRIDAY="Friday"
|
||||
COM_JEM_SATURDAY="Saturday"
|
||||
COM_JEM_SUNDAY="Sunday"
|
||||
|
||||
COM_JEM_JANUARY="January"
|
||||
COM_JEM_FEBRUARY="February"
|
||||
COM_JEM_MARCH="March"
|
||||
COM_JEM_APRIL="April"
|
||||
COM_JEM_MAY="May"
|
||||
COM_JEM_JUNE="June"
|
||||
COM_JEM_JULY="July"
|
||||
COM_JEM_AUGUST="August"
|
||||
COM_JEM_SEPTEMBER="September"
|
||||
COM_JEM_OCTOBER="October"
|
||||
COM_JEM_NOVEMBER="November"
|
||||
COM_JEM_DECEMBER="December"
|
||||
|
||||
COM_JEM_GO="Go"
|
||||
COM_JEM_RESET="Reset"
|
||||
COM_JEM_DISPLAY_NUM="Limit"
|
||||
COM_JEM_FILTER="Filter"
|
||||
COM_JEM_ORDERING="Order by"
|
||||
|
||||
; COM_JEM_PROPOSED_BY="Proposed by"
|
||||
|
||||
; COM_JEM_MY_ITEMS="My Items"
|
||||
COM_JEM_MY_EVENTS="My Events"
|
||||
COM_JEM_MY_VENUES="My Venues"
|
||||
COM_JEM_NO_VENUES="No Venues"
|
||||
COM_JEM_REGISTERED_TO="Registered to"
|
||||
COM_JEM_IMAGE="Image"
|
||||
|
||||
;
|
||||
COM_JEM_CALENDAR_SHOWALL="Show All"
|
||||
; COM_JEM_CALENDAR_HIDEALL="Hide All"
|
||||
|
||||
COM_JEM_MAX_PLACES="Max places"
|
||||
COM_JEM_MAX_PLACES_DESC="Max places description"
|
||||
COM_JEM_ENABLE_WAITINGLIST="Waiting list"
|
||||
COM_JEM_ENABLE_WAITINGLIST_DESC="Enable waiting list"
|
||||
COM_JEM_EVENT_FULL_REGISTER_TO_WAITING_LIST="Full, register to waiting list."
|
||||
COM_JEM_EVENT_FULL_USER_REGISTERED_NO_WAITING_LIST="Full, you have booked places, no available waiting list."
|
||||
COM_JEM_EVENT_FULL_NOTICE="This event is fully booked and there is no waiting list available."
|
||||
COM_JEM_BOOKED_PLACE="Booked place"
|
||||
COM_JEM_BOOKED_PLACES="Booked places"
|
||||
COM_JEM_RESERVED_PLACE="Reserved place"
|
||||
COM_JEM_RESERVED_PLACES="Reserved places"
|
||||
COM_JEM_AVAILABLE_PLACES="Available places"
|
||||
COM_JEM_SERIES_BOOKED = "Series event booking"
|
||||
; COM_JEM_WAITINGLIST_UNREGISTER_BOX="Waiting list unregister"
|
||||
; COM_JEM_WAITINGLIST_UNREGISTER_BOX_ONWAITINGLIST="On waiting list, unregister"
|
||||
|
||||
; COM_JEM_SEARCH_FILTER="Filter"
|
||||
; COM_JEM_SEARCH_RESET="Reset"
|
||||
; COM_JEM_SEARCH_GO="Go"
|
||||
COM_JEM_SEARCH_FROM="From"
|
||||
COM_JEM_SEARCH_TO="To"
|
||||
COM_JEM_SEARCH_MONTH="Month"
|
||||
; COM_JEM_SEARCH_SUBMITSEARCH="Submit search"
|
||||
; COM_JEM_SEARCH_DISPLAYNUM="Display number"
|
||||
; COM_JEM_SEARCH_NOEVENTS="No events"
|
||||
; COM_JEM_SEARCH_OPENDATE="Open date"
|
||||
COM_JEM_SEARCH_DATE="Date"
|
||||
COM_JEM_SEARCH_YYYY-MM="YYYY-MM"
|
||||
COM_JEM_SEARCH_YYYY-MM_FORMAT="The date format must be YYYY-MM!"
|
||||
COM_JEM_SEARCH_SUBMIT="Search"
|
||||
|
||||
; Custom Fields
|
||||
COM_JEM_EVENT_CUSTOM_FIELD1="Event Custom Field 1"
|
||||
COM_JEM_EVENT_CUSTOM_FIELD2="Event Custom Field 2"
|
||||
COM_JEM_EVENT_CUSTOM_FIELD3="Event Custom Field 3"
|
||||
COM_JEM_EVENT_CUSTOM_FIELD4="Event Custom Field 4"
|
||||
COM_JEM_EVENT_CUSTOM_FIELD5="Event Custom Field 5"
|
||||
COM_JEM_EVENT_CUSTOM_FIELD6="Event Custom Field 6"
|
||||
COM_JEM_EVENT_CUSTOM_FIELD7="Event Custom Field 7"
|
||||
COM_JEM_EVENT_CUSTOM_FIELD8="Event Custom Field 8"
|
||||
COM_JEM_EVENT_CUSTOM_FIELD9="Event Custom Field 9"
|
||||
COM_JEM_EVENT_CUSTOM_FIELD10="Event Custom Field 10"
|
||||
COM_JEM_EVENT_CUSTOM_FIELD1_DESC="Event Custom Field 1 Description"
|
||||
COM_JEM_EVENT_CUSTOM_FIELD2_DESC="Event Custom Field 2 Description"
|
||||
COM_JEM_EVENT_CUSTOM_FIELD3_DESC="Event Custom Field 3 Description"
|
||||
COM_JEM_EVENT_CUSTOM_FIELD4_DESC="Event Custom Field 4 Description"
|
||||
COM_JEM_EVENT_CUSTOM_FIELD5_DESC="Event Custom Field 5 Description"
|
||||
COM_JEM_EVENT_CUSTOM_FIELD6_DESC="Event Custom Field 6 Description"
|
||||
COM_JEM_EVENT_CUSTOM_FIELD7_DESC="Event Custom Field 7 Description"
|
||||
COM_JEM_EVENT_CUSTOM_FIELD8_DESC="Event Custom Field 8 Description"
|
||||
COM_JEM_EVENT_CUSTOM_FIELD9_DESC="Event Custom Field 9 Description"
|
||||
COM_JEM_EVENT_CUSTOM_FIELD10_DESC="Event Custom Field 10 Description"
|
||||
COM_JEM_EVENT_FIELDS_EVENT_UPDATED="The event has been successfully updated in the following fields: "
|
||||
|
||||
COM_JEM_VENUE_CUSTOM_FIELD1="Venue Custom Field 1"
|
||||
COM_JEM_VENUE_CUSTOM_FIELD2="Venue Custom Field 2"
|
||||
COM_JEM_VENUE_CUSTOM_FIELD3="Venue Custom Field 3"
|
||||
COM_JEM_VENUE_CUSTOM_FIELD4="Venue Custom Field 4"
|
||||
COM_JEM_VENUE_CUSTOM_FIELD5="Venue Custom Field 5"
|
||||
COM_JEM_VENUE_CUSTOM_FIELD6="Venue Custom Field 6"
|
||||
COM_JEM_VENUE_CUSTOM_FIELD7="Venue Custom Field 7"
|
||||
COM_JEM_VENUE_CUSTOM_FIELD8="Venue Custom Field 8"
|
||||
COM_JEM_VENUE_CUSTOM_FIELD9="Venue Custom Field 9"
|
||||
COM_JEM_VENUE_CUSTOM_FIELD10="Venue Custom Field 10"
|
||||
COM_JEM_VENUE_CUSTOM_FIELD1_DESC="Venue Custom Field 1 Description"
|
||||
COM_JEM_VENUE_CUSTOM_FIELD2_DESC="Venue Custom Field 2 Description"
|
||||
COM_JEM_VENUE_CUSTOM_FIELD3_DESC="Venue Custom Field 3 Description"
|
||||
COM_JEM_VENUE_CUSTOM_FIELD4_DESC="Venue Custom Field 4 Description"
|
||||
COM_JEM_VENUE_CUSTOM_FIELD5_DESC="Venue Custom Field 5 Description"
|
||||
COM_JEM_VENUE_CUSTOM_FIELD6_DESC="Venue Custom Field 6 Description"
|
||||
COM_JEM_VENUE_CUSTOM_FIELD7_DESC="Venue Custom Field 7 Description"
|
||||
COM_JEM_VENUE_CUSTOM_FIELD8_DESC="Venue Custom Field 8 Description"
|
||||
COM_JEM_VENUE_CUSTOM_FIELD9_DESC="Venue Custom Field 9 Description"
|
||||
COM_JEM_VENUE_CUSTOM_FIELD10_DESC="Venue Custom Field 10 Description"
|
||||
|
||||
|
||||
; COM_JEM_EVENT_FILES="Files"
|
||||
COM_JEM_FILES="Files"
|
||||
|
||||
COM_JEM_EVENT_ATTACHMENTS_TAB="Attachments"
|
||||
|
||||
COM_JEM_ATTACHMENT_FILE="File"
|
||||
COM_JEM_ATTACHMENT_NAME="Name"
|
||||
COM_JEM_ATTACHMENT_DESCRIPTION="Description"
|
||||
COM_JEM_ATTACHMENT_ACCESS="Access"
|
||||
COM_JEM_ATTACHMENT_REMOVE="Remove"
|
||||
|
||||
; COM_JEM_PLEASE_LOGIN="Please log in to submit events"
|
||||
COM_JEM_LINK="Link"
|
||||
COM_JEM_NUM="Num"
|
||||
; COM_JEM_CALENDAR_ANDMORE="and more..."
|
||||
; COM_JEM_ERROR_ATTACHMENT_EXTENSION_NOT_ALLOWED="Extension not allowed"
|
||||
COM_JEM_PRINT="Print"
|
||||
|
||||
; COM_JEM_ERROR_ATTACHMENT_FILE_TOO_BIG="Attachment size is too big"
|
||||
COM_JEM_ERROR_ATTACHMENT_SAVING_TO_DB="Error storing attachment information"
|
||||
COM_JEM_ERROR_ATTACHMENT_UPDATING_RECORD="Error updating attachment information"
|
||||
COM_JEM_ERROR_COULD_NOT_CREATE_FOLDER="Couldn't create folder"
|
||||
COM_JEM_DOWNLOAD="Download"
|
||||
|
||||
COM_JEM_ICAL="iCalendar"
|
||||
COM_JEM_ICAL_DESC="Download iCalendar file"
|
||||
COM_JEM_CATEGORIES="Categories"
|
||||
COM_JEM_LOCATION="Location"
|
||||
COM_JEM_SUBCATEGORIES="Subcategories"
|
||||
|
||||
COM_JEM_SHOWALL="Show All"
|
||||
COM_JEM_HIDEALL="Hide All"
|
||||
|
||||
COM_JEM_EXPORT_ICS="Export ICS"
|
||||
COM_JEM_ICS_LINK="Link"
|
||||
COM_JEM_LATITUDE="Latitude"
|
||||
; COM_JEM_LATITUDE_HINT="Latitude Hint"
|
||||
COM_JEM_LONGITUDE="Longitude"
|
||||
; COM_JEM_LONGITUDE_HINT="Longitude Hint"
|
||||
COM_JEM_NO_IMAGE="No Image"
|
||||
; COM_JEM_WRONG_URL_FORMAT="Wrong URL format"
|
||||
|
||||
COM_JEM_OPEN_DATE="Open Date"
|
||||
COM_JEM_CONTACT="Contact Information"
|
||||
COM_JEM_TELEPHONE="Telephone"
|
||||
|
||||
COM_JEM_TABLE_EVENTIMAGE="Event Image"
|
||||
COM_JEM_TABLE_DATE="Date"
|
||||
COM_JEM_TABLE_TITLE="Title"
|
||||
COM_JEM_TABLE_LOCATION="Venue"
|
||||
COM_JEM_TABLE_CITY="City"
|
||||
COM_JEM_TABLE_STATE="County"
|
||||
; COM_JEM_TABLE_COUNTRY="Country"
|
||||
COM_JEM_TABLE_CATEGORY="Category"
|
||||
COM_JEM_TABLE_PLACES="Places"
|
||||
COM_JEM_TABLE_ATTENDEES="Attendees"
|
||||
|
||||
COM_JEM_FORMAT_SHORT_DATE="j.m.y"
|
||||
; COM_JEM_CUSTOM_FIELDS="Custom fields"
|
||||
; COM_JEM_ADD_ZIP="Add Postcode"
|
||||
|
||||
COM_JEM_META_HANDLING="Meta option"
|
||||
|
||||
COM_JEM_META_KEYWORDS_DESC="In this input box, you can choose multiple keywords with the CTRL key."
|
||||
|
||||
COM_JEM_META_DESCRIPTION_DESC="With the editor, you can create your own meta description. Use the Suggestion button if you need an example."
|
||||
COM_JEM_META_DESCRIPTION_STANDARD="The event titled [title] starts on [dates]!"
|
||||
COM_JEM_META_DESCRIPTION_BUTTON="Suggestion"
|
||||
COM_JEM_META_ERROR="Please choose an input box, after that, you can use the keyword buttons."
|
||||
COM_JEM_META_DESCRIPTION_WARN="Please do not use inverted commas or quotation marks in the description. This will generate HTML errors."
|
||||
|
||||
COM_JEM_EVENT_INFO_TAB="Info Tab"
|
||||
; COM_JEM_EVENT_MAIN_TAB="Main Tab"
|
||||
; COM_JEM_EVENT_SECOND_TAB="Second Tab"
|
||||
|
||||
COM_JEM_EVENT_UNPUBLISHED="Event(s) successfully unpublished."
|
||||
COM_JEM_EVENT_PUBLISHED="Event(s) successfully published."
|
||||
COM_JEM_EVENT_TRASHED="Trashed events."
|
||||
COM_JEM_VENUE_UNPUBLISHED="Venue(s) successfully unpublished."
|
||||
COM_JEM_VENUE_PUBLISHED="Venue(s) successfully published."
|
||||
COM_JEM_VENUE_TRASHED="Trashed venues."
|
||||
; TODO: No COM_JEM_ prefix here? - remove or rename
|
||||
; JGLOBAL_CHECK_ALL="Check All"
|
||||
COM_JEM_ORDER_ASCENDING="Ascending"
|
||||
COM_JEM_ORDER_DESCENDING="Descending"
|
||||
; JGRID_CHECKBOX_ROW_N="Checkbox for row %d."
|
||||
|
||||
; Registered Users
|
||||
; COM_JEM_REGISTRATION_DISABLED="Registration disabled."
|
||||
; COM_JEM_REGISTRATION_DISABLED_GLOBAL_HINT="Registration is globally disabled. Users are not able to register or unregister. To change this, ask your website administrator."
|
||||
; COM_JEM_REGISTRATION_DISABLED_EVENT_HINT="Registration is disabled for this event. Users are not able to register or unregister. You can change this in the Registration block on the Other tab of the Edit Event view."
|
||||
COM_JEM_REGISTERED_USER_IN_EVENT="Your user has been registered for the event/s"
|
||||
COM_JEM_UNREGISTERED_USER_IN_EVENT="Your user has been deregistered from the event/s"
|
||||
COM_JEM_REGISTERED_USER="Registered Users"
|
||||
COM_JEM_NAME="Name"
|
||||
COM_JEM_USERNAME="Username"
|
||||
COM_JEM_EMAIL="Email"
|
||||
COM_JEM_IP_ADDRESS="IP Address"
|
||||
COM_JEM_REGDATE="Registration Date"
|
||||
COM_JEM_USER_ID="User ID"
|
||||
COM_JEM_COMMENT="Comment"
|
||||
COM_JEM_OPTIONAL_COMMENT="Optional Comment"
|
||||
COM_JEM_REMOVE_USER="Remove User"
|
||||
COM_JEM_REGISTERED_USERS_ADDED="User(s) added"
|
||||
COM_JEM_REGISTERED_USERS_DELETED="User(s) deleted"
|
||||
COM_JEM_REGISTERED_USERS_CHANGED="User(s) changed"
|
||||
; COM_JEM_SELECT_ITEM_TO_ADD="Select item to add"
|
||||
COM_JEM_SELECT_ITEM_TO_DELETE="Select item to delete"
|
||||
; COM_JEM_CSV_EXPORT="CSV Export"
|
||||
COM_JEM_ADD_USER_REGISTRATIONS="Add"
|
||||
COM_JEM_ADD_USER_REGISTRATIONS_DESC="Add or edit users not able to register themselves"
|
||||
|
||||
COM_JEM_ATT_FILTER_ALL="All"
|
||||
COM_JEM_ATT_FILTER_INVITED="Invited"
|
||||
COM_JEM_ATT_FILTER_NOT_ATTENDING="Not Attending"
|
||||
COM_JEM_ATT_FILTER_ATTENDING="Attending"
|
||||
COM_JEM_ATT_FILTER_WAITING="Waiting"
|
||||
COM_JEM_EDIT_ATTENDEE="Edit Attendee"
|
||||
COM_JEM_STATUS="Status"
|
||||
COM_JEM_STATUS_DESC="Choose the status for the registered users"
|
||||
COM_JEM_HEADER_WAITINGLIST_STATUS="Status"
|
||||
COM_JEM_STATUS_UNKNOWN="Registration status is unknown"
|
||||
COM_JEM_INVITED_PLACE="Invited Place"
|
||||
COM_JEM_INVITED_PLACES="Invited Places"
|
||||
COM_JEM_WAITING_PLACE="Waiting Place"
|
||||
COM_JEM_WAITING_PLACES="Waiting Places"
|
||||
COM_JEM_INVITED="User is invited"
|
||||
COM_JEM_ATTENDING="User is attending"
|
||||
COM_JEM_ATTENDING_MOVE_TO_WAITINGLIST="User is attending. Click to move the user to the waiting list."
|
||||
COM_JEM_NOT_ATTENDING="User is not attending"
|
||||
COM_JEM_NOT_INVITED="User was not invited"
|
||||
COM_JEM_ON_WAITINGLIST="User is on the waiting list"
|
||||
COM_JEM_ON_WAITINGLIST_MOVE_TO_ATTENDING="User is on the waiting list. Click to move the user to the list of attendees."
|
||||
COM_JEM_ADDED_TO_ATTENDING="The user has been added to the list of attendees."
|
||||
COM_JEM_ADDED_TO_WAITING="The user has been added to the waiting list."
|
||||
COM_JEM_WAITINGLIST_TOGGLE_ERROR="Error while toggling registration status."
|
||||
COM_JEM_NO_WAITINGLIST="There is no waiting list available."
|
||||
|
||||
; COM_JEM_DISPLAY_ATTENDEECOLUMN="Attendee Column"
|
||||
; COM_JEM_DISPLAY_ATTENDEECOLUMN_DESC="Do you want to show the attendee column?"
|
||||
|
||||
; Calendar View
|
||||
COM_JEM_AND_MORE="And more"
|
||||
|
||||
; My-Events View
|
||||
COM_JEM_MYEVENT_MANAGEATTENDEES="Manage Attendees"
|
||||
; COM_JEM_MYEVENT_ATTENDEES_HINT="Read as: \"(attending)/(max. places) + (on waiting list) - (not attending), (invited)?\" where empty parts may be omitted. Click to manage attendees."
|
||||
|
||||
; General, used in my-events/attendees
|
||||
COM_JEM_PUBLISH="Publish"
|
||||
COM_JEM_PUBLISH_DESC="Publish"
|
||||
COM_JEM_TRASH="Trash"
|
||||
COM_JEM_TRASH_DESC="Trash"
|
||||
COM_JEM_UNPUBLISH="Unpublish"
|
||||
COM_JEM_UNPUBLISH_DESC="Unpublish"
|
||||
COM_JEM_BACK="Back"
|
||||
COM_JEM_EXPORT="Export"
|
||||
COM_JEM_EXPORT_DESC="Export to an easy-to-use CSV file"
|
||||
|
||||
; Attendees View
|
||||
COM_JEM_ATTENDEES_EMPTY_YET="Currently, there are no attendances for this event."
|
||||
COM_JEM_ATTENDEES_ATTENDING="Attending"
|
||||
COM_JEM_ATTENDEES_ON_WAITINGLIST="On waiting list"
|
||||
COM_JEM_ATTENDEES_NOT_ATTENDING="Not attending"
|
||||
COM_JEM_ATTENDEES_INVITED="Invited"
|
||||
COM_JEM_ATTENDEES_STATUS_UNKNOWN="Status unknown"
|
||||
COM_JEM_ATTENDEES_DELETE="Delete user"
|
||||
|
||||
; Venue View
|
||||
COM_JEM_DELIVER_NEW_VENUE_DESC="Click to add a venue"
|
||||
|
||||
; Controller
|
||||
COM_JEM_SELECT_ITEM_TO_PUBLISH="Select an item to publish"
|
||||
COM_JEM_SELECT_ITEM_TO_UNPUBLISH="Select an item to unpublish"
|
||||
COM_JEM_SELECT_ITEM_TO_TRASH="Select an item to trash"
|
||||
|
||||
; Week Calendar
|
||||
COM_JEM_WKCAL_WEEK="Week"
|
||||
|
||||
COM_JEM_NOVENUE="No Venue"
|
||||
COM_JEM_EDITEVENT_FIELD_DESCRIPTION="Description"
|
||||
COM_JEM_EDITEVENT_FIELD_DESCRIPTION_DESC="Description"
|
||||
COM_JEM_EDITEVENT_NOTICE_GENSHIELD="Notice: Generating shield is set to <strong>%s</strong>"
|
||||
COM_JEM_EDITEVENT_WARN_RECURRENCE_TITLE="ATTENTION!"
|
||||
COM_JEM_EDITEVENT_WARN_RECURRENCE_TEXT="This event is part of a set of recurring events. If you save this event, it will be removed from this set, even if you just save it without editing at all.<br>If you choose any recurrence in this event, a new set of recurring events will be created."
|
||||
COM_JEM_EDITEVENT_WARN_RECURRENCE_FIRST_TEXT="This event is the first one of a set of recurring events. If you save this event, the set will be dissolved, even if you just save it without editing at all.<br>If you choose any recurrence in this event, a new set of recurring events will be created."
|
||||
COM_JEM_NOVENUES="No Venues found."
|
||||
COM_JEM_NOCONTACTS="No Contacts found."
|
||||
COM_JEM_NOUSERS="No Users found."
|
||||
|
||||
; Search
|
||||
COM_JEM_AFRICA="Africa"
|
||||
COM_JEM_ASIA="Asia"
|
||||
COM_JEM_OCEANIA="Oceania"
|
||||
COM_JEM_NORTH_AMERICA="North America"
|
||||
COM_JEM_SOUTH_AMERICA="South America"
|
||||
COM_JEM_ANTARCTICA="Antarctica"
|
||||
COM_JEM_EUROPE="Europe"
|
||||
|
||||
COM_JEM_DEFAULT_PAGE_TITLE_DAY="Day"
|
||||
|
||||
; EVENT-View
|
||||
COM_JEM_EVENT_HITS_LABEL="Hits"
|
||||
COM_JEM_EVENT_HITS="%s"
|
||||
COM_JEM_EVENT_CREATED_BY_LABEL="Created by"
|
||||
COM_JEM_EVENT_CREATED_BY="%s"
|
||||
COM_JEM_EVENT_READ_MORE="Read more: "
|
||||
COM_JEM_EVENT_READ_MORE_TITLE="Read more..."
|
||||
COM_JEM_EVENT_REGISTER_TO_READ_MORE="Login to read more details."
|
||||
COM_JEM_EVENT_CONTACT="%s"
|
||||
COM_JEM_EVENTS_FORMAT_SHORT_DATE="j.m.y"
|
||||
|
||||
; EDITEVENT-View
|
||||
COM_JEM_EDITEVENT_FIELD_CATEGORIES="Categories"
|
||||
COM_JEM_EDITEVENT_FIELD_CATEGORIES_DESC="Select categories"
|
||||
COM_JEM_EDITEVENT_FIELD_EVENT_TITLE="Title"
|
||||
COM_JEM_EDITEVENT_FIELD_EVENT_TITLE_DESC="This is the event title that will be shown."
|
||||
COM_JEM_EDITEVENT_FIELD_CONTACT="Contact"
|
||||
COM_JEM_EDITEVENT_FIELD_CONTACT_DESC="Select contact"
|
||||
COM_JEM_EDITEVENT_FIELD_DATE="Start Date"
|
||||
COM_JEM_EDITEVENT_FIELD_DATE_DESC="Select start date"
|
||||
COM_JEM_EDITEVENT_FIELD_ENDDATE="End Date"
|
||||
COM_JEM_EDITEVENT_FIELD_ENDDATE_DESC="Select end date"
|
||||
COM_JEM_EDITEVENT_FIELD_END_TIME="End Time"
|
||||
COM_JEM_EDITEVENT_FIELD_END_TIME_DESC="Select end time"
|
||||
; COM_JEM_EDITEVENT_FIELD_EVENTTEXT_DESC="JEM EDITEVENT FIELD EVENTTEXT DESC"
|
||||
; COM_JEM_EDITEVENT_FIELD_EVENTTEXT_LABEL="Description"
|
||||
COM_JEM_EDITEVENT_FIELD_EVENT_TIME="Start Time"
|
||||
COM_JEM_EDITEVENT_FIELD_EVENT_TIME_DESC="Select start time"
|
||||
COM_JEM_EDITEVENT_FIELD_FEATURED_DESC="Mark this event as featured"
|
||||
COM_JEM_EDITEVENT_FIELD_PUBLISHED_DESC="Set event status"
|
||||
COM_JEM_EDITEVENT_FIELD_VENUE="Venue"
|
||||
COM_JEM_EDITEVENT_FIELD_VENUE_DESC="Select venue"
|
||||
COM_JEM_EDITEVENT_FIELD_ALIAS="Alias"
|
||||
; COM_JEM_EDITEVENT_FIELD_ALIAS_DESC="Alias"
|
||||
COM_JEM_EDITEVENT_EDIT_EVENT="Edit Event: %s"
|
||||
COM_JEM_EDITEVENT_ADD_EVENT="Add Event"
|
||||
COM_JEM_EDITEVENT_INFO_TAB="Event"
|
||||
COM_JEM_EDITEVENT_DETAILS_LEGEND="Details"
|
||||
COM_JEM_EVENT_FIELD_ENABLE_REGISTRATION="Registration"
|
||||
COM_JEM_EVENT_FIELD_ENABLE_REGISTRATION_DESC="When enabled, users can register for the event. Options include: Yes, No, or Limited"
|
||||
COM_JEM_EVENT_FIELD_REGISTRATION_FROM="Reg. opens on"
|
||||
COM_JEM_EVENT_FIELD_REGISTRATION_FROM_DESC="Enter the datetime before the event starts when registrations are allowed."
|
||||
COM_JEM_EVENT_FIELD_REGISTRATION_FROM_POSTFIX=""
|
||||
COM_JEM_EVENT_FIELD_REGISTRATION_FROM_HINT="YYYY-MM-DD HH:MM:SS"
|
||||
COM_JEM_FROM="from"
|
||||
COM_JEM_EVENT_FIELD_FROM="Limited"
|
||||
COM_JEM_UNTIL="until"
|
||||
COM_JEM_EVENT_FIELD_UNTIL="Limited"
|
||||
COM_JEM_EVENT_FIELD_REGISTRATION_UNTIL="Reg. closes on"
|
||||
COM_JEM_EVENT_FIELD_REGISTRATION_UNTIL_DESC="Enter the datetime before the event starts when registrations aren't allowed."
|
||||
COM_JEM_EVENT_FIELD_REGISTRATION_UNTIL_POSTFIX=""
|
||||
COM_JEM_EVENT_FIELD_REGISTRATION_UNTIL_HINT="YYYY-MM-DD HH:MM:SS"
|
||||
COM_JEM_EVENT_REGISTRATION_CLOSED="Registration is closed";
|
||||
COM_JEM_EVENT_REGISTRATION_WILLBE_FROM="Registration will be available from";
|
||||
COM_JEM_EVENT_REGISTRATION_IS_FROM="Registration is available from";
|
||||
COM_JEM_EVENT_REGISTRATION_IS_UNTIL="Registration is available until";
|
||||
COM_JEM_EVENT_REGISTRATION_WAS_UNTIL="Registration was open until";
|
||||
COM_JEM_EVENT_FIELD_ENABLE_ANNULATION="Allow cancellation"
|
||||
COM_JEM_EVENT_FIELD_ENABLE_ANNULATION_DESC="When enabled, users can cancel their registration for the event. Options include: Yes, No, or Limited."
|
||||
COM_JEM_EVENT_FIELD_ANNULATION_UNTIL="Cancellations allowed until"
|
||||
COM_JEM_EVENT_FIELD_ANNULATION_UNTIL_DESC="Enter the datetime before the event starts during which cancellations are allowed."
|
||||
COM_JEM_EVENT_FIELD_ANNULATION_UNTIL_POSTFIX=" (until)"
|
||||
COM_JEM_EVENT_FIELD_ANNULATION_UNTIL_HINT="YYYY-MM-DD HH:MM:SS"
|
||||
COM_JEM_EVENT_ANNULATION_NOTWILLBE_FROM="Cancellation is unavailable from";
|
||||
COM_JEM_EVENT_ANNULATION_ISNOT_FROM="Cancellation is not allowed from";
|
||||
COM_JEM_UNTIL="Until"
|
||||
COM_JEM_INVITED_USERS_ONLY="Invited users only"
|
||||
COM_JEM_EDITEVENT_FIELD_REG_INVITED_ONLY="Invited Users Only"
|
||||
COM_JEM_EDITEVENT_FIELD_REG_INVITED_ONLY_DESC="Limit registration to invited users."
|
||||
; COM_JEM_EDITEVENT_FIELD_ENABLE_UNREGISTRATION_DESC="OBSOLETE - Allow registered people to deregister from the event"
|
||||
; COM_JEM_EDITEVENT_FIELD_ENABLE_UNREGISTRATION="Deregistration"
|
||||
COM_JEM_EDITEVENT_FIELD_MAX_PLACES="Max Places (0 = unlimited)"
|
||||
COM_JEM_EDITEVENT_FIELD_MAX_PLACES_DESC="Here you can set the maximum number of places. The rest will be on the waiting list if that's enabled."
|
||||
COM_JEM_EDITEVENT_FIELD_INVITED_USERS="Invited Users"
|
||||
COM_JEM_EDITEVENT_FIELD_INVITED_USERS_DESC="Informational number of invited users. Click on Select to invite users."
|
||||
COM_JEM_EDITEVENT_FIELD_BOOKED_PLACES="Booked Places"
|
||||
COM_JEM_EDITEVENT_FIELD_BOOKED_PLACES_DESC="Informational number of places users have already registered for."
|
||||
COM_JEM_MAX_PLACES="Max Places"
|
||||
COM_JEM_MAX_PLACES_DESC="Max Places Description"
|
||||
COM_JEM_EDITEVENT_FIELD_AVAILABLE_PLACES="Available Places"
|
||||
COM_JEM_EDITEVENT_FIELD_AVAILABLE_PLACES_DESC="Number of free places."
|
||||
COM_JEM_EDITEVENT_FIELD_RESERVED_PLACES="Reserved Places"
|
||||
COM_JEM_EDITEVENT_FIELD_RESERVED_PLACES_DESC="Number of places reserved by the organiser"
|
||||
COM_JEM_MINIMUM_BOOKED_PLACES_PER_USER="Min. booked / user"
|
||||
COM_JEM_MINIMUM_BOOKED_PLACES_PER_USER_DESC="Minimum number of places booked per user"
|
||||
COM_JEM_MAXIMUM_BOOKED_PLACES_PER_USER="Max. booked / user"
|
||||
COM_JEM_MAXIMUM_BOOKED_PLACES_PER_USER_DESC="Maximum number of places booked per user"
|
||||
COM_JEM_AVAILABLE_PLACES="Still available Places"
|
||||
COM_JEM_AVAILABLE_PLACES_DESC="Informational number of free places."
|
||||
COM_JEM_EDITEVENT_FIELD_ENABLE_WAITINGLIST="Enable Waiting List"
|
||||
COM_JEM_EDITEVENT_FIELD_ENABLE_WAITINGLIST_DESC="If enabled, supernumerary attendees will be stored on a waiting list and automatically moved to the list of attendees if a place becomes available."
|
||||
COM_JEM_EDITEVENT_FIELD_REQUEST_ANSWER_ASSISTENCE="Request answer"
|
||||
COM_JEM_EDITEVENT_FIELD_REQUEST_ANSWER_ASSISTENCE_DESC="If enabled, it shows option to the user for not assistance to the event."
|
||||
COM_JEM_EDITEVENT_FIELD_SERIES_EVENT_BOOKING = "Series event booking"
|
||||
COM_JEM_EDITEVENT_FIELD_SERIES_EVENT_BOOKING_DESC="If enabled, apply only for recurrence event. The registration is booking all series event of recurrence from now."
|
||||
COM_JEM_EDITEVENT_FIELD_SINGLE_EVENT_BOOKING="Single event booking"
|
||||
COM_JEM_EDITEVENT_FIELD_SINGLE_EVENT_BOOKING_DESC="If enabled, apply only for recurrence event. The user can book only one event of series."
|
||||
COM_JEM_EDITEVENT_FIELD_RECURRENCE="Recurrence"
|
||||
COM_JEM_RECURRING_FIRST_EVENT_ID="First event ID (0 is root)"
|
||||
; COM_JEM_EDITEVENT_FIELD_RECURRENCE_DESC="Recurrence"
|
||||
COM_JEM_EDITEVENT_FIELD_RECURRENCE_COUNTER="Recurrence Counter"
|
||||
; COM_JEM_EDITEVENT_FIELD_RECURRENCE_COUNTER_DESC=""
|
||||
|
||||
; EDITVENUE-View
|
||||
COM_JEM_EDITVENUE_INFO_TAB="Details"
|
||||
COM_JEM_EDITVENUE_ATTACHMENTS_TAB="Attachments"
|
||||
COM_JEM_EDITVENUE_OTHER_TAB="Other"
|
||||
COM_JEM_EDITVENUE_CUSTOMFIELDS="Custom fields"
|
||||
COM_JEM_GEODATA="Geodata"
|
||||
COM_JEM_EDITVENUE_VENUE_EDIT="Edit Venue: %s"
|
||||
COM_JEM_EDITVENUE_DETAILS_LEGEND="Address"
|
||||
COM_JEM_EDITVENUE_VENUE_ADD="Add Venue"
|
||||
COM_JEM_EDITVENUE_FIELD_ALIAS="Alias"
|
||||
COM_JEM_EDITVENUE_FIELD_ALIAS_DESC="Alias"
|
||||
COM_JEM_VENUE_ADDRPLACEHOLDER="Type in the address"
|
||||
COM_JEM_VENUE_ADDR_FINDVENUEDATA="Find by Venue Data"
|
||||
COM_JEM_VENUE_COPY_DATA="Copy all Data"
|
||||
COM_JEM_VENUE_COPY_ADDRESS="Copy address"
|
||||
COM_JEM_VENUE_COPY_VENUE="Copy venue"
|
||||
COM_JEM_VENUE_COPY_COORDINATES="Copy coordinates"
|
||||
COM_JEM_EDITEVENT_EXTENDED_TAB="Extended"
|
||||
COM_JEM_EDITEVENT_PUBLISH_TAB="Publishing"
|
||||
COM_JEM_EDITVENUE_EXTENDED_TAB="Extended"
|
||||
COM_JEM_EDITVENUE_PUBLISH_TAB="Publishing"
|
||||
COM_JEM_EDITVENUE_IMAGE_LEGEND="Image"
|
||||
COM_JEM_EDITVENUE_URL_LEGEND="URL"
|
||||
COM_JEM_EDITVENUE_PUBLISHING_LEGEND="Publishing"
|
||||
COM_JEM_EDITVENUE_DESCRIPTION_LEGEND="Description"
|
||||
|
||||
|
||||
; ERRORS
|
||||
COM_JEM_EVENT_ERROR_END_BEFORE_START_DATES="Event start date must begin before end date"
|
||||
COM_JEM_EVENT_ERROR_END_BEFORE_START_TIMES="Event start time must begin before end time"
|
||||
COM_JEM_EVENT_ERROR_NAME="Fill in: title"
|
||||
COM_JEM_EVENT_ERROR_EVENT_NOT_FOUND="Event not found!"
|
||||
COM_JEM_EVENT_ERROR_STORE_CATEGORIES="Error storing categories."
|
||||
COM_JEM_EVENT_ERROR_STORE_INVITED_USERS="Error storing invited users."
|
||||
COM_JEM_VENUE_ERROR_CITY="City is too long"
|
||||
COM_JEM_VENUE_ERROR_COUNTRY="Country is too long"
|
||||
COM_JEM_VENUE_ERROR_MAP_ADDRESS="Make sure you filled in these fields: street, city, country, postalCode"
|
||||
COM_JEM_VENUE_ERROR_NAME="Missing name for the venue"
|
||||
COM_JEM_VENUE_ERROR_POSTALCODE="Postcode is too long"
|
||||
COM_JEM_VENUE_ERROR_STREET="Street is too long"
|
||||
COM_JEM_VENUE_ERROR_STATE="County is too long"
|
||||
COM_JEM_VENUE_ERROR_URL_FORMAT="The format of the URL is incorrect"
|
||||
COM_JEM_VENUE_ERROR_URL_LENGTH="URL is too long"
|
||||
COM_JEM_VENUE_ERROR_VENUE_NOT_FOUND="Venue not found!"
|
||||
|
||||
; COM_JEM_WRITTEN_BY="Written by %s"
|
||||
COM_JEM_SELECT_CONTACT="Please select a contact!"
|
||||
COM_JEM_METADATA="Metadata"
|
||||
COM_JEM_ATTACHMENTS_LEGEND="Attachments"
|
||||
COM_JEM_EVENT_OTHER_TAB="Other"
|
||||
COM_JEM_EVENT_CUSTOMFIELDS_LEGEND="Custom Fields"
|
||||
COM_JEM_EVENT_REGISTRATION_LEGEND="Registration"
|
||||
COM_JEM_NOCONTACT="No Contact"
|
||||
COM_JEM_COUNTRY_DESC="Country that will be shown"
|
||||
COM_JEM_WEBSITE_DESC="Format like: https://www.example.com"
|
||||
|
||||
COM_JEM_GLOBAL_CHECKED_OUT_BY="Checked out by %s"
|
||||
COM_JEM_FILE="File"
|
||||
COM_JEM_FILE_NAME="File name"
|
||||
COM_JEM_FILE_DESCRIPTION="Description"
|
||||
COM_JEM_FILE_NOT_FOUND="File not found."
|
||||
|
||||
COM_JEM_FIELD_METADESCRIPTION_DESC="Here you can fill in a meta-description"
|
||||
COM_JEM_FIELD_METAKEYWORDS_DESC="Here you can fill in keywords"
|
||||
COM_JEM_VENUE_DESCRIPTION_DESC="Here you can fill in a description for the venue"
|
||||
|
||||
; COM_JEM_CATEGORY_ERROR_404="Category #%d not found"
|
||||
|
||||
COM_JEM_VENUES_EVENTS_ARCHIVED="Events Archived"
|
||||
COM_JEM_VENUES_EVENTS_PUBLISHED="Events Published"
|
||||
|
||||
; GLOBAL
|
||||
COM_JEM_GLOBAL_MAILERPLUGIN_DISABLED="Mailer plugin is not active.<br />Be aware that no email has been sent."
|
||||
COM_JEM_GLOBAL_REMOVE_ATTACHEMENT="Remove attachment"
|
||||
|
||||
COM_JEM_MAILTO_CANCEL="Cancel"
|
||||
COM_JEM_MAILTO_CAPTCHA="Captcha"
|
||||
; COM_JEM_MAILTO_CLOSE_WINDOW="Close Window"
|
||||
; COM_JEM_MAILTO_EMAIL_ERR_NOINFO="Please provide a valid email address."
|
||||
COM_JEM_MAILTO_EMAIL_INVALID="The address '%s' does not appear to be a valid email address."
|
||||
COM_JEM_MAILTO_EMAIL_MSG="This is an email from the website %s, sent by %s (%s).<br />You may find the following link interesting: %s<br /><br />Kind regards"
|
||||
COM_JEM_MAILTO_EMAIL_NOT_SENT="Email could not be sent."
|
||||
COM_JEM_MAILTO_EMAIL_SENT="Email was sent."
|
||||
COM_JEM_MAILTO_EMAIL_TO="Email to"
|
||||
COM_JEM_MAILTO_EMAIL_TO_A_FRIEND="Email this link to a friend."
|
||||
COM_JEM_MAILTO_LINK_IS_MISSING="Link is missing"
|
||||
COM_JEM_MAILTO_SEND="Send"
|
||||
COM_JEM_MAILTO_SENDER="Sender"
|
||||
COM_JEM_MAILTO_SENT_BY="Item sent by %s"
|
||||
COM_JEM_MAILTO_SUBJECT="Subject"
|
||||
COM_JEM_MAILTO_YOUR_EMAIL="Your Email"
|
||||
1
components/com_jem/language/en-GB/index.html
Normal file
1
components/com_jem/language/en-GB/index.html
Normal file
@ -0,0 +1 @@
|
||||
<!DOCTYPE html><title></title>
|
||||
1
components/com_jem/language/index.html
Normal file
1
components/com_jem/language/index.html
Normal file
@ -0,0 +1 @@
|
||||
<!DOCTYPE html><title></title>
|
||||
638
components/com_jem/language/it-IT/it-IT.com_jem.ini
Normal file
638
components/com_jem/language/it-IT/it-IT.com_jem.ini
Normal file
@ -0,0 +1,638 @@
|
||||
; @version 2.1.7
|
||||
; @package JEM
|
||||
; @copyright (C) 2013-2016 joomlaeventmanager.net
|
||||
; @copyright (C) 2005-2009 Christoph Lukes
|
||||
; @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
|
||||
;
|
||||
; All translations can be found at https://www.transifex.com/projects/p/JEM/
|
||||
; Please join the translation team if you want to contribute your changes to the translations
|
||||
;
|
||||
; Note : All ini files need to be saved as UTF-8 - No BOM
|
||||
;
|
||||
; Frontend file
|
||||
|
||||
COM_JEM_DELIVER_NEW_EVENT="Inserisci nuovo evento"
|
||||
COM_JEM_DELIVER_NEW_VENUE="Inserisci nuova sede"
|
||||
COM_JEM_SHOW_ARCHIVE="Visualizza archivio"
|
||||
COM_JEM_ADD_NAME="Aggiungi il tuo nome qui"
|
||||
COM_JEM_ADD_EMAIL="Aggiungi il tuo indirizzo E-mail qui"
|
||||
COM_JEM_WRONG_EMAIL_FORMAT="ERRORE: l'indirizzo E-mail non e` in un formato corretto!"
|
||||
COM_JEM_ADD_DATE="Aggiungi una data!"
|
||||
COM_JEM_DATE_WRONG="ERRORE: la data non e` in un formato corretto"
|
||||
COM_JEM_ADD_TITLE="Aggiungi un titolo!"
|
||||
COM_JEM_ADD_TIME="Aggiungi un orario!"
|
||||
COM_JEM_TIME_WRONG="ERRORE: l'orario non e` in un formato corretto"
|
||||
COM_JEM_ENDTIME_WRONG="ERRORE: l'orario di fine evento non e` in un formato corretto"
|
||||
COM_JEM_SELECT_CATEGORY="Seleziona una categoria!"
|
||||
COM_JEM_SELECT_VENUE="Seleziona una sede!"
|
||||
COM_JEM_SELECT_USERS_AND_STATUS="Per piacere scegli lo stato e gli utenti da registrare."
|
||||
COM_JEM_SELECT_USERS_TO_INVITE="Si prega di selezionare gli utenti che si desidera invitare."
|
||||
COM_JEM_TITLE="Titolo"
|
||||
COM_JEM_TITLE_SHORT="Titolo"
|
||||
COM_JEM_SAVE="Salva"
|
||||
COM_JEM_CANCEL="Cancella"
|
||||
COM_JEM_USERINFO="Informazioni utente"
|
||||
COM_JEM_YOUR_NAME="Il tuo nome"
|
||||
COM_JEM_YOUR_EMAIL="La tua E-mail"
|
||||
COM_JEM_NORMAL_INFO="Dettagli"
|
||||
COM_JEM_VENUE="Sede"
|
||||
COM_JEM_VENUE_SHORT="Sede"
|
||||
COM_JEM_CATEGORY="Categoria"
|
||||
COM_JEM_DATE="Data"
|
||||
COM_JEM_DATE_HINT="Formato aaaa-mm-gg!"
|
||||
COM_JEM_TIME="Orario"
|
||||
COM_JEM_TIME_SHORT="Orario"
|
||||
COM_JEM_TIME_HINT="Formato: hh:mm!"
|
||||
COM_JEM_ENDTIME_HINT="Formato: hh:mm! (opzionale)"
|
||||
COM_JEM_ENDTIME="Orario di fine eveno"
|
||||
COM_JEM_SUBMIT_REGISTER="Accetta partecipazioni"
|
||||
COM_JEM_SUBMIT_UNREGISTER="Accetta annullamento prenotazioni"
|
||||
COM_JEM_SELECT_IMAGE="Seleziona un'immagine da caricare"
|
||||
COM_JEM_SELECT_IMAGE_EDIT="Immagine. Lascia bianco per utilizzare l'immagine attuale"
|
||||
COM_JEM_MAX_IMAGE_FILE_SIZE="Dimensione massima file immagine"
|
||||
COM_JEM_UPLOAD_IMAGE="Seleziona un'immagine da caricare"
|
||||
COM_JEM_MAX_FILE_SIZE_1="La dimensione del file e` limitata a %d kByte."
|
||||
COM_JEM_DESCRIPTION="Descrizione"
|
||||
COM_JEM_EVENT_DESCRIPTION="Descrizione"
|
||||
COM_JEM_VENUE_DESCRIPTION="Descrizione"
|
||||
COM_JEM_NO_HTML="Codice HTML non consentito!"
|
||||
COM_JEM_AVAILABLE="disponibile"
|
||||
COM_JEM_REFRESH="aggiorna"
|
||||
COM_JEM_DETAILS="Dettagli"
|
||||
COM_JEM_NO_ACCESS="Accesso non consentito"
|
||||
COM_JEM_EVENT="Evento"
|
||||
COM_JEM_WHAT="Cosa"
|
||||
COM_JEM_WHEN="Quando"
|
||||
COM_JEM_WHERE="Dove"
|
||||
COM_JEM_MAP="Mappa"
|
||||
COM_JEM_WEBSITE="Sito web"
|
||||
COM_JEM_STREET="Via"
|
||||
COM_JEM_STATE="Provincia"
|
||||
COM_JEM_ZIP="CAP"
|
||||
COM_JEM_CITY="Località"
|
||||
COM_JEM_SELECT_CITY="Seleziona una Località"
|
||||
COM_JEM_COUNTRY="Nazione"
|
||||
COM_JEM_SELECT_COUNTRY="Seleziona una nazione"
|
||||
COM_JEM_CONTINENT="Continente"
|
||||
COM_JEM_SELECT_CONTINENT="Seleziona un continente"
|
||||
COM_JEM_NO_DESCRIPTION="Spiacente, nessuna descrizione disponibile"
|
||||
COM_JEM_REGISTERED_USERS="Utenti partecipanti"
|
||||
COM_JEM_YOUR_REGISTRATION="Tua registrazione"
|
||||
COM_JEM_YOU_ARE_UNREGISTERED="Non sei ancora registrato. Per iscriverti a questo evento scegli una delle opzioni qui sotto e invia la tua decisione."
|
||||
COM_JEM_YOU_ARE_INVITED="Sei invitato a partecipare a questo evento. Scegli una delle opzioni qui sotto e invia la tua decisione."
|
||||
COM_JEM_YOU_ARE_ATTENDING="Siete registrati come partecipante e sulla lista dei partecipanti.E` possibile modificare la decisione in seguito."
|
||||
COM_JEM_YOU_ARE_ON_WAITINGLIST="Siete registrati come partecipante, ma in lista di attesa. E` possibile modificare la decisione in seguito."
|
||||
COM_JEM_YOU_ARE_NOT_ATTENDING="Siete registrati come non partecipante. E` possibile modificare la decisione in seguito."
|
||||
COM_JEM_I_WILL_GO="Partecipero` a questo evento"
|
||||
COM_JEM_I_WILL_NOT_GO="Non partecipero` a questo evento"
|
||||
COM_JEM_REGISTER="Partecipante"
|
||||
COM_JEM_ALLREADY_REGISTERED="Sei gia` registrato per partecipare a questo evento."
|
||||
COM_JEM_UNREGISTER_BOX="Cancella la partecipazione a questo evento."
|
||||
COM_JEM_UNREGISTER="Cancella partecipazione"
|
||||
COM_JEM_LOGIN_FOR_REGISTER="Devi effettuare il login per partecipare a questo evento."
|
||||
COM_JEM_NEED_LOGGED_IN="Devi essere loggato."
|
||||
COM_JEM_TOO_LATE_REGISTER="E` troppo tardi per partecipare a questo evento."
|
||||
COM_JEM_TOO_LATE_UNREGISTER="Com'e` andata?"
|
||||
COM_JEM_WRONG_STATE_FOR_REGISTER="L'evento deve essere pubblicato per consentire la registrazione."
|
||||
COM_JEM_NOT_ALLOWED_TO_REGISTER="Non hai diritto ad iscriverti a questo evento."
|
||||
COM_JEM_NOT_ALLOWED_TO_ANNULATE="Non e` permesso annullare la registrazione di eventi."
|
||||
COM_JEM_ERROR_ANNULATION_NOT_ALLOWED="ERRORE: Registrazione annullamento non disponibile."
|
||||
COM_JEM_ERROR_REGISTRATION="ERRORE: Registrazione fallita!"
|
||||
COM_JEM_ERROR_ADD_VENUE="ERRORE: aggiungi sede"
|
||||
COM_JEM_ERROR_ADD_STREET="ERRORE: Aggiungi una via!"
|
||||
COM_JEM_ERROR_ADD_ZIP="ERRORE: Aggiungi un CAP!"
|
||||
COM_JEM_ERROR_ADD_CITY="ERRORE: Aggiungi una Località!"
|
||||
COM_JEM_ERROR_ADD_COUNTRY="ERRORE: Aggiungi una nazione!"
|
||||
COM_JEM_WEBSITE_HINT="URL deve essere nel formato http://www.google.com!"
|
||||
COM_JEM_SHOW_EVENTS="Visualizza eventi"
|
||||
COM_JEM_EVENTS="Eventi"
|
||||
COM_JEM_CATEGORY_EMPTY="Seleziona categoria"
|
||||
COM_JEM_IMAGE_EMPTY="Seleziona un'immagine da caricare"
|
||||
COM_JEM_UPLOAD_FAILED_NOT_AN_IMAGE="Caricamento fallito. Il file che stai tentando di caricare non e` un'immagine."
|
||||
COM_JEM_WRONG_IMAGE_FILE_TYPE="Il file deve avere estensione gif, png o jpg"
|
||||
COM_JEM_UPLOAD_FAILED="Caricamento fallito."
|
||||
COM_JEM_IMAGE_FILE_SIZE="Dimensione del file errata"
|
||||
COM_JEM_REMOVE_IMAGE="Rimuovi immagine"
|
||||
COM_JEM_ERROR_ADD_ADDRESS="ERRORE: Inserisci i dettagli dell'indirizzo"
|
||||
COM_JEM_ERROR_NAME_LONG="ERRORE: Nome troppo lungo!"
|
||||
COM_JEM_ERROR_URL_LONG="ERRORE: URL troppo lungo"
|
||||
COM_JEM_ERROR_URL_WRONG_FORMAT="ERRORE: Formato URL non valido!"
|
||||
COM_JEM_ERROR_STREET_LONG="ERRORE: Via troppo lunga!"
|
||||
COM_JEM_ERROR_STATE_LONG="ERRORE: Provincia troppo lunga!"
|
||||
COM_JEM_ERROR_ZIP_LONG="ERRORE: CAP troppo lungo!"
|
||||
COM_JEM_ERROR_CITY_LONG="ERRORE: Località troppo lunga!"
|
||||
COM_JEM_ERROR_COUNTRY_LONG="ERRORE: Nazione troppo lunga!"
|
||||
COM_JEM_INVALID_DATE_REQUESTED_USING_CURRENT="Richiesta data non valida. Utilizza data corrente."
|
||||
COM_JEM_PRINT_DESC="Stampa questa pagina"
|
||||
COM_JEM_EMAIL_DESC="Spedisci ad un amico via E-mail"
|
||||
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;;;;;;;; Submission mailtexts for the administration ;;;;;;;;;;;;;
|
||||
|
||||
COM_JEM_NEW_EVENT_MAIL=" : Nuovo evento"
|
||||
COM_JEM_MAIL_NEW_EVENT="Un nuovo evento e` stato inserito da %s ( %s ) \n\nIndirizzo mail: %s \nIP: %s \nOrario di inserimento: %s \n\nTitolo: %s \nData: %s \nOra: %s \nSede: %s / %s \n\nDescrizione:\n%s \n\n%s"
|
||||
COM_JEM_EDIT_EVENT_MAIL=" : Evendo modificato"
|
||||
COM_JEM_MAIL_EDIT_EVENT="Un evento e` stato modificato da %s ( %s ) \n\nnIndirizzo mail: %s \nIP: %s \nModificato alle: %s \n\nTitolo: %s \nData: %s \nOra: %s \nSede: %s / %s \n\nDescrizione:\n%s \n\n%s"
|
||||
COM_JEM_MAIL_EVENT_PUBLISHED="L'evento da te inviato e` stato pubblicato e può essere visionato cliccando su questo link: %s"
|
||||
COM_JEM_MAIL_EVENT_UNPUBLISHED="L'evento da te inviato e` in attesa di essere approvato dall'amministratore"
|
||||
|
||||
COM_JEM_NEW_VENUE_MAIL=" : Nuova sede"
|
||||
COM_JEM_MAIL_NEW_VENUE="Hai ricevuto un nuovo invio da %s ( %s ) \n\nIndirizzo mail: %s \nIP: %s \nOrario di inserimento: %s \n\nNome: %s \nSito web: %s \nVia: %s \nCAP: %s \nCittà: %s \nProvincia: %s \n\nDescrizione:\n%s \n\n%s"
|
||||
COM_JEM_EDIT_VENUE_MAIL=" : Sede modificata"
|
||||
COM_JEM_MAIL_EDIT_VENUE="Una sede e` stata modificata da %s ( %s ) \n\nIndirizzo mail: %s \nIP: %s \nModificata alle: %s \n\nNome: %s \nSito web: %s \nVia: %s \nCAP: %s \nCittà: %s \nProvincia: %s \n\nDescrizione:\n%s \n\n%s"
|
||||
COM_JEM_MAIL_VENUE_PUBLISHED="La sede da te inviata e` stata pubblicata e può essere visionata cliccando su questo link: %s"
|
||||
COM_JEM_MAIL_VENUE_UNPUBLISHED="La sede da te inviata e` in attesa di essere approvata dall'amministratore"
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;;;;;;;; Submission mailtexts for the user ;;;;;;;;;;;;;
|
||||
|
||||
COM_JEM_NEW_USER_EVENT_MAIL=" : Grazie per aver inviato un evento"
|
||||
COM_JEM_USER_MAIL_NEW_EVENT="Salve %s ( %s ), \n\nAbbiamo ricevuto correttamente il tuo inserimento.\nCon i dettagli:\nOrario di inserimento: %s \n\nTitolo: %s \nData: %s \nOra: %s \nSede: %s / %s \n\nDescrizione:\n%s \n\n%s"
|
||||
COM_JEM_EDIT_USER_EVENT_MAIL=" : Modifica evento"
|
||||
COM_JEM_USER_MAIL_EDIT_EVENT="Salve %s ( %s ), \n\nHai modificato con successo questo evento:\nModificato alle: %s \n\nTitolo: %s \nData: %s \nOra: %s \nSede: %s / %s \n\nDescrizione:\n%s \n\n%s"
|
||||
COM_JEM_USER_MAIL_EVENT_PUBLISHED="L'evento da te inviato e` stato pubblicato e può essere visionato cliccando su questo link: %s"
|
||||
COM_JEM_USER_MAIL_EVENT_UNPUBLISHED="L'evento da te inviato e` in attesa di essere approvato dall'amministratore"
|
||||
|
||||
COM_JEM_USER_NEW_VENUE_MAIL=" : Grazie per aver inviato una sede"
|
||||
COM_JEM_USER_MAIL_NEW_VENUE="Salve %s ( %s ), \n\nAbbiamo ricevuto il tuo inserimento\nCon i dettagli:\nOrario di inserimento: %s \n\nNome: %s \nSito web: %s \nVia: %s \nCAP: %s \nCittà: %s \nProvincia: %s \n\nDescrizione:\n %s \n\n%s"
|
||||
COM_JEM_USER_EDIT_VENUE_MAIL=": Modifica sede"
|
||||
COM_JEM_USER_MAIL_EDIT_VENUE="Salve %s ( %s ), \n\nHai modificato con successo questa sede:\nModificata alle: %s \n\nNome: %s \nSito web: %s \nVia: %s \nCAP: %s \nCittà: %s \nProvincia: %s \n\nDescrizione:\n%s \n\n%s"
|
||||
COM_JEM_USER_MAIL_VENUE_PUBLISHED="La sede da te inviata e` stata pubblicata e può essere visionata cliccando su questo link: %s"
|
||||
COM_JEM_USER_MAIL_VENUE_UNPUBLISHED="La sede da te inviata e` in attesa di essere approvata dall'amministratore"
|
||||
|
||||
COM_JEM_VENUE_SAVED="Sede salvata"
|
||||
COM_JEM_EVENT_SAVED="Evento salvato"
|
||||
COM_JEM_ERROR_TITLE_LONG="ERRORE: il titolo e` troppo lungo o vuoto!"
|
||||
COM_JEM_ARCHIVE="Archivio"
|
||||
COM_JEM_REGISTERED_SUCCESSFULL="Ti sei registrato con successo all'evento."
|
||||
COM_JEM_UNREGISTERED_SUCCESSFULL="Ora non sei più registrato per partecipare a questo evento."
|
||||
COM_JEM_REGISTRATION_THANKS_FOR_RESPONSE="Grazie per la vostra risposta. La vostra decisione e` stata memorizzata."
|
||||
COM_JEM_EDIT_EVENT="Modifica evento"
|
||||
COM_JEM_EDIT_EVENT_DESC="Clicca per aggiungere un evento"
|
||||
COM_JEM_EDIT_VENUE="Modifica sede"
|
||||
COM_JEM_EDIT_VENUE_DESC="Clicca per modificare la sede"
|
||||
COM_JEM_SUBMIT_EVENT_DESC="Clicca per aggiungere un evento"
|
||||
COM_JEM_SHOW_EVENTS_DESC="Clicca per tornare all'evento corrente"
|
||||
COM_JEM_SHOW_ARCHIVE_DESC="Clicca per vedere l'archivio"
|
||||
COM_JEM_ENDDATE="Data termine"
|
||||
COM_JEM_NO_EVENTS="Al momento non sono disponibili eventi"
|
||||
COM_JEM_ADDRESS="Indirizzo"
|
||||
COM_JEM_ADD_VENUE="Aggiungi sede"
|
||||
COM_JEM_ADD_EVENT="Aggiungi evento"
|
||||
COM_JEM_THE_EVENT=" L'evento"
|
||||
COM_JEM_EDITED_BY_ANOTHER_ADMIN="e` attualmente bloccato da un altro editore"
|
||||
COM_JEM_CURRENT_IMAGE="Immagine attuale"
|
||||
COM_JEM_SELECTED_IMAGE="Immagine selezionata"
|
||||
COM_JEM_SELECTVENUE="Seleziona sede"
|
||||
COM_JEM_NO_VENUE="Nessuna sede"
|
||||
COM_JEM_SELECT="Seleziona"
|
||||
COM_JEM_NOTES="Note"
|
||||
COM_JEM_COUNTRY_HINT="CODICE ISO (IT,US,DE,AT,CH, etc.)"
|
||||
COM_JEM_SEARCH="Cerca:"
|
||||
COM_JEM_REGISTRATION="Prenotazioni"
|
||||
COM_JEM_CLICK_TO_ENLARGE="Clicca per ingrandire"
|
||||
COM_JEM_VENUE_NAME_ALREADY_EXIST="La sede: %s esiste già. Scegline un'altra!"
|
||||
COM_JEM_SHOW_USER_PROFILE="Clicca per vedere il profilo dell'utente"
|
||||
|
||||
COM_JEM_METADATA_INFORMATION="Informazioni METADATA"
|
||||
COM_JEM_META_DESCRIPTION="Modifica descrizione"
|
||||
COM_JEM_META_KEYWORDS="Modifica parole"
|
||||
COM_JEM_ADD_VENUE_CITY="Aggungi sede/Località"
|
||||
COM_JEM_ENABLE_MAP="Aggiungi link alla mappa"
|
||||
COM_JEM_ADDRESS_NOTICE="Nota: I campi di indirizzo sono solo opzionali se non si attiva un collegamento alla mappa!"
|
||||
|
||||
;Recurrence
|
||||
COM_JEM_RECURRING_EVENTS="Ripetizione evento"
|
||||
COM_JEM_RECURRING_EVENT="Evento ripetuto"
|
||||
COM_JEM_RECURRING_EVENT_DESC="Questo evento fa parte di una serie di eventi ricorrenti."
|
||||
COM_JEM_RECURRING_FIRST_EVENT_DESC="Questo evento e` il primo di una serie di eventi ricorrenti."
|
||||
COM_JEM_RECURRENCE="Ripetizione"
|
||||
COM_JEM_NOTHING="nessuna"
|
||||
COM_JEM_DAYLY="giornaliera"
|
||||
COM_JEM_WEEKLY="settimanale"
|
||||
COM_JEM_MONTHLY="mensile"
|
||||
COM_JEM_WEEKDAY="i giorni"
|
||||
COM_JEM_OUTPUT_DAY="Ripeti ogni [placeholder] giorno"
|
||||
COM_JEM_OUTPUT_WEEK="Ripeti ogni [placeholder] settimana"
|
||||
COM_JEM_OUTPUT_MONTH="Ripeti ogni [placeholder] mese"
|
||||
COM_JEM_OUTPUT_WEEKDAY="Ripeti ogni [placeholder]. [placeholder_weekday] per mese"
|
||||
COM_JEM_RECURRENCE_COUNTER=" entro fine"
|
||||
COM_JEM_UNLIMITED="illimitatamente"
|
||||
COM_JEM_RECURRING_INFO_TITLE="Impostazioni della ricorrenza attuali (informativa)"
|
||||
|
||||
COM_JEM_LAST=" ultimo"
|
||||
COM_JEM_BEFORE_LAST=" prima dell'ultimo"
|
||||
|
||||
COM_JEM_MONDAY="Lunedi`"
|
||||
COM_JEM_TUESDAY="Martedi`"
|
||||
COM_JEM_WEDNESDAY="Mercoledi`"
|
||||
COM_JEM_THURSDAY="Giovedi`"
|
||||
COM_JEM_FRIDAY="Venerdi`"
|
||||
COM_JEM_SATURDAY="Sabato"
|
||||
COM_JEM_SUNDAY="Domenica"
|
||||
|
||||
COM_JEM_GO="Vai"
|
||||
COM_JEM_RESET="Resetta"
|
||||
COM_JEM_DISPLAY_NUM="Limite"
|
||||
COM_JEM_FILTER="Filtra"
|
||||
|
||||
COM_JEM_PROPOSED_BY="Proposto da"
|
||||
|
||||
COM_JEM_MY_ITEMS="Mio archivio"
|
||||
COM_JEM_MY_EVENTS="Miei eventi"
|
||||
COM_JEM_MY_VENUES="Mie sedi"
|
||||
COM_JEM_NO_VENUES="Nessuna sede"
|
||||
COM_JEM_REGISTERED_TO="Partecipo a"
|
||||
COM_JEM_IMAGE="Immagine"
|
||||
|
||||
;
|
||||
COM_JEM_CALENDAR_SHOWALL="Mostra tutti"
|
||||
COM_JEM_CALENDAR_HIDEALL="Nascondi tutti"
|
||||
|
||||
;
|
||||
COM_JEM_MAX_PLACES="Max posti"
|
||||
COM_JEM_MAX_PLACES_DESC="Descrizione max posti"
|
||||
COM_JEM_ENABLE_WAITINGLIST="Lista d'attesa"
|
||||
COM_JEM_ENABLE_WAITINGLIST_DESC="Abilita lista d'attesa"
|
||||
COM_JEM_EVENT_FULL_REGISTER_TO_WAITING_LIST="Disponibilità posti terminata. Registrati alla lista d'attesa."
|
||||
COM_JEM_EVENT_FULL_NOTICE="Questo evento e` al completo e non c'e` una lista d'attesa disponibile."
|
||||
COM_JEM_BOOKED_PLACES="Posti prenotati"
|
||||
COM_JEM_AVAILABLE_PLACES="Posti disponibili"
|
||||
COM_JEM_WAITINGLIST_UNREGISTER_BOX="Annullare registrazione alla lista d'attesa"
|
||||
|
||||
COM_JEM_SEARCH_FILTER = "Filtra"
|
||||
COM_JEM_SEARCH_RESET = "Resetta"
|
||||
COM_JEM_SEARCH_GO = "Vai"
|
||||
COM_JEM_SEARCH_FROM = "Da"
|
||||
COM_JEM_SEARCH_TO ="A"
|
||||
COM_JEM_SEARCH_SUBMITSEARCH = "Comincia ricerca"
|
||||
COM_JEM_SEARCH_DISPLAYNUM = "Displaynumber"
|
||||
COM_JEM_SEARCH_NOEVENTS = "Nessun evento"
|
||||
COM_JEM_SEARCH_OPENDATE = "Apri data"
|
||||
COM_JEM_SEARCH_DATE = "Data"
|
||||
COM_JEM_SEARCH_SUBMIT="Cerca"
|
||||
COM_JEM_WAITINGLIST_UNREGISTER_BOX_ONWAITINGLIST="In lista d'attesa"
|
||||
|
||||
;Custom Fields
|
||||
COM_JEM_EVENT_CUSTOM_FIELD1="Evento: Campo Personalizzato 1"
|
||||
COM_JEM_EVENT_CUSTOM_FIELD2="Evento: Campo Personalizzato 2"
|
||||
COM_JEM_EVENT_CUSTOM_FIELD3="Evento: Campo Personalizzato 3"
|
||||
COM_JEM_EVENT_CUSTOM_FIELD4="Evento: Campo Personalizzato 4"
|
||||
COM_JEM_EVENT_CUSTOM_FIELD5="Evento: Campo Personalizzato 5"
|
||||
COM_JEM_EVENT_CUSTOM_FIELD6="Evento: Campo Personalizzato 6"
|
||||
COM_JEM_EVENT_CUSTOM_FIELD7="Evento: Campo Personalizzato 7"
|
||||
COM_JEM_EVENT_CUSTOM_FIELD8="Evento: Campo Personalizzato 8"
|
||||
COM_JEM_EVENT_CUSTOM_FIELD9="Evento: Campo Personalizzato 9"
|
||||
COM_JEM_EVENT_CUSTOM_FIELD10="Evento: Campo Personalizzato 10"
|
||||
COM_JEM_EVENT_CUSTOM_FIELD1_DESC="Evento: Descrizione Campo Personalizzato 1"
|
||||
COM_JEM_EVENT_CUSTOM_FIELD2_DESC="Evento: Descrizione Campo Personalizzato 2"
|
||||
COM_JEM_EVENT_CUSTOM_FIELD3_DESC="Evento: Descrizione Campo Personalizzato 3"
|
||||
COM_JEM_EVENT_CUSTOM_FIELD4_DESC="Evento: Descrizione Campo Personalizzato 4"
|
||||
COM_JEM_EVENT_CUSTOM_FIELD5_DESC="Evento: Descrizione Campo Personalizzato 5"
|
||||
COM_JEM_EVENT_CUSTOM_FIELD6_DESC="Evento: Descrizione Campo Personalizzato 6"
|
||||
COM_JEM_EVENT_CUSTOM_FIELD7_DESC="Evento: Descrizione Campo Personalizzato 7"
|
||||
COM_JEM_EVENT_CUSTOM_FIELD8_DESC="Evento: Descrizione Campo Personalizzato 8"
|
||||
COM_JEM_EVENT_CUSTOM_FIELD9_DESC="Evento: Descrizione Campo Personalizzato 9"
|
||||
COM_JEM_EVENT_CUSTOM_FIELD10_DESC="Evento: Descrizione Campo Personalizzato 10"
|
||||
|
||||
COM_JEM_VENUE_CUSTOM_FIELD1="Sede: Campo Personalizzato 1"
|
||||
COM_JEM_VENUE_CUSTOM_FIELD2="Sede: Campo Personalizzato 2"
|
||||
COM_JEM_VENUE_CUSTOM_FIELD3="Sede: Campo Personalizzato 3"
|
||||
COM_JEM_VENUE_CUSTOM_FIELD4="Sede: Campo Personalizzato 4"
|
||||
COM_JEM_VENUE_CUSTOM_FIELD5="Sede: Campo Personalizzato 5"
|
||||
COM_JEM_VENUE_CUSTOM_FIELD6="Sede: Campo Personalizzato 6"
|
||||
COM_JEM_VENUE_CUSTOM_FIELD7="Sede: Campo Personalizzato 7"
|
||||
COM_JEM_VENUE_CUSTOM_FIELD8="Sede: Campo Personalizzato 8"
|
||||
COM_JEM_VENUE_CUSTOM_FIELD9="Sede: Campo Personalizzato 9"
|
||||
COM_JEM_VENUE_CUSTOM_FIELD10="Sede: Campo Personalizzato 10"
|
||||
COM_JEM_VENUE_CUSTOM_FIELD1_DESC="Sede: Descrizione Campo Personalizzato 1"
|
||||
COM_JEM_VENUE_CUSTOM_FIELD2_DESC="Sede: Descrizione Campo Personalizzato 2"
|
||||
COM_JEM_VENUE_CUSTOM_FIELD3_DESC="Sede: Descrizione Campo Personalizzato 3"
|
||||
COM_JEM_VENUE_CUSTOM_FIELD4_DESC="Sede: Descrizione Campo Personalizzato 4"
|
||||
COM_JEM_VENUE_CUSTOM_FIELD5_DESC="Sede: Descrizione Campo Personalizzato 5"
|
||||
COM_JEM_VENUE_CUSTOM_FIELD6_DESC="Sede: Descrizione Campo Personalizzato 6"
|
||||
COM_JEM_VENUE_CUSTOM_FIELD7_DESC="Sede: Descrizione Campo Personalizzato 7"
|
||||
COM_JEM_VENUE_CUSTOM_FIELD8_DESC="Sede: Descrizione Campo Personalizzato 8"
|
||||
COM_JEM_VENUE_CUSTOM_FIELD9_DESC="Sede: Descrizione Campo Personalizzato 9"
|
||||
COM_JEM_VENUE_CUSTOM_FIELD10_DESC="Sede: Descrizione Campo Personalizzato 10"
|
||||
|
||||
|
||||
COM_JEM_EVENT_FILES="Files"
|
||||
COM_JEM_FILES="Files"
|
||||
|
||||
COM_JEM_EVENT_ATTACHMENTS_TAB="Allegati"
|
||||
|
||||
COM_JEM_ATTACHMENT_FILE="File"
|
||||
COM_JEM_ATTACHMENT_NAME="Nome"
|
||||
COM_JEM_ATTACHMENT_DESCRIPTION="Descrizione"
|
||||
COM_JEM_ATTACHMENT_ACCESS="Accesso"
|
||||
|
||||
COM_JEM_PLEASE_LOGIN="Per piacere, effettua il login per inserire un evento"
|
||||
COM_JEM_LINK="Link"
|
||||
COM_JEM_NUM="num"
|
||||
COM_JEM_CALENDAR_ANDMORE="e altro..."
|
||||
COM_JEM_ERROR_ATTACHEMENT_EXTENSION_NOT_ALLOWED="Estensione non consentita"
|
||||
COM_JEM_PRINT="Stampa"
|
||||
|
||||
|
||||
COM_JEM_ERROR_ATTACHEMENT_FILE_TOO_BIG="La dimensione dell'allegato e` troppo grande"
|
||||
COM_JEM_DOWNLOAD="Download"
|
||||
|
||||
COM_JEM_ICAL="iCalendar"
|
||||
COM_JEM_ICAL_DESC="Scarica il file iCalendar"
|
||||
COM_JEM_CATEGORIES="Categorie"
|
||||
COM_JEM_LOCATION="Location"
|
||||
COM_JEM_SUBCATEGORIES="Sotto categorie"
|
||||
|
||||
COM_JEM_SHOWALL="Mostra tutto"
|
||||
COM_JEM_HIDEALL="Nascondi tutto"
|
||||
|
||||
;
|
||||
COM_JEM_EXPORT_ICS="Esporta ICS"
|
||||
COM_JEM_ICS_LINK="Link"
|
||||
COM_JEM_LATITUDE="Latitudine"
|
||||
COM_JEM_LATITUDE_HINT="Suggerimento latitudine"
|
||||
COM_JEM_LONGITUDE="Longitudine"
|
||||
COM_JEM_LONGITUDE_HINT="Suggerimento longitudine"
|
||||
COM_JEM_NO_IMAGE="Nessuna immagine"
|
||||
COM_JEM_WRONG_URL_FORMAT="Formato URL non valido"
|
||||
COM_JEM_MAX_PLACES_DESC="Descrizione max posti"
|
||||
|
||||
COM_JEM_OPEN_DATE="Open Date"
|
||||
COM_JEM_CONTACT="Informazioni contatto"
|
||||
COM_JEM_TELEPHONE="Telefono"
|
||||
|
||||
COM_JEM_TABLE_EVENTIMAGE="Immagine evento"
|
||||
COM_JEM_TABLE_DATE="Data"
|
||||
COM_JEM_TABLE_TITLE="Titolo"
|
||||
COM_JEM_TABLE_LOCATION="Sede"
|
||||
COM_JEM_TABLE_CITY="Località"
|
||||
COM_JEM_TABLE_STATE="Nazione"
|
||||
COM_JEM_TABLE_CATEGORY="Categoria"
|
||||
COM_JEM_TABLE_ATTENDEES="Partecipanti"
|
||||
|
||||
COM_JEM_FORMAT_SHORT_DATE="g.m.a"
|
||||
COM_JEM_CUSTOM_FIELDS="Campi personalizzati"
|
||||
COM_JEM_ADD_ZIP="Aggiungi CAP"
|
||||
|
||||
COM_JEM_META_HANDLING="Opzioni Meta"
|
||||
|
||||
COM_JEM_META_KEYWORDS_DESC="Per selezione multipla tenere premuto il tasto Ctrl."
|
||||
|
||||
COM_JEM_META_DESCRIPTION_DESC="Con questo editor puoi creare la metadescrizione. Usa il bottone Suggerisci se hai bisogno di un esempio."
|
||||
COM_JEM_META_DESCRIPTION_STANDARD="L'evento [title] inizia il [dates]!"
|
||||
COM_JEM_META_DESCRIPTION_BUTTON="Suggerimento"
|
||||
COM_JEM_META_ERROR="Scegli una casella di input, dopo di che e` possibile utilizzare i pulsanti per le parole chiave"
|
||||
COM_JEM_META_DESCRIPTION_WARN="Si prega di non utilizzare virgolette o caratteri di quotazione nella descrizione, questo genererà errori HTML"
|
||||
|
||||
COM_JEM_EVENT_INFO_TAB="Tab info"
|
||||
COM_JEM_EVENT_MAIN_TAB="Tab principale"
|
||||
COM_JEM_EVENT_SECOND_TAB="Tab secondario"
|
||||
|
||||
|
||||
COM_JEM_EVENT_UNPUBLISHED="Evento/i sospeso/i con successo"
|
||||
COM_JEM_EVENT_PUBLISHED="Evento/i pubblicato/i con successo"
|
||||
COM_JEM_EVENT_TRASHED="Eventi cancellati"
|
||||
COM_JEM_VENUE_UNPUBLISHED="Sede(i) correttamente non pubblicata "
|
||||
COM_JEM_VENUE_PUBLISHED="Sede(i) pubblicata correttamente"
|
||||
COM_JEM_VENUE_TRASHED="Sede cestinata"
|
||||
;TODO: No COM_JEM_ prefix here?
|
||||
JGLOBAL_CHECK_ALL="Seleziona tutti"
|
||||
JGRID_CHECKBOX_ROW_N="Casella di controllo per la riga %d"
|
||||
|
||||
;Registered Users
|
||||
COM_JEM_REGISTERED_USER="Utenti registrati"
|
||||
COM_JEM_NAME="Nome"
|
||||
COM_JEM_USERNAME="Nome utente"
|
||||
COM_JEM_EMAIL="E-mail"
|
||||
COM_JEM_IP_ADDRESS="Indirizzo IP"
|
||||
COM_JEM_REGDATE="Data di Registrazione"
|
||||
COM_JEM_USER_ID="ID utente"
|
||||
COM_JEM_COMMENT="Commento"
|
||||
COM_JEM_OPTIONAL_COMMENT="Commento opzionale"
|
||||
COM_JEM_REMOVE_USER="Rimuovi utente"
|
||||
COM_JEM_REGISTERED_USERS_ADDED="Utente(i) aggiunti"
|
||||
COM_JEM_REGISTERED_USERS_DELETED="Utente/i eliminato/i"
|
||||
COM_JEM_SELECT_ITEM_TO_ADD="Seleziona una voce da aggiungere."
|
||||
COM_JEM_SELECT_ITEM_TO_DELETE="Seleziona una voce da eliminare."
|
||||
COM_JEM_CSV_EXPORT="Esporta CSV"
|
||||
COM_JEM_ADD_USER_REGISTRATIONS="Aggiungi"
|
||||
COM_JEM_ADD_USER_REGISTRATIONS_DESC="Aggiungere utenti non in grado di registrarsi."
|
||||
|
||||
COM_JEM_ATT_FILTER_ALL="Tutti"
|
||||
COM_JEM_ATT_FILTER_INVITED="Invitati"
|
||||
COM_JEM_ATT_FILTER_NOT_ATTENDING="Non partecipera`"
|
||||
COM_JEM_ATT_FILTER_ATTENDING="Partecipanti"
|
||||
COM_JEM_ATT_FILTER_WAITING="In attesa"
|
||||
COM_JEM_EDIT_ATTENDEE="Modifica utenti in attesa"
|
||||
COM_JEM_STATUS="Stato"
|
||||
COM_JEM_STATUS_DESC="Scegli lo stato degli utenti che deve essere registrato."
|
||||
COM_JEM_HEADER_WAITINGLIST_STATUS="Stato"
|
||||
COM_JEM_STATUS_UNKNOWN="Lo stato della registrazione e` sconosciuto"
|
||||
COM_JEM_INVITED="L'utente e` invitato"
|
||||
COM_JEM_ATTENDING="L'utente partecipera`"
|
||||
COM_JEM_ATTENDING_MOVE_TO_WAITINGLIST="Utente partecipera` <br>Clicca per spostare l'utente in lista d'attesa."
|
||||
COM_JEM_NOT_ATTENDING="L'utente non partecipera`"
|
||||
COM_JEM_ON_WAITINGLIST="L'utente e` in lista d'attesa"
|
||||
COM_JEM_ON_WAITINGLIST_MOVE_TO_ATTENDING="L'utente e` in lista d'attesa<br>Clicca per spostare l'utente nella lista dei partecipanti."
|
||||
COM_JEM_ADDED_TO_ATTENDING="L'utente e` stato aggiunto alla lista dei partecipanti."
|
||||
COM_JEM_ADDED_TO_WAITING="Utente e` stato aggiunto alla lista di attesa."
|
||||
COM_JEM_WAITINGLIST_TOGGLE_ERROR="Errore durante lo stato di registrazione."
|
||||
COM_JEM_NO_WAITINGLIST="Nessuna lista d'attesa disponibile."
|
||||
|
||||
COM_JEM_DISPLAY_ATTENDEECOLUMN="Visualizza partecipanti nel frontend"
|
||||
COM_JEM_DISPLAY_ATTENDEECOLUMN_DESC="Vuoi mostrare la colonna dei partecipanti?"
|
||||
|
||||
|
||||
; Calendar View
|
||||
COM_JEM_AND_MORE="e altro..."
|
||||
|
||||
; My-Events View
|
||||
COM_JEM_MYEVENT_MANAGEATTENDEES="Gestisci utenti in attesa"
|
||||
|
||||
; General, used in my-events/attendees
|
||||
COM_JEM_PUBLISH="Pubblicato"
|
||||
COM_JEM_PUBLISH_DESC="Pubblicato"
|
||||
COM_JEM_TRASH="Cestino"
|
||||
COM_JEM_TRASH_DESC="Cestino"
|
||||
COM_JEM_UNPUBLISH="Sospeso"
|
||||
COM_JEM_UNPUBLISH_DESC="Sospeso"
|
||||
COM_JEM_BACK="Indietro"
|
||||
COM_JEM_EXPORT="Esporta"
|
||||
COM_JEM_EXPORT_DESC="Esporta per usare facilmente il file csv"
|
||||
|
||||
; Attendees View
|
||||
COM_JEM_ATTENDEES_ATTENDING="Partecipanti"
|
||||
COM_JEM_ATTENDEES_ON_WAITINGLIST="In lista d'attesa"
|
||||
COM_JEM_ATTENDEES_NOT_ATTENDING="Non partecipera`"
|
||||
COM_JEM_ATTENDEES_INVITED="Invitati"
|
||||
COM_JEM_ATTENDEES_STATUS_UNKNOWN="Stato sconosciuto"
|
||||
COM_JEM_ATTENDEES_DELETE="Cancella utente"
|
||||
|
||||
; Venue View
|
||||
COM_JEM_DELIVER_NEW_VENUE_DESC="Clicca per aggiungere una sede"
|
||||
|
||||
; Controller
|
||||
COM_JEM_SELECT_ITEM_TO_PUBLISH="Seleziona una voce da pubblicare"
|
||||
COM_JEM_SELECT_ITEM_TO_UNPUBLISH="Seleziona una voce da sospendere"
|
||||
COM_JEM_SELECT_ITEM_TO_TRASH="Seleziona una voce da eliminare"
|
||||
|
||||
|
||||
; Week Calendar
|
||||
COM_JEM_WKCAL_WEEK="Settimana"
|
||||
|
||||
; Editevent
|
||||
COM_JEM_NOVENUE=" Nessuna sede"
|
||||
COM_JEM_EDITEVENT_FIELD_DESCRIPTION="Descrizione"
|
||||
COM_JEM_EDITEVENT_FIELD_DESCRIPTION_DESC="Descrizione"
|
||||
COM_JEM_EDITEVENT_NOTICE_GENSHIELD="Avviso: Generazione protezione e` impostato su <b> %s </ b>"
|
||||
COM_JEM_EDITEVENT_WARN_RECURRENCE_TITLE="ATTENZIONE!"
|
||||
COM_JEM_EDITEVENT_WARN_RECURRENCE_TEXT="Questo evento e` il primo di una serie di eventi ricorrenti. Se salvi questo evento l'impostazione si annulla, anche se si salva senza aver fatto modifiche. <br> Se si sceglie la ripetizione di questo evento verrà creata una nuova serie di eventi ricorrenti"
|
||||
COM_JEM_EDITEVENT_WARN_RECURRENCE_FIRST_TEXT="Questo evento e` il primo di una serie di eventi ricorrenti. Se salvi questo evento l'impostazione si annullao. Anche se si salva senza aver fatto modifiche. <br> Se si sceglie la ripetizione di questo evento verra` creata una nuova serie di eventi ricorrenti"
|
||||
COM_JEM_NOVENUES="Nessuna sede trovata."
|
||||
COM_JEM_NOCONTACTS="Nessun contatto trovato."
|
||||
COM_JEM_NOUSERS="Nessun utente trovato."
|
||||
|
||||
; Search
|
||||
COM_JEM_AFRICA="Africa"
|
||||
COM_JEM_ASIA="Asia"
|
||||
COM_JEM_OCEANIA="Oceania"
|
||||
COM_JEM_NORTH_AMERICA="Nord America"
|
||||
COM_JEM_SOUTH_AMERICA="Sud America"
|
||||
COM_JEM_ANTARCTICA="Antartide"
|
||||
COM_JEM_EUROPE="Europa"
|
||||
|
||||
COM_JEM_DEFAULT_PAGE_TITLE_DAY="Giorno"
|
||||
|
||||
|
||||
; EVENT-View
|
||||
COM_JEM_EVENT_HITS_LABEL="Visitato"
|
||||
COM_JEM_EVENT_HITS="%s"
|
||||
COM_JEM_EVENT_CREATED_BY_LABEL="Creato da"
|
||||
COM_JEM_EVENT_CREATED_BY="%s"
|
||||
COM_JEM_EVENT_READ_MORE="Leggi altro:"
|
||||
COM_JEM_EVENT_READ_MORE_TITLE="Leggi altro..."
|
||||
COM_JEM_EVENT_REGISTER_TO_READ_MORE="Effettua il login per leggere maggiori dettagli."
|
||||
COM_JEM_EVENT_CONTACT="%s"
|
||||
|
||||
; EDITEVENT-View
|
||||
COM_JEM_EDITEVENT_FIELD_CATEGORIES="Categorie"
|
||||
COM_JEM_EDITEVENT_FIELD_CATEGORIES_DESC="Seleziona categoria"
|
||||
COM_JEM_EDITEVENT_FIELD_EVENT_TITLE="Titolo"
|
||||
COM_JEM_EDITEVENT_FIELD_EVENT_TITLE_DESC="Questo e` il titolo dell'evento che verrà mostrato"
|
||||
COM_JEM_EDITEVENT_FIELD_CONTACT="Contatto"
|
||||
COM_JEM_EDITEVENT_FIELD_CONTACT_DESC="Seleziona contatto"
|
||||
COM_JEM_EDITEVENT_FIELD_DATE="Data iniziale"
|
||||
COM_JEM_EDITEVENT_FIELD_DATE_DESC="Seleziona data iniziale"
|
||||
COM_JEM_EDITEVENT_FIELD_ENDDATE="Data finale"
|
||||
COM_JEM_EDITEVENT_FIELD_ENDDATE_DESC="Seleziona data finale"
|
||||
COM_JEM_EDITEVENT_FIELD_END_TIME="Orario finale"
|
||||
COM_JEM_EDITEVENT_FIELD_END_TIME_DESC="Seleziona orario finale"
|
||||
COM_JEM_EDITEVENT_FIELD_EVENTTEXT_DESC="JEM EDITEVENT FIELD EVENTTEXT DESC"
|
||||
COM_JEM_EDITEVENT_FIELD_EVENTTEXT_LABEL="Descrizione"
|
||||
COM_JEM_EDITEVENT_FIELD_EVENT_TIME="Orario iniziale"
|
||||
COM_JEM_EDITEVENT_FIELD_EVENT_TIME_DESC="Seleziona orario iniziale"
|
||||
COM_JEM_EDITEVENT_FIELD_FEATURED_DESC="Segna questo evento come evento in primo piano"
|
||||
COM_JEM_EDITEVENT_FIELD_PUBLISHED_DESC="Imposta lo stato dell'evento"
|
||||
COM_JEM_EDITEVENT_FIELD_VENUE="Sede"
|
||||
COM_JEM_EDITEVENT_FIELD_VENUE_DESC="Seleziona sede"
|
||||
COM_JEM_EDITEVENT_FIELD_ALIAS="Alias"
|
||||
COM_JEM_EDITEVENT_FIELD_ALIAS_DESC="Alias"
|
||||
COM_JEM_EDITEVENT_EDIT_EVENT = "Modifica evento: %s"
|
||||
COM_JEM_EDITEVENT_ADD_EVENT = "Aggiungi evento"
|
||||
COM_JEM_EDITEVENT_INFO_TAB="Evento"
|
||||
COM_JEM_EDITEVENT_DETAILS_LEGEND="Dettagli"
|
||||
COM_JEM_EDITEVENT_FIELD_ENABLE_REGISTRATION="Registrazione"
|
||||
COM_JEM_EDITEVENT_FIELD_ENABLE_REGISTRATION_DESC="Quando l'utente abilitato può registrarsi all'evento"
|
||||
COM_JEM_EDITEVENT_FIELD_ENABLE_ANNULATION="Accetta annullamenti"
|
||||
COM_JEM_EDITEVENT_FIELD_ENABLE_ANNULATION_DESC="Quando l'utente abilitato puo` annulare una registrazione per l'evento. Puo` essere Sì, No o fino a N ore prima dell'evento."
|
||||
COM_JEM_EDITEVENT_FIELD_ANNULATION_UNTIL="Fino a "
|
||||
COM_JEM_EDITEVENT_FIELD_ANNULATION_UNTIL_DESC="Numero di ore prima dell'inizio dell'evento entro le quali sono permessi annullamenti."
|
||||
COM_JEM_EDITEVENT_FIELD_ANNULATION_UNTIL_POSTFIX="ore prima dell'inizio dell'evento"
|
||||
COM_JEM_UNTIL="Fino a "
|
||||
COM_JEM_INVITED_USERS_ONLY="Solo gli utenti invitati"
|
||||
COM_JEM_EDITEVENT_FIELD_REG_INVITED_ONLY="Solo gli utenti invitati"
|
||||
COM_JEM_EDITEVENT_FIELD_REG_INVITED_ONLY_DESC="Limitare la registrazione per invitare gli utenti."
|
||||
COM_JEM_EDITEVENT_FIELD_ENABLE_UNREGISTRATION="Annullamento della registrazione"
|
||||
COM_JEM_EDITEVENT_FIELD_ENABLE_UNREGISTRATION_DESC="OBSOLETO - Consentire alle persone registrate di annullare la registrazione all'evento"
|
||||
COM_JEM_EDITEVENT_FIELD_MAX_PLACES="Massimo numero di posti disponibili"
|
||||
COM_JEM_EDITEVENT_FIELD_MAX_PLACES_DESC="Qui puoi selezionare i posti disponibili, i restanti verranno inseriti in lista d'attesa, se abilitata"
|
||||
COM_JEM_EDITEVENT_FIELD_INVITED_USERS="Utenti invitati"
|
||||
COM_JEM_EDITEVENT_FIELD_INVITED_USERS_DESC="Numero utenti invitati. Clicca su Seleziona per invitare utenti."
|
||||
COM_JEM_EDITEVENT_FIELD_BOOKED_PLACES="Posti prenotati"
|
||||
COM_JEM_EDITEVENT_FIELD_BOOKED_PLACES_DESC="Numero di posti utenti gia` registrati."
|
||||
COM_JEM_EDITEVENT_FIELD_AVAILABLE_PLACES="Posti disponibili"
|
||||
COM_JEM_EDITEVENT_FIELD_AVAILABLE_PLACES_DESC="Numero di posti liberi."
|
||||
COM_JEM_EDITEVENT_FIELD_ENABLE_WAITINGLIST="Abilita lista d'attesa"
|
||||
COM_JEM_EDITEVENT_FIELD_ENABLE_WAITINGLIST_DESC="Se abilitata "_QQ_"partecipanti numerosi"_QQ_" saranno memorizzati in lista d'attesa e automaticamente trasferiti alla lista dei partecipanti quando un posto sara` disponibile."
|
||||
COM_JEM_EDITEVENT_FIELD_RECURRENCE="Ricorrenza"
|
||||
COM_JEM_EDITEVENT_FIELD_RECURRENCE_DESC="Ricorrenza"
|
||||
COM_JEM_EDITEVENT_FIELD_RECURRENCE_COUNTER="Contatore ricorrenze"
|
||||
COM_JEM_EDITEVENT_FIELD_RECURRENCE_COUNTER_DESC=""
|
||||
|
||||
; EDITVENUE-View
|
||||
COM_JEM_EDITVENUE_INFO_TAB="Dettagli"
|
||||
COM_JEM_EDITVENUE_ATTACHMENTS_TAB="Allegati"
|
||||
COM_JEM_EDITVENUE_OTHER_TAB="Altro"
|
||||
COM_JEM_EDITVENUE_CUSTOMFIELDS="Campi personalizzati"
|
||||
COM_JEM_GEODATA="Geodata/dati geografici"
|
||||
COM_JEM_EDITVENUE_VENUE_EDIT="Modifica Sede: %s"
|
||||
COM_JEM_EDITVENUE_DETAILS_LEGEND="Indirizzo"
|
||||
COM_JEM_EDITVENUE_VENUE_ADD="Inserisci nuova sede"
|
||||
COM_JEM_EDITVENUE_FIELD_ALIAS="Alias"
|
||||
COM_JEM_EDITVENUE_FIELD_ALIAS_DESC="Alias"
|
||||
COM_JEM_VENUE_ADDRPLACEHOLDER="Digitare l'indirizzo"
|
||||
COM_JEM_VENUE_ADDR_FINDVENUEDATA="Cerca per dati sede"
|
||||
COM_JEM_VENUE_COPY_DATA="Copiare tutti i dati"
|
||||
COM_JEM_VENUE_COPY_ADDRESS="Copiare indirizzo"
|
||||
COM_JEM_VENUE_COPY_VENUE="Copiare sede"
|
||||
COM_JEM_VENUE_COPY_COORDINATES="Copiare coordinate"
|
||||
|
||||
|
||||
; ERRORS
|
||||
COM_JEM_EVENT_ERROR_END_BEFORE_START="L'evento deve cominciare prima di finire"
|
||||
COM_JEM_EVENT_ERROR_NAME="Compilare: titolo"
|
||||
COM_JEM_EVENT_ERROR_EVENT_NOT_FOUND="Evento non trovato!"
|
||||
COM_JEM_VENUE_ERROR_CITY="Località troppo lunga"
|
||||
COM_JEM_VENUE_ERROR_COUNTRY="Nazione troppo lunga"
|
||||
COM_JEM_VENUE_ERROR_MAP_ADDRESS="Controlla di aver compilato in questi campi: via, Località, Provincia, CAP"
|
||||
COM_JEM_VENUE_ERROR_NAME="Manca il nome della sede"
|
||||
COM_JEM_VENUE_ERROR_POSTALCODE="CAP troppo lungo"
|
||||
COM_JEM_VENUE_ERROR_STREET="Via troppo lunga"
|
||||
COM_JEM_VENUE_ERROR_STATE="Provincia troppo lunga"
|
||||
COM_JEM_VENUE_ERROR_URL_FORMAT="Il formato della Url e` errato"
|
||||
COM_JEM_VENUE_ERROR_URL_LENGTH="URL troppo lungo"
|
||||
COM_JEM_VENUE_ERROR_VENUE_NOT_FOUND="Sede non trovata!"
|
||||
|
||||
COM_JEM_WRITTEN_BY="Scritto da %s"
|
||||
COM_JEM_SELECT_CONTACT="Si prega di selezionare un contatto!"
|
||||
COM_JEM_METADATA="Meta data"
|
||||
COM_JEM_ATTACHMENTS_LEGEND="Allegati"
|
||||
COM_JEM_EVENT_OTHER_TAB="Altro"
|
||||
COM_JEM_EVENT_CUSTOMFIELDS_LEGEND="Campi personalizzati"
|
||||
COM_JEM_EVENT_REGISTRATION_LEGEND="Registrazione"
|
||||
COM_JEM_NOCONTACT="Nessun contatto"
|
||||
COM_JEM_COUNTRY_DESC="Nazione che verra` mostrata"
|
||||
COM_JEM_WEBSITE_DESC="Formato come http://www.website.uk"
|
||||
|
||||
COM_JEM_GLOBAL_CHECKED_OUT_BY="Controllato da %s"
|
||||
COM_JEM_FILE="File"
|
||||
COM_JEM_FILE_NAME="Nome del file"
|
||||
COM_JEM_FILE_DESCRIPTION="Descrizione"
|
||||
|
||||
COM_JEM_FIELD_METADESCRIPTION_DESC="Qui puoi inserire una meta-descrizione"
|
||||
COM_JEM_FIELD_METAKEYWORDS_DESC="Qui puoi inserire le parole chiave"
|
||||
COM_JEM_VENUE_DESCRIPTION_DESC="Qui e` possibile compilare una descrizione per la sede"
|
||||
|
||||
COM_JEM_CATEGORY_ERROR_404="Categoria #%d Non trovata"
|
||||
|
||||
|
||||
|
||||
COM_JEM_VENUES_EVENTS_ARCHIVED="Eventi-Archiviati"
|
||||
COM_JEM_VENUES_EVENTS_PUBLISHED="Eventi-Pubblicati"
|
||||
|
||||
|
||||
; GLOBAL
|
||||
COM_JEM_GLOBAL_MAILERPLUGIN_DISABLED="Plugin Mailer non e` attivo. <br />Pertanto si avvisa che nessuna E-mail e` stata inviata."
|
||||
COM_JEM_GLOBAL_REMOVE_ATTACHEMENT="Rimuovi allegato"
|
||||
204
components/com_jem/models/attendee.php
Normal file
204
components/com_jem/models/attendee.php
Normal file
@ -0,0 +1,204 @@
|
||||
<?php
|
||||
/**
|
||||
* @package JEM
|
||||
* @copyright (C) 2013-2024 joomlaeventmanager.net
|
||||
* @copyright (C) 2005-2009 Christoph Lukes
|
||||
* @license https://www.gnu.org/licenses/gpl-3.0 GNU/GPL
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\MVC\Model\BaseDatabaseModel;
|
||||
use Joomla\CMS\Table\Table;
|
||||
use Joomla\CMS\Language\Text;
|
||||
|
||||
/**
|
||||
* JEM Component attendee Model
|
||||
*
|
||||
* @package JEM
|
||||
*
|
||||
*/
|
||||
class JemModelAttendee extends BaseDatabaseModel
|
||||
{
|
||||
/**
|
||||
* Attendee id
|
||||
*
|
||||
* @var int
|
||||
*/
|
||||
protected $_id = null;
|
||||
|
||||
/**
|
||||
* Attendee data array
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $_data = null;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
|
||||
$settings = JemHelper::globalattribs();
|
||||
$this->regname = $settings->get('global_regname','1');
|
||||
|
||||
$array = Factory::getApplication()->input->get('cid', array(0), 'array');
|
||||
$this->setId((int)$array[0]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to set the identifier
|
||||
*
|
||||
* @access public
|
||||
* @param int attendee/registration identifier
|
||||
*/
|
||||
public function setId($id)
|
||||
{
|
||||
// Set category id and wipe data
|
||||
$this->_id = $id;
|
||||
$this->_data = null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to get attendee data
|
||||
*
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function getData()
|
||||
{
|
||||
if (!$this->_loadData()) {
|
||||
$this->_initData();
|
||||
}
|
||||
|
||||
return $this->_data;
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to load attendee data
|
||||
*
|
||||
* @access protected
|
||||
* @return boolean True on success
|
||||
*/
|
||||
protected function _loadData()
|
||||
{
|
||||
// Lets load the content if it doesn't already exist
|
||||
if (empty($this->_data))
|
||||
{
|
||||
$query = 'SELECT r.*, ' . ($this->regname ? 'u.name' : 'u.username') . ' AS username '
|
||||
. ' FROM #__jem_register AS r '
|
||||
. ' LEFT JOIN #__users AS u ON u.id = r.uid '
|
||||
. ' WHERE r.id = '.$this->_db->quote($this->_id)
|
||||
;
|
||||
$this->_db->setQuery($query);
|
||||
$this->_data = $this->_db->loadObject();
|
||||
|
||||
return (boolean) $this->_data;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to initialise attendee data
|
||||
*
|
||||
* @access protected
|
||||
* @return boolean True on success
|
||||
*/
|
||||
protected function _initData()
|
||||
{
|
||||
// Lets load the content if it doesn't already exist
|
||||
if (empty($this->_data)) {
|
||||
$data = Table::getInstance('jem_register', '');
|
||||
$data->username = null;
|
||||
$this->_data = $data;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public function toggle()
|
||||
{
|
||||
$attendee = $this->getData();
|
||||
|
||||
if (!$attendee->id) {
|
||||
$this->setError(Text::_('COM_JEM_MISSING_ATTENDEE_ID'));
|
||||
return false;
|
||||
}
|
||||
|
||||
$row = Table::getInstance('jem_register', '');
|
||||
$row->bind($attendee);
|
||||
$row->waiting = $attendee->waiting ? 0 : 1;
|
||||
|
||||
return $row->store();
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to store the attendee
|
||||
*
|
||||
* @access public
|
||||
* @return boolean True on success
|
||||
*/
|
||||
public function store($data)
|
||||
{
|
||||
$eventid = $data['event'];
|
||||
|
||||
$row = $this->getTable('jem_register', '');
|
||||
|
||||
// bind it to the table
|
||||
if (!$row->bind($data)) {
|
||||
\Joomla\CMS\Factory::getApplication()->enqueueMessage($this->_db->getErrorMsg(), 'error');
|
||||
return false;
|
||||
}
|
||||
|
||||
// sanitise id field
|
||||
$row->id = (int) $row->id;
|
||||
|
||||
// Are we saving from an item edit?
|
||||
if (!$row->id) {
|
||||
$row->uregdate = gmdate('Y-m-d H:i:s');
|
||||
|
||||
$query = ' SELECT e.maxplaces, e.waitinglist, COUNT(r.id) as booked '
|
||||
. ' FROM #__jem_events AS e '
|
||||
. ' INNER JOIN #__jem_register AS r ON r.event = e.id '
|
||||
. ' WHERE e.id = ' . $this->_db->Quote($eventid)
|
||||
. ' AND r.status = 1 AND r.waiting = 0 '
|
||||
. ' GROUP BY e.id ';
|
||||
$this->_db->setQuery($query);
|
||||
$details = $this->_db->loadObject();
|
||||
|
||||
// put on waiting list ?
|
||||
if ($details->maxplaces > 0) // there is a max
|
||||
{
|
||||
// check if the user should go on waiting list
|
||||
if ($details->booked >= $details->maxplaces)
|
||||
{
|
||||
if (!$details->waitinglist) {
|
||||
\Joomla\CMS\Factory::getApplication()->enqueueMessage(Text::_('COM_JEM_ERROR_REGISTER_EVENT_IS_FULL'), 'warning');
|
||||
return false;
|
||||
}
|
||||
$row->waiting = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Make sure the data is valid
|
||||
if (!$row->check()) {
|
||||
$this->setError($row->getError());
|
||||
return false;
|
||||
}
|
||||
|
||||
// Store it in the db
|
||||
if (!$row->store()) {
|
||||
Factory::getApplication()->enqueueMessage($this->_db->getErrorMsg(), 'error');
|
||||
return false;
|
||||
}
|
||||
|
||||
return $row;
|
||||
}
|
||||
}
|
||||
?>
|
||||
486
components/com_jem/models/attendees.php
Normal file
486
components/com_jem/models/attendees.php
Normal file
@ -0,0 +1,486 @@
|
||||
<?php
|
||||
/**
|
||||
* @package JEM
|
||||
* @copyright (C) 2013-2024 joomlaeventmanager.net
|
||||
* @copyright (C) 2005-2009 Christoph Lukes
|
||||
* @license https://www.gnu.org/licenses/gpl-3.0 GNU/GPL
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Pagination\Pagination;
|
||||
use Joomla\CMS\Filter\InputFilter;
|
||||
use Joomla\CMS\MVC\Model\BaseDatabaseModel;
|
||||
|
||||
/**
|
||||
* JEM Component attendees Model
|
||||
*
|
||||
* @package JEM
|
||||
*
|
||||
*/
|
||||
class JemModelAttendees extends BaseDatabaseModel
|
||||
{
|
||||
/**
|
||||
* Attendees data array
|
||||
*
|
||||
* @access protected
|
||||
* @var array
|
||||
*/
|
||||
protected $_data = null;
|
||||
|
||||
/**
|
||||
* Attendees total
|
||||
*
|
||||
* @access protected
|
||||
* @var integer
|
||||
*/
|
||||
protected $_total = null;
|
||||
|
||||
/**
|
||||
* Event data
|
||||
*
|
||||
* @access protected
|
||||
* @var object
|
||||
*/
|
||||
protected $_event = null;
|
||||
|
||||
/**
|
||||
* Pagination object
|
||||
*
|
||||
* @access protected
|
||||
* @var object
|
||||
*/
|
||||
protected $_pagination = null;
|
||||
|
||||
/**
|
||||
* Event id
|
||||
*
|
||||
* @access protected
|
||||
* @var int
|
||||
*/
|
||||
protected $_id = null;
|
||||
|
||||
/**
|
||||
* Cached setting if name or username should be shown.
|
||||
*
|
||||
* @access protected
|
||||
* @var int
|
||||
*/
|
||||
protected $_reguser = 1;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
|
||||
$app = Factory::getApplication();
|
||||
$jemsettings = JemHelper::config();
|
||||
$settings = JemHelper::globalattribs();
|
||||
|
||||
$id = $app->input->getInt('id', 0);
|
||||
$this->setId((int)$id);
|
||||
|
||||
$this->_reguser = $settings->get('global_regname', '1');
|
||||
|
||||
/* in J! 3.3.6 limitstart is removed from request - but we need it! */
|
||||
if ($app->input->getInt('limitstart', null) === null) {
|
||||
$app->setUserState('com_jem.attendees.limitstart', 0);
|
||||
}
|
||||
|
||||
$limit = $app->getUserStateFromRequest( 'com_jem.attendees.limit', 'limit', $jemsettings->display_num, 'int');
|
||||
$limitstart = $app->getUserStateFromRequest( 'com_jem.attendees.limitstart', 'limitstart', 0, 'int' );
|
||||
// correct start value if required
|
||||
$limitstart = $limit ? (int)(floor($limitstart / $limit) * $limit) : 0;
|
||||
|
||||
$this->setState('limit', $limit);
|
||||
$this->setState('limitstart', $limitstart);
|
||||
|
||||
//set unlimited if export or print action | task=export or task=print
|
||||
$task = $app->input->getCmd('task', '');
|
||||
$this->setState('unlimited', ($task == 'export' || $task == 'print') ? '1' : '');
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to set the event identifier
|
||||
*
|
||||
* @access public
|
||||
* @param int Event identifier
|
||||
*/
|
||||
public function setId($id)
|
||||
{
|
||||
// Set id and wipe data
|
||||
$this->_id = $id;
|
||||
$this->_event = null;
|
||||
$this->_data = null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to get data of the attendees.
|
||||
*
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function getData()
|
||||
{
|
||||
// Lets load the content if it doesn't already exist
|
||||
if (empty($this->_data))
|
||||
{
|
||||
$query = $this->_buildQuery();
|
||||
|
||||
if ($this->getState('unlimited') == '') {
|
||||
$this->_data = $this->_getList($query, $this->getState('limitstart'), $this->getState('limit'));
|
||||
} else {
|
||||
$pagination = $this->getPagination();
|
||||
$this->_data = $this->_getList($query, $pagination->limitstart, $pagination->limit);
|
||||
}
|
||||
}
|
||||
|
||||
return $this->_data;
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to get the total number of attendees
|
||||
*
|
||||
* @access public
|
||||
* @return integer
|
||||
*/
|
||||
public function getTotal()
|
||||
{
|
||||
// Lets load the content if it doesn't already exist
|
||||
if (empty($this->_total))
|
||||
{
|
||||
$query = $this->_buildQuery();
|
||||
$this->_total = $this->_getListCount($query);
|
||||
}
|
||||
|
||||
return $this->_total;
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to get a pagination object for the attendees
|
||||
*
|
||||
* @access public
|
||||
* @return integer
|
||||
*/
|
||||
public function getPagination()
|
||||
{
|
||||
// Lets load the content if it doesn't already exist
|
||||
if (empty($this->_pagination))
|
||||
{
|
||||
$this->_pagination = new Pagination( $this->getTotal(), $this->getState('limitstart'), $this->getState('limit') );
|
||||
}
|
||||
|
||||
return $this->_pagination;
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to build the query for the attendees
|
||||
*
|
||||
* @access protected
|
||||
* @return string
|
||||
*/
|
||||
protected function _buildQuery()
|
||||
{
|
||||
// Get the ORDER BY clause for the query
|
||||
$orderby = $this->_buildContentOrderBy();
|
||||
$where = $this->_buildContentWhere();
|
||||
|
||||
$query = 'SELECT r.*, u.username, u.name, u.email, a.created_by, a.published,'
|
||||
. ' c.catname, c.id AS catid'
|
||||
. ' FROM #__jem_register AS r'
|
||||
. ' LEFT JOIN #__jem_events AS a ON r.event = a.id'
|
||||
. ' LEFT JOIN #__users AS u ON u.id = r.uid'
|
||||
. ' LEFT JOIN #__jem_cats_event_relations AS rel ON rel.itemid = a.id'
|
||||
. ' LEFT JOIN #__jem_categories AS c ON c.id = rel.catid'
|
||||
. $where
|
||||
. ' GROUP BY r.id'
|
||||
. $orderby
|
||||
;
|
||||
|
||||
return $query;
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to build the orderby clause of the query for the attendees
|
||||
*
|
||||
* @access protected
|
||||
* @return string
|
||||
*/
|
||||
protected function _buildContentOrderBy()
|
||||
{
|
||||
$app = Factory::getApplication();
|
||||
|
||||
$filter_order = $app->getUserStateFromRequest('com_jem.attendees.filter_order', 'filter_order', 'r.uregdate', 'cmd' );
|
||||
$filter_order_Dir = $app->getUserStateFromRequest('com_jem.attendees.filter_order_Dir', 'filter_order_Dir', 'ASC', 'word' );
|
||||
|
||||
if ($this->_reguser && ($filter_order == 'u.username')) {
|
||||
$filter_order = 'u.name';
|
||||
}
|
||||
|
||||
$filter_order = InputFilter::getinstance()->clean($filter_order, 'cmd');
|
||||
$filter_order_Dir = InputFilter::getinstance()->clean($filter_order_Dir, 'word');
|
||||
|
||||
if ($filter_order == 'r.status') {
|
||||
$orderby = ' ORDER BY '.$filter_order.' '.$filter_order_Dir.', r.waiting '.$filter_order_Dir.', u.name';
|
||||
// $orderby = ' ORDER BY CASE WHEN r.status < 0 THEN r.status * (-3) WHEN r.status = 1 AND r.waiting > 0 THEN r.status + 1 ELSE r.status END '.$filter_order_Dir.', u.name';
|
||||
} else {
|
||||
$orderby = ' ORDER BY '.$filter_order.' '.$filter_order_Dir.', u.name';
|
||||
}
|
||||
|
||||
return $orderby;
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to build the where clause of the query for the attendees
|
||||
*
|
||||
* @access protected
|
||||
* @return string
|
||||
*/
|
||||
protected function _buildContentWhere()
|
||||
{
|
||||
$app = Factory::getApplication();
|
||||
$user = JemFactory::getUser();
|
||||
// Support Joomla access levels instead of single group id
|
||||
$levels = $user->getAuthorisedViewLevels();
|
||||
$canEdit = $user->can('edit', 'event', $this->_id, $user->id); // where cluase ensures user is the event owner
|
||||
|
||||
$filter = $app->getUserStateFromRequest('com_jem.attendees.filter', 'filter', 0, 'int');
|
||||
$filter_status = $app->getUserStateFromRequest('com_jem.attendees.filter_status', 'filter_status', -2, 'int');
|
||||
$search = $app->getUserStateFromRequest('com_jem.attendees.filter_search', 'filter_search', '', 'string');
|
||||
$search = $this->_db->escape(trim(\Joomla\String\StringHelper::strtolower($search)));
|
||||
|
||||
$where = array();
|
||||
$where[] = 'r.event = '.$this->_db->Quote($this->_id);
|
||||
if ($filter_status > -2) {
|
||||
if ($filter_status >= 1) {
|
||||
$waiting = $filter_status == 2 ? 1 : 0;
|
||||
$filter_status = 1;
|
||||
$where[] = '(a.waitinglist = 0 OR r.waiting = '.$waiting.')';
|
||||
}
|
||||
$where[] = 'r.status = '.$filter_status;
|
||||
}
|
||||
|
||||
// First thing we need to do is to select only needed events
|
||||
if (!$canEdit) {
|
||||
$where[] = ' a.published = 1';
|
||||
}
|
||||
$where[] = ' c.published = 1';
|
||||
$where[] = ' a.access IN (' . implode(',', $levels) . ')';
|
||||
$where[] = ' c.access IN (' . implode(',', $levels) . ')';
|
||||
|
||||
// then if the user is the owner of the event
|
||||
//commented out to let groupmember and admins too add attending users in frontend
|
||||
//$where[] = ' a.created_by = '.$this->_db->Quote($user->id);
|
||||
|
||||
/*
|
||||
* Search name or username (depends on global setting "reguser"
|
||||
*/
|
||||
if ($search && $filter == 1) {
|
||||
$where[] = ' LOWER(u.name) LIKE \'%'.$search.'%\' ';
|
||||
}
|
||||
if ($search && $filter == 2) {
|
||||
$where[] = ' LOWER(u.username) LIKE \'%'.$search.'%\' ';
|
||||
}
|
||||
|
||||
$where2 = (count($where) ? ' WHERE ' . implode(' AND ', $where) : '');
|
||||
return $where2;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get event data
|
||||
*
|
||||
* @access public
|
||||
* @return object
|
||||
*/
|
||||
public function getEvent()
|
||||
{
|
||||
if (empty($this->_event)) {
|
||||
$query = 'SELECT a.id, a.alias, a.title, a.dates, a.enddates, a.times, a.endtimes, a.maxplaces, a.maxbookeduser, a.minbookeduser, a.reservedplaces, a.waitinglist, a.requestanswer, a.seriesbooking, a.singlebooking,'
|
||||
. ' a.published, a.created, a.created_by, a.created_by_alias, a.locid, a.registra, a.unregistra,'
|
||||
. ' a.recurrence_type, a.recurrence_first_id, a.recurrence_byday, a.recurrence_counter, a.recurrence_limit, a.recurrence_limit_date, a.recurrence_number,'
|
||||
. ' a.access, a.attribs, a.checked_out, a.checked_out_time, a.contactid, a.datimage, a.featured, a.hits, a.version,'
|
||||
. ' a.custom1, a.custom2, a.custom3, a.custom4, a.custom5, a.custom6, a.custom7, a.custom8, a.custom9, a.custom10,'
|
||||
. ' a.introtext, a.fulltext, a.language, a.metadata, a.meta_keywords, a.meta_description, a.modified, a.modified_by'
|
||||
. ' FROM #__jem_events AS a WHERE a.id = '.$this->_db->Quote($this->_id);
|
||||
$this->_db->setQuery($query);
|
||||
|
||||
$this->_event = $this->_db->loadObject();
|
||||
}
|
||||
|
||||
return $this->_event;
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete registered users
|
||||
*
|
||||
* @access public
|
||||
* @param array $cid array of attendee IDs
|
||||
* @return true on success
|
||||
*/
|
||||
public function remove($cid = array())
|
||||
{
|
||||
if (is_array($cid) && count($cid))
|
||||
{
|
||||
\Joomla\Utilities\ArrayHelper::toInteger($cid);
|
||||
$query = 'DELETE FROM #__jem_register WHERE id IN ('. implode(',', $cid) .') ';
|
||||
|
||||
$this->_db->setQuery($query);
|
||||
|
||||
if ($this->_db->execute() === false) {
|
||||
throw new Exception($this->_db->getErrorMsg(), 1001);
|
||||
}
|
||||
|
||||
// clear attendees cache
|
||||
$this->_data = null;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
###########
|
||||
## USERS ##
|
||||
###########
|
||||
|
||||
/**
|
||||
* Get list of ALL active, non-blocked users incl. registrytion status if attendee.
|
||||
*/
|
||||
public function getUsers()
|
||||
{
|
||||
$query = $this->_buildQueryUsers();
|
||||
$pagination = $this->getUsersPagination();
|
||||
$rows = $this->_getList($query, $pagination->limitstart, $pagination->limit);
|
||||
|
||||
// Add registration status if available
|
||||
$eventId = $this->_id;
|
||||
$db = Factory::getContainer()->get('DatabaseDriver');
|
||||
$qry = $db->getQuery(true);
|
||||
// #__jem_register (id, event, uid, waiting, status, comment)
|
||||
$qry->select(array('reg.uid, reg.status, reg.waiting, reg.places'));
|
||||
$qry->from('#__jem_register As reg');
|
||||
$qry->where('reg.event = ' . $eventId);
|
||||
$db->setQuery($qry);
|
||||
$regs = $db->loadObjectList('uid');
|
||||
|
||||
// JemHelper::addLogEntry((string)$qry . "\n" . print_r($regs, true), __METHOD__);
|
||||
|
||||
foreach ($rows as &$row) {
|
||||
if (array_key_exists($row->id, $regs)) {
|
||||
$row->status = $regs[$row->id]->status;
|
||||
$row->places = $regs[$row->id]->places;
|
||||
if ($row->status == 1 && $regs[$row->id]->waiting) {
|
||||
++$row->status;
|
||||
}
|
||||
} else {
|
||||
$row->status = -99;
|
||||
$row->places = 0;
|
||||
}
|
||||
}
|
||||
|
||||
return $rows;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get users registered on given event
|
||||
*/
|
||||
static public function getRegisteredUsers($eventId)
|
||||
{
|
||||
if (empty($eventId)) {
|
||||
return array();
|
||||
}
|
||||
|
||||
$db = Factory::getContainer()->get('DatabaseDriver');
|
||||
$query = $db->getQuery(true);
|
||||
// #__jem_register (id, event, uid, waiting, status, comment)
|
||||
$query->select(array('reg.uid, reg.status, reg.waiting, reg.id'));
|
||||
$query->from('#__jem_register As reg');
|
||||
$query->where('reg.event = ' . $eventId);
|
||||
$db->setQuery($query);
|
||||
$regs = $db->loadObjectList('uid');
|
||||
|
||||
// JemHelper::addLogEntry((string)$qry . "\n" . print_r($regs, true), __METHOD__);
|
||||
|
||||
return $regs;
|
||||
}
|
||||
|
||||
/**
|
||||
* users-Pagination
|
||||
**/
|
||||
public function getUsersPagination()
|
||||
{
|
||||
$jemsettings = JemHelper::config();
|
||||
$app = Factory::getApplication();
|
||||
$limit = $app->getUserStateFromRequest('com_jem.addusers.limit', 'limit', $jemsettings->display_num, 'int');
|
||||
$limitstart = $app->input->getInt('limitstart', 0);
|
||||
// correct start value if required
|
||||
$limitstart = $limit ? (int)(floor($limitstart / $limit) * $limit) : 0;
|
||||
|
||||
$query = $this->_buildQueryUsers();
|
||||
$total = $this->_getListCount($query);
|
||||
|
||||
// Create the pagination object
|
||||
$pagination = new Pagination($total, $limitstart, $limit);
|
||||
|
||||
return $pagination;
|
||||
}
|
||||
|
||||
/**
|
||||
* users-query
|
||||
*/
|
||||
protected function _buildQueryUsers()
|
||||
{
|
||||
$app = Factory::getApplication();
|
||||
|
||||
// no filters, hard-coded
|
||||
$filter_order = 'usr.name';
|
||||
$filter_order_Dir = '';
|
||||
$filter_type = '1';
|
||||
$search = $app->getUserStateFromRequest('com_jem.selectusers.filter_search', 'filter_search', '', 'string');
|
||||
$search = $this->_db->escape(trim(\Joomla\String\StringHelper::strtolower($search)));
|
||||
|
||||
// Query
|
||||
$db = Factory::getContainer()->get('DatabaseDriver');
|
||||
$query = $db->getQuery(true);
|
||||
$query->select(array('usr.id, usr.name'));
|
||||
$query->from('#__users As usr');
|
||||
|
||||
// where
|
||||
$where = array();
|
||||
$where[] = 'usr.block = 0';
|
||||
$where[] = 'NOT usr.activation > 0';
|
||||
|
||||
/* something to search for? (we like to search for "0" too) */
|
||||
if ($search || ($search === "0")) {
|
||||
switch ($filter_type) {
|
||||
case 1: /* Search name */
|
||||
$where[] = ' LOWER(usr.name) LIKE \'%' . $search . '%\' ';
|
||||
break;
|
||||
}
|
||||
}
|
||||
$query->where($where);
|
||||
|
||||
// ordering
|
||||
|
||||
// ensure it's a valid order direction (asc, desc or empty)
|
||||
if (!empty($filter_order_Dir) && strtoupper($filter_order_Dir) !== 'DESC') {
|
||||
$filter_order_Dir = 'ASC';
|
||||
}
|
||||
|
||||
if ($filter_order != '') {
|
||||
$orderby = $filter_order . ' ' . $filter_order_Dir;
|
||||
if ($filter_order != 'usr.name') {
|
||||
$orderby = array($orderby, 'usr.name'); // in case of (???) we should have a useful second ordering
|
||||
}
|
||||
} else {
|
||||
$orderby = 'usr.name ' . $filter_order_Dir;
|
||||
}
|
||||
$query->order($orderby);
|
||||
|
||||
return $query;
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
121
components/com_jem/models/calendar.php
Normal file
121
components/com_jem/models/calendar.php
Normal file
@ -0,0 +1,121 @@
|
||||
<?php
|
||||
/**
|
||||
* @package JEM
|
||||
* @copyright (C) 2013-2024 joomlaeventmanager.net
|
||||
* @copyright (C) 2005-2009 Christoph Lukes
|
||||
* @license https://www.gnu.org/licenses/gpl-3.0 GNU/GPL
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
use Joomla\CMS\Factory;
|
||||
|
||||
require_once __DIR__ . '/eventslist.php';
|
||||
|
||||
/**
|
||||
* Model-Calendar
|
||||
*/
|
||||
class JemModelCalendar extends JemModelEventslist
|
||||
{
|
||||
protected $_date = 0;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
|
||||
$this->setdate(time());
|
||||
}
|
||||
|
||||
public function setdate($date)
|
||||
{
|
||||
$this->_date = $date;
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to auto-populate the model state.
|
||||
*/
|
||||
protected function populateState($ordering = null, $direction = null)
|
||||
{
|
||||
# parent::populateState($ordering, $direction);
|
||||
$app = Factory::getApplication();
|
||||
$params = $app->getParams();
|
||||
$task = $app->input->getCmd('task','','cmd');
|
||||
$top_category = $params->get('top_category', 0);
|
||||
$this->show_archived_events = $params->get('show_archived_events', 0);
|
||||
$startdayonly = $params->get('show_only_start', false);
|
||||
|
||||
# params
|
||||
$this->setState('params', $params);
|
||||
|
||||
# publish state
|
||||
$this->_populatePublishState($task);
|
||||
|
||||
###########
|
||||
## DATES ##
|
||||
###########
|
||||
|
||||
#only select events within specified dates. (chosen month)
|
||||
$monthstart = mktime(0, 0, 1, date('m', $this->_date), 1, date('Y', $this->_date));
|
||||
$monthend = mktime(0, 0, -1, date('m', $this->_date)+1, 1, date('Y', $this->_date));
|
||||
|
||||
$filter_date_from = $this->_db->Quote(date('Y-m-d', $monthstart));
|
||||
$filter_date_to = $this->_db->Quote(date('Y-m-d', $monthend));
|
||||
|
||||
$where = ' DATEDIFF(IF (a.enddates IS NOT NULL, a.enddates, a.dates), '. $filter_date_from .') >= 0';
|
||||
$this->setState('filter.calendar_from',$where);
|
||||
|
||||
$where = ' DATEDIFF(a.dates, '. $filter_date_to .') <= 0';
|
||||
$this->setState('filter.calendar_to',$where);
|
||||
|
||||
##################
|
||||
## TOP-CATEGORY ##
|
||||
##################
|
||||
|
||||
if ($top_category) {
|
||||
$children = JemCategories::getChilds($top_category);
|
||||
if (count($children)) {
|
||||
$where = 'rel.catid IN ('. implode(',', $children) .')';
|
||||
$this->setState('filter.category_top', $where);
|
||||
}
|
||||
}
|
||||
|
||||
# set filter
|
||||
$this->setState('filter.calendar_multiday',true);
|
||||
$this->setState('filter.calendar_startdayonly',(bool)$startdayonly);
|
||||
$this->setState('filter.groupby',array('a.id'));
|
||||
$this->setState('filter.show_archived_events',(bool)$this->show_archived_events);
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to get a list of events.
|
||||
*/
|
||||
public function getItems()
|
||||
{
|
||||
$items = parent::getItems();
|
||||
|
||||
if ($items) {
|
||||
return $items;
|
||||
}
|
||||
|
||||
return array();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return JDatabaseQuery
|
||||
*/
|
||||
protected function getListQuery()
|
||||
{
|
||||
// Create a new query object.
|
||||
$query = parent::getListQuery();
|
||||
|
||||
// here we can extend the query of the Eventslist model
|
||||
$query->select('DATEDIFF(a.enddates, a.dates) AS datesdiff, DAYOFMONTH(a.dates) AS start_day, YEAR(a.dates) AS start_year, MONTH(a.dates) AS start_month');
|
||||
|
||||
return $query;
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
478
components/com_jem/models/categories.php
Normal file
478
components/com_jem/models/categories.php
Normal file
@ -0,0 +1,478 @@
|
||||
<?php
|
||||
/**
|
||||
* @package JEM
|
||||
* @copyright (C) 2013-2024 joomlaeventmanager.net
|
||||
* @copyright (C) 2005-2009 Christoph Lukes
|
||||
* @license https://www.gnu.org/licenses/gpl-3.0 GNU/GPL
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\MVC\Model\BaseDatabaseModel;
|
||||
use Joomla\CMS\Pagination\Pagination;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\Plugin\PluginHelper;
|
||||
use Joomla\CMS\Router\Route;
|
||||
|
||||
/**
|
||||
* JEM Component Categories Model
|
||||
*
|
||||
* @package JEM
|
||||
*
|
||||
*/
|
||||
class JemModelCategories extends BaseDatabaseModel
|
||||
{
|
||||
/**
|
||||
* Top category id
|
||||
*
|
||||
* @var int
|
||||
*/
|
||||
protected $_id = 0;
|
||||
|
||||
/**
|
||||
* Event data array
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $_data = null;
|
||||
|
||||
/**
|
||||
* Categories total
|
||||
*
|
||||
* @var integer
|
||||
*/
|
||||
protected $_total = null;
|
||||
|
||||
/**
|
||||
* Categories data array
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $_categories = null;
|
||||
|
||||
/**
|
||||
* Pagination object
|
||||
*
|
||||
* @var object
|
||||
*/
|
||||
protected $_pagination = null;
|
||||
|
||||
/**
|
||||
* Show empty categories in list
|
||||
*
|
||||
* @var bool
|
||||
*/
|
||||
protected $_showemptycats = false;
|
||||
|
||||
/**
|
||||
* Show subcategories
|
||||
*
|
||||
* @var bool
|
||||
*/
|
||||
protected $_showsubcats = false;
|
||||
|
||||
/**
|
||||
* Show empty subcategories
|
||||
*
|
||||
* @var bool
|
||||
*/
|
||||
protected $_showemptysubcats = false;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
|
||||
$app = Factory::getApplication();
|
||||
|
||||
// Get the parameters of the active menu item
|
||||
$params = $app->getParams('com_jem');
|
||||
|
||||
$id = $app->input->getInt('id', 0);
|
||||
if (empty($id)) {
|
||||
$id = $params->get('id', 1);
|
||||
}
|
||||
|
||||
$this->_id = $id;
|
||||
|
||||
$this->_showemptycats = (bool)$params->get('showemptycats', 1);
|
||||
$this->_showsubcats = (bool)$params->get('usecat', 1);
|
||||
$this->_showemptysubcats = (bool)$params->get('showemptychilds', 1);
|
||||
|
||||
//get the number of events from database
|
||||
$limit = $app->input->getInt('limit', $params->get('cat_num'));
|
||||
$limitstart = $app->input->getInt('limitstart', 0);
|
||||
// correct start value if required
|
||||
$limitstart = $limit ? (int)(floor($limitstart / $limit) * $limit) : 0;
|
||||
|
||||
$this->setState('limit', $limit);
|
||||
$this->setState('limitstart', $limitstart);
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to get the Categories
|
||||
*
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function getData()
|
||||
{
|
||||
$app = Factory::getApplication();
|
||||
$params = $app->getParams();
|
||||
|
||||
// Lets load the content if it doesn't already exist
|
||||
if (empty($this->_categories))
|
||||
{
|
||||
// include category itself but not if it's the root category
|
||||
$parentCategory = ($this->_id > 1) ? $this->_getList($this->_buildQueryParentCategory(true)) : array();
|
||||
$query = $this->_buildQuerySubCategories($this->_showemptycats);
|
||||
$pagination = $this->getPagination();
|
||||
$this->_categories = $this->_getList($query, $pagination->limitstart, $pagination->limit);
|
||||
|
||||
// Include parent category itself
|
||||
$this->_categories = array_merge($parentCategory, $this->_categories);
|
||||
|
||||
foreach($this->_categories as $category) {
|
||||
if ($this->_showsubcats) {
|
||||
//child categories
|
||||
// ensure parent shows at least all categories also shown in list
|
||||
$showempty = $this->_showemptysubcats | ($category->id == $this->_id ? $this->_showemptycats : false);
|
||||
$query = $this->_buildQuerySubCategories($showempty, $category->id);
|
||||
$this->_db->setQuery($query);
|
||||
$category->subcats = $this->_db->loadObjectList();
|
||||
} else {
|
||||
$category->subcats = array();
|
||||
}
|
||||
|
||||
//Generate description
|
||||
if (empty ($category->description)) {
|
||||
$category->description = Text::_('COM_JEM_NO_DESCRIPTION');
|
||||
} else {
|
||||
//execute plugins
|
||||
$category->text = $category->description;
|
||||
$category->title = $category->catname;
|
||||
PluginHelper::importPlugin('content');
|
||||
$app->triggerEvent('onContentPrepare', array('com_jem.categories', &$category, &$params, 0));
|
||||
$category->description = $category->text;
|
||||
}
|
||||
|
||||
//create target link
|
||||
// TODO: Move to view?
|
||||
$task = $app->input->getCmd('task', '');
|
||||
if ($task == 'archive') {
|
||||
$category->linktext = Text::_('COM_JEM_SHOW_ARCHIVE');
|
||||
$category->linktarget = Route::_(JemHelperRoute::getCategoryRoute($category->slug.'&task=archive'));
|
||||
} else {
|
||||
$category->linktext = Text::_('COM_JEM_SHOW_EVENTS');
|
||||
$category->linktarget = Route::_(JemHelperRoute::getCategoryRoute($category->slug));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return $this->_categories;
|
||||
}
|
||||
|
||||
/**
|
||||
* Total nr of Categories
|
||||
*
|
||||
* @access public
|
||||
* @return integer
|
||||
*/
|
||||
public function getTotal()
|
||||
{
|
||||
// Lets load the total nr if it doesn't already exist
|
||||
if (empty($this->_total))
|
||||
{
|
||||
$query = $this->_buildQueryTotal();
|
||||
$this->_total = $this->_getListCount($query);
|
||||
}
|
||||
|
||||
return $this->_total;
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to get the Categories events
|
||||
*
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function getEventdata($id)
|
||||
{
|
||||
$app = Factory::getApplication();
|
||||
$params = $app->getParams('com_jem');
|
||||
|
||||
if (empty($this->_data[$id])) {
|
||||
// Lets load the content
|
||||
$query = $this->_buildDataQuery($id);
|
||||
$this->_data[$id] = $this->_getList($query, 0, $params->get('detcat_nr'));
|
||||
|
||||
foreach ($this->_data[$id] as $i => &$item) {
|
||||
$item->categories = $this->getCategories($item->id);
|
||||
|
||||
//remove events without categories (users have no access to them)
|
||||
if (empty($item->categories)) {
|
||||
unset ($this->_data[$id][$i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return $this->_data[$id];
|
||||
}
|
||||
|
||||
/**
|
||||
* Method get the event query
|
||||
*
|
||||
* @access private
|
||||
* @return array
|
||||
*/
|
||||
protected function _buildDataQuery($id)
|
||||
{
|
||||
$user = JemFactory::getUser();
|
||||
$levels = $user->getAuthorisedViewLevels();
|
||||
$task = Factory::getApplication()->input->getCmd('task', '');
|
||||
|
||||
$id = (int)$id;
|
||||
|
||||
// First thing we need to do is to select only the requested events
|
||||
if ($task == 'archive') {
|
||||
$where = ' WHERE a.published = 2 AND rel.catid = '.$id;
|
||||
} else {
|
||||
$where = ' WHERE a.published = 1 AND rel.catid = '.$id;
|
||||
}
|
||||
|
||||
// Second is to only select events assigned to category the user has access to
|
||||
$where .= ' AND c.access IN (' . implode(',', $levels) . ')';
|
||||
$where .= ' AND a.access IN (' . implode(',', $levels) . ')';
|
||||
|
||||
$query = 'SELECT DISTINCT a.id, a.dates, a.enddates, a.times, a.endtimes, a.title, a.locid, a.created, a.published,'
|
||||
. ' a.recurrence_type, a.recurrence_first_id,'
|
||||
. ' a.access, a.checked_out, a.checked_out_time, a.contactid, a.created, a.created_by, a.created_by_alias, a.custom1, a.custom2, a.custom3, a.custom4, a.custom5, a.custom6, a.custom7, a.custom8, a.custom9, a.custom10, a.datimage, a.featured,'
|
||||
. ' a.fulltext, a.hits, a.introtext, a.language, a.maxplaces, a.metadata, a.meta_keywords, a.meta_description, a.modified, a.modified_by, a.registra, a.unregistra, a.waitinglist,'
|
||||
. ' a.recurrence_byday, a.recurrence_counter, a.recurrence_limit, a.recurrence_limit_date, a.recurrence_number, a.version,'
|
||||
. ' l.venue, l.street, l.postalCode, l.city, l.state, l.url, l.country, l.published AS l_published,'
|
||||
. ' l.alias AS l_alias, l.checked_out AS l_checked_out, l.checked_out_time AS l_checked_out_time, l.created AS l_created, l.created_by AS l_createdby,'
|
||||
. ' l.custom1 AS l_custom1, l.custom2 AS l_custom2, l.custom3 AS l_custom3, l.custom4 AS l_custom4, l.custom5 AS l_custom5, l.custom6 AS l_custom6, l.custom7 AS l_custom7, l.custom8 AS l_custom8, l.custom9 AS l_custom9, l.custom10 AS l_custom10,'
|
||||
. ' l.id AS l_id, l.latitude, l.locdescription, l.locimage, l.longitude, l.map, l.meta_description AS l_meta_description, l.meta_keywords AS l_meta_keywords, l.modified AS l_modified, l.modified_by AS l_modified_by,'
|
||||
. ' l.publish_up AS l_publish_up, l.publish_down AS l_publish_down, l.version AS l_version,'
|
||||
. ' CASE WHEN CHAR_LENGTH(a.alias) THEN CONCAT_WS(\':\', a.id, a.alias) ELSE a.id END as slug,'
|
||||
. ' CASE WHEN CHAR_LENGTH(l.alias) THEN CONCAT_WS(\':\', a.locid, l.alias) ELSE a.locid END as venueslug'
|
||||
. ' FROM #__jem_events AS a'
|
||||
. ' LEFT JOIN #__jem_venues AS l ON l.id = a.locid'
|
||||
. ' LEFT JOIN #__jem_cats_event_relations AS rel ON rel.itemid = a.id'
|
||||
. ' LEFT JOIN #__jem_categories AS c ON c.id = '.$id
|
||||
. $where
|
||||
. ' ORDER BY a.dates, a.times, a.created DESC'
|
||||
;
|
||||
|
||||
return $query;
|
||||
}
|
||||
|
||||
public function getCategories($id)
|
||||
{
|
||||
$user = JemFactory::getUser();
|
||||
// Support Joomla access levels instead of single group id
|
||||
$levels = $user->getAuthorisedViewLevels();
|
||||
|
||||
$query = 'SELECT DISTINCT c.id, c.catname, c.access, c.checked_out AS cchecked_out,'
|
||||
. ' CASE WHEN CHAR_LENGTH(c.alias) THEN CONCAT_WS(\':\', c.id, c.alias) ELSE c.id END as catslug'
|
||||
. ' FROM #__jem_categories AS c'
|
||||
. ' LEFT JOIN #__jem_cats_event_relations AS rel ON rel.catid = c.id'
|
||||
. ' WHERE rel.itemid = '.(int)$id
|
||||
. ' AND c.published = 1'
|
||||
. ' AND c.access IN (' . implode(',', $levels) . ')'
|
||||
;
|
||||
|
||||
$this->_db->setQuery($query);
|
||||
return $this->_db->loadObjectList();
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to get the subcategories query
|
||||
* @param bool $emptycat include empty categories
|
||||
* @param string $parent_id Parent ID of the subcategories
|
||||
* @return string The query string
|
||||
*/
|
||||
protected function _buildQuerySubCategories($emptycat, $parent_id = null)
|
||||
{
|
||||
return $this->_buildQuery($emptycat, $parent_id);
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to get the parent category query
|
||||
* @param bool $emptycat include empty categories
|
||||
* @param string $parent_id ID of the parent category
|
||||
* @return string The query string
|
||||
*/
|
||||
protected function _buildQueryParentCategory($emptycat, $parent_id = null)
|
||||
{
|
||||
return $this->_buildQuery($emptycat, $parent_id, true);
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to get the categories query
|
||||
* @param bool $emptycat include empty categories
|
||||
* @param string $parent_id
|
||||
* @param bool $parentCategory
|
||||
* @return string The query string
|
||||
*/
|
||||
protected function _buildQuery($emptycat, $parent_id = null, $parentCategory = false)
|
||||
{
|
||||
if (is_null($parent_id)) {
|
||||
$parent_id = $this->_id;
|
||||
}
|
||||
|
||||
$app = Factory::getApplication();
|
||||
$jinput = $app->input;
|
||||
$user = JemFactory::getUser();
|
||||
$userId = $user->get('id');
|
||||
// Support Joomla access levels instead of single group id
|
||||
$levels = $user->getAuthorisedViewLevels();
|
||||
$jemsettings = JemHelper::config();
|
||||
|
||||
$ordering = 'c.lft ASC';
|
||||
|
||||
// build where clause
|
||||
$where_sub = ' WHERE cc.published = 1';
|
||||
if($parentCategory) {
|
||||
$where_sub .= ' AND cc.id = '.(int) $parent_id;
|
||||
} else {
|
||||
$where_sub .= ' AND cc.parent_id = '.(int) $parent_id;
|
||||
}
|
||||
$where_sub .= ' AND cc.access IN (' . implode(',', $levels) . ')';
|
||||
$where_sub .= ' AND i.access IN (' . implode(',', $levels) . ')';
|
||||
|
||||
// check archive task and ensure that only categories get selected
|
||||
// if they contain a published/archived event
|
||||
$task = $jinput->getCmd('task', '');
|
||||
$format = $jinput->getCmd('format', '');
|
||||
|
||||
# inspired by JemModelEventslist
|
||||
|
||||
if ($task == 'archive') {
|
||||
$where_sub .= ' AND i.published = 2';
|
||||
} elseif (($format == 'raw') || ($format == 'feed')) {
|
||||
$where_sub .= ' AND i.published = 1';
|
||||
} else {
|
||||
$show_unpublished = $user->can(array('edit', 'publish'), 'event', false, false, 1);
|
||||
if ($show_unpublished) {
|
||||
// global editor or publisher permission
|
||||
$where_sub .= ' AND i.published IN (0, 1)';
|
||||
} else {
|
||||
// no global permission but maybe on event level
|
||||
$where_sub_or = array();
|
||||
$where_sub_or[] = '(i.published = 1)';
|
||||
|
||||
$jemgroups = $user->getJemGroups(array('editevent', 'publishevent'));
|
||||
if (($userId !== 0) && ($jemsettings->eventedit == -1)) {
|
||||
$jemgroups[0] = true; // we need key 0 to get unpublished events not attached to any jem group
|
||||
}
|
||||
// user permitted on that jem groups
|
||||
if (is_array($jemgroups) && count($jemgroups)) {
|
||||
$on_groups = array_keys($jemgroups);
|
||||
// to allow only events with categories attached to allowed jemgroups use this line:
|
||||
//$where_sub_or[] = '(i.published = 0 AND c.groupid IN (' . implode(',', $on_groups) . '))';
|
||||
// to allow also events with categories not attached to disallowed jemgroups use this crazy block:
|
||||
$where_sub_or[] = '(i.published = 0 AND '
|
||||
. ' i.id NOT IN (SELECT rel3.itemid FROM #__jem_categories as c3 '
|
||||
. ' INNER JOIN #__jem_cats_event_relations as rel3 '
|
||||
. ' WHERE c3.id = rel3.catid AND c3.groupid NOT IN (0,' . implode(',', $on_groups) . ')'
|
||||
. ' GROUP BY rel3.itemid)'
|
||||
. ')';
|
||||
// hint: above it's a not not ;-)
|
||||
// meaning: Show unpublished events not connected to a category which is not one of the allowed categories.
|
||||
}
|
||||
// user permitted on own events
|
||||
if (($userId !== 0) && ($user->authorise('core.edit.own', 'com_jem') || $jemsettings->eventowner)) {
|
||||
$where_sub_or[] = '(i.published = 0 AND i.created_by = ' . $userId . ')';
|
||||
}
|
||||
$where_sub .= ' AND (' . implode(' OR ', $where_sub_or) . ')';
|
||||
}
|
||||
}
|
||||
$where_sub .= ' AND c.id = cc.id';
|
||||
|
||||
// show/hide empty categories
|
||||
$empty = $emptycat ? '' : ' HAVING assignedevents > 0';
|
||||
|
||||
// Parent category itself or its sub categories
|
||||
$parentCategoryQuery = $parentCategory ? 'c.id='.(int)$parent_id : 'c.parent_id='.(int)$parent_id;
|
||||
|
||||
$query = 'SELECT c.*,'
|
||||
. ' CASE WHEN CHAR_LENGTH(c.alias) THEN CONCAT_WS(\':\', c.id, c.alias) ELSE c.id END AS slug,'
|
||||
. ' ('
|
||||
. ' SELECT COUNT(DISTINCT i.id)'
|
||||
. ' FROM #__jem_events AS i'
|
||||
. ' LEFT JOIN #__jem_cats_event_relations AS rel ON rel.itemid = i.id'
|
||||
. ' LEFT JOIN #__jem_categories AS cc ON cc.id = rel.catid'
|
||||
. $where_sub
|
||||
. ' GROUP BY cc.id'
|
||||
. ' ) AS assignedevents'
|
||||
. ' FROM #__jem_categories AS c'
|
||||
. ' WHERE c.published = 1'
|
||||
. ' AND '.$parentCategoryQuery
|
||||
. ' AND c.access IN (' . implode(',', $levels) . ')'
|
||||
. ' GROUP BY c.id '.$empty
|
||||
. ' ORDER BY '.$ordering
|
||||
;
|
||||
|
||||
return $query;
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to build the Categories query without subselect
|
||||
* That's enough to get the total value.
|
||||
*
|
||||
* @access private
|
||||
* @return string
|
||||
*/
|
||||
protected function _buildQueryTotal()
|
||||
{
|
||||
$user = JemFactory::getUser();
|
||||
// Support Joomla access levels instead of single group id
|
||||
$levels = $user->getAuthorisedViewLevels();
|
||||
|
||||
$query = 'SELECT DISTINCT c.id'
|
||||
. ' FROM #__jem_categories AS c';
|
||||
|
||||
if (!$this->_showemptycats) {
|
||||
$query .= ' INNER JOIN #__jem_cats_event_relations AS rel ON rel.catid = c.id '
|
||||
. ' INNER JOIN #__jem_events AS e ON e.id = rel.itemid ';
|
||||
}
|
||||
|
||||
$query .= ' WHERE c.published = 1'
|
||||
. ' AND c.parent_id = ' . (int) $this->_id
|
||||
. ' AND c.access IN (' . implode(',', $levels) . ')'
|
||||
;
|
||||
|
||||
if (!$this->_showemptycats) {
|
||||
$query .= ' AND e.access IN (' . implode(',', $levels) . ')';
|
||||
|
||||
$task = Factory::getApplication()->input->getCmd('task', '');
|
||||
if($task == 'archive') {
|
||||
$query .= ' AND e.published = 2';
|
||||
} else {
|
||||
$query .= ' AND e.published = 1';
|
||||
}
|
||||
}
|
||||
|
||||
return $query;
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to get a pagination object for the events
|
||||
*
|
||||
* @access public
|
||||
* @return integer
|
||||
*/
|
||||
public function getPagination()
|
||||
{
|
||||
// Lets load the content if it doesn't already exist
|
||||
if (empty($this->_pagination)) {
|
||||
$this->_pagination = new Pagination($this->getTotal(), $this->getState('limitstart'), $this->getState('limit'));
|
||||
}
|
||||
return $this->_pagination;
|
||||
}
|
||||
}
|
||||
?>
|
||||
328
components/com_jem/models/category.php
Normal file
328
components/com_jem/models/category.php
Normal file
@ -0,0 +1,328 @@
|
||||
<?php
|
||||
/**
|
||||
* @package JEM
|
||||
* @copyright (C) 2013-2024 joomlaeventmanager.net
|
||||
* @copyright (C) 2005-2009 Christoph Lukes
|
||||
* @license https://www.gnu.org/licenses/gpl-3.0 GNU/GPL
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Filter\InputFilter;
|
||||
Use Joomla\Utilities\ArrayHelper;
|
||||
use Joomla\Registry\Registry;
|
||||
|
||||
require_once __DIR__ . '/eventslist.php';
|
||||
|
||||
/**
|
||||
* Model: Category
|
||||
*
|
||||
* \todo Remove all the collected stuff copied from somewhere but unused/useless.
|
||||
*/
|
||||
class JemModelCategory extends JemModelEventslist
|
||||
{
|
||||
protected $_id = null;
|
||||
//protected $_data = null;
|
||||
//protected $_childs = null;
|
||||
//protected $_category = null;
|
||||
//protected $_pagination= null;
|
||||
protected $_item = null;
|
||||
//protected $_articles = null;
|
||||
//protected $_siblings = null;
|
||||
protected $_children = null;
|
||||
protected $_parent = null;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
$app = Factory::getApplication();
|
||||
// Get the parameters of the active menu item
|
||||
$params = $app->getParams();
|
||||
|
||||
$id = $app->input->getInt('id', 0);
|
||||
if (empty($id)) {
|
||||
$id = $params->get('id', 1);
|
||||
}
|
||||
|
||||
$this->setId((int)$id);
|
||||
|
||||
parent::__construct();
|
||||
}
|
||||
|
||||
/**
|
||||
* Set Date
|
||||
*/
|
||||
public function setdate($date)
|
||||
{
|
||||
$this->_date = $date;
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to set the category id
|
||||
*/
|
||||
public function setId($id)
|
||||
{
|
||||
// Set new category ID and wipe data
|
||||
$this->_id = $id;
|
||||
$this->_item = null;
|
||||
//$this->_data = null;
|
||||
}
|
||||
|
||||
/**
|
||||
* set limit
|
||||
* @param int value
|
||||
*/
|
||||
public function setLimit($value)
|
||||
{
|
||||
$this->setState('list.limit', (int) $value);
|
||||
}
|
||||
|
||||
/**
|
||||
* set limitstart
|
||||
* @param int value
|
||||
*/
|
||||
public function setLimitStart($value)
|
||||
{
|
||||
$this->setState('list.start', (int) $value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to auto-populate the model state.
|
||||
*/
|
||||
protected function populateState($ordering = null, $direction = null)
|
||||
{
|
||||
// Initiliase variables.
|
||||
$app = Factory::getApplication('site');
|
||||
$jemsettings = JemHelper::config();
|
||||
$task = $app->input->getCmd('task','');
|
||||
$format = $app->input->getCmd('format',false);
|
||||
$pk = $app->input->getInt('id', 0);
|
||||
$itemid = $pk . ':' . $app->input->getInt('Itemid', 0);
|
||||
|
||||
$this->setState('category.id', $pk);
|
||||
$this->setState('filter.req_catid', $pk);
|
||||
|
||||
// Load the parameters. Merge Global and Menu Item params into new object
|
||||
$params = $app->getParams();
|
||||
$menuParams = new Registry;
|
||||
|
||||
if ($menu = $app->getMenu()->getActive()) {
|
||||
// $menu_params = $menu->getParams();
|
||||
// $menuParams->loadString($menu->params);
|
||||
$menuParams->loadString($menu->getParams());
|
||||
}
|
||||
|
||||
$mergedParams = clone $menuParams;
|
||||
$mergedParams->merge($params);
|
||||
|
||||
$this->setState('params', $mergedParams);
|
||||
|
||||
# limit/start
|
||||
|
||||
/* in J! 3.3.6 limitstart is removed from request - but we need it! */
|
||||
if ($app->input->getInt('limitstart', null) === null) {
|
||||
$app->setUserState('com_jem.category.'.$itemid.'.limitstart', 0);
|
||||
}
|
||||
|
||||
if (empty($format) || ($format == 'html')) {
|
||||
$limit = $app->getUserStateFromRequest('com_jem.category.'.$itemid.'.limit', 'limit', $jemsettings->display_num, 'int');
|
||||
$this->setState('list.limit', $limit);
|
||||
|
||||
$limitstart = $app->getUserStateFromRequest('com_jem.category.'.$itemid.'.limitstart', 'limitstart', 0, 'int');
|
||||
// correct start value if required
|
||||
$limitstart = $limit ? (int)(floor($limitstart / $limit) * $limit) : 0;
|
||||
$this->setState('list.start', $limitstart);
|
||||
}
|
||||
|
||||
# Search - variables
|
||||
$search = $app->getUserStateFromRequest('com_jem.category.'.$itemid.'.filter_search', 'filter_search', '', 'string');
|
||||
$this->setState('filter.filter_search', $search);
|
||||
|
||||
$month = $app->getUserStateFromRequest('com_jem.category.'.$itemid.'.filter_month', 'filter_month', '', 'string');
|
||||
$this->setState('filter.filter_month', $month);
|
||||
|
||||
$filtertype = $app->getUserStateFromRequest('com_jem.category.'.$itemid.'.filter_type', 'filter_type', 0, 'int');
|
||||
$this->setState('filter.filter_type', $filtertype);
|
||||
|
||||
# show open date events
|
||||
# (there is no menu item option yet so show all events)
|
||||
$this->setState('filter.opendates', 1);
|
||||
|
||||
# publish state
|
||||
$this->_populatePublishState($task);
|
||||
|
||||
###########
|
||||
## ORDER ##
|
||||
###########
|
||||
|
||||
$filter_order = $app->getUserStateFromRequest('com_jem.category.'.$itemid.'.filter_order', 'filter_order', 'a.dates', 'cmd');
|
||||
$filter_order_DirDefault = 'ASC';
|
||||
// Reverse default order for dates in archive mode
|
||||
if($task == 'archive' && $filter_order == 'a.dates') {
|
||||
$filter_order_DirDefault = 'DESC';
|
||||
}
|
||||
$filter_order_Dir = $app->getUserStateFromRequest('com_jem.category.'.$itemid.'.filter_order_Dir', 'filter_order_Dir', $filter_order_DirDefault, 'word');
|
||||
$filter_order = InputFilter::getInstance()->clean($filter_order, 'cmd');
|
||||
$filter_order_Dir = InputFilter::getInstance()->clean($filter_order_Dir, 'word');
|
||||
|
||||
$default_order_Dir = ($task == 'archive') ? 'DESC' : 'ASC';
|
||||
if ($filter_order == 'a.dates') {
|
||||
$orderby = array('a.dates ' . $filter_order_Dir, 'a.times ' . $filter_order_Dir, 'a.created ' . $filter_order_Dir);
|
||||
} else {
|
||||
$orderby = array($filter_order . ' ' . $filter_order_Dir,
|
||||
'a.dates ' . $default_order_Dir, 'a.times ' . $default_order_Dir, 'a.created ' . $default_order_Dir);
|
||||
}
|
||||
|
||||
$this->setState('filter.orderby',$orderby);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the events in the category
|
||||
*/
|
||||
public function getItems()
|
||||
{
|
||||
//$params = clone $this->getState('params');
|
||||
$items = parent::getItems();
|
||||
|
||||
if ($items) {
|
||||
return $items;
|
||||
}
|
||||
|
||||
return array();
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to get category data for the current category
|
||||
*/
|
||||
public function getCategory()
|
||||
{
|
||||
if (!is_object($this->_item)) {
|
||||
$options = array();
|
||||
|
||||
if (isset($this->state->params)) {
|
||||
$params = $this->state->params;
|
||||
$options['countItems'] = ($params->get('show_cat_num_articles', 1) || !$params->get('show_empty_categories_cat', 0)) ? 1 : 0;
|
||||
}
|
||||
else {
|
||||
$options['countItems'] = 0;
|
||||
}
|
||||
|
||||
$where_pub = $this->_getPublishWhere('i');
|
||||
if (!empty($where_pub)) {
|
||||
$options['published_where'] = '(' . implode(' OR ', $where_pub) . ')';
|
||||
} else {
|
||||
// something wrong - fallback to published events
|
||||
$options['published_where'] = 'i.published = 1';
|
||||
}
|
||||
|
||||
$catId = $this->getState('category.id', 'root');
|
||||
$categories = new JemCategories($catId, $options);
|
||||
$this->_item = $categories->get($catId);
|
||||
|
||||
// Compute selected asset permissions.
|
||||
if (is_object($this->_item)) { // a JemCategoryNode object
|
||||
$user = JemFactory::getUser();
|
||||
$asset = 'com_jem.category.'.$this->_item->id;
|
||||
|
||||
// Check general create permission.
|
||||
if ($user->authorise('core.create', $asset)) {
|
||||
$this->_item->getParams()->set('access-create', true);
|
||||
}
|
||||
|
||||
$this->_children = $this->_item->getChildren();
|
||||
|
||||
$this->_parent = $this->_item->getParent();
|
||||
if (empty($this->_parent)) {
|
||||
$this->_parent = false;
|
||||
}
|
||||
|
||||
$this->_rightsibling = $this->_item->getSibling();
|
||||
$this->_leftsibling = $this->_item->getSibling(false);
|
||||
}
|
||||
else {
|
||||
$this->_children = false;
|
||||
$this->_parent = false;
|
||||
}
|
||||
}
|
||||
|
||||
return $this->_item;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return JDatabaseQuery
|
||||
*/
|
||||
protected function getListQuery()
|
||||
{
|
||||
//$params = $this->state->params;
|
||||
//$jinput = Factory::getApplication()->input;
|
||||
//$task = $jinput->getCmd('task','','cmd');
|
||||
|
||||
// Create a new query object.
|
||||
$query = parent::getListQuery();
|
||||
|
||||
// here we can extend the query of the Eventslist model
|
||||
return $query;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the parent categorie.
|
||||
*/
|
||||
public function getParent()
|
||||
{
|
||||
if (!is_object($this->_item)) {
|
||||
$this->getCategory();
|
||||
}
|
||||
|
||||
return $this->_parent;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the left sibling (adjacent) categories.
|
||||
*/
|
||||
public function &getLeftSibling()
|
||||
{
|
||||
if (!is_object($this->_item)) {
|
||||
$this->getCategory();
|
||||
}
|
||||
|
||||
return $this->_leftsibling;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the right sibling (adjacent) categories.
|
||||
*/
|
||||
public function &getRightSibling()
|
||||
{
|
||||
if (!is_object($this->_item)) {
|
||||
$this->getCategory();
|
||||
}
|
||||
|
||||
return $this->_rightsibling;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the child categories.
|
||||
*/
|
||||
public function &getChildren()
|
||||
{
|
||||
if (!is_object($this->_item)) {
|
||||
$this->getCategory();
|
||||
}
|
||||
|
||||
// Order subcategories
|
||||
if ($this->_children) {
|
||||
if (sizeof($this->_children)) {
|
||||
$params = $this->getState()->get('params');
|
||||
if ($params->get('orderby_pri') == 'alpha' || $params->get('orderby_pri') == 'ralpha') {
|
||||
ArrayHelper::sortObjects($this->_children, 'title', ($params->get('orderby_pri') == 'alpha') ? 1 : -1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return $this->_children;
|
||||
}
|
||||
}
|
||||
?>
|
||||
152
components/com_jem/models/categorycal.php
Normal file
152
components/com_jem/models/categorycal.php
Normal file
@ -0,0 +1,152 @@
|
||||
<?php
|
||||
/**
|
||||
* @package JEM
|
||||
* @copyright (C) 2013-2024 joomlaeventmanager.net
|
||||
* @copyright (C) 2005-2009 Christoph Lukes
|
||||
* @license https://www.gnu.org/licenses/gpl-3.0 GNU/GPL
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
use Joomla\CMS\Factory;
|
||||
|
||||
require_once __DIR__ . '/eventslist.php';
|
||||
|
||||
/**
|
||||
* Model Categorycal
|
||||
*
|
||||
* @package JEM
|
||||
*/
|
||||
class JemModelCategoryCal extends JemModelEventslist
|
||||
{
|
||||
/**
|
||||
* Category id
|
||||
*
|
||||
* @var int
|
||||
*/
|
||||
protected $_id = null;
|
||||
|
||||
/**
|
||||
* Date as timestamp useable for strftime()
|
||||
*
|
||||
* @var int
|
||||
*/
|
||||
protected $_date = null;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
$app = Factory::getApplication();
|
||||
$params = $app->getParams();
|
||||
|
||||
$id = $app->input->getInt('id', 0);
|
||||
if (empty($id)) {
|
||||
$id = $params->get('id', 0);
|
||||
}
|
||||
|
||||
$this->setdate(time());
|
||||
$this->setId((int)$id);
|
||||
|
||||
parent::__construct();
|
||||
}
|
||||
|
||||
public function setdate($date)
|
||||
{
|
||||
$this->_date = $date;
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to set the category id
|
||||
*
|
||||
* @access public
|
||||
* @param int category ID
|
||||
*/
|
||||
public function setId($id)
|
||||
{
|
||||
// Set new category ID and wipe data
|
||||
$this->_id = $id;
|
||||
//$this->_data = null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to auto-populate the model state.
|
||||
*/
|
||||
protected function populateState($ordering = null, $direction = null)
|
||||
{
|
||||
$app = Factory::getApplication();
|
||||
$params = $app->getParams();
|
||||
$itemid = $app->input->getInt('Itemid', 0);
|
||||
$task = $app->input->getCmd('task', '');
|
||||
$startdayonly = $params->get('show_only_start', false);
|
||||
$show_archived_events = $params->get('show_archived_events', 0);
|
||||
|
||||
# params
|
||||
$this->setState('params', $params);
|
||||
|
||||
# publish state
|
||||
$this->_populatePublishState($task);
|
||||
|
||||
###########
|
||||
## DATES ##
|
||||
###########
|
||||
|
||||
#only select events within specified dates. (chosen month)
|
||||
|
||||
$monthstart = mktime(0, 0, 1, date('m', $this->_date), 1, date('Y', $this->_date));
|
||||
$monthend = mktime(0, 0, -1, date('m', $this->_date)+1, 1, date('Y', $this->_date));
|
||||
|
||||
$filter_date_from = date('Y-m-d', $monthstart);
|
||||
$filter_date_to = date('Y-m-d', $monthend);
|
||||
|
||||
$where = ' DATEDIFF(IF (a.enddates IS NOT NULL, a.enddates, a.dates), '. $this->_db->Quote($filter_date_from) .') >= 0';
|
||||
$this->setState('filter.calendar_from', $where);
|
||||
|
||||
$where = ' DATEDIFF(a.dates, '. $this->_db->Quote($filter_date_to) .') <= 0';
|
||||
$this->setState('filter.calendar_to', $where);
|
||||
|
||||
# set filter
|
||||
$this->setState('filter.calendar_multiday', true);
|
||||
$this->setState('filter.calendar_startdayonly', (bool)$startdayonly);
|
||||
$this->setState('filter.filter_catid', $this->_id);
|
||||
$this->setState('filter.show_archived_events',(bool)$show_archived_events);
|
||||
|
||||
$app->setUserState('com_jem.categorycal.catid'.$itemid, $this->_id);
|
||||
|
||||
# groupby
|
||||
$this->setState('filter.groupby', array('a.id'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to get the events
|
||||
*
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function getItems()
|
||||
{
|
||||
$items = parent::getItems();
|
||||
|
||||
if ($items) {
|
||||
return $items;
|
||||
}
|
||||
|
||||
return array();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return JDatabaseQuery
|
||||
*/
|
||||
protected function getListQuery()
|
||||
{
|
||||
// Let parent create a new query object.
|
||||
$query = parent::getListQuery();
|
||||
|
||||
// here we can extend the query of the Eventslist model
|
||||
$query->select('DATEDIFF(a.enddates, a.dates) AS datesdiff,DAYOFMONTH(a.dates) AS start_day, YEAR(a.dates) AS start_year, MONTH(a.dates) AS start_month');
|
||||
|
||||
return $query;
|
||||
}
|
||||
}
|
||||
?>
|
||||
276
components/com_jem/models/day.php
Normal file
276
components/com_jem/models/day.php
Normal file
@ -0,0 +1,276 @@
|
||||
<?php
|
||||
/**
|
||||
* @package JEM
|
||||
* @copyright (C) 2013-2024 joomlaeventmanager.net
|
||||
* @copyright (C) 2005-2009 Christoph Lukes
|
||||
* @license https://www.gnu.org/licenses/gpl-3.0 GNU/GPL
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Language\Text;
|
||||
|
||||
require_once __DIR__ . '/eventslist.php';
|
||||
|
||||
/**
|
||||
* Model-Day
|
||||
*/
|
||||
class JemModelDay extends JemModelEventslist
|
||||
{
|
||||
protected $_date = null;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
|
||||
$rawday = Factory::getApplication()->input->getInt('id', null);
|
||||
$this->setDate($rawday);
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to set the date
|
||||
*
|
||||
* @access public
|
||||
* @param string
|
||||
*/
|
||||
public function setDate($date)
|
||||
{
|
||||
$app = Factory::getApplication();
|
||||
|
||||
# Get the params of the active menu item
|
||||
$params = $app->getParams('com_jem');
|
||||
|
||||
# 0 means we have a direct request from a menuitem and without any params (eg: calendar module)
|
||||
if ($date == 0) {
|
||||
$dayoffset = $params->get('days');
|
||||
$timestamp = mktime(0, 0, 0, date("m"), date("d") + $dayoffset, date("Y"));
|
||||
$date = date('Y-m-d', $timestamp);
|
||||
|
||||
# a valid date has 8 characters (ymd)
|
||||
} elseif (strlen($date) == 8) {
|
||||
$year = substr($date, 0, -4);
|
||||
$month = substr($date, 4, -2);
|
||||
$day = substr($date, 6);
|
||||
|
||||
//check if date is valid
|
||||
if (checkdate($month, $day, $year)) {
|
||||
$date = $year.'-'.$month.'-'.$day;
|
||||
} else {
|
||||
//date isn't valid raise notice and use current date
|
||||
$date = date('Ymd');
|
||||
Factory::getApplication()->enqueueMessage(Text::_('COM_JEM_INVALID_DATE_REQUESTED_USING_CURRENT'), 'notice');
|
||||
}
|
||||
} else {
|
||||
//date isn't valid raise notice and use current date
|
||||
$date = date('Ymd');
|
||||
Factory::getApplication()->enqueueMessage(Text::_('COM_JEM_INVALID_DATE_REQUESTED_USING_CURRENT'), 'notice');
|
||||
}
|
||||
|
||||
$this->_date = $date;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return date
|
||||
*/
|
||||
public function getDay()
|
||||
{
|
||||
return $this->_date;
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to auto-populate the model state.
|
||||
*/
|
||||
protected function populateState($ordering = null, $direction = null)
|
||||
{
|
||||
# parent::populateState($ordering, $direction);
|
||||
|
||||
$app = Factory::getApplication();
|
||||
$jemsettings = JemHelper::config();
|
||||
$itemid = $app->input->getInt('id', 0) . ':' . $app->input->getInt('Itemid', 0);
|
||||
$params = $app->getParams();
|
||||
$task = $app->input->getCmd('task', '');
|
||||
$requestVenueId = $app->input->getInt('locid', 0);
|
||||
$requestCategoryId = $app->input->getInt('catid', 0);
|
||||
$item = $app->input->getInt('Itemid', 0);
|
||||
|
||||
$locid = $app->getUserState('com_jem.venuecal.locid'.$item);
|
||||
if ($locid) {
|
||||
$this->setState('filter.filter_locid', $locid);
|
||||
}
|
||||
|
||||
// maybe list of venue ids from calendar module
|
||||
$locids = explode(',', $app->input->getString('locids', ''));
|
||||
foreach ($locids as $id) {
|
||||
if ((int)$id > 0) {
|
||||
$venues[] = (int)$id;
|
||||
}
|
||||
}
|
||||
if (!empty($venues)) {
|
||||
$this->setState('filter.venue_id', $venues);
|
||||
$this->setState('filter.venue_id.include', true);
|
||||
}
|
||||
|
||||
$cal_category_catid = $app->getUserState('com_jem.categorycal.catid'.$item);
|
||||
if ($cal_category_catid) {
|
||||
$this->setState('filter.req_catid', $cal_category_catid);
|
||||
}
|
||||
|
||||
// maybe list of venue ids from calendar module
|
||||
$catids = explode(',', $app->input->getString('catids', ''));
|
||||
foreach ($catids as $id) {
|
||||
if ((int)$id > 1) { // don't accept 'root'
|
||||
$cats[] = (int)$id;
|
||||
}
|
||||
}
|
||||
if (!empty($cats)) {
|
||||
$this->setState('filter.category_id', $cats);
|
||||
$this->setState('filter.category_id.include', true);
|
||||
}
|
||||
################################
|
||||
## EXCLUDE/INCLUDE CATEGORIES ##
|
||||
################################
|
||||
|
||||
$catswitch = $params->get('categoryswitch', '');
|
||||
|
||||
# set included categories
|
||||
if ($catswitch) {
|
||||
$included_cats = trim($params->get('categoryswitchcats', ''));
|
||||
if ($included_cats) {
|
||||
$included_cats = explode(",", $included_cats);
|
||||
$this->setState('filter.category_id', $included_cats);
|
||||
$this->setState('filter.category_id.include', true);
|
||||
}
|
||||
}
|
||||
|
||||
# set excluded categories
|
||||
if (!$catswitch) {
|
||||
$excluded_cats = trim($params->get('categoryswitchcats', ''));
|
||||
if ($excluded_cats) {
|
||||
$excluded_cats = explode(",", $excluded_cats);
|
||||
$this->setState('filter.category_id', $excluded_cats);
|
||||
$this->setState('filter.category_id.include', false);
|
||||
}
|
||||
}
|
||||
|
||||
// maybe top category is given by calendar view
|
||||
$top_category = $app->input->getInt('topcat', 0);
|
||||
if ($top_category > 0) { // accept 'root'
|
||||
$children = JemCategories::getChilds($top_category);
|
||||
if (count($children)) {
|
||||
$where = 'rel.catid IN ('. implode(',', $children) .')';
|
||||
$this->setState('filter.category_top', $where);
|
||||
}
|
||||
}
|
||||
|
||||
# limit/start
|
||||
|
||||
/* in J! 3.3.6 limitstart is removed from request - but we need it! */
|
||||
if ($app->input->getInt('limitstart', null) === null) {
|
||||
$app->setUserState('com_jem.day.'.$itemid.'.limitstart', 0);
|
||||
}
|
||||
|
||||
$limit = $app->getUserStateFromRequest('com_jem.day.'.$itemid.'.limit', 'limit', $jemsettings->display_num, 'int');
|
||||
$this->setState('list.limit', $limit);
|
||||
|
||||
$limitstart = $app->getUserStateFromRequest('com_jem.day.'.$itemid.'.limitstart', 'limitstart', 0, 'int');
|
||||
$limitstart = $limit ? (int)(floor($limitstart / $limit) * $limit) : 0;
|
||||
$this->setState('list.start', $limitstart);
|
||||
|
||||
# Search
|
||||
$search = $app->getUserStateFromRequest('com_jem.day.'.$itemid.'.filter_search', 'filter_search', '', 'string');
|
||||
$this->setState('filter.filter_search', $search);
|
||||
|
||||
# FilterType
|
||||
$filtertype = $app->getUserStateFromRequest('com_jem.day.'.$itemid.'.filter_type', 'filter_type', 0, 'int');
|
||||
$this->setState('filter.filter_type', $filtertype);
|
||||
|
||||
# filter_order
|
||||
$orderCol = $app->getUserStateFromRequest('com_jem.day.'.$itemid.'.filter_order', 'filter_order', 'a.dates', 'cmd');
|
||||
$this->setState('filter.filter_ordering', $orderCol);
|
||||
|
||||
# filter_direction
|
||||
$listOrder = $app->getUserStateFromRequest('com_jem.day.'.$itemid.'.filter_order_Dir', 'filter_order_Dir', 'ASC', 'word');
|
||||
$this->setState('filter.filter_direction', $listOrder);
|
||||
|
||||
$defaultOrder = ($task == 'archive') ? 'DESC' : 'ASC';
|
||||
if ($orderCol == 'a.dates') {
|
||||
$orderby = array('a.dates ' . $listOrder, 'a.times ' . $listOrder, 'a.created ' . $listOrder);
|
||||
} else {
|
||||
$orderby = array($orderCol . ' ' . $listOrder,
|
||||
'a.dates ' . $defaultOrder, 'a.times ' . $defaultOrder, 'a.created ' . $defaultOrder);
|
||||
}
|
||||
$this->setState('filter.orderby', $orderby);
|
||||
|
||||
# params
|
||||
$this->setState('params', $params);
|
||||
|
||||
# published
|
||||
/// @todo bring given pub together with eventslist's unpub calculation (_populatePublishState())
|
||||
$pub = explode(',', $app->input->getString('pub', ''));
|
||||
$published = array();
|
||||
// sanitize remote data
|
||||
foreach ($pub as $val) {
|
||||
if (((int)$val >= 1) && ((int)$val <= 2)) {
|
||||
$published[] = (int)$val;
|
||||
}
|
||||
}
|
||||
// default to 'published'
|
||||
if (empty($published)) {
|
||||
//$published[] = 1;
|
||||
$this->_populatePublishState($task);
|
||||
} else {
|
||||
$this->setState('filter.published', $published);
|
||||
}
|
||||
|
||||
# request venue-id
|
||||
if ($requestVenueId) {
|
||||
$this->setState('filter.req_venid', $requestVenueId);
|
||||
}
|
||||
|
||||
# request cat-id
|
||||
if ($requestCategoryId) {
|
||||
$this->setState('filter.req_catid', $requestCategoryId);
|
||||
}
|
||||
|
||||
# groupby
|
||||
$this->setState('filter.groupby', array('a.id'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to get a list of events.
|
||||
*/
|
||||
public function getItems()
|
||||
{
|
||||
$items = parent::getItems();
|
||||
|
||||
if ($items) {
|
||||
return $items;
|
||||
}
|
||||
|
||||
return array();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return JDatabaseQuery
|
||||
*/
|
||||
protected function getListQuery()
|
||||
{
|
||||
// Create a new query object.
|
||||
$query = parent::getListQuery();
|
||||
|
||||
$requestVenueId = $this->getState('filter.req_venid');
|
||||
if ($requestVenueId){
|
||||
$query->where(' a.locid = '.$this->_db->quote($requestVenueId));
|
||||
}
|
||||
|
||||
// Second is to only select events of the specified day
|
||||
$query->where('('.$this->_db->quote($this->_date).' BETWEEN (a.dates) AND (IF (a.enddates >= a.dates, a.enddates, a.dates)) OR '.$this->_db->quote($this->_date).' = a.dates)');
|
||||
|
||||
return $query;
|
||||
}
|
||||
}
|
||||
?>
|
||||
393
components/com_jem/models/default.php
Normal file
393
components/com_jem/models/default.php
Normal file
@ -0,0 +1,393 @@
|
||||
<?php
|
||||
/**
|
||||
* @version 2.3.0
|
||||
* @package JEM
|
||||
* @copyright (C) 2013-2020 joomlaeventmanager.net
|
||||
* @copyright (C) 2005-2009 Christoph Lukes
|
||||
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
|
||||
*/
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
JHtml::addIncludePath(JPATH_COMPONENT . '/helpers');
|
||||
|
||||
// Create shortcuts to some parameters.
|
||||
$params = $this->item->params;
|
||||
$images = json_decode($this->item->datimage);
|
||||
$attribs = json_decode($this->item->attribs);
|
||||
$user = JemFactory::getUser();
|
||||
$jemsettings = JemHelper::config();
|
||||
$document = JFactory::getDocument();
|
||||
|
||||
// Add expiration date, if old events will be archived or removed
|
||||
if ($jemsettings->oldevent > 0) {
|
||||
$enddate = strtotime($this->item->enddates?:$this->item->dates);
|
||||
$expDate = date("D, d M Y H:i:s", strtotime('+1 day', $enddate));
|
||||
$document->addCustomTag('<meta http-equiv="expires" content="' . $expDate . '"/>');
|
||||
}
|
||||
|
||||
JHtml::_('behavior.modal', 'a.flyermodal');
|
||||
?>
|
||||
<?php if ($params->get('access-view')) { /* This will show nothings otherwise - ??? */ ?>
|
||||
<div id="jem" class="event_id<?php echo $this->item->did; ?> jem_event<?php echo $this->pageclass_sfx;?>"
|
||||
itemscope="itemscope" itemtype="https://schema.org/Event">
|
||||
<div class="buttons">
|
||||
<?php
|
||||
$btn_params = array('slug' => $this->item->slug, 'print_link' => $this->print_link);
|
||||
echo JemOutput::createButtonBar($this->getName(), $this->permissions, $btn_params);
|
||||
?>
|
||||
</div>
|
||||
|
||||
<div class="clr"> </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; ?>
|
||||
|
||||
<div class="clr"> </div>
|
||||
|
||||
<!-- Event -->
|
||||
<h2 class="jem">
|
||||
<?php
|
||||
echo JText::_('COM_JEM_EVENT') . JemOutput::recurrenceicon($this->item);
|
||||
echo JemOutput::editbutton($this->item, $params, $attribs, $this->permissions->canEditEvent, 'editevent');
|
||||
echo JemOutput::copybutton($this->item, $params, $attribs, $this->permissions->canAddEvent, 'editevent');
|
||||
?>
|
||||
</h2>
|
||||
|
||||
<?php echo JemOutput::flyer($this->item, $this->dimage, 'event'); ?>
|
||||
|
||||
<dl class="event_info floattext">
|
||||
<?php if ($params->get('event_show_detailstitle',1)) : ?>
|
||||
<dt class="title"><?php echo JText::_('COM_JEM_TITLE'); ?>:</dt>
|
||||
<dd class="title" itemprop="name"><?php echo $this->escape($this->item->title); ?></dd>
|
||||
<?php
|
||||
endif;
|
||||
?>
|
||||
<dt class="when"><?php echo JText::_('COM_JEM_WHEN'); ?>:</dt>
|
||||
<dd class="when">
|
||||
<?php
|
||||
echo JemOutput::formatLongDateTime($this->item->dates, $this->item->times,$this->item->enddates, $this->item->endtimes);
|
||||
echo JemOutput::formatSchemaOrgDateTime($this->item->dates, $this->item->times,$this->item->enddates, $this->item->endtimes);
|
||||
?>
|
||||
</dd>
|
||||
<?php if ($this->item->locid != 0) : ?>
|
||||
<dt class="where"><?php echo JText::_('COM_JEM_WHERE'); ?>:</dt>
|
||||
<dd class="where"><?php
|
||||
if (($params->get('event_show_detlinkvenue') == 1) && (!empty($this->item->url))) :
|
||||
?><a target="_blank" href="<?php echo $this->item->url; ?>"><?php echo $this->escape($this->item->venue); ?></a><?php
|
||||
elseif (($params->get('event_show_detlinkvenue') == 2) && (!empty($this->item->venueslug))) :
|
||||
?><a href="<?php echo JRoute::_(JemHelperRoute::getVenueRoute($this->item->venueslug)); ?>"><?php echo $this->item->venue; ?></a><?php
|
||||
else/*if ($params->get('event_show_detlinkvenue') == 0)*/ :
|
||||
echo $this->escape($this->item->venue);
|
||||
endif;
|
||||
|
||||
# will show "venue" or "venue - city" or "venue - city, state" or "venue, state"
|
||||
$city = $this->escape($this->item->city);
|
||||
$state = $this->escape($this->item->state);
|
||||
if ($city) { echo ' - ' . $city; }
|
||||
if ($state) { echo ', ' . $state; }
|
||||
?>
|
||||
</dd>
|
||||
<?php
|
||||
endif;
|
||||
$n = is_array($this->categories) ? count($this->categories) : 0;
|
||||
?>
|
||||
|
||||
<dt class="category"><?php echo $n < 2 ? JText::_('COM_JEM_CATEGORY') : JText::_('COM_JEM_CATEGORIES'); ?>:</dt>
|
||||
<dd class="category">
|
||||
<?php
|
||||
$i = 0;
|
||||
foreach ((array)$this->categories as $category) :
|
||||
?><a href="<?php echo JRoute::_(JemHelperRoute::getCategoryRoute($category->catslug)); ?>"><?php echo $this->escape($category->catname); ?></a><?php
|
||||
$i++;
|
||||
if ($i != $n) :
|
||||
echo ', ';
|
||||
endif;
|
||||
endforeach;
|
||||
?>
|
||||
</dd>
|
||||
|
||||
<?php
|
||||
for ($cr = 1; $cr <= 10; $cr++) {
|
||||
$currentRow = $this->item->{'custom'.$cr};
|
||||
if (preg_match('%^http(s)?://%', $currentRow)) {
|
||||
$currentRow = '<a href="'.$this->escape($currentRow).'" target="_blank">'.$this->escape($currentRow).'</a>';
|
||||
}
|
||||
if ($currentRow) {
|
||||
?>
|
||||
<dt class="custom<?php echo $cr; ?>"><?php echo JText::_('COM_JEM_EVENT_CUSTOM_FIELD'.$cr); ?>:</dt>
|
||||
<dd class="custom<?php echo $cr; ?>"><?php echo $currentRow; ?></dd>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
<?php if ($params->get('event_show_hits')) : ?>
|
||||
<dt class="hits"><?php echo JText::_('COM_JEM_EVENT_HITS_LABEL'); ?>:</dt>
|
||||
<dd class="hits"><?php echo JText::sprintf('COM_JEM_EVENT_HITS', $this->item->hits); ?></dd>
|
||||
<?php endif; ?>
|
||||
|
||||
|
||||
<!-- AUTHOR -->
|
||||
<?php if ($params->get('event_show_author') && !empty($this->item->author)) : ?>
|
||||
<dt class="createdby"><?php echo JText::_('COM_JEM_EVENT_CREATED_BY_LABEL'); ?>:</dt>
|
||||
<dd class="createdby">
|
||||
<?php $author = $this->item->created_by_alias ? $this->item->created_by_alias : $this->item->author; ?>
|
||||
<?php if (!empty($this->item->contactid2) && $params->get('event_link_author') == true) :
|
||||
$needle = 'index.php?option=com_contact&view=contact&id=' . $this->item->contactid2;
|
||||
$menu = JFactory::getApplication()->getMenu();
|
||||
$item = $menu->getItems('link', $needle, true);
|
||||
$cntlink = !empty($item) ? $needle . '&Itemid=' . $item->id : $needle;
|
||||
echo JText::sprintf('COM_JEM_EVENT_CREATED_BY', JHtml::_('link', JRoute::_($cntlink), $author));
|
||||
else :
|
||||
echo JText::sprintf('COM_JEM_EVENT_CREATED_BY', $author);
|
||||
endif;
|
||||
?>
|
||||
</dd>
|
||||
<?php endif; ?>
|
||||
|
||||
<!-- PUBLISHING STATE -->
|
||||
<?php if (!empty($this->showeventstate) && isset($this->item->published)) : ?>
|
||||
<dt class="published"><?php echo JText::_('JSTATUS'); ?>:</dt>
|
||||
<dd class="published">
|
||||
<?php switch ($this->item->published) {
|
||||
case 1: echo JText::_('JPUBLISHED'); break;
|
||||
case 0: echo JText::_('JUNPUBLISHED'); break;
|
||||
case 2: echo JText::_('JARCHIVED'); break;
|
||||
case -2: echo JText::_('JTRASHED'); break;
|
||||
} ?>
|
||||
</dd>
|
||||
<?php endif; ?>
|
||||
</dl>
|
||||
|
||||
<!-- DESCRIPTION -->
|
||||
<?php if ($params->get('event_show_description','1') && ($this->item->fulltext != '' && $this->item->fulltext != '<br />' || $this->item->introtext != '' && $this->item->introtext != '<br />')) { ?>
|
||||
<h2 class="description"><?php echo JText::_('COM_JEM_EVENT_DESCRIPTION'); ?></h2>
|
||||
<div class="description event_desc" itemprop="description">
|
||||
|
||||
<?php
|
||||
if ($params->get('access-view')) {
|
||||
echo $this->item->text;
|
||||
}
|
||||
/* optional teaser intro text for guests - NOT SUPPORTED YET */
|
||||
elseif (0 /*$params->get('event_show_noauth') == true and $user->get('guest')*/ ) {
|
||||
echo $this->item->introtext;
|
||||
// Optional link to let them register to see the whole event.
|
||||
if ($params->get('event_show_readmore') && $this->item->fulltext != null) {
|
||||
$link1 = JRoute::_('index.php?option=com_users&view=login');
|
||||
$link = new JUri($link1);
|
||||
echo '<p class="readmore">';
|
||||
echo '<a href="'.$link.'">';
|
||||
if ($params->get('event_alternative_readmore') == false) {
|
||||
echo JText::_('COM_JEM_EVENT_REGISTER_TO_READ_MORE');
|
||||
} elseif ($readmore = $params->get('alternative_readmore')) {
|
||||
echo $readmore;
|
||||
}
|
||||
|
||||
if ($params->get('event_show_readmore_title', 0) != 0) {
|
||||
echo JHtml::_('string.truncate', ($this->item->title), $params->get('event_readmore_limit'));
|
||||
} elseif ($params->get('event_show_readmore_title', 0) == 0) {
|
||||
} else {
|
||||
echo JHtml::_('string.truncate', ($this->item->title), $params->get('event_readmore_limit'));
|
||||
} ?>
|
||||
</a>
|
||||
</p>
|
||||
<?php
|
||||
}
|
||||
} /* access_view / show_noauth */
|
||||
?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<!-- Contact -->
|
||||
<?php if ($params->get('event_show_contact') && !empty($this->item->conid )) : ?>
|
||||
|
||||
<h2 class="contact"><?php echo JText::_('COM_JEM_CONTACT') ; ?></h2>
|
||||
|
||||
<dl class="location floattext">
|
||||
<dt class="con_name"><?php echo JText::_('COM_JEM_NAME'); ?>:</dt>
|
||||
<dd class="con_name">
|
||||
<?php
|
||||
$contact = $this->item->conname;
|
||||
if ($params->get('event_link_contact') == true) :
|
||||
$needle = 'index.php?option=com_contact&view=contact&id=' . $this->item->conid;
|
||||
$menu = JFactory::getApplication()->getMenu();
|
||||
$item = $menu->getItems('link', $needle, true);
|
||||
$cntlink2 = !empty($item) ? $needle . '&Itemid=' . $item->id : $needle;
|
||||
echo JText::sprintf('COM_JEM_EVENT_CONTACT', JHtml::_('link', JRoute::_($cntlink2), $contact));
|
||||
else :
|
||||
echo JText::sprintf('COM_JEM_EVENT_CONTACT', $contact);
|
||||
endif;
|
||||
?>
|
||||
</dd>
|
||||
|
||||
<?php if ($this->item->contelephone) : ?>
|
||||
<dt class="con_telephone"><?php echo JText::_('COM_JEM_TELEPHONE'); ?>:</dt>
|
||||
<dd class="con_telephone">
|
||||
<?php echo $this->escape($this->item->contelephone); ?>
|
||||
</dd>
|
||||
<?php endif; ?>
|
||||
</dl>
|
||||
<?php endif ?>
|
||||
|
||||
<?php $this->attachments = $this->item->attachments; ?>
|
||||
<?php echo $this->loadTemplate('attachments'); ?>
|
||||
|
||||
<!-- Venue -->
|
||||
<?php if (($this->item->locid != 0) && !empty($this->item->venue)) : ?>
|
||||
<p></p>
|
||||
<hr>
|
||||
|
||||
<div itemprop="location" itemscope="itemscope" itemtype="https://schema.org/Place">
|
||||
<h2 class="location">
|
||||
<?php
|
||||
echo JText::_('COM_JEM_VENUE') ;
|
||||
$itemid = $this->item ? $this->item->id : 0 ;
|
||||
echo JemOutput::editbutton($this->item, $params, $attribs, $this->permissions->canEditVenue, 'editvenue');
|
||||
echo JemOutput::copybutton($this->item, $params, $attribs, $this->permissions->canAddVenue, 'editvenue');
|
||||
?>
|
||||
</h2>
|
||||
<?php echo JemOutput::flyer($this->item, $this->limage, 'venue'); ?>
|
||||
|
||||
<dl class="location">
|
||||
<dt class="venue"><?php echo JText::_('COM_JEM_LOCATION'); ?>:</dt>
|
||||
<dd class="venue">
|
||||
<?php
|
||||
if (!empty($this->item->venueslug)) :
|
||||
echo '<a href="' . JRoute::_(JemHelperRoute::getVenueRoute($this->item->venueslug)) . '">' . $this->escape($this->item->venue) . '</a>';
|
||||
else :
|
||||
echo $this->escape($this->item->venue);
|
||||
endif;
|
||||
if (!empty($this->item->url)) :
|
||||
echo ' - <a target="_blank" href="' . $this->item->url . '">' . JText::_('COM_JEM_WEBSITE') . '</a>';
|
||||
endif;
|
||||
?>
|
||||
</dd>
|
||||
</dl>
|
||||
<?php if ($params->get('event_show_detailsadress', '1')) : ?>
|
||||
<dl class="location floattext" itemprop="address" itemscope
|
||||
itemtype="https://schema.org/PostalAddress">
|
||||
<?php if ($this->item->street) : ?>
|
||||
<dt class="venue_street"><?php echo JText::_('COM_JEM_STREET'); ?>:</dt>
|
||||
<dd class="venue_street" itemprop="streetAddress">
|
||||
<?php echo $this->escape($this->item->street); ?>
|
||||
</dd>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($this->item->postalCode) : ?>
|
||||
<dt class="venue_postalCode"><?php echo JText::_('COM_JEM_ZIP'); ?>:</dt>
|
||||
<dd class="venue_postalCode" itemprop="postalCode">
|
||||
<?php echo $this->escape($this->item->postalCode); ?>
|
||||
</dd>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($this->item->city) : ?>
|
||||
<dt class="venue_city"><?php echo JText::_('COM_JEM_CITY'); ?>:</dt>
|
||||
<dd class="venue_city" itemprop="addressLocality">
|
||||
<?php echo $this->escape($this->item->city); ?>
|
||||
</dd>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($this->item->state) : ?>
|
||||
<dt class="venue_state"><?php echo JText::_('COM_JEM_STATE'); ?>:</dt>
|
||||
<dd class="venue_state" itemprop="addressRegion">
|
||||
<?php echo $this->escape($this->item->state); ?>
|
||||
</dd>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($this->item->country) : ?>
|
||||
<dt class="venue_country"><?php echo JText::_('COM_JEM_COUNTRY'); ?>:</dt>
|
||||
<dd class="venue_country">
|
||||
<?php echo $this->item->countryimg ? $this->item->countryimg : $this->item->country; ?>
|
||||
<meta itemprop="addressCountry" content="<?php echo $this->item->country; ?>" />
|
||||
</dd>
|
||||
<?php endif; ?>
|
||||
|
||||
<!-- PUBLISHING STATE -->
|
||||
<?php if (!empty($this->showvenuestate) && isset($this->item->locpublished)) : ?>
|
||||
<dt class="venue_published"><?php echo JText::_('JSTATUS'); ?>:</dt>
|
||||
<dd class="venue_published">
|
||||
<?php switch ($this->item->locpublished) {
|
||||
case 1: echo JText::_('JPUBLISHED'); break;
|
||||
case 0: echo JText::_('JUNPUBLISHED'); break;
|
||||
case 2: echo JText::_('JARCHIVED'); break;
|
||||
case -2: echo JText::_('JTRASHED'); break;
|
||||
} ?>
|
||||
</dd>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php
|
||||
for ($cr = 1; $cr <= 10; $cr++) {
|
||||
$currentRow = $this->item->{'venue'.$cr};
|
||||
if (preg_match('%^http(s)?://%', $currentRow)) {
|
||||
$currentRow = '<a href="' . $this->escape($currentRow) . '" target="_blank">' . $this->escape($currentRow) . '</a>';
|
||||
}
|
||||
if ($currentRow) {
|
||||
?>
|
||||
<dt class="custom<?php echo $cr; ?>"><?php echo JText::_('COM_JEM_VENUE_CUSTOM_FIELD'.$cr); ?>:</dt>
|
||||
<dd class="custom<?php echo $cr; ?>"><?php echo $currentRow; ?></dd>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
<?php if ($params->get('event_show_mapserv') == 1) : ?>
|
||||
<?php echo JemOutput::mapicon($this->item, 'event', $params); ?>
|
||||
<?php endif; ?>
|
||||
</dl>
|
||||
|
||||
<?php if ($params->get('event_show_mapserv') == 2) : ?>
|
||||
<?php echo JemOutput::mapicon($this->item, 'event', $params); ?>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($params->get('event_show_mapserv') == 3) : ?>
|
||||
<input type="hidden" id="latitude" value="<?php echo $this->item->latitude; ?>">
|
||||
<input type="hidden" id="longitude" value="<?php echo $this->item->longitude; ?>">
|
||||
|
||||
<input type="hidden" id="venue" value="<?php echo $this->item->venue; ?>">
|
||||
<input type="hidden" id="street" value="<?php echo $this->item->street; ?>">
|
||||
<input type="hidden" id="city" value="<?php echo $this->item->city; ?>">
|
||||
<input type="hidden" id="state" value="<?php echo $this->item->state; ?>">
|
||||
<input type="hidden" id="postalCode" value="<?php echo $this->item->postalCode; ?>">
|
||||
|
||||
<?php echo JemOutput::mapicon($this->item, 'event', $params); ?>
|
||||
<?php endif; ?>
|
||||
<?php endif; /* event_show_detailsadress */ ?>
|
||||
|
||||
<?php if ($params->get('event_show_locdescription', '1') && $this->item->locdescription != ''
|
||||
&& $this->item->locdescription != '<br />') : ?>
|
||||
<h2 class="location_desc"><?php echo JText::_('COM_JEM_VENUE_DESCRIPTION'); ?></h2>
|
||||
<div class="description location_desc" itemprop="description">
|
||||
<?php echo $this->item->locdescription; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php $this->attachments = $this->item->vattachments; ?>
|
||||
<?php echo $this->loadTemplate('attachments'); ?>
|
||||
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<!-- Registration -->
|
||||
<?php if ($this->showAttendees) : ?>
|
||||
<p></p>
|
||||
<hr>
|
||||
<h2 class="register"><?php echo JText::_('COM_JEM_REGISTRATION'); ?>:</h2>
|
||||
<?php echo $this->loadTemplate('attendees'); ?>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if (!empty($this->item->pluginevent->onEventEnd)) : ?>
|
||||
<p></p>
|
||||
<hr>
|
||||
<?php echo $this->item->pluginevent->onEventEnd; ?>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="copyright">
|
||||
<?php echo JemOutput::footer(); ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php }
|
||||
?>
|
||||
559
components/com_jem/models/editevent.php
Normal file
559
components/com_jem/models/editevent.php
Normal file
@ -0,0 +1,559 @@
|
||||
<?php
|
||||
/**
|
||||
* @package JEM
|
||||
* @copyright (C) 2013-2024 joomlaeventmanager.net
|
||||
* @copyright (C) 2005-2009 Christoph Lukes
|
||||
* @license https://www.gnu.org/licenses/gpl-3.0 GNU/GPL
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Pagination\Pagination;
|
||||
use Joomla\CMS\Filter\InputFilter;
|
||||
use Joomla\Registry\Registry;
|
||||
use Joomla\Utilities\ArrayHelper;
|
||||
|
||||
// Base this model on the backend version.
|
||||
require_once JPATH_ADMINISTRATOR . '/components/com_jem/models/event.php';
|
||||
|
||||
/**
|
||||
* Editevent Model
|
||||
*/
|
||||
class JemModelEditevent extends JemModelEvent
|
||||
{
|
||||
/**
|
||||
* Method to auto-populate the model state.
|
||||
*
|
||||
* Note. Calling getState in this method will result in recursion.
|
||||
*/
|
||||
protected function populateState()
|
||||
{
|
||||
$app = Factory::getApplication();
|
||||
|
||||
// Load state from the request.
|
||||
$pk = $app->input->getInt('a_id', 0);
|
||||
$this->setState('event.id', $pk);
|
||||
|
||||
$fromId = $app->input->getInt('from_id', 0);
|
||||
$this->setState('event.from_id', $fromId);
|
||||
|
||||
$catid = $app->input->getInt('catid', 0);
|
||||
$this->setState('event.catid', $catid);
|
||||
|
||||
$locid = $app->input->getInt('locid', 0);
|
||||
$this->setState('event.locid', $locid);
|
||||
|
||||
$date = $app->input->getCmd('date', '');
|
||||
$this->setState('event.date', $date);
|
||||
|
||||
$return = $app->input->get('return', '', 'base64');
|
||||
$this->setState('return_page', base64_decode($return));
|
||||
|
||||
// Load the parameters.
|
||||
$params = $app->getParams();
|
||||
$this->setState('params', $params);
|
||||
|
||||
$this->setState('layout', $app->input->getCmd('layout', ''));
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to get event data.
|
||||
*
|
||||
* @param integer The id of the event.
|
||||
*
|
||||
* @return mixed item data object on success, false on failure.
|
||||
*/
|
||||
public function getItem($itemId = null)
|
||||
{
|
||||
$jemsettings = JemHelper::config();
|
||||
|
||||
// Initialise variables.
|
||||
$itemId = (int) (!empty($itemId)) ? $itemId : $this->getState('event.id');
|
||||
|
||||
$doCopy = false;
|
||||
if (!$itemId && $this->getState('event.from_id')) {
|
||||
$itemId = $this->getState('event.from_id');
|
||||
$doCopy = true;
|
||||
}
|
||||
|
||||
// Get a row instance.
|
||||
$table = $this->getTable();
|
||||
|
||||
// Attempt to load the row.
|
||||
$return = $table->load($itemId);
|
||||
|
||||
// Check for a table object error.
|
||||
if ($return === false && $table->getError()) {
|
||||
$this->setError($table->getError());
|
||||
return false;
|
||||
}
|
||||
|
||||
$properties = $table->getProperties(1);
|
||||
$value = ArrayHelper::toObject($properties, 'stdClass');
|
||||
|
||||
if ($doCopy) {
|
||||
$value->id = 0;
|
||||
$value->author_ip = '';
|
||||
$value->created = '';
|
||||
$value->created_by = '';
|
||||
$value->created_by_alias = '';
|
||||
$value->modified = '';
|
||||
$value->modified_by = '';
|
||||
$value->version = '';
|
||||
$value->hits = '';
|
||||
$value->recurrence_type = 0;
|
||||
$value->recurrence_first_id = 0;
|
||||
$value->recurrence_counter = 0;
|
||||
}
|
||||
|
||||
// Backup current recurrence values
|
||||
if ($value->id) {
|
||||
$value->recurr_bak = new stdClass;
|
||||
foreach (get_object_vars($value) as $k => $v) {
|
||||
if (strncmp('recurrence_', $k, 11) === 0) {
|
||||
$value->recurr_bak->$k = $v;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Convert attrib field to Registry.
|
||||
$registry = new Registry();
|
||||
$registry->loadString($value->attribs ?? '{}');
|
||||
|
||||
$globalregistry = JemHelper::globalattribs();
|
||||
|
||||
$value->params = clone $globalregistry;
|
||||
$value->params->merge($registry);
|
||||
|
||||
// Compute selected asset permissions.
|
||||
$user = JemFactory::getUser();
|
||||
//$userId = $user->get('id');
|
||||
//$asset = 'com_jem.event.' . $value->id;
|
||||
//$asset = 'com_jem';
|
||||
|
||||
$db = Factory::getContainer()->get('DatabaseDriver');
|
||||
$query = $db->getQuery(true);
|
||||
$query->select(array('count(id)'));
|
||||
$query->from('#__jem_register');
|
||||
$query->where(array('event = ' . $db->quote($value->id), 'waiting = 0', 'status = 1'));
|
||||
|
||||
$db->setQuery($query);
|
||||
$res = $db->loadResult();
|
||||
$value->booked = (int)$res;
|
||||
if (!empty($value->maxplaces)) {
|
||||
$value->avplaces = $value->maxplaces - $value->booked;
|
||||
}
|
||||
|
||||
// Get attachments - but not on copied events
|
||||
$files = JemAttachment::getAttachments('event' . $value->id);
|
||||
$value->attachments = $files;
|
||||
|
||||
// Preset values on new events
|
||||
if (!$itemId) {
|
||||
$catid = (int) $this->getState('event.catid');
|
||||
$locid = (int) $this->getState('event.locid');
|
||||
$date = $this->getState('event.date');
|
||||
|
||||
// ???
|
||||
if (empty($value->catid) && !empty($catid)) {
|
||||
$value->catid = $catid;
|
||||
}
|
||||
|
||||
if (empty($value->locid) && !empty($locid)) {
|
||||
$value->locid = $locid;
|
||||
}
|
||||
|
||||
if (empty($value->dates) && JemHelper::isValidDate($date)) {
|
||||
$value->dates = $date;
|
||||
}
|
||||
}
|
||||
|
||||
// Check edit permission.
|
||||
$value->params->set('access-edit', $user->can('edit', 'event', $value->id, $value->created_by));
|
||||
|
||||
// Check edit state permission.
|
||||
if (!$itemId && ($catId = (int) $this->getState('event.catid'))) {
|
||||
// New item.
|
||||
$cats = array($catId);
|
||||
} else {
|
||||
// Existing item (or no category)
|
||||
$cats = false;
|
||||
}
|
||||
$value->params->set('access-change', $user->can('publish', 'event', $value->id, $value->created_by, $cats));
|
||||
|
||||
$value->author_ip = $jemsettings->storeip ? JemHelper::retrieveIP() : false;
|
||||
|
||||
$value->articletext = $value->introtext;
|
||||
if (!empty($value->fulltext)) {
|
||||
$value->articletext .= '<hr id="system-readmore" />' . $value->fulltext;
|
||||
}
|
||||
|
||||
return $value;
|
||||
}
|
||||
|
||||
protected function loadForm($name, $source = null, $options = array(), $clear = false, $xpath = false)
|
||||
{
|
||||
// JForm::addFieldPath(JPATH_COMPONENT_ADMINISTRATOR . '/models/fields');
|
||||
|
||||
return parent::loadForm($name, $source, $options, $clear, $xpath);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the return URL.
|
||||
*
|
||||
* @return string return URL.
|
||||
*/
|
||||
public function getReturnPage()
|
||||
{
|
||||
return base64_encode($this->getState('return_page'));
|
||||
}
|
||||
|
||||
############
|
||||
## VENUES ##
|
||||
############
|
||||
|
||||
/**
|
||||
* Get venues-data
|
||||
*/
|
||||
public function getVenues()
|
||||
{
|
||||
$query = $this->buildQueryVenues();
|
||||
$pagination = $this->getVenuesPagination();
|
||||
|
||||
$rows = $this->_getList($query, $pagination->limitstart, $pagination->limit);
|
||||
|
||||
return $rows;
|
||||
}
|
||||
|
||||
/**
|
||||
* venues-query
|
||||
*/
|
||||
protected function buildQueryVenues()
|
||||
{
|
||||
$app = Factory::getApplication();
|
||||
$params = JemHelper::globalattribs();
|
||||
|
||||
$filter_order = $app->getUserStateFromRequest('com_jem.selectvenue.filter_order', 'filter_order', 'l.venue', 'cmd');
|
||||
$filter_order_Dir = $app->getUserStateFromRequest('com_jem.selectvenue.filter_order_Dir', 'filter_order_Dir', 'ASC', 'word');
|
||||
|
||||
$filter_order = InputFilter::getinstance()->clean($filter_order, 'cmd');
|
||||
$filter_order_Dir = InputFilter::getinstance()->clean($filter_order_Dir, 'word');
|
||||
|
||||
$filter_type = $app->getUserStateFromRequest('com_jem.selectvenue.filter_type', 'filter_type', 0, 'int');
|
||||
$search = $app->getUserStateFromRequest('com_jem.selectvenue.filter_search', 'filter_search', '', 'string');
|
||||
$search = $this->_db->escape(trim(\Joomla\String\StringHelper::strtolower($search)));
|
||||
|
||||
// Query
|
||||
$db = Factory::getContainer()->get('DatabaseDriver');
|
||||
$query = $db->getQuery(true);
|
||||
$query->select(array('l.id','l.state','l.city','l.country','l.published','l.venue','l.ordering'));
|
||||
$query->from('#__jem_venues as l');
|
||||
|
||||
// where
|
||||
$where = array();
|
||||
$where[] = 'l.published = 1';
|
||||
|
||||
/* something to search for? (we like to search for "0" too) */
|
||||
if ($search || ($search === "0")) {
|
||||
switch ($filter_type) {
|
||||
case 1: /* Search venues */
|
||||
$where[] = 'LOWER(l.venue) LIKE "%' . $search . '%"';
|
||||
break;
|
||||
case 2: // Search city
|
||||
$where[] = 'LOWER(l.city) LIKE "%' . $search . '%"';
|
||||
break;
|
||||
case 3: // Search state
|
||||
$where[] = 'LOWER(l.state) LIKE "%' . $search . '%"';
|
||||
}
|
||||
}
|
||||
|
||||
if ($params->get('global_show_ownedvenuesonly')) {
|
||||
$user = JemFactory::getUser();
|
||||
$userid = $user->get('id');
|
||||
$where[] = ' created_by = ' . (int) $userid;
|
||||
}
|
||||
|
||||
$query->where($where);
|
||||
|
||||
if (strtoupper($filter_order_Dir) !== 'DESC') {
|
||||
$filter_order_Dir = 'ASC';
|
||||
}
|
||||
|
||||
// ordering
|
||||
if ($filter_order && $filter_order_Dir) {
|
||||
$orderby = $filter_order . ' ' . $filter_order_Dir;
|
||||
} else {
|
||||
$orderby = array('l.venue ASC','l.ordering ASC');
|
||||
}
|
||||
$query->order($orderby);
|
||||
|
||||
return $query;
|
||||
}
|
||||
|
||||
/**
|
||||
* venues-Pagination
|
||||
**/
|
||||
public function getVenuesPagination()
|
||||
{
|
||||
$jemsettings = JemHelper::config();
|
||||
$app = Factory::getApplication();
|
||||
$limit = $app->getUserStateFromRequest('com_jem.selectvenue.limit', 'limit', $jemsettings->display_num, 'int');
|
||||
$limitstart = $app->input->getInt('limitstart', 0);
|
||||
// correct start value if required
|
||||
$limitstart = $limit ? (int)(floor($limitstart / $limit) * $limit) : 0;
|
||||
|
||||
$query = $this->buildQueryVenues();
|
||||
$total = $this->_getListCount($query);
|
||||
|
||||
// Create the pagination object
|
||||
$pagination = new Pagination($total, $limitstart, $limit);
|
||||
|
||||
return $pagination;
|
||||
}
|
||||
|
||||
##############
|
||||
## CONTACTS ##
|
||||
##############
|
||||
|
||||
/**
|
||||
* Get contacts-data
|
||||
*/
|
||||
public function getContacts()
|
||||
{
|
||||
$query = $this->buildQueryContacts();
|
||||
$pagination = $this->getContactsPagination();
|
||||
|
||||
$rows = $this->_getList($query, $pagination->limitstart, $pagination->limit);
|
||||
|
||||
return $rows;
|
||||
}
|
||||
|
||||
/**
|
||||
* contacts-Pagination
|
||||
**/
|
||||
public function getContactsPagination()
|
||||
{
|
||||
$jemsettings = JemHelper::config();
|
||||
$app = Factory::getApplication();
|
||||
$limit = $app->getUserStateFromRequest('com_jem.selectcontact.limit', 'limit', $jemsettings->display_num, 'int');
|
||||
$limitstart = $app->input->getInt('limitstart', 0);
|
||||
// correct start value if required
|
||||
$limitstart = $limit ? (int)(floor($limitstart / $limit) * $limit) : 0;
|
||||
|
||||
$query = $this->buildQueryContacts();
|
||||
$total = $this->_getListCount($query);
|
||||
|
||||
// Create the pagination object
|
||||
$pagination = new Pagination($total, $limitstart, $limit);
|
||||
|
||||
return $pagination;
|
||||
}
|
||||
|
||||
/**
|
||||
* contacts-query
|
||||
*/
|
||||
protected function buildQueryContacts()
|
||||
{
|
||||
$app = Factory::getApplication();
|
||||
$jemsettings = JemHelper::config();
|
||||
|
||||
$filter_order = $app->getUserStateFromRequest('com_jem.selectcontact.filter_order', 'filter_order', 'con.ordering', 'cmd');
|
||||
$filter_order_Dir = $app->getUserStateFromRequest('com_jem.selectcontact.filter_order_Dir', 'filter_order_Dir', '', 'word');
|
||||
|
||||
$filter_order = InputFilter::getinstance()->clean($filter_order, 'cmd');
|
||||
$filter_order_Dir = InputFilter::getinstance()->clean($filter_order_Dir, 'word');
|
||||
|
||||
$filter_type = $app->getUserStateFromRequest('com_jem.selectcontact.filter_type', 'filter_type', 0, 'int');
|
||||
$search = $app->getUserStateFromRequest('com_jem.selectcontact.filter_search', 'filter_search', '', 'string');
|
||||
$search = $this->_db->escape(trim(\Joomla\String\StringHelper::strtolower($search)));
|
||||
|
||||
// Query
|
||||
$db = Factory::getContainer()->get('DatabaseDriver');
|
||||
$query = $db->getQuery(true);
|
||||
$query->select(array('con.*'));
|
||||
$query->from('#__contact_details As con');
|
||||
|
||||
// where
|
||||
$where = array();
|
||||
$where[] = 'con.published = 1';
|
||||
|
||||
/* something to search for? (we like to search for "0" too) */
|
||||
if ($search || ($search === "0")) {
|
||||
switch ($filter_type) {
|
||||
case 1: /* Search name */
|
||||
$where[] = ' LOWER(con.name) LIKE \'%' . $search . '%\' ';
|
||||
break;
|
||||
case 2: /* Search address (not supported yet, privacy) */
|
||||
//$where[] = ' LOWER(con.address) LIKE \'%' . $search . '%\' ';
|
||||
break;
|
||||
case 3: // Search city
|
||||
$where[] = ' LOWER(con.suburb) LIKE \'%' . $search . '%\' ';
|
||||
break;
|
||||
case 4: // Search state
|
||||
$where[] = ' LOWER(con.state) LIKE \'%' . $search . '%\' ';
|
||||
break;
|
||||
}
|
||||
}
|
||||
$query->where($where);
|
||||
|
||||
// ordering
|
||||
|
||||
// ensure it's a valid order direction (asc, desc or empty)
|
||||
if (!empty($filter_order_Dir) && strtoupper($filter_order_Dir) !== 'DESC') {
|
||||
$filter_order_Dir = 'ASC';
|
||||
}
|
||||
|
||||
if ($filter_order != '') {
|
||||
$orderby = $filter_order . ' ' . $filter_order_Dir;
|
||||
if ($filter_order != 'con.name') {
|
||||
$orderby = array($orderby, 'con.name'); // in case of city or state we should have a useful second ordering
|
||||
}
|
||||
} else {
|
||||
$orderby = 'con.name';
|
||||
}
|
||||
$query->order($orderby);
|
||||
|
||||
return $query;
|
||||
}
|
||||
|
||||
###########
|
||||
## USERS ##
|
||||
###########
|
||||
|
||||
/**
|
||||
* Get users data
|
||||
*/
|
||||
public function getUsers()
|
||||
{
|
||||
$query = $this->buildQueryUsers();
|
||||
$pagination = $this->getUsersPagination();
|
||||
|
||||
$rows = $this->_getList($query, $pagination->limitstart, $pagination->limit);
|
||||
|
||||
// Add registration status if available
|
||||
$itemId = (int)$this->getState('event.id');
|
||||
$db = Factory::getContainer()->get('DatabaseDriver');
|
||||
$qry = $db->getQuery(true);
|
||||
// #__jem_register (id, event, uid, waiting, status, comment)
|
||||
$qry->select(array('reg.uid, reg.status, reg.waiting, reg.places'));
|
||||
$qry->from('#__jem_register As reg');
|
||||
$qry->where('reg.event = ' . $itemId);
|
||||
$db->setQuery($qry);
|
||||
$regs = $db->loadObjectList('uid');
|
||||
|
||||
// JemHelper::addLogEntry((string)$qry . "\n" . print_r($regs, true), __METHOD__);
|
||||
|
||||
foreach ($rows AS &$row) {
|
||||
if (array_key_exists($row->id, $regs)) {
|
||||
$row->status = $regs[$row->id]->status;
|
||||
$row->places = $regs[$row->id]->places;
|
||||
if ($row->status == 1 && $regs[$row->id]->waiting) {
|
||||
++$row->status;
|
||||
}
|
||||
} else {
|
||||
$row->status = -99;
|
||||
$row->places = 0;
|
||||
}
|
||||
}
|
||||
|
||||
return $rows;
|
||||
}
|
||||
|
||||
/**
|
||||
* users-Pagination
|
||||
**/
|
||||
public function getUsersPagination()
|
||||
{
|
||||
$jemsettings = JemHelper::config();
|
||||
$app = Factory::getApplication();
|
||||
$limit = 0;//$app->getUserStateFromRequest('com_jem.selectusers.limit', 'limit', $jemsettings->display_num, 'int');
|
||||
$limitstart = 0;//$app->input->getInt('limitstart', 0);
|
||||
// correct start value if required
|
||||
$limitstart = $limit ? (int)(floor($limitstart / $limit) * $limit) : 0;
|
||||
|
||||
$query = $this->buildQueryUsers();
|
||||
$total = $this->_getListCount($query);
|
||||
|
||||
// Create the pagination object
|
||||
$pagination = new Pagination($total, $limitstart, $limit);
|
||||
|
||||
return $pagination;
|
||||
}
|
||||
|
||||
/**
|
||||
* users-query
|
||||
*/
|
||||
protected function buildQueryUsers()
|
||||
{
|
||||
$app = Factory::getApplication();
|
||||
$jemsettings = JemHelper::config();
|
||||
|
||||
// no filters, hard-coded
|
||||
$filter_order = 'usr.name';
|
||||
$filter_order_Dir = '';
|
||||
$filter_type = '';
|
||||
$search = '';
|
||||
|
||||
// Query
|
||||
$db = Factory::getContainer()->get('DatabaseDriver');
|
||||
$query = $db->getQuery(true);
|
||||
$query->select(array('usr.id, usr.name'));
|
||||
$query->from('#__users As usr');
|
||||
|
||||
// where
|
||||
$where = array();
|
||||
$where[] = 'usr.block = 0';
|
||||
$where[] = 'NOT usr.activation > 0';
|
||||
|
||||
/* something to search for? (we like to search for "0" too) */
|
||||
if ($search || ($search === "0")) {
|
||||
switch ($filter_type) {
|
||||
case 1: /* Search name */
|
||||
$where[] = ' LOWER(usr.name) LIKE \'%' . $search . '%\' ';
|
||||
break;
|
||||
}
|
||||
}
|
||||
$query->where($where);
|
||||
|
||||
// ordering
|
||||
|
||||
// ensure it's a valid order direction (asc, desc or empty)
|
||||
if (!empty($filter_order_Dir) && strtoupper($filter_order_Dir) !== 'DESC') {
|
||||
$filter_order_Dir = 'ASC';
|
||||
}
|
||||
|
||||
if ($filter_order != '') {
|
||||
$orderby = $filter_order . ' ' . $filter_order_Dir;
|
||||
if ($filter_order != 'usr.name') {
|
||||
$orderby = array($orderby, 'usr.name'); // in case of (???) we should have a useful second ordering
|
||||
}
|
||||
} else {
|
||||
$orderby = 'usr.name ' . $filter_order_Dir;
|
||||
}
|
||||
$query->order($orderby);
|
||||
|
||||
return $query;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get list of invited users.
|
||||
*/
|
||||
public function getInvitedUsers()
|
||||
{
|
||||
$itemId = (int)$this->getState('event.id');
|
||||
$db = Factory::getContainer()->get('DatabaseDriver');
|
||||
$query = $db->getQuery(true);
|
||||
// #__jem_register (id, event, uid, waiting, status, comment)
|
||||
$query->select(array('reg.uid'));
|
||||
$query->from('#__jem_register As reg');
|
||||
$query->where('reg.event = ' . $itemId);
|
||||
$query->where('reg.status = 0');
|
||||
$db->setQuery($query);
|
||||
$regs = $db->loadColumn();
|
||||
|
||||
// JemHelper::addLogEntry((string)$query . "\n" . implode(',', $regs), __METHOD__);
|
||||
return $regs;
|
||||
}
|
||||
|
||||
}
|
||||
146
components/com_jem/models/editvenue.php
Normal file
146
components/com_jem/models/editvenue.php
Normal file
@ -0,0 +1,146 @@
|
||||
<?php
|
||||
/**
|
||||
* @package JEM
|
||||
* @copyright (C) 2013-2024 joomlaeventmanager.net
|
||||
* @copyright (C) 2005-2009 Christoph Lukes
|
||||
* @license https://www.gnu.org/licenses/gpl-3.0 GNU/GPL
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\Utilities\ArrayHelper;
|
||||
|
||||
// Base this model on the backend version.
|
||||
require_once JPATH_ADMINISTRATOR . '/components/com_jem/models/venue.php';
|
||||
|
||||
/**
|
||||
* Editvenue Model
|
||||
*/
|
||||
class JemModelEditvenue extends JemModelVenue
|
||||
{
|
||||
/**
|
||||
* Model typeAlias string. Used for version history.
|
||||
* @var string
|
||||
*/
|
||||
public $typeAlias = 'com_jem.venue';
|
||||
|
||||
|
||||
/**
|
||||
* Method to auto-populate the model state.
|
||||
*
|
||||
* Note. Calling getState in this method will result in recursion.
|
||||
*/
|
||||
protected function populateState()
|
||||
{
|
||||
$app = Factory::getApplication();
|
||||
|
||||
// Load state from the request.
|
||||
$pk = $app->input->getInt('a_id', 0);
|
||||
$this->setState('venue.id', $pk);
|
||||
|
||||
$fromId = $app->input->getInt('from_id', 0);
|
||||
$this->setState('venue.from_id', $fromId);
|
||||
|
||||
$return = $app->input->get('return', '', 'base64');
|
||||
$this->setState('return_page', base64_decode($return));
|
||||
|
||||
// Load the parameters.
|
||||
$params = $app->getParams();
|
||||
$this->setState('params', $params);
|
||||
|
||||
$this->setState('layout', $app->input->getCmd('layout', ''));
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to get venue data.
|
||||
*
|
||||
* @param integer The id of the venue.
|
||||
* @return mixed item data object on success, false on failure.
|
||||
*/
|
||||
public function getItem($itemId = null)
|
||||
{
|
||||
$jemsettings = JemHelper::config();
|
||||
$user = JemFactory::getUser();
|
||||
|
||||
// Initialise variables.
|
||||
$itemId = (int) (!empty($itemId)) ? $itemId : $this->getState('venue.id');
|
||||
|
||||
$doCopy = false;
|
||||
if (!$itemId && $this->getState('venue.from_id')) {
|
||||
$itemId = $this->getState('venue.from_id');
|
||||
$doCopy = true;
|
||||
}
|
||||
|
||||
// Get a row instance.
|
||||
$table = $this->getTable();
|
||||
|
||||
// Attempt to load the row.
|
||||
$return = $table->load($itemId);
|
||||
|
||||
// Check for a table object error.
|
||||
if ($return === false && $table->getError()) {
|
||||
$this->setError($table->getError());
|
||||
return false;
|
||||
}
|
||||
|
||||
$properties = $table->getProperties(1);
|
||||
$value = ArrayHelper::toObject($properties, 'stdClass');
|
||||
|
||||
if ($doCopy) {
|
||||
$value->id = 0;
|
||||
$value->author_ip = '';
|
||||
$value->created = '';
|
||||
$value->created_by = '';
|
||||
$value->modified = '';
|
||||
$value->modified_by = '';
|
||||
$value->version = '';
|
||||
}
|
||||
|
||||
// Convert attrib field to Registry.
|
||||
//$registry = new Registry();
|
||||
//$registry->loadString($value->attribs);
|
||||
|
||||
$globalregistry = JemHelper::globalattribs();
|
||||
|
||||
$value->params = clone $globalregistry;
|
||||
//$value->params->merge($registry);
|
||||
|
||||
// Compute selected asset permissions.
|
||||
// Check edit permission.
|
||||
$value->params->set('access-edit', $user->can('edit', 'venue', $value->id, $value->created_by));
|
||||
// Check edit state permission.
|
||||
$value->params->set('access-change', $user->can('publish', 'venue', $value->id, $value->created_by));
|
||||
|
||||
$value->author_ip = $jemsettings->storeip ? JemHelper::retrieveIP() : false;
|
||||
|
||||
// Get attachments - but not on copied venues
|
||||
$files = JemAttachment::getAttachments('venue' . $value->id);
|
||||
$value->attachments = $files;
|
||||
|
||||
// Preset values on new venues
|
||||
if (isset($jemsettings->defaultCountry) && empty($itemId)) {
|
||||
$value->country = $jemsettings->defaultCountry;
|
||||
}
|
||||
|
||||
return $value;
|
||||
}
|
||||
|
||||
protected function loadForm($name, $source = null, $options = array(), $clear = false, $xpath = false)
|
||||
{
|
||||
// JForm::addFieldPath(JPATH_COMPONENT_ADMINISTRATOR . '/models/fields');
|
||||
|
||||
return parent::loadForm($name, $source, $options, $clear, $xpath);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the return URL.
|
||||
*
|
||||
* @return string return URL.
|
||||
*/
|
||||
public function getReturnPage()
|
||||
{
|
||||
return base64_encode($this->getState('return_page'));
|
||||
}
|
||||
|
||||
}
|
||||
977
components/com_jem/models/event.php
Normal file
977
components/com_jem/models/event.php
Normal file
@ -0,0 +1,977 @@
|
||||
<?php
|
||||
/**
|
||||
* @package JEM
|
||||
* @copyright (C) 2013-2024 joomlaeventmanager.net
|
||||
* @copyright (C) 2005-2009 Christoph Lukes
|
||||
* @license https://www.gnu.org/licenses/gpl-3.0 GNU/GPL
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Filter\OutputFilter;
|
||||
use Joomla\CMS\MVC\Model\ItemModel;
|
||||
use Joomla\CMS\Language\Multilanguage;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\Registry\Registry;
|
||||
/**
|
||||
* Event-Model
|
||||
*/
|
||||
class JemModelEvent extends ItemModel
|
||||
{
|
||||
/**
|
||||
* Model context string.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $_context = 'com_jem.event';
|
||||
|
||||
protected $_registers = null;
|
||||
|
||||
/**
|
||||
* Method to auto-populate the model state.
|
||||
*
|
||||
* Note. Calling getState in this method will result in recursion.
|
||||
*/
|
||||
protected function populateState()
|
||||
{
|
||||
$app = Factory::getApplication('site');
|
||||
|
||||
// Load state from the request.
|
||||
$pk = $app->input->getInt('id', 0);
|
||||
$this->setState('event.id', $pk);
|
||||
|
||||
$offset = $app->input->getInt('limitstart', 0);
|
||||
$this->setState('list.offset', $offset);
|
||||
|
||||
// Load the parameters.
|
||||
$params = $app->getParams('com_jem');
|
||||
$this->setState('params', $params);
|
||||
|
||||
$this->setState('filter.language', Multilanguage::isEnabled());
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to get event data.
|
||||
*
|
||||
* @param int The id of the event.
|
||||
* @return mixed item data object on success, false on failure.
|
||||
*/
|
||||
public function getItem($pk = null)
|
||||
{
|
||||
// Initialise variables.
|
||||
$pk = (!empty($pk)) ? $pk : (int) $this->getState('event.id');
|
||||
|
||||
if ($this->_item === null) {
|
||||
$this->_item = array();
|
||||
}
|
||||
|
||||
if (!isset($this->_item[$pk]))
|
||||
{
|
||||
try
|
||||
{
|
||||
$settings = JemHelper::globalattribs();
|
||||
$user = JemFactory::getUser();
|
||||
$levels = $user->getAuthorisedViewLevels();
|
||||
|
||||
$db = Factory::getContainer()->get('DatabaseDriver');
|
||||
$query = $db->getQuery(true);
|
||||
|
||||
# Event
|
||||
$query->select(
|
||||
$this->getState('item.select',
|
||||
'a.id, a.id AS did, a.title, a.alias, a.dates, a.enddates, a.times, a.endtimes, a.access, a.attribs, a.metadata, ' .
|
||||
'a.custom1, a.custom2, a.custom3, a.custom4, a.custom5, a.custom6, a.custom7, a.custom8, a.custom9, a.custom10, ' .
|
||||
'a.created, a.created_by, a.published, a.registra, a.registra_from, a.registra_until, a.unregistra, a.unregistra_until, a.reginvitedonly, ' .
|
||||
'CASE WHEN a.modified = 0 THEN a.created ELSE a.modified END as modified, a.modified_by, ' .
|
||||
'a.checked_out, a.checked_out_time, a.datimage, a.version, a.featured, ' .
|
||||
'a.seriesbooking, a.singlebooking, a.meta_keywords, a.meta_description, a.created_by_alias, a.introtext, a.fulltext, a.maxplaces, a.reservedplaces, a.minbookeduser, a.maxbookeduser, a.waitinglist, a.requestanswer, ' .
|
||||
'a.hits, a.language, a.recurrence_type, a.recurrence_first_id'));
|
||||
$query->from('#__jem_events AS a');
|
||||
|
||||
# Author
|
||||
$name = $settings->get('global_regname','1') ? 'u.name' : 'u.username';
|
||||
$query->select($name.' AS author');
|
||||
$query->join('LEFT', '#__users AS u on u.id = a.created_by');
|
||||
|
||||
# Contact
|
||||
$query->select('con.id AS conid, con.name AS conname, con.catid AS concatid, con.telephone AS contelephone, con.email_to AS conemail');
|
||||
$query->join('LEFT', '#__contact_details AS con ON con.id = a.contactid');
|
||||
|
||||
# Venue
|
||||
$query->select('l.custom1 AS venue1, l.custom2 AS venue2, l.custom3 AS venue3, l.custom4 AS venue4, l.custom5 AS venue5, ' .
|
||||
'l.custom6 AS venue6, l.custom7 AS venue7, l.custom8 AS venue8, l.custom9 AS venue9, l.custom10 AS venue10, ' .
|
||||
'l.id AS locid, l.alias AS localias, l.venue, l.city, l.state, l.url, l.locdescription, l.locimage, ' .
|
||||
'l.postalCode, l.street, l.country, l.map, l.created_by AS venueowner, l.latitude, l.longitude, ' .
|
||||
'l.checked_out AS vChecked_out, l.checked_out_time AS vChecked_out_time, l.published as locpublished');
|
||||
$query->join('LEFT', '#__jem_venues AS l ON a.locid = l.id');
|
||||
|
||||
# Join over the category tables
|
||||
$query->join('LEFT', '#__jem_cats_event_relations AS rel ON rel.itemid = a.id');
|
||||
$query->join('LEFT', '#__jem_categories AS c ON c.id = rel.catid');
|
||||
|
||||
# Get contact id
|
||||
$subQuery = $db->getQuery(true);
|
||||
$subQuery->select('MAX(contact.id) AS id');
|
||||
$subQuery->from('#__contact_details AS contact');
|
||||
$subQuery->where('contact.published = 1');
|
||||
$subQuery->where('contact.user_id = a.created_by');
|
||||
|
||||
# Filter contact by language
|
||||
if ($this->getState('filter.language')) {
|
||||
$subQuery->where('(contact.language in (' . $db->quote(Factory::getApplication()->getLanguage()->getTag()) . ',' . $db->quote('*') . ') OR contact.language IS NULL)');
|
||||
}
|
||||
|
||||
$query->select('(' . $subQuery . ') as contactid2');
|
||||
|
||||
# Filter event by language
|
||||
/* commented out yet because it's incomplete
|
||||
if ($this->getState('filter.language')) {
|
||||
$query->where('a.language in (' . $db->quote(Factory::getApplication()->getLanguage()->getTag()) . ',' . $db->quote('*') . ')');
|
||||
}
|
||||
*/
|
||||
|
||||
$query->where('a.id = ' . (int) $pk);
|
||||
|
||||
# Filter by published state ==> later.
|
||||
// It would result in too complicated query.
|
||||
// It's easier to get data and check then e.g. for event owner etc.
|
||||
|
||||
# Filter by categories
|
||||
$cats = $this->getCategories('all');
|
||||
if (!empty($cats)) {
|
||||
$query->where('c.id IN (' . implode(',', $cats) . ')');
|
||||
}
|
||||
|
||||
# Get the item
|
||||
//$query->group('a.id');
|
||||
|
||||
// if ($error = $db->getErrorMsg()) {
|
||||
// throw new Exception($error);
|
||||
// }
|
||||
try
|
||||
{
|
||||
$db->setQuery($query);
|
||||
$data = $db->loadObject();
|
||||
|
||||
}
|
||||
catch (RuntimeException $e)
|
||||
{
|
||||
Factory::getApplication()->enqueueMessage($e->getMessage(), 'notice');
|
||||
}
|
||||
|
||||
if (empty($data)) {
|
||||
throw new Exception(Text::_('COM_JEM_EVENT_ERROR_EVENT_NOT_FOUND'), 404);
|
||||
}
|
||||
|
||||
# Convert parameter fields to objects.
|
||||
$registry = new Registry;
|
||||
$registry->loadString($data->attribs);
|
||||
$data->params = JemHelper::globalattribs(); // returns Registry object
|
||||
$data->params->merge($registry);
|
||||
|
||||
$registry = new Registry;
|
||||
$registry->loadString($data->metadata);
|
||||
$data->metadata = $registry;
|
||||
|
||||
$data->categories = $this->getCategories($pk);
|
||||
|
||||
# Compute selected asset permissions.
|
||||
$access_edit = $user->can('edit', 'event', $data->id, $data->created_by);
|
||||
$access_view = (($data->published == 1) || ($data->published == 2) || // published and archived event
|
||||
(($data->published == 0) && $access_edit) || // unpublished for editors,
|
||||
$user->can('publish', 'event', $data->id, $data->created_by)); // all for publishers
|
||||
|
||||
$data->params->set('access-edit', $access_edit);
|
||||
|
||||
# Compute view access permissions.
|
||||
|
||||
# event can be shown if
|
||||
# - user has matching view access level and
|
||||
# - there is at least one category attached user can see and
|
||||
# - publishing state and user permissions allow that (e.g. unpublished event but user is editor, owner, or publisher)
|
||||
$data->params->set('access-view', $access_view && !empty($data->categories) && in_array($data->access, $levels));
|
||||
|
||||
$this->_item[$pk] = $data;
|
||||
}
|
||||
catch (Exception $e)
|
||||
{
|
||||
if ($e->getCode() == 404) {
|
||||
// Need to go thru the error handler to allow Redirect to
|
||||
// work.
|
||||
Factory::getApplication()->enqueueMessage($e->getMessage(), 'error');
|
||||
return false;
|
||||
}
|
||||
else {
|
||||
$this->setError($e);
|
||||
$this->_item[$pk] = false;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# Get event attachments
|
||||
$this->_item[$pk]->attachments = JemAttachment::getAttachments('event' . $this->_item[$pk]->did);
|
||||
|
||||
# Get venue attachments
|
||||
$this->_item[$pk]->vattachments = JemAttachment::getAttachments('venue' . $this->_item[$pk]->locid);
|
||||
|
||||
// Define Booked
|
||||
$db = Factory::getContainer()->get('DatabaseDriver');
|
||||
$query = $db->getQuery(true);
|
||||
$query->select('SUM(places)');
|
||||
$query->from('#__jem_register');
|
||||
$query->where(array('event = ' . $db->quote($this->_item[$pk]->did), 'waiting = 0', 'status = 1'));
|
||||
$db->setQuery($query);
|
||||
try {
|
||||
$res = $db->loadResult();
|
||||
}
|
||||
catch (Exception $e) {
|
||||
$res = 0;
|
||||
}
|
||||
$this->_item[$pk]->booked = $res;
|
||||
|
||||
return $this->_item[$pk];
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Method to get list recurrence events data.
|
||||
*
|
||||
* @param int The id of the event.
|
||||
* @param int The id of the parent event.
|
||||
* @return mixed item data object on success, false on failure.
|
||||
*/
|
||||
public function getListRecurrenceEventsbyId ($id, $pk, $datetimeFrom, $iduser=null, $status=null)
|
||||
{
|
||||
// Initialise variables.
|
||||
$pk = (!empty($pk)) ? $pk : (int) $this->getState('event.id');
|
||||
|
||||
if ($this->_item === null) {
|
||||
$this->_item = array();
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
$settings = JemHelper::globalattribs();
|
||||
$user = JemFactory::getUser();
|
||||
$levels = $user->getAuthorisedViewLevels();
|
||||
|
||||
$db = Factory::getContainer()->get('DatabaseDriver');
|
||||
$query = $db->getQuery(true);
|
||||
|
||||
# Event
|
||||
$query->select(
|
||||
$this->getState('item.select',
|
||||
'a.id, a.id AS did, a.title, a.alias, a.dates, a.enddates, a.times, a.endtimes, a.access, a.attribs, a.metadata, ' .
|
||||
'a.custom1, a.custom2, a.custom3, a.custom4, a.custom5, a.custom6, a.custom7, a.custom8, a.custom9, a.custom10, ' .
|
||||
'a.created, a.created_by, a.published, a.registra, a.registra_from, a.registra_until, a.unregistra, a.unregistra_until, ' .
|
||||
'CASE WHEN a.modified = 0 THEN a.created ELSE a.modified END as modified, a.modified_by, ' .
|
||||
'a.checked_out, a.checked_out_time, a.datimage, a.version, a.featured, ' .
|
||||
'a.seriesbooking, a.singlebooking, a.meta_keywords, a.meta_description, a.created_by_alias, a.introtext, a.fulltext, a.maxplaces, a.reservedplaces, a.minbookeduser, a.maxbookeduser, a.waitinglist, a.requestanswer, ' .
|
||||
'a.hits, a.language, a.recurrence_type, a.recurrence_first_id' . ($iduser? ', r.waiting, r.places, r.status':''))) ;
|
||||
$query->from('#__jem_events AS a');
|
||||
|
||||
# Author
|
||||
$name = $settings->get('global_regname','1') ? 'u.name' : 'u.username';
|
||||
$query->select($name.' AS author');
|
||||
$query->join('LEFT', '#__users AS u on u.id = a.created_by');
|
||||
|
||||
# Contact
|
||||
$query->select('con.id AS conid, con.name AS conname, con.telephone AS contelephone, con.email_to AS conemail');
|
||||
$query->join('LEFT', '#__contact_details AS con ON con.id = a.contactid');
|
||||
|
||||
# Venue
|
||||
$query->select('l.custom1 AS venue1, l.custom2 AS venue2, l.custom3 AS venue3, l.custom4 AS venue4, l.custom5 AS venue5, ' .
|
||||
'l.custom6 AS venue6, l.custom7 AS venue7, l.custom8 AS venue8, l.custom9 AS venue9, l.custom10 AS venue10, ' .
|
||||
'l.id AS locid, l.alias AS localias, l.venue, l.city, l.state, l.url, l.locdescription, l.locimage, ' .
|
||||
'l.postalCode, l.street, l.country, l.map, l.created_by AS venueowner, l.latitude, l.longitude, ' .
|
||||
'l.checked_out AS vChecked_out, l.checked_out_time AS vChecked_out_time, l.published as locpublished');
|
||||
$query->join('LEFT', '#__jem_venues AS l ON a.locid = l.id');
|
||||
|
||||
# Join over the category tables
|
||||
$query->join('LEFT', '#__jem_cats_event_relations AS rel ON rel.itemid = a.id');
|
||||
$query->join('LEFT', '#__jem_categories AS c ON c.id = rel.catid');
|
||||
|
||||
# Get contact id
|
||||
$subQuery = $db->getQuery(true);
|
||||
$subQuery->select('MAX(contact.id) AS id');
|
||||
$subQuery->from('#__contact_details AS contact');
|
||||
$subQuery->where('contact.published = 1');
|
||||
$subQuery->where('contact.user_id = a.created_by');
|
||||
|
||||
# Filter contact by language
|
||||
if ($this->getState('filter.language')) {
|
||||
$subQuery->where('(contact.language in (' . $db->quote(Factory::getApplication()->getLanguage()->getTag()) . ',' . $db->quote('*') . ') OR contact.language IS NULL)');
|
||||
}
|
||||
|
||||
# If $iduser is defined, then the events list is filtered by registration of this user
|
||||
if($iduser) {
|
||||
$query->join('LEFT', '#__jem_register AS r ON r.event = a.id');
|
||||
$query->where("r.uid = " . $iduser );
|
||||
}
|
||||
|
||||
// Not include the delete event
|
||||
$query->where("a.published != -2");
|
||||
|
||||
$query->select('(' . $subQuery . ') as contactid2');
|
||||
|
||||
$dateFrom = date('Y-m-d', $datetimeFrom);
|
||||
$timeFrom = date('H:i:s', $datetimeFrom);
|
||||
$query->where('((a.recurrence_first_id = 0 AND a.id = ' . (int)($pk?$pk:$id) . ') OR a.recurrence_first_id = ' . (int)($pk?$pk:$id) . ')');
|
||||
$query->where("(a.dates > '" . $dateFrom . "' OR a.dates = '" . $dateFrom . "' AND dates >= '" . $timeFrom . "')");
|
||||
$query->order('a.dates ASC');
|
||||
|
||||
try
|
||||
{
|
||||
$db->setQuery($query);
|
||||
$data = $db->loadObjectList();
|
||||
|
||||
}
|
||||
catch (RuntimeException $e)
|
||||
{
|
||||
Factory::getApplication()->enqueueMessage($e->getMessage(), 'notice');
|
||||
}
|
||||
|
||||
if (empty($data)) {
|
||||
if(!$iduser) {
|
||||
throw new Exception(Text::_('COM_JEM_EVENT_ERROR_EVENT_NOT_FOUND'), 404);
|
||||
}else{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
# Convert parameter fields to objects.
|
||||
$registry = new Registry;
|
||||
$registry->loadString($data[0]->attribs);
|
||||
$data[0]->params = JemHelper::globalattribs(); // returns Registry object
|
||||
$data[0]->params->merge($registry);
|
||||
|
||||
$registry = new Registry;
|
||||
$registry->loadString($data[0]->metadata);
|
||||
$data[0]->metadata = $registry;
|
||||
|
||||
$data[0]->categories = $this->getCategories($pk);
|
||||
|
||||
# Compute selected asset permissions.
|
||||
$access_edit = $user->can('edit', 'event', $data[0]->id, $data[0]->created_by);
|
||||
$access_view = (($data[0]->published == 1) || ($data[0]->published == 2) || // published and archived event
|
||||
(($data[0]->published == 0) && $access_edit) || // unpublished for editors,
|
||||
$user->can('publish', 'event', $data[0]->id, $data[0]->created_by)); // all for publishers
|
||||
|
||||
$data[0]->params->set('access-edit', $access_edit);
|
||||
|
||||
# Compute view access permissions.
|
||||
|
||||
# event can be shown if
|
||||
# - user has matching view access level and
|
||||
# - there is at least one category attached user can see and
|
||||
# - publishing state and user permissions allow that (e.g. unpublished event but user is editor, owner, or publisher)
|
||||
$data[0]->params->set('access-view', $access_view && !empty($data[0]->categories) && in_array($data[0]->access, $levels));
|
||||
|
||||
$this->_item[$pk] = $data[0];
|
||||
}
|
||||
catch (Exception $e)
|
||||
{
|
||||
if ($e->getCode() == 404) {
|
||||
// Need to go thru the error handler to allow Redirect to
|
||||
// work.
|
||||
Factory::getApplication()->enqueueMessage($e->getMessage(), 'error');
|
||||
return false;
|
||||
}
|
||||
else {
|
||||
$this->setError($e);
|
||||
$this->_item[$pk] = false;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
# Get event attachments
|
||||
$this->_item[$pk]->attachments = JemAttachment::getAttachments('event' . $this->_item[$pk]->did);
|
||||
|
||||
# Get venue attachments
|
||||
$this->_item[$pk]->vattachments = JemAttachment::getAttachments('venue' . $this->_item[$pk]->locid);
|
||||
|
||||
// Define Booked
|
||||
$db = Factory::getContainer()->get('DatabaseDriver');
|
||||
$query = $db->getQuery(true);
|
||||
$query->select('SUM(places)');
|
||||
$query->from('#__jem_register');
|
||||
$query->where(array('event = ' . $db->quote($this->_item[$id]->did), 'waiting = 0', 'status = 1'));
|
||||
$db->setQuery($query);
|
||||
try {
|
||||
$res = $db->loadObject();
|
||||
}
|
||||
catch (Exception $e) {
|
||||
$res = 0;
|
||||
}
|
||||
$this->_item[$id]->booked = $res;
|
||||
|
||||
return $data;
|
||||
}
|
||||
|
||||
/**
|
||||
* Increment the hit counter for the event.
|
||||
*
|
||||
* @param int Optional primary key of the event to increment.
|
||||
* @return boolean if successful; false otherwise and internal error set.
|
||||
*/
|
||||
public function hit($pk = 0)
|
||||
{
|
||||
$hitcount = Factory::getApplication()->input->getInt('hitcount', 1);
|
||||
|
||||
if ($hitcount) {
|
||||
// Initialise variables.
|
||||
$pk = (!empty($pk)) ? $pk : (int) $this->getState('event.id');
|
||||
$db = Factory::getContainer()->get('DatabaseDriver');
|
||||
|
||||
$db->setQuery('UPDATE #__jem_events' . ' SET hits = hits + 1' . ' WHERE id = ' . (int) $pk);
|
||||
|
||||
try {
|
||||
if ($db->execute() === false) {
|
||||
$this->setError($db->getErrorMsg());
|
||||
return false;
|
||||
}
|
||||
}
|
||||
catch (Exception $e) {
|
||||
$this->setError($e);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve Categories
|
||||
*
|
||||
* Due to multi-cat this function is needed
|
||||
* filter-index (4) is pointing to the cats
|
||||
*/
|
||||
public function getCategories($id = 0)
|
||||
{
|
||||
$id = (!empty($id)) ? $id : (int) $this->getState('event.id');
|
||||
|
||||
$user = JemFactory::getUser();
|
||||
// $userid = (int)$user->get('id');
|
||||
$levels = $user->getAuthorisedViewLevels();
|
||||
// $app = Factory::getApplication();
|
||||
// $params = $app->getParams();
|
||||
// $catswitch = $params->get('categoryswitch', '0');
|
||||
$settings = JemHelper::globalattribs();
|
||||
|
||||
// Query
|
||||
$db = Factory::getContainer()->get('DatabaseDriver');
|
||||
$query = $db->getQuery(true);
|
||||
|
||||
$case_when_c = ' CASE WHEN ';
|
||||
$case_when_c .= $query->charLength('c.alias');
|
||||
$case_when_c .= ' THEN ';
|
||||
$id_c = $query->castAsChar('c.id');
|
||||
$case_when_c .= $query->concatenate(array($id_c, 'c.alias'), ':');
|
||||
$case_when_c .= ' ELSE ';
|
||||
$case_when_c .= $id_c.' END as catslug';
|
||||
|
||||
$query->select(array('DISTINCT c.id','c.catname','c.access','c.checked_out AS cchecked_out','c.color',$case_when_c,'c.groupid'));
|
||||
$query->from('#__jem_categories as c');
|
||||
$query->join('LEFT', '#__jem_cats_event_relations AS rel ON rel.catid = c.id');
|
||||
|
||||
$query->select(array('a.id AS multi'));
|
||||
$query->join('LEFT','#__jem_events AS a ON a.id = rel.itemid');
|
||||
|
||||
if ($id != 'all'){
|
||||
$query->where('rel.itemid ='.(int)$id);
|
||||
}
|
||||
|
||||
$query->where('c.published = 1');
|
||||
|
||||
###################################
|
||||
## FILTER - MAINTAINER/JEM GROUP ##
|
||||
###################################
|
||||
|
||||
# as maintainter someone who is registered can see a category that has special rights
|
||||
# let's see if the user has access to this category.
|
||||
|
||||
// $query3 = $db->getQuery(true);
|
||||
// $query3 = 'SELECT gr.id'
|
||||
// . ' FROM #__jem_groups AS gr'
|
||||
// . ' LEFT JOIN #__jem_groupmembers AS g ON g.group_id = gr.id'
|
||||
// . ' WHERE g.member = ' . (int) $user->get('id')
|
||||
// //. ' AND ' .$db->quoteName('gr.addevent') . ' = 1 '
|
||||
// . ' AND g.member NOT LIKE 0';
|
||||
// $db->setQuery($query3);
|
||||
// $groupnumber = $db->loadColumn();
|
||||
|
||||
$groups = implode(',', $levels);
|
||||
// $jemgroups = implode(',',$groupnumber);
|
||||
|
||||
// if ($jemgroups) {
|
||||
// $query->where('(c.access IN ('.$groups.') OR c.groupid IN ('.$jemgroups.'))');
|
||||
// } else {
|
||||
$query->where('(c.access IN ('.$groups.'))');
|
||||
// }
|
||||
|
||||
#######################
|
||||
## FILTER - CATEGORY ##
|
||||
#######################
|
||||
|
||||
# set filter for top_category
|
||||
$top_cat = $this->getState('filter.category_top');
|
||||
|
||||
if ($top_cat) {
|
||||
$query->where($top_cat);
|
||||
}
|
||||
|
||||
# filter set by day-view
|
||||
$requestCategoryId = (int)$this->getState('filter.req_catid');
|
||||
|
||||
if ($requestCategoryId) {
|
||||
$query->where('c.id = '.$requestCategoryId);
|
||||
}
|
||||
|
||||
# Filter by a single or group of categories.
|
||||
$categoryId = $this->getState('filter.category_id');
|
||||
|
||||
if (is_numeric($categoryId)) {
|
||||
$type = $this->getState('filter.category_id.include', true) ? '= ' : '<> ';
|
||||
$query->where('c.id '.$type.(int) $categoryId);
|
||||
}
|
||||
elseif (is_array($categoryId) && count($categoryId)) {
|
||||
\Joomla\Utilities\ArrayHelper::toInteger($categoryId);
|
||||
$categoryId = implode(',', $categoryId);
|
||||
$type = $this->getState('filter.category_id.include', true) ? 'IN' : 'NOT IN';
|
||||
$query->where('c.id '.$type.' ('.$categoryId.')');
|
||||
}
|
||||
|
||||
###################
|
||||
## FILTER-SEARCH ##
|
||||
###################
|
||||
|
||||
# define variables
|
||||
$filter = $this->getState('filter.filter_type');
|
||||
$search = $this->getState('filter.filter_search'); // not escaped
|
||||
|
||||
if (!empty($search)) {
|
||||
if (stripos($search, 'id:') === 0) {
|
||||
$query->where('c.id = '.(int) substr($search, 3));
|
||||
} else {
|
||||
$search = $db->Quote('%'.$db->escape($search, true).'%', false); // escape once
|
||||
|
||||
if($search && $settings->get('global_show_filter')) {
|
||||
if ($filter == 4) {
|
||||
$query->where('c.catname LIKE '.$search);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$db->setQuery($query);
|
||||
|
||||
try {
|
||||
if ($id == 'all'){
|
||||
$cats = $db->loadColumn(0);
|
||||
$cats = array_unique($cats);
|
||||
} else {
|
||||
$cats = $db->loadObjectList();
|
||||
}
|
||||
}
|
||||
catch (Exception $e) {
|
||||
$cats = false;
|
||||
}
|
||||
|
||||
return $cats;
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to get user registration data if available.
|
||||
*
|
||||
* @access public
|
||||
* @return mixed false if not registered, object with id, status, comment else
|
||||
* status -1 if not attending, 0 if invited,
|
||||
* 1 if attending, 2 if on waiting list
|
||||
*/
|
||||
public function getUserRegistration($eventId = null, $userid = 0)
|
||||
{
|
||||
// Initialize variables
|
||||
$userid = (int)$userid;
|
||||
if (empty($userid)) {
|
||||
$user = JemFactory::getUser();
|
||||
$userid = (int) $user->get('id', 0);
|
||||
}
|
||||
|
||||
$eventId = (int)$eventId;
|
||||
if (empty($eventId)) {
|
||||
$eventId = $this->getState('event.id');
|
||||
}
|
||||
|
||||
// usercheck
|
||||
// -1 if user will not attend, 0 if invened/unknown, 1 if registeredm 2 if on waiting list
|
||||
$query = 'SELECT IF (status > 0, waiting + 1, status) AS status, id, comment, places'
|
||||
. ' FROM #__jem_register'
|
||||
. ' WHERE uid = ' . $this->_db->quote($userid)
|
||||
. ' AND event = ' . $this->_db->quote($eventId);
|
||||
$this->_db->setQuery($query);
|
||||
|
||||
try {
|
||||
$result = $this->_db->loadObject();
|
||||
}
|
||||
catch (Exception $e) {
|
||||
$result = false;
|
||||
}
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to check if the user is already registered
|
||||
*
|
||||
* @access public
|
||||
* @return mixed false if not registered, -1 if not attending,
|
||||
* 0 if invited, 1 if attending, 2 if on waiting list
|
||||
*/
|
||||
public function getUserIsRegistered($eventId = null)
|
||||
{
|
||||
$obj = $this->getUserRegistration($eventId);
|
||||
if (is_object($obj) && isset($obj->status)) {
|
||||
return $obj->status;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to get the registered users
|
||||
*
|
||||
* @access public
|
||||
* @return object
|
||||
*/
|
||||
public function getRegisters($event = false, $status = 1)
|
||||
{
|
||||
if (empty($event)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// avatars should be displayed
|
||||
$settings = JemHelper::globalattribs();
|
||||
$user = JemFactory::getUser();
|
||||
$db = Factory::getContainer()->get('DatabaseDriver');
|
||||
|
||||
$avatar = '';
|
||||
$join = '';
|
||||
|
||||
if ($settings->get('event_comunoption','0') == 1 && $settings->get('event_comunsolution','0') == 1) {
|
||||
$avatar = ', c.avatar';
|
||||
$join = ' LEFT JOIN #__comprofiler as c ON c.user_id = r.uid';
|
||||
}
|
||||
|
||||
$name = ', ' . ($settings->get('global_regname','1') ? 'u.name' : 'u.username') . ' as name';
|
||||
|
||||
$where[] = 'event = '. $db->quote($event);
|
||||
if (is_numeric($status)) {
|
||||
if ($status == 2) {
|
||||
$where[] = 'waiting = 1';
|
||||
$where[] = 'status = 1';
|
||||
} else {
|
||||
$where[] = 'waiting = 0';
|
||||
$where[] = 'status = ' . (int)$status;
|
||||
}
|
||||
} elseif ($status !== 'all') {
|
||||
$where[] = 'waiting = 0';
|
||||
$where[] = 'status = 1';
|
||||
}
|
||||
|
||||
// Get registered users
|
||||
$query = $db->getQuery(true);
|
||||
$query = 'SELECT IF(r.status = 1 AND r.waiting = 1, 2, r.status) as status, r.uid, r.comment, r.places'
|
||||
. $name . $avatar
|
||||
. ' FROM #__jem_register AS r'
|
||||
. ' LEFT JOIN #__users AS u ON u.id = r.uid'
|
||||
. $join
|
||||
. ' WHERE ' . implode(' AND ', $where);
|
||||
$db->setQuery($query);
|
||||
|
||||
try {
|
||||
$registered = $db->loadObjectList();
|
||||
}
|
||||
catch (Exception $e) {
|
||||
$registered = false;
|
||||
}
|
||||
|
||||
return $registered;
|
||||
}
|
||||
|
||||
public function setId($id)
|
||||
{
|
||||
// Set new event ID and wipe data
|
||||
$this->_registerid = $id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Internal helper to store registration on database
|
||||
*
|
||||
* @param int $eventId id of event
|
||||
* @param int $uid id of user to register
|
||||
* @param mixed $uip ip address or false
|
||||
* @param int $status registration status
|
||||
* @param int $places number to add/cancel places of registration
|
||||
* @param string $comment optional comment
|
||||
* @param string &$errMsg gets a message in error cases
|
||||
* @param int $regid id of registration record to change or 0 if new (default)
|
||||
* @param bool $respectPlaces if true adapt status/waiting depending on event's free places,
|
||||
* may return error if no free places and no waiting list
|
||||
*
|
||||
* @access protected
|
||||
* @return int register id on success, else false
|
||||
*/
|
||||
protected function _doRegister($eventId, $uid, $uip, $status, $places, $comment, &$errMsg, $regid = 0, $respectPlaces = true)
|
||||
{
|
||||
// $app = Factory::getApplication('site');
|
||||
// $user = JemFactory::getUser();
|
||||
// $jemsettings = JemHelper::config();
|
||||
$registration = (empty($uid) || empty($eventId)) ? false : $this->getUserRegistration($eventId, $uid);
|
||||
$onwaiting = 0;
|
||||
|
||||
try {
|
||||
$event = $this->getItem($eventId);
|
||||
}
|
||||
// some gently error handling
|
||||
catch (Exception $e) {
|
||||
$event = false;
|
||||
}
|
||||
|
||||
if (empty($event)) {
|
||||
$errMsg = Text::_('COM_JEM_EVENT_ERROR_EVENT_NOT_FOUND');
|
||||
return false;
|
||||
}
|
||||
|
||||
$oldstat = is_object($registration) ? $registration->status : 0;
|
||||
if ($status == 1 && $status != $oldstat) {
|
||||
if ($respectPlaces && ($event->maxplaces > 0)) { // there is a max
|
||||
// check if the user should go on waiting list
|
||||
if ($event->booked >= $event->maxplaces) {
|
||||
if (!$event->waitinglist) {
|
||||
$this->setError(Text::_('COM_JEM_EVENT_FULL_NOTICE'));
|
||||
return false;
|
||||
}
|
||||
$onwaiting = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
elseif ($status == 2) {
|
||||
if ($respectPlaces && !$event->waitinglist) {
|
||||
$errMsg = Text::_('COM_JEM_NO_WAITINGLIST');
|
||||
return false;
|
||||
}
|
||||
$onwaiting = 1;
|
||||
$status = 1;
|
||||
}
|
||||
elseif ($respectPlaces && ($oldstat == 1) && ($status == -1) && !$event->unregistra) {
|
||||
$errMsg = Text::_('COM_JEM_ERROR_ANNULATION_NOT_ALLOWED');
|
||||
return false;
|
||||
}
|
||||
|
||||
$obj = new stdClass();
|
||||
$obj->event = (int)$eventId;
|
||||
$obj->status = (int)$status;
|
||||
$obj->places = (int)$places;
|
||||
$obj->waiting = $onwaiting;
|
||||
$obj->uid = (int)$uid;
|
||||
$obj->uregdate = gmdate('Y-m-d H:i:s');
|
||||
$obj->uip = $uip;
|
||||
$obj->comment = $comment;
|
||||
|
||||
$result = false;
|
||||
try {
|
||||
if ($regid) {
|
||||
$obj->id = $regid;
|
||||
$this->_db->updateObject('#__jem_register', $obj, 'id');
|
||||
$result = $regid;
|
||||
} else {
|
||||
$this->_db->insertObject('#__jem_register', $obj);
|
||||
$result = $this->_db->insertid();
|
||||
}
|
||||
}
|
||||
catch (Exception $e) {
|
||||
// we have a unique user-event key so registering twice will fail
|
||||
$errMsg = Text::_(($e->getCode() == 1062) ? 'COM_JEM_ALREADY_REGISTERED' : 'COM_JEM_ERROR_REGISTRATION');
|
||||
return false;
|
||||
}
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Saves the registration to the database
|
||||
*
|
||||
* @access public
|
||||
* @return int register id on success, else false
|
||||
*/
|
||||
public function userregister()
|
||||
{
|
||||
$app = Factory::getApplication('site');
|
||||
$user = JemFactory::getUser();
|
||||
$jemsettings = JemHelper::config();
|
||||
|
||||
$status = $app->input->getInt('reg_check', 0);
|
||||
// $noreg = ($status == -1) ? 'on' : 'off';//$app->input->getString('noreg_check', 'off');
|
||||
$comment = $app->input->getString('reg_comment', '');
|
||||
$comment = OutputFilter::cleanText($comment);
|
||||
$regid = $app->input->getInt('regid', 0);
|
||||
$addplaces = $app->input->getInt('addplaces', 0);
|
||||
$cancelplaces = $app->input->getInt('cancelplaces', 0);
|
||||
$checkseries = $app->input->getString('reg_check_series', '0');
|
||||
$checkseries = ($checkseries === 'true' || $checkseries === 'on' || $checkseries === '1');
|
||||
$uid = (int) $user->get('id');
|
||||
$eventId = (int) $this->_registerid;
|
||||
$events = array();
|
||||
try {
|
||||
$event = $this->getItem($eventId);
|
||||
}
|
||||
catch (Exception $e) {
|
||||
$event = false;
|
||||
}
|
||||
|
||||
// If event has 'seriesbooking' active and $checkseries is true then get all recurrence events of series from now (register or unregister)
|
||||
if($event->recurrence_type){
|
||||
|
||||
if(($event->seriesbooking && !$event->singlebooking) || ($event->singlebooking && $checkseries)) {
|
||||
$events = $this->getListRecurrenceEventsbyId($event->id, $event->recurrence_first_id, time());
|
||||
}
|
||||
}
|
||||
|
||||
if (!isset($events) || !count ($events)){
|
||||
$events [] = clone $event;
|
||||
}
|
||||
|
||||
foreach ($events as $e) {
|
||||
$reg = $this->getUserRegistration($e->id);
|
||||
$errMsg = '';
|
||||
|
||||
|
||||
if ($status > 0) {
|
||||
if ($addplaces > 0) {
|
||||
if ($reg) {
|
||||
if ($reg->status > 0) {
|
||||
$places = $addplaces + $reg->places;
|
||||
} else {
|
||||
$places = $addplaces;
|
||||
}
|
||||
} else {
|
||||
$places = $addplaces;
|
||||
}
|
||||
//Detect if the reserve go to waiting list
|
||||
$placesavailableevent = $e->maxplaces - $e->reservedplaces - $e->booked;
|
||||
if ($reg->status != 0 || $reg == null) {
|
||||
if ($e->maxplaces) {
|
||||
$placesavailableevent = $e->maxplaces - $e->reservedplaces - $e->booked;
|
||||
if ($e->waitinglist && $placesavailableevent <= 0) {
|
||||
$status = 2;
|
||||
}
|
||||
} else {
|
||||
$status = 1;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$places = 0;
|
||||
}
|
||||
} else {
|
||||
if ($reg) {
|
||||
$places = $reg->places - $cancelplaces;
|
||||
if ($reg->status >= 0 && $places > 0) {
|
||||
$status = $reg->status;
|
||||
}
|
||||
} else {
|
||||
$places = 0;
|
||||
}
|
||||
}
|
||||
|
||||
//Review max places per user
|
||||
if ($e->maxbookeduser) {
|
||||
if ($places > $e->maxbookeduser) {
|
||||
$places = $e->maxbookeduser;
|
||||
}
|
||||
}
|
||||
|
||||
// Must be logged in
|
||||
if ($uid < 1) {
|
||||
Factory::getApplication()->enqueueMessage(Text::_('JERROR_ALERTNOAUTHOR'), 'error');
|
||||
return;
|
||||
}
|
||||
|
||||
// IP
|
||||
$uip = $jemsettings->storeip ? JemHelper::retrieveIP() : false;
|
||||
|
||||
$result = $this->_doRegister($e->id, $uid, $uip, $status, $places, $comment, $errMsg, $reg->id);
|
||||
if (!$result) {
|
||||
$this->setError(Text::_('COM_JEM_ERROR_REGISTRATION') . ' [id: ' . $e->id . ']');
|
||||
} else {
|
||||
Factory::getApplication()->enqueueMessage(($status==1? Text::_('COM_JEM_REGISTERED_USER_IN_EVENT') : Text::_('COM_JEM_UNREGISTERED_USER_IN_EVENT')), 'info');
|
||||
}
|
||||
}
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Saves the registration to the database
|
||||
*
|
||||
* @param int $eventId id of event
|
||||
* @param int $uid id of user to register
|
||||
* @param int $status registration status
|
||||
* @param string $comment optional comment
|
||||
* @param string &$errMsg gets a message in error cases
|
||||
* @param int $regid id of registration record to change or 0 if new (default)
|
||||
* @param bool $respectPlaces if true adapt status/waiting depending on event's free places,
|
||||
* may return error if no free places and no waiting list
|
||||
*
|
||||
* @access public
|
||||
* @return int register id on success, else false
|
||||
*/
|
||||
public function adduser($eventId, $uid, $status, $places, $comment, &$errMsg, $regid = 0, $respectPlaces = true)
|
||||
{
|
||||
// $app = Factory::getApplication('site');
|
||||
$user = JemFactory::getUser();
|
||||
$jemsettings = JemHelper::config();
|
||||
|
||||
// Acting user must be logged in
|
||||
if ($user->get('id') < 1) {
|
||||
\Joomla\CMS\Factory::getApplication()->enqueueMessage(Text::_('JERROR_ALERTNOAUTHOR'), 'error');
|
||||
return false;
|
||||
}
|
||||
|
||||
// IP
|
||||
$uip = $jemsettings->storeip ? JemHelper::retrieveIP() : false;
|
||||
|
||||
$result = $this->_doRegister($eventId, $uid, $uip, $status, $places, $comment, $errMsg, $regid, $respectPlaces);
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Deletes a registered user
|
||||
*
|
||||
* @access public
|
||||
* @return true on success
|
||||
*/
|
||||
public function delreguser()
|
||||
{
|
||||
$user = JemFactory::getUser();
|
||||
$userid = (int)$user->get('id');
|
||||
$event = (int)$this->_registerid;
|
||||
|
||||
// Must be logged in
|
||||
if ($userid < 1) {
|
||||
Factory::getApplication()->enqueueMessage(Text::_('JERROR_ALERTNOAUTHOR'), 'error');
|
||||
return;
|
||||
}
|
||||
|
||||
$query = 'DELETE FROM #__jem_register WHERE event = ' . $event . ' AND uid= ' . $userid;
|
||||
$this->_db->SetQuery($query);
|
||||
|
||||
if ($this->_db->execute() === false) {
|
||||
throw new Exception($this->_db->getErrorMsg(), 500);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
?>
|
||||
967
components/com_jem/models/eventslist.php
Normal file
967
components/com_jem/models/eventslist.php
Normal file
@ -0,0 +1,967 @@
|
||||
<?php
|
||||
/**
|
||||
* @package JEM
|
||||
* @copyright (C) 2013-2024 joomlaeventmanager.net
|
||||
* @copyright (C) 2005-2009 Christoph Lukes
|
||||
* @license https://www.gnu.org/licenses/gpl-3.0 GNU/GPL
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Filter\InputFilter;
|
||||
use Joomla\Registry\Registry;
|
||||
use Joomla\CMS\MVC\Model\ListModel;
|
||||
|
||||
// ensure JemFactory is loaded (because model is used by modules too)
|
||||
require_once(JPATH_SITE.'/components/com_jem/factory.php');
|
||||
|
||||
/**
|
||||
* Model-Eventslist
|
||||
**/
|
||||
class JemModelEventslist extends ListModel
|
||||
{
|
||||
/**
|
||||
* Constructor.
|
||||
*/
|
||||
public function __construct($config = array())
|
||||
{
|
||||
if (empty($config['filter_fields']))
|
||||
{
|
||||
$config['filter_fields'] = array(
|
||||
'id', 'a.id',
|
||||
'title', 'a.title',
|
||||
'dates', 'a.dates',
|
||||
'times', 'a.times',
|
||||
'alias', 'a.alias',
|
||||
'venue', 'l.venue','venue_title',
|
||||
'city', 'l.city', 'venue_city',
|
||||
'checked_out', 'a.checked_out',
|
||||
'checked_out_time', 'a.checked_out_time',
|
||||
'c.catname', 'category_title',
|
||||
'state', 'a.state',
|
||||
'access', 'a.access', 'access_level',
|
||||
'created', 'a.created',
|
||||
'created_by', 'a.created_by',
|
||||
'ordering', 'a.ordering',
|
||||
'featured', 'a.featured',
|
||||
'language', 'a.language',
|
||||
'hits', 'a.hits',
|
||||
'publish_up', 'a.publish_up',
|
||||
'publish_down', 'a.publish_down',
|
||||
);
|
||||
}
|
||||
|
||||
parent::__construct($config);
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to auto-populate the model state.
|
||||
*/
|
||||
protected function populateState($ordering = null, $direction = null)
|
||||
{
|
||||
$app = Factory::getApplication();
|
||||
$jemsettings = JemHelper::config();
|
||||
$task = $app->input->getCmd('task','');
|
||||
$format = $app->input->getCmd('format',false);
|
||||
$itemid = $app->input->getInt('id', 0) . ':' . $app->input->getInt('Itemid', 0);
|
||||
$params = $app->getParams();
|
||||
|
||||
# limit/start
|
||||
if (empty($format) || ($format == 'html')) {
|
||||
/* in J! 3.3.6 limitstart is removed from request - but we need it! */
|
||||
if ($app->input->get('limitstart', null, 'int') === null) {
|
||||
$app->setUserState('com_jem.eventslist.'.$itemid.'.limitstart', 0);
|
||||
}
|
||||
|
||||
$limit = $app->getUserStateFromRequest('com_jem.eventslist.'.$itemid.'.limit', 'limit', $jemsettings->display_num, 'int');
|
||||
$this->setState('list.limit', $limit);
|
||||
$limitstart = $app->getUserStateFromRequest('com_jem.eventslist.'.$itemid.'.limitstart', 'limitstart', 0, 'int');
|
||||
// correct start value if required
|
||||
$limitstart = $limit ? (int)(floor($limitstart / $limit) * $limit) : 0;
|
||||
$this->setState('list.start', $limitstart);
|
||||
}
|
||||
|
||||
# Search - variables
|
||||
$search = $app->getUserStateFromRequest('com_jem.eventslist.'.$itemid.'.filter_search', 'filter_search', '', 'string');
|
||||
$this->setState('filter.filter_search', $search); // must be escaped later
|
||||
|
||||
$filtertype = $app->getUserStateFromRequest('com_jem.eventslist.'.$itemid.'.filter_type', 'filter_type', 0, 'int');
|
||||
$this->setState('filter.filter_type', $filtertype);
|
||||
|
||||
$filtermonth = $app->getUserStateFromRequest('com_jem.eventslist.'.$itemid.'.filter_month', 'filter_month', 0, 'string');
|
||||
$this->setState('filter.filter_month', $filtermonth);
|
||||
|
||||
# Search - Filter by setting menu
|
||||
$today = new DateTime();
|
||||
$filterDaysBefore = $params->get('tablefiltereventfrom','');
|
||||
if ($filterDaysBefore){
|
||||
$dateFrom = (clone $today)->modify('-' . $filterDaysBefore . ' days')->format('Y-m-d');
|
||||
$where = ' DATEDIFF(IF (a.enddates IS NOT NULL, a.enddates, a.dates), "'. $dateFrom .'") >= 0';
|
||||
$this->setState('filter.calendar_from',$where);
|
||||
}
|
||||
$filterDaysAfter = $params->get('tablefiltereventuntil','');
|
||||
if ($filterDaysAfter){
|
||||
$dateTo = (clone $today)->modify( $filterDaysAfter . ' days')->format('Y-m-d');
|
||||
$where = ' DATEDIFF(a.dates, "'. $dateTo . '") <= 0';
|
||||
$this->setState('filter.calendar_to',$where);
|
||||
}
|
||||
|
||||
# publish state
|
||||
$this->_populatePublishState($task);
|
||||
|
||||
$params = $app->getParams();
|
||||
$this->setState('params', $params);
|
||||
|
||||
###############
|
||||
## opendates ##
|
||||
###############
|
||||
|
||||
$this->setState('filter.opendates', $params->get('showopendates', 0));
|
||||
|
||||
###########
|
||||
## ORDER ##
|
||||
###########
|
||||
|
||||
$filter_order = $app->getUserStateFromRequest('com_jem.eventslist.'.$itemid.'.filter_order', 'filter_order', 'a.dates', 'cmd');
|
||||
$filter_order_DirDefault = 'ASC';
|
||||
// Reverse default order for dates in archive mode
|
||||
if ($task == 'archive' && $filter_order == 'a.dates') {
|
||||
$filter_order_DirDefault = 'DESC';
|
||||
}
|
||||
$filter_reset = $app->input->getInt('filter_reset', 0);
|
||||
if ($filter_reset && $filter_order == 'a.dates') {
|
||||
$app->setUserState('com_jem.eventslist.'.$itemid.'.filter_order_Dir', $filter_order_DirDefault);
|
||||
}
|
||||
$filter_order_Dir = $app->getUserStateFromRequest('com_jem.eventslist.'.$itemid.'.filter_order_Dir', 'filter_order_Dir', $filter_order_DirDefault, 'word');
|
||||
$filter_order = InputFilter::getInstance()->clean($filter_order, 'cmd');
|
||||
$filter_order_Dir = InputFilter::getInstance()->clean($filter_order_Dir, 'word');
|
||||
|
||||
$default_order_Dir = ($task == 'archive') ? 'DESC' : 'ASC';
|
||||
|
||||
if(!isset($_REQUEST["filter_type"])) {
|
||||
$tableInitialorderby = $params->get('tableorderby', '0');
|
||||
if ($tableInitialorderby) {
|
||||
switch ($tableInitialorderby) {
|
||||
case 0:
|
||||
$tableInitialorderby = 'a.dates';
|
||||
break;
|
||||
case 1:
|
||||
$tableInitialorderby = 'a.title';
|
||||
break;
|
||||
case 2:
|
||||
$tableInitialorderby = 'l.venue';
|
||||
break;
|
||||
case 3:
|
||||
$tableInitialorderby = 'l.city';
|
||||
break;
|
||||
case 4:
|
||||
$tableInitialorderby = 'l.state';
|
||||
break;
|
||||
case 5:
|
||||
$tableInitialorderby = 'c.catname';
|
||||
break;
|
||||
}
|
||||
$filter_order = $app->getUserStateFromRequest('com_jem.eventslist.' . $itemid . '.filter_order', 'filter_order', $tableInitialorderby, 'cmd');
|
||||
}
|
||||
$tableInitialDirectionOrder = $params->get('tabledirectionorder', 'ASC');
|
||||
if ($tableInitialDirectionOrder) {
|
||||
$filter_order_Dir = $app->getUserStateFromRequest('com_jem.eventslist.' . $itemid . '.filter_order_Dir', 'filter_order_Dir', $tableInitialDirectionOrder, 'word');
|
||||
}
|
||||
}
|
||||
|
||||
$orderby = array($filter_order . ' ' . $filter_order_Dir, 'a.dates ' . $default_order_Dir, 'a.times ' . $default_order_Dir, 'a.created ' . $default_order_Dir);
|
||||
|
||||
$this->setState('filter.orderby',$orderby);
|
||||
|
||||
################################
|
||||
## EXCLUDE/INCLUDE CATEGORIES ##
|
||||
################################
|
||||
|
||||
$catswitch = $params->get('categoryswitch', '');
|
||||
$cats = trim($params->get('categoryswitchcats', ''));
|
||||
$list_cats=[];
|
||||
if ($cats){
|
||||
$ids_cats = explode(",", $cats);
|
||||
if ($params->get('includesubcategories', 0))
|
||||
{
|
||||
//get subcategories
|
||||
foreach($ids_cats as $idcat)
|
||||
{
|
||||
if (!in_array($idcat, $list_cats))
|
||||
{
|
||||
$list_cats[] = $idcat;
|
||||
$child_cat = $this->getListChildCat($idcat, 1);
|
||||
if ($child_cat !== false) {
|
||||
if(count($child_cat) > 0) {
|
||||
foreach ($child_cat as $child)
|
||||
{
|
||||
if (!in_array($child, $list_cats))
|
||||
{
|
||||
$list_cats[] = (string) $child;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}else{
|
||||
$list_cats=$ids_cats;
|
||||
}
|
||||
|
||||
if ($catswitch)
|
||||
{
|
||||
# set included categories
|
||||
$this->setState('filter.category_id', $list_cats);
|
||||
$this->setState('filter.category_id.include', true);
|
||||
}else{
|
||||
# set excluded categories
|
||||
$this->setState('filter.category_id', $list_cats);
|
||||
$this->setState('filter.category_id.include', false);
|
||||
}
|
||||
}
|
||||
$this->setState('filter.groupby',array('a.id'));
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to get a all list of children categories (subtree) by $id category.
|
||||
*/
|
||||
public function getListChildCat($id, $reset){
|
||||
$user = JemFactory::getUser();
|
||||
$levels = $user->getAuthorisedViewLevels();
|
||||
$settings = JemHelper::globalattribs();
|
||||
|
||||
static $catchildlist=[];
|
||||
if($reset){
|
||||
foreach ($catchildlist as $k => $c){
|
||||
unset($catchildlist[$k]);
|
||||
}
|
||||
}
|
||||
|
||||
// Query
|
||||
$db = Factory::getContainer()->get('DatabaseDriver');
|
||||
$query = $db->getQuery(true);
|
||||
|
||||
$query->select(array('DISTINCT c.id'));
|
||||
$query->from('#__jem_categories as c');
|
||||
$query->where('c.published = 1');
|
||||
$query->where('(c.access IN ('.implode(',', $levels).'))');
|
||||
$query->where('c.parent_id =' . (int) $id);
|
||||
|
||||
$db->setQuery($query);
|
||||
$cats = $db->loadObjectList();
|
||||
|
||||
if ($cats != null) {
|
||||
foreach ($cats as $cat){
|
||||
$catchildlist[] = $cat->id;
|
||||
$this->getListChildCat($cat->id,0);
|
||||
}
|
||||
return $catchildlist;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* set limit
|
||||
*/
|
||||
public function setLimit($value)
|
||||
{
|
||||
$this->setState('list.limit', (int) $value);
|
||||
}
|
||||
|
||||
/**
|
||||
* set limitstart
|
||||
*/
|
||||
public function setLimitStart($value)
|
||||
{
|
||||
$this->setState('list.start', (int) $value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to get a store id based on model configuration state.
|
||||
*/
|
||||
protected function getStoreId($id = '')
|
||||
{
|
||||
// Compile the store id.
|
||||
$id .= ':' . serialize($this->getState('filter.published'));
|
||||
$id .= ':' . $this->getState('filter.opendates');
|
||||
$id .= ':' . $this->getState('filter.featured');
|
||||
$id .= ':' . serialize($this->getState('filter.event_id'));
|
||||
$id .= ':' . $this->getState('filter.event_id.include');
|
||||
$id .= ':' . serialize($this->getState('filter.category_id'));
|
||||
$id .= ':' . $this->getState('filter.category_id.include');
|
||||
$id .= ':' . serialize($this->getState('filter.venue_id'));
|
||||
$id .= ':' . $this->getState('filter.venue_id.include');
|
||||
$id .= ':' . $this->getState('filter.venue_state');
|
||||
$id .= ':' . $this->getState('filter.venue_state.mode');
|
||||
$id .= ':' . $this->getState('filter.filter_search');
|
||||
$id .= ':' . $this->getState('filter.filter_type');
|
||||
$id .= ':' . $this->getState('list.start');
|
||||
$id .= ':' . $this->getState('list.limit');
|
||||
$id .= ':' . serialize($this->getState('filter.groupby'));
|
||||
$id .= ':' . serialize($this->getState('filter.orderby'));
|
||||
$id .= ':' . $this->getState('filter.category_top');
|
||||
$id .= ':' . $this->getState('filter.calendar_multiday');
|
||||
$id .= ':' . $this->getState('filter.calendar_startdayonly');
|
||||
$id .= ':' . $this->getState('filter.show_archived_events');
|
||||
$id .= ':' . $this->getState('filter.req_venid');
|
||||
$id .= ':' . $this->getState('filter.req_catid');
|
||||
$id .= ':' . $this->getState('filter.unpublished');
|
||||
$id .= ':' . serialize($this->getState('filter.unpublished.events.on_groups'));
|
||||
$id .= ':' . $this->getState('filter.unpublished.venues');
|
||||
$id .= ':' . $this->getState('filter.unpublished.on_user');
|
||||
|
||||
return parent::getStoreId($id);
|
||||
}
|
||||
|
||||
/**
|
||||
* Build the query
|
||||
*/
|
||||
protected function getListQuery()
|
||||
{
|
||||
$app = Factory::getApplication();
|
||||
$task = $app->input->getCmd('task', '');
|
||||
$itemid = $app->input->getInt('id', 0) . ':' . $app->input->getInt('Itemid', 0);
|
||||
|
||||
$params = $app->getParams();
|
||||
$settings = JemHelper::globalattribs();
|
||||
$user = JemFactory::getUser();
|
||||
$levels = $user->getAuthorisedViewLevels();
|
||||
|
||||
# Query
|
||||
$db = Factory::getContainer()->get('DatabaseDriver');
|
||||
$query = $db->getQuery(true);
|
||||
|
||||
# Event
|
||||
$query->select(
|
||||
$this->getState('list.select',
|
||||
'a.access,a.alias,a.attribs,a.checked_out,a.checked_out_time,a.contactid,a.created,a.created_by,a.created_by_alias,a.custom1,a.custom2,a.custom3,a.custom4,a.custom5,a.custom6,a.custom7,a.custom8,a.custom9,a.custom10,a.dates,a.datimage,a.enddates,a.endtimes,a.featured,' .
|
||||
'a.fulltext,a.hits,a.id,a.introtext,a.language,a.locid,a.maxplaces,a.reservedplaces,a.minbookeduser,a.maxbookeduser,a.metadata,a.meta_keywords,a.meta_description,a.modified,a.modified_by,a.published,a.registra,a.times,a.title,a.unregistra,a.waitinglist,a.requestanswer,a.seriesbooking,a.singlebooking, DAYOFMONTH(a.dates) AS created_day, YEAR(a.dates) AS created_year, MONTH(a.dates) AS created_month,' .
|
||||
'a.recurrence_byday,a.recurrence_counter,a.recurrence_first_id,a.recurrence_limit,a.recurrence_limit_date,a.recurrence_number, a.recurrence_type,a.version'
|
||||
)
|
||||
);
|
||||
$query->from('#__jem_events as a');
|
||||
|
||||
# Author
|
||||
$name = $settings->get('global_regname','1') ? 'u.name' : 'u.username';
|
||||
$query->select($name.' AS author');
|
||||
$query->join('LEFT', '#__users AS u on u.id = a.created_by');
|
||||
|
||||
# Venue
|
||||
$query->select(array('l.alias AS l_alias','l.checked_out AS l_checked_out','l.checked_out_time AS l_checked_out_time','l.city','l.country','l.created AS l_created','l.created_by AS l_createdby'));
|
||||
$query->select(array('l.custom1 AS l_custom1','l.custom2 AS l_custom2','l.custom3 AS l_custom3','l.custom4 AS l_custom4','l.custom5 AS l_custom5','l.custom6 AS l_custom6','l.custom7 AS l_custom7','l.custom8 AS l_custom8','l.custom9 AS l_custom9','l.custom10 AS l_custom10'));
|
||||
$query->select(array('l.id AS l_id','l.latitude','l.locdescription','l.locimage','l.longitude','l.map','l.meta_description AS l_meta_description','l.meta_keywords AS l_meta_keywords','l.modified AS l_modified','l.modified_by AS l_modified_by','l.postalCode'));
|
||||
$query->select(array('l.publish_up AS l_publish_up','l.publish_down AS l_publish_down','l.published AS l_published','l.state','l.street','l.url','l.venue','l.version AS l_version'));
|
||||
$query->join('LEFT', '#__jem_venues AS l ON l.id = a.locid');
|
||||
|
||||
# Country
|
||||
$query->select(array('ct.name AS countryname'));
|
||||
$query->join('LEFT', '#__jem_countries AS ct ON ct.iso2 = l.country');
|
||||
|
||||
# the rest
|
||||
$case_when_e = ' CASE WHEN ';
|
||||
$case_when_e .= $query->charLength('a.alias','!=', '0');
|
||||
$case_when_e .= ' THEN ';
|
||||
$id_e = $query->castAsChar('a.id');
|
||||
$case_when_e .= $query->concatenate(array($id_e, 'a.alias'), ':');
|
||||
$case_when_e .= ' ELSE ';
|
||||
$case_when_e .= $id_e.' END as slug';
|
||||
|
||||
$case_when_l = ' CASE WHEN ';
|
||||
$case_when_l .= $query->charLength('l.alias', '!=', '0');
|
||||
$case_when_l .= ' THEN ';
|
||||
$id_l = $query->castAsChar('a.locid');
|
||||
$case_when_l .= $query->concatenate(array($id_l, 'l.alias'), ':');
|
||||
$case_when_l .= ' ELSE ';
|
||||
$case_when_l .= $id_l.' END as venueslug';
|
||||
|
||||
$query->select(array($case_when_e, $case_when_l));
|
||||
|
||||
# join over the category-tables
|
||||
$query->join('LEFT', '#__jem_cats_event_relations AS rel ON rel.itemid = a.id');
|
||||
$query->join('LEFT', '#__jem_categories AS c ON c.id = rel.catid');
|
||||
|
||||
#############
|
||||
## FILTERS ##
|
||||
#############
|
||||
|
||||
#####################
|
||||
## FILTER - EVENTS ##
|
||||
#####################
|
||||
|
||||
# Filter by a single or group of events.
|
||||
$eventId = $this->getState('filter.event_id');
|
||||
|
||||
if (is_numeric($eventId)) {
|
||||
$type = $this->getState('filter.event_id.include', true) ? '= ' : '<> ';
|
||||
$query->where('a.id '.$type.(int) $eventId);
|
||||
}
|
||||
elseif (is_array($eventId) && !empty($eventId)) {
|
||||
\Joomla\Utilities\ArrayHelper::toInteger($eventId);
|
||||
$eventId = implode(',', $eventId);
|
||||
$type = $this->getState('filter.event_id.include', true) ? 'IN' : 'NOT IN';
|
||||
$query->where('a.id '.$type.' ('.$eventId.')');
|
||||
}
|
||||
|
||||
###################
|
||||
## FILTER-ACCESS ##
|
||||
###################
|
||||
|
||||
# Filter by access level - always.
|
||||
$query->where('a.access IN ('.implode(',', $levels).')');
|
||||
|
||||
####################
|
||||
## FILTER-PUBLISH ##
|
||||
####################
|
||||
|
||||
# Filter by published state.
|
||||
$where_pub = $this->_getPublishWhere();
|
||||
if (!empty($where_pub)) {
|
||||
$query->where('(' . implode(' OR ', $where_pub) . ')');
|
||||
} else {
|
||||
// something wrong - fallback to published events
|
||||
$query->where('a.published = 1');
|
||||
}
|
||||
|
||||
#####################
|
||||
## FILTER-FEATURED ##
|
||||
#####################
|
||||
|
||||
# Filter by featured flag.
|
||||
$featured = $this->getState('filter.featured');
|
||||
|
||||
if (is_numeric($featured)) {
|
||||
$query->where('a.featured = ' . (int) $featured);
|
||||
}
|
||||
elseif (is_array($featured) && !empty($featured)) {
|
||||
\Joomla\Utilities\ArrayHelper::toInteger($featured);
|
||||
$featured = implode(',', $featured);
|
||||
$query->where('a.featured IN ('.$featured.')');
|
||||
}
|
||||
|
||||
#############################
|
||||
## FILTER - CALENDAR_DATES ##
|
||||
#############################
|
||||
$cal_from = $this->getState('filter.calendar_from');
|
||||
$cal_to = $this->getState('filter.calendar_to');
|
||||
$cal_month = $this->getState('filter.filter_month');
|
||||
if ($cal_month) {
|
||||
$cal_month = DateTime::createFromFormat('Y-m', $cal_month);
|
||||
$filter_date_from = $cal_month->format('Y-m-01');
|
||||
$filter_date_to = $cal_month->modify('last day of this month')->format('Y-m-d');
|
||||
|
||||
$where = ' DATEDIFF(IF (a.enddates IS NOT NULL, a.enddates, a.dates), "'. $filter_date_from .'") >= 0';
|
||||
$this->setState('filter.calendar_from',$where);
|
||||
|
||||
$where = ' DATEDIFF(a.dates, "'. $filter_date_to . '") <= 0';
|
||||
$this->setState('filter.calendar_to',$where);
|
||||
|
||||
$cal_from = $this->getState('filter.calendar_from');
|
||||
$cal_to = $this->getState('filter.calendar_to');
|
||||
}
|
||||
|
||||
if ($cal_from) {
|
||||
$query->where($cal_from);
|
||||
}
|
||||
|
||||
if ($cal_to) {
|
||||
$query->where($cal_to);
|
||||
}
|
||||
|
||||
#############################
|
||||
## FILTER - OPEN_DATES ##
|
||||
#############################
|
||||
$opendates = $this->getState('filter.opendates');
|
||||
|
||||
switch ($opendates) {
|
||||
case 0: // don't show events without start date
|
||||
default:
|
||||
$query->where('a.dates IS NOT NULL');
|
||||
break;
|
||||
case 1: // show all events, with or without start date
|
||||
break;
|
||||
case 2: // show only events without startdate
|
||||
$query->where('a.dates IS NULL');
|
||||
break;
|
||||
}
|
||||
|
||||
#####################
|
||||
### FILTER - BYCAT ##
|
||||
#####################
|
||||
|
||||
$filter_catid = $this->getState('filter.filter_catid');
|
||||
if ($filter_catid) { // categorycal
|
||||
$query->where('c.id = '.(int)$filter_catid);
|
||||
} else {
|
||||
$cats = $this->getCategories('all');
|
||||
if (!empty($cats)) {
|
||||
$query->where('c.id IN (' . implode(',', $cats) . ')');
|
||||
}
|
||||
}
|
||||
|
||||
####################
|
||||
## FILTER - BYLOC ##
|
||||
####################
|
||||
$filter_locid = $this->getState('filter.filter_locid');
|
||||
if ($filter_locid) {
|
||||
$query->where('a.locid = '.(int)$filter_locid);
|
||||
}
|
||||
|
||||
####################
|
||||
## FILTER - VENUE ##
|
||||
####################
|
||||
|
||||
$venueId = $this->getState('filter.venue_id');
|
||||
|
||||
if (is_numeric($venueId)) {
|
||||
$type = $this->getState('filter.venue_id.include', true) ? '= ' : '<> ';
|
||||
$query->where('l.id '.$type.(int) $venueId);
|
||||
}
|
||||
elseif (is_array($venueId) && !empty($venueId)) {
|
||||
\Joomla\Utilities\ArrayHelper::toInteger($venueId);
|
||||
$venueId = implode(',', $venueId);
|
||||
$type = $this->getState('filter.venue_id.include', true) ? 'IN' : 'NOT IN';
|
||||
$query->where('l.id '.$type.' ('.$venueId.')');
|
||||
}
|
||||
|
||||
##########################
|
||||
## FILTER - VENUE STATE ##
|
||||
##########################
|
||||
|
||||
$venueState = $this->getState('filter.venue_state');
|
||||
|
||||
if (!empty($venueState)) {
|
||||
$venueState = explode(',', $venueState);
|
||||
|
||||
$venueStateMode = $this->getState('filter.venue_state.mode', 0);
|
||||
switch ($venueStateMode) {
|
||||
case 0: # complete match: venue's state must be equal (ignoring upper/lower case) one of the strings given by filter
|
||||
default:
|
||||
array_walk($venueState, function(&$v,$k,$db) { $v = $db->quote(trim($v)); }, $db);
|
||||
$query->where('l.state IN ('.implode(',', $venueState).')');
|
||||
break;
|
||||
case 1: # contain: venue's state must contain one of the strings given by filter
|
||||
array_walk($venueState, function(&$v,$k,$db) { $v = quotemeta($db->escape(trim($v), true)); }, $db);
|
||||
$query->where('l.state REGEXP '.$db->quote(implode('|', $venueState)));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
###################
|
||||
## FILTER-SEARCH ##
|
||||
###################
|
||||
|
||||
# define variables
|
||||
$filter = $this->getState('filter.filter_type');
|
||||
$search = $this->getState('filter.filter_search'); // not escaped
|
||||
|
||||
if (!empty($search)) {
|
||||
if (stripos($search, 'id:') === 0) {
|
||||
$query->where('a.id = '.(int) substr($search, 3));
|
||||
} else {
|
||||
$search = $db->Quote('%'.$db->escape($search, true).'%', false); // escape once
|
||||
|
||||
if ($search && $settings->get('global_show_filter')) {
|
||||
switch ($filter) {
|
||||
# case 4 is category, so it is omitted
|
||||
case 1:
|
||||
$query->where('a.title LIKE '.$search);
|
||||
break;
|
||||
case 2:
|
||||
$query->where('l.venue LIKE '.$search);
|
||||
break;
|
||||
case 3:
|
||||
$query->where('l.city LIKE '.$search);
|
||||
break;
|
||||
case 5:
|
||||
$query->where('l.state LIKE '.$search);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# Group
|
||||
$group = $this->getState('filter.groupby');
|
||||
if ($group) {
|
||||
$query->group($group);
|
||||
}
|
||||
|
||||
# ordering
|
||||
$orderby = $this->getState('filter.orderby');
|
||||
if ($orderby) {
|
||||
$query->order($orderby);
|
||||
}
|
||||
|
||||
return $query;
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to get a list of events.
|
||||
*/
|
||||
public function getItems()
|
||||
{
|
||||
$items = parent::getItems();
|
||||
|
||||
if (empty($items)) {
|
||||
return array();
|
||||
}
|
||||
|
||||
$user = JemFactory::getUser();
|
||||
$calendarMultiday = $this->getState('filter.calendar_multiday');
|
||||
$stateParams = $this->getState('params');
|
||||
|
||||
# Convert the parameter fields into objects.
|
||||
foreach ($items as $index => $item)
|
||||
{
|
||||
$eventParams = new Registry;
|
||||
$eventParams->loadString($item->attribs);
|
||||
|
||||
if (empty($stateParams)) {
|
||||
$item->params = new Registry;
|
||||
$item->params->merge($eventParams);
|
||||
} else {
|
||||
$item->params = clone $stateParams;
|
||||
$item->params->merge($eventParams);
|
||||
}
|
||||
|
||||
# adding categories
|
||||
$item->categories = $this->getCategories($item->id);
|
||||
|
||||
# check if the item-categories is empty, if so the user has no access to that event at all.
|
||||
if (empty($item->categories)) {
|
||||
unset ($items[$index]);
|
||||
continue;
|
||||
} else {
|
||||
# write access permissions.
|
||||
$item->params->set('access-edit', $user->can('edit', 'event', $item->id, $item->created_by));
|
||||
}
|
||||
} // foreach
|
||||
|
||||
if ($items) {
|
||||
/*$items =*/ JemHelper::getAttendeesNumbers($items);
|
||||
|
||||
if ($calendarMultiday) {
|
||||
$items = self::calendarMultiday($items);
|
||||
}
|
||||
}
|
||||
|
||||
return $items;
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve Categories
|
||||
*
|
||||
* Due to multi-cat this function is needed
|
||||
* filter-index (4) is pointing to the cats
|
||||
*/
|
||||
public function getCategories($id)
|
||||
{
|
||||
$user = JemFactory::getUser();
|
||||
$levels = $user->getAuthorisedViewLevels();
|
||||
$settings = JemHelper::globalattribs();
|
||||
|
||||
// Query
|
||||
$db = Factory::getContainer()->get('DatabaseDriver');
|
||||
$query = $db->getQuery(true);
|
||||
|
||||
$case_when_c = ' CASE WHEN ';
|
||||
$case_when_c .= $query->charLength('c.alias');
|
||||
$case_when_c .= ' THEN ';
|
||||
$id_c = $query->castAsChar('c.id');
|
||||
$case_when_c .= $query->concatenate(array($id_c, 'c.alias'), ':');
|
||||
$case_when_c .= ' ELSE ';
|
||||
$case_when_c .= $id_c.' END as catslug';
|
||||
|
||||
$query->select(array('DISTINCT c.id','c.catname','c.access','c.checked_out AS cchecked_out','c.color',$case_when_c));
|
||||
$query->from('#__jem_categories as c');
|
||||
$query->join('LEFT', '#__jem_cats_event_relations AS rel ON rel.catid = c.id');
|
||||
|
||||
$query->select(array('a.id AS multi'));
|
||||
$query->join('LEFT','#__jem_events AS a ON a.id = rel.itemid');
|
||||
|
||||
if ($id != 'all'){
|
||||
$query->where('rel.itemid ='.(int)$id);
|
||||
}
|
||||
|
||||
$query->where('c.published = 1');
|
||||
|
||||
###################
|
||||
## FILTER-ACCESS ##
|
||||
###################
|
||||
|
||||
# Filter by access level.
|
||||
|
||||
###################################
|
||||
## FILTER - MAINTAINER/JEM GROUP ##
|
||||
###################################
|
||||
|
||||
# -as maintainter someone who is registered can see a category that has special rights-
|
||||
# -let's see if the user has access to this category.-
|
||||
# ==> No. On frontend everybody needs proper access levels to see things. No exceptions.
|
||||
|
||||
// $query3 = $db->getQuery(true);
|
||||
// $query3 = 'SELECT gr.id'
|
||||
// . ' FROM #__jem_groups AS gr'
|
||||
// . ' LEFT JOIN #__jem_groupmembers AS g ON g.group_id = gr.id'
|
||||
// . ' WHERE g.member = ' . (int) $user->get('id')
|
||||
// //. ' AND ' .$db->quoteName('gr.addevent') . ' = 1 '
|
||||
// . ' AND g.member NOT LIKE 0';
|
||||
// $db->setQuery($query3);
|
||||
// $groupnumber = $db->loadColumn();
|
||||
|
||||
// $jemgroups = implode(',',$groupnumber);
|
||||
|
||||
// JEM groups doesn't overrule view access levels!
|
||||
// if ($jemgroups) {
|
||||
// $query->where('(c.access IN ('.$groups.') OR c.groupid IN ('.$jemgroups.'))');
|
||||
// } else {
|
||||
$query->where('(c.access IN ('.implode(',', $levels).'))');
|
||||
// }
|
||||
|
||||
#######################
|
||||
## FILTER - CATEGORY ##
|
||||
#######################
|
||||
|
||||
# set filter for top_category
|
||||
$top_cat = $this->getState('filter.category_top');
|
||||
|
||||
if ($top_cat) {
|
||||
$query->where($top_cat);
|
||||
}
|
||||
|
||||
# Filter by a single or group of categories.
|
||||
$categoryId = $this->getState('filter.category_id');
|
||||
|
||||
if (is_numeric($categoryId)) {
|
||||
$type = $this->getState('filter.category_id.include', true) ? '= ' : '<> ';
|
||||
$query->where('c.id '.$type.(int) $categoryId);
|
||||
}
|
||||
elseif (is_array($categoryId) && !empty($categoryId)) {
|
||||
\Joomla\Utilities\ArrayHelper::toInteger($categoryId);
|
||||
$categoryId = implode(',', $categoryId);
|
||||
$type = $this->getState('filter.category_id.include', true) ? 'IN' : 'NOT IN';
|
||||
$query->where('c.id '.$type.' ('.$categoryId.')');
|
||||
}
|
||||
|
||||
# filter set by day-view
|
||||
$requestCategoryId = $this->getState('filter.req_catid');
|
||||
|
||||
if ($requestCategoryId) {
|
||||
$query->where('c.id = '.(int)$requestCategoryId);
|
||||
}
|
||||
|
||||
###################
|
||||
## FILTER-SEARCH ##
|
||||
###################
|
||||
|
||||
# define variables
|
||||
$filter = $this->getState('filter.filter_type');
|
||||
$search = $this->getState('filter.filter_search'); // not escaped
|
||||
|
||||
if (!empty($search)) {
|
||||
if (stripos($search, 'id:') === 0) {
|
||||
$query->where('c.id = '.(int) substr($search, 3));
|
||||
} else {
|
||||
$search = $db->Quote('%'.$db->escape($search, true).'%', false); // escape once
|
||||
|
||||
if ($search && $settings->get('global_show_filter')) {
|
||||
if ($filter == 4) {
|
||||
$query->where('c.catname LIKE '.$search);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$db->setQuery($query);
|
||||
|
||||
if ($id == 'all') {
|
||||
$cats = $db->loadColumn(0);
|
||||
$cats = array_unique($cats);
|
||||
return ($cats);
|
||||
} else {
|
||||
$cats = $db->loadObjectList();
|
||||
}
|
||||
return $cats;
|
||||
}
|
||||
|
||||
/**
|
||||
* create multi-day events
|
||||
*/
|
||||
protected function calendarMultiday($items)
|
||||
{
|
||||
if (empty($items)) {
|
||||
return array();
|
||||
}
|
||||
|
||||
$startdayonly = $this->getState('filter.calendar_startdayonly');
|
||||
|
||||
if (!$startdayonly) {
|
||||
foreach ($items as $item)
|
||||
{
|
||||
if (!is_null($item->enddates) && ($item->enddates != $item->dates)) {
|
||||
$day = $item->start_day;
|
||||
$multi = array();
|
||||
|
||||
# it's multiday regardless if other days are on next month
|
||||
$item->multi = 'first';
|
||||
$item->multitimes = $item->times;
|
||||
$item->multiname = $item->title;
|
||||
$item->sort = 'zlast';
|
||||
|
||||
for ($counter = 0; $counter <= $item->datesdiff-1; $counter++)
|
||||
{
|
||||
# next day:
|
||||
$day++;
|
||||
$nextday = mktime(0, 0, 0, $item->start_month, $day, $item->start_year);
|
||||
|
||||
# ensure we only generate days of current month in this loop
|
||||
if (date('m', $this->_date) == date('m', $nextday)) {
|
||||
$multi[$counter] = clone $item;
|
||||
$multi[$counter]->dates = date('Y-m-d', $nextday);
|
||||
|
||||
if ($multi[$counter]->dates < $item->enddates) {
|
||||
$multi[$counter]->multi = 'middle';
|
||||
$multi[$counter]->multistartdate = $item->dates;
|
||||
$multi[$counter]->multienddate = $item->enddates;
|
||||
$multi[$counter]->multitimes = $item->times;
|
||||
$multi[$counter]->multiname = $item->title;
|
||||
$multi[$counter]->times = $item->times;
|
||||
$multi[$counter]->endtimes = $item->endtimes;
|
||||
$multi[$counter]->sort = 'middle';
|
||||
} elseif ($multi[$counter]->dates == $item->enddates) {
|
||||
$multi[$counter]->multi = 'zlast';
|
||||
$multi[$counter]->multistartdate = $item->dates;
|
||||
$multi[$counter]->multienddate = $item->enddates;
|
||||
$multi[$counter]->multitimes = $item->times;
|
||||
$multi[$counter]->multiname = $item->title;
|
||||
$multi[$counter]->sort = 'first';
|
||||
$multi[$counter]->times = $item->times;
|
||||
$multi[$counter]->endtimes = $item->endtimes;
|
||||
}
|
||||
}
|
||||
} // for
|
||||
|
||||
# add generated days to data
|
||||
$items = array_merge($items, $multi);
|
||||
# unset temp array holding generated days before working on the next multiday event
|
||||
unset($multi);
|
||||
}
|
||||
} // foreach
|
||||
}
|
||||
|
||||
# Sort the items
|
||||
foreach ($items as $item) {
|
||||
$time[] = $item->times;
|
||||
$title[] = $item->title;
|
||||
}
|
||||
|
||||
array_multisort($time, SORT_ASC, $title, SORT_ASC, $items);
|
||||
|
||||
return $items;
|
||||
}
|
||||
|
||||
/**
|
||||
* Helper method to auto-populate publishing related model state.
|
||||
* Can be called in populateState()
|
||||
*/
|
||||
protected function _populatePublishState($task)
|
||||
{
|
||||
$app = Factory::getApplication();
|
||||
$jemsettings = JemHelper::config();
|
||||
$user = JemFactory::getUser();
|
||||
$userId = $user->id ?? null;
|
||||
|
||||
# publish state
|
||||
$format = $app->input->getCmd('format', '');
|
||||
|
||||
if ($task == 'archive') {
|
||||
$this->setState('filter.published', 2);
|
||||
} elseif (($format == 'raw') || ($format == 'feed')) {
|
||||
$this->setState('filter.published', 1);
|
||||
} else {
|
||||
$show_unpublished = $user->can(array('edit', 'publish'), 'event', false, false, 1);
|
||||
if ($show_unpublished) {
|
||||
// global editor or publisher permission
|
||||
$publishedStates = $this->show_archived_events ? array(0, 1, 2) : array(0, 1);
|
||||
$this->setState('filter.published', $publishedStates);
|
||||
} else {
|
||||
// no global permission but maybe on event level
|
||||
$this->setState('filter.published', 1);
|
||||
$this->setState('filter.unpublished', 0);
|
||||
|
||||
$jemgroups = $user->getJemGroups(array('editevent', 'publishevent'));
|
||||
if (($userId !== 0) && ($jemsettings->eventedit == -1)) {
|
||||
$jemgroups[0] = true; // we need key 0 to get unpublished events not attached to any jem group
|
||||
}
|
||||
// user permitted on that jem groups
|
||||
if (is_array($jemgroups) && count($jemgroups)) {
|
||||
$this->setState('filter.unpublished.events.on_groups', array_keys($jemgroups));
|
||||
}
|
||||
// user permitted on own events
|
||||
if (($userId !== 0) && ($user->authorise('core.edit.own', 'com_jem') || $jemsettings->eventowner)) {
|
||||
$this->setState('filter.unpublished.on_user', $userId);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Helper method to create publishing related where clauses.
|
||||
* Can be called in getListQuery()
|
||||
*
|
||||
* @param $tbl table alias to use
|
||||
*
|
||||
* @return array where clauses related to publishing state and user permissons
|
||||
* to combine with OR
|
||||
*/
|
||||
protected function _getPublishWhere($tbl = 'a')
|
||||
{
|
||||
$tbl = empty($tbl) ? '' : $this->_db->quoteName($tbl) . '.';
|
||||
$where_pub = array();
|
||||
|
||||
# Filter by published state.
|
||||
$published = $this->getState('filter.published');
|
||||
$show_archived_events = $this->getState('filter.show_archived_events');
|
||||
|
||||
if (is_numeric($published)) {
|
||||
$where_pub[] = '(' . $tbl . 'published ' . ($show_archived_events? '>=':'=') . (int)$published . ')';
|
||||
}
|
||||
elseif (is_array($published) && !empty($published)) {
|
||||
\Joomla\Utilities\ArrayHelper::toInteger($published);
|
||||
$published = implode(',', $published);
|
||||
$where_pub[] = '(' . $tbl . 'published IN (' . $published . '))';
|
||||
}
|
||||
|
||||
# Filter by specific conditions
|
||||
$unpublished = $this->getState('filter.unpublished');
|
||||
if (is_numeric($unpublished))
|
||||
{
|
||||
// Is user member of jem groups allowing to see unpublished events?
|
||||
$unpublished_on_groups = $this->getState('filter.unpublished.events.on_groups');
|
||||
if (is_array($unpublished_on_groups) && !empty($unpublished_on_groups)) {
|
||||
// to allow only events with categories attached to allowed jemgroups use this line:
|
||||
//$where_pub[] = '(' . $tbl . '.published = ' . $unpublished . ' AND c.groupid IN (' . implode(',', $unpublished_on_groups) . '))';
|
||||
// to allow also events with categories not attached to disallowed jemgroups use this crazy block:
|
||||
$where_pub[] = '(' . $tbl . 'published = ' . $unpublished . ' AND '
|
||||
. $tbl . 'id NOT IN (SELECT rel3.itemid FROM #__jem_categories as c3 '
|
||||
. ' INNER JOIN #__jem_cats_event_relations as rel3 '
|
||||
. ' WHERE c3.id = rel3.catid AND c3.groupid NOT IN (0,' . implode(',', $unpublished_on_groups) . ')'
|
||||
. ' GROUP BY rel3.itemid)'
|
||||
. ')';
|
||||
// hint: above it's a not not ;-)
|
||||
// meaning: Show unpublished events not connected to a category which is not one of the allowed categories.
|
||||
}
|
||||
|
||||
// Is user allowed to see own unpublished events?
|
||||
$unpublished_on_user = (int)$this->getState('filter.unpublished.on_user');
|
||||
if ($unpublished_on_user > 0) {
|
||||
$where_pub[] = '(' . $tbl . 'published = ' . $unpublished . ' AND ' . $tbl . 'created_by = ' . $unpublished_on_user . ')';
|
||||
}
|
||||
}
|
||||
|
||||
return $where_pub;
|
||||
}
|
||||
}
|
||||
?>
|
||||
56
components/com_jem/models/fields/calendarjem.php
Normal file
56
components/com_jem/models/fields/calendarjem.php
Normal file
@ -0,0 +1,56 @@
|
||||
<?php
|
||||
/**
|
||||
* @package JEM
|
||||
* @copyright (C) 2013-2024 joomlaeventmanager.net
|
||||
* @copyright (C) 2005-2009 Christoph Lukes
|
||||
* @license https://www.gnu.org/licenses/gpl-3.0 GNU/GPL
|
||||
*/
|
||||
|
||||
defined('JPATH_PLATFORM') or die;
|
||||
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\Form\Field\CalendarField;
|
||||
|
||||
/**
|
||||
* Form Field class for JEM needs.
|
||||
*
|
||||
* Advances CalendarField for better country-specific date format support.
|
||||
*
|
||||
* @since 2.2.3
|
||||
*/
|
||||
|
||||
class JFormFieldCalendarJem extends CalendarField
|
||||
{
|
||||
/**
|
||||
* The form field type.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $type = 'CalendarJem';
|
||||
|
||||
/**
|
||||
* Method to get the data to be passed to the layout for rendering.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
protected function getLayoutData()
|
||||
{
|
||||
$data = parent::getLayoutData();
|
||||
|
||||
if (!empty($this->hint)) {
|
||||
return $data;
|
||||
}
|
||||
|
||||
// add hint regarding date/time format accepted in edit field
|
||||
$exampleTimestamp = strtotime("12/31/2017 23:59");
|
||||
$date_format = str_replace("%","",$this->format);
|
||||
$hint = Text::sprintf('COM_JEM_DATEFIELD_HINT', date($date_format, $exampleTimestamp));
|
||||
|
||||
$extraData = array(
|
||||
'hint' => $hint,
|
||||
);
|
||||
|
||||
return array_merge($data, $extraData);
|
||||
}
|
||||
}
|
||||
|
||||
195
components/com_jem/models/fields/catoptions.php
Normal file
195
components/com_jem/models/fields/catoptions.php
Normal file
@ -0,0 +1,195 @@
|
||||
<?php
|
||||
/**
|
||||
* @package JEM
|
||||
* @copyright (C) 2013-2024 joomlaeventmanager.net
|
||||
* @copyright (C) 2005-2009 Christoph Lukes
|
||||
* @license https://www.gnu.org/licenses/gpl-3.0 GNU/GPL
|
||||
*/
|
||||
|
||||
defined('JPATH_BASE') or die;
|
||||
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Form\Field\ListField;
|
||||
use Joomla\CMS\Form\FormHelper;
|
||||
use Joomla\CMS\HTML\HTMLHelper;
|
||||
|
||||
FormHelper::loadFieldClass('list');
|
||||
|
||||
require_once __DIR__ . '/../../helpers/helper.php';
|
||||
|
||||
/**
|
||||
* CatOptions Field class.
|
||||
*/
|
||||
class JFormFieldCatOptions extends ListField
|
||||
{
|
||||
/**
|
||||
* The category options field type.
|
||||
*/
|
||||
protected $type = 'CatOptions';
|
||||
|
||||
|
||||
/**
|
||||
* Create Input
|
||||
* @see JFormField::getInput()
|
||||
*/
|
||||
public function getInput()
|
||||
{
|
||||
$attr = '';
|
||||
|
||||
// Initialize field attributes.
|
||||
$attr .= !empty($this->class) ? ' class="' . $this->class . '"' : '';
|
||||
$attr .= !empty($this->size) ? ' size="' . $this->size . '"' : '';
|
||||
$attr .= $this->multiple ? ' multiple' : '';
|
||||
$attr .= $this->required ? ' required aria-required="true"' : '';
|
||||
|
||||
// To avoid user's confusion, readonly="true" should imply disabled="true".
|
||||
if ((string) $this->readonly == '1' || (string) $this->readonly == 'true' || (string) $this->disabled == '1'|| (string) $this->disabled == 'true')
|
||||
{
|
||||
$attr .= ' disabled="disabled"';
|
||||
}
|
||||
|
||||
// Initialize JavaScript field attributes.
|
||||
$attr .= $this->onchange ? ' onchange="' . $this->onchange . '"' : '';
|
||||
|
||||
// Output
|
||||
$currentid = Factory::getApplication()->input->getInt('a_id');
|
||||
if (!$currentid) { // special case: new event as copy of another one
|
||||
$currentid = Factory::getApplication()->input->getInt('from_id');
|
||||
}
|
||||
|
||||
// Get the field options.
|
||||
$options = (array) $this->getOptions();
|
||||
|
||||
$db = Factory::getContainer()->get('DatabaseDriver');
|
||||
$query = $db->getQuery(true);
|
||||
$query->select('DISTINCT catid');
|
||||
$query->from('#__jem_cats_event_relations');
|
||||
$query->where('itemid = '. $db->quote($currentid));
|
||||
$db->setQuery($query);
|
||||
$selectedcats = $db->loadColumn();
|
||||
|
||||
// On new event we may have a category preferred to select.
|
||||
if (empty($selectedcats) && !empty($this->element['prefer'])) {
|
||||
$selectedcats = (array)$this->element['prefer'];
|
||||
}
|
||||
|
||||
// Create a read-only list (no name) with a hidden input to store the value.
|
||||
if ((string) $this->readonly == '1' || (string) $this->readonly == 'true')
|
||||
{
|
||||
$html[] = HTMLHelper::_('select.genericlist', $options, $this->name, trim($attr), 'value', 'text', $selectedcats,$this->id);
|
||||
$html[] = '<input type="hidden" name="' . $this->name . '" value="' . htmlspecialchars($selectedcats, ENT_COMPAT, 'UTF-8') . '"/>';
|
||||
}
|
||||
else
|
||||
// Create a regular list.
|
||||
{
|
||||
$html[] = HTMLHelper::_('select.genericlist', $options, $this->name, trim($attr), 'value', 'text', $selectedcats,$this->id);
|
||||
}
|
||||
|
||||
return implode($html);
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve Options
|
||||
* @see ListField::getOptions()
|
||||
*/
|
||||
protected function getOptions()
|
||||
{
|
||||
$currentid = Factory::getApplication()->input->getInt('a_id');
|
||||
$options = self::getCategories($currentid);
|
||||
$options = array_values($options);
|
||||
|
||||
// Pad the option text with spaces using depth level as a multiplier
|
||||
# the level has to be decreased as we are having a (invisible) root
|
||||
# treename is generated by the function so let's use that one instead of the Joomla way
|
||||
|
||||
for ($i = 0, $n = count($options); $i < $n; $i++)
|
||||
{
|
||||
/*
|
||||
if ($options[$i]->published == 1)
|
||||
{
|
||||
$options[$i]->text = str_repeat('- ', ($options[$i]->level - 1)) . $options[$i]->text;
|
||||
}
|
||||
else
|
||||
{
|
||||
$options[$i]->text = str_repeat('- ', ($options[$i]->level - 1)) . '[' . $options[$i]->text . ']';
|
||||
}
|
||||
*/
|
||||
|
||||
$options[$i]->text = $options[$i]->treename;
|
||||
}
|
||||
|
||||
// Merge any additional options in the XML definition.
|
||||
$options = array_merge(parent::getOptions(), $options);
|
||||
|
||||
return $options;
|
||||
}
|
||||
|
||||
/**
|
||||
* logic to get the categories
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function getCategories($id)
|
||||
{
|
||||
$db = Factory::getContainer()->get('DatabaseDriver');
|
||||
$user = JemFactory::getUser();
|
||||
$userid = (int) $user->get('id');
|
||||
|
||||
if (empty($id)) {
|
||||
// for new events also show all categories user is allowed to see, disable non-useable categories
|
||||
// (to show same list in both cases, and allow "unusable" parents for structuring)
|
||||
$mitems = $user->getJemCategories('add', 'event', array('use_disable' => true));
|
||||
} else {
|
||||
$query = $db->getQuery(true);
|
||||
$query = 'SELECT COUNT(*)'
|
||||
. ' FROM #__jem_events AS e'
|
||||
. ' WHERE e.id = ' . $db->quote($id)
|
||||
. ' AND e.created_by = ' . $db->quote($userid);
|
||||
$db->setQuery($query);
|
||||
$owner = $db->loadResult();
|
||||
|
||||
// on edit show all categories user is allowed to see, disable non-useable categories
|
||||
$mitems = $user->getJemCategories(array('add', 'edit'), 'event', array('use_disable' => true, 'owner' => $owner));
|
||||
}
|
||||
|
||||
if (!$mitems)
|
||||
{
|
||||
$mitems = array();
|
||||
$children = array();
|
||||
|
||||
$parentid = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
$children = array();
|
||||
// First pass - collect children
|
||||
foreach ($mitems as $v)
|
||||
{
|
||||
$v->value = $v->id;
|
||||
$v->text = $v->catname;
|
||||
$pt = $v->parent_id;
|
||||
$list = @$children[$pt] ? $children[$pt] : array();
|
||||
array_push($list, $v);
|
||||
$children[$pt] = $list;
|
||||
}
|
||||
|
||||
// list childs of "root" which has no parent and normally id 1
|
||||
$parentid = intval(@isset($children[0][0]->id) ? $children[0][0]->id : 1);
|
||||
}
|
||||
|
||||
//get list of the items
|
||||
$list = JemCategories::treerecurse($parentid, '', array(), $children, 9999, 0, 0);
|
||||
|
||||
// append orphaned categories
|
||||
if (count($mitems) > count($list)) {
|
||||
foreach ($children as $k => $v) {
|
||||
if (($k > 1) && !array_key_exists($k, $list)) {
|
||||
$list = JemCategories::treerecurse($k, '? ', $list, $children, 999, 0, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return $list;
|
||||
}
|
||||
}
|
||||
34
components/com_jem/models/fields/countryoptions.php
Normal file
34
components/com_jem/models/fields/countryoptions.php
Normal file
@ -0,0 +1,34 @@
|
||||
<?php
|
||||
/**
|
||||
* @package JEM
|
||||
* @copyright (C) 2013-2024 joomlaeventmanager.net
|
||||
* @copyright (C) 2005-2009 Christoph Lukes
|
||||
* @license https://www.gnu.org/licenses/gpl-3.0 GNU/GPL
|
||||
*/
|
||||
|
||||
defined('JPATH_BASE') or die;
|
||||
|
||||
use Joomla\CMS\Form\Field\ListField;
|
||||
use Joomla\CMS\Form\FormHelper;
|
||||
|
||||
FormHelper::loadFieldClass('list');
|
||||
|
||||
|
||||
/**
|
||||
* CountryOptions Field class
|
||||
*/
|
||||
class JFormFieldCountryOptions extends ListField
|
||||
{
|
||||
/**
|
||||
* The form field type.
|
||||
*/
|
||||
protected $type = 'CountryOptions';
|
||||
|
||||
/**
|
||||
* Method to get the Country options.
|
||||
*/
|
||||
public function getOptions()
|
||||
{
|
||||
return JemHelper::getCountryOptions();
|
||||
}
|
||||
}
|
||||
40
components/com_jem/models/fields/endtime.php
Normal file
40
components/com_jem/models/fields/endtime.php
Normal file
@ -0,0 +1,40 @@
|
||||
<?php
|
||||
/**
|
||||
* @package JEM
|
||||
* @copyright (C) 2013-2024 joomlaeventmanager.net
|
||||
* @copyright (C) 2005-2009 Christoph Lukes
|
||||
* @license https://www.gnu.org/licenses/gpl-3.0 GNU/GPL
|
||||
*/
|
||||
|
||||
defined('JPATH_BASE') or die;
|
||||
|
||||
use Joomla\CMS\Form\FormField;
|
||||
|
||||
|
||||
/**
|
||||
* Endtime Field class.
|
||||
*
|
||||
*
|
||||
*/
|
||||
class JFormFieldEndtime extends FormField
|
||||
{
|
||||
/**
|
||||
* The form field type.
|
||||
*
|
||||
*/
|
||||
protected $type = 'Endtime';
|
||||
|
||||
|
||||
public function getInput()
|
||||
{
|
||||
|
||||
$endhours = JEMHelper::buildtimeselect(23, 'endhours', substr( $this->value, 0, 2 ));
|
||||
$endminutes = JEMHelper::buildtimeselect(59, 'endminutes', substr($this->value, 3, 2 ));
|
||||
|
||||
$var2 = $endhours.$endminutes;
|
||||
|
||||
return $var2;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
1
components/com_jem/models/fields/index.html
Normal file
1
components/com_jem/models/fields/index.html
Normal file
@ -0,0 +1 @@
|
||||
<!DOCTYPE html><title></title>
|
||||
110
components/com_jem/models/fields/modal/contact.php
Normal file
110
components/com_jem/models/fields/modal/contact.php
Normal file
@ -0,0 +1,110 @@
|
||||
<?php
|
||||
/**
|
||||
* @package JEM
|
||||
* @copyright (C) 2013-2024 joomlaeventmanager.net
|
||||
* @copyright (C) 2005-2009 Christoph Lukes
|
||||
* @license https://www.gnu.org/licenses/gpl-3.0 GNU/GPL
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\HTML\HTMLHelper;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\Session\Session;
|
||||
use Joomla\CMS\Form\FormField;
|
||||
|
||||
/**
|
||||
* Contact select
|
||||
*/
|
||||
class JFormFieldModal_Contact extends FormField
|
||||
{
|
||||
/**
|
||||
* field type
|
||||
* @var string
|
||||
*/
|
||||
protected $type = 'Modal_Contact';
|
||||
|
||||
|
||||
/**
|
||||
* Method to get the field input markup
|
||||
*/
|
||||
protected function getInput()
|
||||
{
|
||||
$app = Factory::getApplication();
|
||||
$document = $app->getDocument();
|
||||
$wa = $document->getWebAssetManager();
|
||||
|
||||
// Build the script
|
||||
$script = array();
|
||||
$script[] = ' function jSelectContact_'.$this->id.'(id, name, object) {';
|
||||
$script[] = ' document.getElementById("'.$this->id.'_id").value = id;';
|
||||
$script[] = ' document.getElementById("'.$this->id.'_name").value = name;';
|
||||
// $script[] = ' SqueezeBox.close();';
|
||||
$script[] = ' $("#contact-modal").modal("hide");';
|
||||
$script[] = ' }';
|
||||
|
||||
// Add to document head
|
||||
$wa->addInlineScript(implode("\n", $script));
|
||||
|
||||
// Setup variables for display
|
||||
$html = array();
|
||||
$link = 'index.php?option=com_jem&view=editevent&layout=choosecontact&tmpl=component&function=jSelectContact_'.$this->id;
|
||||
|
||||
$db = Factory::getContainer()->get('DatabaseDriver');
|
||||
$query = $db->getQuery(true);
|
||||
$query->select('name');
|
||||
$query->from('#__contact_details');
|
||||
$query->where(array('id='.(int)$this->value));
|
||||
$db->setQuery($query);
|
||||
|
||||
try
|
||||
{
|
||||
$contact = $db->loadResult();
|
||||
}
|
||||
catch (RuntimeException $e)
|
||||
{
|
||||
$app->enqueueMessage($e->getMessage(), 'warning');
|
||||
}
|
||||
|
||||
if (empty($contact)) {
|
||||
$contact = Text::_('COM_JEM_SELECT_CONTACT');
|
||||
}
|
||||
$contact = htmlspecialchars($contact, ENT_QUOTES, 'UTF-8');
|
||||
|
||||
// The current contact input field
|
||||
$html[] = ' <input type="text" id="'.$this->id.'_name" class="form-control readonly inputbox valid form-control-success" value="'.$contact.'" style="display:inline-block;" disabled="disabled" size="35" />';
|
||||
|
||||
// The contact select button
|
||||
$html[] = HTMLHelper::_(
|
||||
'bootstrap.renderModal',
|
||||
'contact-modal',
|
||||
array(
|
||||
'url' => $link.'&'.Session::getFormToken().'=1',
|
||||
'title' => Text::_('COM_JEM_SELECT'),
|
||||
'width' => '800px',
|
||||
'height' => '450px',
|
||||
'footer' => '<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">' . Text::_('COM_JEM_CLOSE') . '</button>'
|
||||
)
|
||||
);
|
||||
$html[] ='<button type="button" class="btn btn-success button-select" data-bs-toggle="modal" data-bs-target="#contact-modal">'.Text::_('COM_JEM_SELECT').'</button>';
|
||||
|
||||
// The active contact id field
|
||||
if (0 == (int)$this->value) {
|
||||
$value = '';
|
||||
} else {
|
||||
$value = (int)$this->value;
|
||||
}
|
||||
|
||||
// class='required' for client side validation
|
||||
$class = '';
|
||||
if ($this->required) {
|
||||
$class = ' class="required modal-value"';
|
||||
}
|
||||
|
||||
$html[] = '<input type="hidden" id="'.$this->id.'_id"'.$class.' name="'.$this->name.'" value="'.$value.'" />';
|
||||
|
||||
return implode("\n", $html);
|
||||
}
|
||||
}
|
||||
?>
|
||||
1
components/com_jem/models/fields/modal/index.html
Normal file
1
components/com_jem/models/fields/modal/index.html
Normal file
@ -0,0 +1 @@
|
||||
<!DOCTYPE html><title></title>
|
||||
124
components/com_jem/models/fields/modal/users.php
Normal file
124
components/com_jem/models/fields/modal/users.php
Normal file
@ -0,0 +1,124 @@
|
||||
<?php
|
||||
/**
|
||||
* @package JEM
|
||||
* @copyright (C) 2013-2024 joomlaeventmanager.net
|
||||
* @copyright (C) 2005-2009 Christoph Lukes
|
||||
* @license https://www.gnu.org/licenses/gpl-3.0 GNU/GPL
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
use Joomla\CMS\HTML\HTMLHelper;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Form\FormField;
|
||||
use Joomla\CMS\Session\Session;
|
||||
|
||||
/**
|
||||
* Contact select
|
||||
*/
|
||||
class JFormFieldModal_Users extends FormField
|
||||
{
|
||||
/**
|
||||
* field type
|
||||
* @var string
|
||||
*/
|
||||
protected $type = 'Modal_Users';
|
||||
|
||||
|
||||
/**
|
||||
* Method to get the field input markup
|
||||
*/
|
||||
protected function getInput()
|
||||
{
|
||||
$app = Factory::getApplication();
|
||||
$document = $app->getDocument();
|
||||
$wa = $document->getWebAssetManager();
|
||||
|
||||
// Build the script
|
||||
$script = array();
|
||||
$script[] = ' function jSelectUsers_'.$this->id.'(ids, count, object) {';
|
||||
$script[] = ' document.getElementById("'.$this->id.'_ids").value = ids;';
|
||||
$script[] = ' document.getElementById("'.$this->id.'_count").value = count;';
|
||||
// $script[] = ' SqueezeBox.close();';
|
||||
$script[] = ' $("#user-modal").modal("hide");';
|
||||
$script[] = ' }';
|
||||
|
||||
// Add to document head
|
||||
$wa->addInlineScript(implode("\n", $script));
|
||||
|
||||
// Setup variables for display
|
||||
$html = array();
|
||||
$eventid = isset($this->element['eventid']) ? (int)$this->element['eventid'] : 0;
|
||||
$link = 'index.php?option=com_jem&view=editevent&layout=chooseusers&tmpl=component&function=jSelectUsers_'.$this->id.'&a_id='.$eventid;
|
||||
|
||||
// we expect a list of unique, non-zero numbers
|
||||
$ids = explode(',', $this->value);
|
||||
array_walk($ids, function(&$v, $k){$v = (int)$v;});
|
||||
$ids = array_filter($ids);
|
||||
$ids = array_unique($ids);
|
||||
$idlist = implode(',', $ids);
|
||||
|
||||
if (!empty($idlist)) {
|
||||
$db = Factory::getContainer()->get('DatabaseDriver');
|
||||
$query = $db->getQuery(true);
|
||||
$query->select('COUNT(id)');
|
||||
$query->from('#__users');
|
||||
$query->where('id IN ('.$idlist.')');
|
||||
$db->setQuery($query);
|
||||
|
||||
|
||||
|
||||
// if ($error = $db->getErrorMsg()) {
|
||||
// \Joomla\CMS\Factory::getApplication()->enqueueMessage($error, 'warning');
|
||||
// }
|
||||
try
|
||||
{
|
||||
$count = (int)$db->loadResult();
|
||||
}
|
||||
catch (RuntimeException $e)
|
||||
{
|
||||
\Joomla\CMS\Factory::getApplication()->enqueueMessage($e->getMessage(), 'warning');
|
||||
}
|
||||
} else {
|
||||
$count = 0;
|
||||
}
|
||||
|
||||
// if (empty($count)) {
|
||||
// $count = Text::_('COM_JEM_SELECT_USERS');
|
||||
// }
|
||||
// $count = htmlspecialchars($count, ENT_QUOTES, 'UTF-8');
|
||||
|
||||
// The current contact input field
|
||||
$html[] = ' <input type="text" id="'.$this->id.'_count" value="'.$count.'" disabled="disabled" size="4" />';
|
||||
|
||||
// The contact select button
|
||||
// $html[] = ' <a class="flyermodal" title="'.Text::_('COM_JEM_SELECT').'" href="'.$link.'&'.Session::getFormToken().'=1" rel="{handler: \'iframe\', size: {x:800, y:450}}">'.
|
||||
// Text::_('COM_JEM_SELECT').'</a>';
|
||||
$html[] = HTMLHelper::_(
|
||||
'bootstrap.renderModal',
|
||||
'user-modal',
|
||||
array(
|
||||
'url' => $link.'&'.Session::getFormToken().'=1',
|
||||
'title' => Text::_('COM_JEM_SELECT'),
|
||||
'width' => '800px',
|
||||
'height' => '450px',
|
||||
'footer' => '<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">' . Text::_('COM_JEM_CLOSE') . '</button>'
|
||||
)
|
||||
);
|
||||
$html[] ='<button type="button" class="btn btn-link" data-bs-dismiss="modal" data-bs-toggle="modal" data-bs-target="#user-modal">'.Text::_('COM_JEM_SELECT').'
|
||||
</button>';
|
||||
|
||||
// class='required' for client side validation
|
||||
$class = '';
|
||||
if ($this->required) {
|
||||
$class = ' class="required modal-value"';
|
||||
}
|
||||
|
||||
$html[] = '<input type="hidden" id="'.$this->id.'_ids"'.$class.' name="'.$this->name.'" value="'.$idlist.'" />';
|
||||
$html[] = '<input type="hidden" id="'.$this->id.'_evid"'.$class.' value="'.$eventid.'" />';
|
||||
|
||||
return implode("\n", $html);
|
||||
}
|
||||
}
|
||||
?>
|
||||
120
components/com_jem/models/fields/modal/venue.php
Normal file
120
components/com_jem/models/fields/modal/venue.php
Normal file
@ -0,0 +1,120 @@
|
||||
<?php
|
||||
/**
|
||||
* @package JEM
|
||||
* @copyright (C) 2013-2024 joomlaeventmanager.net
|
||||
* @copyright (C) 2005-2009 Christoph Lukes
|
||||
* @license https://www.gnu.org/licenses/gpl-3.0 GNU/GPL
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
use Joomla\CMS\HTML\HTMLHelper;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Session\Session;
|
||||
use Joomla\CMS\Form\FormField;
|
||||
use Joomla\CMS\Uri\Uri;
|
||||
|
||||
/**
|
||||
* Venue Select
|
||||
*/
|
||||
class JFormFieldModal_Venue extends FormField
|
||||
{
|
||||
/**
|
||||
* field type
|
||||
* @var string
|
||||
*/
|
||||
protected $type = 'Modal_Venue';
|
||||
|
||||
|
||||
/**
|
||||
* Method to get the field input markup
|
||||
*/
|
||||
protected function getInput()
|
||||
{
|
||||
$app = Factory::getApplication();
|
||||
$document = $app->getDocument();
|
||||
$wa = $document->getWebAssetManager();
|
||||
|
||||
// Build the script
|
||||
$script = array();
|
||||
$script[] = ' function jSelectVenue_'.$this->id.'(id, venue, object) {';
|
||||
$script[] = ' document.getElementById("'.$this->id.'_id").value = id;';
|
||||
$script[] = ' document.getElementById("'.$this->id.'_name").value = venue;';
|
||||
// $script[] = ' SqueezeBox.close();';
|
||||
$script[] = ' $("#venue-modal").modal("hide");';
|
||||
$script[] = ' }';
|
||||
|
||||
// Add to document head
|
||||
$wa->addInlineScript(implode("\n", $script));
|
||||
|
||||
// Setup variables for display
|
||||
$html = array();
|
||||
$link = Uri::base() . 'index.php?option=com_jem&view=editevent&layout=choosevenue&tmpl=component&function=jSelectVenue_'.$this->id;
|
||||
|
||||
$db = Factory::getContainer()->get('DatabaseDriver');
|
||||
$query = $db->getQuery(true);
|
||||
$query->select('venue');
|
||||
$query->from('#__jem_venues');
|
||||
$query->where(array('id='.(int)$this->value));
|
||||
$db->setQuery($query);
|
||||
|
||||
|
||||
|
||||
// if ($error = $db->getErrorMsg()) {
|
||||
// \Joomla\CMS\Factory::getApplication()->enqueueMessage($error, 'warning');
|
||||
// }
|
||||
try
|
||||
{
|
||||
$venue = $db->loadResult();
|
||||
}
|
||||
catch (RuntimeException $e)
|
||||
{
|
||||
\Joomla\CMS\Factory::getApplication()->enqueueMessage($e->getMessage(), 'warning');
|
||||
}
|
||||
|
||||
if (empty($venue)) {
|
||||
$venue = Text::_('COM_JEM_SELECT_VENUE');
|
||||
}
|
||||
$venue = htmlspecialchars($venue, ENT_QUOTES, 'UTF-8');
|
||||
|
||||
// The current venue input field
|
||||
$html[] = ' <input type="text" id="'.$this->id.'_name" value="'.$venue.'" disabled="disabled" size="35" />';
|
||||
|
||||
// The venue select button
|
||||
// $html[] = ' <a class="flyermodal" title="'.Text::_('COM_JEM_SELECT').'" href="'.$link.'&'.Session::getFormToken().'=1" rel="{handler: \'iframe\', size: {x:800, y:450}}">'.
|
||||
// Text::_('COM_JEM_SELECT').'</a>';
|
||||
|
||||
$html[] = HTMLHelper::_(
|
||||
'bootstrap.renderModal',
|
||||
'venue-modal',
|
||||
array(
|
||||
'url' => $link.'&'.Session::getFormToken().'=1',
|
||||
'title' => Text::_('COM_JEM_SELECT'),
|
||||
'width' => '800px',
|
||||
'height' => '450px',
|
||||
'footer' => '<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">' . Text::_('COM_JEM_CLOSE') . '</button>'
|
||||
)
|
||||
);
|
||||
$html[] ='<button type="button" class="btn btn-link" data-bs-dismiss="modal" data-bs-toggle="modal" data-bs-target="#venue-modal">'.Text::_('COM_JEM_SELECT').'
|
||||
</button>';
|
||||
|
||||
// The active venue id field
|
||||
if (0 == (int)$this->value) {
|
||||
$value = '';
|
||||
} else {
|
||||
$value = (int)$this->value;
|
||||
}
|
||||
|
||||
// class='required' for client side validation
|
||||
$class = '';
|
||||
if ($this->required) {
|
||||
$class = ' class="required modal-value"';
|
||||
}
|
||||
|
||||
$html[] = '<input type="hidden" id="'.$this->id.'_id"'.$class.' name="'.$this->name.'" value="'.$value.'" />';
|
||||
|
||||
return implode("\n", $html);
|
||||
}
|
||||
}
|
||||
?>
|
||||
41
components/com_jem/models/fields/starttime.php
Normal file
41
components/com_jem/models/fields/starttime.php
Normal file
@ -0,0 +1,41 @@
|
||||
<?php
|
||||
/**
|
||||
* @package JEM
|
||||
* @copyright (C) 2013-2024 joomlaeventmanager.net
|
||||
* @copyright (C) 2005-2009 Christoph Lukes
|
||||
* @license https://www.gnu.org/licenses/gpl-3.0 GNU/GPL
|
||||
*/
|
||||
|
||||
defined('JPATH_BASE') or die;
|
||||
|
||||
use Joomla\CMS\Form\FormField;
|
||||
|
||||
|
||||
/**
|
||||
* CountryOptions Field class.
|
||||
*
|
||||
*
|
||||
*/
|
||||
class JFormFieldStarttime extends FormField
|
||||
{
|
||||
/**
|
||||
* The form field type.
|
||||
*
|
||||
*/
|
||||
protected $type = 'Starttime';
|
||||
|
||||
|
||||
public function getInput()
|
||||
{
|
||||
|
||||
|
||||
$starthours = JEMHelper::buildtimeselect(23, 'starthours', substr( $this->value, 0, 2 ));
|
||||
$startminutes = JEMHelper::buildtimeselect(59, 'startminutes', substr($this->value, 3, 2 ));
|
||||
|
||||
$var2 = $starthours.$startminutes;
|
||||
|
||||
return $var2;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
18
components/com_jem/models/forms/addusers.xml
Normal file
18
components/com_jem/models/forms/addusers.xml
Normal file
@ -0,0 +1,18 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<form>
|
||||
<fieldset name="details">
|
||||
<field name="status" type="list"
|
||||
label="COM_JEM_STATUS"
|
||||
description="COM_JEM_STATUS_DESC"
|
||||
class="inputbox"
|
||||
filter="intval"
|
||||
size="1"
|
||||
default="1"
|
||||
>
|
||||
<option value="0">COM_JEM_ATTENDEES_INVITED</option>
|
||||
<option value="-1">COM_JEM_ATTENDEES_NOT_ATTENDING</option>
|
||||
<option value="1">COM_JEM_ATTENDEES_ATTENDING</option>
|
||||
<option value="2">COM_JEM_ATTENDEES_ON_WAITINGLIST</option>
|
||||
</field>
|
||||
</fieldset>
|
||||
</form>
|
||||
428
components/com_jem/models/forms/event.xml
Normal file
428
components/com_jem/models/forms/event.xml
Normal file
@ -0,0 +1,428 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<form>
|
||||
<fieldset name="details">
|
||||
<field name="articletext" type="editor"
|
||||
class="inputbox"
|
||||
label="COM_JEM_EDITEVENT_FIELD_DESCRIPTION"
|
||||
description="COM_JEM_EDITEVENT_FIELD_DESCRIPTION_DESC"
|
||||
filter="\Joomla\CMS\Component\ComponentHelper::filterText"
|
||||
hide="pagebreak"
|
||||
/>
|
||||
<field name="featured" class="inputbox" type="list"
|
||||
label="JFEATURED"
|
||||
description="COM_JEM_EDITEVENT_FIELD_FEATURED_DESC"
|
||||
default="0"
|
||||
>
|
||||
<option value="0">JNO</option>
|
||||
<option value="1">JYES</option>
|
||||
</field>
|
||||
|
||||
<field name="title" type="text"
|
||||
class="inputbox"
|
||||
size="40"
|
||||
label="COM_JEM_EDITEVENT_FIELD_EVENT_TITLE"
|
||||
description="COM_JEM_EDITEVENT_FIELD_EVENT_TITLE_DESC"
|
||||
required="true"
|
||||
/>
|
||||
<field name="alias" type="text"
|
||||
class="inputbox"
|
||||
size="40"
|
||||
label="COM_JEM_EDITEVENT_FIELD_ALIAS"
|
||||
description="COM_JEM_EDITEVENT_FIELD_ALIAS"
|
||||
hint="JFIELD_ALIAS_PLACEHOLDER"
|
||||
required="false"
|
||||
/>
|
||||
<field name="dates" type="calendarjem"
|
||||
label="COM_JEM_EDITEVENT_FIELD_DATE"
|
||||
description="COM_JEM_EDITEVENT_FIELD_DATE_DESC"
|
||||
class="inputbox"
|
||||
size="22"
|
||||
format="%Y-%m-%d"
|
||||
translateformat="true"
|
||||
filter="string"
|
||||
showtime="false"
|
||||
/>
|
||||
<field name="enddates" type="calendarjem"
|
||||
label="COM_JEM_EDITEVENT_FIELD_ENDDATE"
|
||||
description="COM_JEM_EDITEVENT_FIELD_ENDDATE_DESC"
|
||||
class="inputbox"
|
||||
size="22"
|
||||
format="%Y-%m-%d"
|
||||
translateformat="true"
|
||||
filter="string"
|
||||
showtime="false"
|
||||
/>
|
||||
<field name="times" type="starttime"
|
||||
class="inputbox"
|
||||
size="10"
|
||||
label="COM_JEM_EDITEVENT_FIELD_EVENT_TIME"
|
||||
description="COM_JEM_EDITEVENT_FIELD_EVENT_TIME_DESC"
|
||||
required="false"
|
||||
/>
|
||||
<field name="endtimes" type="endtime"
|
||||
class="inputbox"
|
||||
size="10"
|
||||
label="COM_JEM_EDITEVENT_FIELD_END_TIME"
|
||||
description="COM_JEM_EDITEVENT_FIELD_END_TIME_DESC"
|
||||
required="false"
|
||||
/>
|
||||
<field name="cats" type="catoptions"
|
||||
multiple="true"
|
||||
class="inputbox required form-control"
|
||||
size="4"
|
||||
label="COM_JEM_EDITEVENT_FIELD_CATEGORIES"
|
||||
labelclass=""
|
||||
description="COM_JEM_EDITEVENT_FIELD_CATEGORIES_DESC"
|
||||
required="true"
|
||||
/>
|
||||
</fieldset>
|
||||
|
||||
<fieldset name="publish">
|
||||
<field name="id" type="text"
|
||||
default="0"
|
||||
readonly="true"
|
||||
class="readonly"
|
||||
label="JGLOBAL_FIELD_ID_LABEL"
|
||||
description="JGLOBAL_FIELD_ID_DESC"
|
||||
/>
|
||||
<field name="created" type="calendar"
|
||||
class="readonly"
|
||||
label="JGLOBAL_FIELD_CREATED_LABEL"
|
||||
description="JGLOBAL_FIELD_CREATED_DESC"
|
||||
size="22"
|
||||
default="now"
|
||||
readonly="true"
|
||||
format="Y-m-d H:i:s"
|
||||
translateformat="true"
|
||||
filter="user_utc"
|
||||
/>
|
||||
<field name="modified" type="calendar"
|
||||
class="readonly"
|
||||
label="JGLOBAL_FIELD_MODIFIED_LABEL"
|
||||
description="COM_JEM_EDITEVENT_FIELD_EDITED_AT"
|
||||
size="22"
|
||||
readonly="true"
|
||||
format="Y-m-d H:i:s"
|
||||
translateformat="true"
|
||||
filter="user_utc"
|
||||
/>
|
||||
<field name="version" type="text"
|
||||
default="0"
|
||||
readonly="true"
|
||||
class="readonly"
|
||||
label="COM_JEM_EDITEVENT_FIELD_REVISED"
|
||||
description="COM_JEM_EDITEVENT_FIELD_REVISED"
|
||||
/>
|
||||
<field name="created_by" type="user"
|
||||
label="JGLOBAL_FIELD_CREATED_BY_LABEL"
|
||||
description="JGLOBAL_FIELD_CREATED_BY_Desc"
|
||||
/>
|
||||
<field name="published" type="list"
|
||||
label="JSTATUS"
|
||||
description="COM_JEM_EDITEVENT_FIELD_PUBLISHED_DESC"
|
||||
class="inputbox"
|
||||
size="1"
|
||||
default="1"
|
||||
>
|
||||
<option value="1">JPUBLISHED</option>
|
||||
<option value="0">JUNPUBLISHED</option>
|
||||
<option value="2">JARCHIVED</option>
|
||||
<option value="-2">JTRASHED</option>
|
||||
</field>
|
||||
<field name="access" type="list"
|
||||
label="JFIELD_ACCESS_LABEL"
|
||||
description="JFIELD_ACCESS_DESC"
|
||||
class="inputbox"
|
||||
size="1"
|
||||
/>
|
||||
</fieldset>
|
||||
|
||||
<fieldset name="request">
|
||||
<field name="locid" type="modal_venue"
|
||||
label="COM_JEM_EDITEVENT_FIELD_VENUE"
|
||||
description="COM_JEM_EDITEVENT_FIELD_VENUE_DESC"
|
||||
size="40"
|
||||
required="false"
|
||||
default="0"
|
||||
/>
|
||||
<field name="contactid" type="modal_contact"
|
||||
label="COM_JEM_EDITEVENT_FIELD_CONTACT"
|
||||
description="COM_JEM_EDITEVENT_FIELD_CONTACT_DESC"
|
||||
size="40"
|
||||
required="false"
|
||||
/>
|
||||
</fieldset>
|
||||
|
||||
<fieldset name="image"
|
||||
label="COM_JEM_IMAGE"
|
||||
>
|
||||
<field name="datimage" type="imageselectevent"
|
||||
class="inputbox"
|
||||
size="40"
|
||||
label="COM_JEM_EDITEVENT_FIELD_IMAGESELECT"
|
||||
description="COM_JEM_EDITEVENT_FIELD_IMAGESELECT_DESC"
|
||||
/>
|
||||
<field name="userfile" type="file"
|
||||
class="inputbox"
|
||||
size="40"
|
||||
label="COM_JEM_IMAGE"
|
||||
description="COM_JEM_UPLOAD_IMAGE"
|
||||
/>
|
||||
</fieldset>
|
||||
|
||||
<fieldset name="custom">
|
||||
<field name="custom1" type="text"
|
||||
size="20"
|
||||
readonly="false"
|
||||
class="inputbox"
|
||||
label="COM_JEM_EVENT_CUSTOM_FIELD1"
|
||||
description="COM_JEM_EVENT_CUSTOM_FIELD1_DESC"
|
||||
/>
|
||||
<field name="custom2" type="text"
|
||||
size="20"
|
||||
readonly="false"
|
||||
class="inputbox"
|
||||
label="COM_JEM_EVENT_CUSTOM_FIELD2"
|
||||
description="COM_JEM_EVENT_CUSTOM_FIELD2_DESC"
|
||||
/>
|
||||
<field name="custom3" type="text"
|
||||
size="20"
|
||||
readonly="false"
|
||||
class="inputbox"
|
||||
label="COM_JEM_EVENT_CUSTOM_FIELD3"
|
||||
description="COM_JEM_EVENT_CUSTOM_FIELD3_DESC"
|
||||
/>
|
||||
<field name="custom4" type="text"
|
||||
size="20"
|
||||
readonly="false"
|
||||
class="inputbox"
|
||||
label="COM_JEM_EVENT_CUSTOM_FIELD4"
|
||||
description="COM_JEM_EVENT_CUSTOM_FIELD4_DESC"
|
||||
/>
|
||||
<field name="custom5" type="text"
|
||||
size="20"
|
||||
readonly="false"
|
||||
class="inputbox"
|
||||
label="COM_JEM_EVENT_CUSTOM_FIELD5"
|
||||
description="COM_JEM_EVENT_CUSTOM_FIELD5_DESC"
|
||||
/>
|
||||
<field name="custom6" type="text"
|
||||
size="20"
|
||||
readonly="false"
|
||||
class="inputbox"
|
||||
label="COM_JEM_EVENT_CUSTOM_FIELD6"
|
||||
description="COM_JEM_EVENT_CUSTOM_FIELD6_DESC"
|
||||
/>
|
||||
<field name="custom7" type="text"
|
||||
size="20"
|
||||
readonly="false"
|
||||
class="inputbox"
|
||||
label="COM_JEM_EVENT_CUSTOM_FIELD7"
|
||||
description="COM_JEM_EVENT_CUSTOM_FIELD7_DESC"
|
||||
/>
|
||||
<field name="custom8" type="text"
|
||||
size="20"
|
||||
readonly="false"
|
||||
class="inputbox"
|
||||
label="COM_JEM_EVENT_CUSTOM_FIELD8"
|
||||
description="COM_JEM_EVENT_CUSTOM_FIELD8_DESC"
|
||||
/>
|
||||
<field name="custom9" type="text"
|
||||
size="20"
|
||||
readonly="false"
|
||||
class="inputbox"
|
||||
label="COM_JEM_EVENT_CUSTOM_FIELD9"
|
||||
description="COM_JEM_EVENT_CUSTOM_FIELD9_DESC"
|
||||
/>
|
||||
<field name="custom10" type="text"
|
||||
size="20"
|
||||
readonly="false"
|
||||
class="inputbox"
|
||||
label="COM_JEM_EVENT_CUSTOM_FIELD10"
|
||||
description="COM_JEM_EVENT_CUSTOM_FIELD10_DESC"
|
||||
/>
|
||||
</fieldset>
|
||||
|
||||
<fieldset name="registration">
|
||||
<field name="registra" type="list"
|
||||
label="COM_JEM_EVENT_FIELD_ENABLE_REGISTRATION"
|
||||
description="COM_JEM_EVENT_FIELD_ENABLE_REGISTRATION_DESC"
|
||||
class="inputbox"
|
||||
default="0"
|
||||
required="false"
|
||||
>
|
||||
<option value="0">JNO</option>
|
||||
<option value="1">JYES</option>
|
||||
<option value="2">COM_JEM_EVENT_FIELD_FROM</option>
|
||||
</field>
|
||||
<field name="registra_from" type="calendar"
|
||||
label="COM_JEM_EVENT_FIELD_REGISTRATION_FROM"
|
||||
description="COM_JEM_EVENT_FIELD_REGISTRATION_FROM_DESC"
|
||||
class="input-medium"
|
||||
default="now"
|
||||
filter="user_utc"
|
||||
format="%Y-%m-%d %H:%M:%S"
|
||||
filterformat="Y-m-d H:i:s"
|
||||
singleheader="true"
|
||||
showtime="true"
|
||||
timeformat="24"
|
||||
todaybutton="true"
|
||||
weeknumbers="true"
|
||||
filltable="true"
|
||||
showon="registra:2"
|
||||
/>
|
||||
|
||||
<field name="registra_until" type="calendar"
|
||||
label="COM_JEM_EVENT_FIELD_REGISTRATION_UNTIL"
|
||||
description="COM_JEM_EVENT_FIELD_REGISTRATION_UNTIL_DESC"
|
||||
class="input-medium"
|
||||
filter="user_utc"
|
||||
format="%Y-%m-%d %H:%M:%S"
|
||||
filterformat="Y-m-d H:i:s"
|
||||
singleheader="true"
|
||||
showtime="true"
|
||||
timeformat="24"
|
||||
todaybutton="true"
|
||||
weeknumbers="true"
|
||||
filltable="true"
|
||||
showon="registra:2"
|
||||
/>
|
||||
<field name="reginvitedonly" type="checkbox"
|
||||
class="inputbox"
|
||||
label="COM_JEM_EDITEVENT_FIELD_REG_INVITED_ONLY"
|
||||
description="COM_JEM_EDITEVENT_FIELD_REG_INVITED_ONLY_DESC"
|
||||
checked="0"
|
||||
/>
|
||||
<field name="unregistra" type="list"
|
||||
label="COM_JEM_EVENT_FIELD_ENABLE_ANNULATION"
|
||||
description="COM_JEM_EVENT_FIELD_ENABLE_ANNULATION_DESC"
|
||||
class="inputbox"
|
||||
default="0"
|
||||
required="false"
|
||||
>
|
||||
<option value="0">JNO</option>
|
||||
<option value="1">JYES</option>
|
||||
<option value="2">COM_JEM_EVENT_FIELD_UNTIL</option>
|
||||
</field>
|
||||
<field name="unregistra_until" type="calendar"
|
||||
label="COM_JEM_EVENT_FIELD_ANNULATION_UNTIL"
|
||||
description="COM_JEM_EVENT_FIELD_ANNULATION_UNTIL_DESC"
|
||||
class="input-medium"
|
||||
filter="user_utc"
|
||||
format="%Y-%m-%d %H:%M:%S"
|
||||
filterformat="Y-m-d H:i:s"
|
||||
singleheader="true"
|
||||
showtime="true"
|
||||
timeformat="24"
|
||||
todaybutton="true"
|
||||
weeknumbers="true"
|
||||
filltable="true"
|
||||
showon="unregistra:2"
|
||||
/>
|
||||
<field name="maxplaces" type="number"
|
||||
size="4"
|
||||
class="inputbox"
|
||||
label="COM_JEM_EDITEVENT_FIELD_MAX_PLACES"
|
||||
description="COM_JEM_EDITEVENT_FIELD_MAX_PLACES_DESC"
|
||||
filter="integer"
|
||||
default="0"
|
||||
min="0"
|
||||
/>
|
||||
<field name="minbookeduser" type="number"
|
||||
size="4"
|
||||
class="inputbox"
|
||||
label="COM_JEM_MINIMUM_BOOKED_PLACES_PER_USER"
|
||||
description="COM_JEM_MINIMUM_BOOKED_PLACES_PER_USER_DESC"
|
||||
filter="integer"
|
||||
default="1"
|
||||
min="1"
|
||||
/>
|
||||
<field name="maxbookeduser" type="number"
|
||||
size="4"
|
||||
class="inputbox"
|
||||
label="COM_JEM_MAXIMUM_BOOKED_PLACES_PER_USER"
|
||||
description="COM_JEM_MAXIMUM_BOOKED_PLACES_PER_USER_DESC"
|
||||
filter="integer"
|
||||
default="1"
|
||||
min="1"
|
||||
/>
|
||||
<field name="reservedplaces" type="number"
|
||||
size="4"
|
||||
class="inputbox"
|
||||
label="COM_JEM_RESERVED_PLACES"
|
||||
description="COM_JEM_RESERVED_PLACES_DESC"
|
||||
filter="integer"
|
||||
default="0"
|
||||
min="0"
|
||||
/>
|
||||
<field name="invited" type="modal_users"
|
||||
label="COM_JEM_EDITEVENT_FIELD_INVITED_USERS"
|
||||
description="COM_JEM_EDITEVENT_FIELD_INVITED_USERS_DESC"
|
||||
size="4"
|
||||
required="false"
|
||||
/>
|
||||
<field name="avplaces" type="text"
|
||||
size="4"
|
||||
class="readonly"
|
||||
readonly="true"
|
||||
disabled="true"
|
||||
label="COM_JEM_AVAILABLE_PLACES"
|
||||
description="COM_JEM_AVAILABLE_PLACES_DESC"
|
||||
/>
|
||||
<field name="waitinglist" type="checkbox"
|
||||
class="inputbox"
|
||||
label="COM_JEM_EDITEVENT_FIELD_ENABLE_WAITINGLIST"
|
||||
description="COM_JEM_EDITEVENT_FIELD_ENABLE_WAITINGLIST_DESC"
|
||||
checked="0"
|
||||
/>
|
||||
<field name="requestanswer" type="checkbox"
|
||||
class="inputbox"
|
||||
label="COM_JEM_EDITEVENT_FIELD_REQUEST_ANSWER_ASSISTENCE"
|
||||
description="COM_JEM_EDITEVENT_FIELD_REQUEST_ANSWER_ASSISTENCE_DESC"
|
||||
checked="0"
|
||||
/>
|
||||
<field name="seriesbooking" type="checkbox"
|
||||
size="1"
|
||||
class="inputbox"
|
||||
label="COM_JEM_EDITEVENT_FIELD_SERIES_EVENT_BOOKING"
|
||||
description="COM_JEM_EDITEVENT_FIELD_SERIES_EVENT_BOOKING_DESC"
|
||||
checked="0"
|
||||
/>
|
||||
<field name="singlebooking" type="checkbox"
|
||||
size="1"
|
||||
class="inputbox"
|
||||
label="COM_JEM_EDITEVENT_FIELD_SINGLE_EVENT_BOOKING"
|
||||
description="COM_JEM_EDITEVENT_FIELD_SINGLE_EVENT_BOOKING_DESC"
|
||||
checked="0"
|
||||
/>
|
||||
</fieldset>
|
||||
|
||||
<fieldset name="recurrence"
|
||||
label="COM_JEM_EDITEVENT_FIELD_RECURRING_EVENTS"
|
||||
>
|
||||
<field name="recurrence_type" type="list"
|
||||
default="0"
|
||||
label="COM_JEM_EDITEVENT_FIELD_RECURRENCE"
|
||||
description="COM_JEM_EDITEVENT_FIELD_RECURRENCE"
|
||||
>
|
||||
<option value="0">COM_JEM_NOTHING</option>
|
||||
<option value="1">COM_JEM_DAILY</option>
|
||||
<option value="2">COM_JEM_WEEKLY</option>
|
||||
<option value="3">COM_JEM_MONTHLY</option>
|
||||
<option value="4">COM_JEM_WEEKDAY</option>
|
||||
<option value="5">COM_JEM_YEARLY</option>
|
||||
</field>
|
||||
<field name="recurrence_limit_date" type="calendarjem"
|
||||
default="now"
|
||||
label="COM_JEM_EDITEVENT_FIELD_RECURRENCE_COUNTER"
|
||||
description="COM_JEM_EDITEVENT_FIELD_RECURRENCE_COUNTER"
|
||||
class="inputbox"
|
||||
size="22"
|
||||
format="%Y-%m-%d"
|
||||
translateformat="true"
|
||||
filter="string"
|
||||
showtime="false"
|
||||
/>
|
||||
</fieldset>
|
||||
|
||||
</form>
|
||||
1
components/com_jem/models/forms/index.html
Normal file
1
components/com_jem/models/forms/index.html
Normal file
@ -0,0 +1 @@
|
||||
<!DOCTYPE html><title></title>
|
||||
51
components/com_jem/models/forms/mailto.xml
Normal file
51
components/com_jem/models/forms/mailto.xml
Normal file
@ -0,0 +1,51 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<form>
|
||||
<fieldset name="details">
|
||||
<field
|
||||
name="emailto"
|
||||
type="email"
|
||||
label="COM_JEM_MAILTO_EMAIL_TO"
|
||||
filter="string"
|
||||
required="true"
|
||||
size="30"
|
||||
validate="email"
|
||||
autocomplete="email"
|
||||
/>
|
||||
|
||||
<field
|
||||
name="sender"
|
||||
type="text"
|
||||
label="COM_JEM_MAILTO_SENDER"
|
||||
filter="string"
|
||||
required="true"
|
||||
size="30"
|
||||
/>
|
||||
|
||||
<field
|
||||
name="emailfrom"
|
||||
type="email"
|
||||
label="COM_JEM_MAILTO_YOUR_EMAIL"
|
||||
filter="string"
|
||||
required="true"
|
||||
size="30"
|
||||
validate="email"
|
||||
autocomplete="email"
|
||||
/>
|
||||
|
||||
<field
|
||||
name="subject"
|
||||
type="text"
|
||||
label="COM_JEM_MAILTO_SUBJECT"
|
||||
filter="string"
|
||||
required="true"
|
||||
size="30"
|
||||
/>
|
||||
|
||||
<field
|
||||
name="captcha"
|
||||
type="captcha"
|
||||
label="COM_JEM_MAILTO_CAPTCHA"
|
||||
validate="captcha"
|
||||
/>
|
||||
</fieldset>
|
||||
</form>
|
||||
252
components/com_jem/models/forms/venue.xml
Normal file
252
components/com_jem/models/forms/venue.xml
Normal file
@ -0,0 +1,252 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<form>
|
||||
<fieldset name="details">
|
||||
<field name="id" type="text"
|
||||
default="0"
|
||||
readonly="true"
|
||||
class="readonly"
|
||||
label="JGLOBAL_FIELD_ID_LABEL"
|
||||
description="JGLOBAL_FIELD_ID_DESC"
|
||||
/>
|
||||
<field name="venue" type="text"
|
||||
class="inputbox"
|
||||
size="40"
|
||||
label="COM_JEM_VENUE"
|
||||
description="COM_JEM_VENUE"
|
||||
required="true"
|
||||
/>
|
||||
<field name="alias" type="text"
|
||||
class="inputbox"
|
||||
size="40"
|
||||
label="COM_JEM_EDITVENUE_FIELD_ALIAS"
|
||||
hint="JFIELD_ALIAS_PLACEHOLDER"
|
||||
description="COM_JEM_EDITVENUE_FIELD_ALIAS_DESC"
|
||||
/>
|
||||
<field name="url" type="text"
|
||||
class="inputbox"
|
||||
size="40"
|
||||
label="COM_JEM_WEBSITE"
|
||||
description="COM_JEM_WEBSITE_DESC"
|
||||
/>
|
||||
<field name="street" type="text"
|
||||
id="street"
|
||||
class="inputbox"
|
||||
size="40"
|
||||
label="COM_JEM_STREET"
|
||||
description="COM_JEM_STREET"
|
||||
/>
|
||||
<field name="locdescription" type="editor"
|
||||
filter="\Joomla\CMS\Component\ComponentHelper::filterText"
|
||||
hide="pagebreak"
|
||||
class="inputbox"
|
||||
rows="3" cols="20"
|
||||
width="100%"
|
||||
label="COM_JEM_VENUE_DESCRIPTION"
|
||||
description="COM_JEM_VENUE_DESCRIPTION_DESC"
|
||||
/>
|
||||
<field name="latitude" type="text"
|
||||
class="inputbox"
|
||||
size="40"
|
||||
label="COM_JEM_LATITUDE"
|
||||
description="COM_JEM_LATITUDE"
|
||||
/>
|
||||
<field name="longitude" type="text"
|
||||
class="inputbox"
|
||||
size="40"
|
||||
label="COM_JEM_LONGITUDE"
|
||||
description="COM_JEM_LONGITUDE_DESC"
|
||||
/>
|
||||
<field name="postalCode" type="text"
|
||||
class="inputbox"
|
||||
size="40"
|
||||
label="COM_JEM_ZIP"
|
||||
description="COM_JEM_ZIP"
|
||||
/>
|
||||
<field name="city" type="text"
|
||||
class="inputbox"
|
||||
size="40"
|
||||
label="COM_JEM_CITY"
|
||||
description="COM_JEM_CITY"
|
||||
/>
|
||||
<field name="state" type="text"
|
||||
class="inputbox"
|
||||
size="40"
|
||||
label="COM_JEM_STATE"
|
||||
description="COM_JEM_STATE"
|
||||
/>
|
||||
<field name="map" type="checkbox"
|
||||
class="inputbox"
|
||||
size="40"
|
||||
label="COM_JEM_ENABLE_MAP"
|
||||
description="COM_JEM_ENABLE_MAP"
|
||||
value="1"
|
||||
default="0"
|
||||
/>
|
||||
<field name="published" type="list"
|
||||
label="JSTATUS"
|
||||
description="COM_JEM_PUBLISHED"
|
||||
class="inputbox"
|
||||
filter="intval"
|
||||
size="1"
|
||||
default="1"
|
||||
>
|
||||
<option value="1">JPUBLISHED</option>
|
||||
<option value="0">JUNPUBLISHED</option>
|
||||
</field>
|
||||
<field name="country" type="countryoptions"
|
||||
label="COM_JEM_COUNTRY"
|
||||
description="COM_JEM_COUNTRY_DESC"
|
||||
class="select_country"
|
||||
/>
|
||||
</fieldset>
|
||||
|
||||
<fieldset name="custom">
|
||||
<field name="custom1" type="text"
|
||||
size="20"
|
||||
readonly="false"
|
||||
class="inputbox"
|
||||
label="COM_JEM_VENUE_CUSTOM_FIELD1"
|
||||
description="COM_JEM_VENUE_CUSTOM_FIELD1_DESC"
|
||||
/>
|
||||
<field name="custom2" type="text"
|
||||
size="20"
|
||||
readonly="false"
|
||||
class="inputbox"
|
||||
label="COM_JEM_VENUE_CUSTOM_FIELD2"
|
||||
description="COM_JEM_VENUE_CUSTOM_FIELD2_DESC"
|
||||
/>
|
||||
<field name="custom3" type="text"
|
||||
size="20"
|
||||
readonly="false"
|
||||
class="inputbox"
|
||||
label="COM_JEM_VENUE_CUSTOM_FIELD3"
|
||||
description="COM_JEM_VENUE_CUSTOM_FIELD3_DESC"
|
||||
/>
|
||||
<field name="custom4" type="text"
|
||||
size="20"
|
||||
readonly="false"
|
||||
class="inputbox"
|
||||
label="COM_JEM_VENUE_CUSTOM_FIELD4"
|
||||
description="COM_JEM_VENUE_CUSTOM_FIELD4_DESC"
|
||||
/>
|
||||
<field name="custom5" type="text"
|
||||
size="20"
|
||||
readonly="false"
|
||||
class="inputbox"
|
||||
label="COM_JEM_VENUE_CUSTOM_FIELD5"
|
||||
description="COM_JEM_VENUE_CUSTOM_FIELD5_DESC"
|
||||
/>
|
||||
<field name="custom6" type="text"
|
||||
size="20"
|
||||
readonly="false"
|
||||
class="inputbox"
|
||||
label="COM_JEM_VENUE_CUSTOM_FIELD6"
|
||||
description="COM_JEM_VENUE_CUSTOM_FIELD6_DESC"
|
||||
/>
|
||||
<field name="custom7" type="text"
|
||||
size="20"
|
||||
readonly="false"
|
||||
class="inputbox"
|
||||
label="COM_JEM_VENUE_CUSTOM_FIELD7"
|
||||
description="COM_JEM_VENUE_CUSTOM_FIELD7_DESC"
|
||||
/>
|
||||
<field name="custom8" type="text"
|
||||
size="20"
|
||||
readonly="false"
|
||||
class="inputbox"
|
||||
label="COM_JEM_VENUE_CUSTOM_FIELD8"
|
||||
description="COM_JEM_VENUE_CUSTOM_FIELD8_DESC"
|
||||
/>
|
||||
<field name="custom9" type="text"
|
||||
size="20"
|
||||
readonly="false"
|
||||
class="inputbox"
|
||||
label="COM_JEM_VENUE_CUSTOM_FIELD9"
|
||||
description="COM_JEM_VENUE_CUSTOM_FIELD9_DESC"
|
||||
/>
|
||||
<field name="custom10" type="text"
|
||||
size="20"
|
||||
readonly="false"
|
||||
class="inputbox"
|
||||
label="COM_JEM_VENUE_CUSTOM_FIELD10"
|
||||
description="COM_JEM_VENUE_CUSTOM_FIELD10_DESC"
|
||||
/>
|
||||
</fieldset>
|
||||
|
||||
<fieldset name="image" label="COM_JEM_IMAGE">
|
||||
<field name="locimage" type="imageselectevent"
|
||||
class="inputbox"
|
||||
size="40"
|
||||
label="COM_JEM_EDITVENUE_FIELD_IMAGESELECT"
|
||||
description="COM_JEM_EDITVENUE_FIELD_IMAGESELECT_DESC"
|
||||
/>
|
||||
<field name="userfile" type="file"
|
||||
class="inputbox"
|
||||
size="40"
|
||||
label="COM_JEM_IMAGE"
|
||||
description="COM_JEM_UPLOAD_IMAGE"
|
||||
/>
|
||||
</fieldset>
|
||||
|
||||
<fieldset name="publish"
|
||||
label="COM_JEM_FIELDSET_PUBLISHING"
|
||||
>
|
||||
<field name="created_by" type="user"
|
||||
label="COM_JEM_FIELD_CREATED_BY_LABEL"
|
||||
description="COM_JEM_FIELD_CREATED_BY_DESC"
|
||||
/>
|
||||
<field name="created" type="calendar"
|
||||
class="readonly"
|
||||
label="JGLOBAL_FIELD_CREATED_LABEL"
|
||||
description="JGLOBAL_FIELD_CREATED_DESC"
|
||||
size="22"
|
||||
default="now"
|
||||
readonly="true"
|
||||
format="Y-m-d H:i:s"
|
||||
translateformat="true"
|
||||
filter="user_utc"
|
||||
/>
|
||||
<field name="version" type="text"
|
||||
class="readonly"
|
||||
label="COM_JEM_FIELD_VERSION_LABEL"
|
||||
description="COM_JEM_FIELD_VERSION_DESC"
|
||||
size="6"
|
||||
readonly="true"
|
||||
filter="unset"
|
||||
/>
|
||||
<field name="modified" type="calendar"
|
||||
class="readonly"
|
||||
label="JGLOBAL_FIELD_MODIFIED_LABEL"
|
||||
description="COM_JEM_FIELD_MODIFIED_DESC"
|
||||
size="22"
|
||||
readonly="true"
|
||||
format="Y-m-d H:i:s"
|
||||
translateformat="true"
|
||||
filter="user_utc"
|
||||
/>
|
||||
<field name="modified_by" type="user"
|
||||
label="JGLOBAL_FIELD_MODIFIED_BY_LABEL"
|
||||
description="JGLOBAL_FIELD_MODIFIED_BY_LABEL_DESC"
|
||||
class="readonly"
|
||||
readonly="true"
|
||||
filter="unset"
|
||||
/>
|
||||
</fieldset>
|
||||
|
||||
<fieldset name="meta"
|
||||
label="JGLOBAL_FIELDSET_METADATA_OPTIONS"
|
||||
>
|
||||
<field name="meta_keywords" type="textarea"
|
||||
class="inputbox"
|
||||
rows="3" cols="30"
|
||||
label="JFIELD_META_KEYWORDS_LABEL"
|
||||
description="COM_JEM_FIELD_METAKEYWORDS_DESC"
|
||||
/>
|
||||
<field name="meta_description" type="textarea"
|
||||
class="inputbox"
|
||||
rows="3" cols="30"
|
||||
label="JFIELD_META_DESCRIPTION_LABEL"
|
||||
description="COM_JEM_FIELD_METADESCRIPTION_DESC"
|
||||
/>
|
||||
</fieldset>
|
||||
</form>
|
||||
1
components/com_jem/models/index.html
Normal file
1
components/com_jem/models/index.html
Normal file
@ -0,0 +1 @@
|
||||
<!DOCTYPE html><title></title>
|
||||
124
components/com_jem/models/mailto.php
Normal file
124
components/com_jem/models/mailto.php
Normal file
@ -0,0 +1,124 @@
|
||||
<?php
|
||||
/**
|
||||
* @package JEM
|
||||
* @copyright (C) 2013-2024 joomlaeventmanager.net
|
||||
* @copyright (C) 2005-2009 Christoph Lukes
|
||||
* @license https://www.gnu.org/licenses/gpl-3.0 GNU/GPL
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\MVC\Model\FormModel;
|
||||
use Joomla\CMS\String\PunycodeHelper;
|
||||
|
||||
/**
|
||||
* Mailto model class.
|
||||
*
|
||||
* @since 3.8.9
|
||||
*/
|
||||
class JemModelMailto extends FormModel
|
||||
{
|
||||
/**
|
||||
* Method to get the mailto form.
|
||||
*
|
||||
* The base form is loaded from XML and then an event is fired
|
||||
* for users plugins to extend the form with extra fields.
|
||||
*
|
||||
* @param array $data An optional array of data for the form to interrogate.
|
||||
* @param boolean $loadData True if the form is to load its own data (default case), false if not.
|
||||
*
|
||||
* @return JForm A JForm object on success, false on failure
|
||||
*
|
||||
* @since 3.8.9
|
||||
*/
|
||||
|
||||
protected function populateState()
|
||||
{
|
||||
$app = Factory::getApplication();
|
||||
$params = $app->getParams();
|
||||
$this->setState('params', $params);
|
||||
|
||||
$this->setState('layout', $app->input->getCmd('layout', ''));
|
||||
}
|
||||
public function getForm($data = array(), $loadData = true)
|
||||
{
|
||||
|
||||
// Get the form.
|
||||
$form = $this->loadForm('com_jem.mailto', 'mailto', array('load_data' => $loadData));
|
||||
|
||||
if (empty($form))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return $form;
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to get the data that should be injected in the form.
|
||||
*
|
||||
* @return array The default data is an empty array.
|
||||
*
|
||||
* @since 3.8.9
|
||||
*/
|
||||
|
||||
protected function loadFormData()
|
||||
{
|
||||
$app = Factory::getApplication();
|
||||
$user = $app->getIdentity();
|
||||
|
||||
$data = $app->getUserState('jem.mailto.form.data', array());
|
||||
|
||||
$data['link'] = urldecode($app->input->get('link', '', 'BASE64'));
|
||||
|
||||
if ($data['link'] == '')
|
||||
{
|
||||
// JError::raiseError(403, Text::_('COM_JEM_MAILTO_LINK_IS_MISSING'));
|
||||
Factory::getApplication()->enqueueMessage(Text::_('COM_JEM_MAILTO_LINK_IS_MISSING'), 'error');
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
// Load with previous data, if it exists
|
||||
$data['sender'] = $app->input->post->getString('sender', '');
|
||||
$data['subject'] = $app->input->post->getString('subject', '');
|
||||
$data['emailfrom'] = PunycodeHelper::emailToPunycode($app->input->post->getString('emailfrom', ''));
|
||||
$data['emailto'] = PunycodeHelper::emailToPunycode($app->input->post->getString('emailto', ''));
|
||||
|
||||
if (!$user->guest)
|
||||
{
|
||||
$data['sender'] = $user->name;
|
||||
$data['emailfrom'] = $user->email;
|
||||
}
|
||||
|
||||
$app->setUserState('jem.mailto.form.data', $data);
|
||||
|
||||
$this->preprocessData('com_jem.mailto', $data);
|
||||
|
||||
return $data;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the request data
|
||||
*
|
||||
* @return array The requested data
|
||||
*
|
||||
* @since 3.8.9
|
||||
*/
|
||||
public function getData()
|
||||
{
|
||||
$input = Factory::getApplication()->input;
|
||||
|
||||
$data['emailto'] = $input->get('emailto', '', 'string');
|
||||
$data['sender'] = $input->get('sender', '', 'string');
|
||||
$data['emailfrom'] = $input->get('emailfrom', '', 'string');
|
||||
$data['subject'] = $input->get('subject', '', 'string');
|
||||
$data['consentbox'] = $input->get('consentbox', '', 'string');
|
||||
|
||||
return $data;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
291
components/com_jem/models/myattendances.php
Normal file
291
components/com_jem/models/myattendances.php
Normal file
@ -0,0 +1,291 @@
|
||||
<?php
|
||||
/**
|
||||
* @package JEM
|
||||
* @copyright (C) 2013-2024 joomlaeventmanager.net
|
||||
* @copyright (C) 2005-2009 Christoph Lukes
|
||||
* @license https://www.gnu.org/licenses/gpl-3.0 GNU/GPL
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Pagination\Pagination;
|
||||
use Joomla\CMS\MVC\Model\BaseDatabaseModel;
|
||||
use Joomla\CMS\Filter\InputFilter;
|
||||
|
||||
/**
|
||||
* JEM Component JEM Model
|
||||
*
|
||||
* @package JEM
|
||||
*
|
||||
*/
|
||||
class JemModelMyattendances extends BaseDatabaseModel
|
||||
{
|
||||
protected $_attending = null;
|
||||
protected $_total_attending = null;
|
||||
protected $_pagination_attending = null;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
|
||||
$app = Factory::getApplication();
|
||||
$jemsettings = JemHelper::config();
|
||||
|
||||
//get the number of events
|
||||
|
||||
/* in J! 3.3.6 limitstart is removed from request - but we need it! */
|
||||
if ($app->input->getInt('limitstart', null) === null) {
|
||||
$app->setUserState('com_jem.myattendances.limitstart', 0);
|
||||
}
|
||||
|
||||
$limit = $app->getUserStateFromRequest('com_jem.myattendances.limit', 'limit', $jemsettings->display_num, 'int');
|
||||
$limitstart = $app->getUserStateFromRequest('com_jem.myattendances.limitstart', 'limitstart', 0, 'int');
|
||||
// correct start value if required
|
||||
$limitstart = $limit ? (int)(floor($limitstart / $limit) * $limit) : 0;
|
||||
|
||||
$this->setState('limit', $limit);
|
||||
$this->setState('limitstart', $limitstart);
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to get the Events user is attending
|
||||
*
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function getAttending()
|
||||
{
|
||||
$pop = Factory::getApplication()->input->getBool('pop', false);
|
||||
|
||||
// Lets load the content if it doesn't already exist
|
||||
if (empty($this->_attending)) {
|
||||
$query = $this->_buildQueryAttending();
|
||||
$pagination = $this->getAttendingPagination();
|
||||
|
||||
if ($pop) {
|
||||
$this->_attending = $this->_getList($query);
|
||||
} else {
|
||||
$pagination = $this->getAttendingPagination();
|
||||
$this->_attending = $this->_getList($query, $pagination->limitstart, $pagination->limit);
|
||||
}
|
||||
|
||||
foreach ($this->_attending as $i => $item) {
|
||||
$item->categories = $this->getCategories($item->eventid);
|
||||
|
||||
//remove events without categories (users have no access to them)
|
||||
if (empty($item->categories)) {
|
||||
unset($this->_attending[$i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return $this->_attending;
|
||||
}
|
||||
|
||||
/**
|
||||
* Total nr of events
|
||||
*
|
||||
* @access public
|
||||
* @return integer
|
||||
*/
|
||||
public function getTotalAttending()
|
||||
{
|
||||
// Lets load the total nr if it doesn't already exist
|
||||
if (empty($this->_total_attending))
|
||||
{
|
||||
$query = $this->_buildQueryAttending();
|
||||
$this->_total_attending = $this->_getListCount($query);
|
||||
}
|
||||
|
||||
return $this->_total_attending;
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to get a pagination object for the attending events
|
||||
*
|
||||
* @access public
|
||||
* @return integer
|
||||
*/
|
||||
public function getAttendingPagination()
|
||||
{
|
||||
// Lets load the content if it doesn't already exist
|
||||
if (empty($this->_pagination_attending)) {
|
||||
$this->_pagination_attending = new Pagination($this->getTotalAttending(), $this->getState('limitstart'), $this->getState('limit'));
|
||||
}
|
||||
|
||||
return $this->_pagination_attending;
|
||||
}
|
||||
|
||||
/**
|
||||
* Build the query
|
||||
*
|
||||
* @access private
|
||||
* @return string
|
||||
*/
|
||||
protected function _buildQueryAttending()
|
||||
{
|
||||
# Get the WHERE and ORDER BY clauses for the query
|
||||
$where = $this->_buildAttendingWhere();
|
||||
$orderby = $this->_buildOrderByAttending();
|
||||
$groupby = ' GROUP BY a.id';
|
||||
|
||||
# Get Events from Database
|
||||
$query = 'SELECT DISTINCT a.id AS eventid, a.dates, a.enddates, a.times, a.endtimes, a.title, a.created, a.locid, a.published, '
|
||||
. ' a.recurrence_type, a.recurrence_first_id,'
|
||||
. ' a.access, a.checked_out, a.checked_out_time, a.contactid, a.created, a.created_by, a.created_by_alias, a.custom1, a.custom2, a.custom3, a.custom4, a.custom5, a.custom6, a.custom7, a.custom8, a.custom9, a.custom10, a.datimage, a.featured,'
|
||||
. ' a.fulltext, a.hits, a.introtext, a.language, a.maxplaces, a.maxbookeduser, a.minbookeduser, a.reservedplaces, r.places, a.metadata, a.meta_keywords, a.meta_description, a.modified, a.modified_by, a.registra, a.unregistra,'
|
||||
. ' a.recurrence_byday, a.recurrence_counter, a.recurrence_limit, a.recurrence_limit_date, a.recurrence_number, a.version,'
|
||||
. ' a.waitinglist, a.requestanswer, a.seriesbooking, a.singlebooking, r.status, r.waiting, r.comment,'
|
||||
. ' l.id, l.venue, l.postalCode, l.city, l.state, l.country, l.url, l.published AS l_published,'
|
||||
. ' l.alias AS l_alias, l.checked_out AS l_checked_out, l.checked_out_time AS l_checked_out_time, l.created AS l_created, l.created_by AS l_createdby,'
|
||||
. ' l.custom1 AS l_custom1, l.custom2 AS l_custom2, l.custom3 AS l_custom3, l.custom4 AS l_custom4, l.custom5 AS l_custom5, l.custom6 AS l_custom6, l.custom7 AS l_custom7, l.custom8 AS l_custom8, l.custom9 AS l_custom9, l.custom10 AS l_custom10,'
|
||||
. ' l.id AS l_id, l.latitude, l.locdescription, l.locimage, l.longitude, l.map, l.meta_description AS l_meta_description, l.meta_keywords AS l_meta_keywords, l.modified AS l_modified, l.modified_by AS l_modified_by,'
|
||||
. ' l.publish_up AS l_publish_up, l.publish_down AS l_publish_down, l.street, l.version AS l_version,'
|
||||
. ' CASE WHEN CHAR_LENGTH(a.alias) THEN CONCAT_WS(\':\', a.id, a.alias) ELSE a.id END as slug,'
|
||||
. ' CASE WHEN CHAR_LENGTH(l.alias) THEN CONCAT_WS(\':\', a.locid, l.alias) ELSE a.locid END as venueslug'
|
||||
. ' FROM #__jem_events AS a'
|
||||
. ' LEFT JOIN #__jem_register AS r ON r.event = a.id'
|
||||
. ' LEFT JOIN #__jem_venues AS l ON l.id = a.locid'
|
||||
. ' LEFT JOIN #__jem_cats_event_relations AS rel ON rel.itemid = a.id'
|
||||
. ' LEFT JOIN #__jem_categories AS c ON c.id = rel.catid'
|
||||
. $where
|
||||
. $groupby
|
||||
. $orderby
|
||||
;
|
||||
|
||||
return $query;
|
||||
}
|
||||
|
||||
/**
|
||||
* Build the order clause
|
||||
*
|
||||
* @access private
|
||||
* @return string
|
||||
*/
|
||||
protected function _buildOrderByAttending()
|
||||
{
|
||||
$app = Factory::getApplication();
|
||||
$task = $app->input->getCmd('task', '');
|
||||
|
||||
$filter_order = $app->getUserStateFromRequest('com_jem.myattendances.filter_order', 'filter_order', 'a.dates', 'cmd');
|
||||
$filter_order = InputFilter::getInstance()->clean($filter_order, 'cmd');
|
||||
|
||||
// Reverse default order for dates in archive mode
|
||||
$filter_order_DirDefault = 'ASC';
|
||||
if (($task == 'archive') && ($filter_order == 'a.dates')) {
|
||||
$filter_order_DirDefault = 'DESC';
|
||||
}
|
||||
|
||||
$filter_order_Dir = $app->getUserStateFromRequest('com_jem.myattendances.filter_order_Dir', 'filter_order_Dir', $filter_order_DirDefault, 'word');
|
||||
$filter_order_Dir = InputFilter::getInstance()->clean($filter_order_Dir, 'word');
|
||||
|
||||
$default_order_Dir = ($task == 'archive') ? 'DESC' : 'ASC';
|
||||
|
||||
if ($filter_order == 'r.status') {
|
||||
$orderby = ' ORDER BY ' . $filter_order . ' ' . $filter_order_Dir . ', r.waiting ' . $filter_order_Dir . ', a.dates ' . $filter_order_Dir .', a.times ' . $filter_order_Dir;
|
||||
// $orderby = ' ORDER BY CASE WHEN r.status < 0 THEN r.status * (-3) WHEN r.status = 1 AND r.waiting > 0 THEN r.status + 1 ELSE r.status END '.$filter_order_Dir.', a.dates ' . $filter_order_Dir .', a.times ' . $filter_order_Dir;
|
||||
} elseif ($filter_order == 'a.dates') {
|
||||
$orderby = ' ORDER BY a.dates ' . $filter_order_Dir .', a.times ' . $filter_order_Dir
|
||||
. ', a.created ' . $filter_order_Dir;
|
||||
} else {
|
||||
$orderby = ' ORDER BY ' . $filter_order . ' ' . $filter_order_Dir
|
||||
. ', a.dates ' . $default_order_Dir . ', a.times ' . $default_order_Dir
|
||||
. ', a.created ' . $default_order_Dir;
|
||||
}
|
||||
|
||||
return $orderby;
|
||||
}
|
||||
|
||||
/**
|
||||
* Build the where clause
|
||||
*
|
||||
* @access private
|
||||
* @return string
|
||||
*/
|
||||
protected function _buildAttendingWhere()
|
||||
{
|
||||
$app = Factory::getApplication();
|
||||
|
||||
// Get the paramaters of the active menu item
|
||||
$params = $app->getParams();
|
||||
$task = $app->input->getCmd('task', '');
|
||||
$settings = JemHelper::globalattribs();
|
||||
$user = JemFactory::getUser();
|
||||
// Support Joomla access levels instead of single group id
|
||||
$levels = $user->getAuthorisedViewLevels();
|
||||
|
||||
$filter = $app->getUserStateFromRequest('com_jem.myattendances.filter', 'filter', 0, 'int');
|
||||
$search = $app->getUserStateFromRequest('com_jem.myattendances.filter_search', 'filter_search', '', 'string');
|
||||
$search = $this->_db->escape(trim(\Joomla\String\StringHelper::strtolower($search)));
|
||||
|
||||
$where = array();
|
||||
// First thing we need to do is to select only needed events
|
||||
if ($task == 'archive') {
|
||||
$where[] = ' a.published = 2';
|
||||
} else {
|
||||
$where[] = ' a.published IN (0,1)';
|
||||
}
|
||||
$where[] = ' c.published = 1';
|
||||
$where[] = ' a.access IN (' . implode(',', $levels) . ')';
|
||||
$where[] = ' c.access IN (' . implode(',', $levels) . ')';
|
||||
|
||||
//limit output so only future events the user attends will be shown
|
||||
// but also allow events without start date because they will be normally in the future too
|
||||
if ($params->get('filtermyregs')) {
|
||||
$where[] = ' (a.dates IS NULL OR DATE_SUB(NOW(), INTERVAL '.(int)$params->get('myregspast').' DAY) < (IF (a.enddates IS NOT NULL, a.enddates, a.dates)))';
|
||||
}
|
||||
|
||||
// then if the user is attending the event
|
||||
$where[] = ' r.uid = '.$this->_db->Quote($user->id);
|
||||
|
||||
if ($settings->get('global_show_filter') && $search) {
|
||||
switch($filter) {
|
||||
case 1:
|
||||
$where[] = ' LOWER(a.title) LIKE \'%'.$search.'%\' ';
|
||||
break;
|
||||
case 2:
|
||||
$where[] = ' LOWER(l.venue) LIKE \'%'.$search.'%\' ';
|
||||
break;
|
||||
case 3:
|
||||
$where[] = ' LOWER(l.city) LIKE \'%'.$search.'%\' ';
|
||||
break;
|
||||
case 4:
|
||||
$where[] = ' LOWER(c.catname) LIKE \'%'.$search.'%\' ';
|
||||
break;
|
||||
case 5:
|
||||
default:
|
||||
$where[] = ' LOWER(l.state) LIKE \'%'.$search.'%\' ';
|
||||
}
|
||||
}
|
||||
|
||||
$where2 = (count($where) ? ' WHERE ' . implode(' AND ', $where) : '');
|
||||
return $where2;
|
||||
}
|
||||
|
||||
public function getCategories($id)
|
||||
{
|
||||
$user = JemFactory::getUser();
|
||||
// Support Joomla access levels instead of single group id
|
||||
$levels = $user->getAuthorisedViewLevels();
|
||||
|
||||
$query = 'SELECT DISTINCT c.id, c.catname, c.access, c.checked_out AS cchecked_out,'
|
||||
. ' CASE WHEN CHAR_LENGTH(c.alias) THEN CONCAT_WS(\':\', c.id, c.alias) ELSE c.id END as catslug'
|
||||
. ' FROM #__jem_categories AS c'
|
||||
. ' LEFT JOIN #__jem_cats_event_relations AS rel ON rel.catid = c.id'
|
||||
. ' WHERE rel.itemid = '.(int)$id
|
||||
. ' AND c.published = 1'
|
||||
. ' AND c.access IN (' . implode(',', $levels) . ')'
|
||||
;
|
||||
|
||||
$this->_db->setQuery($query);
|
||||
|
||||
$this->_cats = $this->_db->loadObjectList();
|
||||
|
||||
return $this->_cats;
|
||||
}
|
||||
}
|
||||
?>
|
||||
359
components/com_jem/models/myevents.php
Normal file
359
components/com_jem/models/myevents.php
Normal file
@ -0,0 +1,359 @@
|
||||
<?php
|
||||
/**
|
||||
* @package JEM
|
||||
* @copyright (C) 2013-2024 joomlaeventmanager.net
|
||||
* @copyright (C) 2005-2009 Christoph Lukes
|
||||
* @license https://www.gnu.org/licenses/gpl-3.0 GNU/GPL
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Pagination\Pagination;
|
||||
use Joomla\CMS\Filter\InputFilter;
|
||||
use Joomla\CMS\MVC\Model\BaseDatabaseModel;
|
||||
use Joomla\Registry\Registry;
|
||||
|
||||
jimport('joomla.application.component.model');
|
||||
|
||||
/**
|
||||
* JEM Component JEM Model
|
||||
*
|
||||
* @package JEM
|
||||
*
|
||||
*/
|
||||
class JemModelMyevents extends BaseDatabaseModel
|
||||
{
|
||||
/**
|
||||
* Events data array
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $_events = null;
|
||||
|
||||
/**
|
||||
* Events total
|
||||
*
|
||||
* @var integer
|
||||
*/
|
||||
protected $_total_events = null;
|
||||
|
||||
/**
|
||||
* Pagination object
|
||||
*
|
||||
* @var object
|
||||
*/
|
||||
protected $_pagination_events = null;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
|
||||
$app = Factory::getApplication();
|
||||
$jemsettings = JemHelper::config();
|
||||
|
||||
//get the number of events from database
|
||||
|
||||
/* in J! 3.3.6 limitstart is removed from request - but we need it! */
|
||||
if ($app->input->getInt('limitstart', null) === null) {
|
||||
$app->setUserState('com_jem.myevents.limitstart', 0);
|
||||
}
|
||||
|
||||
$limit = $app->getUserStateFromRequest('com_jem.myevents.limit', 'limit', $jemsettings->display_num, 'int');
|
||||
$limitstart = $app->getUserStateFromRequest('com_jem.myevents.limitstart', 'limitstart', 0, 'int');
|
||||
// correct start value if required
|
||||
$limitstart = $limit ? (int)(floor($limitstart / $limit) * $limit) : 0;
|
||||
|
||||
$this->setState('limit', $limit);
|
||||
$this->setState('limitstart', $limitstart);
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to get the Events
|
||||
*
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function getEvents()
|
||||
{
|
||||
$pop = Factory::getApplication()->input->getBool('pop', false);
|
||||
$user = JemFactory::getUser();
|
||||
$userId = $user->get('id');
|
||||
|
||||
if (empty($userId)) {
|
||||
$this->_events = array();
|
||||
return array();
|
||||
}
|
||||
|
||||
// Lets load the content if it doesn't already exist
|
||||
if (empty($this->_events)) {
|
||||
$query = $this->_buildQueryEvents();
|
||||
$pagination = $this->getEventsPagination();
|
||||
|
||||
if ($pop) {
|
||||
$this->_events = $this->_getList($query);
|
||||
} else {
|
||||
$pagination = $this->getEventsPagination();
|
||||
$this->_events = $this->_getList($query, $pagination->limitstart, $pagination->limit);
|
||||
}
|
||||
}
|
||||
|
||||
if ($this->_events) {
|
||||
$now = time();
|
||||
foreach ($this->_events as $i => $item) {
|
||||
$item->categories = $this->getCategories($item->eventid);
|
||||
|
||||
//remove events without categories (users have no access to them)
|
||||
if (empty($item->categories)) {
|
||||
unset($this->_events[$i]);
|
||||
} else {
|
||||
if (empty($item->params)) {
|
||||
// Set event params.
|
||||
$registry = new Registry();
|
||||
$registry->loadString($item->attribs ??'{}');
|
||||
$item->params = clone JemHelper::globalattribs();
|
||||
$item->params->merge($registry);
|
||||
}
|
||||
# edit state access permissions.
|
||||
$item->params->set('access-change', $user->can('publish', 'event', $item->id, $item->created_by));
|
||||
|
||||
# calculate if event has finished (which e.g. makes adding attendees useless)
|
||||
$date = $item->enddates ? $item->enddates : $item->dates;
|
||||
$time = $item->endtimes ? $item->endtimes : $item->times;
|
||||
$ts = strtotime($date . ' ' . $time);
|
||||
$item->finished = $ts && ($ts < $now); // we have a timestamp and it's in the past
|
||||
}
|
||||
}
|
||||
|
||||
JemHelper::getAttendeesNumbers($this->_events); // does directly edit events
|
||||
}
|
||||
|
||||
return $this->_events;
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to (un)publish a event
|
||||
*
|
||||
* @access public
|
||||
* @return boolean True on success
|
||||
*/
|
||||
public function publish($cid = array(), $publish = 1)
|
||||
{
|
||||
$result = false;
|
||||
$user = JemFactory::getUser();
|
||||
$userid = (int) $user->get('id');
|
||||
|
||||
if (is_array($cid) && count($cid)) {
|
||||
\Joomla\Utilities\ArrayHelper::toInteger($cid);
|
||||
$cids = implode(',', $cid);
|
||||
|
||||
$query = 'UPDATE #__jem_events'
|
||||
. ' SET published = '. (int) $publish
|
||||
. ' WHERE id IN ('. $cids .')'
|
||||
. ' AND (checked_out = 0 OR checked_out Is null OR (checked_out = ' .$userid. '))'
|
||||
;
|
||||
|
||||
$this->_db->setQuery($query);
|
||||
$result = true;
|
||||
|
||||
if ($this->_db->execute() === false) {
|
||||
$this->setError($this->_db->getErrorMsg());
|
||||
$result = false;
|
||||
}
|
||||
}
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Total nr of events
|
||||
*
|
||||
* @access public
|
||||
* @return integer
|
||||
*/
|
||||
public function getTotalEvents()
|
||||
{
|
||||
// Lets load the total nr if it doesn't already exist
|
||||
if ( empty($this->_total_events)) {
|
||||
$query = $this->_buildQueryEvents();
|
||||
$this->_total_events = $this->_getListCount($query);
|
||||
}
|
||||
|
||||
return $this->_total_events;
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to get a pagination object for the events
|
||||
*
|
||||
* @access public
|
||||
* @return integer
|
||||
*/
|
||||
public function getEventsPagination()
|
||||
{
|
||||
// Lets load the content if it doesn't already exist
|
||||
if ( empty($this->_pagination_events)) {
|
||||
$this->_pagination_events = new Pagination($this->getTotalEvents(), $this->getState('limitstart'), $this->getState('limit'));
|
||||
}
|
||||
|
||||
return $this->_pagination_events;
|
||||
}
|
||||
|
||||
/**
|
||||
* Build the query
|
||||
*
|
||||
* @access private
|
||||
* @return string
|
||||
*/
|
||||
protected function _buildQueryEvents()
|
||||
{
|
||||
# Get the WHERE and ORDER BY clauses for the query
|
||||
$where = $this->_buildWhere();
|
||||
$orderby = $this->_buildOrderBy();
|
||||
|
||||
# Get Events from Database
|
||||
$query = 'SELECT DISTINCT a.id as eventid, a.id, a.dates, a.enddates, a.published, a.times, a.endtimes, a.title, a.created, a.created_by, a.locid, a.registra, a.unregistra, a.maxplaces, a.waitinglist, a.requestanswer, a.seriesbooking, a.singlebooking,'
|
||||
. ' a.recurrence_type, a.recurrence_first_id, a.recurrence_byday, a.recurrence_counter, a.recurrence_limit, a.recurrence_limit_date, a.recurrence_number, a.attribs,'
|
||||
. ' a.access, a.checked_out, a.checked_out_time, a.maxplaces, a.maxbookeduser, a.minbookeduser, a.reservedplaces, a.contactid, a.created_by_alias, a.datimage, a.featured,'
|
||||
. ' a.custom1, a.custom2, a.custom3, a.custom4, a.custom5, a.custom6, a.custom7, a.custom8, a.custom9, a.custom10,'
|
||||
. ' a.fulltext, a.hits, a.introtext, a.language, a.metadata, a.meta_keywords, a.meta_description, a.modified, a.modified_by, a.version,'
|
||||
. ' l.id AS l_id, l.venue, l.street, l.postalCode, l.city, l.state, l.country, l.url, l.published AS l_published,'
|
||||
. ' l.alias AS l_alias, l.checked_out AS l_checked_out, l.checked_out_time AS l_checked_out_time, l.created AS l_created, l.created_by AS l_createdby,'
|
||||
. ' l.custom1 AS l_custom1, l.custom2 AS l_custom2, l.custom3 AS l_custom3, l.custom4 AS l_custom4, l.custom5 AS l_custom5, l.custom6 AS l_custom6, l.custom7 AS l_custom7, l.custom8 AS l_custom8, l.custom9 AS l_custom9, l.custom10 AS l_custom10,'
|
||||
. ' l.latitude, l.locdescription, l.locimage, l.longitude, l.map, l.meta_description AS l_meta_description, l.meta_keywords AS l_meta_keywords, l.modified AS l_modified, l.modified_by AS l_modified_by,'
|
||||
. ' l.publish_up AS l_publish_up, l.publish_down AS l_publish_down, l.version AS l_version,'
|
||||
. ' c.catname, c.id AS catid,'
|
||||
. ' CASE WHEN CHAR_LENGTH(a.alias) THEN CONCAT_WS(\':\', a.id, a.alias) ELSE a.id END as slug,'
|
||||
. ' CASE WHEN CHAR_LENGTH(l.alias) THEN CONCAT_WS(\':\', a.locid, l.alias) ELSE a.locid END as venueslug'
|
||||
. ' FROM #__jem_events AS a'
|
||||
. ' LEFT JOIN #__jem_venues AS l ON l.id = a.locid'
|
||||
. ' LEFT JOIN #__jem_cats_event_relations AS rel ON rel.itemid = a.id'
|
||||
. ' LEFT JOIN #__jem_categories AS c ON c.id = rel.catid'
|
||||
. $where
|
||||
. ' GROUP BY a.id'
|
||||
. $orderby
|
||||
;
|
||||
|
||||
return $query;
|
||||
}
|
||||
|
||||
/**
|
||||
* Build the order clause
|
||||
*
|
||||
* @access private
|
||||
* @return string
|
||||
*/
|
||||
protected function _buildOrderBy()
|
||||
{
|
||||
$app = Factory::getApplication();
|
||||
$task = $app->input->getCmd('task', '');
|
||||
|
||||
$filter_order = $app->getUserStateFromRequest('com_jem.myevents.filter_order', 'filter_order', 'a.dates', 'cmd');
|
||||
$filter_order_Dir = $app->getUserStateFromRequest('com_jem.myevents.filter_order_Dir', 'filter_order_Dir', 'ASC', 'word');
|
||||
$default_order_Dir = ($task == 'archive') ? 'DESC' : 'ASC';
|
||||
|
||||
$filter_order = InputFilter::getInstance()->clean($filter_order, 'cmd');
|
||||
$filter_order_Dir = InputFilter::getInstance()->clean($filter_order_Dir, 'word');
|
||||
|
||||
if ($filter_order == 'a.dates') {
|
||||
$orderby = ' ORDER BY a.dates ' . $filter_order_Dir .', a.times ' . $filter_order_Dir
|
||||
. ', a.created ' . $filter_order_Dir;
|
||||
} else {
|
||||
$orderby = ' ORDER BY ' . $filter_order . ' ' . $filter_order_Dir
|
||||
. ', a.dates ' . $default_order_Dir . ', a.times ' . $default_order_Dir
|
||||
. ', a.created ' . $default_order_Dir;
|
||||
}
|
||||
|
||||
return $orderby;
|
||||
}
|
||||
|
||||
/**
|
||||
* Build the where clause
|
||||
*
|
||||
* @access private
|
||||
* @return string
|
||||
*/
|
||||
protected function _buildWhere()
|
||||
{
|
||||
$app = Factory::getApplication();
|
||||
$task = $app->input->getCmd('task', '');
|
||||
$params = $app->getParams();
|
||||
$settings = JemHelper::globalattribs();
|
||||
$user = JemFactory::getUser();
|
||||
// Support Joomla access levels instead of single group id
|
||||
$levels = $user->getAuthorisedViewLevels();
|
||||
|
||||
$filter = $app->getUserStateFromRequest('com_jem.myevents.filter', 'filter', 0, 'int');
|
||||
$search = $app->getUserStateFromRequest('com_jem.myevents.filter_search', 'filter_search', '', 'string');
|
||||
$search = $this->_db->escape(trim(\Joomla\String\StringHelper::strtolower($search)));
|
||||
|
||||
$where = array();
|
||||
// First thing we need to do is to select only needed events
|
||||
if ($task == 'archive') {
|
||||
$where[] = ' a.published = 2';
|
||||
} else {
|
||||
$where[] = ' (a.published = 1 OR a.published = 0)';
|
||||
}
|
||||
$where[] = ' c.published = 1';
|
||||
$where[] = ' a.access IN (' . implode(',', $levels) . ')';
|
||||
$where[] = ' c.access IN (' . implode(',', $levels) . ')';
|
||||
|
||||
// then if the user is the owner of the event
|
||||
$where[] = ' a.created_by = '.$this->_db->Quote($user->id);
|
||||
|
||||
// get excluded categories
|
||||
$excluded_cats = trim($params->get('excluded_cats', ''));
|
||||
|
||||
if ($excluded_cats != '') {
|
||||
$cats_excluded = explode(',', $excluded_cats);
|
||||
\Joomla\Utilities\ArrayHelper::toInteger($cats_excluded);
|
||||
$where[] = ' c.id NOT IN (' . implode(',', $cats_excluded) . ')';
|
||||
}
|
||||
// === END Excluded categories add === //
|
||||
|
||||
if ($settings->get('global_show_filter') && $search) {
|
||||
switch($filter) {
|
||||
case 1:
|
||||
$where[] = ' LOWER(a.title) LIKE \'%'.$search.'%\' ';
|
||||
break;
|
||||
case 2:
|
||||
$where[] = ' LOWER(l.venue) LIKE \'%'.$search.'%\' ';
|
||||
break;
|
||||
case 3:
|
||||
$where[] = ' LOWER(l.city) LIKE \'%'.$search.'%\' ';
|
||||
break;
|
||||
case 4:
|
||||
$where[] = ' LOWER(c.catname) LIKE \'%'.$search.'%\' ';
|
||||
break;
|
||||
case 5:
|
||||
default:
|
||||
$where[] = ' LOWER(l.state) LIKE \'%'.$search.'%\' ';
|
||||
}
|
||||
}
|
||||
|
||||
$where2 = (count($where) ? ' WHERE ' . implode(' AND ', $where) : '');
|
||||
return $where2;
|
||||
}
|
||||
|
||||
public function getCategories($id)
|
||||
{
|
||||
$user = JemFactory::getUser();
|
||||
// Support Joomla access levels instead of single group id
|
||||
$levels = $user->getAuthorisedViewLevels();
|
||||
|
||||
$query = 'SELECT DISTINCT c.id, c.catname, c.access, c.checked_out AS cchecked_out, c.groupid,'
|
||||
. ' CASE WHEN CHAR_LENGTH(c.alias) THEN CONCAT_WS(\':\', c.id, c.alias) ELSE c.id END as catslug'
|
||||
. ' FROM #__jem_categories AS c'
|
||||
. ' LEFT JOIN #__jem_cats_event_relations AS rel ON rel.catid = c.id'
|
||||
. ' WHERE rel.itemid = '.(int)$id
|
||||
. ' AND c.published = 1'
|
||||
. ' AND c.access IN (' . implode(',', $levels) . ')'
|
||||
;
|
||||
|
||||
$this->_db->setQuery($query);
|
||||
return $this->_db->loadObjectList();
|
||||
}
|
||||
}
|
||||
?>
|
||||
450
components/com_jem/models/myplanning.php
Normal file
450
components/com_jem/models/myplanning.php
Normal file
@ -0,0 +1,450 @@
|
||||
<?php
|
||||
/**
|
||||
* @version 2.2.2
|
||||
* @package JEM
|
||||
* @copyright (C) 2013-2017 joomlaeventmanager.net
|
||||
* @copyright (C) 2005-2009 Christoph Lukes
|
||||
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
|
||||
*/
|
||||
defined('_JEXEC') or die ;
|
||||
|
||||
require_once dirname(__FILE__) . '/eventslist.php';
|
||||
|
||||
/**
|
||||
* Model-Calendar
|
||||
*/
|
||||
class JemModelMyplanning extends JemModelEventslist
|
||||
{
|
||||
protected $_date = 0;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
|
||||
$this->setdate(time());
|
||||
|
||||
}
|
||||
|
||||
public function setdate($date)
|
||||
{
|
||||
$this->_date = $date;
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to auto-populate the model state.
|
||||
*/
|
||||
protected function populateState($ordering = null, $direction = null)
|
||||
{
|
||||
# parent::populateState($ordering, $direction);
|
||||
$app = JFactory::getApplication();
|
||||
$params = $app->getParams();
|
||||
$task = $app->input->get('task','','cmd');
|
||||
$top_category = $params->get('top_category', 0);
|
||||
$startdayonly = $params->get('show_only_start', false);
|
||||
|
||||
# params
|
||||
$this->setState('params', $params);
|
||||
|
||||
# publish state
|
||||
$this->_populatePublishState($task);
|
||||
|
||||
###########
|
||||
## DATES ##
|
||||
###########
|
||||
|
||||
#only select events within specified dates. (chosen month)
|
||||
$monthstart = mktime(0, 0, 1, strftime('%m', $this->_date), 1, strftime('%Y', $this->_date));
|
||||
$monthend = mktime(0, 0, -1, strftime('%m', $this->_date)+1, 1, strftime('%Y', $this->_date));
|
||||
|
||||
$filter_date_from = $this->_db->Quote(strftime('%Y-%m-%d', $monthstart));
|
||||
$filter_date_to = $this->_db->Quote(strftime('%Y-%m-%d', $monthend));
|
||||
|
||||
$where = ' DATEDIFF(IF (a.enddates IS NOT NULL, a.enddates, a.dates), '. $filter_date_from .') >= 0';
|
||||
$this->setState('filter.calendar_from',$where);
|
||||
|
||||
$where = ' DATEDIFF(a.dates, '. $filter_date_to .') <= 0';
|
||||
$this->setState('filter.calendar_to',$where);
|
||||
|
||||
##################
|
||||
## TOP-CATEGORY ##
|
||||
##################
|
||||
|
||||
if ($top_category) {
|
||||
$children = JemCategories::getChilds($top_category);
|
||||
if (count($children)) {
|
||||
$where = 'rel.catid IN ('. implode(',', $children) .')';
|
||||
$this->setState('filter.category_top', $where);
|
||||
}
|
||||
}
|
||||
|
||||
# set filter
|
||||
$this->setState('filter.calendar_multiday',true);
|
||||
$this->setState('filter.calendar_startdayonly',(bool)$startdayonly);
|
||||
$this->setState('filter.groupby',array('a.id'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to get a list of events.
|
||||
*/
|
||||
public function getItems()
|
||||
{
|
||||
$items = parent::getItems();
|
||||
|
||||
if ($items) {
|
||||
return $items;
|
||||
}
|
||||
|
||||
return array();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return JDatabaseQuery
|
||||
*/
|
||||
protected function getListQuery()
|
||||
{
|
||||
|
||||
|
||||
|
||||
// Create a new query object.
|
||||
|
||||
$app = JFactory::getApplication();
|
||||
$task = $app->input->getCmd('task', '');
|
||||
$itemid = $app->input->getInt('id', 0) . ':' . $app->input->getInt('Itemid', 0);
|
||||
|
||||
$params = $app->getParams();
|
||||
$settings = JemHelper::globalattribs();
|
||||
$user = JemFactory::getUser();
|
||||
$levels = $user->getAuthorisedViewLevels();
|
||||
|
||||
# Query
|
||||
$db = JFactory::getDBO();
|
||||
$query = $db->getQuery(true);
|
||||
|
||||
# Event
|
||||
$query->select(
|
||||
$this->getState('list.select',
|
||||
'a.access,a.alias,a.attribs,a.checked_out,a.checked_out_time,a.contactid,a.created,a.created_by,a.created_by_alias,a.custom1,a.custom2,a.custom3,a.custom4,a.custom5,a.custom6,a.custom7,a.custom8,a.custom9,a.custom10,a.dates,a.datimage,a.enddates,a.endtimes,a.featured,' .
|
||||
'a.fulltext,a.hits,a.id,a.introtext,a.language,a.locid,a.maxplaces,a.metadata,a.meta_keywords,a.meta_description,a.modified,a.modified_by,a.published,a.registra,a.times,a.title,a.unregistra,a.waitinglist,DAYOFMONTH(a.dates) AS created_day, YEAR(a.dates) AS created_year, MONTH(a.dates) AS created_month,' .
|
||||
'a.recurrence_byday,a.recurrence_counter,a.recurrence_first_id,a.recurrence_limit,a.recurrence_limit_date,a.recurrence_number, a.recurrence_type,a.version'
|
||||
)
|
||||
);
|
||||
$query->from('#__jem_events as a');
|
||||
|
||||
|
||||
# Venue
|
||||
$query->select(array('l.alias AS l_alias','l.checked_out AS l_checked_out','l.checked_out_time AS l_checked_out_time','l.city','l.country','l.created AS l_created','l.created_by AS l_createdby'));
|
||||
$query->select(array('l.custom1 AS l_custom1','l.custom2 AS l_custom2','l.custom3 AS l_custom3','l.custom4 AS l_custom4','l.custom5 AS l_custom5','l.custom6 AS l_custom6','l.custom7 AS l_custom7','l.custom8 AS l_custom8','l.custom9 AS l_custom9','l.custom10 AS l_custom10'));
|
||||
$query->select(array('l.id AS l_id','l.latitude','l.locdescription','l.locimage','l.longitude','l.map','l.meta_description AS l_meta_description','l.meta_keywords AS l_meta_keywords','l.modified AS l_modified','l.modified_by AS l_modified_by','l.postalCode'));
|
||||
$query->select(array('l.publish_up AS l_publish_up','l.publish_down AS l_publish_down','l.published AS l_published','l.state','l.street','l.url','l.venue','l.version AS l_version'));
|
||||
$query->join('LEFT', '#__jem_venues AS l ON l.id = a.locid');
|
||||
|
||||
|
||||
# the rest
|
||||
$case_when_e = ' CASE WHEN ';
|
||||
$case_when_e .= $query->charLength('a.alias','!=', '0');
|
||||
$case_when_e .= ' THEN ';
|
||||
$id_e = $query->castAsChar('a.id');
|
||||
$case_when_e .= $query->concatenate(array($id_e, 'a.alias'), ':');
|
||||
$case_when_e .= ' ELSE ';
|
||||
$case_when_e .= $id_e.' END as slug';
|
||||
|
||||
$case_when_l = ' CASE WHEN ';
|
||||
$case_when_l .= $query->charLength('l.alias', '!=', '0');
|
||||
$case_when_l .= ' THEN ';
|
||||
$id_l = $query->castAsChar('a.locid');
|
||||
$case_when_l .= $query->concatenate(array($id_l, 'l.alias'), ':');
|
||||
$case_when_l .= ' ELSE ';
|
||||
$case_when_l .= $id_l.' END as venueslug';
|
||||
|
||||
$query->select(array($case_when_e, $case_when_l));
|
||||
|
||||
# join over the category-tables
|
||||
$query->join('LEFT', '#__jem_cats_event_relations AS rel ON rel.itemid = a.id');
|
||||
$query->join('LEFT', '#__jem_categories AS c ON c.id = rel.catid');
|
||||
|
||||
#############
|
||||
## FILTERS ##
|
||||
#############
|
||||
|
||||
#####################
|
||||
## FILTER - EVENTS ##
|
||||
#####################
|
||||
|
||||
# Filter by a single or group of events.
|
||||
$eventId = $this->getState('filter.event_id');
|
||||
|
||||
if (is_numeric($eventId)) {
|
||||
$type = $this->getState('filter.event_id.include', true) ? '= ' : '<> ';
|
||||
$query->where('a.id '.$type.(int) $eventId);
|
||||
}
|
||||
elseif (is_array($eventId) && !empty($eventId)) {
|
||||
JArrayHelper::toInteger($eventId);
|
||||
$eventId = implode(',', $eventId);
|
||||
$type = $this->getState('filter.event_id.include', true) ? 'IN' : 'NOT IN';
|
||||
$query->where('a.id '.$type.' ('.$eventId.')');
|
||||
}
|
||||
|
||||
###################
|
||||
## FILTER-ACCESS ##
|
||||
###################
|
||||
|
||||
# Filter by access level - always.
|
||||
$query->where('a.access IN ('.implode(',', $levels).')');
|
||||
|
||||
####################
|
||||
## FILTER-PUBLISH ##
|
||||
####################
|
||||
|
||||
# Filter by published state.
|
||||
$where_pub = $this->_getPublishWhere();
|
||||
if (!empty($where_pub)) {
|
||||
$query->where('(' . implode(' OR ', $where_pub) . ')');
|
||||
} else {
|
||||
// something wrong - fallback to published events
|
||||
$query->where('a.published = 1');
|
||||
}
|
||||
#####################
|
||||
## FILTER-FEATURED ##
|
||||
#####################
|
||||
|
||||
# Filter by featured flag.
|
||||
$featured = $this->getState('filter.featured');
|
||||
|
||||
if (is_numeric($featured)) {
|
||||
$query->where('a.featured = ' . (int) $featured);
|
||||
}
|
||||
elseif (is_array($featured) && !empty($featured)) {
|
||||
JArrayHelper::toInteger($featured);
|
||||
$featured = implode(',', $featured);
|
||||
$query->where('a.featured IN ('.$featured.')');
|
||||
}
|
||||
|
||||
#############################
|
||||
## FILTER - CALENDAR_DATES ##
|
||||
#############################
|
||||
$cal_from = $this->getState('filter.calendar_from');
|
||||
$cal_to = $this->getState('filter.calendar_to');
|
||||
|
||||
if ($cal_from) {
|
||||
$query->where($cal_from);
|
||||
}
|
||||
|
||||
if ($cal_to) {
|
||||
$query->where($cal_to);
|
||||
}
|
||||
|
||||
#############################
|
||||
## FILTER - OPEN_DATES ##
|
||||
#############################
|
||||
$opendates = $this->getState('filter.opendates');
|
||||
|
||||
switch ($opendates) {
|
||||
case 0: // don't show events without start date
|
||||
default:
|
||||
$query->where('a.dates IS NOT NULL');
|
||||
break;
|
||||
case 1: // show all events, with or without start date
|
||||
break;
|
||||
case 2: // show only events without startdate
|
||||
$query->where('a.dates IS NULL');
|
||||
break;
|
||||
}
|
||||
|
||||
#####################
|
||||
### FILTER - BYCAT ##
|
||||
#####################
|
||||
|
||||
$filter_catid = $this->getState('filter.filter_catid');
|
||||
if ($filter_catid) { // categorycal
|
||||
$query->where('c.id = '.(int)$filter_catid);
|
||||
}else {
|
||||
$cats = $this->getCategories('all');
|
||||
if (!empty($cats)) {
|
||||
$query->where('c.id IN (' . implode(',', $cats) . ')');
|
||||
}
|
||||
}
|
||||
|
||||
####################
|
||||
## FILTER - BYLOC ##
|
||||
####################
|
||||
$filter_locid = $this->getState('filter.filter_locid');
|
||||
if ($filter_locid) {
|
||||
$query->where('a.locid = '.(int)$filter_locid);
|
||||
}
|
||||
|
||||
####################
|
||||
## FILTER - VENUE ##
|
||||
####################
|
||||
|
||||
$venueId = $this->getState('filter.venue_id');
|
||||
|
||||
if (is_numeric($venueId)) {
|
||||
$type = $this->getState('filter.venue_id.include', true) ? '= ' : '<> ';
|
||||
$query->where('l.id '.$type.(int) $venueId);
|
||||
}
|
||||
elseif (is_array($venueId) && !empty($venueId)) {
|
||||
JArrayHelper::toInteger($venueId);
|
||||
$venueId = implode(',', $venueId);
|
||||
$type = $this->getState('filter.venue_id.include', true) ? 'IN' : 'NOT IN';
|
||||
$query->where('l.id '.$type.' ('.$venueId.')');
|
||||
}
|
||||
|
||||
##########################
|
||||
## FILTER - VENUE STATE ##
|
||||
##########################
|
||||
|
||||
$venueState = $this->getState('filter.venue_state');
|
||||
|
||||
if (!empty($venueState)) {
|
||||
$venueState = explode(',', $venueState);
|
||||
|
||||
$venueStateMode = $this->getState('filter.venue_state.mode', 0);
|
||||
switch ($venueStateMode) {
|
||||
case 0: # complete match: venue's state must be equal (ignoring upper/lower case) one of the strings given by filter
|
||||
default:
|
||||
array_walk($venueState, create_function('&$v,$k,$db','$v = $db->quote(trim($v));'), $db);
|
||||
$query->where('l.state IN ('.implode(',', $venueState).')');
|
||||
break;
|
||||
case 1: # contain: venue's state must contain one of the strings given by filter
|
||||
array_walk($venueState, create_function('&$v,$k,$db','$v = quotemeta($db->escape(trim($v), true));'), $db);
|
||||
$query->where('l.state REGEXP '.$db->quote(implode('|', $venueState)));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
###################
|
||||
## FILTER-SEARCH ##
|
||||
###################
|
||||
|
||||
# define variables
|
||||
$filter = $this->getState('filter.filter_type');
|
||||
$search = $this->getState('filter.filter_search'); // not escaped
|
||||
|
||||
if (!empty($search)) {
|
||||
if (stripos($search, 'id:') === 0) {
|
||||
$query->where('a.id = '.(int) substr($search, 3));
|
||||
} else {
|
||||
$search = $db->Quote('%'.$db->escape($search, true).'%', false); // escape once
|
||||
|
||||
if ($search && $settings->get('global_show_filter')) {
|
||||
switch ($filter) {
|
||||
# case 4 is category, so it is omitted
|
||||
case 1:
|
||||
$query->where('a.title LIKE '.$search);
|
||||
break;
|
||||
case 2:
|
||||
$query->where('l.venue LIKE '.$search);
|
||||
break;
|
||||
case 3:
|
||||
$query->where('l.city LIKE '.$search);
|
||||
break;
|
||||
case 5:
|
||||
$query->where('l.state LIKE '.$search);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# Group
|
||||
$group = $this->getState('filter.groupby');
|
||||
if ($group) {
|
||||
$query->group($group);
|
||||
}
|
||||
|
||||
# ordering
|
||||
$orderby = $this->getState('filter.orderby');
|
||||
if ($orderby) {
|
||||
$query->order($orderby);
|
||||
}
|
||||
|
||||
|
||||
// suite
|
||||
|
||||
|
||||
# Get the WHERE clause for the query
|
||||
$where = $this->_buildWhere();
|
||||
|
||||
|
||||
|
||||
// here we can extend the query of the Eventslist model
|
||||
//$query->select('DATEDIFF(a.enddates, a.dates) AS datesdiff, DAYOFMONTH(a.dates) AS start_day, YEAR(a.dates) AS start_year, MONTH(a.dates) AS start_month');
|
||||
$query->where( $where);
|
||||
|
||||
|
||||
|
||||
return $query;
|
||||
}
|
||||
/**
|
||||
* Build the where clause
|
||||
*
|
||||
* @access private
|
||||
* @return string
|
||||
*/
|
||||
protected function _buildWhere()
|
||||
{
|
||||
$app = JFactory::getApplication();
|
||||
$task = $app->input->getCmd('task', '');
|
||||
$params = $app->getParams();
|
||||
$settings = JemHelper::globalattribs();
|
||||
$user = JemFactory::getUser();
|
||||
// Support Joomla access levels instead of single group id
|
||||
$levels = $user->getAuthorisedViewLevels();
|
||||
|
||||
$filter = $app->getUserStateFromRequest('com_jem.myevents.filter', 'filter', 0, 'int');
|
||||
$search = $app->getUserStateFromRequest('com_jem.myevents.filter_search', 'filter_search', '', 'string');
|
||||
$search = $this->_db->escape(trim(JString::strtolower($search)));
|
||||
|
||||
$where = array();
|
||||
// a.published traité auparavant
|
||||
|
||||
$where[] = ' c.published = 1';
|
||||
// a.access traité auparavant
|
||||
$where[] = ' c.access IN (' . implode(',', $levels) . ')';
|
||||
|
||||
// then if the user is the owner of the event
|
||||
$where[] = ' a.created_by = '.$this->_db->Quote($user->id);
|
||||
|
||||
// get excluded categories
|
||||
$excluded_cats = trim($params->get('excluded_cats', ''));
|
||||
|
||||
if ($excluded_cats != '') {
|
||||
$cats_excluded = explode(',', $excluded_cats);
|
||||
JArrayHelper::toInteger($cats_excluded);
|
||||
$where[] = ' c.id NOT IN (' . implode(',', $cats_excluded) . ')';
|
||||
}
|
||||
// === END Excluded categories add === //
|
||||
|
||||
if ($settings->get('global_show_filter') && $search) {
|
||||
switch($filter) {
|
||||
case 1:
|
||||
$where[] = ' LOWER(a.title) LIKE \'%'.$search.'%\' ';
|
||||
break;
|
||||
case 2:
|
||||
$where[] = ' LOWER(l.venue) LIKE \'%'.$search.'%\' ';
|
||||
break;
|
||||
case 3:
|
||||
$where[] = ' LOWER(l.city) LIKE \'%'.$search.'%\' ';
|
||||
break;
|
||||
case 4:
|
||||
$where[] = ' LOWER(c.catname) LIKE \'%'.$search.'%\' ';
|
||||
break;
|
||||
case 5:
|
||||
default:
|
||||
$where[] = ' LOWER(l.state) LIKE \'%'.$search.'%\' ';
|
||||
}
|
||||
}
|
||||
|
||||
$where2 = (count($where) ? ' ' . implode(' AND ', $where) : '');
|
||||
|
||||
|
||||
return $where2;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
?>
|
||||
278
components/com_jem/models/myvenues.php
Normal file
278
components/com_jem/models/myvenues.php
Normal file
@ -0,0 +1,278 @@
|
||||
<?php
|
||||
/**
|
||||
* @package JEM
|
||||
* @copyright (C) 2013-2024 joomlaeventmanager.net
|
||||
* @copyright (C) 2005-2009 Christoph Lukes
|
||||
* @license https://www.gnu.org/licenses/gpl-3.0 GNU/GPL
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Pagination\Pagination;
|
||||
use Joomla\CMS\MVC\Model\BaseDatabaseModel;
|
||||
use Joomla\CMS\Filter\InputFilter;
|
||||
|
||||
/**
|
||||
* JEM Component JEM Model
|
||||
*
|
||||
* @package JEM
|
||||
*
|
||||
*/
|
||||
class JemModelMyvenues extends BaseDatabaseModel
|
||||
{
|
||||
/**
|
||||
* Venues data array
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $_venues = null;
|
||||
|
||||
/**
|
||||
* Venues total count
|
||||
*
|
||||
* @var integer
|
||||
*/
|
||||
protected $_total_venues = null;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
|
||||
$app = Factory::getApplication();
|
||||
$jemsettings = JemHelper::config();
|
||||
|
||||
//get the number of events
|
||||
|
||||
/* in J! 3.3.6 limitstart is removed from request - but we need it! */
|
||||
if ($app->input->getInt('limitstart', null) === null) {
|
||||
$app->setUserState('com_jem.myvenues.limitstart', 0);
|
||||
}
|
||||
|
||||
$limit = $app->getUserStateFromRequest('com_jem.myvenues.limit', 'limit', $jemsettings->display_num, 'int');
|
||||
$limitstart = $app->getUserStateFromRequest('com_jem.myvenues.limitstart', 'limitstart', 0, 'int');
|
||||
// correct start value if required
|
||||
$limitstart = $limit ? (int)(floor($limitstart / $limit) * $limit) : 0;
|
||||
|
||||
$this->setState('limit', $limit);
|
||||
$this->setState('limitstart', $limitstart);
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to get the Events user is attending
|
||||
*
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function getVenues()
|
||||
{
|
||||
$pop = Factory::getApplication()->input->getBool('pop', false);
|
||||
$user = JemFactory::getUser();
|
||||
$userId = $user->get('id');
|
||||
|
||||
if (empty($userId)) {
|
||||
$this->_venues = array();
|
||||
return array();
|
||||
}
|
||||
|
||||
// Lets load the content if it doesn't already exist
|
||||
if ( empty($this->_venues)) {
|
||||
$query = $this->_buildQueryVenues();
|
||||
$pagination = $this->getVenuesPagination();
|
||||
|
||||
if ($pop) {
|
||||
$this->_venues = $this->_getList($query);
|
||||
} else {
|
||||
$pagination = $this->getVenuesPagination();
|
||||
$this->_venues = $this->_getList($query, $pagination->limitstart, $pagination->limit);
|
||||
}
|
||||
}
|
||||
|
||||
if ($this->_venues) {
|
||||
foreach ($this->_venues as $item) {
|
||||
if (empty($item->params)) {
|
||||
// Set venue params.
|
||||
$item->params = clone JemHelper::globalattribs();
|
||||
}
|
||||
|
||||
# edit state access permissions.
|
||||
$item->params->set('access-change', $user->can('publish', 'venue', $item->id, $item->created_by));
|
||||
}
|
||||
}
|
||||
|
||||
return $this->_venues;
|
||||
}
|
||||
|
||||
/**
|
||||
* Total nr of events
|
||||
*
|
||||
* @access public
|
||||
* @return integer
|
||||
*/
|
||||
public function getTotalVenues()
|
||||
{
|
||||
// Lets load the total nr if it doesn't already exist
|
||||
if ( empty($this->_total_venues)) {
|
||||
$query = $this->_buildQueryVenues();
|
||||
$this->_total_venues = $this->_getListCount($query);
|
||||
}
|
||||
|
||||
return $this->_total_venues;
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to get a pagination object for the attending events
|
||||
*
|
||||
* @access public
|
||||
* @return integer
|
||||
*/
|
||||
public function getVenuesPagination()
|
||||
{
|
||||
// Lets load the content if it doesn't already exist
|
||||
if ( empty($this->_pagination_venues))
|
||||
{
|
||||
$this->_pagination_venues = new Pagination($this->getTotalVenues(), $this->getState('limitstart'), $this->getState('limit'));
|
||||
}
|
||||
|
||||
return $this->_pagination_venues;
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to (un)publish one or more venue(s)
|
||||
*
|
||||
* @access public
|
||||
* @return boolean True on success
|
||||
*/
|
||||
public function publish($cid = array(), $publish = 1)
|
||||
{
|
||||
$result = false;
|
||||
$user = JemFactory::getUser();
|
||||
$userid = (int) $user->get('id');
|
||||
|
||||
if (is_numeric($cid)) {
|
||||
$cid = array($cid);
|
||||
}
|
||||
// simple checks, good enough here
|
||||
if (is_array($cid) && count($cid) && ($publish >= -2) && ($publish <= 2)) {
|
||||
\Joomla\Utilities\ArrayHelper::toInteger($cid);
|
||||
$cids = implode(',', $cid);
|
||||
|
||||
$query = 'UPDATE #__jem_venues'
|
||||
. ' SET published = ' . (int)$publish
|
||||
. ' WHERE id IN (' . $cids . ')'
|
||||
. ' AND (checked_out = 0 OR checked_out IS null OR (checked_out = ' . $userid . '))'
|
||||
;
|
||||
|
||||
$this->_db->setQuery($query);
|
||||
$result = true;
|
||||
|
||||
if ($this->_db->execute() === false) {
|
||||
$this->setError($this->_db->getErrorMsg());
|
||||
$result = false;
|
||||
}
|
||||
}
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Build the query
|
||||
*
|
||||
* @access private
|
||||
* @return string
|
||||
*/
|
||||
protected function _buildQueryVenues()
|
||||
{
|
||||
# Get the WHERE and ORDER BY clauses for the query
|
||||
$where = $this->_buildVenuesWhere();
|
||||
$orderby = $this->_buildOrderByVenues();
|
||||
|
||||
# Get Venues from Database
|
||||
$query = 'SELECT l.id, l.venue, l.street, l.postalCode, l.city, l.state, l.country, l.url, l.created, l.created_by, l.published,'
|
||||
. ' l.custom1, l.custom2, l.custom3, l.custom4, l.custom5, l.custom6, l.custom7, l.custom8, l.custom9, l.custom10,'
|
||||
. ' l.locdescription, l.locimage, l.latitude, l.longitude, l.map, l.meta_keywords, l.meta_description, l.checked_out, l.checked_out_time,'
|
||||
. ' CASE WHEN CHAR_LENGTH(l.alias) THEN CONCAT_WS(\':\', l.id, l.alias) ELSE l.id END as venueslug'
|
||||
. ' FROM #__jem_venues AS l '
|
||||
. $where
|
||||
. $orderby
|
||||
;
|
||||
|
||||
return $query;
|
||||
}
|
||||
|
||||
/**
|
||||
* Build the order clause
|
||||
*
|
||||
* @access private
|
||||
* @return string
|
||||
*/
|
||||
protected function _buildOrderByVenues()
|
||||
{
|
||||
$app = Factory::getApplication();
|
||||
|
||||
$filter_order = $app->getUserStateFromRequest('com_jem.myvenues.filter_order', 'filter_order', 'l.venue', 'cmd');
|
||||
$filter_order_Dir = $app->getUserStateFromRequest('com_jem.myvenues.filter_order_Dir', 'filter_order_Dir', '', 'word');
|
||||
|
||||
$filter_order = InputFilter::getInstance()->clean($filter_order, 'cmd');
|
||||
$filter_order_Dir = InputFilter::getInstance()->clean($filter_order_Dir, 'word');
|
||||
|
||||
if ($filter_order != '') {
|
||||
$orderby = ' ORDER BY ' . $filter_order . ' ' . $filter_order_Dir . ', l.venue ASC';
|
||||
} else {
|
||||
$orderby = ' ORDER BY l.venue ASC';
|
||||
}
|
||||
|
||||
return $orderby;
|
||||
}
|
||||
|
||||
/**
|
||||
* Build the where clause
|
||||
*
|
||||
* @access private
|
||||
* @return string
|
||||
*/
|
||||
protected function _buildVenuesWhere()
|
||||
{
|
||||
$app = Factory::getApplication();
|
||||
$user = JemFactory::getUser();
|
||||
$settings = JemHelper::globalattribs();
|
||||
|
||||
$filter = $app->getUserStateFromRequest('com_jem.myvenues.filter', 'filter', 0, 'int');
|
||||
$search = $app->getUserStateFromRequest('com_jem.myvenues.filter_search', 'filter_search', '', 'string');
|
||||
$search = $this->_db->escape(trim(\Joomla\String\StringHelper::strtolower($search)));
|
||||
|
||||
$where = array();
|
||||
|
||||
// $where[] = ' l.published = 1';
|
||||
|
||||
// then if the user is creator of the event
|
||||
$where [] = ' l.created_by = '.$this->_db->Quote($user->id);
|
||||
|
||||
if ($settings->get('global_show_filter') && $search) {
|
||||
switch($filter) {
|
||||
case 1:
|
||||
// $where[] = ' LOWER(a.title) LIKE \'%'.$search.'%\' ';
|
||||
break;
|
||||
case 2:
|
||||
$where[] = ' LOWER(l.venue) LIKE \'%'.$search.'%\' ';
|
||||
break;
|
||||
case 3:
|
||||
$where[] = ' LOWER(l.city) LIKE \'%'.$search.'%\' ';
|
||||
break;
|
||||
case 4:
|
||||
// $where[] = ' LOWER(c.catname) LIKE \'%'.$search.'%\' ';
|
||||
break;
|
||||
case 5:
|
||||
default:
|
||||
$where[] = ' LOWER(l.state) LIKE \'%'.$search.'%\' ';
|
||||
}
|
||||
}
|
||||
|
||||
$where2 = (count($where) ? ' WHERE ' . implode(' AND ', $where) : '');
|
||||
return $where2;
|
||||
}
|
||||
}
|
||||
?>
|
||||
458
components/com_jem/models/search.php
Normal file
458
components/com_jem/models/search.php
Normal file
@ -0,0 +1,458 @@
|
||||
<?php
|
||||
/**
|
||||
* @package JEM
|
||||
* @copyright (C) 2013-2024 joomlaeventmanager.net
|
||||
* @copyright (C) 2005-2009 Christoph Lukes
|
||||
* @license https://www.gnu.org/licenses/gpl-3.0 GNU/GPL
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Pagination\Pagination;
|
||||
use Joomla\CMS\Filter\InputFilter;
|
||||
use Joomla\CMS\MVC\Model\BaseDatabaseModel;
|
||||
|
||||
/**
|
||||
* JEM Component search Model
|
||||
*
|
||||
* @package JEM
|
||||
*
|
||||
*/
|
||||
class JemModelSearch extends BaseDatabaseModel
|
||||
{
|
||||
/**
|
||||
* Events data array
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $_data = null;
|
||||
|
||||
/**
|
||||
* Events total count
|
||||
*
|
||||
* @var integer
|
||||
*/
|
||||
protected $_total = null;
|
||||
|
||||
/**
|
||||
* Pagination object
|
||||
*
|
||||
* @var object
|
||||
*/
|
||||
protected $_pagination = null;
|
||||
|
||||
/**
|
||||
* the query
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $_query = null;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
|
||||
$app = Factory::getApplication();
|
||||
$jemsettings = JemHelper::config();
|
||||
|
||||
//get the number of events from database
|
||||
$limit = $app->getUserStateFromRequest('com_jem.search.limit', 'limit', $jemsettings->display_num, 'int');
|
||||
$limitstart = $app->input->getInt('limitstart', 0);
|
||||
// correct start value if required
|
||||
$limitstart = $limit ? (int)(floor($limitstart / $limit) * $limit) : 0;
|
||||
|
||||
$this->setState('limit', $limit);
|
||||
$this->setState('limitstart', $limitstart);
|
||||
|
||||
// Get the filter request variables
|
||||
$filter_order = $app->input->getCmd('filter_order', 'a.dates');
|
||||
$this->setState('filter_order', $filter_order);
|
||||
|
||||
$filter_order_DirDefault = 'ASC';
|
||||
// Reverse default order for dates in archive mode
|
||||
$task = $app->input->getCmd('task', '');
|
||||
if (($task == 'archive') && ($filter_order == 'a.dates')) {
|
||||
$filter_order_DirDefault = 'DESC';
|
||||
}
|
||||
$this->setState('filter_order_Dir', $app->input->getCmd('filter_order_Dir', $filter_order_DirDefault));
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to get the Events
|
||||
*
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function getData()
|
||||
{
|
||||
$pop = Factory::getApplication()->input->getBool('pop', false);
|
||||
|
||||
// Lets load the content if it doesn't already exist
|
||||
if (empty($this->_data)) {
|
||||
$query = $this->_buildQuery();
|
||||
|
||||
if ($pop) {
|
||||
$this->_data = $this->_getList($query);
|
||||
} else {
|
||||
$pagination = $this->getPagination();
|
||||
$this->_data = $this->_getList($query, $pagination->limitstart, $pagination->limit);
|
||||
}
|
||||
|
||||
foreach ($this->_data as $i => $item) {
|
||||
$item->categories = $this->getCategories($item->id);
|
||||
|
||||
//remove events without categories (users have no access to them)
|
||||
if (empty($item->categories)) {
|
||||
unset($this->_data[$i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return $this->_data;
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to get a pagination object for the events
|
||||
*
|
||||
* @access public
|
||||
* @return integer
|
||||
*/
|
||||
public function getPagination()
|
||||
{
|
||||
// Lets load the content if it doesn't already exist
|
||||
if (empty($this->_pagination)) {
|
||||
$this->_pagination = new Pagination($this->getTotal(), $this->getState('limitstart'), $this->getState('limit'));
|
||||
}
|
||||
|
||||
return $this->_pagination;
|
||||
}
|
||||
|
||||
/**
|
||||
* Build the query
|
||||
*
|
||||
* @access private
|
||||
* @return string
|
||||
*/
|
||||
protected function _buildQuery()
|
||||
{
|
||||
if (empty($this->_query)) {
|
||||
# Get the WHERE and ORDER BY clauses for the query
|
||||
$where = $this->_buildWhere();
|
||||
$orderby = $this->_buildOrderBy();
|
||||
|
||||
# Get Events from Database
|
||||
$this->_query = 'SELECT a.id, a.dates, a.enddates, a.times, a.endtimes, a.title, a.created, a.created_by, a.created_by_alias, a.locid, a.published, a.access,'
|
||||
. ' a.recurrence_type, a.recurrence_first_id, a.recurrence_byday, a.recurrence_counter, a.recurrence_limit, a.recurrence_limit_date, a.recurrence_number,'
|
||||
. ' a.alias, a.attribs, a.checked_out ,a.checked_out_time, a.contactid, a.datimage, a.featured, a.hits, a.language, a.version,'
|
||||
. ' a.custom1, a.custom2, a.custom3, a.custom4, a.custom5, a.custom6, a.custom7, a.custom8, a.custom9, a.custom10,'
|
||||
. ' a.introtext, a.fulltext, a.registra, a.unregistra, a.maxplaces, a.waitinglist, a.metadata, a.meta_keywords, a.meta_description, a.modified, a.modified_by,'
|
||||
. ' l.id AS l_id, l.venue, l.street, l.postalCode, l.city, l.state, l.country, l.url, l.published AS l_published,'
|
||||
. ' l.alias AS l_alias, l.checked_out AS l_checked_out, l.checked_out_time AS l_checked_out_time, l.created AS l_created, l.created_by AS l_createdby,'
|
||||
. ' l.custom1 AS l_custom1, l.custom2 AS l_custom2, l.custom3 AS l_custom3, l.custom4 AS l_custom4, l.custom5 AS l_custom5, l.custom6 AS l_custom6, l.custom7 AS l_custom7, l.custom8 AS l_custom8, l.custom9 AS l_custom9, l.custom10 AS l_custom10,'
|
||||
. ' l.locdescription, l.locimage, l.latitude, l.longitude, l.map, l.meta_description AS l_meta_description, l.meta_keywords AS l_meta_keywords, l.modified AS l_modified, l.modified_by AS l_modified_by,'
|
||||
. ' l.publish_up AS l_publish_up, l.publish_down AS l_publish_down, l.version AS l_version,'
|
||||
. ' CASE WHEN CHAR_LENGTH(a.alias) THEN CONCAT_WS(\':\', a.id, a.alias) ELSE a.id END as slug,'
|
||||
. ' CASE WHEN CHAR_LENGTH(l.alias) THEN CONCAT_WS(\':\', a.locid, l.alias) ELSE a.locid END as venueslug'
|
||||
. ' FROM #__jem_events AS a'
|
||||
. ' INNER JOIN #__jem_cats_event_relations AS rel ON rel.itemid = a.id '
|
||||
. ' LEFT JOIN #__jem_venues AS l ON l.id = a.locid'
|
||||
. ' LEFT JOIN #__jem_countries AS c ON c.iso2 = l.country'
|
||||
. $where
|
||||
. ' GROUP BY a.id '
|
||||
. $orderby
|
||||
;
|
||||
}
|
||||
|
||||
return $this->_query;
|
||||
}
|
||||
|
||||
/**
|
||||
* Build the order clause
|
||||
*
|
||||
* @access private
|
||||
* @return string
|
||||
*/
|
||||
protected function _buildOrderBy()
|
||||
{
|
||||
$app = Factory::getApplication();
|
||||
$task = $app->input->getCmd('task', '');
|
||||
|
||||
$filter_order = $this->getState('filter_order');
|
||||
$filter_order_Dir = $this->getState('filter_order_Dir');
|
||||
$default_order_Dir = ($task == 'archive') ? 'DESC' : 'ASC';
|
||||
|
||||
$filter_order = InputFilter::getInstance()->clean($filter_order, 'cmd');
|
||||
$filter_order_Dir = InputFilter::getInstance()->clean($filter_order_Dir, 'word');
|
||||
|
||||
if ($filter_order == 'a.dates') {
|
||||
$orderby = ' ORDER BY a.dates ' . $filter_order_Dir .', a.times ' . $filter_order_Dir
|
||||
. ', a.created ' . $filter_order_Dir;
|
||||
} else {
|
||||
$orderby = ' ORDER BY ' . $filter_order . ' ' . $filter_order_Dir
|
||||
. ', a.dates ' . $default_order_Dir . ', a.times ' . $default_order_Dir
|
||||
. ', a.created ' . $default_order_Dir;
|
||||
}
|
||||
|
||||
return $orderby;
|
||||
}
|
||||
|
||||
/**
|
||||
* Build the where clause
|
||||
*
|
||||
* @access private
|
||||
* @return string
|
||||
*/
|
||||
protected function _buildWhere()
|
||||
{
|
||||
$app = Factory::getApplication();
|
||||
|
||||
// Get the paramaters of the active menu item
|
||||
$params = $app->getParams();
|
||||
$task = $app->input->getCmd('task', '');
|
||||
$user = JemFactory::getUser();
|
||||
$levels = $user->getAuthorisedViewLevels();
|
||||
$top_category = $params->get('top_category', 1);
|
||||
|
||||
// First thing we need to do is to select only needed events
|
||||
if ($task == 'archive') {
|
||||
$where = ' WHERE a.published = 2';
|
||||
} else {
|
||||
$where = ' WHERE a.published = 1';
|
||||
}
|
||||
|
||||
// filter by user's access levels
|
||||
$where .= ' AND a.access IN (' . implode(', ', $levels) .')';
|
||||
|
||||
//$filter = $app->input->getString('filter', '');
|
||||
$filter = $app->getUserStateFromRequest('com_jem.search.filter_search', 'filter_search', '', 'string');
|
||||
$filter_type = $app->input->get('filter_type', '');
|
||||
$filter_continent = $app->getUserStateFromRequest('com_jem.search.filter_continent', 'filter_continent', '', 'string');
|
||||
$filter_country = $app->getUserStateFromRequest('com_jem.search.filter_country', 'filter_country', '', 'string');
|
||||
$filter_city = $app->getUserStateFromRequest('com_jem.search.filter_city', 'filter_city', '', 'string');
|
||||
$filter_date_from = $app->getUserStateFromRequest('com_jem.search.filter_date_from', 'filter_date_from', '', 'string');
|
||||
$filter_date_to = $app->getUserStateFromRequest('com_jem.search.filter_date_to', 'filter_date_to', '', 'string');
|
||||
$filter_category = $app->getUserStateFromRequest('com_jem.search.filter_category', 'filter_category', 0, 'int');
|
||||
// "Please select..." entry has number 1 which must be interpreted as "not set" and replaced by top category (which maybe 1 ;-)
|
||||
$filter_category = (($filter_category > 1) ? $filter_category : $top_category);
|
||||
|
||||
// no result if no filter:
|
||||
if (!($filter || $filter_continent || $filter_country || $filter_city || $filter_date_from || $filter_date_to || $filter_category != $top_category)) {
|
||||
return ' WHERE 0 ';
|
||||
}
|
||||
|
||||
if ($filter) {
|
||||
// clean filter variables
|
||||
$filter = \Joomla\String\StringHelper::strtolower($filter);
|
||||
$filter = $this->_db->Quote('%'.$this->_db->escape($filter, true).'%', false);
|
||||
$filter_type = \Joomla\String\StringHelper::strtolower($filter_type);
|
||||
|
||||
switch ($filter_type) {
|
||||
case 'title' :
|
||||
$where .= ' AND LOWER(a.title) LIKE '.$filter;
|
||||
break;
|
||||
case 'venue' :
|
||||
$where .= ' AND LOWER(l.venue) LIKE '.$filter;
|
||||
break;
|
||||
case 'city' :
|
||||
$where .= ' AND LOWER(l.city) LIKE '.$filter;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// filter date
|
||||
if ($params->get('date_filter_type', 0) == 1) // match on all events dates (between start and end)
|
||||
{
|
||||
if ($filter_date_from && strtotime($filter_date_from))
|
||||
{
|
||||
$filter_date_from = $this->_db->Quote(date('Y-m-d', strtotime($filter_date_from)));
|
||||
$where .= ' AND DATEDIFF(IF (a.enddates IS NOT NULL, a.enddates, a.dates), '. $filter_date_from .') >= 0';
|
||||
}
|
||||
if ($filter_date_to && strtotime($filter_date_to))
|
||||
{
|
||||
$filter_date_to = $this->_db->Quote(date('Y-m-d', strtotime($filter_date_to)));
|
||||
$where .= ' AND DATEDIFF(a.dates, '. $filter_date_to .') <= 0';
|
||||
}
|
||||
} else {
|
||||
// match only on start date
|
||||
if ($filter_date_from && strtotime($filter_date_from)) {
|
||||
$filter_date_from = $this->_db->Quote(date('Y-m-d', strtotime($filter_date_from)));
|
||||
$where .= ' AND DATEDIFF(a.dates, '. $filter_date_from .') >= 0';
|
||||
}
|
||||
if ($filter_date_to && strtotime($filter_date_to)) {
|
||||
$filter_date_to = $this->_db->Quote(date('Y-m-d', strtotime($filter_date_to)));
|
||||
$where .= ' AND DATEDIFF(a.dates, '. $filter_date_to .') <= 0';
|
||||
}
|
||||
}
|
||||
// filter continent
|
||||
if ($filter_continent) {
|
||||
$where .= ' AND c.continent = ' . $this->_db->Quote($filter_continent);
|
||||
}
|
||||
// filter country
|
||||
if ($filter_country) {
|
||||
$where .= ' AND l.country = ' . $this->_db->Quote($filter_country);
|
||||
}
|
||||
// filter city
|
||||
if ($filter_country && $filter_city) {
|
||||
$where .= ' AND l.city = ' . $this->_db->Quote($filter_city);
|
||||
}
|
||||
// filter category
|
||||
if ($filter_category) {
|
||||
$cats = JemCategories::getChilds((int) $filter_category);
|
||||
$where .= ' AND rel.catid IN (' . implode(', ', $cats) .')';
|
||||
}
|
||||
|
||||
return $where;
|
||||
}
|
||||
|
||||
public function getTotal()
|
||||
{
|
||||
// Lets load the total nr if it doesn't already exist
|
||||
if (empty($this->_total))
|
||||
{
|
||||
$query = $this->_buildQuery();
|
||||
$this->_total = $this->_getListCount($query);
|
||||
}
|
||||
return $this->_total;
|
||||
}
|
||||
|
||||
public function getCategories($id)
|
||||
{
|
||||
$user = JemFactory::getUser();
|
||||
// Support Joomla access levels instead of single group id
|
||||
$levels = $user->getAuthorisedViewLevels();
|
||||
|
||||
$query = 'SELECT c.id, c.catname, c.access, c.lft, c.checked_out AS cchecked_out,'
|
||||
. ' CASE WHEN CHAR_LENGTH(c.alias) THEN CONCAT_WS(\':\', c.id, c.alias) ELSE c.id END as catslug'
|
||||
. ' FROM #__jem_categories AS c'
|
||||
. ' INNER JOIN #__jem_cats_event_relations AS rel ON rel.catid = c.id'
|
||||
. ' WHERE rel.itemid = '.(int)$id
|
||||
. ' AND c.published = 1'
|
||||
. ' AND c.access IN (' . implode(',', $levels) . ')'
|
||||
;
|
||||
|
||||
$this->_db->setQuery($query);
|
||||
|
||||
return $this->_db->loadObjectList();
|
||||
}
|
||||
|
||||
public function getCountryOptions()
|
||||
{
|
||||
$app = Factory::getApplication();
|
||||
|
||||
$filter_continent = $app->getUserStateFromRequest('com_jem.search.filter_continent', 'filter_continent', '', 'string');
|
||||
|
||||
$query = ' SELECT c.iso2 as value, c.name as text '
|
||||
. ' FROM #__jem_events AS a'
|
||||
. ' INNER JOIN #__jem_venues AS l ON l.id = a.locid'
|
||||
. ' INNER JOIN #__jem_countries as c ON c.iso2 = l.country '
|
||||
;
|
||||
|
||||
if ($filter_continent) {
|
||||
$query .= ' WHERE c.continent = ' . $this->_db->Quote($filter_continent);
|
||||
}
|
||||
$query .= ' GROUP BY c.iso2 ';
|
||||
$query .= ' ORDER BY c.name ';
|
||||
$this->_db->setQuery($query);
|
||||
|
||||
return $this->_db->loadObjectList();
|
||||
}
|
||||
|
||||
public function getContinentFromCountry($country)
|
||||
{
|
||||
$app = Factory::getApplication();
|
||||
|
||||
$query = ' SELECT c.continent as value FROM #__jem_countries as c WHERE c.iso2 = ' . $this->_db->Quote($country);
|
||||
$this->_db->setQuery($query);
|
||||
|
||||
return $this->_db->loadResult();
|
||||
}
|
||||
|
||||
public function getCityOptions()
|
||||
{
|
||||
if (!$country = Factory::getApplication()->input->getString('filter_country', '')) {
|
||||
return array();
|
||||
}
|
||||
$query = ' SELECT DISTINCT l.city as value, l.city as text '
|
||||
. ' FROM #__jem_events AS a'
|
||||
. ' INNER JOIN #__jem_venues AS l ON l.id = a.locid'
|
||||
. ' INNER JOIN #__jem_countries as c ON c.iso2 = l.country '
|
||||
. ' WHERE l.country = ' . $this->_db->Quote($country)
|
||||
. ' ORDER BY l.city ';
|
||||
|
||||
$this->_db->setQuery($query);
|
||||
return $this->_db->loadObjectList();
|
||||
}
|
||||
|
||||
/**
|
||||
* logic to get the categories
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function getCategoryTree()
|
||||
{
|
||||
$app = Factory::getApplication();
|
||||
$db = Factory::getContainer()->get('DatabaseDriver');
|
||||
|
||||
// Get the paramaters of the active menu item
|
||||
$params = $app->getParams('com_jem');
|
||||
$top_id = max(1, $params->get('top_category', 1)); // not below 'root'
|
||||
|
||||
$user = JemFactory::getUser();
|
||||
// Support Joomla access levels instead of single group id
|
||||
$levels = $user->getAuthorisedViewLevels();
|
||||
|
||||
$where = ' WHERE c.published = 1 AND c.access IN (' . implode(',', $levels) . ')';
|
||||
|
||||
//get the maintained categories and the categories whithout any group
|
||||
//or just get all if somebody have edit rights
|
||||
$query = 'SELECT c.*'
|
||||
. ' FROM #__jem_categories AS c'
|
||||
. $where
|
||||
. ' ORDER BY c.lft'
|
||||
;
|
||||
|
||||
|
||||
try
|
||||
{
|
||||
$db->setQuery($query);
|
||||
$mitems = $db->loadObjectList();
|
||||
}
|
||||
catch (RuntimeException $e)
|
||||
{
|
||||
\Joomla\CMS\Factory::getApplication()->enqueueMessage($e->getMessage(), 'notice');
|
||||
}
|
||||
|
||||
// Check for a database error.
|
||||
// if ($db->getErrorNum())
|
||||
// {
|
||||
// \Joomla\CMS\Factory::getApplication()->enqueueMessage($db->getErrorMsg(), 'notice');
|
||||
// }
|
||||
|
||||
if (!$mitems) {
|
||||
$mitems = array();
|
||||
$children = array();
|
||||
} else {
|
||||
$children = array();
|
||||
// First pass - collect children
|
||||
foreach ($mitems as $v)
|
||||
{
|
||||
$pt = $v->parent_id;
|
||||
$list = isset($children[$pt]) ? $children[$pt] : array();
|
||||
array_push($list, $v);
|
||||
$children[$pt] = $list;
|
||||
}
|
||||
}
|
||||
|
||||
//get list of the items
|
||||
$list = JemCategories::treerecurse($top_id, '', array(), $children, 9999, 0, 0);
|
||||
|
||||
return $list;
|
||||
}
|
||||
}
|
||||
?>
|
||||
219
components/com_jem/models/venue.php
Normal file
219
components/com_jem/models/venue.php
Normal file
@ -0,0 +1,219 @@
|
||||
<?php
|
||||
/**
|
||||
* @package JEM
|
||||
* @copyright (C) 2013-2024 joomlaeventmanager.net
|
||||
* @copyright (C) 2005-2009 Christoph Lukes
|
||||
* @license https://www.gnu.org/licenses/gpl-3.0 GNU/GPL
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Language\Text;
|
||||
|
||||
require_once __DIR__ . '/eventslist.php';
|
||||
|
||||
/**
|
||||
* Model: venue
|
||||
*/
|
||||
class JemModelVenue extends JemModelEventslist
|
||||
{
|
||||
/**
|
||||
* Venue id
|
||||
*
|
||||
* @var int
|
||||
*/
|
||||
protected $_id = null;
|
||||
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$app = Factory::getApplication();
|
||||
$jinput = $app->input;
|
||||
$params = $app->getParams();
|
||||
|
||||
# determing the id to load
|
||||
if ($jinput->get('id',null,'int')) {
|
||||
$id = $jinput->get('id',null,'int');
|
||||
} else {
|
||||
$id = $params->get('id');
|
||||
}
|
||||
$this->setId((int)$id);
|
||||
|
||||
parent::__construct();
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to auto-populate the model state.
|
||||
*/
|
||||
protected function populateState($ordering = null, $direction = null)
|
||||
{
|
||||
$app = Factory::getApplication();
|
||||
$jemsettings = JemHelper::config();
|
||||
$params = $app->getParams();
|
||||
$jinput = $app->input;
|
||||
$task = $jinput->getCmd('task','');
|
||||
$itemid = $jinput->getInt('id', 0) . ':' . $jinput->getInt('Itemid', 0);
|
||||
$user = JemFactory::getUser();
|
||||
$format = $jinput->getCmd('format',false);
|
||||
|
||||
// List state information
|
||||
|
||||
if (empty($format) || ($format == 'html')) {
|
||||
/* in J! 3.3.6 limitstart is removed from request - but we need it! */
|
||||
if ($app->input->getInt('limitstart', null) === null) {
|
||||
$app->setUserState('com_jem.venue.'.$itemid.'.limitstart', 0);
|
||||
}
|
||||
|
||||
$limit = $app->getUserStateFromRequest('com_jem.venue.'.$itemid.'.limit', 'limit', $jemsettings->display_num, 'int');
|
||||
$this->setState('list.limit', $limit);
|
||||
|
||||
$limitstart = $app->getUserStateFromRequest('com_jem.venue.'.$itemid.'.limitstart', 'limitstart', 0, 'int');
|
||||
// correct start value if required
|
||||
$limitstart = $limit ? (int)(floor($limitstart / $limit) * $limit) : 0;
|
||||
$this->setState('list.start', $limitstart);
|
||||
}
|
||||
|
||||
# Search
|
||||
$search = $app->getUserStateFromRequest('com_jem.venue.'.$itemid.'.filter_search', 'filter_search', '', 'string');
|
||||
$this->setState('filter.filter_search', $search);
|
||||
|
||||
# FilterType
|
||||
$filtertype = $app->getUserStateFromRequest('com_jem.venue.'.$itemid.'.filter_type', 'filter_type', 0, 'int');
|
||||
$this->setState('filter.filter_type', $filtertype);
|
||||
|
||||
# filter_order
|
||||
$orderCol = $app->getUserStateFromRequest('com_jem.venue.'.$itemid.'.filter_order', 'filter_order', 'a.dates', 'cmd');
|
||||
$this->setState('filter.filter_ordering', $orderCol);
|
||||
|
||||
# filter_direction
|
||||
$listOrder = $app->getUserStateFromRequest('com_jem.venue.'.$itemid.'.filter_order_Dir', 'filter_order_Dir', 'ASC', 'word');
|
||||
$this->setState('filter.filter_direction', $listOrder);
|
||||
|
||||
# show open date events
|
||||
# (there is no menu item option yet so show all events)
|
||||
$this->setState('filter.opendates', 1);
|
||||
|
||||
$defaultOrder = ($task == 'archive') ? 'DESC' : 'ASC';
|
||||
if ($orderCol == 'a.dates') {
|
||||
$orderby = array('a.dates ' . $listOrder, 'a.times ' . $listOrder, 'a.created ' . $listOrder);
|
||||
} else {
|
||||
$orderby = array($orderCol . ' ' . $listOrder,
|
||||
'a.dates ' . $defaultOrder, 'a.times ' . $defaultOrder, 'a.created ' . $defaultOrder);
|
||||
}
|
||||
$this->setState('filter.orderby', $orderby);
|
||||
|
||||
# params
|
||||
$this->setState('params', $params);
|
||||
|
||||
# publish state
|
||||
$this->_populatePublishState($task);
|
||||
|
||||
$this->setState('filter.groupby',array('a.id'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to get a list of events.
|
||||
*/
|
||||
public function getItems()
|
||||
{
|
||||
$items = parent::getItems();
|
||||
/* no additional things to do yet - place holder */
|
||||
if ($items) {
|
||||
return $items;
|
||||
}
|
||||
|
||||
return array();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return JDatabaseQuery
|
||||
*/
|
||||
protected function getListQuery()
|
||||
{
|
||||
// Create a new query object.
|
||||
$query = parent::getListQuery();
|
||||
|
||||
// here we can extend the query of the Eventslist model
|
||||
$query->where('a.locid = '.(int)$this->_id);
|
||||
|
||||
return $query;
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to set the venue id
|
||||
*
|
||||
* The venue-id can be set by a menu-parameter
|
||||
*/
|
||||
public function setId($id)
|
||||
{
|
||||
// Set new venue ID and wipe data
|
||||
$this->_id = $id;
|
||||
//$this->_data = null;
|
||||
}
|
||||
|
||||
/**
|
||||
* set limit
|
||||
* @param int value
|
||||
*/
|
||||
public function setLimit($value)
|
||||
{
|
||||
$this->setState('limit', (int) $value);
|
||||
}
|
||||
|
||||
/**
|
||||
* set limitstart
|
||||
* @param int value
|
||||
*/
|
||||
public function setLimitStart($value)
|
||||
{
|
||||
$this->setState('limitstart', (int) $value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to get a specific Venue
|
||||
*
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function getVenue()
|
||||
{
|
||||
$user = JemFactory::getUser();
|
||||
|
||||
$db = Factory::getContainer()->get('DatabaseDriver');
|
||||
$query = $db->getQuery(true);
|
||||
|
||||
$query->select('id, venue, published, city, state, url, street, custom1, custom2, custom3, custom4, custom5, '.
|
||||
' custom6, custom7, custom8, custom9, custom10, locimage, meta_keywords, meta_description, '.
|
||||
' created, created_by, locdescription, country, map, latitude, longitude, postalCode, checked_out AS vChecked_out, checked_out_time AS vChecked_out_time, '.
|
||||
' CASE WHEN CHAR_LENGTH(alias) THEN CONCAT_WS(\':\', id, alias) ELSE id END as slug');
|
||||
$query->from($db->quoteName('#__jem_venues'));
|
||||
$query->where('id = '.(int)$this->_id);
|
||||
|
||||
// all together: if published or the user is creator of the venue or allowed to edit or publish venues
|
||||
if (empty($user->id)) {
|
||||
$query->where('published = 1');
|
||||
}
|
||||
// no limit if user can publish or edit foreign venues
|
||||
elseif ($user->can(array('edit', 'publish'), 'venue')) {
|
||||
$query->where('published IN (0,1)');
|
||||
}
|
||||
// user maybe creator
|
||||
else {
|
||||
$query->where('(published = 1 OR (published = 0 AND created_by = ' . $this->_db->Quote($user->id) . '))');
|
||||
}
|
||||
|
||||
$db->setQuery($query);
|
||||
$_venue = $db->loadObject();
|
||||
|
||||
if (empty($_venue)) {
|
||||
$this->setError(Text::_('COM_JEM_VENUE_ERROR_VENUE_NOT_FOUND'));
|
||||
return false;
|
||||
}
|
||||
|
||||
$_venue->attachments = JemAttachment::getAttachments('venue'.$_venue->id);
|
||||
|
||||
return $_venue;
|
||||
}
|
||||
}
|
||||
?>
|
||||
146
components/com_jem/models/venuecal.php
Normal file
146
components/com_jem/models/venuecal.php
Normal file
@ -0,0 +1,146 @@
|
||||
<?php
|
||||
/**
|
||||
* @package JEM
|
||||
* @copyright (C) 2013-2024 joomlaeventmanager.net
|
||||
* @copyright (C) 2005-2009 Christoph Lukes
|
||||
* @license https://www.gnu.org/licenses/gpl-3.0 GNU/GPL
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
use Joomla\CMS\Factory;
|
||||
|
||||
require_once __DIR__ . '/eventslist.php';
|
||||
|
||||
/**
|
||||
* Model-Venuecal
|
||||
**/
|
||||
class JemModelVenueCal extends JemModelEventslist
|
||||
{
|
||||
/**
|
||||
* Venue id
|
||||
*
|
||||
* @var int
|
||||
*/
|
||||
protected $_venue = null;
|
||||
|
||||
/**
|
||||
* Date as timestamp useable for strftime()
|
||||
*
|
||||
* @var int
|
||||
*/
|
||||
protected $_date = null;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
$app = Factory::getApplication();
|
||||
// $jemsettings = JemHelper::config();
|
||||
$jinput = $app->input;
|
||||
$params = $app->getParams();
|
||||
|
||||
$id = $jinput->getInt('id', 0);
|
||||
if (empty($id)) {
|
||||
$id = $params->get('id', 0);
|
||||
}
|
||||
|
||||
$this->setdate(time());
|
||||
$this->setId((int)$id);
|
||||
|
||||
parent::__construct();
|
||||
}
|
||||
|
||||
public function setdate($date)
|
||||
{
|
||||
$this->_date = $date;
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to set the venue id
|
||||
*/
|
||||
public function setId($id)
|
||||
{
|
||||
// Set new venue ID and wipe data
|
||||
$this->_id = $id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to auto-populate the model state.
|
||||
*/
|
||||
protected function populateState($ordering = null, $direction = null)
|
||||
{
|
||||
$app = Factory::getApplication();
|
||||
$params = $app->getParams();
|
||||
$itemid = $app->input->getInt('Itemid', 0);
|
||||
$task = $app->input->getCmd('task', '');
|
||||
$startdayonly = $params->get('show_only_start', false);
|
||||
$show_archived_events = $params->get('show_archived_events', 0);
|
||||
|
||||
# params
|
||||
$this->setState('params', $params);
|
||||
|
||||
# publish state
|
||||
$this->_populatePublishState($task);
|
||||
|
||||
###########
|
||||
## DATES ##
|
||||
###########
|
||||
|
||||
#only select events within specified dates. (chosen month)
|
||||
|
||||
$monthstart = mktime(0, 0, 1, date('m', $this->_date), 1, date('Y', $this->_date));
|
||||
$monthend = mktime(0, 0, -1, date('m', $this->_date)+1, 1, date('Y', $this->_date));
|
||||
|
||||
$filter_date_from = date('Y-m-d', $monthstart);
|
||||
$filter_date_to = date('Y-m-d', $monthend);
|
||||
|
||||
$where = ' DATEDIFF(IF (a.enddates IS NOT NULL, a.enddates, a.dates), '. $this->_db->Quote($filter_date_from) .') >= 0';
|
||||
$this->setState('filter.calendar_from', $where);
|
||||
|
||||
$where = ' DATEDIFF(a.dates, '. $this->_db->Quote($filter_date_to) .') <= 0';
|
||||
$this->setState('filter.calendar_to', $where);
|
||||
|
||||
# set filter
|
||||
$this->setState('filter.calendar_multiday', true);
|
||||
$this->setState('filter.calendar_startdayonly', (bool)$startdayonly);
|
||||
$this->setState('filter.filter_locid', $this->_id);
|
||||
$this->setState('filter.show_archived_events',(bool)$show_archived_events);
|
||||
|
||||
$app->setUserState('com_jem.venuecal.locid'.$itemid, $this->_id);
|
||||
|
||||
# groupby
|
||||
$this->setState('filter.groupby', array('a.id'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to get a list of events.
|
||||
*/
|
||||
public function getItems()
|
||||
{
|
||||
$items = parent::getItems();
|
||||
|
||||
if ($items) {
|
||||
return $items;
|
||||
}
|
||||
|
||||
return array();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return JDatabaseQuery
|
||||
*/
|
||||
protected function getListQuery()
|
||||
{
|
||||
// Let parent create a new query object.
|
||||
$query = parent::getListQuery();
|
||||
|
||||
// here we can extend the query of the Eventslist model
|
||||
$query->select('DATEDIFF(a.enddates, a.dates) AS datesdiff,DAYOFMONTH(a.dates) AS start_day, YEAR(a.dates) AS start_year, MONTH(a.dates) AS start_month');
|
||||
//$query->where('a.locid = '.$this->_id);
|
||||
|
||||
return $query;
|
||||
}
|
||||
}
|
||||
?>
|
||||
331
components/com_jem/models/venues.php
Normal file
331
components/com_jem/models/venues.php
Normal file
@ -0,0 +1,331 @@
|
||||
<?php
|
||||
/**
|
||||
* @package JEM
|
||||
* @copyright (C) 2013-2024 joomlaeventmanager.net
|
||||
* @copyright (C) 2005-2009 Christoph Lukes
|
||||
* @license https://www.gnu.org/licenses/gpl-3.0 GNU/GPL
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
use Joomla\CMS\Factory;
|
||||
|
||||
require_once __DIR__ . '/eventslist.php';
|
||||
|
||||
/**
|
||||
* Model: Venues
|
||||
*/
|
||||
class JemModelVenues extends JemModelEventslist
|
||||
{
|
||||
/**
|
||||
* Method to auto-populate the model state.
|
||||
*/
|
||||
protected function populateState($ordering = null, $direction = null)
|
||||
{
|
||||
// parent::populateState($ordering, $direction);
|
||||
|
||||
$app = Factory::getApplication();
|
||||
$params = $app->getParams();
|
||||
$task = $app->input->getCmd('task','');
|
||||
|
||||
// List state information
|
||||
$limit = $app->input->getInt('limit', $params->get('display_venues_num'));
|
||||
$this->setState('list.limit', $limit);
|
||||
$limitstart = $app->input->getInt('limitstart', 0);
|
||||
// correct start value if required
|
||||
$limitstart = $limit ? (int)(floor($limitstart / $limit) * $limit) : 0;
|
||||
$this->setState('list.start', $limitstart);
|
||||
|
||||
# params
|
||||
$this->setState('params', $params);
|
||||
// $this->setState('filter.published', 1);
|
||||
$this->setState('filter.groupby', array('l.id'));
|
||||
|
||||
# publish state
|
||||
$this->_populatePublishState($task);
|
||||
}
|
||||
|
||||
/**
|
||||
* Build the query
|
||||
*
|
||||
* @access private
|
||||
* @return string
|
||||
*/
|
||||
protected function getListQuery()
|
||||
{
|
||||
$user = JemFactory::getUser();
|
||||
$levels = $user->getAuthorisedViewLevels();
|
||||
|
||||
// Query
|
||||
$db = Factory::getContainer()->get('DatabaseDriver');
|
||||
$query = $db->getQuery(true);
|
||||
|
||||
$case_when_l = ' CASE WHEN ';
|
||||
$case_when_l .= $query->charLength('l.alias');
|
||||
$case_when_l .= ' THEN ';
|
||||
$id_l = $query->castAsChar('l.id');
|
||||
$case_when_l .= $query->concatenate(array($id_l, 'l.alias'), ':');
|
||||
$case_when_l .= ' ELSE ';
|
||||
$case_when_l .= $id_l.' END as venueslug';
|
||||
|
||||
$query->select(array('l.id AS locid', 'l.locimage', 'l.locdescription', 'l.url', 'l.venue', 'l.created', 'l.created_by',
|
||||
'l.street', 'l.postalCode', 'l.city', 'l.state', 'l.country',
|
||||
'l.map', 'l.latitude', 'l.longitude', 'l.published',
|
||||
'l.custom1', 'l.custom2', 'l.custom3', 'l.custom4', 'l.custom5', 'l.custom6', 'l.custom7', 'l.custom8', 'l.custom9', 'l.custom10',
|
||||
'l.meta_keywords', 'l.meta_description', 'l.checked_out', 'l.checked_out_time'));
|
||||
$query->select(array($case_when_l));
|
||||
$query->from('#__jem_venues as l');
|
||||
$query->join('LEFT', '#__jem_events AS a ON l.id = a.locid');
|
||||
$query->join('LEFT', '#__jem_cats_event_relations AS rel ON rel.itemid = a.id');
|
||||
$query->join('LEFT', '#__jem_categories AS c ON c.id = rel.catid');
|
||||
|
||||
// where
|
||||
$where = array();
|
||||
// all together: if published or the user is creator of the venue or allowed to edit or publish venues
|
||||
if (empty($user->id)) {
|
||||
$where[] = ' l.published = 1';
|
||||
}
|
||||
// no limit if user can publish or edit foreign venues
|
||||
elseif ($user->can(array('edit', 'publish'), 'venue')) {
|
||||
$where[] = ' l.published IN (0,1)';
|
||||
}
|
||||
// user maybe creator
|
||||
else {
|
||||
$where[] = ' (l.published = 1 OR (l.published = 0 AND l.created_by = ' . $this->_db->Quote($user->id) . '))';
|
||||
}
|
||||
|
||||
$query->where($where);
|
||||
$query->group(array('l.id'));
|
||||
$query->order(array('l.ordering', 'l.venue'));
|
||||
|
||||
return $query;
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to get a list of venues
|
||||
* We are defining it as we don't want to fire up the getItems function of the eventslist-model
|
||||
*/
|
||||
public function getItems()
|
||||
{
|
||||
// Get a storage key.
|
||||
$store = $this->getStoreId();
|
||||
|
||||
// Try to load the data from internal storage.
|
||||
if (!isset($this->cache[$store]))
|
||||
{
|
||||
// Load the list items.
|
||||
$query = $this->_getListQuery();
|
||||
|
||||
try
|
||||
{
|
||||
$items = $this->_getList($query, $this->getStart(), $this->getState('list.limit'));
|
||||
}
|
||||
catch (RuntimeException $e)
|
||||
{
|
||||
$this->setError($e->getMessage());
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
// Add the items to the internal cache.
|
||||
$this->cache[$store] = $items;
|
||||
}
|
||||
|
||||
return $this->cache[$store];
|
||||
}
|
||||
|
||||
public function AssignedEvents($id, $state = 1)
|
||||
{
|
||||
$user = JemFactory::getUser();
|
||||
$levels = $user->getAuthorisedViewLevels();
|
||||
$db = Factory::getContainer()->get('DatabaseDriver');
|
||||
$query = $db->getQuery(true);
|
||||
|
||||
$query->select(array('a.id'));
|
||||
$query->from('#__jem_events as a');
|
||||
$query->join('LEFT', '#__jem_venues AS l ON l.id = a.locid');
|
||||
$query->join('LEFT', '#__jem_cats_event_relations AS rel ON rel.itemid = a.id');
|
||||
$query->join('LEFT', '#__jem_categories AS c ON c.id = rel.catid');
|
||||
|
||||
# venue-id
|
||||
$query->where('l.id= '. $db->quote($id));
|
||||
# view access level
|
||||
$query->where('a.access IN (' . implode(',', $levels) . ')');
|
||||
// Note: categories are filtered in getCategories() called below
|
||||
// so we don't need to check c.access here
|
||||
|
||||
####################
|
||||
## FILTER-PUBLISH ##
|
||||
####################
|
||||
|
||||
# Filter by published state.
|
||||
if ((int)$state === 1) {
|
||||
$where_pub = $this->_getPublishWhere();
|
||||
if (!empty($where_pub)) {
|
||||
$query->where('(' . implode(' OR ', $where_pub) . ')');
|
||||
} else {
|
||||
// something wrong - fallback to published events
|
||||
$query->where('a.published = 1');
|
||||
}
|
||||
} else {
|
||||
$query->where('a.published = '.$db->quote($state));
|
||||
}
|
||||
|
||||
#####################
|
||||
### FILTER - BYCAT ##
|
||||
#####################
|
||||
|
||||
$cats = $this->getCategories('all');
|
||||
if (!empty($cats)) {
|
||||
$query->where('c.id IN (' . implode(',', $cats) . ')');
|
||||
}
|
||||
|
||||
$db->setQuery($query);
|
||||
$ids = $db->loadColumn(0);
|
||||
$ids = array_unique($ids);
|
||||
$nr = is_array($ids) ? count($ids) : 0;
|
||||
|
||||
if (empty($nr)) {
|
||||
$nr = 0;
|
||||
}
|
||||
|
||||
return ($nr);
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve Categories
|
||||
*
|
||||
* Due to multi-cat this function is needed
|
||||
* filter-index (4) is pointing to the cats
|
||||
*/
|
||||
public function getCategories($id)
|
||||
{
|
||||
$user = JemFactory::getUser();
|
||||
$levels = $user->getAuthorisedViewLevels();
|
||||
$settings = JemHelper::globalattribs();
|
||||
|
||||
// Query
|
||||
$db = Factory::getContainer()->get('DatabaseDriver');
|
||||
$query = $db->getQuery(true);
|
||||
|
||||
$case_when_c = ' CASE WHEN ';
|
||||
$case_when_c .= $query->charLength('c.alias');
|
||||
$case_when_c .= ' THEN ';
|
||||
$id_c = $query->castAsChar('c.id');
|
||||
$case_when_c .= $query->concatenate(array($id_c, 'c.alias'), ':');
|
||||
$case_when_c .= ' ELSE ';
|
||||
$case_when_c .= $id_c.' END as catslug';
|
||||
|
||||
$query->select(array('DISTINCT c.id','c.catname','c.access','c.checked_out AS cchecked_out','c.color',$case_when_c));
|
||||
$query->from('#__jem_categories as c');
|
||||
$query->join('LEFT', '#__jem_cats_event_relations AS rel ON rel.catid = c.id');
|
||||
|
||||
$query->select(array('a.id AS multi'));
|
||||
$query->join('LEFT','#__jem_events AS a ON a.id = rel.itemid');
|
||||
|
||||
if ($id != 'all'){
|
||||
$query->where('rel.itemid ='.(int)$id);
|
||||
}
|
||||
|
||||
$query->where('c.published = 1');
|
||||
|
||||
###################
|
||||
## FILTER-ACCESS ##
|
||||
###################
|
||||
|
||||
# Filter by access level.
|
||||
|
||||
###################################
|
||||
## FILTER - MAINTAINER/JEM GROUP ##
|
||||
###################################
|
||||
|
||||
# as maintainter someone who is registered can see a category that has special rights
|
||||
# let's see if the user has access to this category.
|
||||
|
||||
// $query3 = $db->getQuery(true);
|
||||
// $query3 = 'SELECT gr.id'
|
||||
// . ' FROM #__jem_groups AS gr'
|
||||
// . ' LEFT JOIN #__jem_groupmembers AS g ON g.group_id = gr.id'
|
||||
// . ' WHERE g.member = ' . (int) $user->get('id')
|
||||
// // . ' AND ' .$db->quoteName('gr.addevent') . ' = 1 '
|
||||
// . ' AND g.member NOT LIKE 0';
|
||||
// $db->setQuery($query3);
|
||||
// $groupnumber = $db->loadColumn();
|
||||
|
||||
// $jemgroups = implode(',',$groupnumber);
|
||||
|
||||
// JEM groups doesn't overrule view access levels!
|
||||
// if ($jemgroups) {
|
||||
// $query->where('(c.access IN ('.$groups.') OR c.groupid IN ('.$jemgroups.'))');
|
||||
// } else {
|
||||
$query->where('(c.access IN ('.implode(',', $levels).'))');
|
||||
// }
|
||||
|
||||
#######################
|
||||
## FILTER - CATEGORY ##
|
||||
#######################
|
||||
|
||||
# set filter for top_category
|
||||
$top_cat = $this->getState('filter.category_top');
|
||||
|
||||
if ($top_cat) {
|
||||
$query->where($top_cat);
|
||||
}
|
||||
|
||||
# Filter by a single or group of categories.
|
||||
$categoryId = $this->getState('filter.category_id');
|
||||
|
||||
if (is_numeric($categoryId)) {
|
||||
$type = $this->getState('filter.category_id.include', true) ? '= ' : '<> ';
|
||||
$query->where('c.id '.$type.(int) $categoryId);
|
||||
}
|
||||
elseif (is_array($categoryId) && count($categoryId)) {
|
||||
\Joomla\Utilities\ArrayHelper::toInteger($categoryId);
|
||||
$categoryId = implode(',', $categoryId);
|
||||
$type = $this->getState('filter.category_id.include', true) ? 'IN' : 'NOT IN';
|
||||
$query->where('c.id '.$type.' ('.$categoryId.')');
|
||||
}
|
||||
|
||||
# filter set by day-view
|
||||
$requestCategoryId = $this->getState('filter.req_catid');
|
||||
|
||||
if ($requestCategoryId) {
|
||||
$query->where('c.id = '.$db->quote($requestCategoryId));
|
||||
}
|
||||
|
||||
###################
|
||||
## FILTER-SEARCH ##
|
||||
###################
|
||||
|
||||
# define variables
|
||||
$filter = $this->getState('filter.filter_type');
|
||||
$search = $this->getState('filter.filter_search');
|
||||
|
||||
if (!empty($search)) {
|
||||
if (stripos($search, 'id:') === 0) {
|
||||
$query->where('c.id = '.(int) substr($search, 3));
|
||||
} else {
|
||||
$search = $db->Quote('%'.$db->escape($search, true).'%', false);
|
||||
|
||||
if ($search && $settings->get('global_show_filter')) {
|
||||
if ($filter == 4) {
|
||||
$query->where('c.catname LIKE '.$search);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$db->setQuery($query);
|
||||
|
||||
if ($id == 'all') {
|
||||
$cats = $db->loadColumn(0);
|
||||
$cats = array_unique($cats);
|
||||
} else {
|
||||
$cats = $db->loadObjectList();
|
||||
}
|
||||
|
||||
return $cats;
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
181
components/com_jem/models/venueslist.php
Normal file
181
components/com_jem/models/venueslist.php
Normal file
@ -0,0 +1,181 @@
|
||||
<?php
|
||||
/**
|
||||
* @package JEM
|
||||
* @copyright (C) 2013-2024 joomlaeventmanager.net
|
||||
* @copyright (C) 2005-2009 Christoph Lukes
|
||||
* @license https://www.gnu.org/licenses/gpl-3.0 GNU/GPL
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Filter\InputFilter;
|
||||
use Joomla\CMS\MVC\Model\ListModel;
|
||||
|
||||
/**
|
||||
* Model-Venueslist
|
||||
*/
|
||||
class JemModelVenueslist extends ListModel
|
||||
{
|
||||
var $_venues = null;
|
||||
var $_total_venues = null;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
public function __construct($config = array())
|
||||
{
|
||||
parent::__construct();
|
||||
|
||||
$app = Factory::getApplication();
|
||||
$jemsettings = JEMHelper::config();
|
||||
|
||||
parent::__construct($config);
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to auto-populate the model state.
|
||||
*/
|
||||
protected function populateState($ordering = null, $direction = null)
|
||||
{
|
||||
$app = Factory::getApplication();
|
||||
$jemsettings = JemHelper::config();
|
||||
$jinput = $app->input;
|
||||
$task = $jinput->getCmd('task');
|
||||
$itemid = $jinput->getInt('id', 0) . ':' . $jinput->getInt('Itemid', 0);
|
||||
|
||||
/* in J! 3.3.6 limitstart is removed from request - but we need it! */
|
||||
if ($app->input->getInt('limitstart', null) === null) {
|
||||
$app->setUserState('com_jem.venueslist.limitstart', 0);
|
||||
}
|
||||
|
||||
$limit = $app->getUserStateFromRequest('com_jem.venueslist.'.$itemid.'.limit', 'limit', $jemsettings->display_num, 'int');
|
||||
$this->setState('list.limit', $limit);
|
||||
$limitstart = $app->getUserStateFromRequest('com_jem.venueslist.'.$itemid.'.limitstart', 'limitstart', 0, 'int');
|
||||
// correct start value if required
|
||||
$limitstart = $limit ? (int)(floor($limitstart / $limit) * $limit) : 0;
|
||||
$this->setState('list.start', $limitstart);
|
||||
|
||||
# Search - variables
|
||||
$search = $app->getUserStateFromRequest('com_jem.venueslist.'.$itemid.'.filter_search', 'filter_search', '', 'string');
|
||||
$this->setState('filter.filter_search', $search); // must be escaped later
|
||||
|
||||
$filtertype = $app->getUserStateFromRequest('com_jem.venueslist.'.$itemid.'.filter_type', 'filter_type', '', 'int');
|
||||
$this->setState('filter.filter_type', $filtertype);
|
||||
|
||||
###########
|
||||
## ORDER ##
|
||||
###########
|
||||
|
||||
$filter_order = $app->getUserStateFromRequest('com_jem.venueslist.'.$itemid.'.filter_order', 'filter_order', 'a.city', 'cmd');
|
||||
$filter_order_Dir = $app->getUserStateFromRequest('com_jem.venueslist.'.$itemid.'.filter_order_Dir', 'filter_order_Dir', 'ASC', 'word');
|
||||
$filter_order = InputFilter::getInstance()->clean($filter_order, 'cmd');
|
||||
$filter_order_Dir = InputFilter::getInstance()->clean($filter_order_Dir, 'word');
|
||||
|
||||
$orderby = $filter_order . ' ' . $filter_order_Dir;
|
||||
|
||||
$this->setState('filter.orderby',$orderby);
|
||||
|
||||
parent::populateState('a.venue', 'ASC');
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Method to get a store id based on model configuration state.
|
||||
*/
|
||||
protected function getStoreId($id = '')
|
||||
{
|
||||
|
||||
$id .= ':' . $this->getState('list.start');
|
||||
$id .= ':' . $this->getState('list.limit');
|
||||
$id .= ':' . $this->getState('filter.filter_search');
|
||||
$id .= ':' . $this->getState('filter.filter_type');
|
||||
$id .= ':' . serialize($this->getState('filter.orderby'));
|
||||
|
||||
return parent::getStoreId($id);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Build the query
|
||||
*/
|
||||
protected function getListQuery()
|
||||
{
|
||||
$app = Factory::getApplication();
|
||||
$jinput = Factory::getApplication()->input;
|
||||
$task = $jinput->getCmd('task', '');
|
||||
$itemid = $jinput->getInt('id', 0) . ':' . $jinput->getInt('Itemid', 0);
|
||||
|
||||
$params = $app->getParams();
|
||||
$settings = JemHelper::globalattribs();
|
||||
$user = JemFactory::getUser();
|
||||
|
||||
# Query
|
||||
$db = Factory::getContainer()->get('DatabaseDriver');
|
||||
$query = $db->getQuery(true);
|
||||
|
||||
$case_when_l = ' CASE WHEN ';
|
||||
$case_when_l .= $query->charLength('a.alias','!=', '0');
|
||||
$case_when_l .= ' THEN ';
|
||||
$id_l = $query->castAsChar('a.id');
|
||||
$case_when_l .= $query->concatenate(array($id_l, 'a.alias'), ':');
|
||||
$case_when_l .= ' ELSE ';
|
||||
$case_when_l .= $id_l.' END as venueslug';
|
||||
|
||||
# venue
|
||||
$query->select(
|
||||
$this->getState(
|
||||
'list.select',
|
||||
'a.*'
|
||||
)
|
||||
);
|
||||
$query->from('#__jem_venues as a');
|
||||
|
||||
$query->select(array($case_when_l));
|
||||
|
||||
###################
|
||||
## FILTER-SEARCH ##
|
||||
###################
|
||||
|
||||
# define variables
|
||||
$filter = $this->getState('filter.filter_type');
|
||||
$search = $this->getState('filter.filter_search'); // not escaped
|
||||
|
||||
if (!empty($search)) {
|
||||
if (stripos($search, 'id:') === 0) {
|
||||
$query->where('a.id = '.(int) substr($search, 3));
|
||||
} else {
|
||||
$search = $db->Quote('%'.$db->escape($search, true).'%', false); // escape once
|
||||
|
||||
if ($search && $settings->get('global_show_filter')) {
|
||||
switch ($filter) {
|
||||
# case 4 is category, so it is omitted
|
||||
|
||||
# there is no title so omit case 1
|
||||
#case 1:
|
||||
# $query->where('a.title LIKE '.$search);
|
||||
# break;
|
||||
case 2:
|
||||
$query->where('a.venue LIKE '.$search);
|
||||
break;
|
||||
case 3:
|
||||
$query->where('a.city LIKE '.$search);
|
||||
break;
|
||||
case 5:
|
||||
$query->where('a.state LIKE '.$search);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# ordering
|
||||
$orderby = $this->getState('filter.orderby');
|
||||
|
||||
if ($orderby) {
|
||||
$query->order($orderby);
|
||||
}
|
||||
|
||||
return $query;
|
||||
}
|
||||
}
|
||||
269
components/com_jem/models/weekcal.php
Normal file
269
components/com_jem/models/weekcal.php
Normal file
@ -0,0 +1,269 @@
|
||||
<?php
|
||||
/**
|
||||
* @package JEM
|
||||
* @copyright (C) 2013-2024 joomlaeventmanager.net
|
||||
* @copyright (C) 2005-2009 Christoph Lukes
|
||||
* @license https://www.gnu.org/licenses/gpl-3.0 GNU/GPL
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
use Joomla\CMS\Factory;
|
||||
|
||||
require_once __DIR__ . '/eventslist.php';
|
||||
|
||||
/**
|
||||
* Model-Calendar
|
||||
*/
|
||||
class JemModelWeekcal extends JemModelEventslist
|
||||
{
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to auto-populate the model state.
|
||||
*/
|
||||
protected function populateState($ordering = null, $direction = null)
|
||||
{
|
||||
$app = Factory::getApplication();
|
||||
$task = $app->input->getCmd('task', '');
|
||||
$params = $app->getParams();
|
||||
$top_category = $params->get('top_category', 0);
|
||||
$show_archived_events = $params->get('show_archived_events', 0);
|
||||
$startdayonly = $params->get('show_only_start', false);
|
||||
$numberOfWeeks = $params->get('nrweeks', '1');
|
||||
$firstweekday = $params->get('firstweekday', 1);
|
||||
|
||||
# params
|
||||
$this->setState('params', $params);
|
||||
|
||||
# publish state
|
||||
$this->_populatePublishState($task);
|
||||
|
||||
###########
|
||||
## DATES ##
|
||||
###########
|
||||
|
||||
#only select events within specified dates. (chosen weeknrs)
|
||||
|
||||
$config = Factory::getConfig();
|
||||
$offset = $config->get('offset');
|
||||
date_default_timezone_set($offset);
|
||||
$datetime = new DateTime();
|
||||
// If week starts Monday we use dayoffset 1, on Sunday we use 0 but 7 if today is Sunday.
|
||||
$dayoffset = ($firstweekday == 1) ? 1 : ((($firstweekday == 0) && ($datetime->format('N') == 7)) ? 7 : 0);
|
||||
$datetime->setISODate($datetime->format('Y'), $datetime->format('W'), $dayoffset);
|
||||
$filter_date_from = $datetime->format('Y-m-d');
|
||||
$datetime->modify('+'.$numberOfWeeks.' weeks'.' -1 day'); // just to be compatible to php < 5.3 ;-)
|
||||
$filter_date_to = $datetime->format('Y-m-d');
|
||||
|
||||
$where = ' DATEDIFF(IF (a.enddates IS NOT NULL, a.enddates, a.dates), ' . $this->_db->quote($filter_date_from) . ') >= 0';
|
||||
$this->setState('filter.calendar_from', $where);
|
||||
$this->setState('filter.date.from', $filter_date_from);
|
||||
|
||||
$where = ' DATEDIFF(a.dates, ' . $this->_db->quote($filter_date_to) . ') <= 0';
|
||||
$this->setState('filter.calendar_to', $where);
|
||||
$this->setState('filter.date.to', $filter_date_to);
|
||||
|
||||
##################
|
||||
## TOP-CATEGORY ##
|
||||
##################
|
||||
|
||||
if ($top_category) {
|
||||
$children = JemCategories::getChilds($top_category);
|
||||
if (count($children)) {
|
||||
$where = 'rel.catid IN ('. implode(',', $children) .')';
|
||||
$this->setState('filter.category_top', $where);
|
||||
}
|
||||
}
|
||||
|
||||
# set filter
|
||||
$this->setState('filter.calendar_startdayonly', (bool)$startdayonly);
|
||||
$this->setState('filter.groupby', 'a.id');
|
||||
$this->setState('filter.show_archived_events',(bool)$show_archived_events);
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to get a list of events.
|
||||
*/
|
||||
public function getItems()
|
||||
{
|
||||
$items = parent::getItems();
|
||||
|
||||
if ($items) {
|
||||
$items = $this->calendarMultiday($items);
|
||||
|
||||
return $items;
|
||||
}
|
||||
|
||||
return array();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return JDatabaseQuery
|
||||
*/
|
||||
protected function getListQuery()
|
||||
{
|
||||
// Let parent create a new query object.
|
||||
$query = parent::getListQuery();
|
||||
|
||||
$query->select('DATEDIFF(a.enddates, a.dates) AS datesdiff, DAYOFWEEK(a.dates) AS weekday, DAYOFMONTH(a.dates) AS start_day, YEAR(a.dates) AS start_year, MONTH(a.dates) AS start_month, WEEK(a.dates) AS weeknumber');
|
||||
|
||||
return $query;
|
||||
}
|
||||
|
||||
/**
|
||||
* create multi-day events
|
||||
*/
|
||||
protected function calendarMultiday($items)
|
||||
{
|
||||
if (empty($items)) {
|
||||
return array();
|
||||
}
|
||||
|
||||
$app = Factory::getApplication();
|
||||
$params = $app->getParams();
|
||||
$startdayonly = $this->getState('filter.calendar_startdayonly');
|
||||
|
||||
if (!$startdayonly) {
|
||||
foreach ($items as $i => $item)
|
||||
{
|
||||
if (!is_null($item->enddates) && ($item->enddates != $item->dates)) {
|
||||
$day = $item->start_day;
|
||||
$multi = array();
|
||||
|
||||
$item->multi = 'first';
|
||||
$item->multitimes = $item->times;
|
||||
$item->multiname = $item->title;
|
||||
$item->sort = 'zlast';
|
||||
|
||||
for ($counter = 0; $counter <= $item->datesdiff-1; $counter++)
|
||||
{
|
||||
# next day:
|
||||
$day++;
|
||||
$nextday = mktime(0, 0, 0, $item->start_month, $day, $item->start_year);
|
||||
|
||||
# generate days of current multi-day selection
|
||||
$multi[$counter] = clone $item;
|
||||
$multi[$counter]->dates = date('Y-m-d', $nextday);
|
||||
|
||||
if ($multi[$counter]->dates < $item->enddates) {
|
||||
$multi[$counter]->multi = 'middle';
|
||||
$multi[$counter]->multistartdate = $item->dates;
|
||||
$multi[$counter]->multienddate = $item->enddates;
|
||||
$multi[$counter]->multitimes = $item->times;
|
||||
$multi[$counter]->multiname = $item->title;
|
||||
$multi[$counter]->times = $item->times;
|
||||
$multi[$counter]->endtimes = $item->endtimes;
|
||||
$multi[$counter]->sort = 'middle';
|
||||
} elseif ($multi[$counter]->dates == $item->enddates) {
|
||||
$multi[$counter]->multi = 'zlast';
|
||||
$multi[$counter]->multistartdate = $item->dates;
|
||||
$multi[$counter]->multienddate = $item->enddates;
|
||||
$multi[$counter]->multitimes = $item->times;
|
||||
$multi[$counter]->multiname = $item->title;
|
||||
$multi[$counter]->sort = 'first';
|
||||
$multi[$counter]->times = $item->times;
|
||||
$multi[$counter]->endtimes = $item->endtimes;
|
||||
}
|
||||
} // for
|
||||
|
||||
# add generated days to data
|
||||
$items = array_merge($items, $multi);
|
||||
# unset temp array holding generated days before working on the next multiday event
|
||||
unset($multi);
|
||||
}
|
||||
} // foreach
|
||||
}
|
||||
|
||||
# Remove items out of date range
|
||||
$startdate = $this->getState('filter.date.from');
|
||||
$enddate = $this->getState('filter.date.to');
|
||||
if (empty($startdate) || empty($enddate)) {
|
||||
$config = Factory::getConfig();
|
||||
$offset = $config->get('offset');
|
||||
$firstweekday = $params->get('firstweekday', 1); // 1 = Monday, 0 = Sunday
|
||||
$numberOfWeeks = $params->get('nrweeks', '1');
|
||||
|
||||
date_default_timezone_set($offset);
|
||||
$datetime = new DateTime();
|
||||
# If week starts Monday we use dayoffset 1, on Sunday we use 0 but 7 if today is Sunday.
|
||||
$dayoffset = ($firstweekday == 1) ? 1 : ((($firstweekday == 0) && ($datetime->format('N') == 7)) ? 7 : 0);
|
||||
$datetime->setISODate($datetime->format('Y'), $datetime->format('W'), $dayoffset);
|
||||
$startdate = $datetime->format('Y-m-d');
|
||||
$datetime->modify('+'.$numberOfWeeks.' weeks'.' -1 day'); // just to be compatible to php < 5.3 ;-)
|
||||
$enddate = $datetime->format('Y-m-d');
|
||||
}
|
||||
|
||||
$check_startdate = strtotime($startdate);
|
||||
$check_enddate = strtotime($enddate);
|
||||
|
||||
foreach ($items as $index => $item) {
|
||||
$date = $item->dates;
|
||||
$date_timestamp = strtotime($date);
|
||||
|
||||
if ($date_timestamp > $check_enddate) {
|
||||
unset ($items[$index]);
|
||||
} elseif ($date_timestamp < $check_startdate) {
|
||||
unset ($items[$index]);
|
||||
}
|
||||
}
|
||||
|
||||
# Do we still have events? Return if not.
|
||||
if (empty($items)) {
|
||||
return array();
|
||||
}
|
||||
|
||||
# Sort the items
|
||||
foreach ($items as $item) {
|
||||
$time[] = $item->times;
|
||||
$title[] = $item->title;
|
||||
// $id[] = $item->id;
|
||||
// $dates[] = $item->dates;
|
||||
$multi[] = (isset($item->multi) ? $item->multi : false);
|
||||
$multitime[] = (isset($item->multitime) ? $item->multitime : false);
|
||||
$multititle[] = (isset($item->multititle) ? $item->multititle : false);
|
||||
$sort[] = (isset($item->sort) ? $item->sort : 'zlast');
|
||||
}
|
||||
|
||||
array_multisort($sort, SORT_ASC, $multitime, $multititle, $time, SORT_ASC, $title, $items);
|
||||
|
||||
return $items;
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to get the Currentweek
|
||||
*
|
||||
* Info MYSQL WEEK
|
||||
* @link https://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html#function_week
|
||||
*/
|
||||
public function getCurrentweek()
|
||||
{
|
||||
if (!isset($this->_currentweek)) {
|
||||
$app = Factory::getApplication();
|
||||
$params = $app->getParams('com_jem');
|
||||
$weekday = $params->get('firstweekday', 1); // 1 = Monday, 0 = Sunday
|
||||
|
||||
if ($weekday == 1) {
|
||||
$number = 3; // Monday, with more than 3 days this year
|
||||
} else {
|
||||
$number = 6; // Sunday, with more than 3 days this year
|
||||
}
|
||||
|
||||
$today = Date("Y-m-d");
|
||||
$query = 'SELECT WEEK(\''.$today.'\','.$number.')' ;
|
||||
|
||||
$this->_db->setQuery($query);
|
||||
$this->_currentweek = $this->_db->loadResult();
|
||||
}
|
||||
|
||||
return $this->_currentweek;
|
||||
}
|
||||
}
|
||||
?>
|
||||
163
components/com_jem/router.php
Normal file
163
components/com_jem/router.php
Normal file
@ -0,0 +1,163 @@
|
||||
<?php
|
||||
/**
|
||||
* @package JEM
|
||||
* @copyright (C) 2013-2024 joomlaeventmanager.net
|
||||
* @copyright (C) 2005-2009 Christoph Lukes
|
||||
* @license https://www.gnu.org/licenses/gpl-3.0 GNU/GPL
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
use Joomla\CMS\Component\Router\RouterBase;
|
||||
use Joomla\CMS\Application\CMSApplication;
|
||||
|
||||
use Joomla\CMS\Component\Router\RouterView;
|
||||
use Joomla\CMS\Component\Router\RouterViewConfiguration;
|
||||
use Joomla\CMS\Component\Router\Rules\MenuRules;
|
||||
// use Joomla\CMS\Component\Router\Rules\NomenuRules;
|
||||
// use Joomla\Component\Jem\Site\Service\JemNomenuRules as NomenuRules;
|
||||
use Joomla\CMS\Component\Router\Rules\StandardRules;
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Menu\AbstractMenu;
|
||||
|
||||
require_once (JPATH_SITE.'/components/com_jem/services/JemNomenuRules.php');
|
||||
|
||||
class JemRouter extends RouterView
|
||||
{
|
||||
/**
|
||||
* Router segments.
|
||||
*
|
||||
* @var array
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
protected $_segments = array();
|
||||
|
||||
/**
|
||||
* Router ids.
|
||||
*
|
||||
* @var array
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
protected $_ids = array();
|
||||
|
||||
/**
|
||||
* Router constructor.
|
||||
*
|
||||
* @param CMSApplication $app The application object.
|
||||
* @param AbstractMenu $menu The menu object to work with.
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function __construct($app = null, $menu = null)
|
||||
{
|
||||
|
||||
// calendar route
|
||||
$calendar = new RouterViewConfiguration('calendar');
|
||||
$calendar->setKey('id');
|
||||
$this->registerView($calendar);
|
||||
|
||||
// eventslist route
|
||||
$eventslist = new RouterViewConfiguration('eventslist');
|
||||
$eventslist->setKey('id');
|
||||
$this->registerView($eventslist);
|
||||
|
||||
// event route
|
||||
$event = new RouterViewConfiguration('event');
|
||||
$event->setKey('id');
|
||||
$this->registerView($event);
|
||||
|
||||
// categories route
|
||||
$categories = new RouterViewConfiguration('categories');
|
||||
$categories->setKey('id');
|
||||
$this->registerView($categories);
|
||||
|
||||
// category route
|
||||
$category = new RouterViewConfiguration('category');
|
||||
$category->setKey('id');
|
||||
$this->registerView($category);
|
||||
|
||||
// attendees route
|
||||
$attendees = new RouterViewConfiguration('attendees');
|
||||
$attendees->setKey('id');
|
||||
$this->registerView($attendees);
|
||||
|
||||
// day route
|
||||
$day = new RouterViewConfiguration('day');
|
||||
$day->setKey('id');
|
||||
$this->registerView($day);
|
||||
|
||||
// editevent route
|
||||
$editevent = new RouterViewConfiguration('editevent');
|
||||
$editevent->setKey('id');
|
||||
$this->registerView($editevent);
|
||||
|
||||
// editvenue route
|
||||
$editvenue = new RouterViewConfiguration('editvenue');
|
||||
$editvenue->setKey('id');
|
||||
$this->registerView($editvenue);
|
||||
|
||||
// myattendances route
|
||||
$myattendances = new RouterViewConfiguration('myattendances');
|
||||
$myattendances->setKey('id');
|
||||
$this->registerView($myattendances);
|
||||
|
||||
// myevents route
|
||||
$myevents = new RouterViewConfiguration('myevents');
|
||||
$myevents->setKey('id');
|
||||
$this->registerView($myevents);
|
||||
|
||||
// myvenues route
|
||||
$myvenues = new RouterViewConfiguration('myvenues');
|
||||
$myvenues->setKey('id');
|
||||
$this->registerView($myvenues);
|
||||
|
||||
// search route
|
||||
$search = new RouterViewConfiguration('search');
|
||||
$search->setKey('id');
|
||||
$this->registerView($search);
|
||||
|
||||
// venue route
|
||||
$venue = new RouterViewConfiguration('venue');
|
||||
$venue->setKey('id');
|
||||
$this->registerView($venue);
|
||||
|
||||
// venueslist route
|
||||
$venueslist = new RouterViewConfiguration('venueslist');
|
||||
$venueslist->setKey('id');
|
||||
$this->registerView($venueslist);
|
||||
|
||||
// venues route
|
||||
$venues = new RouterViewConfiguration('venues');
|
||||
$venues->setKey('id');
|
||||
$this->registerView($venues);
|
||||
|
||||
// weekcal route
|
||||
$weekcal = new RouterViewConfiguration('weekcal');
|
||||
$weekcal->setKey('id');
|
||||
$this->registerView($weekcal);
|
||||
|
||||
parent::__construct($app, $menu);
|
||||
|
||||
$this->attachRule(new MenuRules($this));
|
||||
$this->attachRule(new StandardRules($this));
|
||||
$this->attachRule(new JemNomenuRules($this));
|
||||
}
|
||||
}
|
||||
function jemBuildRoute(&$query)
|
||||
{
|
||||
$app = Factory::getApplication();
|
||||
|
||||
$router = new JemRouter($app, $app->getMenu());
|
||||
|
||||
return $router->build($query);
|
||||
}
|
||||
|
||||
function jemParseRoute($segments)
|
||||
{
|
||||
$app = Factory::getApplication();
|
||||
$router = new JemRouter($app, $app->getMenu());
|
||||
return $router->parse($segments);
|
||||
}
|
||||
?>
|
||||
265
components/com_jem/services/JemNomenuRules.php
Normal file
265
components/com_jem/services/JemNomenuRules.php
Normal file
@ -0,0 +1,265 @@
|
||||
<?php
|
||||
/**
|
||||
* Joomla! Content Management System
|
||||
*
|
||||
* @copyright Copyright (C) 2005 - 2019 Open Source Matters, Inc. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
|
||||
defined('JPATH_PLATFORM') or die;
|
||||
|
||||
use Joomla\CMS\Component\Router\RouterView;
|
||||
use Joomla\CMS\Component\Router\Rules\RulesInterface;
|
||||
|
||||
/**
|
||||
* Rule to process URLs without a menu item
|
||||
*
|
||||
* @since 3.4
|
||||
*/
|
||||
class JemNomenuRules implements RulesInterface
|
||||
{
|
||||
/**
|
||||
* Router this rule belongs to
|
||||
*
|
||||
* @var RouterView
|
||||
* @since 3.4
|
||||
*/
|
||||
protected $router;
|
||||
|
||||
/**
|
||||
* Class constructor.
|
||||
*
|
||||
* @param RouterView $router Router this rule belongs to
|
||||
*
|
||||
* @since 3.4
|
||||
*/
|
||||
public function __construct(RouterView $router)
|
||||
{
|
||||
$this->router = $router;
|
||||
}
|
||||
|
||||
/**
|
||||
* Dummymethod to fullfill the interface requirements
|
||||
*
|
||||
* @param array &$query The query array to process
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @since 3.4
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
public function preprocess(&$query)
|
||||
{
|
||||
if(isset($query['Itemid'])) {
|
||||
$itmid = is_array($query['Itemid']) ? array_values($query['Itemid']) : $query['Itemid'];
|
||||
$query['Itemid'] = is_array($itmid) ? $itmid[0] : $itmid;
|
||||
}
|
||||
|
||||
// echo "preprocess <pre/>";print_R($query);die;
|
||||
$test = 'Test';
|
||||
}
|
||||
|
||||
/**
|
||||
* Parse a menu-less URL
|
||||
*
|
||||
* @param array &$segments The URL segments to parse
|
||||
* @param array &$vars The vars that result from the segments
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @since 3.4
|
||||
*/
|
||||
public function parse(&$segments, &$vars)
|
||||
{
|
||||
|
||||
// Count segments
|
||||
$count = count($segments);
|
||||
|
||||
|
||||
// echo "<pre/>";print_r($segments);die;
|
||||
//with this url: https://localhost/j4x/my-walks/mywalk-n/walk-title.html
|
||||
// segments: [[0] => mywalk-n, [1] => walk-title]
|
||||
// vars: [[option] => com_mywalks, [view] => mywalks, [id] => 0]
|
||||
|
||||
// $vars['view'] = 'mywalk';
|
||||
// $vars['id'] = substr($segments[0], strpos($segments[0], '-') + 1);
|
||||
// array_shift($segments);
|
||||
|
||||
// array_shift($segments);
|
||||
// $vars['option']='com_jem';
|
||||
switch ($segments[0])
|
||||
{
|
||||
case 'category':
|
||||
{
|
||||
if ($count == 2) {
|
||||
$id = explode(':', $segments[1]);
|
||||
$vars['view'] = 'category';
|
||||
$vars['id'] = $id[0];
|
||||
} else {
|
||||
$vars['view'] = 'category';
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case 'event':
|
||||
{
|
||||
|
||||
if ($count == 2) {
|
||||
$id = explode(':', $segments[1]);
|
||||
$vars['id'] = $id[0];
|
||||
$vars['view'] = 'event';
|
||||
} else {
|
||||
$vars['view'] = 'event';
|
||||
}
|
||||
|
||||
}
|
||||
break;
|
||||
|
||||
case 'venue':
|
||||
{
|
||||
if ($count == 2) {
|
||||
$id = explode(':', $segments[1]);
|
||||
$vars['id'] = $id[0];
|
||||
$vars['view'] = 'venue';
|
||||
} else {
|
||||
$vars['view'] = 'venue';
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case 'editvenue':
|
||||
{
|
||||
$vars['view'] = 'editvenue';
|
||||
if ($count == 2) {
|
||||
$vars['id'] = $segments[1];
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case 'eventslist':
|
||||
{
|
||||
$vars['view'] = 'eventslist';
|
||||
}
|
||||
break;
|
||||
|
||||
case 'search':
|
||||
{
|
||||
$vars['view'] = 'search';
|
||||
}
|
||||
break;
|
||||
|
||||
case 'categoriesdetailed':
|
||||
{
|
||||
$vars['view'] = 'categoriesdetailed';
|
||||
}
|
||||
break;
|
||||
|
||||
case 'categories':
|
||||
{
|
||||
if ($count == 2) {
|
||||
$id = explode(':', $segments[1]);
|
||||
$vars['id'] = $id[0];
|
||||
}
|
||||
$vars['view'] = 'categories';
|
||||
}
|
||||
break;
|
||||
|
||||
case 'calendar':
|
||||
{
|
||||
// $id = explode(':', $segments[1]);
|
||||
// $vars['id'] = $id[0];
|
||||
$vars['view'] = 'calendar';
|
||||
}
|
||||
break;
|
||||
|
||||
case 'venues':
|
||||
{
|
||||
$vars['view'] = 'venues';
|
||||
}
|
||||
break;
|
||||
|
||||
case 'venueslist':
|
||||
{
|
||||
$vars['view'] = 'venueslist';
|
||||
}
|
||||
break;
|
||||
case 'day':
|
||||
{
|
||||
$vars['view'] = 'day';
|
||||
if ($count == 2) {
|
||||
$vars['id'] = $segments[1];
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case 'myattendances':
|
||||
{
|
||||
$vars['view'] = 'myattendances';
|
||||
}
|
||||
break;
|
||||
|
||||
case 'myevents':
|
||||
{
|
||||
$vars['view'] = 'myevents';
|
||||
}
|
||||
break;
|
||||
|
||||
case 'myvenues':
|
||||
{
|
||||
$vars['view'] = 'myvenues';
|
||||
}
|
||||
break;
|
||||
|
||||
case 'attendees':
|
||||
{
|
||||
if(isset($segments[1])){
|
||||
$id = explode(':', $segments[1]);
|
||||
$vars['id'] = $id[0];
|
||||
}
|
||||
$vars['view'] = 'attendees';
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
{
|
||||
$vars['view'] = $segments[0];
|
||||
}
|
||||
break;
|
||||
}
|
||||
array_shift($segments);
|
||||
|
||||
array_shift($segments);
|
||||
}
|
||||
|
||||
/**
|
||||
* Build a menu-less URL
|
||||
*
|
||||
* @param array &$query The vars that should be converted
|
||||
* @param array &$segments The URL segments to create
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @since 3.4
|
||||
*/
|
||||
public function build(&$query, &$segments)
|
||||
{
|
||||
// $itmid = is_array($query['Itemid']) ? array_values($query['Itemid']) : $query['Itemid'] ;
|
||||
|
||||
// $query['Itemid']= is_array($itmid) ? $itmid[0] : $itmid;
|
||||
if(isset($query['view'],$query['id'])){
|
||||
$segments[] =$query['view'];
|
||||
$segments[] =$query['id'];
|
||||
unset($query['view'],$query['tmpl'],$query['id'],$query['Itemid']);
|
||||
}else
|
||||
if (isset($query['view'])) {
|
||||
$segments[] = $query['view'];
|
||||
unset($query['view']);
|
||||
}else
|
||||
|
||||
if (isset($query['id'])) {
|
||||
$segments[] = $query['id'];
|
||||
unset($query['id']);
|
||||
};
|
||||
}
|
||||
}
|
||||
1
components/com_jem/views/attendees/index.html
Normal file
1
components/com_jem/views/attendees/index.html
Normal file
@ -0,0 +1 @@
|
||||
<!DOCTYPE html><title></title>
|
||||
162
components/com_jem/views/attendees/tmpl/addusers.php
Normal file
162
components/com_jem/views/attendees/tmpl/addusers.php
Normal file
@ -0,0 +1,162 @@
|
||||
<?php
|
||||
/**
|
||||
* @package JEM
|
||||
* @copyright (C) 2013-2024 joomlaeventmanager.net
|
||||
* @copyright (C) 2005-2009 Christoph Lukes
|
||||
* @license https://www.gnu.org/licenses/gpl-3.0 GNU/GPL
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\HTML\HTMLHelper;
|
||||
use Joomla\CMS\Router\Route;
|
||||
use Joomla\CMS\Session\Session;
|
||||
use Joomla\CMS\Form\Form;
|
||||
|
||||
$function = Factory::getApplication()->input->getCmd('function', 'jSelectUsers');
|
||||
$checked = 0;
|
||||
|
||||
HTMLHelper::addIncludePath(JPATH_COMPONENT_ADMINISTRATOR.'/helpers/html');
|
||||
|
||||
// Get the form.
|
||||
Form::addFormPath(JPATH_COMPONENT . '/models/forms');
|
||||
$form = Form::getInstance('com_jem.addusers', 'addusers');
|
||||
|
||||
if (empty($form)) {
|
||||
return false;
|
||||
}
|
||||
?>
|
||||
|
||||
<script>
|
||||
function tableOrdering( order, dir, view )
|
||||
{
|
||||
var form = document.getElementById("adminForm");
|
||||
|
||||
form.filter_order.value = order;
|
||||
form.filter_order_Dir.value = dir;
|
||||
form.submit( view );
|
||||
}
|
||||
</script>
|
||||
<script>
|
||||
function checkList(form)
|
||||
{
|
||||
var r='', i, n, e;
|
||||
for (i=0, n=form.elements.length; i<n; i++)
|
||||
{
|
||||
e = form.elements[i];
|
||||
if (e.type == 'checkbox' && e.id.indexOf('cb') === 0 && e.checked)
|
||||
{
|
||||
if (r) { r += ','; }
|
||||
r += e.value;
|
||||
}
|
||||
}
|
||||
return r;
|
||||
}
|
||||
</script>
|
||||
|
||||
<div id="jem" class="jem_select_users">
|
||||
<h1 class='componentheading'>
|
||||
<?php echo Text::_('COM_JEM_SELECT_USERS_AND_STATUS'); ?>
|
||||
</h1>
|
||||
|
||||
|
||||
|
||||
<div class="clr"></div>
|
||||
|
||||
<form action="<?php echo Route::_('index.php?option=com_jem&view=attendees&layout=addusers&tmpl=component&function='.$this->escape($function).'&id='.$this->event->id.'&'.Session::getFormToken().'=1'); ?>" method="post" name="adminForm" id="adminForm">
|
||||
|
||||
<?php if(1) : ?>
|
||||
<div id="jem_filter" class="floattext">
|
||||
<div class="jem_fleft">
|
||||
<?php
|
||||
echo '<label for="filter_type">'.Text::_('COM_JEM_FILTER').'</label> ';
|
||||
echo $this->searchfilter.' ';
|
||||
?>
|
||||
<input type="text" name="filter_search" id="filter_search" value="<?php echo $this->lists['search']; ?>" class="inputbox" onChange="document.adminForm.submit();" />
|
||||
<button type="submit" class="pointer btn btn-primary"><?php echo Text::_('JSEARCH_FILTER_SUBMIT'); ?></button>
|
||||
<button type="button" class="pointer btn btn-secondary" onclick="document.getElementById('filter_search').value='';this.form.submit();"><?php echo Text::_('JSEARCH_FILTER_CLEAR'); ?></button>
|
||||
</div>
|
||||
<div class="jem_fright">
|
||||
<?php
|
||||
echo '<label for="limit">'.Text::_('COM_JEM_DISPLAY_NUM').'</label> ';
|
||||
echo $this->pagination->getLimitBox();
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<table class="eventtable table table-striped" style="width:100%" summary="jem">
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="1%" class="sectiontableheader"><?php echo Text::_('COM_JEM_NUM'); ?></th>
|
||||
<th width="1%" class="center"><input type="checkbox" name="checkall-toggle" value="" title="<?php echo Text::_('JGLOBAL_CHECK_ALL'); ?>" onclick="Joomla.checkAll(this)" /></th>
|
||||
<th align="left" class="sectiontableheader"><?php echo Text::_('COM_JEM_NAME'); ?></th>
|
||||
<th width="10%" class="center"><?php echo Text::_('COM_JEM_STATUS'); ?></th>
|
||||
<th width="10%" class="center"><?php echo Text::_('COM_JEM_PLACES'); ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php if (empty($this->rows)) : ?>
|
||||
<tr align="center"><td colspan="0"><?php echo Text::_('COM_JEM_NOUSERS'); ?></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 class="center"><?php echo HTMLHelper::_('grid.id', $i, $row->id); ?></td>
|
||||
<td align="left"><?php echo $this->escape($row->name); ?></td>
|
||||
<td class="center"><?php echo jemhtml::toggleAttendanceStatus(0, $row->status, false); ?></td>
|
||||
<td class="center"><?php echo $this->escape($row->places); ?></td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
<?php endif; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<?php
|
||||
if($this->event->maxbookeduser != 0)
|
||||
{
|
||||
$placesavailableuser = $this->event->maxbookeduser;
|
||||
}else{
|
||||
$placesavailableuser= null;
|
||||
}
|
||||
?>
|
||||
|
||||
<div class="jem-row jem-justify-start valign-baseline">
|
||||
<div class="choose-status">
|
||||
<?php echo Text::_('COM_JEM_SELECT');?> <?php echo $form->getLabel('status'); ?> <?php echo $form->getInput('status'); ?>
|
||||
</div>
|
||||
<div class="choose-places">
|
||||
<?php echo Text::_('COM_JEM_SELECT');?> <?php echo Text::_('COM_JEM_PLACES'); ?>
|
||||
</div>
|
||||
<div style="padding-right:10px;">
|
||||
<input id="places" name="places" type="number" style="text-align: center; width:auto;" value="<?php echo $this->event->minbookeduser; ?>" max="<?php echo ($placesavailableuser > 0 ? $placesavailableuser : ($placesavailableuser ?? '')); ?>" min="<?php echo $this->event->minbookeduser; ?>">
|
||||
</div>
|
||||
<?php if ($this->event->recurrence_type && $this->event->seriesbooking): ?>
|
||||
<div class="choose-places">
|
||||
<?php echo Text::_('COM_JEM_SERIES_BOOKED').':'; ?>
|
||||
<input type="checkbox" id="seriesbooking" name="seriesbooking" />
|
||||
</div>
|
||||
<?php else : ?>
|
||||
<input type="hidden" name="seriesbooking" value=-1 />
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
||||
<input type="hidden" name="task" value="selectusers" />
|
||||
<input type="hidden" name="option" value="com_jem" />
|
||||
<input type="hidden" name="tmpl" value="component" />
|
||||
<input type="hidden" name="function" value="<?php echo $this->escape($function); ?>" />
|
||||
<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="<?php echo $checked; ?>" />
|
||||
</form>
|
||||
<div class="jem_fright">
|
||||
<button type="button" class="pointer btn btn-primary" onclick="if (window.parent) window.parent.<?php echo $this->escape($function);?>_newusers(checkList(document.adminForm), document.adminForm.boxchecked.value, document.adminForm.status.value, document.adminForm.places.value, <?php echo $this->event->id; ?>, document.adminForm.seriesbooking.value, '<?php echo Session::getFormToken(); ?>');">
|
||||
<?php echo Text::_('COM_JEM_SAVE'); ?>
|
||||
</button>
|
||||
</div>
|
||||
<div class="pagination">
|
||||
<?php echo $this->pagination->getPagesLinks(); ?>
|
||||
</div>
|
||||
</div>
|
||||
253
components/com_jem/views/attendees/tmpl/alternative/default.php
Normal file
253
components/com_jem/views/attendees/tmpl/alternative/default.php
Normal file
@ -0,0 +1,253 @@
|
||||
<?php
|
||||
/**
|
||||
* @version 2.3.6
|
||||
* @package JEM
|
||||
* @copyright (C) 2013-2022 joomlaeventmanager.net
|
||||
* @copyright (C) 2005-2009 Christoph Lukes
|
||||
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
JHtml::_('behavior.tooltip');
|
||||
|
||||
JHtml::addIncludePath(JPATH_COMPONENT_ADMINISTRATOR.'/helpers/html');
|
||||
|
||||
$colspan = ($this->event->waitinglist ? 10 : 9);
|
||||
|
||||
$detaillink = JRoute::_(JemHelperRoute::getEventRoute($this->event->id.':'.$this->event->alias));
|
||||
|
||||
$namefield = $this->settings->get('global_regname', '1') ? 'name' : 'username';
|
||||
$namelabel = $this->settings->get('global_regname', '1') ? 'COM_JEM_NAME' : 'COM_JEM_USERNAME';
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
function tableOrdering(order, dir, view)
|
||||
{
|
||||
var form = document.getElementById("adminForm");
|
||||
|
||||
form.filter_order.value = order;
|
||||
form.filter_order_Dir.value = dir;
|
||||
form.submit(view);
|
||||
}
|
||||
</script>
|
||||
<script type="text/javascript">
|
||||
function fullOrdering(id, view)
|
||||
{
|
||||
var form = document.getElementById("adminForm");
|
||||
var field = form.getElementById(id);
|
||||
var parts = field.value.split(' ');
|
||||
|
||||
if (parts.length > 1) {
|
||||
form.filter_order.value = parts[0];
|
||||
form.filter_order_Dir.value = parts[1];
|
||||
}
|
||||
form.submit(view);
|
||||
}
|
||||
</script>
|
||||
<script type="text/javascript">
|
||||
function jSelectUsers_newusers(ids, count, status, eventid, token) {
|
||||
document.location.href = 'index.php?option=com_jem&task=attendees.attendeeadd&id='+eventid+'&status='+status+'&uids='+ids+'&'+token+'=1';
|
||||
SqueezeBox.close();
|
||||
}
|
||||
</script>
|
||||
|
||||
<?php
|
||||
$sort_by = array();
|
||||
if ($this->settings->get('global_regname', '1')) {
|
||||
$sort_by[] = JHtml::_('select.option', 'u.name ASC', JText::_('COM_JEM_NAME') . ' ' . JText::_('COM_JEM_ORDER_ASCENDING'));
|
||||
$sort_by[] = JHtml::_('select.option', 'u.name DESC', JText::_('COM_JEM_NAME') . ' ' . JText::_('COM_JEM_ORDER_DESCENDING'));
|
||||
} else {
|
||||
$sort_by[] = JHtml::_('select.option', 'u.username ASC', JText::_('COM_JEM_USERNAME') . ' ' . JText::_('COM_JEM_ORDER_ASCENDING'));
|
||||
$sort_by[] = JHtml::_('select.option', 'u.username DESC', JText::_('COM_JEM_USERNAME') . ' ' . JText::_('COM_JEM_ORDER_DESCENDING'));
|
||||
}
|
||||
$sort_by[] = JHtml::_('select.option', 'r.uregdate ASC', JText::_('COM_JEM_REGDATE') . ' ' . JText::_('COM_JEM_ORDER_ASCENDING'));
|
||||
$sort_by[] = JHtml::_('select.option', 'r.uregdate DESC', JText::_('COM_JEM_REGDATE') . ' ' . JText::_('COM_JEM_ORDER_DESCENDING'));
|
||||
$sort_by[] = JHtml::_('select.option', 'r.status ASC', JText::_('COM_JEM_STATUS') . ' ' . JText::_('COM_JEM_ORDER_ASCENDING'));
|
||||
$sort_by[] = JHtml::_('select.option', 'r.status DESC', JText::_('COM_JEM_STATUS') . ' ' . JText::_('COM_JEM_ORDER_DESCENDING'));
|
||||
|
||||
$this->lists['sort_by'] = JHtml::_('select.genericlist', $sort_by, 'sort_by', array('size'=>'1','class'=>'inputbox','onchange'=>'fullOrdering(\'sort_by\', \'\');'), 'value', 'text', $this->lists['order'] . ' ' . $this->lists['order_Dir']);
|
||||
?>
|
||||
|
||||
<div id="jem" class="jem_attendees<?php echo $this->pageclass_sfx;?>">
|
||||
<div class="buttons">
|
||||
<?php
|
||||
$permissions = new stdClass();
|
||||
$permissions->canAddUsers = true;
|
||||
$btn_params = array('print_link' => $this->print_link, 'id' => $this->event->id);
|
||||
echo JemOutput::createButtonBar($this->getName(), $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; ?>
|
||||
|
||||
<div class="clr"></div>
|
||||
|
||||
<?php if ($this->params->get('showintrotext')) : ?>
|
||||
<div class="description no_space floattext">
|
||||
<?php echo $this->params->get('introtext'); ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<h2><?php echo $this->escape($this->event->title); ?></h2>
|
||||
|
||||
<form action="<?php echo htmlspecialchars($this->action); ?>" method="post" name="adminForm" id="adminForm">
|
||||
<div>
|
||||
<b><?php echo JText::_('COM_JEM_TITLE').':'; ?></b>
|
||||
<a href="<?php echo $detaillink ; ?>"><?php echo $this->escape($this->event->title); ?></a>
|
||||
<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, $this->settings->get('global_show_timedetails', 1)); ?>
|
||||
<?php
|
||||
$g_reg = $this->jemsettings->showfroregistra;
|
||||
$e_reg = $this->event->registra;
|
||||
if (($g_reg < 1) || (($g_reg == 2) && (($e_reg & 1) == 0))) :
|
||||
?>
|
||||
<br />
|
||||
<br />
|
||||
<b><?php echo JHtml::_('image', 'com_jem/icon-16-warning.png', null, 'class="icon-inline-left"', true) . JText::_('COM_JEM_REGISTRATION_DISABLED'); ?></b><br />
|
||||
<?php echo JText::_(($g_reg < 1) ? 'COM_JEM_REGISTRATION_DISABLED_GLOBAL_HINT' : 'COM_JEM_REGISTRATION_DISABLED_EVENT_HINT'); ?>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
||||
<?php if (empty($this->rows)) : ?>
|
||||
|
||||
<div class="eventtable">
|
||||
<strong><i><?php echo JText::_('COM_JEM_ATTENDEES_EMPTY_YET'); ?></i></strong>
|
||||
</div>
|
||||
|
||||
<?php else : /* empty($this->rows) */ ?>
|
||||
|
||||
<div id="jem_filter" class="floattext">
|
||||
<div class="jem_fleft">
|
||||
<label for="filter"><?php echo JText::_('COM_JEM_SEARCH'); ?></label>
|
||||
<?php echo $this->lists['filter'].' '; ?>
|
||||
<input type="text" name="filter_search" id="filter_search" value="<?php echo $this->lists['search']; ?>" class="inputbox" onChange="document.adminForm.submit();" />
|
||||
<button class="buttonfilter" type="submit"><?php echo JText::_('JSEARCH_FILTER_SUBMIT'); ?></button>
|
||||
<button class="buttonfilter" type="button" onclick="document.id('filter_search').value='';this.form.submit();"><?php echo JText::_('JSEARCH_FILTER_CLEAR'); ?></button>
|
||||
|
||||
</div>
|
||||
<div class="jem_fleft" style="white-space:nowrap;">
|
||||
<?php echo JText::_('COM_JEM_STATUS').' '.$this->lists['status']; ?>
|
||||
</div>
|
||||
<div class="jem_fright">
|
||||
<label for="sort_by"><?php echo JText::_('COM_JEM_ORDERING'); ?></label>
|
||||
<?php echo $this->lists['sort_by'].' '; ?>
|
||||
<label for="limit"><?php echo JText::_('COM_JEM_DISPLAY_NUM'); ?></label>
|
||||
<?php echo $this->pagination->getLimitBox(); ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php $del_link = 'index.php?option=com_jem&view=attendees&task=attendees.attendeeremove&id='.$this->event->id.(!empty($this->item->id)?'&Itemid='.$this->item->id:'').'&'.JSession::getFormToken().'=1'; ?>
|
||||
|
||||
<?php
|
||||
$default_span = array('number' => 1, 'user' => 2, 'email' => 2, 'date' => 2, 'status' => 1, 'comment' => 2, 'remove' => 2);
|
||||
$a_span = array('number' => $default_span['number'], 'user' => $default_span['user']); // always shown
|
||||
if ($this->enableemailaddress == 1) {
|
||||
$a_span['email'] = $default_span['email'];
|
||||
}
|
||||
$a_span['date'] = $default_span['date']; // always shown
|
||||
$a_span['status'] = $default_span['status']; // always shown
|
||||
if (!empty($this->jemsettings->regallowcomments)) {
|
||||
$a_span['comment'] = $default_span['comment'];
|
||||
}
|
||||
$a_span['remove'] = $default_span['remove']; // always shown
|
||||
$total = array_sum($a_span);
|
||||
while ($total < 12) {
|
||||
if (array_key_exists('comment', $a_span)) {
|
||||
++$a_span['comment'];
|
||||
++$total;
|
||||
}
|
||||
if ($total < 12 && ($a_span['date'] <= $default_span['date'])) {
|
||||
++$a_span['date'];
|
||||
++$total;
|
||||
}
|
||||
if (($total < 12) && array_key_exists('user', $a_span)) {
|
||||
++$a_span['user'];
|
||||
++$total;
|
||||
}
|
||||
if (($total < 12) && array_key_exists('email', $a_span)) {
|
||||
++$a_span['email'];
|
||||
++$total;
|
||||
}
|
||||
} // while
|
||||
?>
|
||||
<div class="eventtable">
|
||||
<div class="row-fluid sectiontableheader">
|
||||
<div class="span<?php echo $a_span['number']; ?>"><?php echo JText::_('COM_JEM_NUM'); ?></div>
|
||||
<div class="span<?php echo $a_span['user']; ?>"><?php echo JText::_($namelabel); ?></div>
|
||||
<?php if (array_key_exists('email', $a_span)) : ?>
|
||||
<div class="span<?php echo $a_span['email']; ?>"><?php echo JText::_('COM_JEM_EMAIL'); ?></div>
|
||||
<?php endif; ?>
|
||||
<div class="span<?php echo $a_span['date']; ?>"><?php echo JText::_('COM_JEM_REGDATE'); ?></div>
|
||||
<div class="span<?php echo $a_span['status']; ?>"><?php echo JText::_('COM_JEM_STATUS'); ?></div>
|
||||
<?php if (array_key_exists('comment', $a_span)) : ?>
|
||||
<div class="span<?php echo $a_span['comment']; ?>"><?php echo JText::_('COM_JEM_COMMENT'); ?></div>
|
||||
<?php endif; ?>
|
||||
<div class="span<?php echo $a_span['remove']; ?>"><?php echo JText::_('COM_JEM_REMOVE_USER'); ?></div>
|
||||
</div>
|
||||
<?php foreach ($this->rows as $i => $row) : ?>
|
||||
<div class="row-fluid sectiontableentry<?php echo $this->params->get('pageclass_sfx'); ?>">
|
||||
<div class="span<?php echo $a_span['number']; ?> number"><?php echo $this->pagination->getRowOffset($i); ?></div>
|
||||
<div class="span<?php echo $a_span['user']; ?> user">
|
||||
<?php echo $row->$namefield; ?>
|
||||
</div>
|
||||
<?php if (array_key_exists('email', $a_span)) : ?>
|
||||
<div class="span<?php echo $a_span['email']; ?> email">
|
||||
<a href="mailto:<?php echo $row->email; ?>"><?php echo $row->email; ?></a>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<div class="span<?php echo $a_span['date']; ?> date">
|
||||
<?php if (!empty($row->uregdate)) { echo JHtml::_('date', $row->uregdate, JText::_('DATE_FORMAT_LC2')); } ?>
|
||||
</div>
|
||||
<div class="span<?php echo $a_span['status']; ?> status">
|
||||
<?php
|
||||
$status = (int)$row->status;
|
||||
if ($status === 1 && $row->waiting == 1) { $status = 2; }
|
||||
echo JHtml::_('jemhtml.toggleAttendanceStatus', $row->id, $status, true);
|
||||
?><span class="info-text"><?php
|
||||
echo JHtml::_('jemhtml.getAttendanceStatusText', $row->id, $status, false, true);
|
||||
?></span>
|
||||
</div>
|
||||
<?php if (array_key_exists('comment', $a_span)) : ?>
|
||||
<div class="span<?php echo $a_span['comment']; ?> comment">
|
||||
<?php $cmnt = (\Joomla\String\StringHelper::strlen($row->comment) > 16) ? (\Joomla\String\StringHelper::substr($row->comment, 0, 14).'…') : $row->comment; ?>
|
||||
<?php if (!empty($cmnt)) { echo JHtml::_('tooltip', $row->comment, null, null, $cmnt, null, null); } ?>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
<div class="span<?php echo $a_span['remove']; ?> remove">
|
||||
<a href="<?php echo JRoute::_($del_link.'&cid[]='.$row->id); ?>"><?php
|
||||
echo JHtml::_('image','com_jem/publish_r.png', JText::_('COM_JEM_ATTENDEES_DELETE'), array('title' => JText::_('COM_JEM_ATTENDEES_DELETE'), 'class' => (version_compare(JVERSION, '3.3', 'lt')) ? 'hasTip' : 'hasTooltip'), true);
|
||||
?></a><span class="info-text"><?php
|
||||
echo JText::_('COM_JEM_ATTENDEES_DELETE');
|
||||
?></span>
|
||||
</div>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
|
||||
<?php endif; /* empty($this->rows) */ ?>
|
||||
|
||||
<?php echo JHtml::_('form.token'); ?>
|
||||
<input type="hidden" name="option" value="com_jem" />
|
||||
<input type="hidden" name="boxchecked" value="0" />
|
||||
<input type="hidden" name="task" value="" />
|
||||
<input type="hidden" name="view" value="attendees" />
|
||||
<input type="hidden" name="id" value="<?php echo $this->event->id; ?>" />
|
||||
<input type="hidden" name="Itemid" value="<?php echo $this->item->id;?>" />
|
||||
<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="enableemailaddress" value="<?php echo $this->enableemailaddress; ?>" />
|
||||
</form>
|
||||
|
||||
<div class="pagination">
|
||||
<?php echo $this->pagination->getPagesLinks(); ?>
|
||||
</div>
|
||||
|
||||
<div class="copyright">
|
||||
<?php echo JemOutput::footer(); ?>
|
||||
</div>
|
||||
</div>
|
||||
188
components/com_jem/views/attendees/tmpl/default.php
Normal file
188
components/com_jem/views/attendees/tmpl/default.php
Normal file
@ -0,0 +1,188 @@
|
||||
<?php
|
||||
/**
|
||||
* @package JEM
|
||||
* @copyright (C) 2013-2024 joomlaeventmanager.net
|
||||
* @copyright (C) 2005-2009 Christoph Lukes
|
||||
* @license https://www.gnu.org/licenses/gpl-3.0 GNU/GPL
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\HTML\HTMLHelper;
|
||||
use Joomla\CMS\Router\Route;
|
||||
use Joomla\CMS\Session\Session;
|
||||
|
||||
HTMLHelper::addIncludePath(JPATH_COMPONENT_ADMINISTRATOR.'/helpers/html');
|
||||
|
||||
$colspan = ($this->event->waitinglist ? 10 : 9);
|
||||
|
||||
$detaillink = Route::_(JemHelperRoute::getEventRoute($this->event->id.':'.$this->event->alias));
|
||||
|
||||
$namefield = $this->settings->get('global_regname', '1') ? 'name' : 'username';
|
||||
$namelabel = $this->settings->get('global_regname', '1') ? 'COM_JEM_NAME' : 'COM_JEM_USERNAME';
|
||||
?>
|
||||
<script>
|
||||
function tableOrdering(order, dir, view)
|
||||
{
|
||||
var form = document.getElementById("adminForm");
|
||||
|
||||
form.filter_order.value = order;
|
||||
form.filter_order_Dir.value = dir;
|
||||
form.submit(view);
|
||||
}
|
||||
</script>
|
||||
<script>
|
||||
function jSelectUsers_newusers(ids, count, status, places, eventid, seriesbooking, token) {
|
||||
document.location.href = 'index.php?option=com_jem&task=attendees.attendeeadd&id='+eventid+'&status='+status+'&places='+places+'&uids='+ids+'&series='+seriesbooking+'&'+token+'=1';
|
||||
SqueezeBox.close();
|
||||
}
|
||||
</script>
|
||||
|
||||
<div id="jem" class="jem_attendees<?php echo $this->pageclass_sfx;?>">
|
||||
<div class="buttons">
|
||||
<?php
|
||||
$permissions = new stdClass();
|
||||
$permissions->canAddUsers = true;
|
||||
$btn_params = array('print_link' => $this->print_link, 'id' => $this->event->id);
|
||||
echo JemOutput::createButtonBar($this->getName(), $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; ?>
|
||||
|
||||
<div class="clr"></div>
|
||||
|
||||
<?php if ($this->params->get('showintrotext')) : ?>
|
||||
<div class="description no_space floattext">
|
||||
<?php echo $this->params->get('introtext'); ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<h2><?php echo $this->escape($this->event->title); ?></h2>
|
||||
|
||||
<form action="<?php echo htmlspecialchars($this->action); ?>" method="post" name="adminForm" id="adminForm">
|
||||
<table class="adminlist">
|
||||
<tr>
|
||||
<td width="80%">
|
||||
<b><?php echo Text::_('COM_JEM_TITLE').':'; ?></b>
|
||||
<a href="<?php echo $detaillink ; ?>"><?php echo $this->escape($this->event->title); ?></a> <?php echo $this->event->recurrence_type? '<i class="fa fa-fw fa-refresh jem-recurrenceicon"></i>':'' ;?>
|
||||
<br />
|
||||
<b><?php echo Text::_('COM_JEM_DATE').':'; ?></b> <?php
|
||||
echo JemOutput::formatLongDateTime($this->event->dates, $this->event->times, $this->event->enddates, $this->event->endtimes, $this->settings->get('global_show_timedetails', 1)); ?>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<br />
|
||||
|
||||
<?php if (empty($this->rows)) : ?>
|
||||
|
||||
<div class="eventtable">
|
||||
<strong><i><?php echo Text::_('COM_JEM_ATTENDEES_EMPTY_YET'); ?></i></strong>
|
||||
</div>
|
||||
|
||||
<?php else : /* empty($this->rows) */ ?>
|
||||
|
||||
<div id="jem_filter" class="floattext">
|
||||
<div class="jem_fleft">
|
||||
<label for="filter"><?php echo Text::_('COM_JEM_SEARCH'); ?></label>
|
||||
<?php echo $this->lists['filter'].' '; ?>
|
||||
<input type="text" name="filter_search" id="filter_search" value="<?php echo $this->lists['search']; ?>" class="inputbox" onChange="document.adminForm.submit();" />
|
||||
<button class="btn btn-primary" type="submit"><?php echo Text::_('JSEARCH_FILTER_SUBMIT'); ?></button>
|
||||
<button class="btn btn-secondary" type="button" onclick="document.getElementById('filter_search').value='';this.form.submit();"><?php echo Text::_('JSEARCH_FILTER_CLEAR'); ?></button>
|
||||
|
||||
</div>
|
||||
<br><br><br>
|
||||
<div class="jem_fleft" style="white-space:nowrap;">
|
||||
<?php echo Text::_('COM_JEM_STATUS').' '.$this->lists['status']; ?>
|
||||
</div>
|
||||
<div class="jem_fright">
|
||||
<label for="limit"><?php echo Text::_('COM_JEM_DISPLAY_NUM'); ?></label>
|
||||
<?php echo $this->pagination->getLimitBox(); ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php $del_link = 'index.php?option=com_jem&view=attendees&task=attendees.attendeeremove&id='.$this->event->id.(!empty($this->item->id)?'&Itemid='.$this->item->id:'').'&'.Session::getFormToken().'=1'; ?>
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="eventtable table table-striped" style="margin: 20px 0 0 0;" id="articleList">
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="1%" class="center"><?php echo Text::_('COM_JEM_NUM'); ?></th>
|
||||
<!--th width="1%" class="center"><input type="checkbox" name="checkall-toggle" value="" title="<?php echo Text::_('JGLOBAL_CHECK_ALL'); ?>" onclick="Joomla.checkAll(this)" /></th-->
|
||||
<th class="title"><?php echo HTMLHelper::_('grid.sort', $namelabel, 'u.'.$namefield, $this->lists['order_Dir'], $this->lists['order'] ); ?></th>
|
||||
<?php if ($this->enableemailaddress == 1) : ?>
|
||||
<th class="title"><?php echo Text::_('COM_JEM_EMAIL'); ?></th>
|
||||
<?php endif; ?>
|
||||
<th class="title"><?php echo HTMLHelper::_('grid.sort', 'COM_JEM_REGDATE', 'r.uregdate', $this->lists['order_Dir'], $this->lists['order'] ); ?></th>
|
||||
<th class="center"><?php echo HTMLHelper::_('grid.sort', 'COM_JEM_STATUS', 'r.status', $this->lists['order_Dir'], $this->lists['order'] ); ?></th>
|
||||
<th class="center"><?php echo HTMLHelper::_('grid.sort', 'COM_JEM_PLACES', 'r.places', $this->lists['order_Dir'], $this->lists['order'] ); ?></th>
|
||||
<?php if (!empty($this->jemsettings->regallowcomments)) : ?>
|
||||
<th class="title"><?php echo Text::_('COM_JEM_COMMENT'); ?></th>
|
||||
<?php endif;?>
|
||||
<th class="center"><?php echo Text::_('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 HTMLHelper::_('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 endif; ?>
|
||||
<td><?php if (!empty($row->uregdate)) { echo HTMLHelper::_('date', $row->uregdate, Text::_('DATE_FORMAT_LC5')); } ?></td>
|
||||
<td class="center">
|
||||
<?php
|
||||
$status = (int)$row->status;
|
||||
if($this->event->waitinglist) {
|
||||
if ($status === 1 && $row->waiting == 1) { $status = 2; }
|
||||
echo jemhtml::toggleAttendanceStatus($row->id, $status, true);
|
||||
}else{
|
||||
echo jemhtml::toggleAttendanceStatus($row->id, $status, false);
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
<td class="center"><?php echo $row->places; ?></td>
|
||||
<?php if (!empty($this->jemsettings->regallowcomments)) : ?>
|
||||
<?php $cmnt = (\Joomla\String\StringHelper::strlen($row->comment) > 16) ? (\Joomla\String\StringHelper::substr($row->comment, 0, 14).'…') : $row->comment; ?>
|
||||
<td><?php if (!empty($cmnt)) { echo HTMLHelper::_('tooltip', $row->comment, null, null, $cmnt, null, null); } ?></td>
|
||||
<?php endif;?>
|
||||
<td class="center">
|
||||
<a href="<?php echo Route::_($del_link.'&cid[]='.$row->id); ?>">
|
||||
<?php echo JemOutput::removebutton(Text::_('COM_JEM_ATTENDEES_DELETE'), array('title' => Text::_('COM_JEM_ATTENDEES_DELETE'), 'class' => 'hasTooltip')); ?>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<?php endif; /* empty($this->rows) */ ?>
|
||||
|
||||
<?php echo HTMLHelper::_('form.token'); ?>
|
||||
<input type="hidden" name="option" value="com_jem" />
|
||||
<input type="hidden" name="boxchecked" value="0" />
|
||||
<input type="hidden" name="task" value="" />
|
||||
<input type="hidden" name="view" value="attendees" />
|
||||
<input type="hidden" name="id" value="<?php echo $this->event->id; ?>" />
|
||||
<input type="hidden" name="Itemid" value="<?php echo $this->item->id;?>" />
|
||||
<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="enableemailaddress" value="<?php echo $this->enableemailaddress; ?>" />
|
||||
</form>
|
||||
|
||||
<div class="pagination">
|
||||
<?php echo $this->pagination->getPagesLinks(); ?>
|
||||
</div>
|
||||
|
||||
<div class="copyright">
|
||||
<?php echo JemOutput::footer(); ?>
|
||||
</div>
|
||||
</div>
|
||||
1
components/com_jem/views/attendees/tmpl/index.html
Normal file
1
components/com_jem/views/attendees/tmpl/index.html
Normal file
@ -0,0 +1 @@
|
||||
<!DOCTYPE html><title></title>
|
||||
97
components/com_jem/views/attendees/tmpl/print.php
Normal file
97
components/com_jem/views/attendees/tmpl/print.php
Normal file
@ -0,0 +1,97 @@
|
||||
<?php
|
||||
/**
|
||||
* @package JEM
|
||||
* @copyright (C) 2013-2024 joomlaeventmanager.net
|
||||
* @copyright (C) 2005-2009 Christoph Lukes
|
||||
* @license https://www.gnu.org/licenses/gpl-3.0 GNU/GPL
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\HTML\HTMLHelper;
|
||||
?>
|
||||
|
||||
<table class="table" style="width: 100%">
|
||||
<tr>
|
||||
<td class="sectionname" width="100%"><span
|
||||
style="color: #C24733; font-size: 18px; font-weight: bold;"><?php echo Text::_( 'COM_JEM_REGISTERED_USER' ); ?>
|
||||
</span>
|
||||
</td>
|
||||
<td><div class="button2-left">
|
||||
<div class="blank">
|
||||
<a href="#" onclick="window.print();return false;"><span class="icon icon-print"></span></a>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<br />
|
||||
<table class="adminlist">
|
||||
<tr>
|
||||
<td align="left"><b><?php echo Text::_( 'COM_JEM_TITLE' ).':'; ?> </b> <?php echo $this->escape($this->event->title); ?><br />
|
||||
<b><?php echo Text::_( 'COM_JEM_DATE' ).':'; ?> </b> <?php echo JEMOutput::formatLongDateTime($this->event->dates, $this->event->times,
|
||||
$this->event->enddates, $this->event->endtimes, $this->settings->get('global_show_timedetails', 1)); ?></td>
|
||||
</tr>
|
||||
</table>
|
||||
<br />
|
||||
<?php $regname = $this->settings->get('global_regname', '1'); ?>
|
||||
<table class="table table-striped" id="articleList">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="title"><?php echo Text::_( 'COM_JEM_NUM' ); ?></th>
|
||||
<th class="title"><?php echo Text::_( $regname ? 'COM_JEM_NAME' : 'COM_JEM_USERNAME' ); ?></th>
|
||||
<?php if ($this->enableemailaddress == 1) : ?>
|
||||
<th class="title"><?php echo Text::_( 'COM_JEM_EMAIL' ); ?></th>
|
||||
<?php endif; ?>
|
||||
<th class="title"><?php echo Text::_( 'COM_JEM_REGDATE' ); ?></th>
|
||||
<th class="title"><?php echo Text::_('COM_JEM_STATUS' ); ?></th>
|
||||
<th class="title"><?php echo Text::_('COM_JEM_PLACES' ); ?></th>
|
||||
<?php if (!empty($this->jemsettings->regallowcomments)) : ?>
|
||||
<th class="title"><?php echo Text::_('COM_JEM_COMMENT'); ?></th>
|
||||
<?php endif; ?>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
<?php
|
||||
$k = 0;
|
||||
$i = 0;
|
||||
foreach ($this->rows as $row) :
|
||||
?>
|
||||
<tr class="<?php echo "row$k"; ?>">
|
||||
<td><?php echo ++$i; ?></td>
|
||||
<td><?php echo $regname ? $row->name : $row->username; ?></td>
|
||||
<?php if ($this->enableemailaddress == 1) : ?>
|
||||
<td><?php echo $row->email; ?></td>
|
||||
<?php endif; ?>
|
||||
<td><?php if (!empty($row->uregdate)) { echo HTMLHelper::_('date', $row->uregdate, Text::_('DATE_FORMAT_LC5')); } ?></td>
|
||||
<?php
|
||||
switch ($row->status) :
|
||||
case -1: // explicitely unregistered
|
||||
$text = 'COM_JEM_ATTENDEES_NOT_ATTENDING';
|
||||
break;
|
||||
case 0: // invited, not answered yet
|
||||
$text = 'COM_JEM_ATTENDEES_INVITED';
|
||||
break;
|
||||
case 1: // registered
|
||||
$text = $row->waiting ? 'COM_JEM_ATTENDEES_ON_WAITINGLIST' : 'COM_JEM_ATTENDEES_ATTENDING';
|
||||
break;
|
||||
default: // oops...
|
||||
$text = 'COM_JEM_ATTENDEES_STATUS_UNKNOWN';
|
||||
break;
|
||||
endswitch; ?>
|
||||
<td><?php echo Text::_($text); ?></td>
|
||||
<td><?php echo $row->places; ?></td>
|
||||
<?php if (!empty($this->jemsettings->regallowcomments)) : ?>
|
||||
<td><?php echo $row->comment; ?></td>
|
||||
<?php endif; ?>
|
||||
</tr>
|
||||
<?php $k = 1 - $k;
|
||||
endforeach; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<div class="copyright">
|
||||
<?php echo JemOutput::footer(); ?>
|
||||
</div>
|
||||
186
components/com_jem/views/attendees/tmpl/responsive/addusers.php
Normal file
186
components/com_jem/views/attendees/tmpl/responsive/addusers.php
Normal file
@ -0,0 +1,186 @@
|
||||
<?php
|
||||
/**
|
||||
* @package JEM
|
||||
* @copyright (C) 2013-2024 joomlaeventmanager.net
|
||||
* @copyright (C) 2005-2009 Christoph Lukes
|
||||
* @license https://www.gnu.org/licenses/gpl-3.0 GNU/GPL
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\HTML\HTMLHelper;
|
||||
use Joomla\CMS\Router\Route;
|
||||
use Joomla\CMS\Session\Session;
|
||||
use Joomla\CMS\Form\Form;
|
||||
|
||||
$function = Factory::getApplication()->input->getCmd('function', 'jSelectUsers');
|
||||
$checked = 0;
|
||||
|
||||
HTMLHelper::addIncludePath(JPATH_COMPONENT_ADMINISTRATOR.'/helpers/html');
|
||||
|
||||
// Get the form.
|
||||
Form::addFormPath(JPATH_COMPONENT . '/models/forms');
|
||||
$form = Form::getInstance('com_jem.addusers', 'addusers');
|
||||
|
||||
if (empty($form)) {
|
||||
return false;
|
||||
}
|
||||
?>
|
||||
|
||||
<script>
|
||||
function tableOrdering( order, dir, view )
|
||||
{
|
||||
var form = document.getElementById("adminForm");
|
||||
|
||||
form.filter_order.value = order;
|
||||
form.filter_order_Dir.value = dir;
|
||||
form.submit( view );
|
||||
}
|
||||
</script>
|
||||
<script>
|
||||
function checkList(form)
|
||||
{
|
||||
var r='', i, n, e;
|
||||
for (i=0, n=form.elements.length; i<n; i++)
|
||||
{
|
||||
e = form.elements[i];
|
||||
if (e.type == 'checkbox' && e.id.indexOf('cb') === 0 && e.checked)
|
||||
{
|
||||
if (r) { r += ','; }
|
||||
r += e.value;
|
||||
}
|
||||
}
|
||||
return r;
|
||||
}
|
||||
</script>
|
||||
|
||||
<div id="jem" class="jem_select_users">
|
||||
<h1 class='componentheading'>
|
||||
<?php echo Text::_('COM_JEM_SELECT_USERS_AND_STATUS'); ?>
|
||||
</h1>
|
||||
|
||||
<div class="clr"></div>
|
||||
|
||||
<form action="<?php echo Route::_('index.php?option=com_jem&view=attendees&layout=addusers&tmpl=component&function='.$this->escape($function).'&id='.$this->event->id.'&'.Session::getFormToken().'=1'); ?>" method="post" name="adminForm" id="adminForm">
|
||||
|
||||
<?php if(1) : ?>
|
||||
<div class="jem-row valign-baseline">
|
||||
<div id="jem_filter" class="jem-form jem-row jem-justify-start">
|
||||
<div>
|
||||
<?php
|
||||
echo '<label for="filter_type">'.Text::_('COM_JEM_FILTER').'</label>';
|
||||
?>
|
||||
</div>
|
||||
<div class="jem-row jem-justify-start jem-nowrap">
|
||||
<?php echo $this->searchfilter; ?>
|
||||
<input type="text" name="filter_search" id="filter_search" value="<?php echo $this->lists['search']; ?>" class="inputbox" onChange="document.adminForm.submit();" />
|
||||
</div>
|
||||
<div class="jem-row jem-justify-start jem-nowrap">
|
||||
<button type="submit" class="pointer btn btn-primary"><?php echo Text::_('JSEARCH_FILTER_SUBMIT'); ?></button>
|
||||
<button type="button" class="pointer btn btn-secondary" onclick="document.getElementById('filter_search').value='';this.form.submit();"><?php echo Text::_('JSEARCH_FILTER_CLEAR'); ?></button>
|
||||
</div>
|
||||
<div class="jem-row jem-justify-start jem-nowrap">
|
||||
<div>
|
||||
<?php echo '<label for="limit">'.Text::_('COM_JEM_DISPLAY_NUM').'</label> '; ?>
|
||||
</div>
|
||||
<div> </div>
|
||||
<div>
|
||||
<?php echo $this->pagination->getLimitBox(); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<hr class="jem-hr"/>
|
||||
|
||||
<div class="jem-sort jem-sort-small">
|
||||
<div class="jem-list-row jem-small-list">
|
||||
<div class="sectiontableheader jem-users-number"><?php echo Text::_('COM_JEM_NUM'); ?></div>
|
||||
<div class="sectiontableheader jem-users-checkall"><input type="checkbox" name="checkall-toggle" value="" title="<?php echo Text::_('JGLOBAL_CHECK_ALL'); ?>" onclick="Joomla.checkAll(this)" /></div>
|
||||
<div class="sectiontableheader jem-users-name"><?php echo Text::_('COM_JEM_NAME'); ?></div>
|
||||
<div class="sectiontableheader jem-users-state"><?php echo Text::_('COM_JEM_STATUS'); ?></div>
|
||||
<div class="sectiontableheader jem-users-state"><?php echo Text::_('COM_JEM_PLACES'); ?></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<ul class="eventlist eventtable">
|
||||
<?php if (empty($this->rows)) : ?>
|
||||
<li class="jem-event jem-list-row jem-small-list"><?php echo Text::_('COM_JEM_NOUSERS'); ?></li>
|
||||
<?php else :?>
|
||||
<?php foreach ($this->rows as $i => $row) : ?>
|
||||
<li class="jem-event jem-list-row jem-small-list row<?php echo $i % 2; ?>">
|
||||
<div class="jem-event-info-small jem-users-number">
|
||||
<?php echo $this->pagination->getRowOffset( $i ); ?>
|
||||
</div>
|
||||
|
||||
<div class="jem-event-info-small jem-users-checkall">
|
||||
<?php echo HTMLHelper::_('grid.id', $i, $row->id); ?>
|
||||
</div>
|
||||
|
||||
<div class="jem-event-info-small jem-users-name">
|
||||
<?php echo $this->escape($row->name); ?>
|
||||
</div>
|
||||
|
||||
<div class="jem-event-info-small jem-users-state">
|
||||
<?php echo jemhtml::toggleAttendanceStatus( 0, $row->status, false); ?>
|
||||
</div>
|
||||
|
||||
<div class="jem-event-info-small jem-users-places">
|
||||
<?php echo $this->escape($row->places); ?>
|
||||
</div>
|
||||
</li>
|
||||
<?php endforeach; ?>
|
||||
<?php endif; ?>
|
||||
</ul>
|
||||
|
||||
<hr class="jem-hr"/>
|
||||
|
||||
<?php
|
||||
if($this->event->maxbookeduser!=0)
|
||||
{
|
||||
$placesavailableuser = $this->event->maxbookeduser;
|
||||
}else{
|
||||
$placesavailableuser= null;
|
||||
}
|
||||
?>
|
||||
|
||||
<div class="jem-row jem-justify-start valign-baseline">
|
||||
<div class="choose-status">
|
||||
<?php echo Text::_('COM_JEM_SELECT');?> <?php echo $form->getLabel('status'); ?> <?php echo $form->getInput('status'); ?>
|
||||
</div>
|
||||
<div class="choose-places">
|
||||
<?php echo Text::_('COM_JEM_SELECT');?> <?php echo Text::_('COM_JEM_PLACES'); ?> <input id="places" name="places" type="number" style="text-align: center; width:auto;" value="<?php echo $this->event->minbookeduser; ?>" max="<?php echo ($placesavailableuser > 0 ? $placesavailableuser : ($placesavailableuser ?? '')); ?>" min="<?php echo $this->event->minbookeduser; ?>">
|
||||
</div>
|
||||
<?php if ($this->event->recurrence_type && $this->event->seriesbooking): ?>
|
||||
<div class="choose-places">
|
||||
<?php echo Text::_('COM_JEM_SERIES_BOOKED').':'; ?>
|
||||
<input type="checkbox" id="seriesbooking" name="seriesbooking" />
|
||||
</div>
|
||||
<?php else : ?>
|
||||
<input type="hidden" name="seriesbooking" value=-1 />
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
||||
<input type="hidden" name="task" value="selectusers" />
|
||||
<input type="hidden" name="option" value="com_jem" />
|
||||
<input type="hidden" name="tmpl" value="component" />
|
||||
<input type="hidden" name="function" value="<?php echo $this->escape($function); ?>" />
|
||||
<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="<?php echo $checked; ?>" />
|
||||
|
||||
<div class="pagination">
|
||||
<?php echo $this->pagination->getPagesLinks(); ?>
|
||||
</div>
|
||||
|
||||
<div class="jem-row jem-justify-end">
|
||||
<button type="button" class="pointer btn btn-primary" onclick="if (window.parent) window.parent.<?php echo $this->escape($function);?>_newusers(checkList(document.adminForm),document.adminForm.boxchecked.value,document.adminForm.status.value, document.adminForm.places.value, <?php echo $this->event->id; ?>, document.adminForm.seriesbooking.value, '<?php echo Session::getFormToken(); ?>');">
|
||||
<?php echo Text::_('COM_JEM_SAVE'); ?>
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
216
components/com_jem/views/attendees/tmpl/responsive/default.php
Normal file
216
components/com_jem/views/attendees/tmpl/responsive/default.php
Normal file
@ -0,0 +1,216 @@
|
||||
<?php
|
||||
/**
|
||||
* @package JEM
|
||||
* @copyright (C) 2013-2024 joomlaeventmanager.net
|
||||
* @copyright (C) 2005-2009 Christoph Lukes
|
||||
* @license https://www.gnu.org/licenses/gpl-3.0 GNU/GPL
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\HTML\HTMLHelper;
|
||||
use Joomla\CMS\Router\Route;
|
||||
use Joomla\CMS\Session\Session;
|
||||
|
||||
HTMLHelper::addIncludePath(JPATH_COMPONENT_ADMINISTRATOR.'/helpers/html');
|
||||
|
||||
$colspan = ($this->event->waitinglist ? 10 : 9);
|
||||
|
||||
$detaillink = Route::_(JemHelperRoute::getEventRoute($this->event->id.':'.$this->event->alias));
|
||||
|
||||
$namefield = $this->settings->get('global_regname', '1') ? 'name' : 'username';
|
||||
$namelabel = $this->settings->get('global_regname', '1') ? 'COM_JEM_NAME' : 'COM_JEM_USERNAME';
|
||||
|
||||
?>
|
||||
<script>
|
||||
function tableOrdering(order, dir, view)
|
||||
{
|
||||
var form = document.getElementById("adminForm");
|
||||
|
||||
form.filter_order.value = order;
|
||||
form.filter_order_Dir.value = dir;
|
||||
form.submit(view);
|
||||
}
|
||||
</script>
|
||||
<script>
|
||||
function jSelectUsers_newusers(ids, count, status, places, eventid, seriesbooking, token) {
|
||||
document.location.href = 'index.php?option=com_jem&task=attendees.attendeeadd&id='+eventid+'&status='+status+'&places='+places+'&uids='+ids+'&series='+seriesbooking+'&'+token+'=1';
|
||||
SqueezeBox.close();
|
||||
}
|
||||
</script>
|
||||
|
||||
<div id="jem" class="jem_attendees <?php echo $this->pageclass_sfx;?>">
|
||||
<div class="buttons">
|
||||
<?php
|
||||
$permissions = new stdClass();
|
||||
$permissions->canAddUsers = true;
|
||||
$btn_params = array('print_link' => $this->print_link, 'id' => $this->event->id);
|
||||
echo JemOutput::createButtonBar($this->getName(), $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; ?>
|
||||
|
||||
<div class="clr"></div>
|
||||
|
||||
<?php if ($this->params->get('showintrotext')) : ?>
|
||||
<div class="description no_space floattext">
|
||||
<?php echo $this->params->get('introtext'); ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<h2><?php echo $this->escape($this->event->title); ?></h2>
|
||||
|
||||
<form action="<?php echo htmlspecialchars($this->action); ?>" method="post" name="adminForm" id="adminForm">
|
||||
<dl class="jem-dl">
|
||||
<dt class="jem-title"><?php echo Text::_('COM_JEM_TITLE').':'; ?></dt>
|
||||
<a href="<?php echo $detaillink ; ?>"><?php echo $this->escape($this->event->title); ?></a> <?php echo $this->event->recurrence_type? '<i class="fa fa-fw fa-refresh jem-recurrenceicon"></i>':'' ?>
|
||||
<dt class="jem-date"><?php echo Text::_('COM_JEM_DATE').':'; ?></dt>
|
||||
<dd class="jem-date">
|
||||
<?php echo JemOutput::formatLongDateTime($this->event->dates, $this->event->times, $this->event->enddates, $this->event->endtimes, $this->settings->get('global_show_timedetails', 1)); ?>
|
||||
</dd>
|
||||
</dl>
|
||||
<div id="jem_filter" class="jem-dl">
|
||||
<div class="row jem-row">
|
||||
<div class="col-md-2">
|
||||
<div class="row">
|
||||
<div class="wauto-minwmax">
|
||||
<div class="input-group">
|
||||
<?php echo '<label for="filter_search">'.Text::_('COM_JEM_SEARCH').'</label>'; ?>
|
||||
<?php echo $this->lists['filter']; ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-9">
|
||||
<div class="row mb-12">
|
||||
<div class="col-md-8">
|
||||
<div class="input-group">
|
||||
<input type="text" name="filter_search" id="filter_search" value="<?php echo $this->lists['search']; ?>" class="inputbox" onChange="document.adminForm.submit();" />
|
||||
<button class="btn btn-primary" type="submit"><?php echo Text::_('JSEARCH_FILTER_SUBMIT'); ?></button>
|
||||
<button class="btn btn-secondary" type="button" onclick="document.getElementById('filter_search').value='';this.form.submit();"><?php echo Text::_('JSEARCH_FILTER_CLEAR'); ?></button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="input-group" style="margin-top:6px;">
|
||||
<?php echo '<label for="filter_status">'.Text::_('COM_JEM_STATUS').'</label>'; ?>
|
||||
<?php echo $this->lists['status']; ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-1">
|
||||
<div class="row ">
|
||||
<div class="wauto-minwmax">
|
||||
<div class=" float-end">
|
||||
<?php echo $this->pagination->getLimitBox(); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php if (empty($this->rows)) : ?>
|
||||
<div style="padding-bottom: 8px;">
|
||||
<strong><i><?php echo Text::_('COM_JEM_ATTENDEES_EMPTY_YET'); ?></i></strong>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
|
||||
<div class="jem-sort jem-sort-small" id="articleList">
|
||||
<div class="jem-list-row jem-small-list">
|
||||
<div class="sectiontableheader jem-attendee-number"><?php echo Text::_('COM_JEM_NUM'); ?></div>
|
||||
<div class="sectiontableheader jem-attendee-name"><?php echo HTMLHelper::_('grid.sort', 'COM_JEM_USERNAME', 'u.'.$namefield, $this->lists['order_Dir'], $this->lists['order'] ); ?></div>
|
||||
<?php if ($this->enableemailaddress == 1) :?>
|
||||
<div class="sectiontableheader jem-attendee-email"><?php echo Text::_('COM_JEM_EMAIL'); ?></div>
|
||||
<?php endif; ?>
|
||||
<div class="sectiontableheader jem-attendee-regdate"><?php echo HTMLHelper::_('grid.sort', 'COM_JEM_REGDATE', 'r.uregdate', $this->lists['order_Dir'], $this->lists['order'] ); ?></div>
|
||||
<div class="sectiontableheader jem-attendee-status"><?php echo HTMLHelper::_('grid.sort', 'COM_JEM_STATUS', 'r.status', $this->lists['order_Dir'], $this->lists['order'] ); ?></div>
|
||||
<div class="sectiontableheader jem-attendee-places"><?php echo HTMLHelper::_('grid.sort', 'COM_JEM_PLACES', 'r.places', $this->lists['order_Dir'], $this->lists['order'] ); ?></div>
|
||||
<?php if (!empty($this->jemsettings->regallowcomments)) : ?>
|
||||
<div class="sectiontableheader jem-attendee-comment"><?php echo Text::_('COM_JEM_COMMENT'); ?></div>
|
||||
<?php endif; ?>
|
||||
<div class="sectiontableheader jem-attendee-remove"><?php echo Text::_('COM_JEM_REMOVE_USER'); ?></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<ul class="eventlist eventtable">
|
||||
<?php $del_link = 'index.php?option=com_jem&view=attendees&task=attendees.attendeeremove&id='.$this->event->id.(!empty($this->item->id)?'&Itemid='.$this->item->id:'').'&'.Session::getFormToken().'=1';
|
||||
?>
|
||||
<?php foreach ($this->rows as $i => $row) : ?>
|
||||
<li class="jem-event jem-list-row jem-small-list row<?php echo $i % 2; ?>">
|
||||
<div class="jem-event-info-small jem-attendee-number">
|
||||
<?php echo $this->pagination->getRowOffset($i); ?>
|
||||
</div>
|
||||
|
||||
<div class="jem-event-info-small jem-attendee-name">
|
||||
<?php echo $row->$namefield; ?>
|
||||
</div>
|
||||
|
||||
<?php if ($this->enableemailaddress == 1) :?>
|
||||
<div class="jem-event-info-small jem-attendee-email">
|
||||
<a href="mailto:<?php echo $row->email; ?>"><?php echo $row->email; ?></a>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="jem-event-info-small jem-attendee-regdate">
|
||||
<?php if (!empty($row->uregdate)) { echo HTMLHelper::_('date', $row->uregdate, Text::_('DATE_FORMAT_LC5')); } ?>
|
||||
</div>
|
||||
|
||||
<div class="jem-event-info-small jem-attendee-status">
|
||||
<?php
|
||||
$status = (int)$row->status;
|
||||
if($this->event->waitinglist) {
|
||||
if ($status === 1 && $row->waiting == 1) { $status = 2; }
|
||||
echo jemhtml::toggleAttendanceStatus($row->id, $status, true);
|
||||
}else{
|
||||
echo jemhtml::toggleAttendanceStatus($row->id, $status, false);
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<div class="jem-event-info-small jem-attendee-places">
|
||||
<?php echo $row->places; ?>
|
||||
</div>
|
||||
|
||||
<?php if (!empty($this->jemsettings->regallowcomments)) : ?>
|
||||
<?php $cmnt = (\Joomla\String\StringHelper::strlen($row->comment) > 16) ? (\Joomla\String\StringHelper::substr($row->comment, 0, 14).'…') : $row->comment; ?>
|
||||
<div class="jem-event-info-small jem-attendee-comment">
|
||||
<?php if (!empty($cmnt)) { echo HTMLHelper::_('tooltip', $row->comment, null, null, $cmnt, null, null); } ?>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
|
||||
<div class="jem-event-info-small jem-attendee-remove">
|
||||
<div class="center">
|
||||
<a href="<?php echo Route::_($del_link.'&cid[]='.$row->id); ?>">
|
||||
<?php echo JemOutput::removebutton(Text::_('COM_JEM_ATTENDEES_DELETE'), array('title' => Text::_('COM_JEM_ATTENDEES_DELETE'), 'class' => 'hasTooltip')); ?>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
|
||||
<?php echo HTMLHelper::_('form.token'); ?>
|
||||
<input type="hidden" name="option" value="com_jem" />
|
||||
<input type="hidden" name="boxchecked" value="0" />
|
||||
<input type="hidden" name="task" value="" />
|
||||
<input type="hidden" name="view" value="attendees" />
|
||||
<input type="hidden" name="id" value="<?php echo $this->event->id; ?>" />
|
||||
<input type="hidden" name="Itemid" value="<?php echo $this->item->id;?>" />
|
||||
<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="enableemailaddress" value="<?php echo $this->enableemailaddress; ?>" />
|
||||
</form>
|
||||
|
||||
<div class="pagination">
|
||||
<?php echo $this->pagination->getPagesLinks(); ?>
|
||||
</div>
|
||||
|
||||
<div class="copyright">
|
||||
<?php echo JemOutput::footer(); ?>
|
||||
</div>
|
||||
</div>
|
||||
@ -0,0 +1 @@
|
||||
<!DOCTYPE html><title></title>
|
||||
98
components/com_jem/views/attendees/tmpl/responsive/print.php
Normal file
98
components/com_jem/views/attendees/tmpl/responsive/print.php
Normal file
@ -0,0 +1,98 @@
|
||||
<?php
|
||||
/**
|
||||
* @package JEM
|
||||
* @copyright (C) 2013-2024 joomlaeventmanager.net
|
||||
* @copyright (C) 2005-2009 Christoph Lukes
|
||||
* @license https://www.gnu.org/licenses/gpl-3.0 GNU/GPL
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\HTML\HTMLHelper;
|
||||
?>
|
||||
|
||||
<table class="table" style="width: 100%">
|
||||
<tr>
|
||||
<td class="sectionname" width="100%"><span
|
||||
style="color: #C24733; font-size: 18px; font-weight: bold;"><?php echo Text::_( 'COM_JEM_REGISTERED_USER' ); ?>
|
||||
</span>
|
||||
</td>
|
||||
<td><div class="button2-left">
|
||||
<div class="blank">
|
||||
<a href="#" onclick="window.print();return false;"><span class="icon icon-print"></span></a>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<br />
|
||||
<table class="adminlist">
|
||||
<tr>
|
||||
<td align="left"><b><?php echo Text::_( 'COM_JEM_TITLE' ).':'; ?> </b> <?php echo $this->escape($this->event->title); ?><br />
|
||||
<b><?php echo Text::_( 'COM_JEM_DATE' ).':'; ?> </b> <?php echo JEMOutput::formatLongDateTime($this->event->dates, $this->event->times,
|
||||
$this->event->enddates, $this->event->endtimes, $this->settings->get('global_show_timedetails', 1)); ?></td>
|
||||
</tr>
|
||||
</table>
|
||||
<br />
|
||||
<?php $regname = $this->settings->get('global_regname', '1'); ?>
|
||||
<table class="table table-striped" id="articleList">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="title"><?php echo Text::_( 'COM_JEM_NUM' ); ?></th>
|
||||
<th class="title"><?php echo Text::_( $regname ? 'COM_JEM_NAME' : 'COM_JEM_USERNAME' ); ?></th>
|
||||
<?php if ($this->enableemailaddress == 1) : ?>
|
||||
<th class="title"><?php echo Text::_( 'COM_JEM_EMAIL' ); ?></th>
|
||||
<?php endif; ?>
|
||||
<th class="title"><?php echo Text::_( 'COM_JEM_REGDATE' ); ?></th>
|
||||
<th class="title"><?php echo Text::_('COM_JEM_STATUS' ); ?></th>
|
||||
<th class="title"><?php echo Text::_('COM_JEM_PLACES' ); ?></th>
|
||||
<?php if (!empty($this->jemsettings->regallowcomments)) : ?>
|
||||
<th class="title"><?php echo Text::_('COM_JEM_COMMENT'); ?></th>
|
||||
<?php endif; ?>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
<?php
|
||||
$regname = $this->settings->get('global_regname', '1');
|
||||
$k = 0;
|
||||
$i = 0;
|
||||
foreach ($this->rows as $row) :
|
||||
?>
|
||||
<tr class="<?php echo "row$k"; ?>">
|
||||
<td><?php echo ++$i; ?></td>
|
||||
<td><?php echo $regname ? $row->name : $row->username; ?></td>
|
||||
<?php if ($this->enableemailaddress == 1) : ?>
|
||||
<td><?php echo $row->email; ?></td>
|
||||
<?php endif; ?>
|
||||
<td><?php if (!empty($row->uregdate)) { echo HTMLHelper::_('date', $row->uregdate, Text::_('DATE_FORMAT_LC5')); } ?></td>
|
||||
<?php
|
||||
switch ($row->status) :
|
||||
case -1: // explicitely unregistered
|
||||
$text = 'COM_JEM_ATTENDEES_NOT_ATTENDING';
|
||||
break;
|
||||
case 0: // invited, not answered yet
|
||||
$text = 'COM_JEM_ATTENDEES_INVITED';
|
||||
break;
|
||||
case 1: // registered
|
||||
$text = $row->waiting ? 'COM_JEM_ATTENDEES_ON_WAITINGLIST' : 'COM_JEM_ATTENDEES_ATTENDING';
|
||||
break;
|
||||
default: // oops...
|
||||
$text = 'COM_JEM_ATTENDEES_STATUS_UNKNOWN';
|
||||
break;
|
||||
endswitch; ?>
|
||||
<td><?php echo Text::_($text); ?></td>
|
||||
<td><?php echo $row->places; ?></td>
|
||||
<?php if (!empty($this->jemsettings->regallowcomments)) : ?>
|
||||
<td><?php echo (strlen($row->comment) > 256) ? (substr($row->comment, 0, 254).'…') : $row->comment; ?></td>
|
||||
<?php endif; ?>
|
||||
</tr>
|
||||
<?php $k = 1 - $k;
|
||||
endforeach; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<div class="copyright">
|
||||
<?php echo JemOutput::footer(); ?>
|
||||
</div>
|
||||
238
components/com_jem/views/attendees/view.html.php
Normal file
238
components/com_jem/views/attendees/view.html.php
Normal file
@ -0,0 +1,238 @@
|
||||
<?php
|
||||
/**
|
||||
* @package JEM
|
||||
* @copyright (C) 2013-2024 joomlaeventmanager.net
|
||||
* @copyright (C) 2005-2009 Christoph Lukes
|
||||
* @license https://www.gnu.org/licenses/gpl-3.0 GNU/GPL
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
use Joomla\CMS\HTML\HTMLHelper;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\Toolbar\ToolbarHelper;
|
||||
use Joomla\CMS\Uri\Uri;
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Router\Route;
|
||||
|
||||
/**
|
||||
* Attendees-view
|
||||
* @todo fix view
|
||||
*/
|
||||
class JemViewAttendees extends JemView
|
||||
{
|
||||
public function display($tpl = null)
|
||||
{
|
||||
$app = Factory::getApplication();
|
||||
$user = JemFactory::getUser();
|
||||
|
||||
//redirect if not logged in
|
||||
if (!$user->get('id')) {
|
||||
$app->enqueueMessage(Text::_('COM_JEM_NEED_LOGGED_IN'), 'error');
|
||||
return false;
|
||||
}
|
||||
|
||||
$this->settings = JemHelper::globalattribs();
|
||||
$this->jemsettings = JemHelper::config();
|
||||
|
||||
if ($this->getLayout() == 'print') {
|
||||
$this->_displayprint($tpl);
|
||||
return;
|
||||
}
|
||||
|
||||
if ($this->getLayout() == 'addusers') {
|
||||
$this->returnto = base64_decode($app->input->get('return', '', 'base64'));
|
||||
$this->_displayaddusers($tpl);
|
||||
return;
|
||||
}
|
||||
|
||||
//initialise variables
|
||||
$document = $app->getDocument();
|
||||
$settings = $this->settings;
|
||||
$params = $app->getParams();
|
||||
$menu = $app->getMenu();
|
||||
$menuitem = $menu->getActive();
|
||||
$uri = Uri::getInstance();
|
||||
|
||||
// Load css
|
||||
JemHelper::loadCss('jem');
|
||||
JemHelper::loadCustomCss();
|
||||
JemHelper::loadCustomTag();
|
||||
|
||||
//get vars
|
||||
$filter_order = $app->getUserStateFromRequest('com_jem.attendees.filter_order', 'filter_order', 'u.username', 'cmd');
|
||||
$filter_order_Dir = $app->getUserStateFromRequest('com_jem.attendees.filter_order_Dir', 'filter_order_Dir', '', 'word');
|
||||
$filter_status = $app->getUserStateFromRequest('com_jem.attendees.filter_status', 'filter_status', -2, 'int');
|
||||
$filter = $app->getUserStateFromRequest('com_jem.attendees.filter', 'filter', 0, 'int');
|
||||
$search = $app->getUserStateFromRequest('com_jem.attendees.filter_search', 'filter_search', '', 'string');
|
||||
|
||||
// Get data from the model
|
||||
$rows = $this->get('Data');
|
||||
$pagination = $this->get('Pagination');
|
||||
$event = $this->get('Event');
|
||||
|
||||
// Merge params.
|
||||
// Because this view is not useable for menu item we always overwrite $params.
|
||||
$pagetitle = Text::_('COM_JEM_MYEVENT_MANAGEATTENDEES') . ' - ' . $event->title;
|
||||
$params->set('page_heading', Text::_('COM_JEM_MYEVENT_MANAGEATTENDEES')); // event title is shown separate
|
||||
//$params->set('show_page_heading', 1); // always show?
|
||||
$params->set('introtext', ''); // there can't be an introtext
|
||||
$params->set('showintrotext', 0);
|
||||
$pageclass_sfx = $params->get('pageclass_sfx');
|
||||
|
||||
// Add site name to title if param is set
|
||||
if ($app->get('sitename_pagetitles', 0) == 1) {
|
||||
$pagetitle = Text::sprintf('JPAGETITLE', $app->get('sitename'), $pagetitle);
|
||||
}
|
||||
elseif ($app->get('sitename_pagetitles', 0) == 2) {
|
||||
$pagetitle = Text::sprintf('JPAGETITLE', $pagetitle, $app->get('sitename'));
|
||||
}
|
||||
|
||||
$document->setTitle($pagetitle);
|
||||
|
||||
$pathway = $app->getPathWay();
|
||||
if($menuitem) {
|
||||
//https://www.joomlaeventmanager.net/forum/jem-2-2-x-on-joomla-3/10474-category-name-doubled-in-breadcrumb
|
||||
$pathwayKeys = array_keys($pathway->getPathway()); //
|
||||
$lastPathwayEntryIndex = end($pathwayKeys);
|
||||
$pathway->setItemName($lastPathwayEntryIndex, $menuitem->title);
|
||||
//$pathway->setItemName(1, $menuitem->title);
|
||||
}
|
||||
$pathway->addItem('Att:'.$event->title);
|
||||
|
||||
// Emailaddress
|
||||
$enableemailaddress = $params->get('enableemailaddress', 0);
|
||||
|
||||
$print_link = 'index.php?option=com_jem&view=attendees&layout=print&task=print&tmpl=component&id='.$event->id;
|
||||
$backlink = 'attendees';
|
||||
|
||||
|
||||
//build filter selectlist
|
||||
$filters = array();
|
||||
if ($settings->get('global_regname', '1')) {
|
||||
$filters[] = HTMLHelper::_('select.option', '1', Text::_('COM_JEM_NAME'));
|
||||
} else {
|
||||
$filters[] = HTMLHelper::_('select.option', '2', Text::_('COM_JEM_USERNAME'));
|
||||
}
|
||||
$lists['filter'] = HTMLHelper::_('select.genericlist', $filters, 'filter', array('size'=>'1','class'=>'inputbox'), 'value', 'text', $filter);
|
||||
|
||||
// search filter
|
||||
$lists['search'] = $search;
|
||||
|
||||
// attendee status
|
||||
$options = array(HTMLHelper::_('select.option', -2, Text::_('COM_JEM_ATT_FILTER_ALL')),
|
||||
HTMLHelper::_('select.option', 0, Text::_('COM_JEM_ATT_FILTER_INVITED')),
|
||||
HTMLHelper::_('select.option', -1, Text::_('COM_JEM_ATT_FILTER_NOT_ATTENDING')),
|
||||
HTMLHelper::_('select.option', 1, Text::_('COM_JEM_ATT_FILTER_ATTENDING')),
|
||||
HTMLHelper::_('select.option', 2, Text::_('COM_JEM_ATT_FILTER_WAITING'))) ;
|
||||
$lists['status'] = HTMLHelper::_('select.genericlist', $options, 'filter_status', array('class'=>'inputbox','onChange'=>'this.form.submit();'), 'value', 'text', $filter_status);
|
||||
|
||||
// table ordering
|
||||
$lists['order_Dir'] = $filter_order_Dir;
|
||||
$lists['order'] = $filter_order;
|
||||
|
||||
//assign to template
|
||||
$this->params = $params;
|
||||
$this->lists = $lists;
|
||||
$this->enableemailaddress = $enableemailaddress;
|
||||
$this->rows = $rows;
|
||||
$this->pagination = $pagination;
|
||||
$this->event = $event;
|
||||
$this->pagetitle = $pagetitle;
|
||||
$this->backlink = $backlink;
|
||||
$this->print_link = $print_link;
|
||||
$this->item = $menuitem;
|
||||
$this->action = $uri->toString();
|
||||
$this->pageclass_sfx = $pageclass_sfx ? htmlspecialchars($pageclass_sfx) : $pageclass_sfx;
|
||||
|
||||
|
||||
parent::display($tpl);
|
||||
}
|
||||
|
||||
/**
|
||||
* Prepares the print screen
|
||||
*
|
||||
* @param $tpl
|
||||
*/
|
||||
protected function _displayprint($tpl = null)
|
||||
{
|
||||
$app = Factory::getApplication();
|
||||
$document = $app->getDocument();
|
||||
$params = $app->getParams();
|
||||
|
||||
// Load css
|
||||
JemHelper::loadCss('backend');
|
||||
JemHelper::loadCss('jem');
|
||||
JemHelper::loadCss('print');
|
||||
JemHelper::loadCustomTag();
|
||||
|
||||
$document->setMetaData('robots', 'noindex, nofollow');
|
||||
|
||||
// Emailaddress
|
||||
$enableemailaddress = $params->get('enableemailaddress', 0);
|
||||
|
||||
$rows = $this->get('Data');
|
||||
$event = $this->get('Event');
|
||||
|
||||
//assign data to template
|
||||
$this->rows = $rows;
|
||||
$this->event = $event;
|
||||
$this->enableemailaddress = $enableemailaddress;
|
||||
|
||||
parent::display($tpl);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates the output for the users select listing
|
||||
*/
|
||||
protected function _displayaddusers($tpl)
|
||||
{
|
||||
$app = Factory::getApplication();
|
||||
$document = $app->getDocument();
|
||||
$jinput = $app->input;
|
||||
// $db = Factory::getContainer()->get('DatabaseDriver');
|
||||
$model = $this->getModel();
|
||||
$event = $this->get('Event');
|
||||
|
||||
// no filters, hard-coded
|
||||
$filter_order = 'usr.name';
|
||||
$filter_order_Dir = '';
|
||||
$filter_type = '';
|
||||
$search = $app->getUserStateFromRequest('com_jem.selectusers.filter_search', 'filter_search', '', 'string');
|
||||
// $limitstart = $jinput->get('limitstart', '0', 'int');
|
||||
// $limit = $app->getUserStateFromRequest('com_jem.selectusers.limit', 'limit', $this->jemsettings->display_num, 'int');
|
||||
// $eventId = !empty($event->id) ? $event->id : 0;
|
||||
|
||||
// Load css
|
||||
JemHelper::loadCss('jem');
|
||||
|
||||
$document->setTitle(Text::_('COM_JEM_SELECT_USERS_AND_STATUS'));
|
||||
|
||||
// Get/Create the model
|
||||
// $model->setState('event.id', $eventId);
|
||||
$rows = $this->get('Users');
|
||||
$pagination = $this->get('UsersPagination');
|
||||
|
||||
// table ordering
|
||||
$lists['order_Dir'] = $filter_order_Dir;
|
||||
$lists['order'] = $filter_order;
|
||||
|
||||
//Build search filter - unused
|
||||
$filters = array();
|
||||
$filters[] = HTMLHelper::_('select.option', '1', Text::_('COM_JEM_NAME'));
|
||||
$searchfilter = HTMLHelper::_('select.genericlist', $filters, 'filter_type', array('size'=>'1','class'=>'inputbox'), 'value', 'text', $filter_type);
|
||||
|
||||
// search filter - unused
|
||||
$lists['search'] = $search;
|
||||
|
||||
//assign data to template
|
||||
$this->searchfilter = $searchfilter;
|
||||
$this->lists = $lists;
|
||||
$this->rows = $rows;
|
||||
$this->pagination = $pagination;
|
||||
$this->event = $event;
|
||||
|
||||
parent::display($tpl);
|
||||
}
|
||||
}
|
||||
?>
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user