-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdashboard.php
More file actions
189 lines (168 loc) · 7.74 KB
/
Copy pathdashboard.php
File metadata and controls
189 lines (168 loc) · 7.74 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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
<?php
session_start();
if (!isset($_SESSION['username'])) {
$_SESSION['msg'] = "You have to log in first";
header('location: login');
}
//setting variables
require_once "config.php";
$id = $_SESSION['id'];
//getting user proceed value
$result = mysqli_query($link, "SELECT proceed FROM users WHERE id =$id");
$result = mysqli_fetch_row($result);
$proceed = $result[0]??null;
//checking if hint card is active
$result = mysqli_query($link, "SELECT hintca FROM users WHERE id =$id");
$result = mysqli_fetch_row($result);
$hintca = $result[0]??null;
//getting user lvl
$result = mysqli_query($link, "SELECT lvl FROM users WHERE id =$id");
$result = mysqli_fetch_row($result);
$level = $result[0]??null;
//getting user school
$result = mysqli_query($link, "SELECT school FROM users WHERE id =$id");
$result = mysqli_fetch_row($result);
$school = $result[0]??null;
//getting user points
$result = mysqli_query($link, "SELECT points FROM users WHERE id =$id");
$result = mysqli_fetch_row($result);
$points = $result[0]??null;
?>
<html>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta charset="utf-8">
<head>
<title>Dashboard | Crypt@trix 21.0</title>
<link href='https://fonts.googleapis.com/css?family=Raleway:400,100,200,300,400italic,500,100italic,700'
rel='stylesheet' type='text/css'>
<script src="js/fontawesome.js"></script>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x" crossorigin="anonymous">
<link href="https://fonts.googleapis.com/css?family=Dosis|Open+Sans" rel="stylesheet">
<link href='css/main.css' rel='stylesheet' type='text/css'>
<link href='css/dash.css' rel='stylesheet' type='text/css'>
<link rel="icon" href="images/ordin.png" type="image/png">
<script src="https://cdn.jsdelivr.net/npm/@popperjs/core@2.9.2/dist/umd/popper.min.js"
integrity="sha384-IQsoLXl5PILFhosVNubq5LC7Qb9DXgDA9i+tQ8Zj3iwWAwPtgFTxbJ8NT4GN1R8p" crossorigin="anonymous">
</script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/js/bootstrap.min.js"
integrity="sha384-Atwg2Pkwv9vp0ygtn1JAojH0nYbwNJLPhwyoVbhoPwBhjQPR5VtM2+xf0Uwh9KtT" crossorigin="anonymous">
</script>
<script src="https://code.jquery.com/git/jquery-git.min.js" crossorigin="anonymous">
</script>
</head>
<body onload="load()">
<!--- LOADER --->
<div class="load" id="load">
<center>
<div class="loader">
<div class="rect1"></div>
<div class="rect2"></div>
<div class="rect3"></div>
<div class="rect4"></div>
<div class="rect5"></div>
</div>
</center>
</div>
<div class="mainBod" id="mainBod">
<!--- NAVBAR --->
<div class="navb">
<div class="row">
<div class="col-md-2"></div>
<div class="col-md-8">
<a href="index" class="logo-nav"><img src="images/ordin.png"></a>
<a class="button" href="https://discord.gg/jCvpEsCwCD" target="_blank">Join the Discord</a>
</div>
<div class="col-md-2"></div>
</div>
</div>
<!--- HOME --->
<div class="row home">
<div class="col-md-2"></div>
<div class="col-md-4">
<div class="writen left">
<h3>Greetings <?php echo $_SESSION['username']; ?><a href="logout.php" class="logout"><i
class="fal fa-sign-out"></i></a></h3>
<p>Welcome to Crypt@trix 21.0</p>
<p><b>Your School: </b><span><?php echo $school ?></span></p>
<p><b>Your Level: </b><span><?php echo $level ?></span></p>
<p><b>Your Points: </b><span><?php echo $points ?></span></p>
<?php if($hintca != 0) :?>
<p class="inv"><b>Inventory:</b><span> 1x Hint Card</span></p>
<?php endif ?>
<?php if($hintca == 0) :?>
<p class="inv"><b>Inventory:</b><span> --</span></p>
<?php endif ?>
<p class="time-left">
<b>The Hunt starts in:</b><br>
<span id="days"></span> :
<span id="hours"></span> :
<span id="mins"></span> :
<span id="secs"></span>
</p>
<br>
<a href="shop" class="button ">Shop</a>
<?php if($proceed == 0) :?>
<a class="button" href="warning">Play</a>
<?php endif; ?>
<?php if($proceed == 1) :?>
<a class="button" href="play">Play</a>
<?php endif; ?>
</div>
</div>
<div class="col-md-4">
<center>
<img src="images/banda-vector.png" class="img-logo">
</center>
</div>
<div class="col-md-2"></div>
</div>
<!--- FOOTER --->
<div id="footer">
<center>
<div class="footer-text">
<a href="https://discord.gg/jCvpEsCwCD" class="page-links discord" target="_blank"><i
class="fab fa-discord"></i></a>
<a href="https://www.facebook.com/Ordinatrix21.0/" class="page-links facebook" target="_blank"><i
class="fab fa-facebook-square"></i></a>
<a href="https://github.com/pyrotechclub/" class="page-links github" target="_blank"><i
class="fab fa-github"></i></a>
<a href="https://www.instagram.com/ordinatrix21.0/" class="page-links instagram" target="_blank"><i
class="fab fa-instagram"></i></a>
<a href="mailto:cryptatrix@gmail.com" class="page-links email" target="_blank"><i
class="fas fa-envelope"></i></a>
<div class="footer-copy font-alt">
<a href="index">Home</a>
|
<a href="leaderboard">Leaderboard</a>
|
<a href="login">Login</a>
|
<a href="register">Register</a>
|
<a href="rules">Rules</a>
|
<?php if($proceed == 0) :?>
<a href="warning">Play</a>
<?php endif; ?>
<?php if($proceed == 1) :?>
<a href="play">Play</a>
<?php endif; ?>
|
<a href="shop">Shop</a>
</div>
<div class="footer-copy font-alt">
© Pyrotech Club 2021
</div>
</div>
</center>
</div>
</div>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></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="js/index.js"></script>
<script src="js/count.js"></script>
</body>
</html>