Updated 7 files (automated)

mane
Mia Raindrops 2 months ago
parent 1646d1cc94
commit 6410652618
Signed by: Mia Raindrops
GPG Key ID: EFBDC68435A574B7

@ -1,18 +1,25 @@
<?php
require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/session.php"; global $userName;
require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/session.php"; global $userName; global $id;
while (trim(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/saved.json")) === "") {}
$uid = $id;
if (file_exists($_SERVER['DOCUMENT_ROOT'] . "/includes/proprietary/nsfw.php")) require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/proprietary/nsfw.php";
$list = [];
$saved = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/saved.json"), true)[$userName];
foreach ($saved as $id => $group) {
if ($id === "favorites") continue;
$list[] = [
$item = [
"id" => $id,
"enabled" => !isset($group["owner"]) || $group["owner"] === $uid,
"name" => $group["name"]
];
$list[] = $item;
}
die(json_encode($list));

@ -1,6 +1,6 @@
<?php
require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/session.php"; global $userName;
require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/session.php"; global $userName; global $id;
while (trim(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/saved.json")) === "") {}
$isSaved = false;
@ -18,6 +18,10 @@ if (!in_array($_GET["id"], $saved[$userName][$_GET["category"]]["items"])) {
$saved[$userName][$_GET["category"]]["items"][] = $_GET["id"];
}
if (isset($saved[$userName][$_GET["category"]]["owner"]) && $saved[$userName][$_GET["category"]]["owner"] !== $id) {
die();
}
file_put_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/saved.json", json_encode($saved, JSON_PRETTY_PRINT));
while (trim(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/saved.json")) === "") {

@ -122,7 +122,7 @@
<ul class="dropdown-menu" id="dropdown-save-menu">
<li><a class="dropdown-item" href="#image-preview" onclick="saveItem('favorites', '${data['id']}')">Favorites</a></li>
${saveCategories.length > 1 ? `<li><hr class="dropdown-divider"></li>` : ``}
${saveCategories.map(i => `<li><a class="dropdown-item" href="#image-preview" onclick="saveItem('${i.id}', '${data['id']}')">${i.name}</a></li>`).join('')}
${saveCategories.map(i => `<li><a class="dropdown-item ${!i.enabled ? "disabled" : ""}" href="#image-preview" onclick="saveItem('${i.id}', '${data['id']}')">${i.name}</a></li>`).join('')}
<li><hr class="dropdown-divider"></li>
<li><a class="dropdown-item" href="#image-preview" onclick="saveItem('new', '${data['id']}')">New category</a></li>
</ul>

@ -131,7 +131,7 @@ function parseFilters($filters, $ignore = []) {
}
.form-control, .form-select, .form-check-input {
filter: invert(1) hue-rotate(180deg);
filter: invert(1) hue-rotate(180deg) !important;
}
.icon {
@ -159,8 +159,12 @@ function parseFilters($filters, $ignore = []) {
}
.list-group-item {
background-color: #222;
color: white;
background-color: #222 !important;
color: white !important;
}
.list-group-item.disabled {
opacity: .75;
}
.list-group-item-action:hover {

@ -1,4 +1,4 @@
<?php $title = "Explicit"; require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/header.php"; global $allowFillyNsfw; global $allowNsfw;
<?php $title = "Explicit"; require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/header.php"; global $allowNsfw;
?>

@ -15,7 +15,7 @@ $title = "Warning"; require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/header.p
This section of the app presents uncensored graphically explicit sexual content that you may not want to see in some cases. Some of the content you see might be more explicit or realistic than the rest, and content filters might not be 100% perfect.
</p>
<p>
We have determined you are allowed (old enough) to view sexually explicit content, so you can continue if you wish to do so. Make sure you are in a safe place with no one eavesdropping on you. Please refrain from visiting this part of the website in a public place.
We have determined you are allowed to view sexually explicit content, so you can continue if you wish to do so. Make sure you are in a safe place with no one eavesdropping on you. Please refrain from visiting this part of the website in a public place.
</p>
By continuing, you agree to be presented with sexually explicit content that is not appropriate for everyone.
</div>

@ -1,7 +1,29 @@
<?php $title = "Saved"; require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/header.php"; global $userName; global $allowNsfw;
<?php
require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/session.php"; global $userName; global $allowNsfw; global $id;
$saved = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/saved.json"), true)[$userName];
$title = "Saved";
if (isset($_GET["id"])) {
$category = $saved[$_GET["id"]];
if (!isset($category)) {
header("Location: /saved");
die();
}
if (isset($category["owner"]) && $category["owner"] !== $id) {
header("Location: /saved");
die();
}
$title = $category["name"] . " - Saved";
}
require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/header.php";
$uid = $id;
?>
<?php if (!isset($_GET["id"])): ?>
@ -26,10 +48,10 @@ $saved = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/da
<div class="list-group saved-list" style="margin-top: 10px;">
<?php foreach ($saved as $id => $category): if ($id !== "favorites"): ?>
<a href="/saved/?id=<?= $id ?>" class="list-group-item list-group-item-action" style="display: grid; grid-template-columns: 5vw 1fr; grid-gap: 15px;">
<a href="/saved/?id=<?= $id ?>" class="list-group-item list-group-item-action <?= isset($category["owner"]) && $category["owner"] !== $uid ? "disabled" : "" ?>" style="display: grid; grid-template-columns: 5vw 1fr; grid-gap: 15px;">
<div style="background-color: rgba(255, 255, 255, .1); height: 64px; border-radius: 5px;">
<div style="opacity: 0; transition: opacity 200ms; background-size: cover; background-position: center; height: 100%; width: 100%; border-radius: 5px;" class="category-img" data-category-img="<?= count($category["items"]) > 0 ? $category["items"][count($category["items"]) - 1] : "" ?>">
<div style="display:none;width: 100%;backdrop-filter: blur(5px);height: 100%;border-radius: 5px;"></div>
<div style="display:none;width: 100%;backdrop-filter: blur(<?= isset($category["owner"]) && $category["owner"] !== $uid ? "10px" : "5px" ?>);height: 100%;border-radius: 5px;"></div>
</div>
</div>
<div style="display: flex; align-items: center;">
@ -84,12 +106,12 @@ if (!isset($category)) die();
<div style="margin: 20px 50px 0;" class="main-app">
<h2 <?= $_GET["id"] !== "favorites" ? "contenteditable" : "" ?> id="category-title"><?= $category["name"] ?></h2>
<p <?php if (!$allowNsfw): ?>style="display:none;"<?php endif; ?>>
<div style="margin-bottom: 10px;<?php if (!isset($category["owner"]) && (!$allowNsfw || (function_exists("proprietary_nsfw_7") && proprietary_nsfw_7()))): ?>display:none;<?php endif; ?>">
<div class="form-check">
<input class="form-check-input" type="checkbox" id="show-nsfw" name="show-nsfw" disabled onchange="toggleNSFW();">
<label class="form-check-label" for="show-nsfw">Display NSFW images</label>
</div>
</p>
</div>
<div style="display: grid; grid-template-columns: repeat(6, 1fr); grid-gap: 10px;" id="grid">
<?php foreach ($category["items"] as $id) { ?>

Loading…
Cancel
Save