From e95b208af90cc386a7d8d1bcab426727cf4f0121 Mon Sep 17 00:00:00 2001 From: Minteck Date: Wed, 21 Sep 2022 22:42:33 +0200 Subject: Update time --- includes/member.php | 140 +++++++++++++++++++++++++++++++++------------------- 1 file changed, 88 insertions(+), 52 deletions(-) (limited to 'includes/member.php') diff --git a/includes/member.php b/includes/member.php index f8050b0..d0120d5 100644 --- a/includes/member.php +++ b/includes/member.php @@ -10,35 +10,6 @@ require_once $_SERVER['DOCUMENT_ROOT'] . '/includes/header.php'; $travelling = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/travelling.json"), true); -function timeAgo($time): string { - if (!is_numeric($time)) { - $time = strtotime($time); - } - - $periods = ["second", "minute", "hour", "day", "week", "month", "year", "age"]; - $lengths = array("60", "60", "24", "7", "4.35", "12", "100"); - - $now = time(); - - $difference = $now - $time; - if ($difference <= 10 && $difference >= 0) { - return $tense = "now"; - } elseif ($difference > 0) { - $tense = "ago"; - } else { - $tense = "later"; - } - - for ($j = 0; $difference >= $lengths[$j] && $j < count($lengths)-1; $j++) { - $difference /= $lengths[$j]; - } - - $difference = round($difference); - - $period = $periods[$j] . ($difference >1 ? "s" :''); - return "{$difference} {$period} {$tense}"; -} - if ($memberData["name"] !== "unknown" && $memberData["name"] !== "fusion") { $metadata = parseMetadata(json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/" . $systemID . "-" . $memberID . "-metadata.json"), true)); } @@ -78,44 +49,83 @@ if ($memberData["name"] === "fusion") {
">
- Food: + Food:
"Doesn't need", - 1 => "Can't eat animals", - 2 => "Can't eat meat", - 3 => "No restrictions", + 0 => "Not needed", + 1 => "Not animals", + 2 => "Not meat", + 3 => "All", } ?>
- Memory access: + Shared memory:
"No direct access", - 1 => "Partial direct access", - 2 => "Full direct access", + 0 => "None", + 1 => "Partial", + 2 => "Full", } ?>
- Magic: + Magic:
"Can't use magic", - 1 => "Can use magic in some cases", - 2 => "Can use a horn", - 3 => "Can use wings", - 4 => "Can use a horn and wings", - 5 => "Can cast spells", + 0 => "None", + 1 => "In some cases", + 2 => "Horn", + 3 => "Wings", + 4 => "Horn and wings", + 5 => "Yes", } ?>
- Sensitivity: + Sensitivity:
"Not sensitive", - 1 => "May be sensitive", - 2 => "Affectionately sensitive", - 3 => "Sexually sensitive", + 0 => "None", + 1 => "Maybe", + 2 => "Affectionate", + 3 => "Sexual", 4 => "Affectionate and sexual", } ?>
+
+ Age:
+ + + - + + " . $metadata["birth"]["age"] . "* years old" ?> + + + + - + + + " . $age . " years old" ?> + + +
+
+ Birthday:
+ + + + - + +
@@ -141,6 +151,7 @@ if ($memberData["name"] === "fusion") {
  • Date added: (, )
  • @@ -189,6 +200,12 @@ if ($memberData["name"] === "fusion") { ?> + +
    +
    + AI-generated page: + +
    @@ -197,6 +214,14 @@ if ($memberData["name"] === "fusion") { is visiting the since , therefore currently not in the . + +
    +

    Hello there!

    +

    I'm currently a new headmate slowly figuring myself out.

    +

    Give me some time to figure myself out and see this page change as I find new stuff about my identity. Don't be too worried if I accidentally get pushed to front, it's something that can happen sometimes.

    + Thanks! +
    +
    @@ -222,9 +247,20 @@ if ($memberData["name"] === "fusion") {
    - (edit) + (edit: public, private) + + + + +
    + + + + + +

    This page is automatically generated and may not be 100% accurate.

    + - This page is empty." ?> -- cgit