NexusLeads Webshell
NexusLeads


Server : LiteSpeed
System : Linux server 3.10.0-1160.90.1.el7.x86_64 #1 SMP Thu May 4 15:21:22 UTC 2023 x86_64
User : alsaif ( 1057)
PHP Version : 7.4.33
Disable Function : show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
Directory :  /home/alsaif/public_html/plugins/system/sppagebuildertranslate/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home/alsaif/public_html/plugins/system/sppagebuildertranslate/script.php
<?php

/**
 * @package     Sp Page Builder Translate for Joomla!
 * @author      Stéphane Bouey <stephane.bouey@faboba.com> - http://www.faboba.com
 * @license     GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
 * @copyright   Copyright (C) 2012-2021 Faboba. All rights reserved.
 */

// No direct access to this file
defined('_JEXEC') or die();

class plgSystemSpPageBuilderTranslateInstallerScript
{
    protected $minimumPHPVersion = '7.0.0';
    protected $minimumJoomlaVersion = '3.9.0';
    protected $maximumJoomlaVersion = '3.10.99';

    protected $minimumSpPageBuilderVersion = '2.4.0';
    protected $maximumSpPageBuilderVersion = '2.4.0';

    public function install($parent)
    {
        // Enable the extension on install and update
        $this->enablePlugin();

        return true;
    }

    public function uninstall($parent)
    {
    }

    public function update($parent)
    {
        // Enable the extension on install and update
        $this->enablePlugin();

        return true;
    }

    public function preflight($type, $parent)
    {
        // Check the minimum PHP version
        if (!version_compare(PHP_VERSION, $this->minimumPHPVersion, '>='))
        {
            $msg = '<p>You need PHP ' . $this->minimumPHPVersion . ' or later to install this plugin.</p>';
            JLog::add($msg, JLog::WARNING, 'jerror');

            return false;
        }

        // Check the minimum Joomla! version
        if (!version_compare(JVERSION, $this->minimumJoomlaVersion, '>='))
        {
            $msg = '<p>You need Joomla! ' . $this->minimumJoomlaVersion . ' or later to install this plugin.</p>';
            JLog::add($msg, JLog::WARNING, 'jerror');

            return false;
        }

        // Check the minimum Joomla! version
        if( version_compare(JVERSION, $this->maximumJoomlaVersion, 'gt') ) {
            $msg = '<p>You need a Joomla version between ' . $this->minimumJoomlaVersion . ' and ' . $this->maximumJoomlaVersion . ' to install this plugin.</p>';
            JLog::add($msg, JLog::WARNING, 'jerror');

            return false;
        }

        // Check the minimum YOOtheme Pro version
//        $yoothemeManifest = simplexml_load_file(JPATH_SITE . '/templates/yootheme/templateDetails.xml');
//        if (!$yoothemeManifest or !version_compare((string) $yoothemeManifest->version, $this->minimumYOOthemeVersion, '>='))
//        {
//            $msg = '<p>You need YOOtheme Pro ' . $this->minimumYOOthemeVersion . ' or later to install this plugin.</p>';
//            JLog::add($msg, JLog::WARNING, 'jerror');
//
//            return false;
//        }

        return true;
    }

    public function postflight($type, $parent)
    {
    }

    private function enablePlugin()
    {
        try
        {
            $db    = JFactory::getDbo();
            $query = $db->getQuery(true)
                        ->update('#__extensions')
                        ->set($db->qn('enabled') . ' = ' . $db->q(1))
                        ->where('type = ' . $db->quote('plugin'))
                        ->where('folder = ' . $db->quote('system'))
                        ->where('element = ' . $db->quote('sppagebuildertranslate'));
            $db->setQuery($query);
            $db->execute();
        }
        catch (\Exception $e)
        {
            return;
        }
    }
}

NexusLeads