From 09bd0164ebc020a54b944b7326dcba496fb5d82c Mon Sep 17 00:00:00 2001 From: Minteck Date: Fri, 26 Aug 2022 22:29:23 +0200 Subject: idk when was the last commit so I'm making a new one - Violet Dawn --- includes/member/hierarchy.php | 207 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 207 insertions(+) create mode 100644 includes/member/hierarchy.php (limited to 'includes/member/hierarchy.php') diff --git a/includes/member/hierarchy.php b/includes/member/hierarchy.php new file mode 100644 index 0000000..39045b3 --- /dev/null +++ b/includes/member/hierarchy.php @@ -0,0 +1,207 @@ += 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}"; +} + +$metadata = parseMetadata(json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/" . $systemID . "-" . $memberID . "-metadata.json"), true)); + +$allMembers = scoreOrder(json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/" . $systemID . "-members.json"), true), $systemID); +$allMembers2 = scoreOrder(json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/" . ($systemID === "gdapd" ? "ynmuc" : "gdapd") . "-members.json"), true), $systemID === "gdapd" ? "ynmuc" : "gdapd"); + +$systemCommonData = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/" . $systemID . "-general.json"), true); + +if ($travelling[$memberID]["travelling"]) { + $allMembers = scoreOrder(json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/" . ($systemID === "gdapd" ? "ynmuc" : "gdapd") . "-members.json"), true), $systemID === "gdapd" ? "ynmuc" : "gdapd"); + $allMembers2 = scoreOrder(json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/" . $systemID . "-members.json"), true), $systemID); + + $systemCommonData = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/" . ($systemID === "gdapd" ? "ynmuc" : "gdapd") . "-general.json"), true); + + $system = $systemID === "gdapd" ? "cloudburst" : "raindrops"; + $systemCommonName = $systemID === "gdapd" ? "Cloudburst System" : "Raindrops System"; +} + +?> + +
+
+

's hierarchy

+
+ + + +

Part of:

+ + +
+ + 0): ?> +

Protected by:

+
+ +
+ +
+ +
+ +
+ + + 0): ?> +

Taken care of by:

+
+ +
+ +
+ +
+ +
+ + +

Member:

+
+
+ +
+
+ + 0): ?> +
+ +

Taking care of:

+
+ +
+ +
+ +
+ +
+ + + + \ No newline at end of file -- cgit