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/www/cj79373/libraries/regularlabs/fields/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME ]     

Current File : /home/coopiak/www/cj79373/libraries/regularlabs/fields/onlypro.php
<?php
/**
 * @package         Regular Labs Library
 * @version         23.5.7450
 * 
 * @author          Peter van Westen <info@regularlabs.com>
 * @link            http://regularlabs.com
 * @copyright       Copyright © 2023 Regular Labs All Rights Reserved
 * @license         http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
 */

defined('_JEXEC') or die;

use RegularLabs\Library\Extension as RL_Extension;
use RegularLabs\Library\Field;

if ( ! is_file(JPATH_LIBRARIES . '/regularlabs/autoload.php'))
{
    return;
}

require_once JPATH_LIBRARIES . '/regularlabs/autoload.php';

class JFormFieldRL_OnlyPro extends Field
{
    public $type = 'OnlyPro';

    protected function getExtensionName()
    {
        $extension = $this->form->getValue('element');
        if ($extension)
        {
            return $extension;
        }

        $extension = JFactory::getApplication()->input->get('component');
        if ($extension)
        {
            return str_replace('com_', '', $extension);
        }

        $extension = JFactory::getApplication()->input->get('folder');
        if ($extension)
        {
            $extension = explode('.', $extension);

            return array_pop($extension);
        }

        return false;
    }

    protected function getInput()
    {
        $label   = $this->prepareText($this->get('label'));
        $tooltip = $this->prepareText($this->get('description'));

        if ( ! $label && ! $tooltip)
        {
            return '';
        }

        return $this->getText();
    }

    protected function getLabel()
    {
        $label   = $this->prepareText($this->get('label'));
        $tooltip = $this->prepareText($this->get('description'));

        if ( ! $label && ! $tooltip)
        {
            return '</div><div>' . $this->getText();
        }

        if ( ! $label)
        {
            return $tooltip;
        }

        if ( ! $tooltip)
        {
            return ($label == '---' ? '' : $label);
        }

        return '<label class="hasPopover" title="' . $label . '" data-content="' . htmlentities($tooltip) . '">'
            . $label
            . '</label>';
    }

    protected function getText()
    {
        $text = JText::_('RL_ONLY_AVAILABLE_IN_PRO');
        $text = '<em>' . $text . '</em>';

        $extension = $this->getExtensionName();

        $alias = RL_Extension::getAliasByName($extension);

        if ($alias)
        {
            $text = '<a href="https://regularlabs.com/' . $extension . '/features" target="_blank">'
                . $text
                . '</a>';
        }

        $class = $this->get('class');
        $class = $class ? ' class="' . $class . '"' : '';

        return '<div' . $class . '>' . $text . '</div>';
    }
}

Anon7 - 2022
AnonSec Team