Joywork/ajax/uploader-resize-logo.php

13 lines
556 B
PHP
Raw Normal View History

2026-05-22 20:21:54 +02:00
<?php
require_once($_SERVER['DOCUMENT_ROOT']."/config.php");
//ini_set('display_errors', 1);
//error_reporting(E_ALL & ~E_DEPRECATED & ~E_STRICT & ~E_NOTICE);
if (isset($_POST['fileuploader']) && isset($_POST['_file']) && isset($_POST['_editor'])) {
$file = str_replace("https://joywork.ru", "", $_POST['_file']);
$editor = json_decode($_POST['_editor'], true);
resize($_SERVER['DOCUMENT_ROOT'] . $file, null, null, null, (isset($editor['crop']) ? $editor['crop'] : null), 100, (isset($editor['rotation']) ? $editor['rotation'] : null));
}