summaryrefslogtreecommitdiff
path: root/includes/edit.php
diff options
context:
space:
mode:
Diffstat (limited to 'includes/edit.php')
-rw-r--r--includes/edit.php12
1 files changed, 8 insertions, 4 deletions
diff --git a/includes/edit.php b/includes/edit.php
index 839c130..85382a0 100644
--- a/includes/edit.php
+++ b/includes/edit.php
@@ -26,16 +26,20 @@ function timeAgo($time): string {
$difference = round($difference);
$period = $periods[$j] . ($difference >1 ? "s" :'');
- return "{$difference} {$period} {$tense} ";
+ return "{$difference} {$period} {$tense}";
}
-$metadata = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/" . $systemID . "-" . $memberID . "-metadata.json"), true);
+$metadata = parseMetadata(json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/" . $systemID . "-" . $memberID . "-metadata.json"), true));
?>
<br>
<div class="container">
- <?php require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/banner.php"; ?>
+ <script>
+ window.currentMemberData = JSON.parse(atob(`<?= base64_encode(json_encode(getMemberBannerData($memberID, $systemID))) ?>`));
+ </script>
+ <div id="member-banner"></div>
+ <script src="/app/banner.js"></script><script>refreshBanner()</script>
<br>
<p class="text-muted">
@@ -44,7 +48,7 @@ $metadata = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes
<!--suppress HtmlFormInputWithoutLabel -->
<textarea id="page-editor">
- <?= file_exists($_SERVER['DOCUMENT_ROOT'] . "/includes/data/$systemID-$memberID-disclaimers.html") ? file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/$systemID-$memberID-disclaimers.html") : "" ?>
+ <?= file_exists($_SERVER['DOCUMENT_ROOT'] . "/includes/data/$systemID-$memberID-content.html") ? file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/$systemID-$memberID-content.html") : "" ?>
</textarea>
<script src="/assets/editor/editor.js"></script>