summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMinteck <contact@minteck.org>2022-12-21 18:09:20 +0100
committerMinteck <contact@minteck.org>2022-12-21 18:09:20 +0100
commitae766d28c07628e71629a72452261898ea72057a (patch)
tree79bf1110a59f8339ce685b80c12d18f3650700d8
parent9d5e468be5e58269f8730305745eee29b9d957d5 (diff)
downloadpluralconnect-ae766d28c07628e71629a72452261898ea72057a.tar.gz
pluralconnect-ae766d28c07628e71629a72452261898ea72057a.tar.bz2
pluralconnect-ae766d28c07628e71629a72452261898ea72057a.zip
Update - This is an automated commit
-rw-r--r--app/banner.js6
-rw-r--r--assets/logo/custom.css6
-rw-r--r--i18n/en.json1
-rw-r--r--i18n/fr.json1
-rw-r--r--i18n/qqx.json4
-rw-r--r--includes/banner.inc6
-rw-r--r--includes/bitset.inc1
-rw-r--r--includes/days.json5
-rw-r--r--includes/details.inc10
-rw-r--r--includes/metadata.inc6
-rw-r--r--includes/planner.inc209
-rw-r--r--includes/system/compare.inc13
-rw-r--r--pages/metadata.inc18
13 files changed, 122 insertions, 164 deletions
diff --git a/app/banner.js b/app/banner.js
index dc1a06b..5ddb2d2 100644
--- a/app/banner.js
+++ b/app/banner.js
@@ -68,10 +68,6 @@ async function refreshBanner(offline, french) {
data['last_fronted']['relative'] = timeAgo(currentMemberData.last_fronted.timestamp * 1000);
}
- if (data.id === "scootaloo" && new Date().getDay() % 2 === 0) {
- data['relations']['marefriends'] = data['relations']['marefriends'].reverse();
- }
-
if (offline) {
let images = JSON.parse(await localforage.getItem("images"));
@@ -131,7 +127,7 @@ async function refreshBanner(offline, french) {
<div style="display:grid;grid-template-columns: repeat(${data['median'] || data['id'] === "unknown" ? (french ? 3 : 4) : data['id'] === "fusion" ? (french ? 2 : 3) : (french ? 4 : 5)}, 1fr);" id="member-card">
<span>
<b>${french ? `Préfixe${data['prefixes'].length > 1 ? 's' : ''} ` : `Prefix${data['prefixes'].length > 1 ? 'es' : ''}`}: </b><span class="member-small-separator"><br></span>
- <code style="color: white;">${data['prefixes'].join('</code>, <code style="color: white;">')}</code>
+ ${data['prefixes'].length > 0 && data['prefixes'][0] !== null ? `<code style="color: white;">${data['prefixes'].join('</code>, <code style="color: white;">')}</code>` : `-`}
</span>
${french ? "" : `<span>
<b>${french ? "Pronoms :" : "Pronouns:"} </b><span class="member-small-separator"><br></span>
diff --git a/assets/logo/custom.css b/assets/logo/custom.css
index 0e0ec6f..a27d366 100644
--- a/assets/logo/custom.css
+++ b/assets/logo/custom.css
@@ -261,7 +261,7 @@ dd {
.comparison {
display: grid;
- grid-template-columns: 3fr 1.5fr 2fr repeat(4, 1fr);
+ grid-template-columns: 3fr 1.5fr 1.5fr 2fr repeat(4, 1fr);
}
.comparison-header {
@@ -491,7 +491,7 @@ dd {
display: none !important;
}
.comparison {
- grid-template-columns: repeat(3, 2fr) repeat(4, 1fr) !important;
+ grid-template-columns: repeat(4, 2fr) repeat(4, 1fr) !important;
}
.comparison-relations-count {
display: inline;
@@ -621,7 +621,7 @@ peh-muted {
border-bottom-left-radius: 10px;
border-bottom-right-radius: 10px;
display: grid;
- grid-template-columns: repeat(5, 1fr);
+ grid-template-columns: repeat(6, 1fr);
text-align: center;
}
diff --git a/i18n/en.json b/i18n/en.json
index 65ccfce..14925c4 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -6,6 +6,7 @@
"file": "File not found"
},
"details": {
+ "code": "Code:",
"food": "Food:",
"memory": "Shared memory:",
"food_states": [
diff --git a/i18n/fr.json b/i18n/fr.json
index 65cc9ce..e17e811 100644
--- a/i18n/fr.json
+++ b/i18n/fr.json
@@ -6,6 +6,7 @@
"file": "Fichier introuvable"
},
"details": {
+ "code": "Code :",
"food": "Nourriture :",
"memory": "Mémoire :",
"food_states": [
diff --git a/i18n/qqx.json b/i18n/qqx.json
index 5f6ffd2..7f1683e 100644
--- a/i18n/qqx.json
+++ b/i18n/qqx.json
@@ -6,6 +6,7 @@
"file": "LANG_APP_FILE"
},
"details": {
+ "code": "LANG_DETAILS_CODE",
"food": "LANG_DETAILS_FOOD",
"memory": "LANG_DETAILS_MEMORY",
"food_states": [
@@ -223,9 +224,6 @@
"tree": {
"title": "LANG_TREE_TITLE"
},
- "alphabet": {
- "title": "LANG_ALPHABET_TITLE"
- },
"debug": {
"docs_cleanup": "LANG_DEBUG_DOCS_CLEANUP",
"important_backup": "LANG_DEBUG_IMPORTANT_BACKUP",
diff --git a/includes/banner.inc b/includes/banner.inc
index 4678a5a..1d33b43 100644
--- a/includes/banner.inc
+++ b/includes/banner.inc
@@ -66,7 +66,11 @@ function getMemberBannerData(string $id, string $system, bool $french = false) {
$prefixes = [];
foreach ($member['proxy_tags'] as $proxy) {
if ($travelling[$member['id']]["travelling"]) {
- $prefixes[] = "+" . $proxy["prefix"] . ($proxy["suffix"] !== "" && $proxy["suffix"] !== null ? "..." . $proxy["suffix"] : "");
+ if (isset($travelling[$member['id']]['equestria']) && $travelling[$member['id']]['equestria']) {
+ $prefixes[] = null;
+ } else {
+ $prefixes[] = "+" . $proxy["prefix"] . ($proxy["suffix"] !== "" && $proxy["suffix"] !== null ? "..." . $proxy["suffix"] : "");
+ }
} else {
$prefixes[] = $proxy["prefix"] . ($proxy["suffix"] !== "" && $proxy["suffix"] !== null ? "..." . $proxy["suffix"] : "");
}
diff --git a/includes/bitset.inc b/includes/bitset.inc
index 7d5a963..96c6bfd 100644
--- a/includes/bitset.inc
+++ b/includes/bitset.inc
@@ -106,6 +106,7 @@ function parseMetadata ($metadata) {
$m["median"] = $metadata["median"] ?? null;
$m["birth"] = $metadata["birth"] ?? null;
$m["heat"] = $metadata["heat"] ?? null;
+ $m["code"] = $metadata["code"] ?? null;
} else {
$m = $metadata;
}
diff --git a/includes/days.json b/includes/days.json
new file mode 100644
index 0000000..bfbcefa
--- /dev/null
+++ b/includes/days.json
@@ -0,0 +1,5 @@
+{
+ "2022-12-24": "Christmas Eve",
+ "2022-12-25": "Christmas Day",
+ "2022-12-31": "New Year's Eve"
+} \ No newline at end of file
diff --git a/includes/details.inc b/includes/details.inc
index e4ee519..8fee082 100644
--- a/includes/details.inc
+++ b/includes/details.inc
@@ -1,5 +1,5 @@
<?php global $isLoggedIn; global $metadata; global $memberData; global $lang; global $pages; ?>
-<div id="member-details" class="<?= $isLoggedIn ? 'member-details-loggedIn' : '' ?>" style="<?php if (!$isLoggedIn): ?>grid-template-columns: repeat(2, 1fr);<?php endif; ?> background-color: <?= isset($memberData["color"]) ? '#' . $memberData["color"] . "33" : "transparent" ?>; margin-left: -20px; margin-right: -20px;">
+<div id="member-details" class="<?= $isLoggedIn ? 'member-details-loggedIn' : '' ?>" style="<?php if (!$isLoggedIn): ?>grid-template-columns: repeat(3, 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"]) {
@@ -68,4 +68,12 @@
<?php endif; ?>
</div>
<?php endif; ?>
+ <div>
+ <b><?= $lang["details"]["code"] ?></b><span class="member-small-separator"><br></span>
+ <?php if (isset($metadata["code"]) && trim($metadata["code"]) !== ""): ?>
+ <code style="color: white;"><?= strtoupper(substr($metadata["code"], 0, 3)) ?></code>
+ <?php else: ?>
+ -
+ <?php endif; ?>
+ </div>
</div> \ No newline at end of file
diff --git a/includes/metadata.inc b/includes/metadata.inc
index 1aa7329..04b6a9e 100644
--- a/includes/metadata.inc
+++ b/includes/metadata.inc
@@ -8,7 +8,7 @@ if (file_exists($_SERVER['DOCUMENT_ROOT'] . "/includes/data/metadata/" . $member
<br>
<div class="container" id="page-content">
- <h2><?= $memberData["display_name"] ?? $memberData["name"] ?></h2>
+ <h2><a href="/<?= $memberData["name"] ?>"><?= $memberData["display_name"] ?? $memberData["name"] ?></a></h2>
<?php if (file_exists($_SERVER['DOCUMENT_ROOT'] . "/includes/data/metadata/" . $memberID . ".json")): ?>
<form>
<input name="submit" type="hidden">
@@ -45,6 +45,10 @@ 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="number" value="<?= $metadata["birth"]["age"] ?? "" ?>">
</p>
+ <p>
+ <b>Member code:</b><br>
+ <input name="membc" class="form-control" style="filter: invert(1) hue-rotate(180deg);" type="text" value="<?= $metadata["code"] ?? "" ?>">
+ </p>
<input name="submit" class="btn btn-outline-primary" value="Save and quit" type="submit">
</form>
<?php else: ?>
diff --git a/includes/planner.inc b/includes/planner.inc
index 72c82a5..c537d17 100644
--- a/includes/planner.inc
+++ b/includes/planner.inc
@@ -73,9 +73,18 @@ foreach ($raindrops as $id => $day) {
function day($display, $diff): void { if ($diff < 0) $disabled = true; else $disabled = false; global $cloudburst; global $raindrops; ?>
<?php if (!isset($display)) {
$display = date('l', time() + (86400 * $diff));
- }?>
+ }
+
+ $d = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/days.json"), true);
+ $t = date('Y-m-d', time() + (86400 * $diff));
+
+ if (isset($d[$t])) {
+ $display = "$display ($d[$t])";
+ }
+
+ ?>
<tr class="planner-day" id="planner-header-<?= $diff ?>" <?php if ($disabled): ?>style="opacity: .75; pointer-events: none;"<?php endif; ?>>
- <td colspan="10"><?= $display ?></td>
+ <td colspan="10" contenteditable="true"><?= $display ?></td>
<?php
if (!isset($cloudburst[date('Y-m-d', time() + (86400 * $diff))])) $cloudburst[date('Y-m-d', time() + (86400 * $diff))] = [];
@@ -403,57 +412,7 @@ function day($display, $diff): void { if ($diff < 0) $disabled = true; else $dis
}
function openEditFronter(system, id, date) {
- let display;
-
- switch (date) {
- case "<?= date('Y-m-d') ?>":
- display = "today";
- break;
-
- case "<?= date('Y-m-d', time() + 86400) ?>":
- display = "tomorrow";
- break;
-
- case "<?= date('Y-m-d', time() + (86400 * 2)) ?>":
- display = "on <?= date('l', time() + (86400 * 2)) ?>";
- break;
-
- case "<?= date('Y-m-d', time() + (86400 * 3)) ?>":
- display = "on <?= date('l', time() + (86400 * 3)) ?>";
- break;
-
- case "<?= date('Y-m-d', time() + (86400 * 4)) ?>":
- display = "on <?= date('l', time() + (86400 * 4)) ?>";
- break;
-
- case "<?= date('Y-m-d', time() + (86400 * 5)) ?>":
- display = "on <?= date('l', time() + (86400 * 5)) ?>";
- break;
-
- case "<?= date('Y-m-d', time() + (86400 * 6)) ?>":
- display = "on <?= date('l', time() + (86400 * 6)) ?>";
- break;
-
- case "<?= date('Y-m-d', time() + (86400 * 7)) ?>":
- display = "on <?= date('l', time() + (86400 * 7)) ?>";
- break;
-
- case "<?= date('Y-m-d', time() + (86400 * 8)) ?>":
- display = "on <?= date('l', time() + (86400 * 8)) ?>";
- break;
-
- case "<?= date('Y-m-d', time() + (86400 * 9)) ?>":
- display = "on <?= date('l', time() + (86400 * 9)) ?>";
- break;
-
- case "<?= date('Y-m-d', time() + (86400 * 10)) ?>":
- display = "on <?= date('l', time() + (86400 * 10)) ?>";
- break;
-
- case "<?= date('Y-m-d', time() + (86400 * 11)) ?>":
- display = "on <?= date('l', time() + (86400 * 11)) ?>";
- break;
- }
+ let display = formatDate(date).display;
window.selectedFronting = {
system: system === "cloudburst" ? "ynmuc" : "gdapd",
@@ -476,37 +435,7 @@ function day($display, $diff): void { if ($diff < 0) $disabled = true; else $dis
}
function openEditCofronter(system, id, date) {
- let display;
-
- switch (date) {
- case "<?= date('Y-m-d') ?>":
- display = "today";
- break;
-
- case "<?= date('Y-m-d', time() + 86400) ?>":
- display = "tomorrow";
- break;
-
- case "<?= date('Y-m-d', time() + (86400 * 2)) ?>":
- display = "on <?= date('l', time() + (86400 * 2)) ?>";
- break;
-
- case "<?= date('Y-m-d', time() + (86400 * 3)) ?>":
- display = "on <?= date('l', time() + (86400 * 3)) ?>";
- break;
-
- case "<?= date('Y-m-d', time() + (86400 * 4)) ?>":
- display = "on <?= date('l', time() + (86400 * 4)) ?>";
- break;
-
- case "<?= date('Y-m-d', time() + (86400 * 5)) ?>":
- display = "on <?= date('l', time() + (86400 * 5)) ?>";
- break;
-
- case "<?= date('Y-m-d', time() + (86400 * 6)) ?>":
- display = "on <?= date('l', time() + (86400 * 6)) ?>";
- break;
- }
+ let display = formatDate(offset).display;
window.selectedFronting = {
system: system === "cloudburst" ? "ynmuc" : "gdapd",
@@ -525,47 +454,91 @@ function day($display, $diff): void { if ($diff < 0) $disabled = true; else $dis
modal.show();
}
- function addCofronter(system, offset, index) {
+ function formatDate(offset) {
let date;
let display;
switch (offset) {
case 0:
+ case "<?= date('Y-m-d', time()) ?>":
date = "<?= date('Y-m-d') ?>";
display = "today";
break;
case 1:
+ case "<?= date('Y-m-d', time() + (86400)) ?>":
date = "<?= date('Y-m-d', time() + 86400) ?>";
display = "tomorrow";
break;
case 2:
+ case "<?= date('Y-m-d', time() + (86400 * 2)) ?>":
date = "<?= date('Y-m-d', time() + (86400 * 2)) ?>";
display = "on <?= date('l', time() + (86400 * 2)) ?>";
break;
case 3:
+ case "<?= date('Y-m-d', time() + (86400 * 3)) ?>":
date = "<?= date('Y-m-d', time() + (86400 * 3)) ?>";
display = "on <?= date('l', time() + (86400 * 3)) ?>";
break;
case 4:
+ case "<?= date('Y-m-d', time() + (86400 * 4)) ?>":
date = "<?= date('Y-m-d', time() + (86400 * 4)) ?>";
display = "on <?= date('l', time() + (86400 * 4)) ?>";
break;
case 5:
+ case "<?= date('Y-m-d', time() + (86400 * 5)) ?>":
date = "<?= date('Y-m-d', time() + (86400 * 5)) ?>";
display = "on <?= date('l', time() + (86400 * 5)) ?>";
break;
case 6:
+ case "<?= date('Y-m-d', time() + (86400 * 6)) ?>":
date = "<?= date('Y-m-d', time() + (86400 * 6)) ?>";
display = "on <?= date('l', time() + (86400 * 6)) ?>";
break;
+
+ case 7:
+ case "<?= date('Y-m-d', time() + (86400 * 7)) ?>":
+ date = "<?= date('Y-m-d', time() + (86400 * 7)) ?>";
+ display = "on <?= date('l', time() + (86400 * 7)) ?>";
+ break;
+
+ case 8:
+ case "<?= date('Y-m-d', time() + (86400 * 8)) ?>":
+ date = "<?= date('Y-m-d', time() + (86400 * 8)) ?>";
+ display = "on <?= date('l', time() + (86400 * 8)) ?>";
+ break;
+
+ case 9:
+ case "<?= date('Y-m-d', time() + (86400 * 9)) ?>":
+ date = "<?= date('Y-m-d', time() + (86400 * 9)) ?>";
+ display = "on <?= date('l', time() + (86400 * 9)) ?>";
+ break;
+
+ case 10:
+ case "<?= date('Y-m-d', time() + (86400 * 10)) ?>":
+ date = "<?= date('Y-m-d', time() + (86400 * 10)) ?>";
+ display = "on <?= date('l', time() + (86400 * 10)) ?>";
+ break;
+
+ case 11:
+ case "<?= date('Y-m-d', time() + (86400 * 11)) ?>":
+ date = "<?= date('Y-m-d', time() + (86400 * 11)) ?>";
+ display = "on <?= date('l', time() + (86400 * 11)) ?>";
+ break;
}
+ return {date, display};
+ }
+
+ function addCofronter(system, offset, index) {
+ let date = formatDate(offset).date;
+ let display = formatDate(offset).display;
+
window.selectedFronting = {
system: system === "cloudburst" ? "ynmuc" : "gdapd",
date: date,
@@ -593,70 +566,8 @@ function day($display, $diff): void { if ($diff < 0) $disabled = true; else $dis
}
function addFronter(system, offset, index) {
- let date;
- let display;
-
- switch (offset) {
- case 0:
- date = "<?= date('Y-m-d') ?>";
- display = "today";
- break;
-
- case 1:
- date = "<?= date('Y-m-d', time() + 86400) ?>";
- display = "tomorrow";
- break;
-
- case 2:
- date = "<?= date('Y-m-d', time() + (86400 * 2)) ?>";
- display = "on <?= date('l', time() + (86400 * 2)) ?>";
- break;
-
- case 3:
- date = "<?= date('Y-m-d', time() + (86400 * 3)) ?>";
- display = "on <?= date('l', time() + (86400 * 3)) ?>";
- break;
-
- case 4:
- date = "<?= date('Y-m-d', time() + (86400 * 4)) ?>";
- display = "on <?= date('l', time() + (86400 * 4)) ?>";
- break;
-
- case 5:
- date = "<?= date('Y-m-d', time() + (86400 * 5)) ?>";
- display = "on <?= date('l', time() + (86400 * 5)) ?>";
- break;
-
- case 6:
- date = "<?= date('Y-m-d', time() + (86400 * 6)) ?>";
- display = "on <?= date('l', time() + (86400 * 6)) ?>";
- break;
-
- case 7:
- date = "<?= date('Y-m-d', time() + (86400 * 7)) ?>";
- display = "on <?= date('l', time() + (86400 * 7)) ?>";
- break;
-
- case 8:
- date = "<?= date('Y-m-d', time() + (86400 * 8)) ?>";
- display = "on <?= date('l', time() + (86400 * 8)) ?>";
- break;
-
- case 9:
- date = "<?= date('Y-m-d', time() + (86400 * 9)) ?>";
- display = "on <?= date('l', time() + (86400 * 9)) ?>";
- break;
-
- case 10:
- date = "<?= date('Y-m-d', time() + (86400 * 10)) ?>";
- display = "on <?= date('l', time() + (86400 * 10)) ?>";
- break;
-
- case 11:
- date = "<?= date('Y-m-d', time() + (86400 * 11)) ?>";
- display = "on <?= date('l', time() + (86400 * 11)) ?>";
- break;
- }
+ let date = formatDate(offset).date;
+ let display = formatDate(offset).display;
window.currentWorkingDate = date;
window.addIndex = index;
diff --git a/includes/system/compare.inc b/includes/system/compare.inc
index 4f9711d..ea12582 100644
--- a/includes/system/compare.inc
+++ b/includes/system/compare.inc
@@ -38,6 +38,14 @@ function getMember(string $id) {
<span class="comparison-header-l5"><abbr title="<?= $lang["compare"]["species"][0] ?>" data-bs-toggle="tooltip"><?= $lang["compare"]["species"][5] ?></abbr></span>
</span>
<span class="comparison-header comparison-item">
+ <span class="comparison-header-l0"><abbr title="Code" data-bs-toggle="tooltip">Code</abbr></span>
+ <span class="comparison-header-l1"><abbr title="Code" data-bs-toggle="tooltip">Code</abbr></span>
+ <span class="comparison-header-l2"><abbr title="Code" data-bs-toggle="tooltip">Code</abbr></span>
+ <span class="comparison-header-l3"><abbr title="Code" data-bs-toggle="tooltip">Code</abbr></span>
+ <span class="comparison-header-l4"><abbr title="Code" data-bs-toggle="tooltip">Code</abbr></span>
+ <span class="comparison-header-l5"><abbr title="Code" data-bs-toggle="tooltip">Code</abbr></span>
+ </span>
+ <span class="comparison-header comparison-item">
<span class="comparison-header-l0"><abbr title="<?= $lang["compare"]["relations"][0] ?>" data-bs-toggle="tooltip"><?= $lang["compare"]["relations"][0] ?></abbr></span>
<span class="comparison-header-l1"><abbr title="<?= $lang["compare"]["relations"][0] ?>" data-bs-toggle="tooltip"><?= $lang["compare"]["relations"][1] ?></abbr></span>
<span class="comparison-header-l2"><abbr title="<?= $lang["compare"]["relations"][0] ?>" data-bs-toggle="tooltip"><?= $lang["compare"]["relations"][2] ?></abbr></span>
@@ -121,6 +129,11 @@ function getMember(string $id) {
<?php endforeach; ?>
</span>
<span class="comparison-item">
+ <?php if (isset($metadata["code"]) && trim($metadata["code"]) !== ""): ?>
+ <code style="color: white;"><?= strtoupper(substr($metadata["code"], 0, 3)) ?></code>
+ <?php else: ?>-<?php endif; ?>
+ </span>
+ <span class="comparison-item">
<?= count($metadata["marefriends"]) + count($metadata["sisters"]) + count($metadata["caretakers"]) === 0 ? "-" : "" ?>
<span class="comparison-relations-count">
<?= count($metadata["marefriends"]) + count($metadata["sisters"]) > 0 ? count($metadata["marefriends"]) + count($metadata["sisters"]) : "" ?>
diff --git a/pages/metadata.inc b/pages/metadata.inc
index ecb8aba..ffe2397 100644
--- a/pages/metadata.inc
+++ b/pages/metadata.inc
@@ -54,7 +54,7 @@ if ($member === null) {
if (isset($_GET["submit"])) {
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));
+ $metadata = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/metadata/" . $memberID . ".json"), true);
} else {
die();
}
@@ -108,10 +108,26 @@ if ($member === null) {
$toUpdate["birth"]["date"] = substr($_GET["birth"],5);
}
+ if (isset($_GET["membc"])) {
+ $toUpdate["code"] = $_GET['membc'];
+ }
+
foreach ($toUpdate as $item => $value) {
$metadata[$item] = $value;
}
+ $metadata = [
+ "bitset" => $metadata["bitset"] ?? 0,
+ "regression" => $metadata["regression"] ?? null,
+ "median" => $metadata["median"] ?? null,
+ "marefriends" => $metadata["marefriends"] ?? [],
+ "sisters" => $metadata["sisters"] ?? [],
+ "caretakers" => $metadata["caretakers"] ?? [],
+ "heat" => $metadata["heat"] ?? null,
+ "birth" => $metadata["birth"] ?? ["age" => 0, "date" => "01-01", "year" => null],
+ "code" => $metadata["code"] ?? null,
+ ];
+
file_put_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/metadata/" . $memberID . ".json", json_encode($metadata));
header("Location: /" . $_GET['_']);