maybe copy button yes?
This commit is contained in:
parent
0755a8a336
commit
d3e6fc0026
38
index.php
38
index.php
@ -30,26 +30,30 @@
|
||||
<?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>
|
||||
';
|
||||
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>
|
||||
<button class="bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded focus:outline-none focus:shadow-outline" onclick="navigator.clipboard.writeText(\'!wip ' . $_GET["map"] . '\')">Copy</button>
|
||||
</div>
|
||||
';
|
||||
return;
|
||||
}
|
||||
|
||||
// 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>
|
||||
';
|
||||
}
|
||||
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>
|
||||
|
Reference in New Issue
Block a user