-
Notifications
You must be signed in to change notification settings - Fork 0
/
skate_sessions.php
85 lines (69 loc) · 2.9 KB
/
skate_sessions.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
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
<!DOCTYPE html>
<?php
session_start();
if (isset($_GET['sessionID'])) {
$_SESSION['preset_session_ID'] = $_GET['sessionID'];
}
?>
<html lang='en'>
<head>
<title>Skate Sessions</title>
<meta name='viewport' content='width=device-width, initial-scale=1, maximum-scale=1'>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.0/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<script src="https://canvasjs.com/assets/script/jquery.canvasjs.min.js"></script>
<script src='js/skate_sessions.js'></script>
<link rel='stylesheet' href='https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css'>
<link rel='stylesheet' href='css/main.css'>
<link rel='stylesheet' href='css/skate_sessions.css'>
</head>
<body>
<div class='row'>
<div class='col-xs-12 col-sm-offset-2 col-sm-8'>
<div id='main'>
<div class='text-right'>
<?php
if (isset($_SESSION['arduino']) && isset($_SESSION['arduino']['userEmail'])) {
echo "<button id='logout-btn' class='btn btn-xs btn-default'><i class='glyphicon glyphicon-log-out'></i> Logout</button>";
} else {
echo "<button id='login-modal-trigger-btn' class='btn btn-xs btn-default' data-toggle='modal' data-target='#login-modal'><i class='glyphicon glyphicon-log-in'></i> Login</button>";
}
?>
</div>
<h1 class='text-center'>Skate Sessions</h1>
<?php
if (isset($_SESSION['arduino']['userEmail'])) {
echo "<div id='main-notice' class='text-center'>No Skate Sessions Yet.</div>";
} else {
echo "<div id='main-notice' class='text-center'>You Are Not Logged In.</div>";
}
?>
<div id='session-list'>
<!-- Populated by JS -->
</div>
</div>
<footer>
<small>Arduino Longboard Project</small>
</footer>
</div>
</div>
<div id='login-modal' class='modal fade' role='dialog'>
<div class='modal-dialog modal-sm'>
<div class='modal-content'>
<div class='modal-header'>
<button type='button' class='close' data-dismiss='modal' action='close-modal'>×</button>
<h4 class='modal-title'>Login</h4>
</div>
<div class='modal-body'>
<input type='text' id='login-email' class='form-control' placeholder="Email">
<input type='password' id='login-pass' class='form-control' placeholder="Password">
</div>
<div class='modal-footer'>
<button class='btn btn-default' data-dismiss='modal' id='close-btn'>Cancel</button>
<button class='btn btn-default' id='login-btn'>Login</button>
</div>
</div>
</div>
</div>
</body>
</html>