| Server IP : 195.130.67.5 / Your IP : 216.73.217.154 Web Server : Microsoft-IIS/10.0 System : Windows NT WEBSERVER1 10.0 build 17763 (Windows Server 2016) i586 User : IUSR ( 0) PHP Version : 7.4.19 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /inetpub/wwwroot/icd/administrator/components/com_noixacl/views/accesslevel/ |
Upload File : |
<?php
/**
* Check to ensure this file is included in Joomla!
*/
defined('_JEXEC') or die( 'Restricted access' );
jimport( 'joomla.application.component.view');
/**
* HTML View class for the Media component
*
* @static
* @package Joomla
* @subpackage AccessLevel
* @since 2.0.5
*/
class AccesslevelsViewAccesslevel extends JView
{
function display($tpl = null)
{
$cid = JRequest::getVar( 'cid', array(0), '', 'array' );
$id = intval($cid[0]);
$db =& JFactory::getDBO();
$acl = JFactory::getACL();
$query = "SELECT id, name FROM #__groups WHERE id = {$id}";
$db->setQuery( $query );
$row = $db->loadObject();
$query = "SELECT id_group FROM #__noixacl_groups_level WHERE id_levels like '%{$id}%'";
$db->setQuery( $query );
$rowGroups = $db->loadObjectList();
$levelGroups = JArrayHelper::getColumn($rowGroups,'id_group');
/**
* get groups
*/
$aclGroups = $acl->sort_groups();
/**
* format groups
*/
$groups = $acl->format_groups( $aclGroups,'html',28 );
$this->assignRef('accesslevel', $row);
$this->assignRef('levelGroups', $levelGroups);
$this->assignRef('groups',$groups);
$text = !$cid[0] ? JText::_( 'NOIXACL_VIEW_ACCESSLEVEL_TEXT_EDIT' ) : JText::_( 'NOIXACL_VIEW_ACCESSLEVEL_TEXT_NEW' );
JToolBarHelper::title( JText::_( 'NOIXACL_VIEW_ACCESSLEVEL_TEXT_GROUP' ) . ': <small><small>[ '. $text .' ]</small></small>' , 'user.png' );
JToolBarHelper::save();
JToolBarHelper::apply();
JToolBarHelper::cancel();
parent::display($tpl);
}
}