blob: 6d69cd013897f22c2920e309a5bcd0cc3fc6bf77 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
|
<?php global $system; global $systemCommonName; global $systemID; $title = "Compare members · " . $systemCommonName; require_once $_SERVER['DOCUMENT_ROOT'] . '/includes/header.php';
$members = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/$systemID-members.json"), true);
function getMember(string $id) {
global $systemID;
global $members;
$member = null;
foreach ($members as $m) {
if ($m["id"] === $id) $member = $m;
}
return $member;
}
?>
<br>
<div class="container">
<h2>Compare members of the <?= $systemCommonName ?></h2>
<div class="comparison">
<span class="comparison-header comparison-item">
<span class="comparison-header-l0">Member</span>
<span class="comparison-header-l1">Member</span>
<span class="comparison-header-l2">Member</span>
<span class="comparison-header-l3">Member</span>
<span class="comparison-header-l4">Member</span>
<span class="comparison-header-l5">Mmbr.</span>
</span>
<span class="comparison-header comparison-item">
<span class="comparison-header-l0">Species</span>
<span class="comparison-header-l1">Species</span>
<span class="comparison-header-l2">Species</span>
<span class="comparison-header-l3">Species</span>
<span class="comparison-header-l4">Spec.</span>
<span class="comparison-header-l5">Spec.</span>
</span>
<span class="comparison-header comparison-item">
<span class="comparison-header-l0">Relations</span>
<span class="comparison-header-l1">Relations</span>
<span class="comparison-header-l2">Relations</span>
<span class="comparison-header-l3">Relations</span>
<span class="comparison-header-l4">Relt.</span>
<span class="comparison-header-l5">Relt.</span>
</span>
<span class="comparison-header comparison-item">
<span class="comparison-header-l0">Host</span>
<span class="comparison-header-l1">Host</span>
<span class="comparison-header-l2">Host</span>
<span class="comparison-header-l3">Host</span>
<span class="comparison-header-l4">Hst.</span>
<span class="comparison-header-l5">Hst.</span>
</span>
<span class="comparison-header comparison-item">
<span class="comparison-header-l0">Fictive</span>
<span class="comparison-header-l1">Fictive</span>
<span class="comparison-header-l2">Fictive</span>
<span class="comparison-header-l3">Fictive</span>
<span class="comparison-header-l4">Fic.</span>
<span class="comparison-header-l5">Fic.</span>
</span>
<span class="comparison-header comparison-item">
<span class="comparison-header-l0">Little</span>
<span class="comparison-header-l1">Little</span>
<span class="comparison-header-l2">Little</span>
<span class="comparison-header-l3">Little</span>
<span class="comparison-header-l4">Ltl.</span>
<span class="comparison-header-l5">Ltl.</span>
</span>
<span class="comparison-header comparison-item">
<span class="comparison-header-l0">Not talking</span>
<span class="comparison-header-l1">No talk</span>
<span class="comparison-header-l2">No talk</span>
<span class="comparison-header-l3">NT.</span>
<span class="comparison-header-l4">NT.</span>
<span class="comparison-header-l5">NT.</span>
</span>
<span class="comparison-header comparison-item">
<span class="comparison-header-l0">Protector</span>
<span class="comparison-header-l1">Protector</span>
<span class="comparison-header-l2">Protect.</span>
<span class="comparison-header-l3">Protect.</span>
<span class="comparison-header-l4">Prt.</span>
<span class="comparison-header-l5">Prt.</span>
</span>
<?php foreach (scoreOrder($members, $systemID) as $member):
$metadata = $member["_metadata"];
if ($member["name"] === "scootaloo") {
if ((int)date('j') % 2 === 0) {
$metadata["marefriends"] = array_reverse($metadata["marefriends"]);
}
}
?>
<a title="<?= $member["display_name"] ?? $member["name"] ?>" data-bs-toggle="tooltip" class="member-link comparison-item comparison-item-clickable" href="/<?= $systemID === "gdapd" ? "raindrops" : "cloudburst" ?>/<?= $member["name"] ?>">
<img src="/assets/uploads/pt<?= file_exists($_SERVER['DOCUMENT_ROOT'] . "/assets/uploads/pt-" . $member['name'] . ".png") ? "-" . $member['name'] : "" ?>.png" style="width:24px;"> <span style="vertical-align: middle;"><span class="comparison-name-full"><?= $member["display_name"] ?? $member["name"] ?></span><span class="comparison-name-small"><?= getMiniName($member["display_name"] ?? $member["name"]) ?></span></span>
<span class="comparison-colors" style="background-color: #<?= $member["color"] ?? "ffffff" ?>; height: 16px; width: 16px;display: inline-block;vertical-align: middle;border-radius:2px;"></span>
</a>
<span class="comparison-item">
<?php foreach ($metadata["species"] ?? [] as $species): ?>
<img data-bs-toggle="tooltip" title="<?php switch ($species) {
case "earth":
if ($metadata["robot"]) echo "Robot earth pony"; else echo "Earth pony";
break;
case "alicorn":
if ($metadata["robot"]) echo "Robot alicorn"; else echo "Alicorn";
break;
case "crystal":
if ($metadata["robot"]) echo "Robot crystal pony"; else echo "Crystal pony";
break;
case "pegasus":
if ($metadata["robot"]) echo "Robot pegasus"; else echo "Pegasus";
break;
case "batpony":
if ($metadata["robot"]) echo "Robot bat pony"; else echo "Bat pony";
break;
case "unicorn":
if ($metadata["robot"]) echo "Robot unicorn"; else echo "Unicorn";
break;
default:
echo $species . "_" . $metadata["robot"];
break;
} ?>" style="width:24px;vertical-align: middle;position:relative;top:-5px;" src="/assets/species/<?= $species ?><?= $metadata["robot"] ? "-robot" : "" ?>.png" alt="<?= $species ?>">
<?php endforeach; ?>
</span>
<span class="comparison-item">
<?= count($metadata["marefriends"]) + count($metadata["sisters"]) === 0 ? "-" : "" ?>
<span class="comparison-relations-count">
<?= count($metadata["marefriends"]) + count($metadata["sisters"]) > 0 ? count($metadata["marefriends"]) + count($metadata["sisters"]) : "" ?>
</span>
<span class="comparison-relations-full">
<?php $index = 0; foreach ($metadata["marefriends"] as $marefriend): $mfSystem = explode("/", $marefriend)[0]; $mfMemberID = explode("/", $marefriend)[1]; $mfMember = array_filter(json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/$mfSystem-members.json"), true), function ($item) {
global $mfMemberID;
return $item["id"] === $mfMemberID;
}); sort($mfMember); $mfMember = $mfMember[0]; ?><a title="<b><?= $mfMember["display_name"] ?? $mfMember["name"] ?></b><br>Marefriend" data-bs-toggle="tooltip" data-bs-html="true" class="member-link" href="/<?= $mfSystem === "gdapd" ? "raindrops" : "cloudburst" ?>/<?= $mfMember["name"] ?>"><img src="/assets/uploads/pt<?= file_exists($_SERVER['DOCUMENT_ROOT'] . "/assets/uploads/pt-" . $mfMember['name'] . ".png") ? "-" . $mfMember['name'] : "" ?>.png" style="width:24px;"></a><?php $index++; endforeach; ?><?php $index = 0; foreach ($metadata["sisters"] as $marefriend): $mfSystem = explode("/", $marefriend)[0]; $mfMemberID = explode("/", $marefriend)[1]; $mfMember = array_filter(json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/$mfSystem-members.json"), true), function ($item) {
global $mfMemberID;
return $item["id"] === $mfMemberID;
}); sort($mfMember); $mfMember = $mfMember[0]; ?><a title="<b><?= $mfMember["display_name"] ?? $mfMember["name"] ?></b><br>Sister" data-bs-toggle="tooltip" data-bs-html="true" class="member-link" href="/<?= $mfSystem === "gdapd" ? "raindrops" : "cloudburst" ?>/<?= $mfMember["name"] ?>"><img src="/assets/uploads/pt<?= file_exists($_SERVER['DOCUMENT_ROOT'] . "/assets/uploads/pt-" . $mfMember['name'] . ".png") ? "-" . $mfMember['name'] : "" ?>.png" style="width:24px;"></a><?php $index++; endforeach; ?>
</span>
</span>
<span class="comparison-item">
<?php if ($metadata["host"]): ?>
<img data-bs-toggle="tooltip" title="Yes" src="/assets/icons/complete.svg" alt="Yes" style="width:24px;">
<?php else: ?>
<img data-bs-toggle="tooltip" title="No" src="/assets/icons/none.svg" alt="No" style="width:24px;">
<?php endif; ?>
</span>
<span class="comparison-item">
<?php if ($metadata["fictive"]): ?>
<img data-bs-toggle="tooltip" title="Yes" src="/assets/icons/complete.svg" alt="Yes" style="width:24px;">
<?php else: ?>
<img data-bs-toggle="tooltip" title="No" src="/assets/icons/none.svg" alt="No" style="width:24px;">
<?php endif; ?>
</span>
<span class="comparison-item">
<?php if ($metadata["little"] >= 2): ?>
<img data-bs-toggle="tooltip" title="Yes" src="/assets/icons/complete.svg" alt="Yes" style="width:24px;">
<?php elseif ($metadata["little"] === 1): ?>
<img data-bs-toggle="tooltip" title="Age regressor" src="/assets/icons/partial.svg" alt="Partial" style="width:24px;">
<?php else: ?>
<img data-bs-toggle="tooltip" title="No" src="/assets/icons/none.svg" alt="No" style="width:24px;">
<?php endif; ?>
</span>
<span class="comparison-item">
<?php if ($metadata["not_talking"]): ?>
<img data-bs-toggle="tooltip" title="Yes" src="/assets/icons/complete.svg" alt="Yes" style="width:24px;">
<?php else: ?>
<img data-bs-toggle="tooltip" title="No" src="/assets/icons/none.svg" alt="No" style="width:24px;">
<?php endif; ?>
</span>
<span class="comparison-item">
<?php if ($metadata["protector"]): ?>
<img data-bs-toggle="tooltip" title="Yes" src="/assets/icons/complete.svg" alt="Yes" style="width:24px;">
<?php else: ?>
<img data-bs-toggle="tooltip" title="No" src="/assets/icons/none.svg" alt="No" style="width:24px;">
<?php endif; ?>
</span>
<?php endforeach; ?>
</div>
</div>
<?php require_once $_SERVER['DOCUMENT_ROOT'] . '/includes/footer.php'; ?>
|