Файловый менеджер - Редактировать - /home/wuectly/www/03cbe/list.php.tar
Назад
home/wuectly/www/libraries/cms/html/list.php 0000604 00000015271 15245530311 0015203 0 ustar 00 <?php /** * @package Joomla.Libraries * @subpackage HTML * * @copyright (C) 2007 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('JPATH_PLATFORM') or die; use Joomla\String\StringHelper; /** * Utility class for creating different select lists * * @since 1.5 */ abstract class JHtmlList { /** * Build the select list to choose an image * * @param string $name The name of the field * @param string $active The selected item * @param string $javascript Alternative javascript * @param string $directory Directory the images are stored in * @param string $extensions Allowed extensions * * @return array Image names * * @since 1.5 */ public static function images($name, $active = null, $javascript = null, $directory = null, $extensions = 'bmp|gif|jpg|png') { if (!$directory) { $directory = '/images/'; } if (!$javascript) { $javascript = "onchange=\"if (document.forms.adminForm." . $name . ".options[selectedIndex].value!='') {document.imagelib.src='..$directory' + document.forms.adminForm." . $name . ".options[selectedIndex].value} else {document.imagelib.src='media/system/images/blank.png'}\""; } $imageFiles = new DirectoryIterator(JPATH_SITE . '/' . $directory); $images = array(JHtml::_('select.option', '', JText::_('JOPTION_SELECT_IMAGE'))); foreach ($imageFiles as $file) { $fileName = $file->getFilename(); if (!$file->isFile()) { continue; } if (preg_match('#(' . $extensions . ')$#', $fileName)) { $images[] = JHtml::_('select.option', $fileName); } } $images = JHtml::_( 'select.genericlist', $images, $name, array( 'list.attr' => 'class="inputbox" size="1" ' . $javascript, 'list.select' => $active, ) ); return $images; } /** * Returns an array of options * * @param string $query SQL with 'ordering' AS value and 'name field' AS text * @param integer $chop The length of the truncated headline * * @return array An array of objects formatted for JHtml list processing * * @since 1.5 */ public static function genericordering($query, $chop = 30) { $db = JFactory::getDbo(); $options = array(); $db->setQuery($query); $items = $db->loadObjectList(); if (empty($items)) { $options[] = JHtml::_('select.option', 1, JText::_('JOPTION_ORDER_FIRST')); return $options; } $options[] = JHtml::_('select.option', 0, '0 ' . JText::_('JOPTION_ORDER_FIRST')); for ($i = 0, $n = count($items); $i < $n; $i++) { $items[$i]->text = JText::_($items[$i]->text); if (StringHelper::strlen($items[$i]->text) > $chop) { $text = StringHelper::substr($items[$i]->text, 0, $chop) . '...'; } else { $text = $items[$i]->text; } $options[] = JHtml::_('select.option', $items[$i]->value, $items[$i]->value . '. ' . $text); } $options[] = JHtml::_('select.option', $items[$i - 1]->value + 1, ($items[$i - 1]->value + 1) . ' ' . JText::_('JOPTION_ORDER_LAST')); return $options; } /** * Build the select list for Ordering derived from a query * * @param integer $name The scalar value * @param string $query The query * @param string $attribs HTML tag attributes * @param string $selected The selected item * @param integer $neworder 1 if new and first, -1 if new and last, 0 or null if existing item * * @return string HTML markup for the select list * * @since 1.6 */ public static function ordering($name, $query, $attribs = null, $selected = null, $neworder = null) { if (empty($attribs)) { $attribs = 'class="inputbox" size="1"'; } if (empty($neworder)) { $orders = JHtml::_('list.genericordering', $query); $html = JHtml::_('select.genericlist', $orders, $name, array('list.attr' => $attribs, 'list.select' => (int) $selected)); } else { if ($neworder > 0) { $text = JText::_('JGLOBAL_NEWITEMSLAST_DESC'); } elseif ($neworder <= 0) { $text = JText::_('JGLOBAL_NEWITEMSFIRST_DESC'); } $html = '<input type="hidden" name="' . $name . '" value="' . (int) $selected . '" /><span class="readonly">' . $text . '</span>'; } return $html; } /** * Select list of active users * * @param string $name The name of the field * @param string $active The active user * @param integer $nouser If set include an option to select no user * @param string $javascript Custom javascript * @param string $order Specify a field to order by * * @return string The HTML for a list of users list of users * * @since 1.5 */ public static function users($name, $active, $nouser = 0, $javascript = null, $order = 'name') { $db = JFactory::getDbo(); $query = $db->getQuery(true) ->select('u.id AS value, u.name AS text') ->from('#__users AS u') ->join('LEFT', '#__user_usergroup_map AS m ON m.user_id = u.id') ->where('u.block = 0') ->order($order) ->group('u.id'); $db->setQuery($query); if ($nouser) { $users[] = JHtml::_('select.option', '0', JText::_('JOPTION_NO_USER')); $users = array_merge($users, $db->loadObjectList()); } else { $users = $db->loadObjectList(); } $users = JHtml::_( 'select.genericlist', $users, $name, array( 'list.attr' => 'class="inputbox" size="1" ' . $javascript, 'list.select' => $active, ) ); return $users; } /** * Select list of positions - generally used for location of images * * @param string $name Name of the field * @param string $active The active value * @param string $javascript Alternative javascript * @param boolean $none Null if not assigned * @param boolean $center Null if not assigned * @param boolean $left Null if not assigned * @param boolean $right Null if not assigned * @param boolean $id Null if not assigned * * @return array The positions * * @since 1.5 */ public static function positions($name, $active = null, $javascript = null, $none = true, $center = true, $left = true, $right = true, $id = false) { $pos = array(); if ($none) { $pos[''] = JText::_('JNONE'); } if ($center) { $pos['center'] = JText::_('JGLOBAL_CENTER'); } if ($left) { $pos['left'] = JText::_('JGLOBAL_LEFT'); } if ($right) { $pos['right'] = JText::_('JGLOBAL_RIGHT'); } $positions = JHtml::_( 'select.genericlist', $pos, $name, array( 'id' => $id, 'list.attr' => 'class="inputbox" size="1"' . $javascript, 'list.select' => $active, 'option.key' => null, ) ); return $positions; } } home/wuectly/www/plugins/fields/list/list.php 0000604 00000002040 15245611162 0015375 0 ustar 00 <?php /** * @package Joomla.Plugin * @subpackage Fields.List * * @copyright (C) 2017 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; JLoader::import('components.com_fields.libraries.fieldslistplugin', JPATH_ADMINISTRATOR); /** * Fields list Plugin * * @since 3.7.0 */ class PlgFieldsList extends FieldsListPlugin { /** * Prepares the field * * @param string $context The context. * @param stdclass $item The item. * @param stdclass $field The field. * * @return object * * @since 3.9.2 */ public function onCustomFieldsPrepareField($context, $item, $field) { // Check if the field should be processed if (!$this->isTypeSupported($field->type)) { return; } // The field's rawvalue should be an array if (!is_array($field->rawvalue)) { $field->rawvalue = (array) $field->rawvalue; } return parent::onCustomFieldsPrepareField($context, $item, $field); } } home/wuectly/www/plugins/fields/list/tmpl/list.php 0000604 00000001130 15245613243 0016352 0 ustar 00 <?php /** * @package Joomla.Plugin * @subpackage Fields.List * * @copyright (C) 2017 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; $fieldValue = $field->value; if ($fieldValue == '') { return; } $fieldValue = (array) $fieldValue; $texts = array(); $options = $this->getOptionsFromField($field); foreach ($options as $value => $name) { if (in_array((string) $value, $fieldValue)) { $texts[] = JText::_($name); } } echo htmlentities(implode(', ', $texts)); home/wuectly/www/components/com_jce/editor/plugins/style/tmpl/list.php 0000604 00000002233 15245626653 0022361 0 ustar 00 <?php /** * @package JCE * @subpackage Editor * * @copyright Copyright (c) 2009-2024 Ryan Demmer. All rights reserved * @license GNU General Public License version 2 or later; see LICENSE.txt */ \defined('_JEXEC') or die; use Joomla\CMS\Language\Text; ?> <div class="uk-form-row uk-grid uk-grid-small"> <label class="uk-form-label uk-width-2-10" for="list_type"><?php echo Text::_('WF_STYLES_LIST_TYPE'); ?></label> <div class="uk-form-controls uk-width-4-10"> <select id="list_type" name="list_type"></select> </div> </div> <div class="uk-form-row uk-grid uk-grid-small"> <label class="uk-form-label uk-width-2-10" for="list_position"><?php echo Text::_('WF_STYLES_POSITION'); ?></label> <div class="uk-form-controls uk-width-4-10"> <select id="list_position" name="list_position"></select> </div> </div> <div class="uk-form-row uk-grid uk-grid-small"> <label class="uk-form-label uk-width-2-10" for="list_bullet_image"><?php echo Text::_('WF_STYLES_BULLET_IMAGE'); ?></label> <div class="uk-form-controls uk-width-8-10"> <input id="list_bullet_image" name="list_bullet_image" type="text" class="browser image" /> </div> </div> home/wuectly/www/layouts/joomla/pagination/list.php 0000604 00000001275 15245630152 0016616 0 ustar 00 <?php /** * @package Joomla.Site * @subpackage Layout * * @copyright (C) 2016 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; $list = $displayData['list']; ?> <ul> <li class="pagination-start"><?php echo $list['start']['data']; ?></li> <li class="pagination-prev"><?php echo $list['previous']['data']; ?></li> <?php foreach ($list['pages'] as $page) : ?> <?php echo '<li>' . $page['data'] . '</li>'; ?> <?php endforeach; ?> <li class="pagination-next"><?php echo $list['next']['data']; ?></li> <li class="pagination-end"><?php echo $list['end']['data']; ?></li> </ul> home/wuectly/www/libraries/fof/form/field/list.php 0000604 00000023506 15245657553 0016277 0 ustar 00 <?php /** * @package FrameworkOnFramework * @subpackage form * @copyright Copyright (C) 2010-2016 Nicholas K. Dionysopoulos / Akeeba Ltd. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt * @note This file has been modified by the Joomla! Project and no longer reflects the original work of its author. */ // Protect from unauthorized access defined('FOF_INCLUDED') or die; JFormHelper::loadFieldClass('list'); /** * Form Field class for FOF * Supports a generic list of options. * * @package FrameworkOnFramework * @since 2.0 */ class FOFFormFieldList extends JFormFieldList implements FOFFormField { protected $static; protected $repeatable; /** @var FOFTable The item being rendered in a repeatable form field */ public $item; /** @var int A monotonically increasing number, denoting the row number in a repeatable view */ public $rowid; /** * Method to get certain otherwise inaccessible properties from the form field object. * * @param string $name The property name for which to the the value. * * @return mixed The property value or null. * * @since 2.0 */ public function __get($name) { switch ($name) { case 'static': if (empty($this->static)) { $this->static = $this->getStatic(); } return $this->static; break; case 'repeatable': if (empty($this->repeatable)) { $this->repeatable = $this->getRepeatable(); } return $this->repeatable; break; default: return parent::__get($name); } } /** * Get the rendering of this field type for static display, e.g. in a single * item view (typically a "read" task). * * @since 2.0 * * @return string The field HTML */ public function getStatic() { $class = $this->element['class'] ? ' class="' . (string) $this->element['class'] . '"' : ''; return '<span id="' . $this->id . '" ' . $class . '>' . htmlspecialchars(self::getOptionName($this->getOptions(), $this->value), ENT_COMPAT, 'UTF-8') . '</span>'; } /** * Get the rendering of this field type for a repeatable (grid) display, * e.g. in a view listing many item (typically a "browse" task) * * @since 2.0 * * @return string The field HTML */ public function getRepeatable() { $show_link = false; $link_url = ''; $class = $this->element['class'] ? (string) $this->element['class'] : ''; if ($this->element['show_link'] == 'true') { $show_link = true; } if ($this->element['url']) { $link_url = $this->element['url']; } else { $show_link = false; } if ($show_link && ($this->item instanceof FOFTable)) { $link_url = $this->parseFieldTags($link_url); } else { $show_link = false; } $html = '<span class="' . $this->id . ' ' . $class . '">'; if ($show_link) { $html .= '<a href="' . $link_url . '">'; } $html .= htmlspecialchars(self::getOptionName($this->getOptions(), $this->value), ENT_COMPAT, 'UTF-8'); if ($show_link) { $html .= '</a>'; } $html .= '</span>'; return $html; } /** * Gets the active option's label given an array of JHtml options * * @param array $data The JHtml options to parse * @param mixed $selected The currently selected value * @param string $optKey Key name * @param string $optText Value name * * @return mixed The label of the currently selected option */ public static function getOptionName($data, $selected = null, $optKey = 'value', $optText = 'text') { $ret = null; foreach ($data as $elementKey => &$element) { if (is_array($element)) { $key = $optKey === null ? $elementKey : $element[$optKey]; $text = $element[$optText]; } elseif (is_object($element)) { $key = $optKey === null ? $elementKey : $element->$optKey; $text = $element->$optText; } else { // This is a simple associative array $key = $elementKey; $text = $element; } if (is_null($ret)) { $ret = $text; } elseif ($selected == $key) { $ret = $text; } } return $ret; } /** * Method to get the field options. * * Ordering is disabled by default. You can enable ordering by setting the * 'order' element in your form field. The other order values are optional. * * - order What to order. Possible values: 'name' or 'value' (default = false) * - order_dir Order direction. Possible values: 'asc' = Ascending or 'desc' = Descending (default = 'asc') * - order_case_sensitive Order case sensitive. Possible values: 'true' or 'false' (default = false) * * @return array The field option objects. * * @since Ordering is available since FOF 2.1.b2. */ protected function getOptions() { // Ordering is disabled by default for backward compatibility $order = false; // Set default order direction $order_dir = 'asc'; // Set default value for case sensitive sorting $order_case_sensitive = false; if ($this->element['order'] && $this->element['order'] !== 'false') { $order = $this->element['order']; } if ($this->element['order_dir']) { $order_dir = $this->element['order_dir']; } if ($this->element['order_case_sensitive']) { // Override default setting when the form element value is 'true' if ($this->element['order_case_sensitive'] == 'true') { $order_case_sensitive = true; } } // Create a $sortOptions array in order to apply sorting $i = 0; $sortOptions = array(); foreach ($this->element->children() as $option) { $name = JText::alt(trim((string) $option), preg_replace('/[^a-zA-Z0-9_\-]/', '_', $this->fieldname)); $sortOptions[$i] = new stdClass; $sortOptions[$i]->option = $option; $sortOptions[$i]->value = $option['value']; $sortOptions[$i]->name = $name; $i++; } // Only order if it's set if ($order) { jimport('joomla.utilities.arrayhelper'); FOFUtilsArray::sortObjects($sortOptions, $order, $order_dir == 'asc' ? 1 : -1, $order_case_sensitive, false); } // Initialise the options $options = array(); // Get the field $options foreach ($sortOptions as $sortOption) { $option = $sortOption->option; $name = $sortOption->name; // Only add <option /> elements. if ($option->getName() != 'option') { continue; } $tmp = JHtml::_('select.option', (string) $option['value'], $name, 'value', 'text', ((string) $option['disabled'] == 'true')); // Set some option attributes. $tmp->class = (string) $option['class']; // Set some JavaScript option attributes. $tmp->onclick = (string) $option['onclick']; // Add the option object to the result set. $options[] = $tmp; } // Do we have a class and method source for our options? $source_file = empty($this->element['source_file']) ? '' : (string) $this->element['source_file']; $source_class = empty($this->element['source_class']) ? '' : (string) $this->element['source_class']; $source_method = empty($this->element['source_method']) ? '' : (string) $this->element['source_method']; $source_key = empty($this->element['source_key']) ? '*' : (string) $this->element['source_key']; $source_value = empty($this->element['source_value']) ? '*' : (string) $this->element['source_value']; $source_translate = empty($this->element['source_translate']) ? 'true' : (string) $this->element['source_translate']; $source_translate = in_array(strtolower($source_translate), array('true','yes','1','on')) ? true : false; $source_format = empty($this->element['source_format']) ? '' : (string) $this->element['source_format']; if ($source_class && $source_method) { // Maybe we have to load a file? if (!empty($source_file)) { $source_file = FOFTemplateUtils::parsePath($source_file, true); if (FOFPlatform::getInstance()->getIntegrationObject('filesystem')->fileExists($source_file)) { include_once $source_file; } } // Make sure the class exists if (class_exists($source_class, true)) { // ...and so does the option if (in_array($source_method, get_class_methods($source_class))) { // Get the data from the class if ($source_format == 'optionsobject') { $options = array_merge($options, $source_class::$source_method()); } else { // Get the data from the class $source_data = $source_class::$source_method(); // Loop through the data and prime the $options array foreach ($source_data as $k => $v) { $key = (empty($source_key) || ($source_key == '*')) ? $k : $v[$source_key]; $value = (empty($source_value) || ($source_value == '*')) ? $v : $v[$source_value]; if ($source_translate) { $value = JText::_($value); } $options[] = JHtml::_('select.option', $key, $value, 'value', 'text'); } } } } } reset($options); return $options; } /** * Replace string with tags that reference fields * * @param string $text Text to process * * @return string Text with tags replace */ protected function parseFieldTags($text) { $ret = $text; // Replace [ITEM:ID] in the URL with the item's key value (usually: // the auto-incrementing numeric ID) $keyfield = $this->item->getKeyName(); $replace = $this->item->$keyfield; $ret = str_replace('[ITEM:ID]', $replace, $ret); // Replace the [ITEMID] in the URL with the current Itemid parameter $ret = str_replace('[ITEMID]', JFactory::getApplication()->input->getInt('Itemid', 0), $ret); // Replace other field variables in the URL $fields = $this->item->getTableFields(); foreach ($fields as $fielddata) { $fieldname = $fielddata->Field; if (empty($fieldname)) { $fieldname = $fielddata->column_name; } $search = '[ITEM:' . strtoupper($fieldname) . ']'; $replace = $this->item->$fieldname; $ret = str_replace($search, $replace, $ret); } return $ret; } } home/wuectly/www/components/com_icagenda/models/list.php 0000604 00000037054 15245657555 0017571 0 ustar 00 <?php /** *------------------------------------------------------------------------------ * iCagenda v3 by Jooml!C - Events Management Extension for Joomla! 2.5 / 3.x *------------------------------------------------------------------------------ * @package com_icagenda * @copyright Copyright (c)2012-2015 Cyril Rezé, Jooml!C - All rights reserved * * @license GNU General Public License version 3 or later; see LICENSE.txt * @author Cyril Rezé (Lyr!C) * @link http://www.joomlic.com * * @version 3.5.4 2015-04-10 * @since 1.0 *------------------------------------------------------------------------------ */ // No direct access to this file defined('_JEXEC') or die(); jimport( 'joomla.filesystem.path' ); // Load file helpers if (!class_exists('iCModelItem')) require(JPATH_COMPONENT . '/helpers/icmodel.php'); if (!class_exists('iCModeliChelper')) require(JPATH_COMPONENT . '/helpers/ichelper.php'); /** * icagenda Model */ class icagendaModelList extends iCModelItem { /** * Get Form - Registration * * @since 3.4.1 */ public function getForm() { $form = JForm::getInstance('submit', JPATH_COMPONENT . '/models/forms/registration.xml'); if (empty($form)) { return false; } return $form; } /** * Method to auto-populate the model state. * * Note. Calling getState in this method will result in recursion. * * @since 3.6 */ protected function populateState() { // Initialise variables. $app = JFactory::getApplication(); $context = $app->input->get('option') . '.' . $app->input->get('view'); // Load the filter state. $search = $app->getUserStateFromRequest($context.'.filter.search', 'filter_search'); //Omit double (white-)spaces and set state $this->setState('filter.search', preg_replace('/\s+/',' ', $search)); //Filter (dropdown) state $state = $app->getUserStateFromRequest($context.'.filter.state', 'filter_state', '', 'string'); $this->setState('filter.state', $state); //Filter (dropdown) company $category = $app->getUserStateFromRequest($context.'.filter.category', 'filter_category', '', 'string'); $this->setState('filter.category', $category); } /** * Get Params * * @since 1.0 */ public function getData() { $this->startiCModel(); // Import params $app = JFactory::getApplication(); $icpar = $app->getParams(); // Get Current Layout $jlayout = $app->input->getCmd('layout', ''); // $layouts_array = array('event', 'registration', 'actions'); // $layout = in_array($jlayout, $layouts_array) ? $jlayout : ''; $user = JFactory::getUser(); $userid = $user->get('id'); // Get Registration Post Data // TO BE REMOVED WHEN NEW REGISTRATION VIEW $regpost = JRequest::get('post'); // Process registration function to save data (icmodel.php) // TO BE REMOVED WHEN NEW REGISTRATION VIEW if ($app->input->get('event')) { $this->registration($regpost); } // filters $this->addFilter('state', 1); $id = JRequest::getInt('id'); // if ( $jlayout // && ( ! $id) || ( ! preg_match("/^[0-9]+$/", $id))) // { // JError::raiseError('404',JTEXT::_('JERROR_LAYOUT_PAGE_NOT_FOUND')); // return false; // } $Itemid = JRequest::getInt('Itemid'); if ($id) { $this->addFilter('id', $id); } else { if(JRequest::getVar('key', '', 'post')) $this->addFilter('key', JRequest::getVar('key', '','post')); if($icpar->get('mcatid')) $this->addFilter('e.catid', $icpar->get('mcatid')); if($icpar->get('place')) $this->addFilter('e.place', $icpar->get('place')); if($icpar->get('address')) $this->addFilter('e.address', $icpar->get('address')); if($icpar->get('time')) $this->addFilter('next', $icpar->get('time')); } $this->addOption('Itemid', $icpar->get('itemid', $Itemid)); // Get Option Menu and Global for Type of Display for List of Events (all dates, or only next date, for each event) $this->addOption('datesDisplay', $icpar->get('datesDisplay', 1)); $this->addOption('filterTime', $icpar->get('time', 1)); // Menu Options $this->addOption('number', $icpar->get('number', 5)); // App Options $this->addOption('orderby', $icpar->get('orderby', 2)); $this->addOption('mcatid', $icpar->get('mcatid', array('0'))); // $this->addOption('format', $icpar->get('format', 0)); // Global Options $this->addOption('addthis', $icpar->get('addthis', '')); $this->addOption('atevent', $icpar->get('atevent', 1)); $this->addOption('atfloat', $icpar->get('atfloat', '')); $this->addOption('aticon', $icpar->get('aticon', '')); $this->addOption('emailRequired', $icpar->get('emailRequired', 0)); $this->addOption('limit', $icpar->get('limit', 100)); $this->addOption('limitGlobal', $icpar->get('limitGlobal', 0)); $this->addOption('maxRlist', $icpar->get('maxRlist', '')); $this->addOption('participantList', $icpar->get('participantList', '')); $this->addOption('participantSlide', $icpar->get('participantSlide', '')); $this->addOption('phoneRequired', $icpar->get('phoneRequired', 0)); $this->addOption('RegButtonText', $icpar->get('RegButtonText', '')); $this->addOption('statutReg', $icpar->get('statutReg', '')); $this->addOption('timeformat', $icpar->get('timeformat', 1)); $this->addOption('m_width', $icpar->get('m_width', '100%')); $this->addOption('m_height', $icpar->get('m_height', '300px')); // $this->addOption('date_format', $icpar->get('date_format', '')); // $this->addOption('date_separator', $icpar->get('date_separator', ' ')); if($icpar->get('participantDisplay')) $this->addOption('participantDisplay', $icpar->get('participantDisplay')); if($icpar->get('fullListColumns')) $this->addOption('fullListColumns', $icpar->get('fullListColumns')); if($icpar->get('targetLink')) $this->addOption('targetLink', $icpar->get('targetLink')); if($icpar->get('arrowtext')) $this->addOption('arrowtext', $icpar->get('arrowtext')); if($icpar->get('accessReg')) $this->addOption('accessReg', $icpar->get('accessReg')); if($icpar->get('limitRegEmail')) $this->addOption('limitRegEmail', $icpar->get('limitRegEmail')); if($icpar->get('limitRegDate')) $this->addOption('limitRegDate', $icpar->get('limitRegDate')); if($icpar->get('maxReg')) $this->addOption('maxReg', $icpar->get('maxReg')); if($icpar->get('regEmailUser')) $this->addOption('regEmailUser', $icpar->get('regEmailUser')); if($icpar->get('emailUserSubjectPeriod')) $this->addOption('emailUserSubjectPeriod', $icpar->get('emailUserSubjectPeriod')); if($icpar->get('emailUserBodyPeriod')) $this->addOption('emailUserBodyPeriod', $icpar->get('emailUserBodyPeriod')); if($icpar->get('emailUserSubjectDate')) $this->addOption('emailUserSubjectDate', $icpar->get('emailUserSubjectDate')); if($icpar->get('emailUserBodyDate')) $this->addOption('emailUserBodyDate', $icpar->get('emailUserBodyDate')); if($icpar->get('headerList')) $this->addOption('headerList', $icpar->get('headerList')); // Struture $structure = array( // 'container'=>array( // 'header'=>'', // 'navigator'=>'', // ), 'items' => array( 'item' => array( 'accessReg'=>'', 'approval'=>'', 'eventAllDates'=>'', 'eventHasPeriod'=>'', 'evtParams'=>'', 'infoDetails'=>'', 'statutReg'=>'', 'titleFormat'=>'', 'BackArrow'=>'', 'BackURL'=>'', 'id'=>'', 'Itemid'=>'', 'metaTitle'=>'', 'metaDesc'=>'', 'metaAsShortDesc'=>'', 'state'=>'', 'weekday'=>'', 'weekdayShort'=>'', 'timeformat'=>'', 'participantList'=>'', 'participantSlide'=>'', 'participantDisplay'=>'', 'fullListColumns'=>'', 'participantListTitle'=>'', 'arrowtext'=>'', 'navposition'=>'', 'headerList'=>'', 'title'=>'', 'titlebar'=>'', 'ManagerIcons'=>'', 'url'=>NULL, 'Event_Link'=>'', 'cat_id'=>'', 'cat_title'=>'', 'cat_color'=>'', 'fontColor'=>'', 'cat_desc'=>'', 'shortdesc'=>'', 'desc'=>'', 'shortDescription'=>'', 'description'=>'', 'descShort'=>'', 'image'=>'', 'imageTag'=>'', 'file'=>'', 'fileTag'=>'', 'displaytime'=>'', 'next'=>'', 'nextDate'=>'', 'period'=>'', 'startdatetime'=>'', 'enddatetime'=>'', 'nextControl'=>'', 'start_datetime'=>'', 'end_datetime'=>'', 'dates'=>'', 'startDate'=>'', 'startDay'=>'', 'endDate'=>'', 'endDay'=>'', 'endMonth'=>'', 'endMonthNum'=>'', 'endYear'=>'', 'startTime'=>'', 'endTime'=>'', 'periodDates'=>'', 'dateText'=>'', 'periodDisplay'=>'', 'periodControl'=>'', 'weekdays'=>'', 'day'=>'', 'maxNbTickets'=>'', 'ticketsCouldBeBooked'=>'', 'registeredForThisDate'=>'', 'maxReg'=>'', 'maxRlist'=>'', 'emailRequired'=>'', 'phoneRequired'=>'', 'month'=>'', 'monthNum'=>'', 'year'=>'', 'yearShort'=>'', 'evenTime'=>'', 'dateFormat'=>'', 'datelistMkt'=>'', 'datelist'=>'', 'datelistUl'=>'', 'time'=>'', 'address'=>'', 'name'=>'', 'email'=>'', 'contact_name'=>'', 'contact_email'=>'', 'emailLink'=>'', 'phone'=>'', 'website'=>'', 'websiteLink'=>'', 'targetLink'=>'', 'place_name'=>'', 'place_desc'=>'', 'city'=>'', 'country'=>'', 'coordinate'=>'', 'lat'=>'', 'lng'=>'', 'map'=>'', 'share'=>'', 'share_event'=>'', 'limitRegEmail'=>'', 'limitRegDate'=>'', 'gcalendarUrl'=>'', 'yahoocalendarUrl'=>'', 'wlivecalendarUrl'=>'', 'registrations'=>'', 'registered'=>'', 'totalRegistered'=>'', 'registeredUsers'=>'', 'reg'=>'', 'regUrl'=>'', 'iCagendaRegForm'=>'', 'typeReg'=>'', 'regEmailUser'=>'', 'emailUserSubjectPeriod'=>'', 'emailUserBodyPeriod'=>'', 'emailUserSubjectDate'=>'', 'emailUserBodyDate'=>'', 'language'=>'', 'params'=>'', 'gcalendarLink'=>'', 'loadEventCustomFields'=>'', 'features'=>'', 'periodTest'=>'', // DEPRECATED 'titleLink'=>'', // DEPRECATED // REMOVED 3.5.3 'placeLeft'=>'', ) ) ); return $this->getItems($structure); } /** * Get Records. * * @return object list. * @since 3.3.8 */ public function getRecords() { // Get the current user for authorisation checks $user = JFactory::getUser(); // Get Params for current view $app = JFactory::getApplication(); $params = $app->getParams(); // Select the required fields from the table. $db = JFactory::getDBO(); $query = $db->getQuery(true); $query->select('e.*') ->from($db->qn('#__icagenda_events') . ' AS e'); // Join over the language $query->select('l.title AS language_title') ->join('LEFT', $db->quoteName('#__languages') . ' AS l ON l.lang_code = e.language'); // Join over the users for the checked out user. // $query->select('uc.name AS editor'); // $query->join('LEFT', '#__users AS uc ON uc.id=e.checked_out'); // Join over the asset groups. $query->select('ag.title AS access_level') ->join('LEFT', '#__viewlevels AS ag ON ag.id = e.access'); // Join the category $query->select('c.title AS category, c.color AS catcolor'); $query->join('LEFT', '#__icagenda_category AS c ON c.id = e.catid'); $query->where('c.state = 1'); // Join over the users for the author. // $query->select('ua.name AS author_name, ua.username AS author_username') // ->join('LEFT', '#__users AS ua ON ua.id = e.created_by'); // Filter by published state $query->where('e.state = 1'); // Event is approved $query->where('e.approval <> 1'); // Filter by access level. $access_levels = implode(',', $user->getAuthorisedViewLevels()); $query->where('e.access IN (' . $db->q($access_levels) . ')'); // ->where('c.access IN (' . $db->q($access_levels) . ')'); // To be added later, when access integrated to category // Filter by language $query->where('e.language in (' . $db->q(JFactory::getLanguage()->getTag()) . ',' . $db->q('*') . ')'); // Filter by Features $query->where(icagendaEventsData::getFeaturesFilter()); // Filter by dates $dates_filter = $params->get('time', 1); // Default Current and Upcoming Events // Get today date and datetime based on Joomla Config Timezone. $datetime_today = JHtml::date('now', 'Y-m-d H:i:s'); $date_today = JHtml::date('now', 'Y-m-d'); if (!empty($dates_filter)) { // COM_ICAGENDA_OPTION_TODAY_AND_UPCOMING if ($dates_filter == '1') { $where_current_upcoming = $db->qn('e.next') . ' >= ' . $db->q($date_today); $where_current_upcoming.= ' OR (' . $db->qn('e.next') . ' < ' . $db->q($datetime_today) . ' AND ' . $db->qn('e.startdate') . ' <> "0000-00-00 00:00:00" AND ' . $db->qn('e.enddate') . ' > ' . $db->q($datetime_today) . ')'; $query->where($where_current_upcoming); } // COM_ICAGENDA_OPTION_PAST elseif ($dates_filter == '2') { $where_past = '('; // Period dates with no weekdays filter $where_past.= $db->qn('e.next') . ' < ' . $db->q($datetime_today) . ')'; $where_past.= ' AND (' . $db->qn('e.enddate') . ' < ' . $db->q($datetime_today); $where_past.= ' )'; $query->where($where_past); } // COM_ICAGENDA_OPTION_FUTURE elseif ($dates_filter == '3') { $where_upcoming = '('; $where_upcoming.= $db->qn('e.next') . ' > ' . $db->q($datetime_today); $where_upcoming.= ' )'; $query->where($where_upcoming); } // COM_ICAGENDA_OPTION_TODAY elseif ($dates_filter == '4') { $where_today = '( '; // One day dates filter $where_today.= ' ('; $where_today.= ' (' . $db->qn('e.next') . ' >= ' . $db->q($datetime_today) . ')'; $where_today.= ' AND (' . $db->qn('e.next') . ' < ' . $db->q($date_today) . ' + INTERVAL 1 DAY)'; $where_today.= ' )'; // Period dates with no weekdays filter $where_today.= ' OR ( '; $where_today.= ' (' . $db->qn('e.next') . ' > ' . $db->q($date_today) . ')'; $where_today.= ' AND (' . $db->qn('e.weekdays') . ' = "")'; $where_today.= ' AND ' . $db->qn('e.enddate') . ' <> "0000-00-00 00:00:00" AND (' . $db->qn('e.enddate') . ' >= ' . $db->q($date_today) . ')'; $where_today.= ' AND ' . $db->qn('e.startdate') . ' <> "0000-00-00 00:00:00" AND (' . $db->qn('e.startdate') . ' < ' . $db->q($date_today) . ')'; $where_today.= ' )'; $where_today.= ' )'; $query->where($where_today); } } // Order Next Date DESC $orderby = $params->get('orderby', 2); // Default ASC $ordering = ($orderby == 1) ? 'DESC' : 'ASC'; $query->order('e.next ' . $ordering); // Tell the database connector what query to run. $db->setQuery($query); // Invoke the query or data retrieval helper. $db_list = $db->loadObjectList(); return $db_list; } /** * Load Google Maps Scripts. * * @since 3.5.0 */ public static function loadGMapScripts() { // Google Maps api V3 $document = JFactory::getDocument(); $scripts = array_keys($document->_scripts); $mapsgooglescriptFound = false; for ($i = 0; $i < count($scripts); $i++) { if ( stripos($scripts[$i], 'maps.googleapis.com') !== false && stripos($scripts[$i], 'maps.gstatic.com') !== false ) { $mapsgooglescriptFound = true; } } $doclang = JFactory::getDocument(); $curlang = $doclang->language; $lang = substr($curlang, 0, 2); if (!$mapsgooglescriptFound) { $document->addScript('https://maps.googleapis.com/maps/api/js?sensor=false&librairies=places&language=' . $lang); } JHtml::script( 'com_icagenda/icmap-front.js', false, true ); } /** * Get the return URL. * * @return string The return URL. * @since 1.0 */ public function getReturnPage() { return base64_encode($this->getState('return_page')); } }
| ver. 1.4 |
Github
|
.
| PHP 8.1.34 | Генерация страницы: 0 |
proxy
|
phpinfo
|
Настройка