-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.php
127 lines (112 loc) · 5.9 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
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
<?php
require('config.php');
if(loggedInUser()){
redirect(SITE_URL . 'shades.php');
exit();
}
include('includes/header.php');
$gamedesc = mysqli_fetch_assoc(mysqli_query($dbcon, "SELECT * FROM tbl_content WHERE title='Game Description'"));
?>
<div class="wrap hidden">
<div class="container">
<?php
if(isset($_COOKIE['current-snotice'])){
echo '<div class="notice notice-gen success">' . $_COOKIE['current-snotice'] . '</div>';
}
elseif(isset($_COOKIE['current-enotice'])){
echo '<div class="notice notice-gen error">' . $_COOKIE['current-enotice'] . '</div>';
}
?>
<div class="col-6 title" id="tbl">
<div class=" valign-mid">
<p class="shades">shades</p>
<div class="js-div">
<p class="desc">
<?php
$tagline = mysqli_fetch_assoc(mysqli_query($dbcon ,"SELECT * FROM tbl_content WHERE title = 'Game Tagline'"));
echo $tagline['content'];
?>
</p>
<button class="btn-blue btn-big" id="js-play-btn">
<?php
$btn = mysqli_fetch_assoc(mysqli_query($dbcon ,"SELECT * FROM tbl_content WHERE title = 'Button Copy'"));
echo $btn['content'];
?>
</button>
<section class="modal-btn" >
<span id="about">About</span>
</section>
<section class="modal-btn" >
<span id="leaderboard">Leaderboard</span>
</section>
<section class="modal-btn">
<span id="how-to">How to Play</span>
</section>
<section class="modal-btn">
<span id="theme">Light Theme</span>
</section>
<span class="creator">
<?php
$footer = mysqli_fetch_assoc(mysqli_query($dbcon ,"SELECT * FROM tbl_content WHERE title = 'Page Footer'"));
echo $footer['content'];
?></span>
<br>
<span class="creator">Made with ♥ by Carl | Rhan | Shaun</span>
<p class="creator" style="font-size: .75rem;">In loving memory of our dear friend <strong>Carl</strong></p>
</div>
</div>
</div>
<div class="col-6" id="tbl">
<div class="valign-mid">
<img class="right" src="images/sample-card.png" alt="Sample Shades Container" id="js-card-image" />
</div>
</div>
</div>
<div class="modal-wrap login hidden">
<span class="modal-close"></span>
<div class="modal-container">
<div class="modal-head">
<h1>Login to play</h1>
</div>
<div class="modal-body">
<form class="form-wrap" method="post" action="<?php echo htmlspecialchars(SITE_URL . 'login.php') ?>" id="log-form">
<input type="email" name="email" placeholder="email" class="log-email">
<p class="valid valid-log-email">Please enter your registered email</p>
<input type="password" name="password" placeholder="password" class="log-pass">
<p class="valid valid-log-pass">Please enter your password</p>
<button class="js-btn btn-blue btn-wide" name="log" id="log" disabled>sign in</button>
</form>
<span class="modal-btn link-to-reg">Register an account</span>
<a class="modal-btn" href="<?php echo SITE_URL . 'guest'?>" target="_blank" style="margin-top: 10px;">Or play as guest</a>
</div>
</div>
</div>
<div class="modal-wrap register hidden">
<span class="modal-close"></span>
<div class="modal-container">
<div class="modal-head">
<h1>Register an account</h1>
</div>
<div class="modal-body">
<form class="form-wrap" action="<?php echo htmlspecialchars(SITE_URL . 'register.php') ?>" method="post" id="reg-form">
<input type="email" name="reg-email" class="reg-email" placeholder="email">
<p class="valid valid-email">Please enter your email</p>
<input type="password" name="reg-pass" class="reg-pass" placeholder="password">
<p class="valid valid-pass">Please enter your password</p>
<input type="password" name="confirm-pass" class="confirm-pass" placeholder="confirm password">
<p class="valid valid-confirm-pass">Please retype your password</p>
<button class="js-btn btn-orange btn-wide" name="reg" id="reg" disabled>register</button>
</form>
<span class="modal-btn link-to-log">I have an account</span>
</div>
</div>
</div>
<?php
include('includes/howto.php');
include('includes/leaderboard.php');
include('includes/about.php');
?>
</div>
<?php
include('includes/footer.php');
?>