diff options
author | RaindropsSys <raindrops@equestria.dev> | 2024-03-30 23:40:33 +0100 |
---|---|---|
committer | RaindropsSys <raindrops@equestria.dev> | 2024-03-30 23:40:33 +0100 |
commit | 6b796258d413f00e498ce7f80f73a9f6c061f29c (patch) | |
tree | 49e64a5dd4cde2acff7f0a93ed3f8e20e1cb2dc8 /includes/fragments/member.inc | |
parent | 5860551daa0f60103ad24e93da29f401a653f144 (diff) | |
download | pluralconnect-6b796258d413f00e498ce7f80f73a9f6c061f29c.tar.gz pluralconnect-6b796258d413f00e498ce7f80f73a9f6c061f29c.tar.bz2 pluralconnect-6b796258d413f00e498ce7f80f73a9f6c061f29c.zip |
Updated 5 files, added 2 files, deleted 495 files and renamed 7 files (automated)
Diffstat (limited to 'includes/fragments/member.inc')
-rw-r--r-- | includes/fragments/member.inc | 204 |
1 files changed, 0 insertions, 204 deletions
diff --git a/includes/fragments/member.inc b/includes/fragments/member.inc deleted file mode 100644 index c621bc3..0000000 --- a/includes/fragments/member.inc +++ /dev/null @@ -1,204 +0,0 @@ -<?php global $system; global $defaultMember; global $systemCommonName; global $systemID; global $member; global $memberData; global $memberCommonName; global $memberID; global $lang; global $pages; global $app; global $isLoggedIn; global $isLowerLoggedIn; - -require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/util/session.inc"; - -if (!file_exists($_SERVER['DOCUMENT_ROOT'] . "/includes/data/designs")) mkdir($_SERVER['DOCUMENT_ROOT'] . "/includes/data/designs"); - -if ($memberData["name"] === "fusion") { - $title = ($memberCommonName === "fusion" ? $lang["member"]["merge"] : $memberCommonName); -} else { - $title = $memberCommonName . " ยท " . $systemCommonName; -} - -if ($memberData["name"] !== "unknown" && $memberData["name"] !== "fusion") { - $metadata = parseMetadata(json_decode(file_get_contents_or_defaults($_SERVER['DOCUMENT_ROOT'] . "/includes/data/metadata/" . $memberID . ".json", $defaultMember), true)); - - if (isset($metadata["private"]) && $metadata["private"] && !$isLoggedIn && !$isLowerLoggedIn) { - peh_error("Page not found: " . strip_tags($member), 404); - } -} - -require_once $_SERVER['DOCUMENT_ROOT'] . '/includes/components/header.inc'; - -$travelling = []; - -if ($memberData["name"] !== "unknown" && $memberData["name"] !== "fusion") { - $metadata = parseMetadata(json_decode(file_get_contents_or_defaults($_SERVER['DOCUMENT_ROOT'] . "/includes/data/metadata/" . $memberID . ".json", $defaultMember), true)); -} - -global $isLoggedIn; - -$frontersRaindrops = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/gdapd/fronters.json"), true); -$frontersOther = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/other/fronters.json"), true); - -if (!file_exists($_SERVER['DOCUMENT_ROOT'] . "/includes/data/designs/" . $memberID . ".json")) file_put_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/designs/" . $memberID . ".json", json_encode([ - "_main" => [ - "name" => "Main", - "note" => "Everyday appearance", - "image" => null - ] -])); - -if (file_exists($_SERVER['DOCUMENT_ROOT'] . "/assets/ponies/" . $memberID . ".png")) { - $designs = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/designs/" . $memberID . ".json"), true); - $designs["_main"]["image"] = base64_encode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/assets/ponies/" . $memberData["id"] . ".png")); -} - -?> - -<div id="member-banner-container" style="width: calc(100% - 300px);height: <?= !isset($memberData["banner"]) ? "33vh" : "65vh" ?>;position: fixed;background-image: url('<?= getAsset($systemID, $memberID, !isset($memberData["banner"]) ? "avatars" : "banners") ?>');background-size: cover;background-position: center; top: 0;"> - <div id="member-banner-inner" style="height: 100%;width: 100%;background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,.25) 50%, rgba(0,0,0,1) 100%);<?= !isset($memberData["banner"]) ? "backdrop-filter:blur(100px);" : "" ?>"></div> -</div> - -<style> - .input-inherit { - all: inherit; - width: 200px; - height: max-content; - margin: 0; - } -</style> - -<script> - document.getElementById("app").onscroll = () => { - document.getElementById("member-banner-container").style.height = (<?= !isset($memberData["banner"]) ? "33" : "65" ?> - ((document.getElementById("app").scrollTop / (window.screen.availHeight - 62)) * 100)) + "vh"; - } - - function showPrivate() { - document.getElementById("private-page-link").style.display = "none"; - document.getElementById("private-page-hidden").style.display = "block"; - } - - function _arrayBufferToBase64( buffer ) { - var binary = ''; - var bytes = new Uint8Array( buffer ); - var len = bytes.byteLength; - for (var i = 0; i < len; i++) { - binary += String.fromCharCode( bytes[ i ] ); - } - return window.btoa( binary ); - } -</script> - -<br> -<div class="container"> - <div id="member-page" style="background-color: rgba(26,26,26,0.8);border-radius: 10px;padding:20px; backdrop-filter: blur(30px); -webkit-backdrop-filter: blur(30px);margin-top:<?= !isset($memberData["banner"]) ? "15vh" : "30vh" ?>; padding-bottom: 0 !important;"> - <?php require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/components/fullbanner.inc"; ?> - <div id="page-content"> - <?php if ($memberData["name"] === "unknown"): ?> - <br> - <div class="alert alert-secondary" style="margin-bottom: 0 !important;"> - <p>Hello there!</p> - <p>I'm currently not totally sure who I am (it's a thing that can happen with plurality), but I am using this pony as a temporary identity to stay calm and not panic while I figure out what is going on and who I am.</p> - <p>I can either be an existing headmate who cannot work out they are fronting (this can sometimes happen when one of us gets pushed out of front), multiple headmates blurring who cannot work out who we are, a new pony trying to figure out their identity (this can sometimes take a while), or some other plurality shenanigans.</p> - <span>In all cases, feel free to ask!</span> - </div> - <br> - <?php else: ?><?php endif; ?> - </div> - </div> -</div> - -<div class="container"> - <?php global $isLoggedIn; global $isLowerLoggedIn; if ($isLoggedIn || ($isLowerLoggedIn && ($systemID === $app["other"]["id"] || $systemID === "hrbom"))): ?> - <hr> - - <details> - <summary style="list-style: none;"> - <small style="opacity:.5;display:block;">Click here for technical details.</small> - </summary> - <div class="alert alert-dark"> - <ul style="margin-bottom:0;"> - <li><b>ID:</b> <code><?= $memberID ?></code> (<code><?= $systemID . "/" . $memberID ?></code>, <?= $memberData["name"] ?>)</li> - <li><b>Files:</b> - <ul> - <li><code><?= $_SERVER['DOCUMENT_ROOT'] . "/includes/data/metadata/$memberID.json" ?></code> (<?= file_exists($_SERVER['DOCUMENT_ROOT'] . "/includes/data/metadata/$memberID.json") ? filesize($_SERVER['DOCUMENT_ROOT'] . "/includes/data/metadata/$memberID.json") . " bytes" : "not found" ?>)</li> - <li><code><?= $_SERVER['DOCUMENT_ROOT'] . "/includes/data/content/$memberID.html" ?></code> (<?= file_exists($_SERVER['DOCUMENT_ROOT'] . "/includes/data/content/$memberID.html") ? filesize($_SERVER['DOCUMENT_ROOT'] . "/includes/data/content/$memberID.html") . " bytes" : "not found" ?>)</li> - <li><code><?= $_SERVER['DOCUMENT_ROOT'] . "/includes/data/content/$memberID-private.html" ?></code> (<?= file_exists($_SERVER['DOCUMENT_ROOT'] . "/includes/data/content/$memberID-private.html") ? filesize($_SERVER['DOCUMENT_ROOT'] . "/includes/data/content/$memberID-private.html") . " bytes" : "not found" ?>)</li> - </ul> - </li> - <li><b>Date added:</b> <?= date('l j F Y', strtotime($memberData["created"])) ?> (<?= timeAgo($memberData["created"]) ?>, <code><?= $memberData["created"] ?></code>)</li> - <li><b>Pronouns:</b> <?= $memberData['pronouns'] ?></li> - <li><b>Color:</b> <span style="border:1px solid rgba(255, 255, 255, .5);background-color:#<?= $memberData["color"] ?? "ffffff" ?>;display:inline-block;width:16px;height:16px;border-radius:5px;vertical-align: middle;filter: invert(1) hue-rotate(180deg);"></span> <span style="vertical-align: middle;"><code>#<?= $memberData["color"] ?? "ffffff" ?></code></span> - <li><b>Reduced name:</b> <?= getMiniName($memberData["display_name"] ?? $member["name"]) ?></li> - <li> - <b>Metadata:</b> - <ul> - <?php foreach (parseMetadata(json_decode(file_get_contents_or_defaults($_SERVER['DOCUMENT_ROOT'] . "/includes/data/metadata/" . $memberID . ".json", $defaultMember), true)) as $name => $value): ?> - <li> - <b><?= $name ?></b>: <?php - - if (is_bool($value)) { - echo($value ? "true" : "false"); - } else if (is_numeric($value)) { - echo((string)$value); - } else if (is_string($value)) { - echo("\"$value\""); - } else if (is_null($value)) { - echo("null"); - } else if (is_array($value) && array_keys($value) !== array_keys(array_keys($value))) { // Is associative ?> - <ul> - <?php foreach ($value as $name2 => $value2): ?> - <li> - <b><?= $name2 ?></b>: <?php - - if (is_bool($value2)) { - echo($value2 ? "true" : "false"); - } else if (is_numeric($value2)) { - echo((string)$value2); - } else if (is_string($value2)) { - echo("\"$value2\""); - } else if (is_null($value2)) { - echo("null"); - } else if (is_array($value2)) { - echo("Array"); - } else { - var_dump($value2); - } - - ?> - </li> - <?php endforeach; ?> - </ul><?php - } else if (is_array($value) && array_keys($value) === array_keys(array_keys($value))) { // Is indexes ?> - <ul> - <?php foreach ($value as $value2): ?> - <li> - <?php - - if (is_bool($value2)) { - echo($value2 ? "true" : "false"); - } else if (is_numeric($value2)) { - echo((string)$value2); - } else if (is_string($value2)) { - echo("\"$value2\""); - } else if (is_null($value2)) { - echo("null"); - } else if (is_array($value2)) { - echo("Array"); - } else { - var_dump($value2); - } - - ?> - </li> - <?php endforeach; ?> - </ul><?php - } else if (is_array($value) && count($value) === 0) { - echo("[]"); - } else { - var_dump($value); - } - - ?> - </li> - <?php endforeach; ?> - </ul> - </li> - </ul> - </div> - </details> - <?php endif; ?> -</div> - -<?php require_once $_SERVER['DOCUMENT_ROOT'] . '/includes/components/footer.inc'; ?> |