Updated 104 files, added 3 files, deleted 4 files and renamed 36 files (automated)

mane
Mia Raindrops 1 week ago
parent 5385f0ed8f
commit eb89b15c0f
Signed by: Mia Raindrops
GPG Key ID: EFBDC68435A574B7

@ -2,9 +2,9 @@
ob_start();
require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/language.inc"; global $lang; global $pages;
require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/session.inc"; global $isLoggedIn; global $isLowerLoggedIn;
require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/functions.inc";
require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/util/language.inc"; global $lang; global $pages;
require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/util/session.inc"; global $isLoggedIn; global $isLowerLoggedIn;
require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/util/functions.inc";
$app = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/app.json"), true);
@ -84,8 +84,8 @@ if (in_array($toplevel, ["editor", "icons", "species", "uploads"])) {
require_once $_SERVER['DOCUMENT_ROOT'] . "/pages/page.inc";
} else {
global $toplevel;
$pageFile = $_SERVER['DOCUMENT_ROOT'] . "/includes/short.inc";
require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/short.inc";
$pageFile = $_SERVER['DOCUMENT_ROOT'] . "/includes/util/short.inc";
require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/util/short.inc";
}
}
}

@ -696,7 +696,7 @@ peh-muted {
}
@media (max-width: 991px) {
div#member-details.member-details-loggedIn {
div#member-details.member-details-loggedIn, div#member-details.member-details-loggedIn2 {
grid-template-columns: repeat(3, 1fr) !important;
text-align: center;
}
@ -708,7 +708,7 @@ peh-muted {
}
@media (max-width: 767px) {
div#member-details.member-details-loggedIn {
div#member-details.member-details-loggedIn, div#member-details.member-details-loggedIn2 {
grid-template-columns: repeat(2, 1fr) !important;
text-align: left;
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 31 KiB

After

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.6 KiB

After

Width:  |  Height:  |  Size: 5.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 38 KiB

After

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.5 KiB

After

Width:  |  Height:  |  Size: 5.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.1 KiB

After

Width:  |  Height:  |  Size: 900 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.7 KiB

After

Width:  |  Height:  |  Size: 884 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.8 KiB

After

Width:  |  Height:  |  Size: 682 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.6 KiB

After

Width:  |  Height:  |  Size: 715 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.4 KiB

After

Width:  |  Height:  |  Size: 842 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.3 KiB

After

Width:  |  Height:  |  Size: 708 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.6 KiB

After

Width:  |  Height:  |  Size: 738 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.4 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.1 KiB

After

Width:  |  Height:  |  Size: 723 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.7 KiB

After

Width:  |  Height:  |  Size: 743 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.4 KiB

After

Width:  |  Height:  |  Size: 705 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.2 KiB

After

Width:  |  Height:  |  Size: 728 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.5 KiB

After

Width:  |  Height:  |  Size: 619 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.8 KiB

After

Width:  |  Height:  |  Size: 894 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.6 KiB

After

Width:  |  Height:  |  Size: 782 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.2 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.2 KiB

After

Width:  |  Height:  |  Size: 848 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.1 KiB

After

Width:  |  Height:  |  Size: 828 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.0 KiB

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.0 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.1 KiB

After

Width:  |  Height:  |  Size: 816 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.5 KiB

After

Width:  |  Height:  |  Size: 682 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.4 KiB

After

Width:  |  Height:  |  Size: 945 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.4 KiB

After

Width:  |  Height:  |  Size: 818 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.5 KiB

After

Width:  |  Height:  |  Size: 672 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.5 KiB

After

Width:  |  Height:  |  Size: 794 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.3 KiB

After

Width:  |  Height:  |  Size: 943 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.6 KiB

After

Width:  |  Height:  |  Size: 771 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.5 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.5 KiB

After

Width:  |  Height:  |  Size: 974 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.9 KiB

After

Width:  |  Height:  |  Size: 824 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.3 KiB

After

Width:  |  Height:  |  Size: 754 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.5 KiB

After

Width:  |  Height:  |  Size: 778 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.4 KiB

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.9 KiB

After

Width:  |  Height:  |  Size: 821 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.9 KiB

After

Width:  |  Height:  |  Size: 757 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.7 KiB

After

Width:  |  Height:  |  Size: 809 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.0 KiB

After

Width:  |  Height:  |  Size: 794 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.1 KiB

After

Width:  |  Height:  |  Size: 809 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.1 KiB

After

Width:  |  Height:  |  Size: 755 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.6 KiB

After

Width:  |  Height:  |  Size: 728 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.9 KiB

After

Width:  |  Height:  |  Size: 829 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.9 KiB

After

Width:  |  Height:  |  Size: 840 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.5 KiB

After

Width:  |  Height:  |  Size: 955 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.9 KiB

After

Width:  |  Height:  |  Size: 655 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.9 KiB

After

Width:  |  Height:  |  Size: 675 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.1 KiB

After

Width:  |  Height:  |  Size: 690 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.6 KiB

After

Width:  |  Height:  |  Size: 735 B

@ -56,6 +56,12 @@ if (isset($result["access_token"])) {
header("Set-Cookie: PEH2_SESSION_TOKEN=" . $token . "; SameSite=None; Path=/; Secure; HttpOnly; Expires=" . date("r", time() + (86400 * 730)));
header("Location: /");
if (isset($_COOKIE["PEH2_RETURN_PAGE"])) {
header("Location: " . str_replace("\n", "", str_replace("\r", "", $_COOKIE["PEH2_RETURN_PAGE"])));
} else {
header("Location: /");
}
setcookie("PEH2_RETURN_PAGE", "");
die();
}

@ -1,5 +1,5 @@
<?php global $isLoggedIn; global $metadata; global $memberData; global $isLowerLoggedIn; global $systemID; global $app; global $lang; global $pages; $pronouns = getMemberPronouns($memberData['pronouns']); ?>
<div id="member-details" class="<?= (($isLoggedIn || $isLowerLoggedIn) && $systemID !== $app["other"]["id"]) ? 'member-details-loggedIn' : '' ?>" style="<?php if ((!$isLoggedIn && !$isLowerLoggedIn) || $systemID === $app["other"]["id"]): ?>grid-template-columns: repeat(4, 1fr);<?php endif; ?> background-color: <?= isset($memberData["color"]) ? '#' . $memberData["color"] . "33" : "transparent" ?>; margin-left: -20px; margin-right: -20px;">
<div id="member-details" class="<?= (($isLoggedIn || $isLowerLoggedIn) && $systemID !== $app["other"]["id"]) ? 'member-details-loggedIn' : 'member-details-loggedIn2' ?>" style="<?php if (!$isLoggedIn && !$isLowerLoggedIn): ?>grid-template-columns: repeat(4, 1fr);<?php endif; ?> background-color: <?= isset($memberData["color"]) ? '#' . $memberData["color"] . "33" : "transparent" ?>; margin-left: -20px; margin-right: -20px;">
<div>
<b><?= $lang["details"]["food"] ?></b><span class="member-small-separator"><br></span>
<?= match ($metadata["food"]) {
@ -17,7 +17,6 @@
2 => "<span data-bs-toggle='tooltip' title='" . str_replace("'", "&apos;", ucfirst($pronouns["subjective"])) . ($pronouns["third"] ? " shares" : " share") . " all memories with " . str_replace("'", "&apos;", $pronouns["possessive_det"]) . " headmates.'>" . $lang["details"]["memory_states"][2] . "</span>",
} ?>
</div>
<?php if ($systemID !== $app["other"]["id"]): ?>
<?php if ($isLoggedIn || $isLowerLoggedIn): ?>
<div>
<b>Age:</b><span class="member-small-separator"><br></span>
@ -56,6 +55,7 @@
<?php endif; ?>
</div>
<?php endif; ?>
<?php if ($systemID !== $app["other"]["id"]): ?>
<div>
<b><?= $lang["details"]["code"] ?></b><span class="member-small-separator"><br></span>
<?php if (isset($metadata["code"]) && trim($metadata["code"]) !== ""): ?>

@ -1,7 +1,7 @@
<?php
global $pageFile;
require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/functions.inc";
require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/util/functions.inc";
?>
@ -36,7 +36,7 @@ require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/functions.inc";
})
</script>
<?php require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/search.inc"; ?>
<?php require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/components/search.inc"; ?>
</body>
</html>

@ -5,7 +5,7 @@
<?php if ($memberData["name"] !== "unknown" && $memberData["name"] !== "fusion"): ?>
<div id="member-banner-container">
<div id="member-banner"></div>
<?php require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/details.inc"; ?>
<?php require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/components/details.inc"; ?>
</div>
<?php else: ?>
<div id="member-banner"></div>

@ -12,7 +12,7 @@ if (file_exists($_SERVER['DOCUMENT_ROOT'] . "/includes/data/.test")) {
$isNormallyLoggedIn = false;
require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/session.inc"; global $isLoggedIn; global $isUserLoggedIn; global $isLowerLoggedIn;
require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/util/session.inc"; global $isLoggedIn; global $isUserLoggedIn; global $isLowerLoggedIn;
if ($readOnly && $isLoggedIn || $readOnly && $isUserLoggedIn) {
$isLoggedIn = false;
$isUserLoggedIn = false;
@ -49,13 +49,13 @@ $page = $pages[$toplevel] ?? [
"rail" => false
];
require_once $_SERVER["DOCUMENT_ROOT"] . "/includes/travelling.inc"; global $travelling;
require_once $_SERVER["DOCUMENT_ROOT"] . "/includes/score.inc";
require_once $_SERVER["DOCUMENT_ROOT"] . "/includes/pronouns.inc";
require_once $_SERVER["DOCUMENT_ROOT"] . "/includes/bitset.inc";
require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/banner.inc";
require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/rainbow.inc";
require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/functions.inc";
require_once $_SERVER["DOCUMENT_ROOT"] . "/includes/util/travelling.inc"; global $travelling;
require_once $_SERVER["DOCUMENT_ROOT"] . "/includes/util/score.inc";
require_once $_SERVER["DOCUMENT_ROOT"] . "/includes/util/pronouns.inc";
require_once $_SERVER["DOCUMENT_ROOT"] . "/includes/util/bitset.inc";
require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/util/banner.inc";
require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/util/rainbow.inc";
require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/util/functions.inc";
?>
<!doctype html>
@ -70,7 +70,7 @@ require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/functions.inc";
<link rel="shortcut icon" href="/assets/logo/newlogo<?= $isLoggedIn || $isLowerLoggedIn ? "3" : "" ?>.png" type="image/png">
</head>
<body<?php if ($page["rail"] && $isLoggedIn && !$useNewUI): ?> id="admin-page"<?php endif; ?>>
<?php require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/navigation.inc"; global $navigation; ?>
<?php require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/components/navigation.inc"; global $navigation; ?>
<?php if (!$useNewUI): ?>
<div style="margin-top: 60px;" id="top-of-page"></div>
@ -78,16 +78,10 @@ require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/functions.inc";
<?php if ($useNewUI): ?>
<aside id="navigation-pane">
<?php require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/pane.inc"; ?>
<?php require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/components/pane.inc"; ?>
</aside>
<div id="title-bar">
<?php require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/titlebar.inc"; ?>
</div>
<?php require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/mobilenav.inc"; ?>
<div id="titlebar-separator" style="margin-top: 34px;"></div>
<?php require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/components/mobilenav.inc"; ?>
<style>
body {
@ -95,7 +89,6 @@ require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/functions.inc";
}
.modal.show {
top: 34px;
left: 300px;
width: calc(100% - 300px);
}
@ -225,7 +218,3 @@ require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/functions.inc";
}
</style>
<?php endif; ?>
<?php if ($page["rail"] && $isLoggedIn && !$useNewUI): ?>
<?php require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/rail.inc"; ?>
<?php endif; ?>

@ -8,7 +8,7 @@
</a>
<?php foreach ($navigation as $id => $item): if (!$item["admin"] || $isLoggedIn): ?>
<a onclick="toggleMobileNavigation('<?= $id ?>');" title="<?= $item["name"] ?>" data-bs-toggle="tooltip" id="mobile-navigation-item-<?= $id ?>" class="tooltip-nohelp mobile-navigation-item">
<img src="<?= $item["icon"] ?>" <?php if ($item["invert"]): ?>class="dropdown-icon"<?php endif; ?> alt="" style="width:24px;vertical-align: middle;">
<img src="<?= $item["icon"] ?>" <?php if ($item["invert"]): ?>class="dropdown-icon"<?php endif; ?> alt="" style="width:24px;vertical-align: middle;border-radius:3px;">
</a>
<?php endif; endforeach; ?>
</div>

@ -38,14 +38,6 @@ $navigation_admin = [
"name" => $lang["navigation"]["apps"],
"minimal" => false,
"items" => [
[
"name" => $pages["about"]["name"][$lang["_name"]],
"icon" => "/assets/icons/about.svg",
"invert" => true,
"link" => "/-/about",
"stepped" => null,
"private" => false
],
[
"name" => $pages["fronting"]["name"][$lang["_name"]],
"icon" => "/assets/icons/fronting.svg",
@ -233,7 +225,7 @@ $navigation_global = [
]
];
$navigation_cloudburst = [
"admin" => $_SERVER['HTTP_HOST'] === "fr.equestria.horse",
"admin" => false,
"name" => "Cloudburst System",
"icon" => getAsset("ynmuc"),
"invert" => false,

@ -37,7 +37,7 @@ foreach ($list as $color) {
<div class="pane-group" id="pane-group-<?= $id ?>">
<div class="pane-group-title">
<img src="<?= $item["icon"] ?>" <?php if ($item["invert"]): ?>class="dropdown-icon"<?php endif; ?> alt="" style="width:24px;vertical-align: middle;">
<img src="<?= $item["icon"] ?>" <?php if ($item["invert"]): ?>class="dropdown-icon"<?php endif; ?> alt="" style=" border-radius: 2px;width:24px;vertical-align: middle;">
<span style="vertical-align: middle;"><?= $item["name"] ?></span>
</div>

@ -1,13 +1,13 @@
<?php
require_once $_SERVER["DOCUMENT_ROOT"] . "/includes/travelling.inc"; global $travelling;
require_once $_SERVER["DOCUMENT_ROOT"] . "/includes/score.inc";
require_once $_SERVER["DOCUMENT_ROOT"] . "/includes/pronouns.inc";
require_once $_SERVER["DOCUMENT_ROOT"] . "/includes/bitset.inc";
require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/session.inc"; global $isLoggedIn; global $isUserLoggedIn; global $isLowerLoggedIn;
require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/banner.inc";
require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/rainbow.inc";
require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/functions.inc";
require_once $_SERVER["DOCUMENT_ROOT"] . "/includes/util/travelling.inc"; global $travelling;
require_once $_SERVER["DOCUMENT_ROOT"] . "/includes/util/score.inc";
require_once $_SERVER["DOCUMENT_ROOT"] . "/includes/util/pronouns.inc";
require_once $_SERVER["DOCUMENT_ROOT"] . "/includes/util/bitset.inc";
require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/util/session.inc"; global $isLoggedIn; global $isUserLoggedIn; global $isLowerLoggedIn;
require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/util/banner.inc";
require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/util/rainbow.inc";
require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/util/functions.inc";
global $_PROFILE;
$cloudburst = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/planner/ynmuc.json"), true);

@ -15,7 +15,7 @@ $pages = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/pa
<div id="system-info" style="display:grid;grid-template-columns: 128px 1fr;background-color:rgba(255, 255, 255, .05);margin-left: -20px; margin-right: -20px;margin-top:-20px;padding: 20px 20px 10px;">
<div style="display: flex; align-items: center; justify-content: center;">
<img src="<?= getAsset($systemID) ?>" alt="" style="width:128px;max-height:128px;border-top-left-radius:10px;border-bottom-left-radius:10px;">
<img src="<?= getAsset($systemID) ?>" alt="" style="width:128px;max-height:128px;border-radius:10px;">
</div>
<div style="padding:10px 10px 10px 20px;text-align:center;">
<div style="display: grid; grid-template-columns: 1fr;height:100%;grid-template-rows: max-content max-content 1fr;">

@ -1,4 +1,4 @@
<?php global $system; global $systemCommonName; global $systemID; global $member; global $memberData; global $memberCommonName; global $memberID; $title = "Editing " . $memberCommonName . " (private page) · " . $systemCommonName; require_once $_SERVER['DOCUMENT_ROOT'] . '/includes/header.inc';
<?php global $system; global $systemCommonName; global $systemID; global $member; global $memberData; global $memberCommonName; global $memberID; $title = "Editing " . $memberCommonName . " (private page) · " . $systemCommonName; require_once $_SERVER['DOCUMENT_ROOT'] . '/includes/components/header.inc';
if (file_exists($_SERVER['DOCUMENT_ROOT'] . "/includes/data/metadata/" . $memberID . ".json")) {
$metadata = parseMetadata(json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/metadata/" . $memberID . ".json"), true));
@ -8,7 +8,7 @@ if (file_exists($_SERVER['DOCUMENT_ROOT'] . "/includes/data/metadata/" . $member
<br>
<div class="container">
<?php require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/fullbanner.inc"; ?>
<?php require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/components/fullbanner.inc"; ?>
<p class="text-muted" id="page-content">
<span id="editor-save-status" class="text-muted">Saved</span> · <span id="editor-size"><?= file_exists($_SERVER['DOCUMENT_ROOT'] . "/includes/data/content/$memberID-private.html") ? strlen(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/content/$memberID-private.html")) : "0" ?></span> bytes · <a href="/<?= $memberData["name"] ?>">View page</a>
@ -139,4 +139,4 @@ if (file_exists($_SERVER['DOCUMENT_ROOT'] . "/includes/data/metadata/" . $member
</script>
</div>
<?php require_once $_SERVER['DOCUMENT_ROOT'] . '/includes/footer.inc'; ?>
<?php require_once $_SERVER['DOCUMENT_ROOT'] . '/includes/components/footer.inc'; ?>

@ -1,4 +1,4 @@
<?php global $system; global $systemCommonName; global $systemID; global $member; global $memberData; global $memberCommonName; global $memberID; $title = "Editing " . $memberCommonName . " (public page) · " . $systemCommonName; require_once $_SERVER['DOCUMENT_ROOT'] . '/includes/header.inc';
<?php global $system; global $systemCommonName; global $systemID; global $member; global $memberData; global $memberCommonName; global $memberID; $title = "Editing " . $memberCommonName . " (public page) · " . $systemCommonName; require_once $_SERVER['DOCUMENT_ROOT'] . '/includes/components/header.inc';
if (file_exists($_SERVER['DOCUMENT_ROOT'] . "/includes/data/metadata/" . $memberID . ".json")) {
$metadata = parseMetadata(json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/metadata/" . $memberID . ".json"), true));
@ -8,7 +8,7 @@ if (file_exists($_SERVER['DOCUMENT_ROOT'] . "/includes/data/metadata/" . $member
<br>
<div class="container">
<?php require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/fullbanner.inc"; ?>
<?php require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/components/fullbanner.inc"; ?>
<p class="text-muted" id="page-content">
<span id="editor-save-status" class="text-muted">Saved</span> · <span id="editor-size"><?= file_exists($_SERVER['DOCUMENT_ROOT'] . "/includes/data/content/$memberID-private.html") ? strlen(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/content/$memberID-private.html")) : "0" ?></span> bytes · <a href="/<?= $memberData["name"] ?>">View page</a>
@ -139,4 +139,4 @@ if (file_exists($_SERVER['DOCUMENT_ROOT'] . "/includes/data/metadata/" . $member
</script>
</div>
<?php require_once $_SERVER['DOCUMENT_ROOT'] . '/includes/footer.inc'; ?>
<?php require_once $_SERVER['DOCUMENT_ROOT'] . '/includes/components/footer.inc'; ?>

@ -6,7 +6,7 @@ if ($memberData["name"] === "fusion") {
$title = $memberCommonName . " · " . $systemCommonName;
}
require_once $_SERVER['DOCUMENT_ROOT'] . '/includes/header.inc';
require_once $_SERVER['DOCUMENT_ROOT'] . '/includes/components/header.inc';
$travelling = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/travelling/travelling.json"), true);
@ -53,7 +53,7 @@ if ($memberData["name"] === "fusion") {
<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(10px); -webkit-backdrop-filter: blur(10px);margin-top:<?= !isset($memberData["banner"]) ? "15vh" : "30vh" ?>;<?php if (!file_exists($_SERVER['DOCUMENT_ROOT'] . "/includes/data/content/$memberID.html") && !($isLoggedIn && file_exists($_SERVER['DOCUMENT_ROOT'] . "/includes/data/content/$memberID-private.html"))): ?> padding-bottom: 0 !important;<?php endif; ?>">
<?php require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/fullbanner.inc"; ?>
<?php require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/components/fullbanner.inc"; ?>
<div id="page-content">
<?php if ($memberData["name"] === "unknown"): ?>
@ -98,7 +98,7 @@ if ($memberData["name"] === "fusion") {
</div>
<div class="container">
<?php global $isLoggedIn; if ($isLoggedIn): ?>
<?php global $isLoggedIn; global $isLowerLoggedIn; if ($isLoggedIn || ($isLowerLoggedIn && $systemID === $app["other"]["id"])): ?>
<hr>
<details>
@ -137,7 +137,7 @@ if ($memberData["name"] === "fusion") {
<li><b>Protector:</b> <code><?= $metadata["protector"] ? "1" : "0" ?></code> (<?= $metadata["protector"] ? "Yes" : "No" ?>)</li>
<li><b>Little:</b> <code><?= $metadata["little"] ?></code> (<?= $metadata["little"] === 2 ? "Is a little" : ($metadata["little"] === 1 ? "Is an age regressor" : ($metadata["little"] === 3 ? "Not a little, but younger" : "No")) ?>)</li>
<li><b>Relations count:</b> <code><?= count($metadata["marefriends"]) + count($metadata["sisters"]) ?></code></li>
<?php require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/score.inc"; ?>
<?php require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/util/score.inc"; ?>
<li>
<b>Score breakdown:</b> <code>-</code>
<ul><li>-</ul></li>
@ -147,4 +147,4 @@ if ($memberData["name"] === "fusion") {
<?php endif; ?>
</div>
<?php require_once $_SERVER['DOCUMENT_ROOT'] . '/includes/footer.inc'; ?>
<?php require_once $_SERVER['DOCUMENT_ROOT'] . '/includes/components/footer.inc'; ?>

@ -1,4 +1,4 @@
<?php global $system; global $app; global $systemCommonName; global $systemID; global $member; global $memberData; global $memberCommonName; global $memberID; $title = "Editing metadata for " . $memberCommonName . " · " . $systemCommonName; require_once $_SERVER['DOCUMENT_ROOT'] . '/includes/header.inc';
<?php global $system; global $app; global $systemCommonName; global $systemID; global $member; global $memberData; global $memberCommonName; global $memberID; $title = "Editing metadata for " . $memberCommonName . " · " . $systemCommonName; require_once $_SERVER['DOCUMENT_ROOT'] . '/includes/components/header.inc';
if (file_exists($_SERVER['DOCUMENT_ROOT'] . "/includes/data/metadata/" . $memberID . ".json")) {
$metadata = parseMetadata(json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/metadata/" . $memberID . ".json"), true));
@ -120,6 +120,7 @@ if (file_exists($_SERVER['DOCUMENT_ROOT'] . "/includes/data/metadata/" . $member
<b>Member code</b><br>
<input name="membc" class="form-control" style="filter: invert(1) hue-rotate(180deg);" type="text" value="<?= $metadata["code"] ?? "" ?>">
</p>
<?php endif; ?>
<hr>
@ -133,7 +134,6 @@ if (file_exists($_SERVER['DOCUMENT_ROOT'] . "/includes/data/metadata/" . $member
<b>Age (for ponies with fixed age)</b><br>
<input name="age" class="form-control" style="filter: invert(1) hue-rotate(180deg);" type="text" pattern="^\d{1,2}(-\d{1,2}|)$" value="<?= $metadata["birth"]["age"] ?? "" ?>">
</p>
<?php endif; ?>
<hr>
@ -166,4 +166,4 @@ if (file_exists($_SERVER['DOCUMENT_ROOT'] . "/includes/data/metadata/" . $member
<?php endif; ?>
</div>
<?php require_once $_SERVER['DOCUMENT_ROOT'] . '/includes/footer.inc'; ?>
<?php require_once $_SERVER['DOCUMENT_ROOT'] . '/includes/components/footer.inc'; ?>

@ -1,4 +1,4 @@
<?php global $system; global $systemCommonName; global $systemID; $title = "Editing " . $systemCommonName; require_once $_SERVER['DOCUMENT_ROOT'] . '/includes/header.inc';
<?php global $system; global $systemCommonName; global $systemID; $title = "Editing " . $systemCommonName; require_once $_SERVER['DOCUMENT_ROOT'] . '/includes/components/header.inc';
?>
@ -11,7 +11,7 @@
<div class="container">
<div id="system-page" style="background-color: rgba(26,26,26,0.8);border-radius: 10px;padding:20px; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);margin-top:30vh;">
<?php require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/sysbanner.inc"; ?>
<?php require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/components/sysbanner.inc"; ?>
<br>
<p class="text-muted">
@ -147,7 +147,7 @@
</script>
</div>
</div>
<?php require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/sysbanner.inc"; ?>
<?php require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/components/sysbanner.inc"; ?>
</div>
<?php require_once $_SERVER['DOCUMENT_ROOT'] . '/includes/footer.inc'; ?>
<?php require_once $_SERVER['DOCUMENT_ROOT'] . '/includes/components/footer.inc'; ?>

@ -1,4 +1,4 @@
<?php global $system; global $isLowerLoggedIn; global $systemCommonName; global $systemID; $title = $systemCommonName; require_once $_SERVER['DOCUMENT_ROOT'] . '/includes/header.inc'; global $app; global $isLoggedIn;
<?php global $system; global $isLowerLoggedIn; global $systemCommonName; global $systemID; $title = $systemCommonName; require_once $_SERVER['DOCUMENT_ROOT'] . '/includes/components/header.inc'; global $app; global $isLoggedIn;
?>
@ -16,7 +16,7 @@
<div class="container">
<div id="system-page" style="background-color: rgba(26,26,26,0.8);border-radius: 10px;padding:20px; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);margin-top:30vh;">
<?php require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/sysbanner.inc"; ?>
<?php require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/components/sysbanner.inc"; ?>
<br>
<div id="page-content">
@ -49,4 +49,4 @@
}
</style>
<?php require_once $_SERVER['DOCUMENT_ROOT'] . '/includes/footer.inc'; ?>
<?php require_once $_SERVER['DOCUMENT_ROOT'] . '/includes/components/footer.inc'; ?>

@ -7,7 +7,7 @@ global $pages;
global $lang; global $pages;
$pages = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/pages.json"), true);
require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/session.inc"; global $isLoggedIn; global $isLowerLoggedIn;
require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/util/session.inc"; global $isLoggedIn; global $isLowerLoggedIn;
if (in_array($toplevel, array_keys($pages))) {
$title = $pages[$toplevel]["name"][$lang["_name"]];
@ -23,9 +23,9 @@ if (in_array($toplevel, array_keys($pages))) {
}
if ($pages[$toplevel]["limited"]) {
if ((!$isLoggedIn && !$isLowerLoggedIn) || ($readOnly && !$emergencyHeader)) header("Location: /-/login/?return=$toplevel") and die();
if ((!$isLoggedIn && !$isLowerLoggedIn) || ($readOnly && !$emergencyHeader)) header("Location: /-/login/?return=/-/$toplevel") and die();
} else {
if (!$isLoggedIn || ($readOnly && !$emergencyHeader)) header("Location: /-/login/?return=$toplevel") and die();
if (!$isLoggedIn || ($readOnly && !$emergencyHeader)) header("Location: /-/login/?return=/-/$toplevel") and die();
}
}
} else {

@ -1,10 +0,0 @@
<?php
$default = "en";
$lf = $_COOKIE['PEH2_LANGUAGE'] ?? $default;
if (str_contains("/", $lf)) $lf = "en";
if (!file_exists($_SERVER['DOCUMENT_ROOT'] . "/includes/i18n/" . $lf . ".json")) $lf = "en";
$lang = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/i18n/" . $lf . ".json"), true);

@ -206,7 +206,7 @@
},
"short": "Metadata",
"admin": true,
"limited": false,
"limited": true,
"rail": false
},
"money": {

@ -1,167 +0,0 @@
<?php global $pages; ?>
<div id="rail" style="position: fixed;top: 60px;left: 0;bottom: 0;background: rgba(255, 255, 255, .1);width: 32px; display: grid; grid-template-rows: max-content 1fr;">
<div>
<a id="rl-1" class="rail-link" href="/-/dashboard" style="padding: 4px; display: block;">
<img alt="" src="/assets/icons/home.svg" style="filter: invert(1); height: 24px; display:block;">
</a>
<a id="rl-2" class="rail-link" href="/-/fronting" style="padding: 4px; display: block;">
<img alt="" src="/assets/icons/fronting.svg" style="filter: invert(1); height: 24px; display:block;">
</a>
<a id="rl-3" class="rail-link" href="/-/actions" style="padding: 4px; display: block;">
<img alt="" src="/assets/icons/actions.svg" style="filter: invert(1); height: 24px; display:block;">
</a>
<a id="rl-4" class="rail-link" href="/-/rules" style="padding: 4px; display: block;">
<img alt="" src="/assets/icons/rules.svg" style="filter: invert(1); height: 24px; display:block;">
</a>
<a id="rl-5" class="rail-link" href="/-/docs" style="padding: 4px; display: block;">
<img alt="" src="/assets/icons/docs.svg" style="filter: invert(1); height: 24px; display:block;">
</a>
<a id="rl-6" class="rail-link" href="/-/nicknames" style="padding: 4px; display: block;">
<img alt="" src="/assets/icons/nicknames.svg" style="filter: invert(1); height: 24px; display:block;">
</a>
<a id="rl-7" class="rail-link" href="/-/together" style="padding: 4px; display: block;">
<img alt="" src="/assets/icons/together.svg" style="filter: invert(1); height: 24px; display:block;">
</a>
<a id="rl-8" class="rail-link" href="/-/splitting" style="padding: 4px; display: block;">
<img alt="" src="/assets/icons/splitting.svg" style="filter: invert(1); height: 24px; display:block;">
</a>
<a id="rl-9" class="rail-link" href="/-/byfront" style="padding: 4px; display: block;">
<img alt="" src="/assets/icons/byfront.svg" style="filter: invert(1); height: 24px; display:block;">
</a>
<a id="rl-10" class="rail-link" href="/-/bitset" style="padding: 4px; display: block;">
<img alt="" src="/assets/icons/bitset.svg" style="filter: invert(1); height: 24px; display:block;">
</a>
<a id="rl-11" class="rail-link" href="/-/travelling" style="padding: 4px; display: block;">
<img alt="" src="/assets/icons/travelling.svg" style="filter: invert(1); height: 24px; display:block;">
</a>
<a id="rl-12" class="rail-link" href="/-/toys" style="padding: 4px; display: block;">
<img alt="" src="/assets/icons/toys.svg" style="filter: invert(1); height: 24px; display:block;">
</a>
<a id="rl-16" class="rail-link" href="/-/stats" style="padding: 4px; display: block;">
<img alt="" src="/assets/icons/stats.svg" style="filter: invert(1) brightness(2000%); height: 24px; display:block;">
</a>
<a id="rl-87" class="rail-link" href="/-/emergency" style="padding: 4px; display: block;">
<img alt="" src="/assets/icons/emergency.svg" style="height: 24px; display:block;">
</a>
<a id="rl-88" class="rail-link" href="/-/wakeup" style="padding: 4px; display: block;">
<img alt="" src="/assets/icons/wakeup.svg" style="height: 24px; display:block;">
</a>
<a id="rl-89" class="rail-link" href="/-/pleasure" style="padding: 4px; display: block;">
<img alt="" src="/assets/icons/pleasure.svg" style="height: 24px; display:block;">
</a>
</div>
<div style="margin-top: auto; height: max-content;">
<a id="rl-98" class="rail-link" href="/-/debug" style="padding: 4px; display: block;">
<img alt="" src="/assets/icons/debug.svg" style="filter: invert(1); height: 24px; display:block;">
</a>
<a id="rl-99" class="rail-link" href="/-/about" style="padding: 4px; display: block;">
<img alt="" src="/assets/icons/about.svg" style="filter: invert(1) brightness(2000%); height: 24px; display:block;">
</a>
</div>
</div>
<div id="rail-text" style="position: fixed;top: 60px;left: 32px;bottom: 0; z-index: 9999999; opacity: 0; pointer-events: none; display: grid; grid-template-rows: max-content 1fr;">
<div>
<div id="rlt-1" class="rail-text-item" style="height: 32px; display: flex; align-items: center; padding-left: 10px; opacity: 0;">
<?= $pages["dashboard"]["name"] ?>
</div>
<div id="rlt-2" class="rail-text-item" style="height: 32px; display: flex; align-items: center; padding-left: 10px; opacity: 0;">
<?= $pages["fronting"]["name"] ?>
</div>
<div id="rlt-3" class="rail-text-item" style="height: 32px; display: flex; align-items: center; padding-left: 10px; opacity: 0;">
<?= $pages["actions"]["name"] ?>
</div>
<div id="rlt-4" class="rail-text-item" style="height: 32px; display: flex; align-items: center; padding-left: 10px; opacity: 0;">
<?= $pages["rules"]["name"] ?>
</div>
<div id="rlt-5" class="rail-text-item" style="height: 32px; display: flex; align-items: center; padding-left: 10px; opacity: 0;">
<?= $pages["docs"]["name"] ?>
</div>
<div id="rlt-6" class="rail-text-item" style="height: 32px; display: flex; align-items: center; padding-left: 10px; opacity: 0;">
<?= $pages["nicknames"]["name"] ?>
</div>
<div id="rlt-7" class="rail-text-item" style="height: 32px; display: flex; align-items: center; padding-left: 10px; opacity: 0;">
<?= $pages["together"]["name"] ?>
</div>
<div id="rlt-8" class="rail-text-item" style="height: 32px; display: flex; align-items: center; padding-left: 10px; opacity: 0;">
<?= $pages["splitting"]["name"] ?>
</div>
<div id="rlt-9" class="rail-text-item" style="height: 32px; display: flex; align-items: center; padding-left: 10px; opacity: 0;">
<?= $pages["byfront"]["name"] ?>
</div>
<div id="rlt-10" class="rail-text-item" style="height: 32px; display: flex; align-items: center; padding-left: 10px; opacity: 0;">
<?= $pages["bitset"]["name"] ?>
</div>
<div id="rlt-11" class="rail-text-item" style="height: 32px; display: flex; align-items: center; padding-left: 10px; opacity: 0;">
<?= $pages["travelling"]["name"] ?>
</div>
<div id="rlt-12" class="rail-text-item" style="height: 32px; display: flex; align-items: center; padding-left: 10px; opacity: 0;">
<?= $pages["toys"]["name"] ?>
</div>
<div id="rlt-16" class="rail-text-item" style="height: 32px; display: flex; align-items: center; padding-left: 10px; opacity: 0;">
<?= $pages["stats"]["name"] ?>
</div>
<div id="rlt-87" class="rail-text-item text-danger fw-bold" style="height: 32px; display: flex; align-items: center; padding-left: 10px; opacity: 0;">
<?= $pages["emergency"]["name"] ?>
</div>
<div id="rlt-88" class="rail-text-item text-info fw-bold" style="height: 32px; display: flex; align-items: center; padding-left: 10px; opacity: 0;">
<?= $pages["wakeup"]["name"] ?>
</div>
<div id="rlt-89" class="rail-text-item text-success fw-bold" style="height: 32px; display: flex; align-items: center; padding-left: 10px; opacity: 0;">
<?= $pages["pleasure"]["name"] ?>
</div>
</div>
<div style="margin-top: auto; height: max-content;">
<div id="rlt-98" class="rail-text-item" style="height: 32px; display: flex; align-items: center; padding-left: 10px; opacity: 0;">
<?= $pages["debug"]["name"] ?>
</div>
<div id="rlt-99" class="rail-text-item" style="height: 32px; display: flex; align-items: center; padding-left: 10px; opacity: 0;">
<?= $pages["about"]["name"] ?>
</div>
</div>
</div>
<style>
.rail-link:hover {
background: rgba(255, 255, 255, .1);
border-top: 1px solid #555;
border-bottom: 1px solid #555;
padding: 3px 4px !important;
}
.rail-text-item {
border: 1px solid #555;
border-left: none;
padding-right: 10px;
border-top-right-radius: 999px;
border-bottom-right-radius: 999px;
width: 0;
}
.rail-text-item.hovered {
background: #313131;
opacity: 1 !important;
width: max-content !important;
}
</style>
<script>
Array.from(document.getElementsByClassName("rail-link")).forEach((i) => {
let rt = document.getElementById("rlt-" + i.id.split("-")[1]);
i.onmouseenter = () => {
rt.classList.add("hovered");
}
i.onmouseleave = () => {
rt.classList.remove("hovered");
}
})
document.getElementById("rail").onmouseenter = () => {
document.getElementById("rail-text").style.opacity = "1";
}
document.getElementById("rail").onmouseleave = () => {
document.getElementById("rail-text").style.opacity = "0";
}
</script>

@ -43,7 +43,7 @@ foreach ($deletable as $item) {
}
$times["docs_cleanup"] = microtime(true) - $currentOpStart;
require_once "./cleanup.inc";
require_once "./refresh/cleanup.inc";
$currentOpStart = microtime(true);
$version = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/version.json"), true);
@ -250,7 +250,7 @@ echo("Backing up...\n");
$lastBackup = (int)trim(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/backup.txt"));
if (time() - $lastBackup >= 3600) {
require_once "./backup.inc";
require_once "./refresh/backup.inc";
file_put_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/backup.txt", time());
echo("Backup completed\n");
} else {
@ -260,7 +260,7 @@ if (time() - $lastBackup >= 3600) {
echo("Generating logo...\n");
$currentOpStart = microtime(true);
require_once "./logo.inc";
require_once "./refresh/logo.inc";
$times["logo"] = microtime(true) - $currentOpStart;
echo("Generated logo\n");
@ -279,7 +279,7 @@ echo("Fetched school information\n");
echo("Downloading assets...\n");
$currentOpStart = microtime(true);
require_once "./assets.inc";
require_once "./refresh/assets.inc";
$times["assets"] = microtime(true) - $currentOpStart;
echo("Downloading assets\n");

@ -2,10 +2,10 @@
global $app;
if (!file_exists("../assets/avatars")) mkdir("../assets/avatars");
if (!file_exists("../assets/banners")) mkdir("../assets/banners");
if (!file_exists("../assets/heads")) mkdir("../assets/heads");
if (!file_exists("../assets/bodies")) mkdir("../assets/bodies");
if (!file_exists("" . $_SERVER['DOCUMENT_ROOT'] . "/assets/avatars")) mkdir("" . $_SERVER['DOCUMENT_ROOT'] . "/assets/avatars");
if (!file_exists("" . $_SERVER['DOCUMENT_ROOT'] . "/assets/banners")) mkdir("" . $_SERVER['DOCUMENT_ROOT'] . "/assets/banners");
if (!file_exists("" . $_SERVER['DOCUMENT_ROOT'] . "/assets/heads")) mkdir("" . $_SERVER['DOCUMENT_ROOT'] . "/assets/heads");
if (!file_exists("" . $_SERVER['DOCUMENT_ROOT'] . "/assets/bodies")) mkdir("" . $_SERVER['DOCUMENT_ROOT'] . "/assets/bodies");
function downloadAssets($system, $path = null) {
if (!isset($path)) {
@ -18,7 +18,7 @@ function downloadAssets($system, $path = null) {
$id = preg_replace("/^([\da-f]{8})-([\da-f]{4})-([\da-f]{4})-([\da-f]{4})-([\da-f]{12})$/", "$1$2$3$4$5", $general["uuid"]);
echo(" /avatars/$id.webp\n");
file_put_contents("/tmp/img." . pathinfo($general['avatar_url'], PATHINFO_EXTENSION), file_get_contents($general['avatar_url']));
exec("convert -resize 512x512 \"" . "/tmp/img." . pathinfo($general['avatar_url'], PATHINFO_EXTENSION) . "\" ../assets/avatars/" . $id . ".webp");
exec("convert -resize 512x512 \"" . "/tmp/img." . pathinfo($general['avatar_url'], PATHINFO_EXTENSION) . "\" " . $_SERVER['DOCUMENT_ROOT'] . "/assets/avatars/" . $id . ".webp");
unlink("/tmp/img." . pathinfo($general['avatar_url'], PATHINFO_EXTENSION));
}
@ -26,7 +26,7 @@ function downloadAssets($system, $path = null) {
$id = preg_replace("/^([\da-f]{8})-([\da-f]{4})-([\da-f]{4})-([\da-f]{4})-([\da-f]{12})$/", "$1$2$3$4$5", $general["uuid"]);
echo(" /banners/$id.webp\n");
file_put_contents("/tmp/img." . pathinfo($general['banner'], PATHINFO_EXTENSION), file_get_contents($general['banner']));
exec("convert -resize 2048x2048 \"" . "/tmp/img." . pathinfo($general['banner'], PATHINFO_EXTENSION) ."\" ../assets/banners/" . $id . ".webp");
exec("convert -resize 2048x2048 \"" . "/tmp/img." . pathinfo($general['banner'], PATHINFO_EXTENSION) ."\" " . $_SERVER['DOCUMENT_ROOT'] . "/assets/banners/" . $id . ".webp");
unlink("/tmp/img." . pathinfo($general['banner'], PATHINFO_EXTENSION));
}
@ -38,7 +38,7 @@ function downloadAssets($system, $path = null) {
if (isset($member["avatar_url"])) {
echo(" /avatars/$id.webp\n");
file_put_contents("/tmp/img." . pathinfo($member['avatar_url'], PATHINFO_EXTENSION), file_get_contents($member['avatar_url']));
exec("convert -resize 512x512 \"" . "/tmp/img." . pathinfo($member['avatar_url'], PATHINFO_EXTENSION) . "\" ../assets/avatars/" . $id . ".webp");
exec("convert -resize 512x512 \"" . "/tmp/img." . pathinfo($member['avatar_url'], PATHINFO_EXTENSION) . "\" " . $_SERVER['DOCUMENT_ROOT'] . "/assets/avatars/" . $id . ".webp");
unlink("/tmp/img." . pathinfo($member['avatar_url'], PATHINFO_EXTENSION));
}
@ -46,7 +46,7 @@ function downloadAssets($system, $path = null) {
if (isset($member["banner"])) {
file_put_contents("/tmp/img." . pathinfo($member['banner'], PATHINFO_EXTENSION), file_get_contents($member['banner']));
exec("convert -resize 2048x2048 \"" . "/tmp/img." . pathinfo($member['banner'], PATHINFO_EXTENSION) . "\" ../assets/banners/" . $id . ".webp");
exec("convert -resize 2048x2048 \"" . "/tmp/img." . pathinfo($member['banner'], PATHINFO_EXTENSION) . "\" " . $_SERVER['DOCUMENT_ROOT'] . "/assets/banners/" . $id . ".webp");
unlink("/tmp/img." . pathinfo($member['banner'], PATHINFO_EXTENSION));
} else {
$img = imagecreate(2048, 1024);
@ -59,21 +59,21 @@ function downloadAssets($system, $path = null) {
imagejpeg($img, "/tmp/img.jpeg", 100);
imagedestroy($img);
exec("convert -resize 2048x2048 \"/tmp/img.jpeg\" ../assets/banners/" . $id . ".webp");
exec("convert -resize 2048x2048 \"/tmp/img.jpeg\" " . $_SERVER['DOCUMENT_ROOT'] . "/assets/banners/" . $id . ".webp");
unlink("/tmp/img.jpeg");
}
if (file_exists("../assets/uploads/pt-" . $member["name"] . ".png")) {
$url = "../assets/uploads/pt-" . $member["name"] . ".png";
if (file_exists("" . $_SERVER['DOCUMENT_ROOT'] . "/assets/uploads/pt-" . $member["name"] . ".png")) {
$url = "" . $_SERVER['DOCUMENT_ROOT'] . "/assets/uploads/pt-" . $member["name"] . ".png";
} else {
$url = "../assets/uploads/pt.png";
$url = "" . $_SERVER['DOCUMENT_ROOT'] . "/assets/uploads/pt.png";
}
echo(" /heads/$id.png\n");
exec("convert \"" . $url . "\" ../assets/heads/" . $id . ".png");
exec("convert \"" . $url . "\" " . $_SERVER['DOCUMENT_ROOT'] . "/assets/heads/" . $id . ".png");
if (file_exists("../assets/ponies/" . $member["id"] . ".png")) {
if (file_exists("" . $_SERVER['DOCUMENT_ROOT'] . "/assets/ponies/" . $member["id"] . ".png")) {
echo(" /bodies/$id.png\n");
exec("convert \"" . "../assets/ponies/" . $member["id"] . ".png" . "\" ../assets/bodies/" . $id . ".png");
exec("convert \"" . "" . $_SERVER['DOCUMENT_ROOT'] . "/assets/ponies/" . $member["id"] . ".png" . "\" " . $_SERVER['DOCUMENT_ROOT'] . "/assets/bodies/" . $id . ".png");
}
}
}

@ -53,17 +53,17 @@ function pkcs7_pad($data, $size) {
return $data . str_repeat(chr($length), $length);