This repository has been archived on 2023-10-27. You can view files and clone it, but cannot push or open issues or pull requests.
beatsaber-wip-uploader/index.php
2023-04-15 18:14:47 +01:00

58 lines
2.3 KiB
PHP

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>WIP Uploader</title>
<script src="https://cdn.fascinated.cc/assets/tailwindcss/3.2.4.js"></script>
<meta property="og:type" content="website" />
<meta property="og:title" content="WIP Maps" />
<meta property="og:description" content="Simple website to host WIP maps" />
<meta property="og:url" content="https://wip.fascinated.cc" />
<meta name="twitter:card" content="summary_large_image" />
<meta name="twitter:title" content="WIP Maps" />
<meta name="twitter:description" content="BeatSaber WIP Map Uploader" />
<meta property="theme-color" content="#4d3a9c" />
</head>
<body>
<div class="flex items-center justify-center h-screen bg-gray-900">
<div class="w-1/2">
<div class="bg-gray-800 rounded-lg shadow-xl p-10">
<h2 class="text-4xl font-bold text-white mb-10">
WIP Map Uploader
</h2>
<?php
// if the map parameter is set, display the map
if (isset($_GET["map"])) {
echo '<div class="mb-5">
<label for="map" class="block text-white text-sm font-bold mb-2">Successfully uploaded Map</label>
<span class="bg-gray-700 text-white rounded w-full py-2 px-3 focus:outline-none focus:shadow-outline">!wip ' . $_GET["map"] . '</span>
</div>
';
}
// if the map parameter is not set, display the upload form
else {
echo '<form action="upload.php" method="post" enctype="multipart/form-data">
<div class="mb-5">
<label for="map" class="block text-white text-sm font-bold mb-2">Map</label>
<input type="file" name="map" id="map" class="bg-gray-700 text-white rounded w-full py-2 px-3 focus:outline-none focus:shadow-outline">
</div>
<div class="mb-5">
<button type="submit" class="bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded focus:outline-none focus:shadow-outline">Upload</button>
</div>
</form>
';
}
?>
</div>
</div>
</body>
</html>