diff options
author | Minteck <contact@minteck.org> | 2022-08-21 17:31:56 +0200 |
---|---|---|
committer | Minteck <contact@minteck.org> | 2022-08-21 17:31:56 +0200 |
commit | a2df9a69dcc14cb70118cda2ded499055e7ee358 (patch) | |
tree | 6dd283e4e9452d38bce81ddaaae49b5335755842 /includes/edit.php | |
parent | 84dd0735820b16b60f600284d35183d76547a71f (diff) | |
download | pluralconnect-a2df9a69dcc14cb70118cda2ded499055e7ee358.tar.gz pluralconnect-a2df9a69dcc14cb70118cda2ded499055e7ee358.tar.bz2 pluralconnect-a2df9a69dcc14cb70118cda2ded499055e7ee358.zip |
m. update
Diffstat (limited to 'includes/edit.php')
-rw-r--r-- | includes/edit.php | 12 |
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> |