diff options
Diffstat (limited to 'download/start/index.php')
-rw-r--r-- | download/start/index.php | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/download/start/index.php b/download/start/index.php index 085c798..bed1587 100644 --- a/download/start/index.php +++ b/download/start/index.php @@ -55,8 +55,8 @@ foreach (array_filter(scandir($_SERVER['DOCUMENT_ROOT'] . "/includes/data/reques file_put_contents("$name2/$name4/" . $file, json_encode($data, JSON_PRETTY_PRINT)); } - if ($data["type"] === "galleryupload" && file_exists($_SERVER['DOCUMENT_ROOT'] . "/includes/data/olduploads/" . $id . ".jpg")) { - file_put_contents("$name3/$name6/" . $id . ".jpg", file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/uploads/" . $id . ".jpg")); + if ($data["type"] === "galleryupload" && file_exists($_SERVER['DOCUMENT_ROOT'] . "/includes/data/olduploads/" . $id . ".webp")) { + file_put_contents("$name3/$name6/" . $id . ".webp", file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/uploads/" . $id . ".webp")); } } @@ -68,8 +68,8 @@ foreach (array_filter(scandir($_SERVER['DOCUMENT_ROOT'] . "/includes/data/archiv file_put_contents("$name2/$name5/" . $file, json_encode($data, JSON_PRETTY_PRINT)); } - if ($data["type"] === "galleryupload" && file_exists($_SERVER['DOCUMENT_ROOT'] . "/includes/data/olduploads/" . $id . ".jpg")) { - file_put_contents("$name3/$name7/" . $id . ".jpg", file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/olduploads/" . $id . ".jpg")); + if ($data["type"] === "galleryupload" && file_exists($_SERVER['DOCUMENT_ROOT'] . "/includes/data/olduploads/" . $id . ".webp")) { + file_put_contents("$name3/$name7/" . $id . ".webp", file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/olduploads/" . $id . ".webp")); } } @@ -81,22 +81,22 @@ if (file_exists($_SERVER['DOCUMENT_ROOT'] . "/includes/data/history/" . $_USER . file_put_contents("$name1/$name8.json", "{}"); } -if (file_exists($_SERVER['DOCUMENT_ROOT'] . "/uploads/" . $_USER . ".jpg")) { - file_put_contents("$name1/$name10.jpg", file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/uploads/" . $_USER . ".jpg")); +if (file_exists($_SERVER['DOCUMENT_ROOT'] . "/uploads/" . $_USER . ".webp")) { + file_put_contents("$name1/$name10.webp", file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/uploads/" . $_USER . ".webp")); } else { - file_put_contents("$name1/$name10.jpg", ""); + file_put_contents("$name1/$name10.webp", ""); } $list = json_decode(pf_utf8_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/embeds.json")), true); foreach ($list as $item) { if ($item["author"] === $_USER) { - if (file_exists($_SERVER['DOCUMENT_ROOT'] . "/uploads/" . $item["id"] . ".jpg")) { - file_put_contents("$name11/$name6/$item[id].jpg", file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/uploads/" . $item["id"] . ".jpg")); - } elseif (file_exists($_SERVER['DOCUMENT_ROOT'] . "/uploads/archive/" . $item["id"] . ".jpg")) { - file_put_contents("$name11/$name7/$item[id].jpg", file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/uploads/archive/" . $item["id"] . ".jpg")); + if (file_exists($_SERVER['DOCUMENT_ROOT'] . "/uploads/" . $item["id"] . ".webp")) { + file_put_contents("$name11/$name6/$item[id].webp", file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/uploads/" . $item["id"] . ".webp")); + } elseif (file_exists($_SERVER['DOCUMENT_ROOT'] . "/uploads/archive/" . $item["id"] . ".webp")) { + file_put_contents("$name11/$name7/$item[id].webp", file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/uploads/archive/" . $item["id"] . ".webp")); } else { - file_put_contents("$name11/$name7/$item[id].jpg", ""); + file_put_contents("$name11/$name7/$item[id].webp", ""); } } } |