From 108525534c28013cfe1897c30e4565f9893f3766 Mon Sep 17 00:00:00 2001 From: Minteck Date: Mon, 10 Oct 2022 20:51:39 +0200 Subject: Update --- pages/score.inc | 208 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 208 insertions(+) create mode 100644 pages/score.inc (limited to 'pages/score.inc') diff --git a/pages/score.inc b/pages/score.inc new file mode 100644 index 0000000..e04f9e7 --- /dev/null +++ b/pages/score.inc @@ -0,0 +1,208 @@ + + +
+
+
+

Score system testing

+ +

Raindrops System ()

+
    + $name, + "page" => "/" . $member["name"], + "score" => $score["total"], + "details" => $score + ]; + } + } + + uasort($scores, function($a, $b) { + return $b["score"] - $a["score"]; + }); + + ?> + + +
  • +
    + "> () +
    +
    +
  • + +
+ + +

Cloudburst System ()

+
    + $name, + "page" => "/" . $member["name"], + "score" => $score["total"], + "details" => $score + ]; + } + } + + uasort($scores, function($a, $b) { + return $b["score"] - $a["score"]; + }); + + ?> + + +
  • +
    + "> () +
    +
    +
  • + +
+ +

Global ()

+
    + $name, + "page" => "/" . $member["name"], + "score" => $score["total"], + "details" => $score + ]; + } + } + foreach (json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/ynmuc/members.json"), true) as $member) { + if ($member["name"] !== "unknown" && $member["name"] !== "fusion" && $member["name"] !== "new" && !str_ends_with($member["name"], "-travelling")) { + $name = $member["display_name"] ?? $member["name"]; + require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/score.inc"; + $metadata = parseMetadata(json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/metadata/$member[id].json"), true)); + $score = calculateScore($metadata, $member["display_name"] ?? $member["name"]); + + $scores[] = [ + "name" => $name, + "page" => "/" . $member["name"], + "score" => $score["total"], + "details" => $score + ]; + } + } + + uasort($scores, function($a, $b) { + return $b["score"] - $a["score"]; + }); + + ?> + + +
  • +
    + "> () +
    +
    +
  • + +
+
+
+ + -- cgit