3 && !str_ends_with($parts[0], "e") && $parts[0] !== "Filly") { if (str_contains($parts[0], "/")) { return explode("/", $parts[0])[0]; } else { return $parts[0]; } } else { return $name; } } function getSystemMember(string $system, string $id) { $systemID = $system; $members = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/$systemID-members.json"), true); $member = null; foreach ($members as $m) { if ($m["id"] === $id) $member = $m; } return $member; } function getBrightness(string $hexCode) { if (str_starts_with("#", $hexCode)) { $hexCode = substr($hexCode, 1); } $red = hexdec(substr($hexCode, 0, 2)); $green = hexdec(substr($hexCode, 2, 2)); $blue = hexdec(substr($hexCode, 4, 2)); $brightness = $red + $green + $blue; return $brightness > 382; } function showMembersFromList(array $list, string $id) { foreach ($list as $member) { if ($member['name'] !== "unknown") { echo('
' . ($member['display_name'] ?? $member['name']) . '
' . $member['proxy_tags'][0]['prefix'] . '
'); }} } function showSubsystem(array $data, string $parentSystem) { $subsystemData = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/$parentSystem-subsystem-$data[source].json"), true); echo('
'); echo('
'); showMembersFromList(scoreOrder(array_map(function ($i) use ($parentSystem) { return getSystemMember($parentSystem, $i); }, $data["members"]), $parentSystem), $parentSystem); echo('
'); } function showSystem(string $id, string $name, string $color, bool $hideTitle) { if ($hideTitle) { echo('
'); } else { echo('
'); } if (!$hideTitle) echo(' ' . $name . ' '); if ($hideTitle) { echo('
'); } else { echo('
'); } showMembersFromList(scoreOrder(json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/$id-members.json"), true), $id), $id); echo('
'); } function cloudburst(bool $hideTitle): void { showSystem("ynmuc", "Cloudburst System", "#5f08a9a6", $hideTitle); } function raindrops(bool $hideTitle): void { showSystem("gdapd", "Raindrops System", "#a95f08a6", $hideTitle); } ?> <?= $title ? $title . " ยท " : "" ?>Cuties and Plurality