summaryrefslogtreecommitdiff
path: root/includes/fragments/member.inc
diff options
context:
space:
mode:
Diffstat (limited to 'includes/fragments/member.inc')
-rw-r--r--includes/fragments/member.inc22
1 files changed, 21 insertions, 1 deletions
diff --git a/includes/fragments/member.inc b/includes/fragments/member.inc
index bbdfc98..1d9530c 100644
--- a/includes/fragments/member.inc
+++ b/includes/fragments/member.inc
@@ -48,6 +48,11 @@ if ($memberData["name"] === "fusion") {
window.onscroll = () => {
document.getElementById("member-banner-container").style.height = (<?= !isset($memberData["banner"]) ? "33" : "65" ?> - ((window.scrollY / window.screen.availHeight) * 100)) + "vh";
}
+
+ function showPrivate() {
+ document.getElementById("private-page-link").style.display = "none";
+ document.getElementById("private-page-hidden").style.display = "block";
+ }
</script>
<br>
@@ -84,7 +89,22 @@ if ($memberData["name"] === "fusion") {
<?php else: ?>
<?php if (file_exists($_SERVER['DOCUMENT_ROOT'] . "/includes/data/content/$memberID-private.html") && $isLoggedIn): ?>
<br>
- <?= file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/content/$memberID-private.html") ?>
+ <?php
+
+ $text = file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/content/$memberID-private.html");
+ $censor = false;
+
+ if (str_contains(strtolower($text), "sex") || str_contains(strtolower($text), "nsfw") || str_contains(strtolower($text), "pleasure") || str_contains(strtolower($text), "dildo") || str_contains(strtolower($text), "dick") || str_contains(strtolower($text), "penis") || str_contains(strtolower($text), "vagina") || str_contains(strtolower($text), "pussy")) {
+ $censor = true;
+ }
+
+ if ($censor) {
+ echo("<a href='#' id='private-page-link' onclick='showPrivate();'>Show private page (NSFW)</a><div id='private-page-hidden' style='display: none;'>" . $text . "</div>");
+ } else {
+ echo($text);
+ }
+
+ ?>
<?php if (file_exists($_SERVER['DOCUMENT_ROOT'] . "/includes/data/content/$memberID.html")): ?><hr><?php endif; ?>
<?php endif; ?>