AnonSec Shell
Server IP : 54.36.91.62  /  Your IP : 216.73.217.112
Web Server : Apache
System : Linux webm013.cluster127.gra.hosting.ovh.net 5.15.206-ovh-vps-grsec-zfs-classid #1 SMP Fri May 15 02:41:25 UTC 2026 x86_64
User : coopiak ( 151928)
PHP Version : 8.3.23
Disable Function : _dyuweyrj4,_dyuweyrj4r,dl
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home/coopiak/amisdesseniors-fr/administrator/components/com_rstbox/EngageBox/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME ]     

Current File : /home/coopiak/amisdesseniors-fr/administrator/components/com_rstbox/EngageBox/Boxes.php
<?php

/**
 * @package         EngageBox
 * @version         7.0.0 Pro
 * 
 * @author          Tassos Marinos <info@tassos.gr>
 * @link            http://www.tassos.gr
 * @copyright       Copyright © 2020 Tassos Marinos All Rights Reserved
 * @license         GNU GPLv3 <http://www.gnu.org/licenses/gpl.html> or later
*/

namespace Tassos\EngageBox;

defined('_JEXEC') or die('Restricted access');

use Tassos\EngageBox\Box;
use Tassos\EngageBox\Helper;
use NRFramework\Cache;
use Joomla\CMS\HTML\HTMLHelper;
use Joomla\Registry\Registry;
use Joomla\CMS\Factory;
use Joomla\CMS\Table\Table;
use Joomla\CMS\MVC\Model\BaseDatabaseModel;

class Boxes
{
    public static function render()
    {
        $db = Factory::getDbo();

        $query = $db->getQuery(true)
            ->select($db->quoteName('id'))
            ->from($db->quoteName('#__rstbox'))
            ->where($db->quoteName('published') . ' = 1');

        // If visitor is not logged-in as a Super User, get non-test-mode boxes only.
        if (!Factory::getUser()->authorise('core.admin'))
        { 
            $query->where($db->quoteName('testmode') . ' = 0');
        }
         
        $db->setQuery($query);
        
        if (!$ids = $db->loadColumn())
        {
            return;
        }

        $html = '';

        foreach ($ids as $id)
        {
            // Get box object
            $box = Box::get($id);

            // Render box
            $html .= Box::render($box);
        }

        
        if (!empty($html) && Helper::getParams()->get('preparecontent', true))
        {
            $html = HTMLHelper::_('content.prepare', $html);
        }
        

        return $html;
    }

    /**
     * Get all boxes regardless their published state
     *
     * @return array
     */
    public static function getAll()
    {
        $hash = 'boxes';

        if (Cache::has($hash))
        {
            return Cache::read($hash);
        }

        BaseDatabaseModel::addIncludePath(JPATH_ADMINISTRATOR . '/components/com_rstbox/' . 'models');
        Table::addIncludePath(JPATH_ADMINISTRATOR . '/components/com_rstbox/' . 'tables');
        
        $model = BaseDatabaseModel::getInstance('Items', 'RstboxModel', ['ignore_request' => true]);
        $result = $model->getItems();

        return Cache::set($hash, $result);
    }
}

Anon7 - 2022
AnonSec Team