From 5860551daa0f60103ad24e93da29f401a653f144 Mon Sep 17 00:00:00 2001 From: RaindropsSys Date: Fri, 29 Mar 2024 22:05:35 +0100 Subject: Updated 20 files, added 6 files, deleted 144 files and renamed .idea/ponycule.iml (automated) --- pages/api/ponytown.php | 121 ------------------------------------------------- 1 file changed, 121 deletions(-) delete mode 100644 pages/api/ponytown.php (limited to 'pages/api/ponytown.php') diff --git a/pages/api/ponytown.php b/pages/api/ponytown.php deleted file mode 100644 index bc40975..0000000 --- a/pages/api/ponytown.php +++ /dev/null @@ -1,121 +0,0 @@ - 70) { - $errors[] = "0x{$_}000002A: Image #" . $_ . " is wider than it should, are you sure you set zoom to 1x? Maybe you inverted the files?"; - } - - if ($_ === 1 && $size[1] > 70) { - $errors[] = "0x{$_}000002B: Image #" . $_ . " is higher than it should, are you sure you set zoom to 1x? Maybe you inverted the files?"; - } - - if ($_ === 2 && $size[0] > 40) { - $errors[] = "0x{$_}000002A: Image #" . $_ . " is wider than it should, are you sure you set zoom to 1x? Maybe you inverted the files?"; - } - - if ($_ === 2 && $size[1] > 35) { - $errors[] = "0x{$_}000002B: Image #" . $_ . " is higher than it should, are you sure you set zoom to 1x? Maybe you inverted the files?"; - } -} - -if (count($errors) === 0 && isset($_GET["real"])) { - foreach ([1, 2] as $_) { - $input = $json_object[$_ - 1]; - - $mime = explode(";", substr($input, 5))[0]; - $file = base64_decode(explode(",", explode(";", substr($input, 5))[1])[1]); - - $image = @imagecreatefromstring($file); - - imagealphablending($image, false); - imagesavealpha($image, true); - - if ($_ === 1) { - imagepng($image, $_SERVER['DOCUMENT_ROOT'] . "/assets/ponies/" . $member["id"] . ".png"); - } else { - imagepng($image, $_SERVER['DOCUMENT_ROOT'] . "/assets/uploads/pt-" . $member["name"] . ".png"); - } - } -} - -createJob("UpdateAssets", [ - "type" => "ponytown" -]); - -die(json_encode([ - "success" => count($errors) === 0, - "errors" => $errors -])); \ No newline at end of file -- cgit