-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.php
More file actions
96 lines (79 loc) · 3.93 KB
/
Copy pathindex.php
File metadata and controls
96 lines (79 loc) · 3.93 KB
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
<?php
require_once 'debugSettings.php';
require_once '../dbinfo/dbcred.php';
require_once 'DBSessionHandler.php';
if(!isset($GLOBALS['loggingIn']) || !$GLOBALS['loggingIn']){
$handler = new DBSessionHandler();
session_set_save_handler($handler);
session_start();
}
// Check if the user is logged in, if not then redirect him to login page
if ( !isset($_SESSION["loggedin"]) || $_SESSION["loggedin"] !== true ) {
header("location: login.php");
//var_dump($_SESSION);
exit;
}
require_once('UserManager.php');
$usrManager = new UserManager();
if(isset($_SESSION['email'])){
$_SESSION['userObject'] = $usrManager->getUserByEmail($_SESSION['email']);
$_SESSION['role'] = $_SESSION['userObject']['role'];
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<title>Santa Bingo</title>
<meta charset="utf-8">
<?php include 'ogData.htm'; ?>
<meta name="viewport" content="width=device-width, initial-scale=1.0, viewport-fit=cover">
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
<link rel="stylesheet" type="text/css" href="styles.css">
<link rel="canonical" href="https://blake-ink.com/SantaBingo/">
<link rel="icon" href="https://blake-ink.com/SantaBingo/favicon-32x32.png">
<link rel="apple-touch-icon" href="/path/to/apple-touch-icon.png">
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js" integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.8.2/angular.min.js"></script>
<script type="text/javascript" src="SBApp.js"></script>
<script type="text/javascript" src="GameCtrl.js"></script>
<script type="text/javascript" src="NotificationCtrl.js"></script>
</head>
<body class="bg-grad-red" ng-app="SBApp">
<div ng-controller="AppCtrl" ng-cloak="">
<div class="snowflakes" aria-hidden="true" ng-if="!game.active">
<div class="snowflake" ng-repeat="x in [].constructor(snowflakes) track by $index">❅</div>
</div>
<button class="btn btn-sm btn-outline-secondary" style="position: absolute; top: 20px; right: 20px; border-style: none; padding: 10px;" data-toggle="modal" data-target="#userDataModal">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-person-square" viewBox="0 0 16 16">
<path fill-rule="evenodd" d="M14 1H2a1 1 0 0 0-1 1v12a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1V2a1 1 0 0 0-1-1zM2 0a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V2a2 2 0 0 0-2-2H2z"/>
<path fill-rule="evenodd" d="M2 15v-1c0-1 1-4 6-4s6 3 6 4v1H2zm6-6a3 3 0 1 0 0-6 3 3 0 0 0 0 6z"/>
</svg>
</button>
<?php include 'userDataModal.php';?>
<div class="container" style="margin-top: 20px;">
<div class="d-flex justify-content-center">
<!--<h1 class="m-2" >SANTA BINGO</h1>-->
<img class="logoHero" src="./SVG/SB_logo_red.svg" ng-if="!game.active">
<img class="logoHero" src="./SVG/SB_logo_green.svg" ng-if="game.active">
</div>
<div class="row m-2">
<div style="width: 100%;" class="m-2 p-2">
<div class="d-flex justify-content-center m-2" style="font-weight: lighter; color: #FFFFFF66;">
<?php include 'NotificationsView.php'?>
</div>
<?php
include 'activeGameContent.php';
?>
</div>
</div>
<?php include 'lobbyList.php';?>
<div><?php
//echo json_encode($_SESSION['role']);
//echo json_encode($_SESSION['email']);
?></div>
</div>
</div>
</body>
</html>