Файловый менеджер - Редактировать - /home/wuectly/www/03cbe/view.html.php.tar
Назад
home/wuectly/www/components/com_content/views/featured/view.html.php 0000604 00000014344 15245556214 0022106 0 ustar 00 <?php /** * @package Joomla.Site * @subpackage com_content * * @copyright (C) 2006 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; /** * Frontpage View class * * @since 1.5 */ class ContentViewFeatured extends JViewLegacy { protected $state = null; protected $item = null; protected $items = null; protected $pagination = null; protected $lead_items = array(); protected $intro_items = array(); protected $link_items = array(); /** @deprecated 4.0 */ protected $columns = 1; /** * An instance of JDatabaseDriver. * * @var JDatabaseDriver * @since 3.6.3 */ protected $db; /** * Execute and display a template script. * * @param string $tpl The name of the template file to parse; automatically searches through the template paths. * * @return mixed A string if successful, otherwise an Error object. */ public function display($tpl = null) { $user = JFactory::getUser(); $state = $this->get('State'); $items = $this->get('Items'); $pagination = $this->get('Pagination'); // Flag indicates to not add limitstart=0 to URL $pagination->hideEmptyLimitstart = true; // Check for errors. if (count($errors = $this->get('Errors'))) { JError::raiseWarning(500, implode("\n", $errors)); return false; } $params = &$state->params; // PREPARE THE DATA // Get the metrics for the structural page layout. $numLeading = (int) $params->def('num_leading_articles', 1); $numIntro = (int) $params->def('num_intro_articles', 4); JPluginHelper::importPlugin('content'); // Compute the article slugs and prepare introtext (runs content plugins). foreach ($items as &$item) { $item->slug = $item->alias ? ($item->id . ':' . $item->alias) : $item->id; $item->catslug = $item->category_alias ? ($item->catid . ':' . $item->category_alias) : $item->catid; $item->parent_slug = $item->parent_alias ? ($item->parent_id . ':' . $item->parent_alias) : $item->parent_id; // No link for ROOT category if ($item->parent_alias === 'root') { $item->parent_slug = null; } $item->event = new stdClass; $dispatcher = JEventDispatcher::getInstance(); // Old plugins: Ensure that text property is available if (!isset($item->text)) { $item->text = $item->introtext; } $dispatcher->trigger('onContentPrepare', array ('com_content.featured', &$item, &$item->params, 0)); // Old plugins: Use processed text as introtext $item->introtext = $item->text; $results = $dispatcher->trigger('onContentAfterTitle', array('com_content.featured', &$item, &$item->params, 0)); $item->event->afterDisplayTitle = trim(implode("\n", $results)); $results = $dispatcher->trigger('onContentBeforeDisplay', array('com_content.featured', &$item, &$item->params, 0)); $item->event->beforeDisplayContent = trim(implode("\n", $results)); $results = $dispatcher->trigger('onContentAfterDisplay', array('com_content.featured', &$item, &$item->params, 0)); $item->event->afterDisplayContent = trim(implode("\n", $results)); } // Preprocess the breakdown of leading, intro and linked articles. // This makes it much easier for the designer to just interogate the arrays. $max = count($items); // The first group is the leading articles. $limit = $numLeading; for ($i = 0; $i < $limit && $i < $max; $i++) { $this->lead_items[$i] = &$items[$i]; } // The second group is the intro articles. $limit = $numLeading + $numIntro; // Order articles across, then down (or single column mode) for ($i = $numLeading; $i < $limit && $i < $max; $i++) { $this->intro_items[$i] = &$items[$i]; } $this->columns = max(1, $params->def('num_columns', 1)); $order = $params->def('multi_column_order', 1); if ($order == 0 && $this->columns > 1) { // Call order down helper $this->intro_items = ContentHelperQuery::orderDownColumns($this->intro_items, $this->columns); } // The remainder are the links. for ($i = $numLeading + $numIntro; $i < $max; $i++) { $this->link_items[$i] = &$items[$i]; } // Escape strings for HTML output $this->pageclass_sfx = htmlspecialchars($params->get('pageclass_sfx', '')); $this->params = &$params; $this->items = &$items; $this->pagination = &$pagination; $this->user = &$user; $this->db = JFactory::getDbo(); $this->_prepareDocument(); parent::display($tpl); } /** * Prepares the document. * * @return void */ protected function _prepareDocument() { $app = JFactory::getApplication(); $menus = $app->getMenu(); $title = null; // Because the application sets a default page title, // we need to get it from the menu item itself $menu = $menus->getActive(); if ($menu) { $this->params->def('page_heading', $this->params->get('page_title', $menu->title)); } else { $this->params->def('page_heading', JText::_('JGLOBAL_ARTICLES')); } $title = $this->params->get('page_title', ''); if (empty($title)) { $title = $app->get('sitename'); } elseif ($app->get('sitename_pagetitles', 0) == 1) { $title = JText::sprintf('JPAGETITLE', $app->get('sitename'), $title); } elseif ($app->get('sitename_pagetitles', 0) == 2) { $title = JText::sprintf('JPAGETITLE', $title, $app->get('sitename')); } $this->document->setTitle($title); if ($this->params->get('menu-meta_description')) { $this->document->setDescription($this->params->get('menu-meta_description')); } if ($this->params->get('menu-meta_keywords')) { $this->document->setMetadata('keywords', $this->params->get('menu-meta_keywords')); } if ($this->params->get('robots')) { $this->document->setMetadata('robots', $this->params->get('robots')); } // Add feed links if ($this->params->get('show_feed_link', 1)) { $link = '&format=feed&limitstart='; $attribs = array('type' => 'application/rss+xml', 'title' => 'RSS 2.0'); $this->document->addHeadLink(JRoute::_($link . '&type=rss'), 'alternate', 'rel', $attribs); $attribs = array('type' => 'application/atom+xml', 'title' => 'Atom 1.0'); $this->document->addHeadLink(JRoute::_($link . '&type=atom'), 'alternate', 'rel', $attribs); } } } home/wuectly/www/components/com_content/views/category/view.html.php 0000604 00000017367 15245556242 0022135 0 ustar 00 <?php /** * @package Joomla.Site * @subpackage com_content * * @copyright (C) 2006 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; use Joomla\CMS\Factory; use Joomla\CMS\Plugin\PluginHelper; use Joomla\Registry\Registry; /** * HTML View class for the Content component * * @since 1.5 */ class ContentViewCategory extends JViewCategory { /** * @var array Array of leading items for blog display * @since 3.2 */ protected $lead_items = array(); /** * @var array Array of intro (multicolumn display) items for blog display * @since 3.2 */ protected $intro_items = array(); /** * @var array Array of links in blog display * @since 3.2 */ protected $link_items = array(); /** * @var integer Number of columns in a multi column display * @since 3.2 * @deprecated 4.0 */ protected $columns = 1; /** * @var string The name of the extension for the category * @since 3.2 */ protected $extension = 'com_content'; /** * @var string Default title to use for page title * @since 3.2 */ protected $defaultPageTitle = 'JGLOBAL_ARTICLES'; /** * @var string The name of the view to link individual items to * @since 3.2 */ protected $viewName = 'article'; /** * Execute and display a template script. * * @param string $tpl The name of the template file to parse; automatically searches through the template paths. * * @return mixed A string if successful, otherwise an Error object. */ public function display($tpl = null) { parent::commonCategoryDisplay(); // Flag indicates to not add limitstart=0 to URL $this->pagination->hideEmptyLimitstart = true; // Prepare the data // Get the metrics for the structural page layout. $params = $this->params; $numLeading = $params->def('num_leading_articles', 1); $numIntro = $params->def('num_intro_articles', 4); $numLinks = $params->def('num_links', 4); $this->vote = PluginHelper::isEnabled('content', 'vote'); PluginHelper::importPlugin('content'); $dispatcher = JEventDispatcher::getInstance(); // Compute the article slugs and prepare introtext (runs content plugins). foreach ($this->items as $item) { $item->slug = $item->alias ? ($item->id . ':' . $item->alias) : $item->id; $item->parent_slug = $item->parent_alias ? ($item->parent_id . ':' . $item->parent_alias) : $item->parent_id; // No link for ROOT category if ($item->parent_alias === 'root') { $item->parent_slug = null; } $item->catslug = $item->category_alias ? ($item->catid . ':' . $item->category_alias) : $item->catid; $item->event = new stdClass; // Old plugins: Ensure that text property is available if (!isset($item->text)) { $item->text = $item->introtext; } $dispatcher->trigger('onContentPrepare', array ('com_content.category', &$item, &$item->params, 0)); // Old plugins: Use processed text as introtext $item->introtext = $item->text; $results = $dispatcher->trigger('onContentAfterTitle', array('com_content.category', &$item, &$item->params, 0)); $item->event->afterDisplayTitle = trim(implode("\n", $results)); $results = $dispatcher->trigger('onContentBeforeDisplay', array('com_content.category', &$item, &$item->params, 0)); $item->event->beforeDisplayContent = trim(implode("\n", $results)); $results = $dispatcher->trigger('onContentAfterDisplay', array('com_content.category', &$item, &$item->params, 0)); $item->event->afterDisplayContent = trim(implode("\n", $results)); } // For blog layouts, preprocess the breakdown of leading, intro and linked articles. // This makes it much easier for the designer to just interrogate the arrays. if ($params->get('layout_type') === 'blog' || $this->getLayout() === 'blog') { foreach ($this->items as $i => $item) { if ($i < $numLeading) { $this->lead_items[] = $item; } elseif ($i >= $numLeading && $i < $numLeading + $numIntro) { $this->intro_items[] = $item; } elseif ($i < $numLeading + $numIntro + $numLinks) { $this->link_items[] = $item; } else { continue; } } $this->columns = max(1, $params->def('num_columns', 1)); $order = $params->def('multi_column_order', 1); if ($order == 0 && $this->columns > 1) { // Call order down helper $this->intro_items = ContentHelperQuery::orderDownColumns($this->intro_items, $this->columns); } } // Because the application sets a default page title, // we need to get it from the menu item itself $app = Factory::getApplication(); $active = $app->getMenu()->getActive(); if ($active && $active->component == 'com_content' && isset($active->query['view'], $active->query['id']) && $active->query['view'] == 'category' && $active->query['id'] == $this->category->id) { $this->params->def('page_heading', $this->params->get('page_title', $active->title)); $title = $this->params->get('page_title', $active->title); } else { $this->params->def('page_heading', $this->category->title); $title = $this->category->title; $this->params->set('page_title', $title); } // Check for empty title and add site name if param is set if (empty($title)) { $title = $app->get('sitename'); } elseif ($app->get('sitename_pagetitles', 0) == 1) { $title = JText::sprintf('JPAGETITLE', $app->get('sitename'), $title); } elseif ($app->get('sitename_pagetitles', 0) == 2) { $title = JText::sprintf('JPAGETITLE', $title, $app->get('sitename')); } if (empty($title)) { $title = $this->category->title; } $this->document->setTitle($title); if ($this->category->metadesc) { $this->document->setDescription($this->category->metadesc); } elseif ($this->params->get('menu-meta_description')) { $this->document->setDescription($this->params->get('menu-meta_description')); } if ($this->category->metakey) { $this->document->setMetadata('keywords', $this->category->metakey); } elseif ($this->params->get('menu-meta_keywords')) { $this->document->setMetadata('keywords', $this->params->get('menu-meta_keywords')); } if ($this->params->get('robots')) { $this->document->setMetadata('robots', $this->params->get('robots')); } if (!is_object($this->category->metadata)) { $this->category->metadata = new Registry($this->category->metadata); } if (($app->get('MetaAuthor') == '1') && $this->category->get('author', '')) { $this->document->setMetaData('author', $this->category->get('author', '')); } $mdata = $this->category->metadata->toArray(); foreach ($mdata as $k => $v) { if ($v) { $this->document->setMetadata($k, $v); } } return parent::display($tpl); } /** * Prepares the document * * @return void */ protected function prepareDocument() { parent::prepareDocument(); $menu = $this->menu; $id = (int) @$menu->query['id']; if ($menu && (!isset($menu->query['option']) || $menu->query['option'] !== 'com_content' || $menu->query['view'] === 'article' || $id != $this->category->id)) { $path = array(array('title' => $this->category->title, 'link' => '')); $category = $this->category->getParent(); while ($category !== null && $category->id !== 'root' && (!isset($menu->query['option']) || $menu->query['option'] !== 'com_content' || $menu->query['view'] === 'article' || $id != $category->id)) { $path[] = array('title' => $category->title, 'link' => ContentHelperRoute::getCategoryRoute($category->id)); $category = $category->getParent(); } $path = array_reverse($path); foreach ($path as $item) { $this->pathway->addItem($item['title'], $item['link']); } } parent::addFeed(); } } home/wuectly/www/components/com_content/views/archive/view.html.php 0000604 00000013101 15245556242 0021717 0 ustar 00 <?php /** * @package Joomla.Site * @subpackage com_content * * @copyright (C) 2006 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; /** * HTML View class for the Content component * * @since 1.5 */ class ContentViewArchive extends JViewLegacy { protected $state = null; protected $item = null; protected $items = null; protected $pagination = null; protected $years = null; /** * Execute and display a template script. * * @param string $tpl The name of the template file to parse; automatically searches through the template paths. * * @return mixed A string if successful, otherwise an Error object. */ public function display($tpl = null) { $user = JFactory::getUser(); $state = $this->get('State'); $items = $this->get('Items'); $pagination = $this->get('Pagination'); // Flag indicates to not add limitstart=0 to URL $pagination->hideEmptyLimitstart = true; // Get the page/component configuration $params = &$state->params; JPluginHelper::importPlugin('content'); foreach ($items as $item) { $item->catslug = $item->category_alias ? ($item->catid . ':' . $item->category_alias) : $item->catid; $item->parent_slug = $item->parent_alias ? ($item->parent_id . ':' . $item->parent_alias) : $item->parent_id; // No link for ROOT category if ($item->parent_alias === 'root') { $item->parent_slug = null; } $item->event = new stdClass; $dispatcher = JEventDispatcher::getInstance(); // Old plugins: Ensure that text property is available if (!isset($item->text)) { $item->text = $item->introtext; } $dispatcher->trigger('onContentPrepare', array ('com_content.archive', &$item, &$item->params, 0)); // Old plugins: Use processed text as introtext $item->introtext = $item->text; $results = $dispatcher->trigger('onContentAfterTitle', array('com_content.archive', &$item, &$item->params, 0)); $item->event->afterDisplayTitle = trim(implode("\n", $results)); $results = $dispatcher->trigger('onContentBeforeDisplay', array('com_content.archive', &$item, &$item->params, 0)); $item->event->beforeDisplayContent = trim(implode("\n", $results)); $results = $dispatcher->trigger('onContentAfterDisplay', array('com_content.archive', &$item, &$item->params, 0)); $item->event->afterDisplayContent = trim(implode("\n", $results)); } $form = new stdClass; // Month Field $months = array( '' => JText::_('COM_CONTENT_MONTH'), '1' => JText::_('JANUARY_SHORT'), '2' => JText::_('FEBRUARY_SHORT'), '3' => JText::_('MARCH_SHORT'), '4' => JText::_('APRIL_SHORT'), '5' => JText::_('MAY_SHORT'), '6' => JText::_('JUNE_SHORT'), '7' => JText::_('JULY_SHORT'), '8' => JText::_('AUGUST_SHORT'), '9' => JText::_('SEPTEMBER_SHORT'), '10' => JText::_('OCTOBER_SHORT'), '11' => JText::_('NOVEMBER_SHORT'), '12' => JText::_('DECEMBER_SHORT') ); $form->monthField = JHtml::_( 'select.genericlist', $months, 'month', array( 'list.attr' => 'size="1" class="inputbox"', 'list.select' => $state->get('filter.month'), 'option.key' => null ) ); // Year Field $this->years = $this->getModel()->getYears(); $years = array(); $years[] = JHtml::_('select.option', null, JText::_('JYEAR')); for ($i = 0, $iMax = count($this->years); $i < $iMax; $i++) { $years[] = JHtml::_('select.option', $this->years[$i], $this->years[$i]); } $form->yearField = JHtml::_( 'select.genericlist', $years, 'year', array('list.attr' => 'size="1" class="inputbox"', 'list.select' => $state->get('filter.year')) ); $form->limitField = $pagination->getLimitBox(); // Escape strings for HTML output $this->pageclass_sfx = htmlspecialchars($params->get('pageclass_sfx', '')); $this->filter = $state->get('list.filter'); $this->form = &$form; $this->items = &$items; $this->params = &$params; $this->user = &$user; $this->pagination = &$pagination; $this->pagination->setAdditionalUrlParam('month', $state->get('filter.month')); $this->pagination->setAdditionalUrlParam('year', $state->get('filter.year')); $this->_prepareDocument(); parent::display($tpl); } /** * Prepares the document * * @return void */ protected function _prepareDocument() { $app = JFactory::getApplication(); $menus = $app->getMenu(); $title = null; // Because the application sets a default page title, // we need to get it from the menu item itself $menu = $menus->getActive(); if ($menu) { $this->params->def('page_heading', $this->params->get('page_title', $menu->title)); } else { $this->params->def('page_heading', JText::_('JGLOBAL_ARTICLES')); } $title = $this->params->get('page_title', ''); if (empty($title)) { $title = $app->get('sitename'); } elseif ($app->get('sitename_pagetitles', 0) == 1) { $title = JText::sprintf('JPAGETITLE', $app->get('sitename'), $title); } elseif ($app->get('sitename_pagetitles', 0) == 2) { $title = JText::sprintf('JPAGETITLE', $title, $app->get('sitename')); } $this->document->setTitle($title); if ($this->params->get('menu-meta_description')) { $this->document->setDescription($this->params->get('menu-meta_description')); } if ($this->params->get('menu-meta_keywords')) { $this->document->setMetadata('keywords', $this->params->get('menu-meta_keywords')); } if ($this->params->get('robots')) { $this->document->setMetadata('robots', $this->params->get('robots')); } } } home/wuectly/www/components/com_content/views/article/view.html.php 0000604 00000024244 15245556250 0021732 0 ustar 00 <?php /** * @package Joomla.Site * @subpackage com_content * * @copyright (C) 2006 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; /** * HTML Article View class for the Content component * * @since 1.5 */ class ContentViewArticle extends JViewLegacy { protected $item; protected $params; protected $print; protected $state; protected $user; /** * Execute and display a template script. * * @param string $tpl The name of the template file to parse; automatically searches through the template paths. * * @return mixed A string if successful, otherwise an Error object. */ public function display($tpl = null) { $app = JFactory::getApplication(); $user = JFactory::getUser(); $dispatcher = JEventDispatcher::getInstance(); $this->item = $this->get('Item'); $this->print = $app->input->getBool('print'); $this->state = $this->get('State'); $this->user = $user; // Check for errors. if (count($errors = $this->get('Errors'))) { JError::raiseWarning(500, implode("\n", $errors)); return false; } // Create a shortcut for $item. $item = $this->item; $item->tagLayout = new JLayoutFile('joomla.content.tags'); // Add router helpers. $item->slug = $item->alias ? ($item->id . ':' . $item->alias) : $item->id; $item->catslug = $item->category_alias ? ($item->catid . ':' . $item->category_alias) : $item->catid; $item->parent_slug = $item->parent_alias ? ($item->parent_id . ':' . $item->parent_alias) : $item->parent_id; // No link for ROOT category if ($item->parent_alias === 'root') { $item->parent_slug = null; } // TODO: Change based on shownoauth $item->readmore_link = JRoute::_(ContentHelperRoute::getArticleRoute($item->slug, $item->catid, $item->language)); // Merge article params. If this is single-article view, menu params override article params // Otherwise, article params override menu item params $this->params = $this->state->get('params'); $active = $app->getMenu()->getActive(); $temp = clone $this->params; // Check to see which parameters should take priority if ($active) { $currentLink = $active->link; // If the current view is the active item and an article view for this article, then the menu item params take priority if (strpos($currentLink, 'view=article') && strpos($currentLink, '&id=' . (string) $item->id)) { // Load layout from active query (in case it is an alternative menu item) if (isset($active->query['layout'])) { $this->setLayout($active->query['layout']); } // Check for alternative layout of article elseif ($layout = $item->params->get('article_layout')) { $this->setLayout($layout); } // $item->params are the article params, $temp are the menu item params // Merge so that the menu item params take priority $item->params->merge($temp); } else { // Current view is not a single article, so the article params take priority here // Merge the menu item params with the article params so that the article params take priority $temp->merge($item->params); $item->params = $temp; // Check for alternative layouts (since we are not in a single-article menu item) // Single-article menu item layout takes priority over alt layout for an article if ($layout = $item->params->get('article_layout')) { $this->setLayout($layout); } } } else { // Merge so that article params take priority $temp->merge($item->params); $item->params = $temp; // Check for alternative layouts (since we are not in a single-article menu item) // Single-article menu item layout takes priority over alt layout for an article if ($layout = $item->params->get('article_layout')) { $this->setLayout($layout); } } $offset = $this->state->get('list.offset'); // Check the view access to the article (the model has already computed the values). if ($item->params->get('access-view') == false && ($item->params->get('show_noauth', '0') == '0')) { $app->enqueueMessage(JText::_('JERROR_ALERTNOAUTHOR'), 'error'); $app->setHeader('status', 403, true); return; } /** * Check for no 'access-view' and empty fulltext, * - Redirect guest users to login * - Deny access to logged users with 403 code * NOTE: we do not recheck for no access-view + show_noauth disabled ... since it was checked above */ if ($item->params->get('access-view') == false && !strlen($item->fulltext)) { if ($this->user->get('guest')) { $return = base64_encode(JUri::getInstance()); $login_url_with_return = JRoute::_('index.php?option=com_users&view=login&return=' . $return); $app->enqueueMessage(JText::_('JERROR_ALERTNOAUTHOR'), 'notice'); $app->redirect($login_url_with_return, 403); } else { $app->enqueueMessage(JText::_('JERROR_ALERTNOAUTHOR'), 'error'); $app->setHeader('status', 403, true); return; } } /** * NOTE: The following code (usually) sets the text to contain the fulltext, but it is the * responsibility of the layout to check 'access-view' and only use "introtext" for guests */ if ($item->params->get('show_intro', '1') == '1') { $item->text = $item->introtext . ' ' . $item->fulltext; } elseif ($item->fulltext) { $item->text = $item->fulltext; } else { $item->text = $item->introtext; } $item->tags = new JHelperTags; $item->tags->getItemTags('com_content.article', $this->item->id); if ($item->params->get('show_associations')) { $item->associations = ContentHelperAssociation::displayAssociations($item->id); } // Process the content plugins. JPluginHelper::importPlugin('content'); $dispatcher->trigger('onContentPrepare', array ('com_content.article', &$item, &$item->params, $offset)); $item->event = new stdClass; $results = $dispatcher->trigger('onContentAfterTitle', array('com_content.article', &$item, &$item->params, $offset)); $item->event->afterDisplayTitle = trim(implode("\n", $results)); $results = $dispatcher->trigger('onContentBeforeDisplay', array('com_content.article', &$item, &$item->params, $offset)); $item->event->beforeDisplayContent = trim(implode("\n", $results)); $results = $dispatcher->trigger('onContentAfterDisplay', array('com_content.article', &$item, &$item->params, $offset)); $item->event->afterDisplayContent = trim(implode("\n", $results)); // Escape strings for HTML output $this->pageclass_sfx = htmlspecialchars($this->item->params->get('pageclass_sfx', '')); $this->_prepareDocument(); parent::display($tpl); } /** * Prepares the document. * * @return void */ protected function _prepareDocument() { $app = JFactory::getApplication(); $menus = $app->getMenu(); $pathway = $app->getPathway(); $title = null; /** * Because the application sets a default page title, * we need to get it from the menu item itself */ $menu = $menus->getActive(); if ($menu) { $this->params->def('page_heading', $this->params->get('page_title', $menu->title)); } else { $this->params->def('page_heading', JText::_('JGLOBAL_ARTICLES')); } $title = $this->params->get('page_title', ''); $id = (int) @$menu->query['id']; // If the menu item does not concern this article if ($menu && (!isset($menu->query['option']) || $menu->query['option'] !== 'com_content' || $menu->query['view'] !== 'article' || $id != $this->item->id)) { // If a browser page title is defined, use that, then fall back to the article title if set, then fall back to the page_title option $title = $this->item->params->get('article_page_title', $this->item->title ?: $title); $path = array(array('title' => $this->item->title, 'link' => '')); $category = JCategories::getInstance('Content')->get($this->item->catid); while ($category && (!isset($menu->query['option']) || $menu->query['option'] !== 'com_content' || $menu->query['view'] === 'article' || $id != $category->id) && $category->id !== 'root') { $path[] = array('title' => $category->title, 'link' => ContentHelperRoute::getCategoryRoute($category->id)); $category = $category->getParent(); } $path = array_reverse($path); foreach ($path as $item) { $pathway->addItem($item['title'], $item['link']); } } // Check for empty title and add site name if param is set if (empty($title)) { $title = $app->get('sitename'); } elseif ($app->get('sitename_pagetitles', 0) == 1) { $title = JText::sprintf('JPAGETITLE', $app->get('sitename'), $title); } elseif ($app->get('sitename_pagetitles', 0) == 2) { $title = JText::sprintf('JPAGETITLE', $title, $app->get('sitename')); } if (empty($title)) { $title = $this->item->title; } $this->document->setTitle($title); if ($this->item->metadesc) { $this->document->setDescription($this->item->metadesc); } elseif ($this->params->get('menu-meta_description')) { $this->document->setDescription($this->params->get('menu-meta_description')); } if ($this->item->metakey) { $this->document->setMetadata('keywords', $this->item->metakey); } elseif ($this->params->get('menu-meta_keywords')) { $this->document->setMetadata('keywords', $this->params->get('menu-meta_keywords')); } if ($this->params->get('robots')) { $this->document->setMetadata('robots', $this->params->get('robots')); } if ($app->get('MetaAuthor') == '1') { $author = $this->item->created_by_alias ?: $this->item->author; $this->document->setMetaData('author', $author); } $mdata = $this->item->metadata->toArray(); foreach ($mdata as $k => $v) { if ($v) { $this->document->setMetadata($k, $v); } } // If there is a pagebreak heading or title, add it to the page title if (!empty($this->item->page_title)) { $this->item->title = $this->item->title . ' - ' . $this->item->page_title; $this->document->setTitle( $this->item->page_title . ' - ' . JText::sprintf('PLG_CONTENT_PAGEBREAK_PAGE_NUM', $this->state->get('list.offset') + 1) ); } if ($this->print) { $this->document->setMetaData('robots', 'noindex, nofollow'); } } } home/wuectly/www/components/com_content/views/categories/view.html.php 0000604 00000001170 15245556257 0022434 0 ustar 00 <?php /** * @package Joomla.Site * @subpackage com_content * * @copyright (C) 2009 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; /** * Content categories view. * * @since 1.5 */ class ContentViewCategories extends JViewCategories { /** * Language key for default page heading * * @var string * @since 3.2 */ protected $pageHeading = 'JGLOBAL_ARTICLES'; /** * @var string The name of the extension for the category * @since 3.2 */ protected $extension = 'com_content'; } home/wuectly/www/components/com_acymailing/views/user/view.html.php 0000604 00000021047 15245557352 0021732 0 ustar 00 <?php /** * @package AcyMailing for Joomla! * @version 5.9.6 * @author acyba.com * @copyright (C) 2009-2018 ACYBA S.A.R.L. All rights reserved. * @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html */ defined('_JEXEC') or die('Restricted access'); ?><?php class UserViewUser extends acymailingView{ function display($tpl = null){ $function = $this->getLayout(); if(method_exists($this, $function)) $this->$function(); parent::display($tpl); } function modify(){ $values = new stdClass(); $values->show_page_heading = 0; $listsClass = acymailing_get('class.list'); $subscriberClass = acymailing_get('class.subscriber'); $menu = acymailing_getMenu(); if(is_object($menu)){ $menuparams = new acyParameter($menu->params); if(!empty($menuparams)){ $this->introtext = $menuparams->get('introtext'); $this->finaltext = $menuparams->get('finaltext'); $this->dropdown = $menuparams->get('dropdown'); if($menuparams->get('menu-meta_description')) acymailing_addMetadata('description', $menuparams->get('menu-meta_description')); if($menuparams->get('menu-meta_keywords')) acymailing_addMetadata('keywords', $menuparams->get('menu-meta_keywords')); if($menuparams->get('robots')) acymailing_addMetadata('robots', $menuparams->get('robots')); if($menuparams->get('page_title')) acymailing_setPageTitle($menuparams->get('page_title')); $values->suffix = $menuparams->get('pageclass_sfx', ''); $values->page_heading = ACYMAILING_J16 ? $menuparams->get('page_heading') : $menuparams->get('page_title'); $values->show_page_heading = ACYMAILING_J16 ? $menuparams->get('show_page_heading', 0) : $menuparams->get('show_page_title', 0); } } $subscriber = $subscriberClass->identify(true); if(empty($subscriber)){ $subscription = $listsClass->getLists('listid'); $subscriber = new stdClass(); $subscriber->html = 1; $subscriber->subid = 0; $subscriber->key = 0; if(!empty($subscription)){ foreach($subscription as $id => $onesub){ $subscription[$id]->status = 1; if(!empty($menuparams) && strtolower($menuparams->get('listschecked', 'all')) != 'all' && !in_array($id, explode(',', $menuparams->get('listschecked', 'all')))){ $subscription[$id]->status = 0; } } } acymailing_addBreadcrumb(acymailing_translation('SUBSCRIPTION')); if(empty($menu)) acymailing_setPageTitle(acymailing_translation('SUBSCRIPTION')); }else{ $subscription = $subscriberClass->getSubscription($subscriber->subid, 'listid'); acymailing_addBreadcrumb(acymailing_translation('MODIFY_SUBSCRIPTION')); if(empty($menu)) acymailing_setPageTitle(acymailing_translation('MODIFY_SUBSCRIPTION')); } if(!empty($subscriber->email)) $subscriber->email = acymailing_punycode($subscriber->email, 'emailToUTF8'); acymailing_initJSStrings(); if(!empty($menuparams) AND strtolower($menuparams->get('lists', 'all')) != 'all'){ $visibleLists = strtolower($menuparams->get('lists', 'all')); if($visibleLists == 'none'){ $subscription = array(); }else{ $newSubscription = array(); $visiblesListsArray = explode(',', $visibleLists); foreach($subscription as $id => $onesub){ if(in_array($id, $visiblesListsArray)) $newSubscription[$id] = $onesub; } $subscription = $newSubscription; } } if(!acymailing_level(3)){ if(!empty($menuparams) && strtolower($menuparams->get('customfields', 'default')) != 'default'){ $fieldsToDisplay = strtolower($menuparams->get('customfields', 'default')); $this->fieldsToDisplay = $fieldsToDisplay; }else{ $this->fieldsToDisplay = 'default'; } } $hiddenLists = ''; if(!empty($menuparams)){ $hiddenLists = trim($menuparams->get('hiddenlists', 'None')); if(empty($subscriber)){ $allLists = $listsClass->getLists('listid'); }else $allLists = $subscriberClass->getSubscription($subscriber->subid, 'listid'); $hiddenListsArray = array(); if(strpos($hiddenLists, ',') || is_numeric($hiddenLists)){ $allhiddenlists = explode(',', $hiddenLists); foreach($allLists as $oneList){ if(!$oneList->published || !in_array($oneList->listid, $allhiddenlists)) continue; $hiddenListsArray[] = $oneList->listid; unset($subscription[$oneList->listid]); } }elseif(strtolower($hiddenLists) == 'all'){ $subscription = array(); foreach($allLists as $oneList){ if(!empty($oneList->published)) $hiddenListsArray[] = $oneList->listid; } } $hiddenLists = implode(',', $hiddenListsArray); } $defaultSubscription = $subscription; $forceLists = acymailing_getVar('string', 'listid', ''); if(!empty($forceLists)){ $subscription = array(); $forceLists = explode(',', $forceLists); foreach($forceLists as $oneList){ if(!empty($defaultSubscription[$oneList])){ $subscription[$oneList] = $defaultSubscription[$oneList]; } } } $forceHiddenLists = acymailing_getVar('string', 'hiddenlist', ''); if(!empty($forceHiddenLists)){ $forceHiddenLists = explode(',', $forceHiddenLists); $tmpList = array(); $defaultHidden = explode(',', $hiddenLists); foreach($forceHiddenLists as $oneList){ if(!empty($defaultSubscription[$oneList]) || in_array($oneList, $defaultHidden)){ $tmpList[] = $oneList; } } $hiddenLists = implode(',', $tmpList); } $displayLists = false; foreach($subscription as $oneSub){ if(!empty($oneSub->published) AND $oneSub->visible){ $displayLists = true; break; } } $this->hiddenlists = $hiddenLists; $this->values = $values; $this->status = acymailing_get('type.festatus'); $this->subscription = $subscription; $this->subscriber = $subscriber; $this->displayLists = $displayLists; $this->config = acymailing_config(); } function saveunsub(){ $subscriberClass = acymailing_get('class.subscriber'); $subscriber = $subscriberClass->identify(); $this->subscriber = $subscriber; $listid = acymailing_getVar('int', 'listid'); if(!empty($listid)){ $listClass = acymailing_get('class.list'); $mylist = $listClass->get($listid); $this->list = $mylist; } } function unsub(){ $subscriberClass = acymailing_get('class.subscriber'); $config = acymailing_config(); $this->config = $config; $subscriber = $subscriberClass->identify(); $this->subscriber = $subscriber; $mailid = acymailing_getVar('int', 'mailid'); $this->mailid = $mailid; $query = 'SELECT l.listid, l.name FROM '.acymailing_table('list').' as l'; $query .= ' JOIN '.acymailing_table('listsub').' AS ls ON ls.listid = l.listid AND ls.subid = '.acymailing_getVar('int', 'subid'); $query .= ' WHERE l.type = \'list\' AND (ls.unsubdate < ls.subdate OR ls.unsubdate IS NULL) AND l.visible = 1 AND l.published = 1'; $query .= ' ORDER BY l.ordering ASC'; $otherSubscriptions = acymailing_loadObjectList($query); $query = 'SELECT lm.listid FROM '.acymailing_table('mail').' AS m INNER JOIN '.acymailing_table('listmail').' AS lm ON m.mailid = lm.mailid WHERE m.mailid = '.acymailing_getVar('int', 'mailid'); $listsToDeny = acymailing_loadObjectList($query); if(!empty($otherSubscriptions)){ $i = 0; foreach($otherSubscriptions as $anotherSubscription){ foreach($listsToDeny as $oneListToDeny){ if($anotherSubscription->listid == $oneListToDeny->listid){ unset($otherSubscriptions[$i]); continue; } } $i++; } } $this->otherSubscriptions = $otherSubscriptions; $replace = array(); $replace['{list:name}'] = ''; foreach($subscriber as $oneProp => $oneVal){ $replace['{user:'.$oneProp.'}'] = $oneVal; $replace['{user:'.$oneProp.' | ucwords}'] = ucwords($oneVal); } if(!empty($mailid)){ $classListmail = acymailing_get('class.listmail'); $lists = $classListmail->getLists($mailid); $this->lists = $lists; if(!empty($lists)){ $oneList = reset($lists); foreach($oneList as $oneProp => $oneVal){ $replace['{list:'.$oneProp.'}'] = $oneVal; } } $mailClass = acymailing_get('class.mail'); $news = $mailClass->get($mailid); if(!empty($news)){ foreach($news as $oneProp => $oneVal){ if(!is_string($oneVal)) continue; $replace['{mail:'.$oneProp.'}'] = $oneVal; } } } $intro = str_replace('UNSUB_INTRO', acymailing_translation('UNSUB_INTRO'), $config->get('unsub_intro', 'UNSUB_INTRO')); $intro = ' <div class="unsubintro" > '.nl2br(str_replace(array_keys($replace), $replace, $intro)).'</div> '; $this->intro = $intro; $this->replace = $replace; $unsubtext = str_replace(array_keys($replace), $replace, acymailing_translation('UNSUBSCRIBE')); acymailing_addBreadcrumb($unsubtext); acymailing_setPageTitle($unsubtext); } } home/wuectly/www/components/com_contact/views/category/view.html.php 0000604 00000005645 15245570254 0022111 0 ustar 00 <?php /** * @package Joomla.Site * @subpackage com_contact * * @copyright (C) 2006 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; /** * HTML View class for the Contacts component * * @since 1.5 */ class ContactViewCategory extends JViewCategory { /** * @var string The name of the extension for the category * @since 3.2 */ protected $extension = 'com_contact'; /** * @var string Default title to use for page title * @since 3.2 */ protected $defaultPageTitle = 'COM_CONTACT_DEFAULT_PAGE_TITLE'; /** * @var string The name of the view to link individual items to * @since 3.2 */ protected $viewName = 'contact'; /** * Run the standard Joomla plugins * * @var bool * @since 3.5 */ protected $runPlugins = true; /** * Execute and display a template script. * * @param string $tpl The name of the template file to parse; automatically searches through the template paths. * * @return mixed A string if successful, otherwise an Error object. */ public function display($tpl = null) { parent::commonCategoryDisplay(); // Flag indicates to not add limitstart=0 to URL $this->pagination->hideEmptyLimitstart = true; // Prepare the data. // Compute the contact slug. foreach ($this->items as $item) { $item->slug = $item->alias ? ($item->id . ':' . $item->alias) : $item->id; $temp = $item->params; $item->params = clone $this->params; $item->params->merge($temp); if ($item->params->get('show_email_headings', 0) == 1) { $item->email_to = trim($item->email_to); if (!empty($item->email_to) && JMailHelper::isEmailAddress($item->email_to)) { $item->email_to = JHtml::_('email.cloak', $item->email_to); } else { $item->email_to = ''; } } } return parent::display($tpl); } /** * Prepares the document * * @return void */ protected function prepareDocument() { parent::prepareDocument(); $menu = $this->menu; $id = (int) @$menu->query['id']; if ($menu && (!isset($menu->query['option']) || $menu->query['option'] != $this->extension || $menu->query['view'] == $this->viewName || $id != $this->category->id)) { $path = array(array('title' => $this->category->title, 'link' => '')); $category = $this->category->getParent(); while ($category !== null && $category->id !== 'root ' && (!isset($menu->query['option']) || $menu->query['option'] !== 'com_contact' || $menu->query['view'] === 'contact' || $id != $category->id)) { $path[] = array('title' => $category->title, 'link' => ContactHelperRoute::getCategoryRoute($category->id)); $category = $category->getParent(); } $path = array_reverse($path); foreach ($path as $item) { $this->pathway->addItem($item['title'], $item['link']); } } parent::addFeed(); } } home/wuectly/www/components/com_contact/views/categories/view.html.php 0000604 00000001206 15245570260 0022403 0 ustar 00 <?php /** * @package Joomla.Site * @subpackage com_contact * * @copyright (C) 2008 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; /** * Content categories view. * * @since 1.6 */ class ContactViewCategories extends JViewCategories { /** * Language key for default page heading * * @var string * @since 3.2 */ protected $pageHeading = 'COM_CONTACT_DEFAULT_PAGE_TITLE'; /** * @var string The name of the extension for the category * @since 3.2 */ protected $extension = 'com_contact'; } home/wuectly/www/components/com_acymailing/views/lists/view.html.php 0000604 00000004671 15245570662 0022115 0 ustar 00 <?php /** * @package AcyMailing for Joomla! * @version 5.9.6 * @author acyba.com * @copyright (C) 2009-2018 ACYBA S.A.R.L. All rights reserved. * @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html */ defined('_JEXEC') or die('Restricted access'); ?><?php class listsViewLists extends acymailingView{ function display($tpl = null){ $function = $this->getLayout(); if(method_exists($this, $function)) $this->$function(); parent::display($tpl); } function listing(){ global $Itemid; $config = acymailing_config(); $menu = acymailing_getMenu(); if(empty($menu)) { acymailing_enqueueMessage(acymailing_translation('ACY_NOTALLOWED')); acymailing_redirect('index.php'); } $selectedLists = 'all'; if(is_object($menu)){ $menuparams = new acyParameter($menu->params); $this->listsintrotext = $menuparams->get('listsintrotext'); $this->listsfinaltext = $menuparams->get('listsfinaltext'); $selectedLists = $menuparams->get('lists', 'all'); $document = JFactory::getDocument(); if($menuparams->get('menu-meta_description')) $document->setDescription($menuparams->get('menu-meta_description')); if($menuparams->get('menu-meta_keywords')) acymailing_addMetadata('keywords', $menuparams->get('menu-meta_keywords')); if($menuparams->get('robots')) acymailing_addMetadata('robots', $menuparams->get('robots')); if($menuparams->get('page_title')) acymailing_setPageTitle($menuparams->get('page_title')); } if(empty($menuparams)){ acymailing_addBreadcrumb(acymailing_translation('MAILING_LISTS')); } $document = JFactory::getDocument(); $link = '&format=feed&limitstart='; if($config->get('acyrss_format') == 'rss' || $config->get('acyrss_format') == 'both'){ $attribs = array('type' => 'application/rss+xml', 'title' => 'RSS 2.0'); $document->addHeadLink(acymailing_route($link.'&type=rss'), 'alternate', 'rel', $attribs); } if($config->get('acyrss_format') == 'atom' || $config->get('acyrss_format') == 'both'){ $attribs = array('type' => 'application/atom+xml', 'title' => 'Atom 1.0'); $document->addHeadLink(acymailing_route($link.'&type=atom'), 'alternate', 'rel', $attribs); } $listsClass = acymailing_get('class.list'); $allLists = $listsClass->getLists('', $selectedLists); if(acymailing_level(1)){ $allLists = $listsClass->onlyCurrentLanguage($allLists); } $myItem = empty($Itemid) ? '' : '&Itemid='.$Itemid; $this->rows = $allLists; $this->item = $myItem; } } home/wuectly/www/components/com_content/views/form/view.html.php 0000604 00000011076 15245570666 0021260 0 ustar 00 <?php /** * @package Joomla.Site * @subpackage com_content * * @copyright (C) 2009 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; /** * HTML Article View class for the Content component * * @since 1.5 */ class ContentViewForm extends JViewLegacy { protected $form; protected $item; protected $return_page; protected $state; /** * Should we show a captcha form for the submission of the article? * * @var bool * @since 3.7.0 */ protected $captchaEnabled = false; /** * Execute and display a template script. * * @param string $tpl The name of the template file to parse; automatically searches through the template paths. * * @return mixed A string if successful, otherwise an Error object. */ public function display($tpl = null) { $user = JFactory::getUser(); $app = JFactory::getApplication(); // Get model data. $this->state = $this->get('State'); $this->item = $this->get('Item'); $this->form = $this->get('Form'); $this->return_page = $this->get('ReturnPage'); if (empty($this->item->id)) { $catid = $this->state->params->get('catid'); if ($this->state->params->get('enable_category') == 1 && $catid) { $authorised = $user->authorise('core.create', 'com_content.category.' . $catid); } else { $authorised = $user->authorise('core.create', 'com_content') || count($user->getAuthorisedCategories('com_content', 'core.create')); } } else { $authorised = $this->item->params->get('access-edit'); } if ($authorised !== true) { $app->enqueueMessage(JText::_('JERROR_ALERTNOAUTHOR'), 'error'); $app->setHeader('status', 403, true); return false; } $this->item->tags = new JHelperTags; if (!empty($this->item->id)) { $this->item->tags->getItemTags('com_content.article', $this->item->id); $this->item->images = json_decode($this->item->images); $this->item->urls = json_decode($this->item->urls); $tmp = new stdClass; $tmp->images = $this->item->images; $tmp->urls = $this->item->urls; $this->form->bind($tmp); } // Check for errors. if (count($errors = $this->get('Errors'))) { JError::raiseWarning(500, implode("\n", $errors)); return false; } // Create a shortcut to the parameters. $params = &$this->state->params; // Escape strings for HTML output $this->pageclass_sfx = htmlspecialchars($params->get('pageclass_sfx', '')); $this->params = $params; // Override global params with article specific params $this->params->merge($this->item->params); $this->user = $user; // Propose current language as default when creating new article if (empty($this->item->id) && JLanguageMultilang::isEnabled()) { $lang = JFactory::getLanguage()->getTag(); $this->form->setFieldAttribute('language', 'default', $lang); } $captchaSet = $params->get('captcha', JFactory::getApplication()->get('captcha', '0')); foreach (JPluginHelper::getPlugin('captcha') as $plugin) { if ($captchaSet === $plugin->name) { $this->captchaEnabled = true; break; } } $this->_prepareDocument(); parent::display($tpl); } /** * Prepares the document * * @return void */ protected function _prepareDocument() { $app = JFactory::getApplication(); $menus = $app->getMenu(); $title = null; // Because the application sets a default page title, // we need to get it from the menu item itself $menu = $menus->getActive(); if ($menu) { $this->params->def('page_heading', $this->params->get('page_title', $menu->title)); } else { $this->params->def('page_heading', JText::_('COM_CONTENT_FORM_EDIT_ARTICLE')); } $title = $this->params->def('page_title', JText::_('COM_CONTENT_FORM_EDIT_ARTICLE')); if ($app->get('sitename_pagetitles', 0) == 1) { $title = JText::sprintf('JPAGETITLE', $app->get('sitename'), $title); } elseif ($app->get('sitename_pagetitles', 0) == 2) { $title = JText::sprintf('JPAGETITLE', $title, $app->get('sitename')); } $this->document->setTitle($title); $pathway = $app->getPathWay(); $pathway->addItem($title, ''); if ($this->params->get('menu-meta_description')) { $this->document->setDescription($this->params->get('menu-meta_description')); } if ($this->params->get('menu-meta_keywords')) { $this->document->setMetadata('keywords', $this->params->get('menu-meta_keywords')); } if ($this->params->get('robots')) { $this->document->setMetadata('robots', $this->params->get('robots')); } } } home/wuectly/www/components/com_acymailing/views/archive/view.html.php 0000604 00000045635 15245570674 0022410 0 ustar 00 <?php /** * @package AcyMailing for Joomla! * @version 5.9.6 * @author acyba.com * @copyright (C) 2009-2018 ACYBA S.A.R.L. All rights reserved. * @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html */ defined('_JEXEC') or die('Restricted access'); ?><?php class archiveViewArchive extends acymailingView{ function display($tpl = null){ $function = $this->getLayout(); if(method_exists($this, $function)) $this->$function(); parent::display($tpl); } function forward(){ $subkeys = acymailing_getVar('string', 'subid', acymailing_getVar('string', 'sub')); if(!empty($subkeys)){ $subid = intval(substr($subkeys, 0, strpos($subkeys, '-'))); $subkey = substr($subkeys, strpos($subkeys, '-') + 1); $receiver = acymailing_loadObject('SELECT * FROM '.acymailing_table('subscriber').' WHERE `subid` = '.intval($subid).' AND `key` = '.acymailing_escapeDB($subkey).' LIMIT 1'); } $currentEmail = acymailing_currentUserEmail(); if(empty($receiver) AND !empty($currentEmail)){ $userClass = acymailing_get('class.subscriber'); $receiver = $userClass->get($currentEmail); } if(empty($receiver)){ $receiver = new stdClass(); $receiver->name = ''; $receiver->email = ''; } $this->senderName = $receiver->name; $this->senderMail = $receiver->email; $config = acymailing_config(); $this->config = $config; $js = 'var numForwarders = 1;function addLine(){ if(numForwarders > 4) return; var myTable = window.document.getElementById("friend_table"); var line1 = document.createElement("tr"); var tdname = document.createElement("td"); var itdname = document.createElement("td"); var line2 = document.createElement("tr"); var tdemail = document.createElement("td"); var itdemail = document.createElement("td"); var inputName = document.createElement("input"); inputName.type = \'text\'; inputName.name = \'forwardusers[\'+numForwarders+\'][name]\'; inputName.style.width = "200px"; var inputEmail = document.createElement("input"); inputEmail.type = \'text\'; inputEmail.name = \'forwardusers[\'+numForwarders+\'][email]\'; inputEmail.style.width = "200px"; var nameLabel = document.createElement("label"); nameLabel.innerHTML="'.acymailing_translation('FRIEND_NAME', true).'"; var emailLabel = document.createElement("label"); emailLabel.innerHTML="'.acymailing_translation('FRIEND_EMAIL', true).'"; tdname.appendChild(nameLabel); itdname.appendChild(inputName); line1.appendChild(tdname); line1.appendChild(itdname); myTable.appendChild(line1); tdemail.appendChild(emailLabel); itdemail.appendChild(inputEmail); line2.appendChild(tdemail); line2.appendChild(itdemail); myTable.appendChild(line2); numForwarders++; } '; acymailing_addScript(true, $js); return $this->view(); } private function addFeed(){ $config = acymailing_config(); $feedType = $config->get('acyrss_format', ''); if(empty($feedType)) return; $document = JFactory::getDocument(); $link = '&format=feed&limitstart='; if($feedType == 'rss' || $feedType == 'both'){ $attribs = array('type' => 'application/rss+xml', 'title' => 'RSS 2.0'); $document->addHeadLink(acymailing_route($link.'&type=rss'), 'alternate', 'rel', $attribs); } if($feedType == 'atom' || $feedType == 'both'){ $attribs = array('type' => 'application/atom+xml', 'title' => 'Atom 1.0'); $document->addHeadLink(acymailing_route($link.'&type=atom'), 'alternate', 'rel', $attribs); } } function listing(){ global $Itemid; $values = new stdClass(); $menu = acymailing_getMenu(); $myItem = empty($Itemid) ? '' : '&Itemid='.$Itemid; $this->item = $myItem; if(is_object($menu)){ $menuparams = new acyParameter($menu->params); } $pageInfo = new stdClass(); $pageInfo->filter = new stdClass(); $pageInfo->filter->order = new stdClass(); $pageInfo->limit = new stdClass(); $pageInfo->elements = new stdClass(); $paramBase = ACYMAILING_COMPONENT.'.'.$this->getName(); $pageInfo->filter->order->dir = acymailing_getUserVar($paramBase.".ordering_dir", 'ordering_dir', 'DESC', 'word'); $pageInfo->filter->order->value = acymailing_getUserVar($paramBase.".ordering", 'ordering', 'senddate', 'cmd'); if(strtolower($pageInfo->filter->order->dir) !== 'desc') $pageInfo->filter->order->dir = 'asc'; $pageInfo->search = acymailing_getUserVar($paramBase.".search", 'search', '', 'string'); $pageInfo->search = strtolower(trim($pageInfo->search)); $pageInfo->limit->value = acymailing_getUserVar($paramBase.'.list_limit', 'limit', acymailing_getCMSConfig('list_limit'), 'int'); $pageInfo->limit->start = acymailing_getVar('int', 'limitstart', 0); $listClass = acymailing_get('class.list'); $listid = acymailing_getCID('listid'); if(empty($listid) && !empty($menuparams)){ $listid = $menuparams->get('listid'); } $currentUserid = acymailing_currentUserId(); if(empty($listid)){ $allLists = $listClass->getLists('listid'); }else{ $oneList = $listClass->get($listid); if(empty($oneList->listid)) return acymailing_raiseError(E_ERROR, 404, 'Mailing List not found : '.$listid); $allLists = array($oneList->listid => $oneList); if($oneList->access_sub != 'all' && ($oneList->access_sub == 'none' || empty($currentUserid) || !acymailing_isAllowed($oneList->access_sub))) $allLists = array(); } if(empty($allLists)){ if(empty($currentUserid)){ acymailing_askLog(); }else{ acymailing_enqueueMessage(acymailing_translation('ACY_NOTALLOWED'), 'error'); acymailing_redirect(acymailing_completeLink('lists', false, true)); } return false; } $config = acymailing_config(); if(!empty($menuparams)){ $values->suffix = $menuparams->get('pageclass_sfx', ''); $values->page_title = $menuparams->get('page_title'); $values->page_heading = ACYMAILING_J16 ? $menuparams->get('page_heading') : $menuparams->get('page_title'); $values->show_page_heading = ACYMAILING_J16 ? $menuparams->get('show_page_heading', 1) : $menuparams->get('show_page_title', 1); }else{ $values->suffix = ''; $values->show_page_heading = 1; } $values->show_description = $config->get('show_description', 1); $values->show_senddate = $config->get('show_senddate', 1); $values->show_receiveemail = $config->get('show_receiveemail', 0) && acymailing_level(1); $values->filter = $config->get('show_filter', 1); if(empty($values->page_title)) $values->page_title = (count($allLists) > 1 || empty($listid)) ? acymailing_translation('NEWSLETTERS') : $allLists[$listid]->name; if(empty($values->page_heading)) $values->page_heading = (count($allLists) > 1 || empty($listid)) ? acymailing_translation('NEWSLETTERS') : $allLists[$listid]->name; if(empty($menuparams)){ acymailing_addBreadcrumb(acymailing_translation('MAILING_LISTS'), acymailing_completeLink('lists')); acymailing_addBreadcrumb($values->page_title); }elseif(!$menuparams->get('listid')){ acymailing_addBreadcrumb($values->page_title); } acymailing_setPageTitle($values->page_title); $this->addFeed(); $searchMap = array('a.mailid', 'a.subject', 'a.alias', 'a.body'); $filters = array(); if(!empty($pageInfo->search)){ $searchVal = '\'%'.acymailing_getEscaped($pageInfo->search, true).'%\''; $filters[] = implode(" LIKE $searchVal OR ", $searchMap)." LIKE $searchVal"; } $filters[] = 'a.type = \'news\''; $noManageableLists = array(); $currentUserid = acymailing_currentUserId(); foreach($allLists as &$oneList){ if(empty($currentUserid)) $noManageableLists[] = $oneList->listid; if((int)acymailing_currentUserId() == (int)$oneList->userid) continue; if($oneList->access_manage == 'all' || acymailing_isAllowed($oneList->access_manage)) continue; $noManageableLists[] = $oneList->listid; } $accessFilter = ''; $manageableLists = array_diff(array_keys($allLists), $noManageableLists); if(!empty($manageableLists)) $accessFilter = 'c.listid IN ('.implode(',', $manageableLists).')'; if(!empty($noManageableLists)){ if(empty($accessFilter)){ $accessFilter = 'c.listid IN ('.implode(',', $noManageableLists).') AND a.published = 1 AND a.visible = 1'; }else $accessFilter .= ' OR (c.listid IN ('.implode(',', $noManageableLists).') AND a.published = 1 AND a.visible = 1)'; } if(!empty($accessFilter)) $filters[] = $accessFilter; $selection = array_merge($searchMap, array('a.senddate', 'a.created', 'a.visible', 'a.published', 'a.fromname', 'a.fromemail', 'a.replyname', 'a.replyemail', 'a.userid', 'a.summary', 'a.thumb', 'c.listid')); $query = 'SELECT "" AS body, "" AS altbody, html AS sendHTML, '.implode(',', $selection); $query .= ' FROM '.acymailing_table('listmail').' as c'; $query .= ' JOIN '.acymailing_table('mail').' as a on a.mailid = c.mailid '; $query .= ' WHERE ('.implode(') AND (', $filters).')'; $query .= ' GROUP BY c.mailid'; $query .= ' ORDER BY a.'.acymailing_secureField($pageInfo->filter->order->value).' '.acymailing_secureField($pageInfo->filter->order->dir).', c.mailid DESC'; $rows = acymailing_loadObjectList($query, '', $pageInfo->limit->start, $pageInfo->limit->value); $pageInfo->elements->page = count($rows); if($pageInfo->limit->value > $pageInfo->elements->page){ $pageInfo->elements->total = $pageInfo->limit->start + $pageInfo->elements->page; }else{ $queryCount = 'SELECT COUNT(DISTINCT c.mailid) FROM '.acymailing_table('listmail').' as c'; $queryCount .= ' JOIN '.acymailing_table('mail').' as a on a.mailid = c.mailid '; $queryCount .= ' WHERE ('.implode(') AND (', $filters).')'; $pageInfo->elements->total = acymailing_loadResult($queryCount); } $currentEmail = acymailing_currentUserEmail(); if(!empty($currentEmail)){ $userClass = acymailing_get('class.subscriber'); $receiver = $userClass->get($currentEmail); } if(empty($receiver)){ $receiver = new stdClass(); $receiver->name = acymailing_translation('VISITOR'); } acymailing_importPlugin('acymailing'); foreach($rows as $mail){ if(strpos($mail->subject, "{") !== false){ acymailing_trigger('acymailing_replacetags', array(&$mail, false)); acymailing_trigger('acymailing_replaceusertags', array(&$mail, &$receiver, false)); } } $pagination = new acyPagination($pageInfo->elements->total, $pageInfo->limit->start, $pageInfo->limit->value); $js = 'function changeReceiveEmail(checkedbox){ var form = document.adminForm; if(checkedbox){ form.nbreceiveemail.value++; }else{ form.nbreceiveemail.value--; } if(form.nbreceiveemail.value > 0 ){ document.getElementById(\'receiveemailbox\').className = \'receiveemailbox receiveemailbox_visible\'; }else{ document.getElementById(\'receiveemailbox\').className = \'receiveemailbox receiveemailbox_hidden\'; } } '; acymailing_addScript(true, $js); if(!empty($menuparams)) { $data = $menuparams->get("data", 1); if(!empty($data->{"menu-meta_description"})) acymailing_addMetadata('description', $data->{"menu-meta_description"}); if(!empty($data->{"menu-meta_keywords"})) acymailing_addMetadata('keywords', $data->{"menu-meta_keywords"}); } $orderValues = array(); $orderValues[] = acymailing_selectOption('senddate', acymailing_translation('SEND_DATE')); $orderValues[] = acymailing_selectOption('subject', acymailing_translation('JOOMEXT_SUBJECT')); $orderValues[] = acymailing_selectOption('created', acymailing_translation('CREATED_DATE')); $orderValues[] = acymailing_selectOption('mailid', acymailing_translation('ACY_ID')); $ordering = ''; if($config->get('show_order', 1) == 1){ $ordering = '<span style="float:right;" id="orderingoption">'; $ordering .= acymailing_select($orderValues, 'ordering', 'size="1" style="width:100px;" onchange="this.form.submit();"', 'value', 'text', $pageInfo->filter->order->value); $orderDir = array(); $orderDir[] = acymailing_selectOption('ASC', acymailing_translation('ACY_ASC')); $orderDir[] = acymailing_selectOption('DESC', acymailing_translation('ACY_DESC')); $ordering .= ' '.acymailing_select($orderDir, 'ordering_dir', 'size="1" style="width:75px;" onchange="this.form.submit();"', 'value', 'text', $pageInfo->filter->order->dir); $ordering .= '</span>'; } $this->ordering = $ordering; $this->rows = $rows; $this->values = $values; if(count($allLists) > 1){ $list = new stdClass(); $list->listid = 0; $list->description = ''; }else{ $list = array_pop($allLists); } $this->list = $list; $this->manageableLists = $manageableLists; $this->pagination = $pagination; $this->pageInfo = $pageInfo; $this->config = $config; } function view(){ $this->addFeed(); $frontEndManagement = false; $listid = acymailing_getCID('listid'); $values = new stdClass(); $values->suffix = ''; $menu = acymailing_getMenu(); if(is_object($menu)){ $menuparams = new acyParameter($menu->params); } if(!empty($menuparams)){ $values->suffix = $menuparams->get('pageclass_sfx', ''); } if(empty($listid) && !empty($menuparams)){ $listid = $menuparams->get('listid'); if($menuparams->get('menu-meta_description')) acymailing_addMetadata('description', $menuparams->get('menu-meta_description')); if($menuparams->get('menu-meta_keywords')) acymailing_addMetadata('keywords', $menuparams->get('menu-meta_keywords')); if($menuparams->get('robots')) acymailing_addMetadata('robots', $menuparams->get('robots')); if($menuparams->get('page_title')) acymailing_setPageTitle($menuparams->get('page_title')); } $config = acymailing_config(); $indexFollow = $config->get('indexFollow', ''); $tagIndFol = array(); if(strpos($indexFollow, 'noindex') !== false) $tagIndFol[] = 'noindex'; if(strpos($indexFollow, 'nofollow') !== false) $tagIndFol[] = 'nofollow'; if(!empty($tagIndFol)) acymailing_addMetadata('robots', implode(',', $tagIndFol)); if(!empty($listid)){ $listClass = acymailing_get('class.list'); $oneList = $listClass->get($listid); if(!empty($oneList->visible) && $oneList->published && (empty($menuparams) || !$menuparams->get('listid'))){ acymailing_addBreadcrumb($oneList->name, acymailing_completeLink('archive&listid='.$oneList->listid.':'.$oneList->alias)); } $currentUserid = acymailing_currentUserId(); if(!empty($oneList->listid) && acymailing_level(3)){ if(!empty($currentUserid) && $currentUserid == (int)$oneList->userid){ $frontEndManagement = true; } if(!empty($currentUserid)){ if($oneList->access_manage == 'all' || acymailing_isAllowed($oneList->access_manage)){ $frontEndManagement = true; } } } } $mailid = acymailing_getVar('string', 'mailid', 'nomailid'); if(empty($mailid)){ die('This is a Newsletter-template... and you can not access the online version of a Newsletter-template!<br />Please create a Newsletter using your template and then try again your "view it online" link!'); exit; } if($mailid == 'nomailid'){ $query = 'SELECT m.`mailid` FROM `#__acymailing_list` as l JOIN `#__acymailing_listmail` as lm ON l.listid=lm.listid JOIN `#__acymailing_mail` as m on lm.mailid = m.mailid'; $query .= ' WHERE l.`visible` = 1 AND l.`published` = 1 AND m.`visible`= 1 AND m.`published` = 1 AND m.`type` = "news" AND l.`type` = "list"'; if(!empty($listid)) $query .= ' AND l.`listid` = '.(int)$listid; $query .= ' ORDER BY m.`senddate` DESC, m.`mailid` DESC LIMIT 1'; $mailid = acymailing_loadResult($query); } $mailid = intval($mailid); if(empty($mailid)) return acymailing_raiseError(E_ERROR, 404, 'Newsletter not found'); $access_sub = true; $mailClass = acymailing_get('helper.mailer'); $mailClass->loadedToSend = false; $oneMail = $mailClass->load($mailid); if(empty($oneMail->mailid)){ return acymailing_raiseError(E_ERROR, 404, 'Newsletter not found : '.$mailid); } if(!$frontEndManagement AND (!$access_sub OR !$oneMail->published OR !$oneMail->visible)){ $key = acymailing_getVar('cmd', 'key'); if(empty($key) OR $key !== $oneMail->key){ $reason = (!$oneMail->published) ? 'Newsletter not published' : (!$oneMail->visible ? 'Newsletter not visible' : (!$access_sub ? 'Access not allowed' : '')); acymailing_enqueueMessage('You can not have access to this e-mail : '.$reason, 'error'); acymailing_redirect(acymailing_completeLink('lists', false, true)); return false; } } $fshare = ''; if(preg_match('#<img[^>]*id="pictshare"[^>]*>#i', $oneMail->body, $pregres) && preg_match('#src="([^"]*)"#i', $pregres[0], $pict)){ $fshare = $pict[1]; }elseif(preg_match('#<img[^>]*class="[^"]*pictshare[^"]*"[^>]*>#i', $oneMail->body, $pregres) && preg_match('#src="([^"]*)"#i', $pregres[0], $pict)){ $fshare = $pict[1]; }elseif(preg_match('#class="acymailing_content".*(<img[^>]*>)#is', $oneMail->body, $pregres) && preg_match('#src="([^"]*)"#i', $pregres[1], $pict)){ if(strpos($pregres[1], acymailing_translation('JOOMEXT_READ_MORE')) === false) $fshare = $pict[1]; } if(!empty($fshare)){ acymailing_addMetadata('og:image', $fshare); } acymailing_addMetadata('og:url', acymailing_frontendLink('archive&task=view&mailid='.$oneMail->mailid, false, acymailing_isNoTemplate(), true)); acymailing_addMetadata('og:title', $oneMail->subject); if(!empty($oneMail->metadesc)) acymailing_addMetadata('og:description', $oneMail->metadesc); $subkeys = acymailing_getVar('string', 'subid', acymailing_getVar('string', 'sub')); if(!empty($subkeys)){ $subid = intval(substr($subkeys, 0, strpos($subkeys, '-'))); $subkey = substr($subkeys, strpos($subkeys, '-') + 1); $receiver = acymailing_loadObject('SELECT * FROM '.acymailing_table('subscriber').' WHERE `subid` = '.acymailing_escapeDB($subid).' AND `key` = '.acymailing_escapeDB($subkey).' LIMIT 1'); } $currentEmail = acymailing_currentUserEmail(); if(empty($receiver) AND !empty($currentEmail)){ $userClass = acymailing_get('class.subscriber'); $receiver = $userClass->get($currentEmail); } if(empty($receiver)){ $receiver = new stdClass(); $receiver->name = acymailing_translation('VISITOR'); } $oneMail->sendHTML = true; acymailing_trigger('acymailing_replaceusertags', array(&$oneMail, &$receiver, false)); acymailing_addBreadcrumb($oneMail->subject); preg_match('@href="{unsubscribe:(.*)}"@', $oneMail->body, $match);//we get the tag unsubscribe if(!empty($match)){ $oneMail->body = str_replace($match[0], 'href="'.$match[1].'"', $oneMail->body); } acymailing_setPageTitle($oneMail->subject); if(!empty($oneMail->metadesc)){ acymailing_addMetadata('description', $oneMail->metadesc); } if(!empty($oneMail->metakey)){ acymailing_addMetadata('keywords', $oneMail->metakey); } $this->mail = $oneMail; $this->frontEndManagement = $frontEndManagement; $config = acymailing_config(); $this->config = $config; $this->receiver = $receiver; $this->values = $values; if($oneMail->html){ $templateClass = acymailing_get('class.template'); $templateClass->archiveSection = true; $templateClass->displayPreview('newsletter_preview_area', $oneMail->tempid, $oneMail->subject); } } } home/wuectly/www/components/com_slideshowck/views/browse/view.html.php 0000604 00000000645 15245570676 0022464 0 ustar 00 <?php /** * @name Slider CK * @package com_slideshowck * @copyright Copyright (C) 2016. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt * @author Cedric Keiflin - http://www.template-creator.com - http://www.joomlack.fr */ // No direct access defined('_JEXEC') or die; require_once JPATH_ADMINISTRATOR . '/components/com_slideshowck/views/browse/view.html.php'; home/wuectly/www/components/com_wrapper/views/wrapper/view.html.php 0000604 00000005607 15245575601 0022000 0 ustar 00 <?php /** * @package Joomla.Site * @subpackage com_wrapper * * @copyright (C) 2006 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; /** * Wrapper view class. * * @since 1.5 */ class WrapperViewWrapper extends JViewLegacy { /** * Execute and display a template script. * * @param string $tpl The name of the template file to parse; automatically searches through the template paths. * * @return mixed A string if successful, otherwise an Error object. * * @since 1.5 */ public function display($tpl = null) { $app = JFactory::getApplication(); $params = $app->getParams(); // Because the application sets a default page title, we need to get it // right from the menu item itself $title = $params->get('page_title', ''); if (empty($title)) { $title = $app->get('sitename'); } elseif ($app->get('sitename_pagetitles', 0) == 1) { $title = JText::sprintf('JPAGETITLE', $app->get('sitename'), $title); } elseif ($app->get('sitename_pagetitles', 0) == 2) { $title = JText::sprintf('JPAGETITLE', $title, $app->get('sitename')); } $this->document->setTitle($title); if ($params->get('menu-meta_description')) { $this->document->setDescription($params->get('menu-meta_description')); } if ($params->get('menu-meta_keywords')) { $this->document->setMetadata('keywords', $params->get('menu-meta_keywords')); } if ($params->get('robots')) { $this->document->setMetadata('robots', $params->get('robots')); } $wrapper = new stdClass; // Auto height control if ($params->def('height_auto')) { $wrapper->load = 'onload="iFrameHeight(this)"'; } else { $wrapper->load = ''; } $url = $params->def('url', ''); if ($params->def('add_scheme', 1)) { // Adds 'http://' or 'https://' if none is set if (strpos($url, '//') === 0) { // URL without scheme in component. Prepend current scheme. $wrapper->url = JUri::getInstance()->toString(array('scheme')) . substr($url, 2); } elseif (strpos($url, '/') === 0) { // Relative URL in component. Use scheme + host + port. $wrapper->url = JUri::getInstance()->toString(array('scheme', 'host', 'port')) . $url; } elseif (strpos($url, 'http://') !== 0 && strpos($url, 'https://') !== 0) { // URL doesn't start with either 'http://' or 'https://'. Add current scheme. $wrapper->url = JUri::getInstance()->toString(array('scheme')) . $url; } else { // URL starts with either 'http://' or 'https://'. Do not change it. $wrapper->url = $url; } } else { $wrapper->url = $url; } // Escape strings for HTML output $this->pageclass_sfx = htmlspecialchars($params->get('pageclass_sfx', '')); $this->params = &$params; $this->wrapper = &$wrapper; parent::display($tpl); } } home/wuectly/www/components/com_mailto/views/sent/view.html.php 0000604 00000000544 15245622151 0021062 0 ustar 00 <?php /** * @package Joomla.Site * @subpackage com_mailto * * @copyright (C) 2006 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; /** * Class for email sent view. * * @since 1.5 */ class MailtoViewSent extends JViewLegacy { } home/wuectly/www/components/com_contact/views/contact/view.html.php 0000604 00000034512 15245630141 0021712 0 ustar 00 <?php /** * @package Joomla.Site * @subpackage com_contact * * @copyright (C) 2006 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; /** * HTML Contact View class for the Contact component * * @since 1.5 */ class ContactViewContact extends JViewLegacy { /** * The item model state * * @var \Joomla\Registry\Registry * @since 1.6 */ protected $state; /** * The form object for the contact item * * @var JForm * @since 1.6 */ protected $form; /** * The item object details * * @var JObject * @since 1.6 */ protected $item; /** * The page to return to on submission * * @var string * @since 1.6 * @deprecated 4.0 Variable not used */ protected $return_page; /** * Should we show a captcha form for the submission of the contact request? * * @var bool * @since 3.6.3 */ protected $captchaEnabled = false; /** * Execute and display a template script. * * @param string $tpl The name of the template file to parse; automatically searches through the template paths. * * @return mixed A string if successful, otherwise an Error object. */ public function display($tpl = null) { $app = JFactory::getApplication(); $user = JFactory::getUser(); $item = $this->get('Item'); $state = $this->get('State'); $contacts = array(); // Get submitted values $data = $app->getUserState('com_contact.contact.data', array()); // Add catid for selecting custom fields $data['catid'] = $item->catid; $app->setUserState('com_contact.contact.data', $data); $this->form = $this->get('Form'); $params = $state->get('params'); $temp = clone $params; $active = $app->getMenu()->getActive(); if ($active) { // If the current view is the active item and a contact view for this contact, then the menu item params take priority if (strpos($active->link, 'view=contact') && strpos($active->link, '&id=' . (int) $item->id)) { // $item->params are the contact params, $temp are the menu item params // Merge so that the menu item params take priority $item->params->merge($temp); } else { // Current view is not a single contact, so the contact params take priority here // Merge the menu item params with the contact params so that the contact params take priority $temp->merge($item->params); $item->params = $temp; } } else { // Merge so that contact params take priority $temp->merge($item->params); $item->params = $temp; } // Collect extra contact information when this information is required if ($item && $item->params->get('show_contact_list')) { // Get Category Model data $categoryModel = JModelLegacy::getInstance('Category', 'ContactModel', array('ignore_request' => true)); $categoryModel->setState('category.id', $item->catid); $categoryModel->setState('list.ordering', 'a.name'); $categoryModel->setState('list.direction', 'asc'); $categoryModel->setState('filter.published', 1); $contacts = $categoryModel->getItems(); } // Check for errors. if (count($errors = $this->get('Errors'))) { JError::raiseWarning(500, implode("\n", $errors)); return false; } // Check if access is not public $groups = $user->getAuthorisedViewLevels(); $return = ''; if ((!in_array($item->access, $groups)) || (!in_array($item->category_access, $groups))) { $app->enqueueMessage(JText::_('JERROR_ALERTNOAUTHOR'), 'error'); $app->setHeader('status', 403, true); return false; } $options['category_id'] = $item->catid; $options['order by'] = 'a.default_con DESC, a.ordering ASC'; /** * Handle email cloaking * * Keep a copy of the raw email address so it can * still be accessed in the layout if needed. */ $item->email_raw = $item->email_to; if ($item->email_to && $item->params->get('show_email')) { $item->email_to = JHtml::_('email.cloak', $item->email_to, (bool) $item->params->get('add_mailto_link', true)); } if ($item->params->get('show_street_address') || $item->params->get('show_suburb') || $item->params->get('show_state') || $item->params->get('show_postcode') || $item->params->get('show_country')) { if (!empty($item->address) || !empty($item->suburb) || !empty($item->state) || !empty($item->country) || !empty($item->postcode)) { $item->params->set('address_check', 1); } } else { $item->params->set('address_check', 0); } // Manage the display mode for contact detail groups switch ($item->params->get('contact_icons')) { case 1 : // Text $item->params->set('marker_address', JText::_('COM_CONTACT_ADDRESS') . ': '); $item->params->set('marker_email', JText::_('JGLOBAL_EMAIL') . ': '); $item->params->set('marker_telephone', JText::_('COM_CONTACT_TELEPHONE') . ': '); $item->params->set('marker_fax', JText::_('COM_CONTACT_FAX') . ': '); $item->params->set('marker_mobile', JText::_('COM_CONTACT_MOBILE') . ': '); $item->params->set('marker_webpage', JText::_('COM_CONTACT_WEBPAGE') . ': '); $item->params->set('marker_misc', JText::_('COM_CONTACT_OTHER_INFORMATION') . ': '); $item->params->set('marker_class', 'jicons-text'); break; case 2 : // None $item->params->set('marker_address', ''); $item->params->set('marker_email', ''); $item->params->set('marker_telephone', ''); $item->params->set('marker_mobile', ''); $item->params->set('marker_webpage', ''); $item->params->set('marker_fax', ''); $item->params->set('marker_misc', ''); $item->params->set('marker_class', 'jicons-none'); break; default : if ($item->params->get('icon_address')) { $image1 = JHtml::_('image', $item->params->get('icon_address', 'con_address.png'), JText::_('COM_CONTACT_ADDRESS') . ': ', null, false); } else { $image1 = JHtml::_( 'image', 'contacts/' . $item->params->get('icon_address', 'con_address.png'), JText::_('COM_CONTACT_ADDRESS') . ': ', null, true ); } if ($item->params->get('icon_email')) { $image2 = JHtml::_('image', $item->params->get('icon_email', 'emailButton.png'), JText::_('JGLOBAL_EMAIL') . ': ', null, false); } else { $image2 = JHtml::_('image', 'contacts/' . $item->params->get('icon_email', 'emailButton.png'), JText::_('JGLOBAL_EMAIL') . ': ', null, true); } if ($item->params->get('icon_telephone')) { $image3 = JHtml::_('image', $item->params->get('icon_telephone', 'con_tel.png'), JText::_('COM_CONTACT_TELEPHONE') . ': ', null, false); } else { $image3 = JHtml::_( 'image', 'contacts/' . $item->params->get('icon_telephone', 'con_tel.png'), JText::_('COM_CONTACT_TELEPHONE') . ': ', null, true ); } if ($item->params->get('icon_fax')) { $image4 = JHtml::_('image', $item->params->get('icon_fax', 'con_fax.png'), JText::_('COM_CONTACT_FAX') . ': ', null, false); } else { $image4 = JHtml::_('image', 'contacts/' . $item->params->get('icon_fax', 'con_fax.png'), JText::_('COM_CONTACT_FAX') . ': ', null, true); } if ($item->params->get('icon_misc')) { $image5 = JHtml::_('image', $item->params->get('icon_misc', 'con_info.png'), JText::_('COM_CONTACT_OTHER_INFORMATION') . ': ', null, false); } else { $image5 = JHtml::_( 'image', 'contacts/' . $item->params->get('icon_misc', 'con_info.png'), JText::_('COM_CONTACT_OTHER_INFORMATION') . ': ', null, true ); } if ($item->params->get('icon_mobile')) { $image6 = JHtml::_('image', $item->params->get('icon_mobile', 'con_mobile.png'), JText::_('COM_CONTACT_MOBILE') . ': ', null, false); } else { $image6 = JHtml::_( 'image', 'contacts/' . $item->params->get('icon_mobile', 'con_mobile.png'), JText::_('COM_CONTACT_MOBILE') . ': ', null, true ); } $item->params->set('marker_address', $image1); $item->params->set('marker_email', $image2); $item->params->set('marker_telephone', $image3); $item->params->set('marker_fax', $image4); $item->params->set('marker_misc', $image5); $item->params->set('marker_mobile', $image6); $item->params->set('marker_webpage', ' '); $item->params->set('marker_class', 'jicons-icons'); break; } // Add links to contacts if ($item->params->get('show_contact_list') && count($contacts) > 1) { foreach ($contacts as &$contact) { $contact->link = JRoute::_(ContactHelperRoute::getContactRoute($contact->slug, $contact->catid), false); } $item->link = JRoute::_(ContactHelperRoute::getContactRoute($item->slug, $item->catid), false); } // Process the content plugins JPluginHelper::importPlugin('content'); $dispatcher = JEventDispatcher::getInstance(); $offset = $state->get('list.offset'); // Fix for where some plugins require a text attribute $item->text = null; if (!empty($item->misc)) { $item->text = $item->misc; } $dispatcher->trigger('onContentPrepare', array('com_contact.contact', &$item, &$item->params, $offset)); // Store the events for later $item->event = new stdClass; $results = $dispatcher->trigger('onContentAfterTitle', array('com_contact.contact', &$item, &$item->params, $offset)); $item->event->afterDisplayTitle = trim(implode("\n", $results)); $results = $dispatcher->trigger('onContentBeforeDisplay', array('com_contact.contact', &$item, &$item->params, $offset)); $item->event->beforeDisplayContent = trim(implode("\n", $results)); $results = $dispatcher->trigger('onContentAfterDisplay', array('com_contact.contact', &$item, &$item->params, $offset)); $item->event->afterDisplayContent = trim(implode("\n", $results)); if (!empty($item->text)) { $item->misc = $item->text; } $contactUser = null; if ($item->params->get('show_user_custom_fields') && $item->user_id && $contactUser = JFactory::getUser($item->user_id)) { $contactUser->text = ''; JEventDispatcher::getInstance()->trigger('onContentPrepare', array ('com_users.user', &$contactUser, &$item->params, 0)); if (!isset($contactUser->jcfields)) { $contactUser->jcfields = array(); } } // Escape strings for HTML output $this->pageclass_sfx = htmlspecialchars($item->params->get('pageclass_sfx', '')); $this->contact = &$item; $this->params = &$item->params; $this->return = &$return; $this->state = &$state; $this->item = &$item; $this->user = &$user; $this->contacts = &$contacts; $this->contactUser = $contactUser; // Override the layout only if this is not the active menu item // If it is the active menu item, then the view and item id will match if ((!$active) || ((strpos($active->link, 'view=contact') === false) || (strpos($active->link, '&id=' . (string) $this->item->id) === false))) { if (($layout = $item->params->get('contact_layout'))) { $this->setLayout($layout); } } elseif (isset($active->query['layout'])) { // We need to set the layout in case this is an alternative menu item (with an alternative layout) $this->setLayout($active->query['layout']); } $model = $this->getModel(); $model->hit(); $captchaSet = $item->params->get('captcha', JFactory::getApplication()->get('captcha', '0')); foreach (JPluginHelper::getPlugin('captcha') as $plugin) { if ($captchaSet === $plugin->name) { $this->captchaEnabled = true; break; } } $this->_prepareDocument(); return parent::display($tpl); } /** * Prepares the document * * @return void * * @since 1.6 */ protected function _prepareDocument() { $app = JFactory::getApplication(); $menus = $app->getMenu(); $pathway = $app->getPathway(); $title = null; // Because the application sets a default page title, // we need to get it from the menu item itself $menu = $menus->getActive(); if ($menu) { $this->params->def('page_heading', $this->params->get('page_title', $menu->title)); } else { $this->params->def('page_heading', JText::_('COM_CONTACT_DEFAULT_PAGE_TITLE')); } $title = $this->params->get('page_title', ''); $id = (int) @$menu->query['id']; // If the menu item does not concern this contact if ($menu && (!isset($menu->query['option']) || $menu->query['option'] !== 'com_contact' || $menu->query['view'] !== 'contact' || $id != $this->item->id)) { // If this is not a single contact menu item, set the page title to the contact title if ($this->item->name) { $title = $this->item->name; } $path = array(array('title' => $this->contact->name, 'link' => '')); $category = JCategories::getInstance('Contact')->get($this->contact->catid); while ($category && (!isset($menu->query['option']) || $menu->query['option'] !== 'com_contact' || $menu->query['view'] === 'contact' || $id != $category->id) && $category->id > 1) { $path[] = array('title' => $category->title, 'link' => ContactHelperRoute::getCategoryRoute($this->contact->catid)); $category = $category->getParent(); } $path = array_reverse($path); foreach ($path as $item) { $pathway->addItem($item['title'], $item['link']); } } if (empty($title)) { $title = $app->get('sitename'); } elseif ($app->get('sitename_pagetitles', 0) == 1) { $title = JText::sprintf('JPAGETITLE', $app->get('sitename'), $title); } elseif ($app->get('sitename_pagetitles', 0) == 2) { $title = JText::sprintf('JPAGETITLE', $title, $app->get('sitename')); } if (empty($title)) { $title = $this->item->name; } $this->document->setTitle($title); if ($this->item->metadesc) { $this->document->setDescription($this->item->metadesc); } elseif ($this->params->get('menu-meta_description')) { $this->document->setDescription($this->params->get('menu-meta_description')); } if ($this->item->metakey) { $this->document->setMetadata('keywords', $this->item->metakey); } elseif ($this->params->get('menu-meta_keywords')) { $this->document->setMetadata('keywords', $this->params->get('menu-meta_keywords')); } if ($this->params->get('robots')) { $this->document->setMetadata('robots', $this->params->get('robots')); } $mdata = $this->item->metadata->toArray(); foreach ($mdata as $k => $v) { if ($v) { $this->document->setMetadata($k, $v); } } } } home/wuectly/www/components/com_tags/views/tags/view.html.php 0000604 00000014303 15245630207 0020517 0 ustar 00 <?php /** * @package Joomla.Site * @subpackage com_tags * * @copyright (C) 2013 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; use Joomla\Registry\Registry; /** * HTML View class for the Tags component * * @since 3.1 */ class TagsViewTags extends JViewLegacy { protected $state; protected $items; protected $item; protected $pagination; protected $params; /** * Execute and display a template script. * * @param string $tpl The name of the template file to parse; automatically searches through the template paths. * * @return mixed A string if successful, otherwise an Error object. */ public function display($tpl = null) { // Get some data from the models $this->state = $this->get('State'); $this->items = $this->get('Items'); $this->pagination = $this->get('Pagination'); $this->params = $this->state->get('params'); $this->user = JFactory::getUser(); // Flag indicates to not add limitstart=0 to URL $this->pagination->hideEmptyLimitstart = true; /* * // Change to catch * if (count($errors = $this->get('Errors'))) { * JError::raiseError(500, implode("\n", $errors)); * return false; */ // Check whether access level allows access. // @todo: Should already be computed in $item->params->get('access-view') $groups = $this->user->getAuthorisedViewLevels(); if (!empty($this->items)) { foreach ($this->items as $itemElement) { if (!in_array($itemElement->access, $groups)) { unset($itemElement); } // Prepare the data. $temp = new Registry($itemElement->params); $itemElement->params = clone $this->params; $itemElement->params->merge($temp); $itemElement->params = (array) json_decode($itemElement->params); } } // Escape strings for HTML output $this->pageclass_sfx = htmlspecialchars($this->params->get('pageclass_sfx', '')); $active = JFactory::getApplication()->getMenu()->getActive(); // Load layout from active query (in case it is an alternative menu item) if ($active && isset($active->query['option']) && $active->query['option'] === 'com_tags' && $active->query['view'] === 'tags') { if (isset($active->query['layout'])) { $this->setLayout($active->query['layout']); } } else { // Load default All Tags layout from component if ($layout = $this->params->get('tags_layout')) { $this->setLayout($layout); } } $this->_prepareDocument(); parent::display($tpl); } /** * Prepares the document * * @return void */ protected function _prepareDocument() { $app = JFactory::getApplication(); $menus = $app->getMenu(); $title = null; // Because the application sets a default page title, // we need to get it from the menu item itself $menu = $menus->getActive(); if ($menu) { $this->params->def('page_heading', $this->params->get('page_title', $menu->title)); } else { $this->params->def('page_heading', JText::_('COM_TAGS_DEFAULT_PAGE_TITLE')); } if ($menu && (!isset($menu->query['option']) || $menu->query['option'] !== 'com_tags')) { $this->params->set('page_subheading', $menu->title); } // Set metadata for all tags menu item if ($this->params->get('menu-meta_description')) { $this->document->setDescription($this->params->get('menu-meta_description')); } if ($this->params->get('menu-meta_keywords')) { $this->document->setMetadata('keywords', $this->params->get('menu-meta_keywords')); } if ($this->params->get('robots')) { $this->document->setMetadata('robots', $this->params->get('robots')); } // If this is not a single tag menu item, set the page title to the tag titles $title = ''; if (!empty($this->item)) { foreach ($this->item as $i => $itemElement) { if ($itemElement->title) { if ($i != 0) { $title .= ', '; } $title .= $itemElement->title; } } if (empty($title)) { $title = $app->get('sitename'); } elseif ($app->get('sitename_pagetitles', 0) == 1) { $title = JText::sprintf('JPAGETITLE', $app->get('sitename'), $title); } elseif ($app->get('sitename_pagetitles', 0) == 2) { $title = JText::sprintf('JPAGETITLE', $title, $app->get('sitename')); } $this->document->setTitle($title); foreach ($this->item as $itemElement) { if ($itemElement->metadesc) { $this->document->setDescription($this->item->metadesc); } elseif ($this->params->get('menu-meta_description')) { $this->document->setDescription($this->params->get('menu-meta_description')); } if ($itemElement->metakey) { $this->document->setMetadata('keywords', $this->tag->metakey); } elseif ($this->params->get('menu-meta_keywords')) { $this->document->setMetadata('keywords', $this->params->get('menu-meta_keywords')); } if ($this->params->get('robots')) { $this->document->setMetadata('robots', $this->params->get('robots')); } if ($app->get('MetaAuthor') == '1') { $this->document->setMetaData('author', $itemElement->created_user_id); } $mdata = $this->item->metadata->toArray(); foreach ($mdata as $k => $v) { if ($v) { $this->document->setMetadata($k, $v); } } } } // Respect configuration Sitename Before/After for TITLE in views All Tags. if (!$title && ($pos = $app->get('sitename_pagetitles', 0))) { $title = $this->document->getTitle(); if ($pos == 1) { $title = JText::sprintf('JPAGETITLE', $app->get('sitename'), $title); } else { $title = JText::sprintf('JPAGETITLE', $title, $app->get('sitename')); } $this->document->setTitle($title); } // Add alternative feed link if ($this->params->get('show_feed_link', 1) == 1) { $link = '&format=feed&limitstart='; $attribs = array('type' => 'application/rss+xml', 'title' => 'RSS 2.0'); $this->document->addHeadLink(JRoute::_($link . '&type=rss'), 'alternate', 'rel', $attribs); $attribs = array('type' => 'application/atom+xml', 'title' => 'Atom 1.0'); $this->document->addHeadLink(JRoute::_($link . '&type=atom'), 'alternate', 'rel', $attribs); } } } home/wuectly/www/components/com_privacy/views/confirm/view.html.php 0000604 00000005765 15245650745 0021762 0 ustar 00 <?php /** * @package Joomla.Site * @subpackage com_privacy * * @copyright (C) 2018 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; use Joomla\Registry\Registry; /** * Request confirmation view class * * @since 3.9.0 */ class PrivacyViewConfirm extends JViewLegacy { /** * The form object * * @var JForm * @since 3.9.0 */ protected $form; /** * The CSS class suffix to append to the view container * * @var string * @since 3.9.0 */ protected $pageclass_sfx; /** * The view parameters * * @var Registry * @since 3.9.0 */ protected $params; /** * The state information * * @var JObject * @since 3.9.0 */ protected $state; /** * Execute and display a template script. * * @param string $tpl The name of the template file to parse; automatically searches through the template paths. * * @return mixed A string if successful, otherwise an Error object. * * @see JViewLegacy::loadTemplate() * @since 3.9.0 * @throws Exception */ public function display($tpl = null) { // Initialise variables. $this->form = $this->get('Form'); $this->state = $this->get('State'); $this->params = $this->state->params; // Check for errors. if (count($errors = $this->get('Errors'))) { throw new Exception(implode("\n", $errors), 500); } // Escape strings for HTML output $this->pageclass_sfx = htmlspecialchars($this->params->get('pageclass_sfx', ''), ENT_COMPAT, 'UTF-8'); $this->prepareDocument(); return parent::display($tpl); } /** * Prepares the document. * * @return void * * @since 3.9.0 */ protected function prepareDocument() { $app = JFactory::getApplication(); $menus = $app->getMenu(); $title = null; // Because the application sets a default page title, // we need to get it from the menu item itself $menu = $menus->getActive(); if ($menu) { $this->params->def('page_heading', $this->params->get('page_title', $menu->title)); } else { $this->params->def('page_heading', JText::_('COM_PRIVACY_VIEW_CONFIRM_PAGE_TITLE')); } $title = $this->params->get('page_title', ''); if (empty($title)) { $title = $app->get('sitename'); } elseif ($app->get('sitename_pagetitles', 0) == 1) { $title = JText::sprintf('JPAGETITLE', $app->get('sitename'), $title); } elseif ($app->get('sitename_pagetitles', 0) == 2) { $title = JText::sprintf('JPAGETITLE', $title, $app->get('sitename')); } $this->document->setTitle($title); if ($this->params->get('menu-meta_description')) { $this->document->setDescription($this->params->get('menu-meta_description')); } if ($this->params->get('menu-meta_keywords')) { $this->document->setMetadata('keywords', $this->params->get('menu-meta_keywords')); } if ($this->params->get('robots')) { $this->document->setMetadata('robots', $this->params->get('robots')); } } } home/wuectly/www/components/com_xmap/views/html/view.html.php 0000604 00000011747 15245657610 0020554 0 ustar 00 <?php /** * @version $Id$ * @copyright Copyright (C) 2005 - 2009 Joomla! Vargas. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt * @author Guillermo Vargas (guille@vargas.co.cr) */ // No direct access defined( '_JEXEC' ) or die( 'Restricted access' ); jimport('joomla.application.component.view'); # For compatibility with older versions of Joola 2.5 if (!class_exists('JViewLegacy')){ class JViewLegacy extends JView { } } /** * HTML Site map View class for the Xmap component * * @package Xmap * @subpackage com_xmap * @since 2.0 */ class XmapViewHtml extends JViewLegacy { protected $state; protected $print; function display($tpl = null) { // Initialise variables. $this->app = JFactory::getApplication(); $this->user = JFactory::getUser(); $doc = JFactory::getDocument(); // Get view related request variables. $this->print = JRequest::getBool('print'); // Get model data. $this->state = $this->get('State'); $this->item = $this->get('Item'); $this->items = $this->get('Items'); $this->canEdit = JFactory::getUser()->authorise('core.admin', 'com_xmap'); // Check for errors. if (count($errors = $this->get('Errors'))) { JError::raiseWarning(500, implode("\n", $errors)); return false; } $this->extensions = $this->get('Extensions'); // Add router helpers. $this->item->slug = $this->item->alias ? ($this->item->id . ':' . $this->item->alias) : $this->item->id; $this->item->rlink = JRoute::_('index.php?option=com_xmap&view=html&id=' . $this->item->slug); // Create a shortcut to the paramemters. $params = &$this->state->params; $offset = $this->state->get('page.offset'); if ($params->get('include_css', 0)){ $doc->addStyleSheet(JURI::root().'components/com_xmap/assets/css/xmap.css'); } // If a guest user, they may be able to log in to view the full article // TODO: Does this satisfy the show not auth setting? if (!$this->item->params->get('access-view')) { if ($user->get('guest')) { // Redirect to login $uri = JFactory::getURI(); $app->redirect( 'index.php?option=com_users&view=login&return=' . base64_encode($uri), JText::_('Xmap_Error_Login_to_view_sitemap') ); return; } else { JError::raiseWarning(403, JText::_('Xmap_Error_Not_auth')); return; } } // Override the layout. if ($layout = $params->get('layout')) { $this->setLayout($layout); } // Load the class used to display the sitemap $this->loadTemplate('class'); $this->displayer = new XmapHtmlDisplayer($params, $this->item); $this->displayer->setJView($this); $this->displayer->canEdit = $this->canEdit; $this->_prepareDocument(); parent::display($tpl); $model = $this->getModel(); $model->hit($this->displayer->getCount()); } /** * Prepares the document */ protected function _prepareDocument() { $app = JFactory::getApplication(); $pathway = $app->getPathway(); $menus = $app->getMenu(); $title = null; // Because the application sets a default page title, we need to get it from the menu item itself if ($menu = $menus->getActive()) { if (isset($menu->query['view']) && isset($menu->query['id'])) { if ($menu->query['view'] == 'html' && $menu->query['id'] == $this->item->id) { $title = $menu->title; if (empty($title)) { $title = $app->getCfg('sitename'); } else if ($app->getCfg('sitename_pagetitles', 0) == 1) { $title = JText::sprintf('JPAGETITLE', $app->getCfg('sitename'), $title); } else if ($app->getCfg('sitename_pagetitles', 0) == 2) { $title = JText::sprintf('JPAGETITLE', $title, $app->getCfg('sitename')); } // set meta description and keywords from menu item's params $params = new JRegistry(); $params->loadString($menu->params); $this->document->setDescription($params->get('menu-meta_description')); $this->document->setMetadata('keywords', $params->get('menu-meta_keywords')); } } } $this->document->setTitle($title); if ($app->getCfg('MetaTitle') == '1') { $this->document->setMetaData('title', $title); } if ($this->print) { $this->document->setMetaData('robots', 'noindex, nofollow'); } } } home/wuectly/www/components/com_finder/views/search/view.html.php 0000604 00000017066 15245670167 0021361 0 ustar 00 <?php /** * @package Joomla.Site * @subpackage com_finder * * @copyright (C) 2011 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; use Joomla\CMS\Helper\SearchHelper; /** * Search HTML view class for the Finder package. * * @since 2.5 */ class FinderViewSearch extends JViewLegacy { /** * The query object * * @var FinderIndexerQuery */ protected $query; /** * The application parameters * * @var Registry The parameters object */ protected $params; /** * The model state * * @var object */ protected $state; protected $user; /** * An array of results * * @var array * * @since 3.8.0 */ protected $results; /** * The total number of items * * @var integer * * @since 3.8.0 */ protected $total; /** * The pagination object * * @var JPagination * * @since 3.8.0 */ protected $pagination; /** * Method to display the view. * * @param string $tpl A template file to load. [optional] * * @return mixed JError object on failure, void on success. * * @since 2.5 */ public function display($tpl = null) { $app = JFactory::getApplication(); $params = $app->getParams(); // Get view data. $state = $this->get('State'); $query = $this->get('Query'); JDEBUG ? JProfiler::getInstance('Application')->mark('afterFinderQuery') : null; $results = $this->get('Results'); JDEBUG ? JProfiler::getInstance('Application')->mark('afterFinderResults') : null; $total = $this->get('Total'); JDEBUG ? JProfiler::getInstance('Application')->mark('afterFinderTotal') : null; $pagination = $this->get('Pagination'); JDEBUG ? JProfiler::getInstance('Application')->mark('afterFinderPagination') : null; // Flag indicates to not add limitstart=0 to URL $pagination->hideEmptyLimitstart = true; // Check for errors. if (count($errors = $this->get('Errors'))) { JError::raiseError(500, implode("\n", $errors)); return false; } // Configure the pathway. if (!empty($query->input)) { $app->getPathway()->addItem($this->escape($query->input)); } // Push out the view data. $this->state = &$state; $this->params = &$params; $this->query = &$query; $this->results = &$results; $this->total = &$total; $this->pagination = &$pagination; // Check for a double quote in the query string. if (strpos($this->query->input, '"')) { // Get the application router. $router = &$app::getRouter(); // Fix the q variable in the URL. if ($router->getVar('q') !== $this->query->input) { $router->setVar('q', $this->query->input); } } // Log the search SearchHelper::logSearch($this->query->input, 'com_finder'); // Push out the query data. JHtml::addIncludePath(JPATH_COMPONENT . '/helpers/html'); $this->suggested = JHtml::_('query.suggested', $query); $this->explained = JHtml::_('query.explained', $query); // Escape strings for HTML output $this->pageclass_sfx = htmlspecialchars($params->get('pageclass_sfx', '')); // Check for layout override only if this is not the active menu item // If it is the active menu item, then the view and category id will match $active = $app->getMenu()->getActive(); if (isset($active->query['layout'])) { // We need to set the layout in case this is an alternative menu item (with an alternative layout) $this->setLayout($active->query['layout']); } $this->prepareDocument($query); JDEBUG ? JProfiler::getInstance('Application')->mark('beforeFinderLayout') : null; parent::display($tpl); JDEBUG ? JProfiler::getInstance('Application')->mark('afterFinderLayout') : null; } /** * Method to get hidden input fields for a get form so that control variables * are not lost upon form submission * * @return string A string of hidden input form fields * * @since 2.5 */ protected function getFields() { $fields = null; // Get the URI. $uri = JUri::getInstance(JRoute::_($this->query->toUri())); $uri->delVar('q'); $uri->delVar('o'); $uri->delVar('t'); $uri->delVar('d1'); $uri->delVar('d2'); $uri->delVar('w1'); $uri->delVar('w2'); $elements = $uri->getQuery(true); // Create hidden input elements for each part of the URI. foreach ($elements as $n => $v) { if (is_scalar($v)) { $fields .= '<input type="hidden" name="' . $n . '" value="' . $v . '" />'; } } return $fields; } /** * Method to get the layout file for a search result object. * * @param string $layout The layout file to check. [optional] * * @return string The layout file to use. * * @since 2.5 */ protected function getLayoutFile($layout = null) { // Create and sanitize the file name. $file = $this->_layout . '_' . preg_replace('/[^A-Z0-9_\.-]/i', '', $layout); // Check if the file exists. jimport('joomla.filesystem.path'); $filetofind = $this->_createFileName('template', array('name' => $file)); $exists = JPath::find($this->_path['template'], $filetofind); return ($exists ? $layout : 'result'); } /** * Prepares the document * * @param FinderIndexerQuery $query The search query * * @return void * * @since 2.5 */ protected function prepareDocument($query) { $app = JFactory::getApplication(); $menus = $app->getMenu(); $title = null; // Because the application sets a default page title, // we need to get it from the menu item itself $menu = $menus->getActive(); if ($menu) { $this->params->def('page_heading', $this->params->get('page_title', $menu->title)); } else { $this->params->def('page_heading', JText::_('COM_FINDER_DEFAULT_PAGE_TITLE')); } $title = $this->params->get('page_title', ''); if (empty($title)) { $title = $app->get('sitename'); } elseif ($app->get('sitename_pagetitles', 0) == 1) { $title = JText::sprintf('JPAGETITLE', $app->get('sitename'), $title); } elseif ($app->get('sitename_pagetitles', 0) == 2) { $title = JText::sprintf('JPAGETITLE', $title, $app->get('sitename')); } $this->document->setTitle($title); if ($layout = $this->params->get('article_layout')) { $this->setLayout($layout); } // Configure the document meta-description. if (!empty($this->explained)) { $explained = $this->escape(html_entity_decode(strip_tags($this->explained), ENT_QUOTES, 'UTF-8')); $this->document->setDescription($explained); } elseif ($this->params->get('menu-meta_description')) { $this->document->setDescription($this->params->get('menu-meta_description')); } // Configure the document meta-keywords. if (!empty($query->highlight)) { $this->document->setMetaData('keywords', implode(', ', $query->highlight)); } elseif ($this->params->get('menu-meta_keywords')) { $this->document->setMetadata('keywords', $this->params->get('menu-meta_keywords')); } if ($this->params->get('robots')) { $this->document->setMetadata('robots', $this->params->get('robots')); } // Add feed link to the document head. if ($this->params->get('show_feed_link', 1) == 1) { // Add the RSS link. $props = array('type' => 'application/rss+xml', 'title' => 'RSS 2.0'); $route = JRoute::_($this->query->toUri() . '&format=feed&type=rss'); $this->document->addHeadLink($route, 'alternate', 'rel', $props); // Add the ATOM link. $props = array('type' => 'application/atom+xml', 'title' => 'Atom 1.0'); $route = JRoute::_($this->query->toUri() . '&format=feed&type=atom'); $this->document->addHeadLink($route, 'alternate', 'rel', $props); } } } home/wuectly/www/components/com_mailto/views/mailto/view.html.php 0000604 00000001464 15245670235 0021406 0 ustar 00 <?php /** * @package Joomla.Site * @subpackage com_mailto * * @copyright (C) 2006 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; /** * Class for Mail. * * @since 1.5 */ class MailtoViewMailto extends JViewLegacy { /** * Execute and display a template script. * * @param string $tpl The name of the template file to parse; automatically searches through the template paths. * * @return mixed A string if successful, otherwise an Error object. * * @since 1.5 */ public function display($tpl = null) { $this->form = $this->get('Form'); $this->link = urldecode(JFactory::getApplication()->input->get('link', '', 'BASE64')); return parent::display($tpl); } } home/wuectly/www/components/com_contact/views/featured/view.html.php 0000604 00000010721 15245670322 0022057 0 ustar 00 <?php /** * @package Joomla.Site * @subpackage com_contact * * @copyright (C) 2010 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; use Joomla\Registry\Registry; /** * Featured View class * * @since 1.6 */ class ContactViewFeatured extends JViewLegacy { /** * The item model state * * @var \Joomla\Registry\Registry * @since 1.6.0 */ protected $state; /** * The item details * * @var JObject * @since 1.6.0 */ protected $items; /** * Who knows what this variable was intended for - but it's never been used * * @var array * @since 1.6.0 * @deprecated 4.0 This variable has been null since 1.6.0-beta8 */ protected $category; /** * Who knows what this variable was intended for - but it's never been used * * @var JObject Maybe. * @since 1.6.0 * @deprecated 4.0 This variable has never been used ever */ protected $categories; /** * The pagination object * * @var JPagination * @since 1.6.0 */ protected $pagination; /** * Method to display the view. * * @param string $tpl The name of the template file to parse; automatically searches through the template paths. * * @return mixed Exception on failure, void on success. * * @since 1.6 */ public function display($tpl = null) { $app = JFactory::getApplication(); $params = $app->getParams(); // Get some data from the models $state = $this->get('State'); $items = $this->get('Items'); $category = $this->get('Category'); $children = $this->get('Children'); $parent = $this->get('Parent'); $pagination = $this->get('Pagination'); // Flag indicates to not add limitstart=0 to URL $pagination->hideEmptyLimitstart = true; // Check for errors. if (count($errors = $this->get('Errors'))) { JError::raiseWarning(500, implode("\n", $errors)); return false; } // Prepare the data. // Compute the contact slug. for ($i = 0, $n = count($items); $i < $n; $i++) { $item = &$items[$i]; $item->slug = $item->alias ? ($item->id . ':' . $item->alias) : $item->id; $temp = $item->params; $item->params = clone $params; $item->params->merge($temp); if ($item->params->get('show_email', 0) == 1) { $item->email_to = trim($item->email_to); if (!empty($item->email_to) && JMailHelper::isEmailAddress($item->email_to)) { $item->email_to = JHtml::_('email.cloak', $item->email_to); } else { $item->email_to = ''; } } } // Escape strings for HTML output $this->pageclass_sfx = htmlspecialchars($params->get('pageclass_sfx', ''), ENT_COMPAT, 'UTF-8'); $maxLevel = $params->get('maxLevel', -1); $this->maxLevel = &$maxLevel; $this->state = &$state; $this->items = &$items; $this->category = &$category; $this->children = &$children; $this->params = &$params; $this->parent = &$parent; $this->pagination = &$pagination; $this->_prepareDocument(); return parent::display($tpl); } /** * Prepares the document * * @return void * * @since 1.6 */ protected function _prepareDocument() { $app = JFactory::getApplication(); $menus = $app->getMenu(); $title = null; // Because the application sets a default page title, // we need to get it from the menu item itself $menu = $menus->getActive(); if ($menu) { $this->params->def('page_heading', $this->params->get('page_title', $menu->title)); } else { $this->params->def('page_heading', JText::_('COM_CONTACT_DEFAULT_PAGE_TITLE')); } $title = $this->params->get('page_title', ''); if (empty($title)) { $title = $app->get('sitename'); } elseif ($app->get('sitename_pagetitles', 0) == 1) { $title = JText::sprintf('JPAGETITLE', $app->get('sitename'), $title); } elseif ($app->get('sitename_pagetitles', 0) == 2) { $title = JText::sprintf('JPAGETITLE', $title, $app->get('sitename')); } $this->document->setTitle($title); if ($this->params->get('menu-meta_description')) { $this->document->setDescription($this->params->get('menu-meta_description')); } if ($this->params->get('menu-meta_keywords')) { $this->document->setMetadata('keywords', $this->params->get('menu-meta_keywords')); } if ($this->params->get('robots')) { $this->document->setMetadata('robots', $this->params->get('robots')); } } } home/wuectly/www/components/com_jce/views/popup/view.html.php 0000604 00000004615 15245703430 0020533 0 ustar 00 <?php /** * @package JCE * @subpackage Editor * * @copyright Copyright (C) 2005 - 2020 Open Source Matters, Inc. All rights reserved. * @copyright Copyright (c) 2009-2024 Ryan Demmer. All rights reserved * @license GNU General Public License version 2 or later; see LICENSE.txt */ use Joomla\CMS\Factory; use Joomla\CMS\MVC\View\AbstractView; use Joomla\CMS\Uri\Uri; class JceViewPopup extends AbstractView { public function display($tpl = null) { $app = Factory::getApplication(); $document = Factory::getDocument(); $document->addScript(Uri::root(true) . '/media/com_jce/site/js/popup.min.js'); $document->addStylesheet(Uri::root(true) . '/media/com_jce/site/css/popup.min.css'); // Get variables $img = $app->input->get('img', '', 'STRING'); $title = $app->input->getWord('title'); $mode = $app->input->getInt('mode', '0'); $click = $app->input->getInt('click', '0'); $print = $app->input->getInt('print', '0'); $dim = array('', ''); if (strpos('://', $img) === false) { $path = JPATH_SITE . '/' . trim(str_replace(Uri::root(), '', $img), '/'); if (is_file($path)) { $dim = @getimagesize($path); } } $width = $app->input->getInt('w', $app->input->getInt('width', '')); $height = $app->input->getInt('h', $app->input->getInt('height', '')); if (!$width) { $width = $dim[0]; } if (!$height) { $height = $dim[1]; } // Cleanup img variable $img = preg_replace('/[^a-z0-9\.\/_-]/i', '', $img); $title = isset($title) ? str_replace('_', ' ', $title) : basename($img); // img src must be passed if ($img) { $features = array( 'img' => str_replace(Uri::root(), '', $img), 'title' => $title, 'alt' => $title, 'mode' => $mode, 'click' => $click, 'print' => $print, 'width' => $width, 'height' => $height, ); $document->addScriptDeclaration('(function(){WfWindowPopup.init(' . $width . ', ' . $height . ', ' . $click . ');})();'); $this->features = $features; } else { $app->redirect('index.php'); } parent::display($tpl); } } home/wuectly/www/components/com_icagenda/views/list/view.html.php 0000604 00000020231 15245705154 0021332 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.6 2015-06-08 * @since 1.0 *------------------------------------------------------------------------------ */ // No direct access to this file defined('_JEXEC') or die(); jimport('joomla.application.component.helper'); /** * HTML View class - iCagenda. */ class icagendaViewList extends JViewLegacy { protected $params; protected $data; protected $getAllDates; protected $form; /** * Execute and display a template script. * * @param string $tpl The name of the template file to parse; automatically searches through the template paths. * * @return mixed A string if successful, otherwise a Error object. */ public function display($tpl = null) { $app = JFactory::getApplication(); $document = JFactory::getDocument(); $this->params = $app->getParams(); $params = $this->params; // For Dev. $time_loading = $params->get('time_loading', ''); if ($time_loading) { $starttime_list = iCLibrary::getMicrotime(); } // loading data $this->data = $this->getModel()->getData(); $this->getAllDates = icagendaEventsData::getAllDates(); $this->form = $this->getModel()->getForm(); // Registration Form $this->state = $this->get('State'); //Following variables used more than once // $this->sortColumn = $this->state->get('list.ordering'); // $this->sortDirection = $this->state->get('list.direction'); $this->searchterms = $this->state->get('filter.search'); // Menu Options $this->atlist = $params->get('atlist', 0); $this->template = $params->get('template'); $this->title = $params->get('title'); $this->number = $params->get('number', 5); $this->orderby = $params->get('orderby', 2); $this->time = $params->get('time', 1); // Component Options $this->iconPrint_global = $params->get('iconPrint_global', 0); $this->iconAddToCal_global = $params->get('iconAddToCal_global', 0); $this->iconAddToCal_options = $params->get('iconAddToCal_options', 0); $this->copy = $params->get('copy'); $this->navposition = $params->get('navposition', 1); $this->arrowtext = $params->get('arrowtext', 1); $this->GoogleMaps = $params->get('GoogleMaps', 1); $this->pagination = $params->get('pagination', 1); $this->day_display_global = $params->get('day_display_global', 1); $this->month_display_global = $params->get('month_display_global', 1); $this->year_display_global = $params->get('year_display_global', 1); $this->time_display_global = $params->get('time_display_global', 0); $this->venue_display_global = $params->get('venue_display_global', 1); $this->city_display_global = $params->get('city_display_global', 1); $this->country_display_global = $params->get('country_display_global', 1); $this->shortdesc_display_global = $params->get('shortdesc_display_global', ''); $this->statutReg = $params->get('statutReg', 0); $this->dates_display = $params->get('datesDisplay', 1); $this->reg_captcha = $params->get('reg_captcha', 0); $this->reg_form_validation = $params->get('reg_form_validation', ''); $this->cat_description = ($params->get('displayCatDesc_menu', 'global') == 'global') ? $params->get('CatDesc_global', '0') : $params->get('displayCatDesc_menu', ''); $cat_options = ($params->get('displayCatDesc_menu', 'global') == 'global') ? $params->get('CatDesc_checkbox', '') : $params->get('displayCatDesc_checkbox', ''); $this->cat_options = is_array($cat_options) ? $cat_options : array(); $this->pageclass_sfx = htmlspecialchars($params->get('pageclass_sfx')); // Check for errors. if (count($errors = $this->get('Errors'))) { JError::raiseError(500, implode("\n", $errors)); return false; } $vcal = $app->input->get('vcal'); if ($vcal) { $tpl = 'vcal'; } // Process the content plugins. JPluginHelper::importPlugin('content'); if (version_compare(JVERSION, '3.0', 'ge')) // J3 { $this->dispatcher = JEventDispatcher::getInstance(); } else // J2.5 { $this->dispatcher = JDispatcher::getInstance(); } $eventid = $app->input->get('id'); if ($eventid) { // Set Item Object $this_item = (array) $this->data->items; $item = array_shift($this_item); $this->actions = $this->dispatcher->trigger('onRegistrationActions', array('com_icagenda.actions', &$item, &$this->params)); } $this->_prepareDocument(); $isVcal = JRequest::getVar('vcal', ''); if ( ! $isVcal) { icagendaInfo::commentVersion(); } // Loads jQuery Library if (version_compare(JVERSION, '3.0', 'lt')) { // Joomla 2.5 JHtml::stylesheet( 'com_icagenda/icagenda-front.j25.css', false, true ); JHtml::_('behavior.mootools'); // load jQuery, if not loaded before $scripts = array_keys($document->_scripts); $scriptFound = false; for ($i = 0; $i < count($scripts); $i++) { if (stripos($scripts[$i], 'jquery.min.js') !== false || stripos($scripts[$i], 'jquery.js') !== false) { $scriptFound = true; } } // jQuery Library Loader if (!$scriptFound) { // load jQuery, if not loaded before if (!$app->get('jquery')) { $app->set('jquery', true); // Add jQuery Library $document->addScript('https://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js'); JHtml::script('com_icagenda/jquery.noconflict.js', false, true); } } } // Joomla 3 else { JHtml::_('bootstrap.framework'); JHtml::_('jquery.framework'); } parent::display($tpl); // For Dev. if ($time_loading) { $endtime_list = iCLibrary::getMicrotime(); echo '<center style="font-size:8px;">Time to create page: ' . round($endtime_list-$starttime_list, 3) . ' seconds</center>'; } icagendaEvents::isListOfEvents(); $jlayout = JRequest::getCmd('layout', ''); $layouts_array = array('event', 'registration', 'actions'); $layout = in_array($jlayout, $layouts_array) ? $jlayout : ''; // Loading Script tipTip used for iCtips JHtml::script('com_icagenda/jquery.tipTip.js', false, true); if (!$layout || $layout == 'list') { // Add RSS Feeds $menu = $app->getMenu()->getActive()->id; $feed = 'index.php?option=com_icagenda&view=list&Itemid=' . (int) $menu . '&format=feed'; $rss = array( 'type' => 'application/rss+xml', 'title' => 'RSS 2.0'); $document->addHeadLink(JRoute::_($feed.'&type=rss'), 'alternate', 'rel', $rss); } } /** * Prepares the document */ protected function _prepareDocument() { $app = JFactory::getApplication(); $menus = $app->getMenu(); $pathway = $app->getPathway(); $title = null; $menu = $menus->getActive(); if ($menu) { $this->params->def('page_heading', $this->params->get('page_title', $menu->title)); } else { $this->params->def('page_heading', JText::_('JGLOBAL_ARTICLES')); } $title = $this->params->get('page_title', ''); if (empty($title)) { $title = $app->getCfg('sitename'); } elseif ($app->getCfg('sitename_pagetitles', 0) == 1) { $title = JText::sprintf('JPAGETITLE', $app->getCfg('sitename'), $title); } elseif ($app->getCfg('sitename_pagetitles', 0) == 2) { $title = JText::sprintf('JPAGETITLE', $title, $app->getCfg('sitename')); } $this->document->setTitle($title); if ($this->params->get('menu-meta_description', '')) { $this->document->setDescription($this->params->get('menu-meta_description', '')); } if ($this->params->get('menu-meta_keywords', '')) { $this->document->setMetadata('keywords', $this->params->get('menu-meta_keywords', '')); } if ($app->getCfg('MetaTitle') == '1' && $this->params->get('menupage_title', '')) { $this->document->setMetaData('title', $this->params->get('page_title', '')); } } } home/wuectly/www/components/com_search/views/search/view.html.php 0000604 00000022662 15245721547 0021354 0 ustar 00 <?php /** * @package Joomla.Site * @subpackage com_search * * @copyright (C) 2007 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; use Joomla\String\StringHelper; /** * HTML View class for the search component * * @since 1.0 */ class SearchViewSearch extends JViewLegacy { /** * Execute and display a template script. * * @param string $tpl The name of the template file to parse; automatically searches through the template paths. * * @return mixed A string if successful, otherwise an Error object. * * @since 1.0 */ public function display($tpl = null) { JLoader::register('SearchHelper', JPATH_COMPONENT_ADMINISTRATOR . '/helpers/search.php'); $app = JFactory::getApplication(); $uri = JUri::getInstance(); $error = null; $results = null; $total = 0; // Get some data from the model $areas = $this->get('areas'); $state = $this->get('state'); $searchWord = $state->get('keyword'); $params = $app->getParams(); if (!$app->getMenu()->getActive()) { $params->set('page_title', JText::_('COM_SEARCH_SEARCH')); } $title = $params->get('page_title'); if ($app->get('sitename_pagetitles', 0) == 1) { $title = JText::sprintf('JPAGETITLE', $app->get('sitename'), $title); } elseif ($app->get('sitename_pagetitles', 0) == 2) { $title = JText::sprintf('JPAGETITLE', $title, $app->get('sitename')); } $this->document->setTitle($title); if ($params->get('menu-meta_description')) { $this->document->setDescription($params->get('menu-meta_description')); } if ($params->get('menu-meta_keywords')) { $this->document->setMetadata('keywords', $params->get('menu-meta_keywords')); } if ($params->get('robots')) { $this->document->setMetadata('robots', $params->get('robots')); } // Built select lists $orders = array(); $orders[] = JHtml::_('select.option', 'newest', JText::_('COM_SEARCH_NEWEST_FIRST')); $orders[] = JHtml::_('select.option', 'oldest', JText::_('COM_SEARCH_OLDEST_FIRST')); $orders[] = JHtml::_('select.option', 'popular', JText::_('COM_SEARCH_MOST_POPULAR')); $orders[] = JHtml::_('select.option', 'alpha', JText::_('COM_SEARCH_ALPHABETICAL')); $orders[] = JHtml::_('select.option', 'category', JText::_('JCATEGORY')); $lists = array(); $lists['ordering'] = JHtml::_('select.genericlist', $orders, 'ordering', 'class="inputbox"', 'value', 'text', $state->get('ordering')); $searchphrases = array(); $searchphrases[] = JHtml::_('select.option', 'all', JText::_('COM_SEARCH_ALL_WORDS')); $searchphrases[] = JHtml::_('select.option', 'any', JText::_('COM_SEARCH_ANY_WORDS')); $searchphrases[] = JHtml::_('select.option', 'exact', JText::_('COM_SEARCH_EXACT_PHRASE')); $lists['searchphrase'] = JHtml::_('select.radiolist', $searchphrases, 'searchphrase', '', 'value', 'text', $state->get('match')); // Log the search \Joomla\CMS\Helper\SearchHelper::logSearch($searchWord, 'com_search'); // Limit search-word $lang = JFactory::getLanguage(); $upper_limit = $lang->getUpperLimitSearchWord(); $lower_limit = $lang->getLowerLimitSearchWord(); if (SearchHelper::limitSearchWord($searchWord)) { $error = JText::sprintf('COM_SEARCH_ERROR_SEARCH_MESSAGE', $lower_limit, $upper_limit); } // Sanitise search-word if (SearchHelper::santiseSearchWord($searchWord, $state->get('match'))) { $error = JText::_('COM_SEARCH_ERROR_IGNOREKEYWORD'); } if (!$searchWord && !empty($this->input) && count($this->input->post)) { // $error = JText::_('COM_SEARCH_ERROR_ENTERKEYWORD'); } // Put the filtered results back into the model // for next release, the checks should be done in the model perhaps... $state->set('keyword', $searchWord); if ($error === null) { $results = $this->get('data'); $total = $this->get('total'); $pagination = $this->get('pagination'); // Flag indicates to not add limitstart=0 to URL $pagination->hideEmptyLimitstart = true; if ($state->get('match') === 'exact') { $searchWords = array($searchWord); $needle = $searchWord; } else { $searchWordA = preg_replace('#\xE3\x80\x80#', ' ', $searchWord); $searchWords = preg_split("/\s+/u", $searchWordA); $needle = $searchWords[0]; } JLoader::register('ContentHelperRoute', JPATH_SITE . '/components/com_content/helpers/route.php'); // Make sure there are no slashes in the needle $needle = str_replace('/', '\/', $needle); for ($i = 0, $count = count($results); $i < $count; ++$i) { $rowTitle = &$results[$i]->title; $rowTitleHighLighted = $this->highLight($rowTitle, $needle, $searchWords); $rowText = &$results[$i]->text; $rowTextHighLighted = $this->highLight($rowText, $needle, $searchWords); $result = &$results[$i]; $created = ''; if ($result->created) { $created = JHtml::_('date', $result->created, JText::_('DATE_FORMAT_LC3')); } $result->title = $rowTitleHighLighted; $result->text = JHtml::_('content.prepare', $rowTextHighLighted, '', 'com_search.search'); $result->created = $created; $result->count = $i + 1; } } // Check for layout override $active = JFactory::getApplication()->getMenu()->getActive(); if (isset($active->query['layout'])) { $this->setLayout($active->query['layout']); } // Escape strings for HTML output $this->pageclass_sfx = htmlspecialchars($params->get('pageclass_sfx', '')); $this->pagination = &$pagination; $this->results = &$results; $this->lists = &$lists; $this->params = &$params; $this->ordering = $state->get('ordering'); $this->searchword = $searchWord; $this->origkeyword = $state->get('origkeyword'); $this->searchphrase = $state->get('match'); $this->searchareas = $areas; $this->total = $total; $this->error = $error; $this->action = $uri; parent::display($tpl); } /** * Method to control the highlighting of keywords * * @param string $string text to be searched * @param string $needle text to search for * @param string $searchWords words to be searched * * @return mixed A string. * * @since 3.8.4 */ public function highLight($string, $needle, $searchWords) { $hl1 = '<span class="highlight">'; $hl2 = '</span>'; $mbString = extension_loaded('mbstring'); $highlighterLen = strlen($hl1 . $hl2); // Doing HTML entity decoding here, just in case we get any HTML entities here. $quoteStyle = version_compare(PHP_VERSION, '5.4', '>=') ? ENT_NOQUOTES | ENT_HTML401 : ENT_NOQUOTES; $row = html_entity_decode($string, $quoteStyle, 'UTF-8'); $row = SearchHelper::prepareSearchContent($row, $needle); $searchWords = array_values(array_unique($searchWords)); $lowerCaseRow = $mbString ? mb_strtolower($row) : StringHelper::strtolower($row); $transliteratedLowerCaseRow = SearchHelper::remove_accents($lowerCaseRow); $posCollector = array(); foreach ($searchWords as $highlightWord) { $found = false; if ($mbString) { $lowerCaseHighlightWord = mb_strtolower($highlightWord); if (($pos = mb_strpos($lowerCaseRow, $lowerCaseHighlightWord)) !== false) { $found = true; } elseif (($pos = mb_strpos($transliteratedLowerCaseRow, $lowerCaseHighlightWord)) !== false) { $found = true; } } else { $lowerCaseHighlightWord = StringHelper::strtolower($highlightWord); if (($pos = StringHelper::strpos($lowerCaseRow, $lowerCaseHighlightWord)) !== false) { $found = true; } elseif (($pos = StringHelper::strpos($transliteratedLowerCaseRow, $lowerCaseHighlightWord)) !== false) { $found = true; } } if ($found === true) { // Iconv transliterates '€' to 'EUR' // TODO: add other expanding translations? $eur_compensation = $pos > 0 ? substr_count($row, "\xE2\x82\xAC", 0, $pos) * 2 : 0; $pos -= $eur_compensation; // Collect pos and search-word $posCollector[$pos] = $highlightWord; } } if (count($posCollector)) { // Sort by pos. Easier to handle overlapping highlighter-spans ksort($posCollector); $cnt = 0; $lastHighlighterEnd = -1; foreach ($posCollector as $pos => $highlightWord) { $pos += $cnt * $highlighterLen; /* * Avoid overlapping/corrupted highlighter-spans * TODO $chkOverlap could be used to highlight remaining part * of search-word outside last highlighter-span. * At the moment no additional highlighter is set. */ $chkOverlap = $pos - $lastHighlighterEnd; if ($chkOverlap >= 0) { // Set highlighter around search-word if ($mbString) { $highlightWordLen = mb_strlen($highlightWord); $row = mb_substr($row, 0, $pos) . $hl1 . mb_substr($row, $pos, $highlightWordLen) . $hl2 . mb_substr($row, $pos + $highlightWordLen); } else { $highlightWordLen = StringHelper::strlen($highlightWord); $row = StringHelper::substr($row, 0, $pos) . $hl1 . StringHelper::substr($row, $pos, StringHelper::strlen($highlightWord)) . $hl2 . StringHelper::substr($row, $pos + StringHelper::strlen($highlightWord)); } $cnt++; $lastHighlighterEnd = $pos + $highlightWordLen + $highlighterLen; } } } return $row; } } home/wuectly/www/components/com_privacy/views/request/view.html.php 0000604 00000006330 15245721547 0022001 0 ustar 00 <?php /** * @package Joomla.Site * @subpackage com_privacy * * @copyright (C) 2018 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; use Joomla\Registry\Registry; /** * Request view class * * @since 3.9.0 */ class PrivacyViewRequest extends JViewLegacy { /** * The form object * * @var JForm * @since 3.9.0 */ protected $form; /** * The CSS class suffix to append to the view container * * @var string * @since 3.9.0 */ protected $pageclass_sfx; /** * The view parameters * * @var Registry * @since 3.9.0 */ protected $params; /** * Flag indicating the site supports sending email * * @var boolean * @since 3.9.0 */ protected $sendMailEnabled; /** * The state information * * @var JObject * @since 3.9.0 */ protected $state; /** * Execute and display a template script. * * @param string $tpl The name of the template file to parse; automatically searches through the template paths. * * @return mixed A string if successful, otherwise an Error object. * * @see JViewLegacy::loadTemplate() * @since 3.9.0 * @throws Exception */ public function display($tpl = null) { // Initialise variables. $this->form = $this->get('Form'); $this->state = $this->get('State'); $this->params = $this->state->params; $this->sendMailEnabled = (bool) JFactory::getConfig()->get('mailonline', 1); // Check for errors. if (count($errors = $this->get('Errors'))) { throw new Exception(implode("\n", $errors), 500); } // Escape strings for HTML output $this->pageclass_sfx = htmlspecialchars($this->params->get('pageclass_sfx', ''), ENT_COMPAT, 'UTF-8'); $this->prepareDocument(); return parent::display($tpl); } /** * Prepares the document. * * @return void * * @since 3.9.0 */ protected function prepareDocument() { $app = JFactory::getApplication(); $menus = $app->getMenu(); $title = null; // Because the application sets a default page title, // we need to get it from the menu item itself $menu = $menus->getActive(); if ($menu) { $this->params->def('page_heading', $this->params->get('page_title', $menu->title)); } else { $this->params->def('page_heading', JText::_('COM_PRIVACY_VIEW_REQUEST_PAGE_TITLE')); } $title = $this->params->get('page_title', ''); if (empty($title)) { $title = $app->get('sitename'); } elseif ($app->get('sitename_pagetitles', 0) == 1) { $title = JText::sprintf('JPAGETITLE', $app->get('sitename'), $title); } elseif ($app->get('sitename_pagetitles', 0) == 2) { $title = JText::sprintf('JPAGETITLE', $title, $app->get('sitename')); } $this->document->setTitle($title); if ($this->params->get('menu-meta_description')) { $this->document->setDescription($this->params->get('menu-meta_description')); } if ($this->params->get('menu-meta_keywords')) { $this->document->setMetadata('keywords', $this->params->get('menu-meta_keywords')); } if ($this->params->get('robots')) { $this->document->setMetadata('robots', $this->params->get('robots')); } } } home/wuectly/www/components/com_newsfeeds/views/newsfeed/view.html.php 0000604 00000020054 15245741202 0022404 0 ustar 00 <?php /** * @package Joomla.Site * @subpackage com_newsfeeds * * @copyright (C) 2006 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; use Joomla\Registry\Registry; /** * HTML View class for the Newsfeeds component * * @since 1.0 */ class NewsfeedsViewNewsfeed extends JViewLegacy { /** * @var object * @since 1.6 */ protected $state; /** * @var object * @since 1.6 */ protected $item; /** * @var boolean * @since 1.6 */ protected $print; /** * Execute and display a template script. * * @param string $tpl The name of the template file to parse; automatically searches through the template paths. * * @return mixed A string if successful, otherwise an Error object. * * @since 1.6 */ public function display($tpl = null) { $app = JFactory::getApplication(); $user = JFactory::getUser(); // Get view related request variables. $print = $app->input->getBool('print'); // Get model data. $state = $this->get('State'); $item = $this->get('Item'); // Check for errors. // @TODO: Maybe this could go into JComponentHelper::raiseErrors($this->get('Errors')) if (count($errors = $this->get('Errors'))) { JError::raiseWarning(500, implode("\n", $errors)); return false; } // Add router helpers. $item->slug = $item->alias ? ($item->id . ':' . $item->alias) : $item->id; $item->catslug = $item->category_alias ? ($item->catid . ':' . $item->category_alias) : $item->catid; $item->parent_slug = $item->category_alias ? ($item->parent_id . ':' . $item->parent_alias) : $item->parent_id; // Merge newsfeed params. If this is single-newsfeed view, menu params override newsfeed params // Otherwise, newsfeed params override menu item params $params = $state->get('params'); $newsfeed_params = clone $item->params; $active = $app->getMenu()->getActive(); $temp = clone $params; // Check to see which parameters should take priority if ($active) { $currentLink = $active->link; // If the current view is the active item and a newsfeed view for this feed, then the menu item params take priority if (strpos($currentLink, 'view=newsfeed') && strpos($currentLink, '&id=' . (string) $item->id)) { // $item->params are the newsfeed params, $temp are the menu item params // Merge so that the menu item params take priority $newsfeed_params->merge($temp); $item->params = $newsfeed_params; // Load layout from active query (in case it is an alternative menu item) if (isset($active->query['layout'])) { $this->setLayout($active->query['layout']); } } else { // Current view is not a single newsfeed, so the newsfeed params take priority here // Merge the menu item params with the newsfeed params so that the newsfeed params take priority $temp->merge($newsfeed_params); $item->params = $temp; // Check for alternative layouts (since we are not in a single-newsfeed menu item) if ($layout = $item->params->get('newsfeed_layout')) { $this->setLayout($layout); } } } else { // Merge so that newsfeed params take priority $temp->merge($newsfeed_params); $item->params = $temp; // Check for alternative layouts (since we are not in a single-newsfeed menu item) if ($layout = $item->params->get('newsfeed_layout')) { $this->setLayout($layout); } } // Check the access to the newsfeed $levels = $user->getAuthorisedViewLevels(); if (!in_array($item->access, $levels) || (in_array($item->access, $levels) && (!in_array($item->category_access, $levels)))) { $app->enqueueMessage(JText::_('JERROR_ALERTNOAUTHOR'), 'error'); $app->setHeader('status', 403, true); return; } // Get the current menu item $params = $app->getParams(); // Get the newsfeed $newsfeed = $item; $params->merge($item->params); try { $feed = new JFeedFactory; $this->rssDoc = $feed->getFeed($newsfeed->link); } catch (InvalidArgumentException $e) { $msg = JText::_('COM_NEWSFEEDS_ERRORS_FEED_NOT_RETRIEVED'); } catch (RunTimeException $e) { $msg = JText::_('COM_NEWSFEEDS_ERRORS_FEED_NOT_RETRIEVED'); } if (empty($this->rssDoc)) { $msg = JText::_('COM_NEWSFEEDS_ERRORS_FEED_NOT_RETRIEVED'); } $feed_display_order = $params->get('feed_display_order', 'des'); if ($feed_display_order === 'asc') { $this->rssDoc->reverseItems(); } // Escape strings for HTML output $this->pageclass_sfx = htmlspecialchars($params->get('pageclass_sfx', '')); $this->params = $params; $this->newsfeed = $newsfeed; $this->state = $state; $this->item = $item; $this->user = $user; if (!empty($msg)) { $this->msg = $msg; } $this->print = $print; $item->tags = new JHelperTags; $item->tags->getItemTags('com_newsfeeds.newsfeed', $item->id); // Increment the hit counter of the newsfeed. $model = $this->getModel(); $model->hit(); $this->_prepareDocument(); return parent::display($tpl); } /** * Prepares the document * * @return void * * @since 1.6 */ protected function _prepareDocument() { $app = JFactory::getApplication(); $menus = $app->getMenu(); $pathway = $app->getPathway(); $title = null; // Because the application sets a default page title, // we need to get it from the menu item itself $menu = $menus->getActive(); if ($menu) { $this->params->def('page_heading', $this->params->get('page_title', $menu->title)); } else { $this->params->def('page_heading', JText::_('COM_NEWSFEEDS_DEFAULT_PAGE_TITLE')); } $title = $this->params->get('page_title', ''); $id = (int) @$menu->query['id']; // If the menu item does not concern this newsfeed if ($menu && (!isset($menu->query['option']) || $menu->query['option'] !== 'com_newsfeeds' || $menu->query['view'] !== 'newsfeed' || $id != $this->item->id)) { // If this is not a single newsfeed menu item, set the page title to the newsfeed title if ($this->item->name) { $title = $this->item->name; } $path = array(array('title' => $this->item->name, 'link' => '')); $category = JCategories::getInstance('Newsfeeds')->get($this->item->catid); while ((!isset($menu->query['option']) || $menu->query['option'] !== 'com_newsfeeds' || $menu->query['view'] === 'newsfeed' || $id != $category->id) && $category->id > 1) { $path[] = array('title' => $category->title, 'link' => NewsfeedsHelperRoute::getCategoryRoute($category->id)); $category = $category->getParent(); } $path = array_reverse($path); foreach ($path as $item) { $pathway->addItem($item['title'], $item['link']); } } if (empty($title)) { $title = $app->get('sitename'); } elseif ($app->get('sitename_pagetitles', 0) == 1) { $title = JText::sprintf('JPAGETITLE', $app->get('sitename'), $title); } elseif ($app->get('sitename_pagetitles', 0) == 2) { $title = JText::sprintf('JPAGETITLE', $title, $app->get('sitename')); } if (empty($title)) { $title = $this->item->name; } $this->document->setTitle($title); if ($this->item->metadesc) { $this->document->setDescription($this->item->metadesc); } elseif ($this->params->get('menu-meta_description')) { $this->document->setDescription($this->params->get('menu-meta_description')); } if ($this->item->metakey) { $this->document->setMetadata('keywords', $this->item->metakey); } elseif ($this->params->get('menu-meta_keywords')) { $this->document->setMetadata('keywords', $this->params->get('menu-meta_keywords')); } if ($this->params->get('robots')) { $this->document->setMetadata('robots', $this->params->get('robots')); } if ($app->get('MetaTitle') == '1') { $this->document->setMetaData('title', $this->item->name); } if ($app->get('MetaAuthor') == '1') { $this->document->setMetaData('author', $this->item->author); } $mdata = $this->item->metadata->toArray(); foreach ($mdata as $k => $v) { if ($v) { $this->document->setMetadata($k, $v); } } } } home/wuectly/www/components/com_icagenda/views/submit/view.html.php 0000604 00000012350 15245757352 0021674 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.12 2015-09-25 * @since 3.2.0 *------------------------------------------------------------------------------ */ // No direct access to this file defined('_JEXEC') or die(); jimport('joomla.application.component.helper'); /** * View class Site - Add an Event - iCagenda */ class iCagendaViewSubmit extends JViewLegacy { // TODO: check and remove protected $return_page; protected $state; protected $item; protected $form; protected $params; /** * Display the view */ public function display($tpl = null) { // Initialiase variables. $this->state = $this->get('State'); $this->item = $this->get('Item'); $this->form = $this->get('Form'); if (JRequest::get( 'POST' )) $this->get('data'); // loading params $app = JFactory::getApplication(); $params = $app->getParams(); $this->template = $params->get('template'); $this->title = $params->get('title'); $this->format = $params->get('format'); $this->copy = $params->get('copy'); $this->submit = "media/com_icagenda/js/jsevt.js"; $this->submit_imageDisplay = $params->get('submit_imageDisplay', 1); $this->submit_periodDisplay = $params->get('submit_periodDisplay', 1); $this->submit_weekdaysDisplay = $params->get('submit_weekdaysDisplay', 1); $this->submit_datesDisplay = $params->get('submit_datesDisplay', 1); $this->submit_displaytimeDisplay = $params->get('submit_displaytimeDisplay', 0); $this->submit_shortdescDisplay = $params->get('submit_shortdescDisplay', 1); $this->submit_descDisplay = $params->get('submit_descDisplay', 1); $this->submit_metadescDisplay = $params->get('submit_metadescDisplay', 0); $this->submit_venueDisplay = $params->get('submit_venueDisplay', 1); $this->submit_emailDisplay = $params->get('submit_emailDisplay', 1); $this->submit_phoneDisplay = $params->get('submit_phoneDisplay', 1); $this->submit_websiteDisplay = $params->get('submit_websiteDisplay', 1); $this->submit_customfieldsDisplay = $params->get('submit_customfieldsDisplay', 1); $this->submit_fileDisplay = $params->get('submit_fileDisplay', 1); $this->submit_gmapDisplay = $params->get('submit_gmapDisplay', 1); $this->submit_regoptionsDisplay = $params->get('submit_regoptionsDisplay', 1); $this->statutReg = $params->get('statutReg', 0); $this->ShortDescLimit = $params->get('ShortDescLimit', '160'); $this->submit_imageMaxSize = $params->get('submit_imageMaxSize', '800'); $this->submit_captcha = $params->get('submit_captcha', 0); $this->submit_form_validation = $params->get('submit_form_validation', ''); $this->pageclass_sfx = htmlspecialchars($params->get('pageclass_sfx')); $this->params = $this->state->get('params'); $this->iCparams = $this->params; // Check for errors. if (count($errors = $this->get('Errors'))) { JError::raiseError(500, implode('<br />', $errors)); return false; } // ASSIGN (deprecated) // $this->assignRef('params', $iCparams); $this->_prepareDocument(); icagendaInfo::commentVersion(); parent::display($tpl); icagendaEvents::isListOfEvents(); icagendaForm::loadDateTimePickerJSLanguage(); $jlayout = JRequest::getCmd('layout', ''); $layouts_array = array('event', 'registration'); $layout = in_array($jlayout, $layouts_array) ? $jlayout : ''; if ( ! $layout || $layout == 'submit') { JHtml::stylesheet( 'com_icagenda/icagenda.css', false, true ); JHtml::stylesheet( 'com_icagenda/jquery-ui-1.8.17.custom.css', false, true ); } } protected function _prepareDocument() { $app = JFactory::getApplication(); $menus = $app->getMenu(); $pathway = $app->getPathway(); $title = null; $menu = $menus->getActive(); if ($menu) { $this->params->def('page_heading', $this->params->get('page_title', $menu->title)); } else { $this->params->def('page_heading', JText::_('JGLOBAL_ARTICLES')); } $title = $this->params->get('page_title', ''); if (empty($title)) { $title = $app->getCfg('sitename'); } elseif ($app->getCfg('sitename_pagetitles', 0) == 1) { $title = JText::sprintf('JPAGETITLE', $app->getCfg('sitename'), $title); } elseif ($app->getCfg('sitename_pagetitles', 0) == 2) { $title = JText::sprintf('JPAGETITLE', $title, $app->getCfg('sitename')); } $this->document->setTitle($title); if ($this->params->get('menu-meta_description', '')) { $this->document->setDescription($this->params->get('menu-meta_description', '')); } if ($this->params->get('menu-meta_keywords', '')) { $this->document->setMetadata('keywords', $this->params->get('menu-meta_keywords', '')); } if ($app->getCfg('MetaTitle') == '1' && $this->params->get('menupage_title', '')) { $this->document->setMetaData('title', $this->params->get('page_title', '')); } } }
| ver. 1.4 |
Github
|
.
| PHP 8.1.34 | Генерация страницы: 0 |
proxy
|
phpinfo
|
Настройка