-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ef59d52
commit c60607d
Showing
8 changed files
with
119 additions
and
217 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<?php | ||
header("Location: /characters/"); | ||
exit(); | ||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<?php | ||
header("Location: /groups/"); | ||
exit(); | ||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<?php | ||
header("Location: /parodies/"); | ||
exit(); | ||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,211 +1,4 @@ | ||
<?php | ||
require_once('auth.php'); | ||
|
||
// Connect to the SQLite database | ||
$db = new SQLite3('database.sqlite'); | ||
|
||
// Get user's email from session or wherever it's stored | ||
$email = $_SESSION['email']; | ||
?> | ||
|
||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1"> | ||
<title>All Tags</title> | ||
<link rel="icon" type="image/png" href="icon/favicon.png"> | ||
<?php include('bootstrapcss.php'); ?> | ||
</head> | ||
<body> | ||
<?php include('header.php'); ?> | ||
<?php include('taguserheader.php'); ?> | ||
<div class="dropdown"> | ||
<button class="btn btn-sm fw-bold rounded-pill ms-2 mb-2 btn-outline-dark dropdown-toggle" type="button" data-bs-toggle="dropdown" aria-expanded="false"> | ||
<i class="bi bi-images"></i> sort by | ||
</button> | ||
<ul class="dropdown-menu"> | ||
<li><a href="?by=ascending&category=<?php echo isset($_GET['category']) ? $_GET['category'] : 'A'; ?>&page=<?php echo isset($_GET['page']) ? $_GET['page'] : '1'; ?>" class="dropdown-item fw-bold <?php if(!isset($_GET['by']) || $_GET['by'] == 'ascending') echo 'active'; ?>">ascending</a></li> | ||
<li><a href="?by=descending&category=<?php echo isset($_GET['category']) ? $_GET['category'] : 'A'; ?>&page=<?php echo isset($_GET['page']) ? $_GET['page'] : '1'; ?>" class="dropdown-item fw-bold <?php if(isset($_GET['by']) && $_GET['by'] == 'descending') echo 'active'; ?>">descending</a></li> | ||
<li><a href="?by=popular&category=<?php echo isset($_GET['category']) ? $_GET['category'] : 'A'; ?>&page=<?php echo isset($_GET['page']) ? $_GET['page'] : '1'; ?>" class="dropdown-item fw-bold <?php if(isset($_GET['by']) && $_GET['by'] == 'popular') echo 'active'; ?>">popular</a></li> | ||
<li><a href="?by=view&category=<?php echo isset($_GET['category']) ? $_GET['category'] : 'A'; ?>&page=<?php echo isset($_GET['page']) ? $_GET['page'] : '1'; ?>" class="dropdown-item fw-bold <?php if(isset($_GET['by']) && $_GET['by'] == 'view') echo 'active'; ?>">most viewed</a></li> | ||
<li><a href="?by=least&category=<?php echo isset($_GET['category']) ? $_GET['category'] : 'A'; ?>&page=<?php echo isset($_GET['page']) ? $_GET['page'] : '1'; ?>" class="dropdown-item fw-bold <?php if(isset($_GET['by']) && $_GET['by'] == 'least') echo 'active'; ?>">least viewed</a></li> | ||
<li><a href="?by=liked&category=<?php echo isset($_GET['category']) ? $_GET['category'] : 'A'; ?>&page=<?php echo isset($_GET['page']) ? $_GET['page'] : '1'; ?>" class="dropdown-item fw-bold <?php if(isset($_GET['by']) && $_GET['by'] == 'liked') echo 'active'; ?>">liked</a></li> | ||
</ul> | ||
</div> | ||
<?php | ||
if(isset($_GET['by'])){ | ||
$sort = $_GET['by']; | ||
|
||
switch ($sort) { | ||
case 'ascending': | ||
include "tags_asc.php"; | ||
break; | ||
case 'descending': | ||
include "tags_desc.php"; | ||
break; | ||
case 'popular': | ||
include "tags_pop.php"; | ||
break; | ||
case 'view': | ||
include "tags_view.php"; | ||
break; | ||
case 'least': | ||
include "tags_least.php"; | ||
break; | ||
case 'liked': | ||
include "tags_like.php"; | ||
break; | ||
} | ||
} | ||
else { | ||
include "tags_asc.php"; // Include ascending by default | ||
} | ||
|
||
?> | ||
<button class="z-3 btn btn-primary btn-md rounded-pill fw-bold position-fixed bottom-0 end-0 m-2" id="scrollToTopBtn" onclick="scrollToTop()"><i class="bi bi-chevron-up" style="-webkit-text-stroke: 3px;"></i></button> | ||
<script> | ||
// Show or hide the button based on scroll position | ||
window.onscroll = function() { | ||
showScrollButton(); | ||
}; | ||
|
||
// Function to show or hide the button based on scroll position | ||
function showScrollButton() { | ||
var scrollButton = document.getElementById("scrollToTopBtn"); | ||
if (document.body.scrollTop > 20 || document.documentElement.scrollTop > 20) { | ||
scrollButton.style.display = "block"; | ||
} else { | ||
scrollButton.style.display = "none"; | ||
} | ||
} | ||
|
||
// Function to scroll to the top of the page | ||
function scrollToTop() { | ||
document.body.scrollTop = 0; // For Safari | ||
document.documentElement.scrollTop = 0; // For Chrome, Firefox, IE, and Opera | ||
} | ||
</script> | ||
<script> | ||
function updatePlaceholder(input) { | ||
input.setAttribute('placeholder', input.value.trim() !== '' ? input.value.trim() : 'Search by tags or title'); | ||
} | ||
</script> | ||
<script> | ||
let lazyloadImages = document.querySelectorAll(".lazy-load"); | ||
let imageContainer = document.getElementById("image-container"); | ||
|
||
// Set the default placeholder image | ||
const defaultPlaceholder = "icon/bg.png"; | ||
|
||
if ("IntersectionObserver" in window) { | ||
let imageObserver = new IntersectionObserver(function(entries, observer) { | ||
entries.forEach(function(entry) { | ||
if (entry.isIntersecting) { | ||
let image = entry.target; | ||
image.src = image.dataset.src; | ||
imageObserver.unobserve(image); | ||
} | ||
}); | ||
}); | ||
|
||
lazyloadImages.forEach(function(image) { | ||
image.src = defaultPlaceholder; // Apply default placeholder | ||
imageObserver.observe(image); | ||
image.style.filter = "blur(5px)"; // Apply initial blur to all images | ||
|
||
// Remove blur and apply custom blur to NSFW images after they load | ||
image.addEventListener("load", function() { | ||
image.style.filter = ""; // Remove initial blur | ||
if (image.classList.contains("nsfw")) { | ||
image.style.filter = "blur(4px)"; // Apply blur to NSFW images | ||
|
||
// Add overlay with icon and text | ||
let overlay = document.createElement("div"); | ||
overlay.classList.add("overlay", "rounded"); | ||
let icon = document.createElement("i"); | ||
icon.classList.add("bi", "bi-eye-slash-fill", "text-white"); | ||
overlay.appendChild(icon); | ||
let text = document.createElement("span"); | ||
text.textContent = "R-18"; | ||
text.classList.add("shadowed-text", "fw-bold", "text-white"); | ||
overlay.appendChild(text); | ||
image.parentNode.appendChild(overlay); | ||
} | ||
}); | ||
}); | ||
} else { | ||
let lazyloadThrottleTimeout; | ||
|
||
function lazyload() { | ||
if (lazyloadThrottleTimeout) { | ||
clearTimeout(lazyloadThrottleTimeout); | ||
} | ||
lazyloadThrottleTimeout = setTimeout(function() { | ||
let scrollTop = window.pageYOffset; | ||
lazyloadImages.forEach(function(img) { | ||
if (img.offsetTop < window.innerHeight + scrollTop) { | ||
img.src = img.dataset.src; | ||
img.classList.remove("lazy-load"); | ||
} | ||
}); | ||
lazyloadImages = Array.from(lazyloadImages).filter(function(image) { | ||
return image.classList.contains("lazy-load"); | ||
}); | ||
if (lazyloadImages.length === 0) { | ||
document.removeEventListener("scroll", lazyload); | ||
window.removeEventListener("resize", lazyload); | ||
window.removeEventListener("orientationChange", lazyload); | ||
} | ||
}, 20); | ||
} | ||
|
||
document.addEventListener("scroll", lazyload); | ||
window.addEventListener("resize", lazyload); | ||
window.addEventListener("orientationChange", lazyload); | ||
} | ||
|
||
// Infinite scrolling | ||
let loading = false; | ||
|
||
function loadMoreImages() { | ||
if (loading) return; | ||
loading = true; | ||
|
||
// Simulate loading delay for demo purposes | ||
setTimeout(function() { | ||
for (let i = 0; i < 10; i++) { | ||
if (lazyloadImages.length === 0) { | ||
break; | ||
} | ||
let image = lazyloadImages[0]; | ||
imageContainer.appendChild(image); | ||
lazyloadImages = Array.from(lazyloadImages).slice(1); | ||
} | ||
loading = false; | ||
}, 1000); | ||
} | ||
|
||
window.addEventListener("scroll", function() { | ||
if (window.innerHeight + window.scrollY >= imageContainer.clientHeight) { | ||
loadMoreImages(); | ||
} | ||
}); | ||
|
||
// Initial loading | ||
loadMoreImages(); | ||
</script> | ||
<script> | ||
if ('serviceWorker' in navigator) { | ||
window.addEventListener('load', function() { | ||
navigator.serviceWorker.register('../sw.js').then(function(registration) { | ||
console.log('ServiceWorker registration successful with scope: ', registration.scope); | ||
}, function(err) { | ||
console.log('ServiceWorker registration failed: ', err); | ||
}); | ||
}); | ||
} | ||
</script> | ||
<?php include('bootstrapjs.php'); ?> | ||
</body> | ||
</html> | ||
header("Location: /tags/"); | ||
exit(); | ||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<?php | ||
header("Location: /users/"); | ||
exit(); | ||
?> |
Oops, something went wrong.