| 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 : /Old Sites/ees_request/administrator/components/com_printme/library/ |
Upload File : |
<?php
/**
* @version 1.5
* @package Printme
* @author Dioscouri Design
* @link http://www.dioscouri.com
* @copyright Copyright (C) 2007 Dioscouri Design. All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
*/
/** ensure this file is being included by a parent file */
defined('_JEXEC') or die('Restricted access');
class PrintmeHelperTools
{
/**
*
* @param $folder
* @return unknown_type
*/
function getPlugins( $folder='Printme' )
{
$database = JFactory::getDBO();
$order_query = " ORDER BY ordering ASC ";
$folder = strtolower( $folder );
$query = "
SELECT
*
FROM
#__plugins
WHERE 1
AND
LOWER(`folder`) = '{$folder}'
{$order_query}
";
$database->setQuery( $query );
$data = $database->loadObjectList();
return $data;
}
/**
*
* @param $element
* @param $eventName
* @return unknown_type
*/
function hasEvent( $element, $eventName )
{
$success = false;
if (!$element || !is_object($element)) {
return $success;
}
if (!$eventName || !is_string($eventName)) {
return $success;
}
// Check if they have a particular event
$import = JPluginHelper::importPlugin( strtolower( 'Printme' ), $element->element );
$dispatcher = JDispatcher::getInstance();
$result = $dispatcher->trigger( $eventName, array( $element ) );
if (in_array(true, $result, true)) {
$success = true;
}
return $success;
}
}