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['proxy_tags'][0]['prefix'] . '