Joywork/ajax/uploader-resize-logo.php
2026-05-22 21:21:54 +03:00

13 lines
556 B
PHP

<?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));
}