| 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/tables/ |
Upload File : |
<?php
defined('_JEXEC') or die('Restricted access');
class TableRules extends JTable
{
var $id = NULL;
var $aco_section = NULL;
var $aco_value = NULL;
var $aro_section = "users";
var $aro_value = NULL;
var $axo_section = NULL;
var $axo_value = NULL;
/**
* Get ID if rule exists and return false if aro_value no exists in core_acl_aro_groups
*/
function check()
{
$db = JFactory::getDBO();
/**
* get the rule id
*/
$query_get_id = "SELECT id FROM #__noixacl_rules WHERE aco_section = '". $this->aco_section ."' AND aco_value = '". $this->aco_value ."' AND aro_section = 'users' AND aro_value = '". $this->aro_value ."' AND axo_section = '". $this->axo_section ."' AND axo_value = '". $this->axo_value ."'";
$db->setQuery( $query_get_id );
$this->id = intval( $db->loadResult() );
/**
* check if exist aro_value( GROUP )
*/
$query_check_group = "SELECT id FROM #__core_acl_aro_groups WHERE name = '". $this->aro_value ."'";
$db->setQuery( $query_check_group );
$group_exists = $db->loadResult();
if( empty($group_exists) ){
return false;
}
}
function __construct(&$db)
{
parent::__construct( '#__noixacl_rules', 'id', $db );
}
}