Файловый менеджер - Редактировать - /var/www/html/administrator/components/com_community/views/reports/view.html.php
Ðазад
<?php /** * @copyright (C) 2013 iJoomla, Inc. - All rights reserved. * @license GNU General Public License, version 2 (http://www.gnu.org/licenses/gpl-2.0.html) * @author iJoomla.com <webmaster@ijoomla.com> * @url https://www.jomsocial.com/license-agreement * The PHP code portions are distributed under the GPL license. If not otherwise stated, all images, manuals, cascading style sheets, and included JavaScript *are NOT GPL, and are released under the IJOOMLA Proprietary Use License v1.0 * More info at https://www.jomsocial.com/license-agreement */ use Joomla\CMS\Factory; use Joomla\CMS\Language\Text; use Joomla\CMS\MVC\View\HtmlView; use Joomla\CMS\Table\Table; use Joomla\CMS\Toolbar\ToolbarHelper; // Disallow direct access to this file defined('_JEXEC') or die('Restricted access'); jimport( 'joomla.application.component.view' ); /** * Configuration view for JomSocial */ class CommunityViewReports extends HtmlView { /** * The default method that will display the output of this view which is called by * Joomla * * @param string template Template file name **/ public function display( $tpl = null ) { //$reports = $this->get( 'Reports' ); //$pagination = $this->get( 'Pagination' ); $model = $this->getModel( 'Reports' ); $reports = $model->getReports(); $pagination = $model->getPagination(); if( $this->getLayout() == 'childs' ) { $this->_displayChilds( $tpl ); return; } // Set the titlebar text ToolbarHelper::title( Text::_('COM_COMMUNITY_REPORTS'), 'reports' ); // Add the necessary buttons ToolBarHelper::trash('removeReport', Text::_('COM_COMMUNITY_DELETE')); ToolBarHelper::trash('purgeProcessed', Text::_('COM_COMMUNITY_REPORTS_PURGE_COMPLETED') , false ); $this->set( 'reports' , $reports ); $this->set( 'pagination' , $pagination ); parent::display( $tpl ); } public function _displayChilds( $tpl ) { $mainframe = Factory::getApplication(); $jinput = $mainframe->input; $reportId = $jinput->get('reportid' , '', 'INT'); // Set the titlebar text ToolBarHelper::title( Text::_('COM_COMMUNITY_REPORTS_VIEWING_REPORTERS'), 'reports' ); // Add the necessary buttons ToolBarHelper::trash('removeReport', Text::_('COM_COMMUNITY_DELETE')); $report = Table::getInstance( 'reports' , 'CommunityTable' ); $report->load( $reportId ); $model = $this->getModel( 'Reporters' ); $reporters = $model->getReporters( $reportId ); $pagination = $model->getPagination(); foreach($reporters as $key=>$data) { $return = explode(',',$data->method); $reporters[$key]->method = $return[1]; } $this->set( 'reporters' , $reporters ); $this->set( 'pagination' , $pagination ); parent::display( $tpl ); } /** * Private method to set the toolbar for this view * * @access private * * @return null **/ public function setToolBar() { } public function _getStatusHTML() { $jinput = Factory::getApplication()->input; // Check if there are any categories selected $status = $jinput->getInt( 'status' , 3 ); $select = '<select class="no-margin" name="status" onchange="Joomla.submitform();">'; $statusArray = array( 3=>Text::_('COM_COMMUNITY_VIEW_ALL'), 1=>Text::_('COM_COMMUNITY_REPORTS_PROCESSED'), 0=>Text::_('COM_COMMUNITY_PENDING'), 2=>Text::_('COM_COMMUNITY_REPORTS_IGNORED')); foreach($statusArray as $key=>$array) { $selected = ($status == $key) ? 'selected="true"' : ''; $select .='<option value="'.$key.'"'.$selected.' >'.Text::_($array).'</option>'; } $select .= '</select>'; return $select; } }
| ver. 1.1 | |
.
| PHP 8.4.18 | Ð“ÐµÐ½ÐµÑ€Ð°Ñ†Ð¸Ñ Ñтраницы: 0 |
proxy
|
phpinfo
|
ÐаÑтройка