summaryrefslogtreecommitdiff
path: root/pages/score.php
diff options
context:
space:
mode:
Diffstat (limited to 'pages/score.php')
-rw-r--r--pages/score.php22
1 files changed, 10 insertions, 12 deletions
diff --git a/pages/score.php b/pages/score.php
index 043a695..370d757 100644
--- a/pages/score.php
+++ b/pages/score.php
@@ -1,9 +1,7 @@
<?php
-require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/session.php"; global $isLoggedIn;
-if (!$isLoggedIn) header("Location: /-/login") and die();
-
-$title = "Score system testing"; require_once $_SERVER['DOCUMENT_ROOT'] . '/includes/header.php';
+require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/init.php"; global $title; global $isLoggedIn;
+require_once $_SERVER['DOCUMENT_ROOT'] . '/includes/header.php';
?>
@@ -16,7 +14,7 @@ $title = "Score system testing"; require_once $_SERVER['DOCUMENT_ROOT'] . '/incl
$scores = [];
foreach (json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/gdapd-members.json"), true) as $member) {
- if ($member["name"] !== "unknown" && $member["name"] !== "fusion" && !str_ends_with($member["name"], "-travelling")) {
+ if ($member["name"] !== "unknown" && $member["name"] !== "fusion" && $member["name"] !== "new" && !str_ends_with($member["name"], "-travelling")) {
require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/score.php";
$metadata = parseMetadata(json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/gdapd-$member[id]-metadata.json"), true));
$score = calculateScore($metadata, $member["display_name"] ?? $member["name"]);
@@ -37,7 +35,7 @@ $title = "Score system testing"; require_once $_SERVER['DOCUMENT_ROOT'] . '/incl
$scores = [];
foreach (json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/gdapd-members.json"), true) as $member) {
- if ($member["name"] !== "unknown" && $member["name"] !== "fusion" && !str_ends_with($member["name"], "-travelling")) {
+ 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.php";
$metadata = parseMetadata(json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/gdapd-$member[id]-metadata.json"), true));
@@ -73,7 +71,7 @@ $title = "Score system testing"; require_once $_SERVER['DOCUMENT_ROOT'] . '/incl
$scores = [];
foreach (json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/ynmuc-members.json"), true) as $member) {
- if ($member["name"] !== "unknown" && $member["name"] !== "fusion" && !str_ends_with($member["name"], "-travelling")) {
+ if ($member["name"] !== "unknown" && $member["name"] !== "fusion" && $member["name"] !== "new" && !str_ends_with($member["name"], "-travelling")) {
require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/score.php";
$metadata = parseMetadata(json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/ynmuc-$member[id]-metadata.json"), true));
$score = calculateScore($metadata, $member["display_name"] ?? $member["name"]);
@@ -94,7 +92,7 @@ $title = "Score system testing"; require_once $_SERVER['DOCUMENT_ROOT'] . '/incl
$scores = [];
foreach (json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/ynmuc-members.json"), true) as $member) {
- if ($member["name"] !== "unknown" && $member["name"] !== "fusion" && !str_ends_with($member["name"], "-travelling")) {
+ 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.php";
$metadata = parseMetadata(json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/ynmuc-$member[id]-metadata.json"), true));
@@ -129,7 +127,7 @@ $title = "Score system testing"; require_once $_SERVER['DOCUMENT_ROOT'] . '/incl
$scores = [];
foreach (json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/gdapd-members.json"), true) as $member) {
- if ($member["name"] !== "unknown" && $member["name"] !== "fusion" && !str_ends_with($member["name"], "-travelling")) {
+ if ($member["name"] !== "unknown" && $member["name"] !== "fusion" && $member["name"] !== "new" && !str_ends_with($member["name"], "-travelling")) {
require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/score.php";
$metadata = parseMetadata(json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/gdapd-$member[id]-metadata.json"), true));
$score = calculateScore($metadata, $member["display_name"] ?? $member["name"]);
@@ -138,7 +136,7 @@ $title = "Score system testing"; require_once $_SERVER['DOCUMENT_ROOT'] . '/incl
}
}
foreach (json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/ynmuc-members.json"), true) as $member) {
- if ($member["name"] !== "unknown" && $member["name"] !== "fusion" && !str_ends_with($member["name"], "-travelling")) {
+ if ($member["name"] !== "unknown" && $member["name"] !== "fusion" && $member["name"] !== "new" && !str_ends_with($member["name"], "-travelling")) {
require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/score.php";
$metadata = parseMetadata(json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/ynmuc-$member[id]-metadata.json"), true));
$score = calculateScore($metadata, $member["display_name"] ?? $member["name"]);
@@ -159,7 +157,7 @@ $title = "Score system testing"; require_once $_SERVER['DOCUMENT_ROOT'] . '/incl
$scores = [];
foreach (json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/gdapd-members.json"), true) as $member) {
- if ($member["name"] !== "unknown" && $member["name"] !== "fusion" && !str_ends_with($member["name"], "-travelling")) {
+ 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.php";
$metadata = parseMetadata(json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/gdapd-$member[id]-metadata.json"), true));
@@ -174,7 +172,7 @@ $title = "Score system testing"; require_once $_SERVER['DOCUMENT_ROOT'] . '/incl
}
}
foreach (json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/ynmuc-members.json"), true) as $member) {
- if ($member["name"] !== "unknown" && $member["name"] !== "fusion" && !str_ends_with($member["name"], "-travelling")) {
+ 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.php";
$metadata = parseMetadata(json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/ynmuc-$member[id]-metadata.json"), true));