Файловый менеджер - Редактировать - /home/wuectly/www/03cbe/links.php.tar
Назад
home/wuectly/www/libraries/cms/html/links.php 0000604 00000004776 15245551627 0015375 0 ustar 00 <?php /** * @package Joomla.Libraries * @subpackage HTML * * @copyright (C) 2013 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('JPATH_PLATFORM') or die; /** * Utility class for icons. * * @since 3.2 */ abstract class JHtmlLinks { /** * Method to generate html code for groups of lists of links * * @param array $groupsOfLinks Array of links * * @return string * * @since 3.2 */ public static function linksgroups($groupsOfLinks) { $html = array(); if (count($groupsOfLinks) > 0) { $layout = new JLayoutFile('joomla.links.groupsopen'); $html[] = $layout->render(''); foreach ($groupsOfLinks as $title => $links) { if (isset($links[0]['separategroup'])) { $layout = new JLayoutFile('joomla.links.groupseparator'); $html[] = $layout->render($title); } $layout = new JLayoutFile('joomla.links.groupopen'); $htmlHeader = $layout->render($title); $htmlLinks = JHtml::_('links.links', $links); if ($htmlLinks != '') { $html[] = $htmlHeader; $html[] = $htmlLinks; $layout = new JLayoutFile('joomla.links.groupclose'); $html[] = $layout->render(''); } } $layout = new JLayoutFile('joomla.links.groupsclose'); $html[] = $layout->render(''); } return implode($html); } /** * Method to generate html code for a list of links * * @param array $links Array of links * * @return string * * @since 3.2 */ public static function links($links) { $html = array(); foreach ($links as $link) { $html[] = JHtml::_('links.link', $link); } return implode($html); } /** * Method to generate html code for a single link * * @param array $link link properties * * @return string * * @since 3.2 */ public static function link($link) { if (isset($link['access'])) { if (is_bool($link['access'])) { if ($link['access'] == false) { return ''; } } else { // Get the user object to verify permissions $user = JFactory::getUser(); // Take each pair of permission, context values. for ($i = 0, $n = count($link['access']); $i < $n; $i += 2) { if (!$user->authorise($link['access'][$i], $link['access'][$i + 1])) { return ''; } } } } // Instantiate a new JLayoutFile instance and render the layout $layout = new JLayoutFile('joomla.links.link'); return $layout->render($link); } } home/wuectly/www/libraries/joomla/mediawiki/links.php 0000604 00000017353 15245570365 0017066 0 ustar 00 <?php /** * @package Joomla.Platform * @subpackage MediaWiki * * @copyright (C) 2013 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE */ defined('JPATH_PLATFORM') or die; /** * MediaWiki API Links class for the Joomla Platform. * * @since 3.1.4 */ class JMediawikiLinks extends JMediawikiObject { /** * Method to return all links from the given page(s). * * @param array $titles Page titles to retrieve links. * @param array $plnamespace Namespaces to get links. * @param string $pllimit Number of links to return. * @param string $plcontinue Continue when more results are available. * @param array $pltitles List links to these titles. * @param string $pldir Direction of listing. * * @return object * * @since 3.1.4 */ public function getLinks(array $titles, array $plnamespace = null, $pllimit = null, $plcontinue = null, array $pltitles = null, $pldir = null) { // Build the request. $path = '?action=query&prop=links'; // Append titles to the request. $path .= '&titles=' . $this->buildParameter($titles); if (isset($plnamespace)) { $path .= '&plnamespace=' . $this->buildParameter($plnamespace); } if (isset($pllimit)) { $path .= '&pllimit=' . $pllimit; } if (isset($plcontinue)) { $path .= '&plcontinue=' . $plcontinue; } if (isset($pltitles)) { $path .= '&pltitles=' . $this->buildParameter($pltitles); } if (isset($pldir)) { $path .= '&pldir=' . $pldir; } // Send the request. $response = $this->client->get($this->fetchUrl($path)); return $this->validateResponse($response); } /** * Method to return info about the link pages. * * @param array $titles Page titles to retrieve links. * * @return object * * @since 3.1.4 */ public function getLinksUsed(array $titles) { // Build the request. $path = '?action=query&generator=links&prop=info'; // Append titles to the request. $path .= '&titles=' . $this->buildParameter($titles); // Send the request. $response = $this->client->get($this->fetchUrl($path)); return $this->validateResponse($response); } /** * Method to return all interwiki links from the given page(s). * * @param array $titles Page titles to retrieve links. * @param boolean $iwurl Whether to get the full url. * @param integer $iwlimit Number of interwiki links to return. * @param boolean $iwcontinue When more results are available, use this to continue. * @param string $iwprefix Prefix for the interwiki. * @param string $iwtitle Interwiki link to search for. * @param string $iwdir The direction in which to list. * * @return object * * @since 3.1.4 */ public function getIWLinks(array $titles, $iwurl = false, $iwlimit = null, $iwcontinue = false, $iwprefix = null, $iwtitle = null, $iwdir = null) { // Build the request. $path = '?action=query&prop=links'; // Append titles to the request. $path .= '&titles=' . $this->buildParameter($titles); if ($iwurl) { $path .= '&iwurl='; } if (isset($iwlimit)) { $path .= '&iwlimit=' . $iwlimit; } if ($iwcontinue) { $path .= '&iwcontinue='; } if (isset($iwprefix)) { $path .= '&iwprefix=' . $iwprefix; } if (isset($iwtitle)) { $path .= '&iwtitle=' . $iwtitle; } if (isset($iwdir)) { $path .= '&iwdir=' . $iwdir; } // Send the request. $response = $this->client->get($this->fetchUrl($path)); return $this->validateResponse($response); } /** * Method to return all interlanguage links from the given page(s). * * @param array $titles Page titles to retrieve links. * @param integer $lllimit Number of language links to return. * @param boolean $llcontinue When more results are available, use this to continue. * @param string $llurl Whether to get the full URL. * @param string $lllang Language code. * @param string $lltitle Link to search for. * @param string $lldir The direction in which to list. * * @return object * * @since 3.1.4 */ public function getLangLinks(array $titles, $lllimit = null, $llcontinue = false, $llurl = null, $lllang = null, $lltitle = null, $lldir = null) { // Build the request. $path = '?action=query&prop=langlinks'; // Append titles to the request. $path .= '&titles=' . $this->buildParameter($titles); if (isset($lllimit)) { $path .= '&lllimit=' . $lllimit; } if ($llcontinue) { $path .= '&llcontinue='; } if (isset($llurl)) { $path .= '&llurl=' . $llurl; } if (isset($lllang)) { $path .= '&lllang=' . $lllang; } if (isset($lltitle)) { $path .= '&lltitle=' . $lltitle; } if (isset($lldir)) { $path .= '&lldir=' . $lldir; } // Send the request. $response = $this->client->get($this->fetchUrl($path)); return $this->validateResponse($response); } /** * Method to return all external urls from the given page(s). * * @param array $titles Page titles to retrieve links. * @param integer $ellimit Number of links to return. * @param string $eloffset When more results are available, use this to continue. * @param string $elprotocol Protocol of the url. * @param string $elquery Search string without protocol. * * @return object * * @since 3.1.4 */ public function getExtLinks(array $titles, $ellimit = null, $eloffset = null, $elprotocol = null, $elquery = null) { // Build the request. $path = '?action=query&prop=extlinks'; // Append titles to the request. $path .= '&titles=' . $this->buildParameter($titles); if (isset($ellimit)) { $path .= '&ellimit=' . $ellimit; } if (isset($eloffset)) { $path .= '&eloffset=' . $eloffset; } if (isset($elprotocol)) { $path .= '&elprotocol=' . $elprotocol; } if (isset($elquery)) { $path .= '&elquery=' . $elquery; } // Send the request. $response = $this->client->get($this->fetchUrl($path)); return $this->validateResponse($response); } /** * Method to enumerate all links that point to a given namespace. * * @param boolean $alcontinue When more results are available, use this to continue. * @param string $alfrom Start listing at this title. The title need not exist. * @param string $alto The page title to stop enumerating at. * @param string $alprefix Search for all page titles that begin with this value. * @param string $alunique Only show unique links. * @param array $alprop What pieces of information to include. * @param string $alnamespace The namespace to enumerate. * @param integer $allimit Number of links to return. * * @return object * * @since 3.1.4 */ public function enumerateLinks($alcontinue = false, $alfrom = null, $alto = null, $alprefix = null, $alunique = null, array $alprop = null, $alnamespace = null, $allimit = null) { // Build the request. $path = '?action=query&meta=siteinfo'; if ($alcontinue) { $path .= '&alcontinue='; } if (isset($alfrom)) { $path .= '&alfrom=' . $alfrom; } if (isset($alto)) { $path .= '&alto=' . $alto; } if (isset($alprefix)) { $path .= '&alprefix=' . $alprefix; } if (isset($alunique)) { $path .= '&alunique=' . $alunique; } if (isset($alprop)) { $path .= '&alprop=' . $this->buildParameter($alprop); } if (isset($alnamespace)) { $path .= '&alnamespace=' . $alnamespace; } if (isset($allimit)) { $path .= '&allimit=' . $allimit; } // Send the request. $response = $this->client->get($this->fetchUrl($path)); return $this->validateResponse($response); } } home/wuectly/www/layouts/joomla/pagination/links.php 0000604 00000004437 15245630533 0016771 0 ustar 00 <?php /** * @package Joomla.Site * @subpackage Layout * * @copyright (C) 2014 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; use Joomla\Registry\Registry; $list = $displayData['list']; $pages = $list['pages']; $options = new Registry($displayData['options']); $showLimitBox = $options->get('showLimitBox', true); $showPagesLinks = $options->get('showPagesLinks', true); $showLimitStart = $options->get('showLimitStart', true); // Calculate to display range of pages $currentPage = 1; $range = 1; $step = 5; if (!empty($pages['pages'])) { foreach ($pages['pages'] as $k => $page) { if (!$page['active']) { $currentPage = $k; } } } if ($currentPage >= $step) { if ($currentPage % $step === 0) { $range = ceil($currentPage / $step) + 1; } else { $range = ceil($currentPage / $step); } } ?> <div class="pagination pagination-toolbar clearfix" style="text-align: center;"> <?php if ($showLimitBox) : ?> <div class="limit pull-right"> <?php echo JText::_('JGLOBAL_DISPLAY_NUM') . $list['limitfield']; ?> </div> <?php endif; ?> <?php if ($showPagesLinks && (!empty($pages))) : ?> <ul class="pagination-list"> <?php echo JLayoutHelper::render('joomla.pagination.link', $pages['start']); echo JLayoutHelper::render('joomla.pagination.link', $pages['previous']); ?> <?php foreach ($pages['pages'] as $k => $page) : ?> <?php $output = JLayoutHelper::render('joomla.pagination.link', $page); ?> <?php if (in_array($k, range($range * $step - ($step + 1), $range * $step), true)) : ?> <?php if (($k % $step === 0 || $k === $range * $step - ($step + 1)) && $k !== $currentPage && $k !== $range * $step - $step) : ?> <?php $output = preg_replace('#(<a.*?>).*?(</a>)#', '$1...$2', $output); ?> <?php endif; ?> <?php endif; ?> <?php echo $output; ?> <?php endforeach; ?> <?php echo JLayoutHelper::render('joomla.pagination.link', $pages['next']); echo JLayoutHelper::render('joomla.pagination.link', $pages['end']); ?> </ul> <?php endif; ?> <?php if ($showLimitStart) : ?> <input type="hidden" name="<?php echo $list['prefix']; ?>limitstart" value="<?php echo $list['limitstart']; ?>" /> <?php endif; ?> </div> home/wuectly/www/administrator/components/com_redirect/models/links.php 0000604 00000013556 15245657533 0022661 0 ustar 00 <?php /** * @package Joomla.Administrator * @subpackage com_redirect * * @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; /** * Methods supporting a list of redirect links. * * @since 1.6 */ class RedirectModelLinks extends JModelList { /** * Constructor. * * @param array $config An optional associative array of configuration settings. * * @since 1.6 */ public function __construct($config = array()) { if (empty($config['filter_fields'])) { $config['filter_fields'] = array( 'id', 'a.id', 'state', 'a.state', 'old_url', 'a.old_url', 'new_url', 'a.new_url', 'referer', 'a.referer', 'hits', 'a.hits', 'created_date', 'a.created_date', 'published', 'a.published', 'header', 'a.header', 'http_status', ); } parent::__construct($config); } /** * Removes all of the unpublished redirects from the table. * * @return boolean result of operation * * @since 3.5 */ public function purge() { $db = $this->getDbo(); $query = $db->getQuery(true); $query->delete('#__redirect_links')->where($db->qn('published') . '= 0'); $db->setQuery($query); try { $db->execute(); } catch (Exception $e) { return false; } return true; } /** * Method to auto-populate the model state. * * Note. Calling getState in this method will result in recursion. * * @param string $ordering An optional ordering field. * @param string $direction An optional direction (asc|desc). * * @return void * * @since 1.6 */ protected function populateState($ordering = 'a.old_url', $direction = 'asc') { // Load the filter state. $this->setState('filter.search', $this->getUserStateFromRequest($this->context . '.filter.search', 'filter_search', '', 'string')); $this->setState('filter.state', $this->getUserStateFromRequest($this->context . '.filter.state', 'filter_state', '', 'string')); $this->setState('filter.http_status', $this->getUserStateFromRequest($this->context . '.filter.http_status', 'filter_http_status', '', 'cmd')); // Load the parameters. $params = JComponentHelper::getParams('com_redirect'); $this->setState('params', $params); // List state information. parent::populateState($ordering, $direction); } /** * Method to get a store id based on model configuration state. * * This is necessary because the model is used by the component and * different modules that might need different sets of data or different * ordering requirements. * * @param string $id A prefix for the store id. * * @return string A store id. * * @since 1.6 */ protected function getStoreId($id = '') { // Compile the store id. $id .= ':' . $this->getState('filter.search'); $id .= ':' . $this->getState('filter.state'); $id .= ':' . $this->getState('filter.http_status'); return parent::getStoreId($id); } /** * Build an SQL query to load the list data. * * @return JDatabaseQuery * * @since 1.6 */ protected function getListQuery() { // Create a new query object. $db = $this->getDbo(); $query = $db->getQuery(true); // Select the required fields from the table. $query->select( $this->getState( 'list.select', 'a.*' ) ); $query->from($db->quoteName('#__redirect_links', 'a')); // Filter by published state $state = $this->getState('filter.state'); if (is_numeric($state)) { $query->where($db->quoteName('a.published') . ' = ' . (int) $state); } elseif ($state === '') { $query->where($db->quoteName('a.published') . ' IN (0,1)'); } // Filter the items over the HTTP status code header. if ($httpStatusCode = $this->getState('filter.http_status')) { $query->where($db->quoteName('a.header') . ' = ' . (int) $httpStatusCode); } // Filter the items over the search string if set. $search = $this->getState('filter.search'); if (!empty($search)) { if (stripos($search, 'id:') === 0) { $query->where($db->quoteName('a.id') . ' = ' . (int) substr($search, 3)); } else { $search = $db->quote('%' . str_replace(' ', '%', $db->escape(trim($search), true) . '%')); $query->where( '(' . $db->quoteName('old_url') . ' LIKE ' . $search . ' OR ' . $db->quoteName('new_url') . ' LIKE ' . $search . ' OR ' . $db->quoteName('comment') . ' LIKE ' . $search . ' OR ' . $db->quoteName('referer') . ' LIKE ' . $search . ')' ); } } // Add the list ordering clause. $query->order($db->escape($this->getState('list.ordering', 'a.old_url')) . ' ' . $db->escape($this->getState('list.direction', 'ASC'))); return $query; } /** * Add the entered URLs into the database * * @param array $batchUrls Array of URLs to enter into the database * * @return boolean */ public function batchProcess($batchUrls) { $db = JFactory::getDbo(); $query = $db->getQuery(true); $params = JComponentHelper::getParams('com_redirect'); $state = (int) $params->get('defaultImportState', 0); $columns = array( $db->quoteName('old_url'), $db->quoteName('new_url'), $db->quoteName('referer'), $db->quoteName('comment'), $db->quoteName('hits'), $db->quoteName('published'), $db->quoteName('created_date') ); $query->columns($columns); foreach ($batchUrls as $batch_url) { $old_url = $batch_url[0]; // Destination URL can also be an external URL if (!empty($batch_url[1])) { $new_url = $batch_url[1]; } else { $new_url = ''; } $query->insert($db->quoteName('#__redirect_links'), false) ->values( $db->quote($old_url) . ', ' . $db->quote($new_url) . ' ,' . $db->quote('') . ', ' . $db->quote('') . ', 0, ' . $state . ', ' . $db->quote(JFactory::getDate()->toSql()) ); } $db->setQuery($query); $db->execute(); return true; } }
| ver. 1.4 |
Github
|
.
| PHP 8.1.34 | Генерация страницы: 0 |
proxy
|
phpinfo
|
Настройка