forked from LSUCS/LAN-Website
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
26 lines (17 loc) · 1.13 KB
/
index.php
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
<?php
ini_set('display_errors','On');
error_reporting(E_ALL);
setlocale(LC_MONETARY, 'en_GB');
include 'lib/LanWebsite/Autoload.php';
LanWebsite_Main::initialize();
//Force data requirement if at LAN
if (LanWebsite_Main::isAtLan() && (!isset($_GET["page"]) || $_GET["page"] != "account")) {
$user = LanWebsite_Main::getUserManager()->getActiveUser();
//Ticket checks
$ticket = LanWebsite_Main::getDb()->query("SELECT * FROM `tickets` WHERE assigned_forum_id = '%s' AND lan_number = '%s'", $user->getUserId(), LanWebsite_Main::getSettings()->getSetting("lan_number"))->fetch_assoc();
if (!$ticket || $ticket["activated"] == 0 || $user->getFullName() == "" || $user->getEmergencyContact() == "" || $user->getEmergencyNumber() == "") {
header(LanWebsite_Main::buildUrl(false, "account"));
}
}
LanWebsite_Main::route(array("api", "home", "tickets", "whatson", "tournaments", "teams", "info", "account", "profile", "gallery", "map", "contact", "servers", "orderfood", "presentation", "chat", "gamehub", "stats"), "home");
?>