This commit is contained in:
Michał 2022-08-15 10:56:05 +00:00
parent 6a6fac8c66
commit b7362ca195
18 changed files with 776 additions and 746 deletions

0
.gitmodules vendored
View file

View file

@ -1,5 +1,6 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
@ -14,10 +15,7 @@
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Secular+One&display=swap">
<!-- JQuery -->
<script
src="https://code.jquery.com/jquery-3.6.0.min.js"
integrity="sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4="
crossorigin="anonymous">
<script src="https://code.jquery.com/jquery-3.6.0.min.js" integrity="sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4=" crossorigin="anonymous">
</script>
<!-- Sniffle script! -->
@ -28,6 +26,7 @@
<script src="Flyout/flyout.js"></script>
<link rel='stylesheet' href='Flyout/flyout.css'>
</head>
<body>
<?php
include "ui/required.php";
@ -63,4 +62,5 @@
<?php include "ui/footer.php"; ?>
</body>
</html>

View file

@ -1,5 +1,6 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
@ -14,10 +15,7 @@
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Secular+One&display=swap">
<!-- JQuery -->
<script
src="https://code.jquery.com/jquery-3.6.0.min.js"
integrity="sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4="
crossorigin="anonymous">
<script src="https://code.jquery.com/jquery-3.6.0.min.js" integrity="sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4=" crossorigin="anonymous">
</script>
<!-- Sniffle script! -->
@ -28,6 +26,7 @@
<script src="../Flyout/flyout.js"></script>
<link rel='stylesheet' href='../Flyout/flyout.css'>
</head>
<body>
<?php
include "../ui/required.php";
@ -76,4 +75,5 @@
<?php include "../ui/footer.php"; ?>
</body>
</html>

View file

@ -1,5 +1,6 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
@ -14,10 +15,7 @@
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Secular+One&display=swap">
<!-- JQuery -->
<script
src="https://code.jquery.com/jquery-3.6.0.min.js"
integrity="sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4="
crossorigin="anonymous">
<script src="https://code.jquery.com/jquery-3.6.0.min.js" integrity="sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4=" crossorigin="anonymous">
</script>
<!-- Sniffle script! -->
@ -28,13 +26,14 @@
<script src="../Flyout/flyout.js"></script>
<link rel='stylesheet' href='../Flyout/flyout.css'>
</head>
<body>
<?php
include "../ui/required.php";
include "../ui/nav.php";
// Check if the user is already logged in, if yes then redirect him to welcome page
if(isset($_SESSION["loggedin"]) && $_SESSION["loggedin"] === true){
if (isset($_SESSION["loggedin"]) && $_SESSION["loggedin"] === true) {
?>
<script>
sniffleAdd('Whatcha doing here?', 'You are already logged in! No need to try again', 'var(--black)', '<?php echo $root_dir; ?>assets/icons/warning.svg');
@ -72,4 +71,5 @@
<?php include "../ui/footer.php"; ?>
</body>
</html>

View file

@ -1,5 +1,6 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
@ -14,10 +15,7 @@
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Secular+One&display=swap">
<!-- JQuery -->
<script
src="https://code.jquery.com/jquery-3.6.0.min.js"
integrity="sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4="
crossorigin="anonymous">
<script src="https://code.jquery.com/jquery-3.6.0.min.js" integrity="sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4=" crossorigin="anonymous">
</script>
<!-- Sniffle script! -->
@ -28,13 +26,14 @@
<script src="../Flyout/flyout.js"></script>
<link rel='stylesheet' href='../Flyout/flyout.css'>
</head>
<body>
<?php
include "../ui/required.php";
include "../ui/nav.php";
// Check if the user is logged in, otherwise redirect to login page
if(!isset($_SESSION["loggedin"]) || $_SESSION["loggedin"] !== true){
if (!isset($_SESSION["loggedin"]) || $_SESSION["loggedin"] !== true) {
header("location: https://superdupersecteteuploadtest.fluffybean.gay/account/login.php");
exit;
}
@ -68,4 +67,5 @@
<?php include "../ui/footer.php"; ?>
</body>
</html>

View file

@ -1,5 +1,6 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
@ -14,10 +15,7 @@
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Secular+One&display=swap">
<!-- JQuery -->
<script
src="https://code.jquery.com/jquery-3.6.0.min.js"
integrity="sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4="
crossorigin="anonymous">
<script src="https://code.jquery.com/jquery-3.6.0.min.js" integrity="sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4=" crossorigin="anonymous">
</script>
<!-- Sniffle script! -->
@ -28,6 +26,7 @@
<script src="../Flyout/flyout.js"></script>
<link rel='stylesheet' href='../Flyout/flyout.css'>
</head>
<body>
<?php
include "../ui/required.php";
@ -70,4 +69,5 @@
<?php include "../ui/footer.php"; ?>
</body>
</html>

View file

@ -81,7 +81,7 @@ if (isset($_POST['submit'])) {
?>
<script>
sniffleAdd('O hi <?php echo $_SESSION["username"]; ?>', 'You are now logged in! You will be redirected in a few seconds', 'var(--green)', '../assets/icons/hand-waving.svg');
setTimeout(function(){window.location.href = "../index.php?login=success";}, 4000);
setTimeout(function(){window.location.href = "../index.php?login=success";}, 2000);
</script>
<?php
} else {

View file

@ -210,7 +210,7 @@ if (isset($_POST['submit'])) {
?>
<script>
sniffleAdd('Success!', 'You account made for <?php echo $username; ?>!!!!! You will be redirected in a moment to login', 'var(--green)', '../assets/icons/hand-waving.svg');
setTimeout(function(){window.location.href = "../account/login.php";}, 4000);
setTimeout(function(){window.location.href = "../account/login.php";}, 2000);
</script>
<?php
} else {

View file

@ -218,7 +218,7 @@ nav .btn {
}
.nsfw-blur {
filter: blur(10px);
filter: blur(8px);
}
.nsfw-warning {
@ -236,21 +236,24 @@ nav .btn {
align-items: center;
text-decoration: none;
font-family: "Secular One", sans-serif;
background-color: rgba(21, 21, 21, 0.7333333333);
}
.nsfw-warning span {
color: #B66467;
text-align: center;
text-shadow: 0 0 2px #151515;
}
.nsfw-warning span::after {
content: " Content";
}
.nsfw-warning img {
margin: 0.25rem;
width: 2rem;
height: 2rem;
width: 2.5rem;
height: 2.5rem;
}
@media (max-width: 500px) {
.nsfw-warning span {
display: none;
.nsfw-warning span::after {
content: none;
}
}
/*
@ -675,9 +678,16 @@ footer > * {
margin-top: 0;
margin-bottom: 0.5rem;
}
footer a {
margin: 0.5rem;
footer p {
margin: 0 0.5rem;
text-decoration: none;
font-size: 16px;
font-family: "Secular One", sans-serif;
}
footer a {
margin: 0 0.5rem;
text-decoration: none;
font-size: 16px;
font-family: "Secular One", sans-serif;
}
footer a:hover {

View file

@ -96,8 +96,9 @@
}
.nsfw-blur {
filter: blur(10px);
filter: blur(8px);
}
.nsfw-warning {
width: 100%;
height: 100%;
@ -110,34 +111,42 @@
position: absolute;
z-index: 5;
display: flex; flex-direction: column;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
text-decoration: none;
font-family: $font-body;
background-color: $bg-alt;
span {
color: $red;
text-align: center;
text-shadow: 0 0 2px $black;
&::after {
content: ' Content';
}
}
img {
margin: 0.25rem;
width: 2rem;
height: 2rem;
width: 2.5rem;
height: 2.5rem;
}
}
@media (max-width: 500px) {
.nsfw-warning {
span {
display: none;
span::after {
content: none;
}
}
}
/*
|-------------------------------------------------------------
| IMAGE
@ -213,6 +222,7 @@
border-radius: $rad;
font-family: $font-body;
&::before {
content: '# ';
}

View file

@ -13,10 +13,20 @@ footer {
width: calc(100% - 1.4rem);
a {
margin: 0.5rem;
p {
margin: 0 0.5rem;
text-decoration: none;
font-size: 16px;
font-family: $font-body;
}
a {
margin: 0 0.5rem;
text-decoration: none;
font-size: 16px;
font-family: $font-body;

View file

@ -1,5 +1,6 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
@ -14,10 +15,7 @@
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Secular+One&display=swap">
<!-- JQuery -->
<script
src="https://code.jquery.com/jquery-3.6.0.min.js"
integrity="sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4="
crossorigin="anonymous">
<script src="https://code.jquery.com/jquery-3.6.0.min.js" integrity="sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4=" crossorigin="anonymous">
</script>
<!-- Sniffle script! -->
@ -28,6 +26,7 @@
<script src="Flyout/flyout.js"></script>
<link rel='stylesheet' href='Flyout/flyout.css'>
</head>
<body>
<?php
/*
@ -110,7 +109,7 @@
|-------------------------------------------------------------
*/
if (isset($image['imagename'])) {
$image_path = "images/".$image['imagename'];
$image_path = "images/" . $image['imagename'];
$image_alt = $image['alt'];
} else {
$image_path = "assets/no_image.png";
@ -170,32 +169,32 @@
<h2>Details</h2>
<?php
// User
echo "<p>Author: ".$image_author."</p>";
echo "<p>Author: " . $image_author . "</p>";
// Image ID
echo "<p>ID: ".$image['id']."</p>";
echo "<p>ID: " . $image['id'] . "</p>";
// File name
if (strlen($image['imagename']) > 30) {
echo "<p>File Name: ".substr($image['imagename'], 0, 30)."...</p>";
echo "<p>File Name: " . substr($image['imagename'], 0, 30) . "...</p>";
} else {
echo "<p>File Name: ".$image['imagename']."</p>";
echo "<p>File Name: " . $image['imagename'] . "</p>";
}
// File extention
echo "<p>File Type: ".pathinfo($image['imagename'], PATHINFO_EXTENSION)."</p>";
echo "<p>File Type: " . pathinfo($image['imagename'], PATHINFO_EXTENSION) . "</p>";
// Image resolution
list($width, $height) = getimagesize($image_path);
echo "<p>Image resolution: ".$width."x".$height."</p>";
echo "<p>Image resolution: " . $width . "x" . $height . "</p>";
// Image Upload date
echo "<p>Last updated: +0 ".$image['upload']."</p>";
echo "<p>Last updated: +0 " . $image['upload'] . "</p>";
echo "<br>";
// Image download
echo "<a class='btn btn-good' href='images/".$image['imagename']."' download='".$image['imagename']."'><img class='svg' src='assets/icons/download.svg'>Download image</a>";
echo "<a class='btn btn-good' href='images/" . $image['imagename'] . "' download='" . $image['imagename'] . "'><img class='svg' src='assets/icons/download.svg'>Download image</a>";
// Copy image
?>
@ -220,9 +219,9 @@
$image_tags_array = explode(" ", $image['tags']);
foreach ($image_tags_array as $tag) {
if ($tag == "nsfw") {
echo "<p id='tag' class='tag btn-bad'>".$tag."</p>";
echo "<p id='tag' class='tag btn-bad'>" . $tag . "</p>";
} else {
echo "<p id='tag' class='tag btn-good'>".$tag."</p>";
echo "<p id='tag' class='tag btn-good'>" . $tag . "</p>";
}
}
} else {
@ -391,4 +390,5 @@
<?php include "ui/footer.php"; ?>
</body>
</html>

6
setup.json Normal file
View file

@ -0,0 +1,6 @@
{
"name": "Only Legs",
"description": "A simple gallery with multiple users in mind",
"version": "15.08.22",
"license":"GPL 3.0"
}

View file

@ -1 +0,0 @@
<?php

View file

@ -1,6 +1,6 @@
<nav class="nav-root flex-left">
<div class="nav-name flex-left">
<p>Lynx Gallery</p>
<p><?php echo $setup_json['name']; ?></p>
</div>
<div class="nav-links flex-left">
<a class='btn' href='<?php echo $root_dir; ?>index.php'><img class='svg' src='<?php echo $root_dir; ?>assets/icons/house.svg'><span class='nav-hide'>Home</span></a>

View file

@ -47,11 +47,6 @@ include $root_dir."app/image/image_privilage.php";
include $root_dir."app/server/secrete.php";
?>
<script>
/*
This is a little secrete for the ones who care, nothing important
*/
console.log(" . . /|/| . . . . . . . \n .. /0 0 \\ . . . . . .. \n (III% . \\________, . . \n .. .\\_, .%###%/ \\'\\,.. \n . . . .||#####| |'\\ \\. \n .. . . ||. . .|/. .\\V. \n . . . .|| . . || . . . \n .. . . ||. . .||. . .. \n . . . .|| . . || . . . \n .. . . ||. . .||. . .. \n . . . .|| . . || . . . \n .. . . ||. . .||. . .. \n . . . .|| . . || . . . \n .. . . ||. . .||. . .. \n . . . .|| . . || . . . \n .. . . ||. . .||. . .. \n . . . .|| . . || . . . \n .. . . ||. . .||. . .. \n . . . .|| . . || . . . \n .. . . ||. . .||. . .. \n . . . .|| . . || . . . \n .. . . ||. . .||. . .. \n . . . cc/ . .cc/ . . .");
/*
Gets Querys from the URL the user is at
Used by Sniffle to display notificaions

View file

@ -1,5 +1,6 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
@ -14,10 +15,7 @@
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Secular+One&display=swap">
<!-- JQuery -->
<script
src="https://code.jquery.com/jquery-3.6.0.min.js"
integrity="sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4="
crossorigin="anonymous">
<script src="https://code.jquery.com/jquery-3.6.0.min.js" integrity="sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4=" crossorigin="anonymous">
</script>
<!-- Sniffle script! -->
@ -56,7 +54,7 @@
data: formData,
contentType: false,
processData: false,
success: function(response){
success: function(response) {
$("#sniffle").html(response);
}
});
@ -72,6 +70,7 @@
});
</script>
</head>
<body>
<?php
include "ui/required.php";
@ -81,7 +80,7 @@
if (!loggedin()) {
echo "
<script>
sniffleAdd('Who are you!', 'You must be loggedin to upload things, sowwy!', 'var(--red)', '".$root_dir."assets/icons/cross.svg');
sniffleAdd('Who are you!', 'You must be loggedin to upload things, sowwy!', 'var(--red)', '" . $root_dir . "assets/icons/cross.svg');
</script>
";
}
@ -101,4 +100,5 @@
<?php include "ui/footer.php"; ?>
</body>
</html>