php-gallery/upload.php

76 lines
2.3 KiB
PHP
Raw Normal View History

2022-07-21 14:53:04 +00:00
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
2022-08-03 16:46:50 +00:00
<title>Lynx Gallery</title>
2022-08-09 20:09:20 +00:00
<!-- Stylesheets -->
2022-07-21 14:53:04 +00:00
<link rel="stylesheet" href="css/master.css">
2022-08-09 20:09:20 +00:00
<link rel="stylesheet" href="css/normalise.css">
<!-- Google Fonts -->
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Lexend+Deca:wght@600">
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Secular+One&display=swap">
2022-08-03 16:46:50 +00:00
<!-- JQuery -->
2022-08-09 20:09:20 +00:00
<script
src="https://code.jquery.com/jquery-3.6.0.min.js"
integrity="sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4="
crossorigin="anonymous">
</script>
<!-- Sniffle script! -->
<script src="Sniffle/sniffle.js"></script>
<link rel='stylesheet' href='Sniffle/sniffle.css'>
<!-- Flyout script! -->
<script src="Flyout/flyout.js"></script>
<link rel='stylesheet' href='Flyout/flyout.css'>
2022-08-10 13:05:15 +00:00
<!-- Upload Script -->
<script>
$(document).ready(function() {
$("#uploadSubmit").submit(function(event) {
event.preventDefault();
var formData = new FormData(this.form);
$.ajax({
url: "app/image/upload_image.php",
type: 'post',
data: formData,
contentType: false,
processData: false,
success: function(response){
$("#sniffle").html(response);
}
});
});
});
</script>
2022-07-21 14:53:04 +00:00
</head>
<body>
<?php
include "ui/required.php";
2022-08-03 16:46:50 +00:00
include "ui/nav.php";
2022-07-21 14:53:04 +00:00
2022-07-26 20:51:59 +00:00
// Check if user is logged in
if (!loggedin()) {
2022-07-26 20:51:59 +00:00
header("Location: index.php");
}
2022-07-21 14:53:04 +00:00
?>
2022-07-26 17:16:17 +00:00
<div class="upload-root default-window">
2022-07-25 15:13:26 +00:00
<h2 class="space-bottom">Upload image</h2>
<p>In this world you have 2 choices, to upload a really cute picture of an animal or fursuit, or something other than those 2 things.</p>
2022-08-10 13:05:15 +00:00
<form id="uploadSubmit" class="flex-down between" method="POST" enctype="multipart/form-data">
<input name="image" class="btn alert-default space-bottom" type="file" placeholder="select image UwU">
<input name="alt" class="btn alert-default space-bottom-large" type="text" placeholder="Description/Alt for image">
<button name="submit" class="btn alert-high" type="submit"><img class="svg" src="assets/icons/upload.svg">Upload Image</button>
2022-07-25 15:13:26 +00:00
</form>
</div>
<?php include "ui/footer.php"; ?>
2022-07-21 14:53:04 +00:00
</body>
</html>