-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
40 lines (28 loc) · 876 Bytes
/
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
<?php
include($_SERVER['DOCUMENT_ROOT']."/util/php/include_classes.php");
$helper = new Helper();
$currCompetition = $helper->getCurrentCompetition();
if(isset($_COOKIE['deviceID'])){
$status = $helper->getCurrentStatusOfUser($_COOKIE['deviceID'],$currCompetition->id);
if(strpos($status ,"teamSelection") !== false){
if(strpos($status,"-")){
$arr = explode("-",$status);
$WAITING_ON_TEAM = intval($arr[1]);
$match = new Match(intval($arr[2]),intval($currCompetition->id));
}
else{
$WAITING_ON_TEAM = null;
}
require_once("teamSelection.php");
}
else{
$arr = explode("-",$status);
$match = new Match(intval($arr[1]),intval($currCompetition->id));
require_once("matchScouting.php");
}
}
else{
setcookie("deviceID",$helper->getRandomDeviceID(),3650,"/");
require_once("teamSelection.php");
}
?>