Файловый менеджер - Редактировать - /var/www/html/administrator/components/com_kunena/src/View/User/HtmlView.php
Ðазад
<?php /** * Kunena Component * * @package Kunena.Administrator * @subpackage Views * * @copyright Copyright (C) 2008 - 2026 Kunena Team. All rights reserved. * @license https://www.gnu.org/copyleft/gpl.html GNU/GPL * @link https://www.kunena.org **/ namespace Kunena\Forum\Administrator\View\User; \defined('_JEXEC') or die(); use Exception; use Joomla\CMS\HTML\HTMLHelper; use Joomla\CMS\Language\Text; use Joomla\CMS\MVC\View\HtmlView as BaseHtmlView; use Joomla\CMS\Toolbar\ToolbarHelper; use Kunena\Forum\Libraries\Config\KunenaConfig; use Kunena\Forum\Libraries\Factory\KunenaFactory; use Kunena\Forum\Libraries\Integration\KunenaAvatar; use StdClass; use Joomla\CMS\Factory; /** * User view for Kunena backend * * @since K1.0 */ class HtmlView extends BaseHtmlView { /** * @var mixed * @since version */ protected $config; /** * @var mixed * @since version */ protected $avatar; /** * @var mixed * @since version */ protected $editavatar; /** * @var mixed * @since version */ protected $maxSig = ''; /** * @var mixed * @since version */ protected $maxPersonalText = ''; /** * @var mixed * @since version */ protected $selectMod; /** * @var mixed * @since version */ protected $sub; /** * @var mixed * @since version */ protected $ipslist; /** * @var mixed * @since version */ protected $selectOrder; /** * @var mixed * @since version */ protected $settings; /** * @var mixed * @since version */ protected $selectRank; /** * @var mixed * @since version */ protected $modCats; /** * @param null $tpl tpl * * @return void * * @since Kunena 6.0 * * @throws Exception */ public function display($tpl = null) { $userids = (array) Factory::getApplication()->getUserState('kunena.usermove.userids'); $model = $this->getModel(); if ($userids && $this->getLayout() == 'move') { $this->setToolBarMove(); $this->catsList = $this->get('moveCatsList'); $this->users = $this->get('moveUser'); return parent::display($tpl); } $this->user = $this->get('user'); $this->sub = $this->get('subscriptions'); $this->subsCatsList = $this->get('catSubscriptions'); $this->ipslist = $this->get('IPlist'); $avatarIntegration = KunenaFactory::getAvatarIntegration(); $this->editavatar = ($avatarIntegration instanceof KunenaAvatar) && $this->user->avatar; $this->avatar = $this->user->getAvatarImage(KunenaFactory::getTemplate()->params->get('avatarType'), 'thumb'); // Make the select list for the moderator flag $yesnoMod [] = HTMLHelper::_('select.option', '1', Text::_('COM_KUNENA_YES')); $yesnoMod [] = HTMLHelper::_('select.option', '0', Text::_('COM_KUNENA_NO')); // Build the html select list $this->selectMod = HTMLHelper::_('select.genericlist', $yesnoMod, 'moderator', 'class="form-select" aria-invalid="false"', 'value', 'text', $this->user->moderator); // Make the select list for the moderator flag $yesnoOrder [] = HTMLHelper::_('select.option', '0', Text::_('COM_KUNENA_USER_ORDER_ASC')); $yesnoOrder [] = HTMLHelper::_('select.option', '1', Text::_('COM_KUNENA_USER_ORDER_DESC')); // Build the html select list $item = new StdClass(); $item->name = 'hidemail'; $item->label = Text::_('COM_KUNENA_USER_HIDEEMAIL'); $options = []; $options[] = HTMLHelper::_('select.option', 0, Text::_('COM_KUNENA_NO')); $options[] = HTMLHelper::_('select.option', 1, Text::_('COM_KUNENA_YES')); $options[] = HTMLHelper::_('select.option', 2, Text::_('COM_KUNENA_A_ONLY_REGISTERED')); $item->field = HTMLHelper::_( 'select.genericlist', $options, 'hidemail', 'class="form-select" size="1"', 'value', 'text', $this->escape($this->user->hideEmail), 'khidemail' ); $this->settings[] = $item; $item = new StdClass(); $item->name = 'showonline'; $item->label = Text::_('COM_KUNENA_USER_AMDIN_SHOWONLINE'); $options = []; $options[] = HTMLHelper::_('select.option', 0, Text::_('COM_KUNENA_NO')); $options[] = HTMLHelper::_('select.option', 1, Text::_('COM_KUNENA_YES')); $item->field = HTMLHelper::_( 'select.genericlist', $options, 'showonline', 'class="form-select" size="1"', 'value', 'text', $this->escape($this->user->showOnline), 'kshowonline' ); $this->settings[] = $item; $item = new StdClass(); $item->name = 'cansubscribe'; $item->label = Text::_('COM_KUNENA_USER_ADMIN_CANSUBSCRIBE'); $options = []; $options[] = HTMLHelper::_('select.option', -1, Text::_('COM_KUNENA_USER_ADMIN_ORDER_KUNENA_GLOBAL')); $options[] = HTMLHelper::_('select.option', 0, Text::_('COM_KUNENA_NO')); $options[] = HTMLHelper::_('select.option', 1, Text::_('COM_KUNENA_YES')); $item->field = HTMLHelper::_( 'select.genericlist', $options, 'cansubscribe', 'class="form-select" size="1"', 'value', 'text', $this->escape($this->user->canSubscribe), 'kcansubscribe' ); $this->settings[] = $item; $item = new StdClass(); $item->name = 'userlisttime'; $item->label = Text::_('COM_KUNENA_USER_ADMIN_USERLISTTIME'); $options = []; $options[] = HTMLHelper::_('select.option', -2, Text::_('COM_KUNENA_USER_ADMIN_ORDER_KUNENA_GLOBAL')); $options[] = HTMLHelper::_('select.option', -1, Text::_('COM_KUNENA_SHOW_ALL')); $options[] = HTMLHelper::_('select.option', 0, Text::_('COM_KUNENA_SHOW_LASTVISIT')); $options[] = HTMLHelper::_('select.option', 4, Text::_('COM_KUNENA_SHOW_4_HOURS')); $options[] = HTMLHelper::_('select.option', 8, Text::_('COM_KUNENA_SHOW_8_HOURS')); $options[] = HTMLHelper::_('select.option', 12, Text::_('COM_KUNENA_SHOW_12_HOURS')); $options[] = HTMLHelper::_('select.option', 24, Text::_('COM_KUNENA_SHOW_24_HOURS')); $options[] = HTMLHelper::_('select.option', 48, Text::_('COM_KUNENA_SHOW_48_HOURS')); $options[] = HTMLHelper::_('select.option', 168, Text::_('COM_KUNENA_SHOW_WEEK')); $options[] = HTMLHelper::_('select.option', 720, Text::_('COM_KUNENA_SHOW_MONTH')); $options[] = HTMLHelper::_('select.option', 8760, Text::_('COM_KUNENA_SHOW_YEAR')); $item->field = HTMLHelper::_( 'select.genericlist', $options, 'userlisttime', 'class="form-select" size="1"', 'value', 'text', $this->escape($this->user->userListtime), 'kuserlisttime' ); $this->settings[] = $item; $this->selectOrder = HTMLHelper::_('select.genericlist', $yesnoOrder, 'newOrder', 'class="form-select" size="1"', 'value', 'text', $this->user->ordering); $this->modCats = $this->get('listmodcats'); $this->selectRank = $this->get('listuserranks'); $this->config = KunenaConfig::getInstance(); $this->addToolbar(); return parent::display($tpl); } /** * Add the page title and toolbar. * * @return void * * @since Kunena 6.0 */ protected function addToolbar(): void { // Set the title bar text ToolbarHelper::title(Text::_('COM_KUNENA'), 'users'); ToolbarHelper::spacer(); ToolbarHelper::apply('user.applychanges'); ToolbarHelper::spacer(); ToolbarHelper::save('user.save'); ToolbarHelper::spacer(); ToolbarHelper::cancel('cancel', 'COM_KUNENA_CANCEL'); ToolbarHelper::spacer(); $helpUrl = 'https://docs.kunena.org/en/manual/backend/users/edit-user'; ToolbarHelper::help('COM_KUNENA', false, $helpUrl); } /** * @return void * * @since Kunena 6.0 */ protected function setToolBarMove(): void { // Set the title bar text ToolbarHelper::title(Text::_('COM_KUNENA'), 'users'); ToolbarHelper::spacer(); ToolbarHelper::custom('user.moveMessages', 'save.png', 'save_f2.png', 'COM_KUNENA_MOVE_USERMESSAGES', false); ToolbarHelper::spacer(); ToolbarHelper::cancel(); ToolbarHelper::spacer(); } }
| ver. 1.1 | |
.
| PHP 8.4.18 | Ð“ÐµÐ½ÐµÑ€Ð°Ñ†Ð¸Ñ Ñтраницы: 0 |
proxy
|
phpinfo
|
ÐаÑтройка