Файловый менеджер - Редактировать - /home/wuectly/www/03cbe/adapter.zip
Назад
PK � "]�#o, , categories/index.htmlnu &1i� <html><body bgcolor="#FFFFFF"></body></html>PK � "]�o��� � categories/categories.phpnu &1i� <?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 */ \defined('_JEXEC') or die; use Joomla\CMS\Factory; use Joomla\CMS\Helper\RouteHelper; use Joomla\CMS\Language\Text; use Joomla\CMS\Plugin\CMSPlugin; /** * Categories search plugin. * * @since 1.6 */ class PlgWfSearchCategories extends CMSPlugin { /** * Load the language file on instantiation. * * @var boolean * @since 3.1 */ protected $autoloadLanguage = true; /** * Determine areas searchable by this plugin. * * @return array An array of search areas. * * @since 1.6 */ public function onContentSearchAreas() { static $areas = array( 'categories' => 'PLG_SEARCH_CATEGORIES_CATEGORIES', ); return $areas; } /** * Search content (categories). * * The SQL must return the following fields that are used in a common display * routine: href, title, section, created, text, browsernav. * * @param string $text Target search string. * @param string $phrase Matching option (possible values: exact|any|all). Default is "any". * @param string $ordering Ordering option (possible values: newest|oldest|popular|alpha|category). Default is "newest". * @param mixed $areas An array if the search is to be restricted to areas or null to search all areas. * * @return array Search results. * * @since 1.6 */ public function onContentSearch($text, $phrase = '', $ordering = '', $areas = null) { $db = Factory::getDbo(); $user = Factory::getUser(); $app = Factory::getApplication(); $groups = implode(',', $user->getAuthorisedViewLevels()); $searchText = $text; if (is_array($areas) && !array_intersect($areas, array_keys($this->onContentSearchAreas()))) { return array(); } $limit = $this->params->def('search_limit', 50); $text = trim($text); if ($text === '') { return array(); } switch ($ordering) { case 'alpha': $order = 'a.title ASC'; break; case 'category': case 'popular': case 'newest': case 'oldest': default: $order = 'a.title DESC'; } $text = $db->quote('%' . $db->escape($text, true) . '%', false); $query = $db->getQuery(true); // SQLSRV changes. $case_when = ' CASE WHEN '; $case_when .= $query->charLength('a.alias', '!=', '0'); $case_when .= ' THEN '; // Joomla 3 compatibility if (method_exists($query, 'castAsChar')) { $a_id = $query->castAsChar('a.id'); } else { $a_id = $query->castAs('CHAR', 'a.id'); } $case_when .= $query->concatenate(array($a_id, 'a.alias'), ':'); $case_when .= ' ELSE '; $case_when .= $a_id . ' END as slug'; $query->select('a.title, a.description AS text, a.id AS catid, a.created_time, a.language, ' . $case_when); $query->from('#__categories AS a'); $query->where( '(a.title LIKE ' . $text . ' OR a.description LIKE ' . $text . ') AND a.published = 1 AND a.extension = ' . $db->quote('com_content') . 'AND a.access IN (' . $groups . ')' ); $query->group('a.id, a.title, a.description, a.alias, a.created_time'); $query->order($order); $db->setQuery($query, 0, $limit); try { $rows = $db->loadObjectList(); } catch (RuntimeException $e) { Factory::getApplication()->enqueueMessage(Text::_('JERROR_AN_ERROR_HAS_OCCURRED'), 'error'); } if ($rows) { foreach ($rows as $i => $row) { $rows[$i]->href = RouteHelper::getCategoryRoute($row->slug, $row->language, 'com_content'); $rows[$i]->section = Text::_('JCATEGORY'); } } return $rows; } } PK � "]�#o, , contacts/index.htmlnu &1i� <html><body bgcolor="#FFFFFF"></body></html>PK � "]y�P contacts/contacts.phpnu &1i� <?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 */ \defined('_JEXEC') or die; use Joomla\CMS\Factory; use Joomla\CMS\Helper\RouteHelper; use Joomla\CMS\Language\Text; use Joomla\CMS\Plugin\CMSPlugin; /** * Contacts search plugin. */ class PlgWfSearchContacts extends CMSPlugin { /** * Load the language file on instantiation. * * @var boolean */ protected $autoloadLanguage = true; /** * Determine areas searchable by this plugin. * * @return array An array of search areas. */ public function onContentSearchAreas() { static $areas = array( 'contacts' => 'PLG_SEARCH_CONTACTS_CONTACTS', ); return $areas; } /** * Search content (contacts). * * The SQL must return the following fields that are used in a common display * routine: href, title, section, created, text, browsernav. * * @param string $text Target search string. * @param string $phrase Matching option (possible values: exact|any|all). Default is "any". * @param string $ordering Ordering option (possible values: newest|oldest|popular|alpha|category). Default is "newest". * @param string $areas An array if the search is to be restricted to areas or null to search all areas. * * @return array Search results. */ public function onContentSearch($text, $phrase = '', $ordering = '', $areas = null) { $db = Factory::getDbo(); $app = Factory::getApplication(); $user = Factory::getUser(); $groups = implode(',', $user->getAuthorisedViewLevels()); // create a new RouteHelper instance $router = new RouteHelper(); if (is_array($areas) && !array_intersect($areas, array_keys($this->onContentSearchAreas()))) { return array(); } $limit = $this->params->def('search_limit', 50); $text = trim($text); if ($text === '') { return array(); } $section = Text::_('PLG_SEARCH_CONTACTS_CONTACTS'); switch ($ordering) { case 'alpha': $order = 'a.name ASC'; break; case 'category': $order = 'c.title ASC, a.name ASC'; break; case 'popular': case 'newest': case 'oldest': default: $order = 'a.name DESC'; } $text = $db->quote('%' . $db->escape($text, true) . '%', false); $query = $db->getQuery(true); // SQLSRV changes. $case_when = ' CASE WHEN '; $case_when .= $query->charLength('a.alias', '!=', '0'); $case_when .= ' THEN '; if (method_exists($query, 'castAsChar')) { $a_id = $query->castAsChar('a.id'); } else { $a_id = $query->castAs('CHAR', 'a.id'); } $case_when .= $query->concatenate(array($a_id, 'a.alias'), ':'); $case_when .= ' ELSE '; $case_when .= $a_id . ' END as slug'; $case_when1 = ' CASE WHEN '; $case_when1 .= $query->charLength('c.alias', '!=', '0'); $case_when1 .= ' THEN '; if (method_exists($query, 'castAsChar')) { $c_id = $query->castAsChar('c.id'); } else { $c_id = $query->castAs('CHAR', 'c.id'); } $case_when1 .= $query->concatenate(array($c_id, 'c.alias'), ':'); $case_when1 .= ' ELSE '; $case_when1 .= $c_id . ' END as catslug'; $query->select( 'a.name AS title, a.con_position, a.misc, a.language, ' . $case_when . ',' . $case_when1 . ', ' . $query->concatenate(array('a.name', 'a.con_position', 'a.misc'), ',') . ' AS text' ); $query->from('#__contact_details AS a') ->join('INNER', '#__categories AS c ON c.id = a.catid') ->where( '(a.name LIKE ' . $text . ' OR a.misc LIKE ' . $text . ' OR a.con_position LIKE ' . $text . ' OR a.address LIKE ' . $text . ' OR a.suburb LIKE ' . $text . ' OR a.state LIKE ' . $text . ' OR a.country LIKE ' . $text . ' OR a.postcode LIKE ' . $text . ' OR a.telephone LIKE ' . $text . ' OR a.fax LIKE ' . $text . ') AND a.published = 1 AND c.published = 1 ' . ' AND a.access IN (' . $groups . ') AND c.access IN (' . $groups . ')' ) ->order($order); $db->setQuery($query, 0, $limit); try { $rows = $db->loadObjectList(); } catch (RuntimeException $e) { $rows = array(); Factory::getApplication()->enqueueMessage(Text::_('JERROR_AN_ERROR_HAS_OCCURRED'), 'error'); } if ($rows) { // create a new RouteHelper instance $router = new RouteHelper(); foreach ($rows as $key => $row) { $rows[$key]->href = $router->getRoute($row->slug, 'com_contact.contact', '', $row->language, $row->catslug); $rows[$key]->text = $row->title; $rows[$key]->text .= $row->con_position ? ', ' . $row->con_position : ''; $rows[$key]->text .= $row->misc ? ', ' . $row->misc : ''; $rows[$key]->section = $section; } } return $rows; } } PK � "]�#o, , index.htmlnu &1i� <html><body bgcolor="#FFFFFF"></body></html>PK � "]�|7# tags/tags.phpnu &1i� <?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 */ \defined('_JEXEC') or die; use Joomla\CMS\Factory; use Joomla\CMS\Helper\RouteHelper; use Joomla\CMS\Language\Text; use Joomla\CMS\Plugin\CMSPlugin; /** * Tags search plugin. * */ class PlgWfSearchTags extends CMSPlugin { /** * Load the language file on instantiation. * * @var boolean */ protected $autoloadLanguage = true; /** * Determine areas searchable by this plugin. * * @return array An array of search areas. * */ public function onContentSearchAreas() { static $areas = array( 'tags' => 'PLG_SEARCH_TAGS_TAGS', ); return $areas; } /** * Search content (tags). * * The SQL must return the following fields that are used in a common display * routine: href, title, section, created, text, browsernav. * * @param string $text Target search string. * @param string $phrase Matching option (possible values: exact|any|all). Default is "any". * @param string $ordering Ordering option (possible values: newest|oldest|popular|alpha|category). Default is "newest". * @param string $areas An array if the search is to be restricted to areas or null to search all areas. * * @return array Search results. * * @since 3.3 */ public function onContentSearch($text, $phrase = '', $ordering = '', $areas = null) { $db = Factory::getDbo(); $query = $db->getQuery(true); $app = Factory::getApplication(); $user = Factory::getUser(); $lang = Factory::getLanguage(); $section = Text::_('PLG_SEARCH_TAGS_TAGS'); $limit = $this->params->def('search_limit', 50); if (is_array($areas) && !array_intersect($areas, array_keys($this->onContentSearchAreas()))) { return array(); } $text = trim($text); if ($text === '') { return array(); } $text = $db->quote('%' . $db->escape($text, true) . '%', false); switch ($ordering) { case 'alpha': $order = 'a.title ASC'; break; case 'newest': $order = 'a.created_time DESC'; break; case 'oldest': $order = 'a.created_time ASC'; break; case 'popular': default: $order = 'a.title DESC'; } $query->select('a.id, a.title, a.alias, a.note, a.published, a.access' . ', a.checked_out, a.checked_out_time, a.created_user_id' . ', a.path, a.parent_id, a.level, a.lft, a.rgt' . ', a.language, a.created_time AS created, a.description'); $case_when_item_alias = ' CASE WHEN '; $case_when_item_alias .= $query->charLength('a.alias', '!=', '0'); $case_when_item_alias .= ' THEN '; // Joomla 3 compatibility if (method_exists($query, 'castAsChar')) { $a_id = $query->castAsChar('a.id'); } else { $a_id = $query->castAs('CHAR', 'a.id'); } $case_when_item_alias .= $query->concatenate(array($a_id, 'a.alias'), ':'); $case_when_item_alias .= ' ELSE '; $case_when_item_alias .= $a_id . ' END as slug'; $query->select($case_when_item_alias); $query->from('#__tags AS a'); $query->where('a.alias <> ' . $db->quote('root')); $query->where('(a.title LIKE ' . $text . ' OR a.alias LIKE ' . $text . ')'); $query->where($db->qn('a.published') . ' = 1'); if (!$user->authorise('core.admin')) { $groups = implode(',', $user->getAuthorisedViewLevels()); $query->where('a.access IN (' . $groups . ')'); } $query->order($order); $db->setQuery($query, 0, $limit); try { $rows = $db->loadObjectList(); } catch (RuntimeException $e) { $rows = array(); Factory::getApplication()->enqueueMessage(Text::_('JERROR_AN_ERROR_HAS_OCCURRED'), 'error'); } if ($rows) { // create a new RouteHelper instance $router = new RouteHelper(); foreach ($rows as $key => $row) { $rows[$key]->href = $router->getRoute($row->slug, 'com_tags.tag', '', $row->language); $rows[$key]->text = ($row->description !== '' ? $row->description : $row->title); $rows[$key]->text .= $row->note; } } return $rows; } } PK � "]�#o, , tags/index.htmlnu &1i� <html><body bgcolor="#FFFFFF"></body></html>PK � "]l5J�� � content/content.phpnu &1i� <?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 */ \defined('_JEXEC') or die; use Joomla\CMS\Factory; use Joomla\CMS\Helper\RouteHelper; use Joomla\CMS\Language\Text; use Joomla\CMS\Plugin\CMSPlugin; /** * Content search plugin. * */ class PlgWfSearchContent extends CMSPlugin { /** * Determine areas searchable by this plugin. * * @return array An array of search areas. * */ public function onContentSearchAreas() { static $areas = array( 'content' => 'JGLOBAL_ARTICLES', ); return $areas; } /** * Search content (articles). * The SQL must return the following fields that are used in a common display * routine: href, title, section, created, text, browsernav. * * @param string $text Target search string. * @param string $phrase Matching option (possible values: exact|any|all). Default is "any". * @param string $ordering Ordering option (possible values: newest|oldest|popular|alpha|category). Default is "newest". * @param mixed $areas An array if the search it to be restricted to areas or null to search all areas. * * @return array Search results. * */ public function onContentSearch($text, $phrase = '', $ordering = '', $areas = null) { $db = Factory::getDbo(); $serverType = $db->getServerType(); $app = Factory::getApplication(); $user = Factory::getUser(); $groups = implode(',', $user->getAuthorisedViewLevels()); $tag = Factory::getLanguage()->getTag(); $searchText = $text; if (is_array($areas) && !array_intersect($areas, array_keys($this->onContentSearchAreas()))) { return array(); } $limit = $this->params->def('search_limit', 50); $nullDate = $db->getNullDate(); $date = Factory::getDate(); $now = $date->toSql(); $text = trim($text); if ($text === '') { return array(); } $relevance = array(); switch ($phrase) { case 'exact': $text = $db->quote('%' . $db->escape($text, true) . '%', false); $wheres2 = array(); $wheres2[] = 'a.title LIKE ' . $text; $wheres2[] = 'a.introtext LIKE ' . $text; $wheres2[] = 'a.fulltext LIKE ' . $text; $relevance[] = ' CASE WHEN ' . $wheres2[0] . ' THEN 5 ELSE 0 END '; $where = '(' . implode(') OR (', $wheres2) . ')'; break; case 'all': case 'any': default: $words = explode(' ', $text); $wheres = array(); foreach ($words as $word) { $word = $db->quote('%' . $db->escape($word, true) . '%', false); $wheres2 = array(); $wheres2[] = 'LOWER(a.title) LIKE LOWER(' . $word . ')'; $wheres2[] = 'LOWER(a.introtext) LIKE LOWER(' . $word . ')'; $wheres2[] = 'LOWER(a.fulltext) LIKE LOWER(' . $word . ')'; $relevance[] = ' CASE WHEN ' . $wheres2[0] . ' THEN 5 ELSE 0 END '; $wheres[] = implode(' OR ', $wheres2); } $where = '(' . implode(($phrase === 'all' ? ') AND (' : ') OR ('), $wheres) . ')'; break; } switch ($ordering) { case 'oldest': $order = 'a.created ASC'; break; case 'popular': $order = 'a.hits DESC'; break; case 'alpha': $order = 'a.title ASC'; break; case 'category': $order = 'c.title ASC, a.title ASC'; break; case 'newest': default: $order = 'a.created DESC'; break; } $rows = array(); $query = $db->getQuery(true); // Search articles. if ($limit > 0) { //sqlsrv changes $case_when1 = ' CASE WHEN '; $case_when1 .= $query->charLength('a.alias', '!=', '0'); $case_when1 .= ' THEN '; // Joomla 3 compatibility if (method_exists($query, 'castAsChar')) { $a_id = $query->castAsChar('a.id'); } else { $a_id = $query->castAs('CHAR', 'a.id'); } $case_when1 .= $query->concatenate(array($a_id, 'a.alias'), ':'); $case_when1 .= ' ELSE '; $case_when1 .= $a_id . ' END as slug'; $case_when2 = ' CASE WHEN '; $case_when2 .= $query->charLength('b.alias', '!=', '0'); $case_when2 .= ' THEN '; // Joomla 3 compatibility if (method_exists($query, 'castAsChar')) { $c_id = $query->castAsChar('b.id'); } else { $c_id = $query->castAs('CHAR', 'b.id'); } $case_when2 .= $query->concatenate(array($c_id, 'b.alias'), ':'); $case_when2 .= ' ELSE '; $case_when2 .= $c_id . ' END as catslug'; $case = ',' . $case_when1 . ',' . $case_when2; if (!empty($relevance)) { $query->select(implode(' + ', $relevance) . ' AS relevance'); $order = ' relevance DESC, ' . $order; } $query->select('a.id AS slug, b.id AS catslug, a.alias, a.state, a.title AS title, a.access, ' . $query->concatenate(array('a.introtext', 'a.fulltext')) . ' AS text, a.language' . $case); $query->from('#__content AS a'); $query->innerJoin('#__categories AS b ON b.id = a.catid'); $query->where('(' . $where . ') AND a.state = 1 AND b.published = 1'); if (!$user->authorise('core.admin')) { $query->where('a.access IN (' . $groups . ')'); $query->where('b.access IN (' . $groups . ')'); } $query->order($order); $db->setQuery($query, 0, $limit); try { $rows = $db->loadObjectList(); } catch (RuntimeException $e) { $rows = array(); Factory::getApplication()->enqueueMessage(Text::_('JERROR_AN_ERROR_HAS_OCCURRED'), 'error'); } if ($rows) { // create a new RouteHelper instance $router = new RouteHelper(); foreach ($rows as $key => $row) { $rows[$key]->href = $router->getRoute($row->slug, 'com_content.article', '', $row->language, $row->catslug); } } } return $rows; } } PK � "]�#o, , content/index.htmlnu &1i� <html><body bgcolor="#FFFFFF"></body></html>PK � "]Q?n�b b weblinks/weblinks.phpnu &1i� <?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 */ \defined('_JEXEC') or die; use Joomla\CMS\Factory; use Joomla\CMS\Language\Text; use Joomla\CMS\Plugin\CMSPlugin; require_once JPATH_SITE . '/components/com_weblinks/helpers/route.php'; /** * Weblinks search plugin. * */ class PlgWfSearchWeblinks extends CMSPlugin { /** * Load the language file on instantiation. * * @var boolean */ protected $autoloadLanguage = true; /** * Determine areas searchable by this plugin. * * @return array An array of search areas. * */ public function onContentSearchAreas() { static $areas = array( 'weblinks' => 'PLG_SEARCH_WEBLINKS_WEBLINKS', ); return $areas; } /** * Search content (weblinks). * * The SQL must return the following fields that are used in a common display * routine: href, title, section, created, text, browsernav * * @param string $text Target search string. * @param string $phrase Matching option (possible values: exact|any|all). Default is "any". * @param string $ordering Ordering option (possible values: newest|oldest|popular|alpha|category). Default is "newest". * @param mixed $areas An array if the search it to be restricted to areas or null to search all areas. * * @return array Search results. * * @since 1.6 */ public function onContentSearch($text, $phrase = '', $ordering = '', $areas = null) { $db = Factory::getDbo(); $groups = implode(',', Factory::getUser()->getAuthorisedViewLevels()); $searchText = $text; if (is_array($areas)) { if (!array_intersect($areas, array_keys($this->onContentSearchAreas()))) { return array(); } } $limit = $this->params->def('search_limit', 50); $state = array(); $text = trim($text); if ($text == '') { return array(); } switch ($phrase) { case 'exact': $text = $db->quote('%' . $db->escape($text, true) . '%', false); $wheres2 = array(); $wheres2[] = 'a.url LIKE ' . $text; $wheres2[] = 'a.description LIKE ' . $text; $wheres2[] = 'a.title LIKE ' . $text; $where = '(' . implode(') OR (', $wheres2) . ')'; break; case 'all': case 'any': default: $words = explode(' ', $text); $wheres = array(); foreach ($words as $word) { $word = $db->quote('%' . $db->escape($word, true) . '%', false); $wheres2 = array(); $wheres2[] = 'a.url LIKE ' . $word; $wheres2[] = 'a.description LIKE ' . $word; $wheres2[] = 'a.title LIKE ' . $word; $wheres[] = implode(' OR ', $wheres2); } $where = '(' . implode(($phrase == 'all' ? ') AND (' : ') OR ('), $wheres) . ')'; break; } switch ($ordering) { case 'oldest': $order = 'a.created ASC'; break; case 'popular': $order = 'a.hits DESC'; break; case 'alpha': $order = 'a.title ASC'; break; case 'category': $order = 'c.title ASC, a.title ASC'; break; case 'newest': default: $order = 'a.created DESC'; } $query = $db->getQuery(true); // SQLSRV changes. $case_when = ' CASE WHEN '; $case_when .= $query->charLength('a.alias', '!=', '0'); $case_when .= ' THEN '; // Joomla 3 compatibility if (method_exists($query, 'castAsChar')) { $a_id = $query->castAsChar('a.id'); } else { $a_id = $query->castAs('CHAR', 'a.id'); } $case_when .= $query->concatenate(array($a_id, 'a.alias'), ':'); $case_when .= ' ELSE '; $case_when .= $a_id . ' END as slug'; $case_when1 = ' CASE WHEN '; $case_when1 .= $query->charLength('c.alias', '!=', '0'); $case_when1 .= ' THEN '; // Joomla 3 compatibility if (method_exists($query, 'castAsChar')) { $c_id = $query->castAsChar('c.id'); } else { $c_id = $query->castAs('CHAR', 'c.id'); } $case_when1 .= $query->concatenate(array($c_id, 'c.alias'), ':'); $case_when1 .= ' ELSE '; $case_when1 .= $c_id . ' END as catslug'; $query->select('a.title AS title, a.created AS created, a.url, a.description AS text, a.language, ' . $case_when . "," . $case_when1) ->from('#__weblinks AS a') ->join('INNER', '#__categories as c ON c.id = a.catid') ->where('(' . $where . ') AND a.state = 1 AND c.published = 1 AND c.access IN (' . $groups . ')') ->order($order); $db->setQuery($query, 0, $limit); $rows = $db->loadObjectList(); if ($rows) { foreach ($rows as $key => $row) { $rows[$key]->href = WeblinksHelperRoute::getWeblinkRoute($row->slug, $row->catslug, $row->language); } } return $rows; } } PK � "]�#o, , weblinks/index.htmlnu &1i� <html><body bgcolor="#FFFFFF"></body></html>PK � "]�#o, , categories/index.htmlnu &1i� PK � "]�o��� � q categories/categories.phpnu &1i� PK � "]�#o, , � contacts/index.htmlnu &1i� PK � "]y�P contacts/contacts.phpnu &1i� PK � "]�#o, , f( index.htmlnu &1i� PK � "]�|7# �( tags/tags.phpnu &1i� PK � "]�#o, , <