summaryrefslogtreecommitdiff
path: root/pages/alphabet.php
diff options
context:
space:
mode:
Diffstat (limited to 'pages/alphabet.php')
-rw-r--r--pages/alphabet.php38
1 files changed, 38 insertions, 0 deletions
diff --git a/pages/alphabet.php b/pages/alphabet.php
new file mode 100644
index 0000000..b59772d
--- /dev/null
+++ b/pages/alphabet.php
@@ -0,0 +1,38 @@
+<?php
+
+require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/init.php"; global $title; global $isLoggedIn;
+require_once $_SERVER['DOCUMENT_ROOT'] . '/includes/header.php';
+
+?>
+
+<br>
+<div class="container">
+ <div id="page-content">
+ <h2>Members by prefix letters</h2>
+ <?php $members = scoreOrderGlobal(); ?>
+
+ <div>
+ <?php foreach (str_split("abcdefgihjklmnopqrstuvwxyz") as $letter): ?>
+ <div style="display:inline-grid;grid-template-columns: max-content 1fr;min-height:32px;">
+ <div style="display:flex;align-items:center;justify-content:center;font-weight: bold;margin-right:10px;" class="font-monospace"><?= $letter ?>.</div>
+ <div>
+ <?php foreach ($members as $member): if (isset($member["proxy_tags"][0]) && isset($member["proxy_tags"][0]["prefix"]) && str_starts_with(strtolower($member["proxy_tags"][0]["prefix"]), strtolower($letter)) && strlen($member["proxy_tags"][0]["prefix"]) === 2): ?><a href="/<?= $member["name"] ?>" title="<b><?= $member["display_name"] ?></b> (<code class='text-white'><?= $member["proxy_tags"][0]["prefix"] ?></code>)" data-bs-toggle="tooltip" data-bs-html="true"><img src="/assets/uploads/pt<?= file_exists($_SERVER['DOCUMENT_ROOT'] . "/assets/uploads/pt-" . resolveMember($member['name']) . ".png") ? "-" . $member['name'] : "" ?>.png" style="width:24px;"></a><?php endif; endforeach; ?>
+ </div>
+ </div>
+ <?php foreach (str_split("abcdefgihjklmnopqrstuvwxyz") as $letter2): $list = array_filter($members, function ($member) use ($letter, $letter2) {
+ return isset($member["proxy_tags"][0]) && isset($member["proxy_tags"][0]["prefix"]) && str_starts_with(strtolower($member["proxy_tags"][0]["prefix"]), strtolower($letter . $letter2)) && strlen($member["proxy_tags"][0]["prefix"]) === 3;
+ }); if (count($list) > 0): ?>
+ (<div style="display:inline-grid;grid-template-columns: max-content 1fr;min-height:32px;">
+ <div style="display:flex;align-items:center;justify-content:center;" class="font-monospace"><?= $letter . $letter2 ?>.</div>
+ <div>
+ <?php foreach ($list as $member): ?><a href="/<?= $member["name"] ?>" title="<b><?= $member["display_name"] ?></b> (<code class='text-white'><?= $member["proxy_tags"][0]["prefix"] ?></code>)" data-bs-toggle="tooltip" data-bs-html="true"><img src="/assets/uploads/pt<?= file_exists($_SERVER['DOCUMENT_ROOT'] . "/assets/uploads/pt-" . resolveMember($member['name']) . ".png") ? "-" . $member['name'] : "" ?>.png" style="width:24px;"></a><?php endforeach; ?>
+ </div>
+ </div>)
+ <?php endif; endforeach; ?>
+ <br>
+ <?php endforeach; ?>
+ </div>
+ </div>
+</div>
+
+<?php require_once $_SERVER['DOCUMENT_ROOT'] . '/includes/footer.php'; ?>