From 7974f9126dc10821cc6992740350539559616c53 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christer=20War=C3=A9n?= Date: Thu, 30 Mar 2023 19:08:32 +0300 Subject: [PATCH] Initial Commit --- .htaccess | 14 ++ LICENSE | 21 ++ assets/images/logo.svg | 130 +++++++++++ assets/images/symbol.svg | 315 +++++++++++++++++++++++++++ datastore/schedule.json | 141 ++++++++++++ datastore/tournaments.json | 97 +++++++++ index.php | 430 +++++++++++++++++++++++++++++++++++++ 7 files changed, 1148 insertions(+) create mode 100644 .htaccess create mode 100644 LICENSE create mode 100644 assets/images/logo.svg create mode 100644 assets/images/symbol.svg create mode 100644 datastore/schedule.json create mode 100644 datastore/tournaments.json create mode 100644 index.php diff --git a/.htaccess b/.htaccess new file mode 100644 index 0000000..cd86782 --- /dev/null +++ b/.htaccess @@ -0,0 +1,14 @@ + +RewriteEngine On +RewriteOptions IgnoreInherit + +RewriteEngine On +RewriteCond %{ENV:HTTPS} !on +RewriteCond %{REQUEST_URI} !^/?\.well-known/acme-challenge/ +RewriteRule (.*) https://%{SERVER_NAME}%{REQUEST_URI} [R=301,L] + +RewriteCond %{REQUEST_FILENAME} !-f +RewriteCond %{REQUEST_FILENAME} !-d +RewriteRule ^(.*)$ index.php [NC,L,QSA] + + diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..8edabfa --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2022 Verkkopeliyhdistys Insomnia ry & Warén Group + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/assets/images/logo.svg b/assets/images/logo.svg new file mode 100644 index 0000000..1747656 --- /dev/null +++ b/assets/images/logo.svg @@ -0,0 +1,130 @@ + + + + Insomnia XXII - Logo + +Insomnia XXII - Logo2022-08-18Tatu-Topias Paski diff --git a/assets/images/symbol.svg b/assets/images/symbol.svg new file mode 100644 index 0000000..87e4c82 --- /dev/null +++ b/assets/images/symbol.svg @@ -0,0 +1,315 @@ + + + + + Insomnia XXII – Logo + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + Insomnia XXII – Logo + + + Christer Warén + + + + + + + + 2021-11-23 + + + Warén Group + + + + + + + + + + + + diff --git a/datastore/schedule.json b/datastore/schedule.json new file mode 100644 index 0000000..0b4bce5 --- /dev/null +++ b/datastore/schedule.json @@ -0,0 +1,141 @@ +[ + { + "title": "Ovet aukeaa", + "area": "Insomnia XXII", + "time": { + "27.10.2022 klo 18:00": "27.10.2022 klo 18:00" + } + }, + { + "title": "Info-piste", + "area": "Aula", + "time": { + "27.10.2022 klo 18:00": "28.10.2022 klo 1:00", + "28.10.2022 klo 9:00": "29.10.2022 klo 1:00", + "29.10.2022 klo 9:00": "29.10.2022 klo 1:00", + "30.10.2022 klo 9:00": "30.10.2022 klo 12:00" + } + }, + { + "title": "Satamaito", + "area": "Aula", + "partner": { + "name": "Satamaito", + "link": "https://satamaito.fi" + }, + "time": { + "27.10.2022 klo 18:00": "29.10.2022 klo 16:00" + } + }, + { + "title": "VR-piste", + "area": "Aula", + "time": { + "27.10.2022 klo 18:00": "27.10.2022 klo 23:55", + "28.10.2022 klo 10:00": "28.10.2022 klo 21:00", + "29.10.2022 klo 10:00": "29.10.2022 klo 21:00", + "30.10.2022 klo 9:00": "30.10.2022 klo 12:00" + } + }, + { + "title": "Konsolialue", + "area": "Konsolialue", + "time": { + "27.10.2022": "27.10.2022", + "28.10.2022": "28.10.2022", + "29.10.2022": "29.10.2022", + "30.10.2022": "30.10.2022" + } + }, + { + "title": "Digitaalisen pelaamisen aakkoset", + "area": "Auditorio", + "partner": { + "name": "100k esports", + "link": "https://100koo.org" + }, + "time": { + "27.10.2022 klo 19:00": "27.10.2022 klo 20:30" + } + }, + { + "title": "Avauspuhe", + "area": "Lava", + "time": { + "27.10.2022 klo 21:00": "27.10.2022 klo 21:10" + } + }, + { + "title": "Valot pois", + "area": "Sali", + "time": { + "27.10.2022 klo 21:10": "27.10.2022 klo 21:10" + } + }, + { + "title": "DJ Vice Nando", + "area": "Sali", + "time": { + "27.10.2022 klo 21:10": "27.10.2022 klo 21:45" + } + }, + { + "title": "Ohjaamo Pori", + "area": "Aula", + "partner": { + "name": "Ohjaamo Pori", + "link": "https://ohjaamot.fi/web/ohjaamo-pori" + }, + "time": { + "28.10.2022 klo 13:00": "28.10.2022 klo 15:00" + } + }, + { + "title": "Game-Info", + "area": "Game-Info", + "time": { + "28.10.2022 klo 15:00": "28.10.2022 klo 16:00", + "28.10.2022 klo 16:30": "28.10.2022 klo 18:00", + "29.10.2022 klo 8:30": "29.10.2022 klo 10:00", + "29.10.2022 klo 12:00": "29.10.2022 klo 18:00" + } + }, + { + "title": "Robosota", + "area": "Nukkumatila", + "time": { + "29.10.2022 klo 13:00": "29.10.2022 klo 17:00" + } + }, + { + "title": "Satakunnan Airsoft ry", + "area": "Aula", + "partner": { + "name": "Satakunnan Airsoft ry", + "link": "https://satasoft.info" + }, + "time": { + "28.10.2022 klo 16:00": "28.10.2022 klo 20:00", + "29.10.2022 klo 14:00": "29.10.2022 klo 18:00" + } + }, + { + "title": "Pori eSport", + "area": "Aula", + "partner": { + "name": "Pori eSport", + "link": "https://porinravit.fi/esports" + }, + "time": { + "28.10.2022 klo 10:00": "28.10.2022 klo 15:30", + "29.10.2022 klo 12:00": "29.10.2022 klo 15:00" + } + }, + { + "title": "Insomnia x Skynett Lan - CS:GO Ystävyysottelu", + "area": "Lava", + "time": { + "29.10.2022 klo 22:00": "29.10.2022 klo 23:59" + } + } +] diff --git a/datastore/tournaments.json b/datastore/tournaments.json new file mode 100644 index 0000000..36b4745 --- /dev/null +++ b/datastore/tournaments.json @@ -0,0 +1,97 @@ +[ + { + "title": "Call of Duty: Modern Warfare 2 (2009)", + "area": "Konsolialue", + "link": "https://challonge.com/insxxii_mw2", + "time": { + "28.10.2022 klo 16:00": "28.10.2022 klo 20:00" + } + }, + { + "title": "Super Smash Bros: Ultimate", + "area": "Konsolialue", + "link": "https://challonge.com/insxxii_ssbu", + "time": { + "28.10.2022 klo 16:00": "28.10.2022 klo 20:00", + "29.10.2022 klo 20:00": "29.10.2022 klo 20:30" + } + }, + { + "title": "Minecraft", + "link": "https://challonge.com/insxxii_minecraft", + "time": { + "28.10.2022 klo 18:00": "29.10.2022 klo 21:00" + } + }, + { + "title": "Overwatch 2", + "link": "https://challonge.com/insxxii_overwatch2", + "partner": { + "name": "Suomi OW", + "link": "https://twitter.com/SuomiOverwatch" + }, + "time": { + "28.10.2022 klo 18:30": "28.10.2022 klo 23:59" + } + }, + { + "title": "Fall Guys", + "link": "https://challonge.com/insxxii_fallguys", + "time": { + "29.10.2022 klo 0:00": "29.10.2022 klo 2:00" + } + }, + { + "title": "Arma 3", + "link": "https://challonge.com/insxxii_arma3", + "partner": { + "name": "Porin Seudun Reserviläisliitto ry", + "link": "https://porin-seudun-reservilaiset.reservilaisliitto.fi" + }, + "time": { + "29.10.2022 klo 10:00": "29.10.2022 klo 14:00" + } + }, + { + "title": "League of Legends", + "link": "https://challonge.com/insxxii_lol", + "partner": { + "name": "LOL Finland" + }, + "time": { + "29.10.2022 klo 14:00": "29.10.2022 klo 16:00" + } + }, + { + "title": "Beat Saber (VR)", + "link": "https://challonge.com/insxxii_bs", + "time": { + "29.10.2022 klo 14:00": "29.10.2022 klo 16:00" + } + }, + { + "title": "Crash Team Racing", + "link": "https://challonge.com/insxxii_ctr", + "partner": { + "name": "100k esports", + "link": "https://100koo.org" + }, + "time": { + "29.10.2022 klo 16:00": "29.10.2022 klo 18:00" + } + }, + { + "title": "Rocket League", + "link": "https://challonge.com/insxxii_rl", + "time": { + "29.10.2022 klo 17:00": "29.10.2022 klo 21:30" + } + }, + { + "title": "Pro Pilkki", + "link": "https://challonge.com/insxxii_pilkki", + "time": { + "30.10.2022 klo 00:00": "30.10.2022 klo 02:00" + } + } +] diff --git a/index.php b/index.php new file mode 100644 index 0000000..972a33b --- /dev/null +++ b/index.php @@ -0,0 +1,430 @@ + + + + + Insomnia XXII - Extra + + + + + + + + + + + + + + + + + +
+ +
+
+

Aikataulu

+
+ + +
+

'.$program['title'].(isset($program['partner']['name']) && $program['partner']['name'] != '' && $program['title'] != $program['partner']['name'] ? ' by '.$program['partner']['name'] : "").'

+

'.$program['area'].'

+

+'; + + foreach($program['time'] as $startTime => $endTime){ + $startTime = explode(" ", $startTime); + $endTime = explode(" ", $endTime); + + if($startTime[0] == $date || $endTime[0] == $date || $_GET['all'] == '1'){ + if($startTime[0] != $endTime[0]){ + echo implode(" ", $startTime).' - '.implode(" ", $endTime).'
'; + } else { + if(isset($startTime[2]) && isset($endTime[2])){ + if($_GET['all'] == '1'){ + echo $startTime[0].' klo '.$startTime[2].' - '.$endTime[2].'
'; + } else { + echo ''.$startTime[2].' - '.$endTime[2].''.'
'; + } + } else { + echo $startTime[0].'
'; + } + } + } + } + +echo ' +

+
+ +'; + } + } + + ?> + + Näytä kaikki +

Varaamme oikeudet muutoksiin

+ + Siirry ylös +
+ + + + + + +
+
+

Turnaukset

+
+ + +
+

'.$tournament['title'].(isset($tournament['partner']['name']) && $tournament['partner']['name'] != '' ? ' by '.$tournament['partner']['name'] : "").'

+

+'; + + foreach($tournament['time'] as $startTime => $endTime){ + $startTime = explode(" ", $startTime); + $endTime = explode(" ", $endTime); + + if($startTime[0] == $date || $endTime[0] == $date || $_GET['all'] == '1'){ + if($startTime[0] != $endTime[0]){ + echo implode(" ", $startTime).' - '.implode(" ", $endTime).'
'; + } else { + if(isset($startTime[2]) && isset($endTime[2])){ + if($_GET['all'] == '1'){ + echo $startTime[0].' klo '.$startTime[2].' - '.$endTime[2].'
'; + } else { + echo ''.$startTime[2].' - '.$endTime[2].''.'
'; + } + } else { + echo $startTime[0].'
'; + } + } + } + } + +echo ' +

+
+ + Lisätietoa turnauksesta + +'; + } + } + + ?> + + Näytä kaikki +

Varaamme oikeudet muutoksiin

+ + Siirry ylös +
+ +
+
+

Info

+
+ + + + Siirry ylös +
+ +
+
+

Seuraa meitä somessa

+
+ +
    +
  • + +
  • + +
  • +
+ + Siirry ylös +
+
+ + +