Файловый менеджер - Редактировать - /var/www/html/administrator/components/com_jchat/Framework/Html/Articles.php
Ðазад
<?php namespace JExtstore\Component\JChat\Administrator\Framework\Html; /** * @package JCHAT::administrator::components::com_jchat * @subpackage framework * @subpackage html * @author Joomla! Extensions Store * @Copyright (C) 2015 - Joomla! Extensions Store * @license GNU/GPLv2 http://www.gnu.org/licenses/gpl-2.0.html */ defined ( '_JEXEC' ) or die ( 'Restricted access' ); use Joomla\CMS\Language\Text; use Joomla\CMS\Factory; use Joomla\CMS\HTML\HTMLHelper; /** * Articles multiselect element class * * @package JCHAT::administrator::components::com_jchat * @subpackage framework * @subpackage html * */ class Articles { /** * Build the multiple select list for Menu Links/Pages * * @access public * @return array */ public static function getArticles() { $db = Factory::getContainer()->get('DatabaseDriver'); $articleOptions = array(); $articleOptions[] = HTMLHelper::_('select.option', '0', Text::_('COM_JCHAT_NOARTICLES'), 'value', 'text'); $categories = array(); $categories = HTMLHelper::_('category.options', 'com_content'); if(!empty($categories)) { foreach ($categories as $category) { if(!$category->value) { continue; } // Get category indent from cat to replicate on articles preg_match('/^([-\s])+/', $category->text, $matches); $indent = null; if(isset($matches[0])) { $indent = $matches[0]; } // Get a list of articles in this category $query = "SELECT c.id AS value, c.title AS text" . "\n FROM " . $db->quoteName('#__content') . " AS " . $db->quoteName('c') . "\n WHERE c.state = 1" . "\n AND c.catid = " . (int)$category->value . "\n ORDER BY c.ordering"; $db->setQuery ( $query ); $articles = $db->loadObjectList (); // Group articles by OPTGROUP category $articleOptions[] = HTMLHelper::_ ( 'select.option', '<OPTGROUP>', $category->text ); if(!empty($articles)) { foreach ($articles as $article) { $articleOptions[] = HTMLHelper::_('select.option', $article->value, $indent . $article->text, 'value', 'text'); } } // Close the OPTGROUP $articleOptions[] = HTMLHelper::_ ( 'select.option', '</OPTGROUP>'); } } return $articleOptions; } }
| ver. 1.1 | |
.
| PHP 8.4.18 | Ð“ÐµÐ½ÐµÑ€Ð°Ñ†Ð¸Ñ Ñтраницы: 0 |
proxy
|
phpinfo
|
ÐаÑтройка