forked from xathon/logocontest
-
Notifications
You must be signed in to change notification settings - Fork 0
/
thanks.php
169 lines (143 loc) · 8.44 KB
/
thanks.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
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
<?php
session_start();
include_once "helpers.php";
include_once "db_conn.php";
unset($_SESSION['completed']); //that way we can go agane
if(time()>0 && false) {//TODO enter timestamp here (note: we leave it like this for now and worry about this later)
if($_POST == []) {
header("Location: staffvote.php");
}
// Single voting is only used for staff voting. During the regular voting time, you can vote as much as you want.
$query = "select * from ivoted where sessionid = '".session_id()."'";
$q = mysqli_query($remote,$query);
if($q->num_rows > 0) {
echo "You tried to vote more than once, even though we told you not to. Ollie is very disappointed in you.";
die();
}
$query = "insert into ivoted values('".session_id()."',".time().")";
$q = mysqli_query($remote,$query);
$query = "";
if(isset($_POST['ollieburn'])) {
$query = "update logocontest.logos set `ollieburn` = `ollieburn` + 1 where `id` = ".$_POST['ollieburn']."; ";
$q = mysqli_query($remote,$query);
}
$query = "update logocontest.logos set `paint` = `paint` + 1 where `id` = ".$_POST['paint']."; ";
$q = mysqli_query($remote,$query);
$query = "update logocontest.logos set `animal` = `animal` + 1 where `id` = ".$_POST['animal']."; ";
$q = mysqli_query($remote,$query);
$query = "update logocontest.logos set `staff` = `staff` + 1 where `id` = ".$_POST['staff'].";";
$q = mysqli_query($remote,$query);
if(isset($_POST['ollieburn'])) {
$query = "select * from logos where id = ".$_POST['ollieburn'];
$q = mysqli_query($remote,$query);
$ollie = mysqli_fetch_assoc($q);
}
$query = "select * from logos where id = ".$_POST['paint'];
$q = mysqli_query($remote,$query);
$paint = mysqli_fetch_assoc($q);
$query = "select * from logos where id = ".$_POST['animal'];
$q = mysqli_query($remote,$query);
$animal = mysqli_fetch_assoc($q);
$query = "select * from logos where id = ".$_POST['staff'];
$q = mysqli_query($remote,$query);
$staff = mysqli_fetch_assoc($q);
}
echo '<html lang="en" prefix="og: https://ogp.me/ns#">
<head>
<link rel="apple-touch-icon" sizes="180x180" href="https://elohell.gg/media/img/favicon/apple-touch-icon.png?v=1">
<link rel="icon" type="image/png" sizes="32x32" href="https://elohell.gg/media/img/favicon/favicon-32x32.png?v=1">
<link rel="icon" type="image/png" sizes="16x16" href="https://elohell.gg/media/img/favicon/favicon-16x16.png?v=1">
<link rel="manifest" href="https://elohell.gg/media/img/favicon/site.webmanifest?v=1">
<link rel="mask-icon" href="https://elohell.gg/media/img/favicon/safari-pinned-tab.svg?v=1" color="#e53e62">
<link rel="shortcut icon" href="https://elohell.gg/media/img/favicon/favicon.ico?v=1">
<link href="css/global.style.css" rel="stylesheet">
<link href="css/thanks.style.css" rel="stylesheet">
<link href="css/bootstrap-grid.css" rel="stylesheet">
<title>GitGud Logocontest</title>
<meta property="og:title" content="GitGud Logocontest" />
<meta property="og:type" content="website"/>
<meta property="og:url" content="https://logos.elohell.gg/" />
<meta property="og:image" content="https://elohell.gg/media/img/logos/ggs6/GG_V_C_Dark.png">
<meta property="og:description" content="Vote for your favorite team logos in the Elo Hell GitGud Tournament!">
<meta name="theme-color" content="#8633fc">
<meta content="width=device-width, initial-scale=1, shrink-to-fit=no, user-scalable=no" name="viewport">
</head>
<body>
<div class="container-fluid">
<div class="row align-content-center" id="firstrow">
<a target="_blank" rel="noopener noreferrer" href="https://events.elohell.gg/gitgud/info/">
<img id="gg-logo" src="https://elohell.gg/media/img/logos/ggs6/GG_V_C_Dark.png" alt="GitGud logo">
</a>
</div>
<div class="row align-self-center">
<div class="col align-content-center" style="text-align: center">
<h1>THANKS FOR VOTING!</h1>
</div>
</div>
<div class="row align-content-center">
<div class="col" ">
<p>Make sure to follow <a class="link" target="_blank" rel="noopener noreferrer" href="https://twitter.com/elohellesports">@elohellesports on Twitter</a> so you don\'t miss the Round of 16!</p>
</div>
</div>
<div class="row align-self-center w-100" style="margin-top: 2vh">
<a class="btn btn-lg" role="button" href="vote.php">Vote again!</a>
</div>
<div class="row" style="min-width: 720px">
';
if(time()>0 && false) {//TODO enter timestamp here (note: we leave it like this for now and worry about this later)
if(isset($ollie)) {
echo '<div class="col-3" >
<div class="mx-auto">
<h2>OllieBurn award:</h2>
<a href="https://img.elohell.gg/overlay/teams/'.normalize_text($ollie['name']).'.png" target="_logo"><img style="margin:20px" class="img" src="https://img.elohell.gg/overlay/teams/'.normalize_text($ollie['name']).'.png" width="100px" alt="'.$ollie['name'].'"></a>
</div>
</div>
<div class="col-3">
<div class="mx-auto">
<h2>MSPaint award:</h2>
<a href="https://img.elohell.gg/overlay/teams/'.normalize_text($paint['name']).'.png" target="_logo"><img style="margin:20px" class="img" src="https://img.elohell.gg/overlay/teams/'.normalize_text($paint['name']).'.png" width="100px" alt="'.$paint['name'].'"></a>
</div>
</div>
<div class="col-3">
<h2>Animal award:</h2>
<a href="https://img.elohell.gg/overlay/teams/'.normalize_text($animal['name']).'.png" target="_logo"><img style="margin:20px" class="img" src="https://img.elohell.gg/overlay/teams/'.normalize_text($animal['name']).'.png" width="100px" alt="'.$animal['name'].'"></a>
</div>
<div class="col-3">
<h2>Staff Choice:</h2>
<a href="https://img.elohell.gg/overlay/teams/'.normalize_text($staff['name']).'.png" target="_logo"><img style="margin:20px" class="img" src="https://img.elohell.gg/overlay/teams/'.normalize_text($staff['name']).'.png" width="100px" alt="'.$staff['name'].'"></a>
</div>';
} else {
echo '
<div class="col-4">
<div class="mx-auto">
<h2 class="text-center">MSPaint award:</h2>
<a href="https://img.elohell.gg/overlay/teams/'.normalize_text($paint['name']).'.png" target="_logo"><img style="margin:20px" class="img" src="https://img.elohell.gg/overlay/teams/'.normalize_text($paint['name']).'.png" width="100px" alt="'.$paint['name'].'"></a>
</div>
</div>
<div class="col-4">
<div class="mx-auto">
<h2 class="text-center">Animal award:</h2>
<a href="https://img.elohell.gg/overlay/teams/'.normalize_text($animal['name']).'.png" target="_logo"><img style="margin:20px" class="img" src="https://img.elohell.gg/overlay/teams/'.normalize_text($animal['name']).'.png" width="100px" alt="'.$animal['name'].'"></a>
</div>
</div>
<div class="col-4">
<div class="mx-auto">
<h2 class="text-center">Staff Choice:</h2>
<a href="https://img.elohell.gg/overlay/teams/'.normalize_text($staff['name']).'.png" target="_logo"><img style="margin:20px" class="img" src="https://img.elohell.gg/overlay/teams/'.normalize_text($staff['name']).'.png" width="100px" alt="'.$staff['name'].'"></a>
</div>
</div>';
}
}
echo '
</div>
<div class="fixed-bottom">
<a href="https://elohell.gg" style="font-size: 0">
<img src="https://elohell.gg/media/img/logos/Elo-Hell-Logo_H-C-Dark.png" alt="Elo Hell Esports logo">
</a>
</div>
<div class="fixed-bottom nonmobile" style="right: 5px">
<p>Made with ❤ by <a target="_blank" rel="noopener noreferrer" href="https://twitter.com/xathon_" class="link">Xathon</a>. Art by <a target="_blank" rel="noopener noreferrer" href="https://twitter.com/kryyOW" class="link">Kryy.</a></p>
</div>
</div>
</body>
</html>';