Файловый менеджер - Редактировать - /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 { }
| ver. 1.4 |
Github
|
.
| PHP 8.1.34 | Генерация страницы: 0 |
proxy
|
phpinfo
|
Настройка