summaryrefslogtreecommitdiff
path: root/pages/score.php
diff options
context:
space:
mode:
authorMinteck <contact@minteck.org>2022-09-21 22:42:33 +0200
committerMinteck <contact@minteck.org>2022-09-21 22:42:33 +0200
commite95b208af90cc386a7d8d1bcab426727cf4f0121 (patch)
treeb293e0c644513fbeb6e9ad29be97fa6347a55e9f /pages/score.php
parentb5f589c323f415bb42ea7069cb4d1a8a2233dd69 (diff)
downloadpluralconnect-e95b208af90cc386a7d8d1bcab426727cf4f0121.tar.gz
pluralconnect-e95b208af90cc386a7d8d1bcab426727cf4f0121.tar.bz2
pluralconnect-e95b208af90cc386a7d8d1bcab426727cf4f0121.zip
Update time
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));