-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathpoints.php
153 lines (144 loc) · 6.31 KB
/
points.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
<?php
include "templates/head.php";
require_once("inc/config.inc.php");
require_once("inc/functions.inc.php");
?>
<body>
<?php
include "templates/header.html";
?>
<!-- Content -->
<div class="metaportal_fn_content">
<!-- Home Section -->
<section id="home">
<div class="container">
<h3 class="fn__maintitle big" data-text="Most Points" data-align="center">Most Points</h3>
<?php
$stmt = $pdo->query("SELECT * FROM users ORDER BY points DESC LIMIT 7;");
$arr = array();
while ($row = $stmt->fetch()) {
$arr[] = $row["discord_pb"];
}
?>
<!-- Slider -->
<div class="fn_cs_slider" data-responsive="on">
<div class="slider_top">
<img src="/assets/img/1x1.jpg" alt="">
<ul>
<li class="prev" data-index="1">
<div class="item">
<img src="/assets/img/1x1.jpg" alt="">
<div class="item_in">
<div class="img" data-bg-img="<?php echo $arr[6]; ?>?size=1024"></div>
</div>
</div>
</li>
<li class="active" data-index="2">
<div class="item">
<img src="/assets/img/1x1.jpg" alt="">
<div class="item_in">
<div class="img" data-bg-img="<?php echo $arr[0]; ?>?size=1024"></div>
</div>
</div>
</li>
<li class="next" data-index="3">
<div class="item">
<img src="/assets/img/1x1.jpg" alt="">
<div class="item_in">
<div class="img" data-bg-img="<?php echo $arr[1]; ?>?size=1024"></div>
</div>
</div>
</li>
<li class="next2" data-index="4">
<div class="item">
<img src="/assets/img/1x1.jpg" alt="">
<div class="item_in">
<div class="img" data-bg-img="<?php echo $arr[2]; ?>?size=1024"></div>
</div>
</div>
</li>
<li data-index="5">
<div class="item">
<img src="/assets/img/1x1.jpg" alt="">
<div class="item_in">
<div class="img" data-bg-img="<?php echo $arr[3]; ?>?size=1024"></div>
</div>
</div>
</li>
<li data-index="6">
<div class="item">
<img src="/assets/img/1x1.jpg" alt="">
<div class="item_in">
<div class="img" data-bg-img="<?php echo $arr[4]; ?>?size=1024"></div>
</div>
</div>
</li>
<li class="prev2" data-index="7">
<div class="item">
<img src="/assets/img/1x1.jpg" alt="">
<div class="item_in">
<div class="img" data-bg-img="<?php echo $arr[5]; ?>?size=1024"></div>
</div>
</div>
</li>
</ul>
</div>
<div class="slider_nav">
<a href="#" class="prev">
<span class="circle"></span>
<span class="icon"><img src="/assets/svg/down.svg" alt="" class="fn__svg"></span>
<span class="circle"></span>
</a>
<a href="#" class="next">
<span class="circle"></span>
<span class="icon"><img src="/assets/svg/down.svg" alt="" class="fn__svg"></span>
<span class="circle"></span>
</a>
</div>
</div>
<!-- !Slider -->
</div>
</section>
<!-- !Home Section -->
<section>
<div class="container small">
<div class="metaportal_fn_drops">
<ul class="grid">
<?php
$stmt = $pdo->query("SELECT * FROM users ORDER BY points DESC");
$i = 1;
while ($row = $stmt->fetch()) {
$color = "";
if ($i == 1) {
$color = 'style="border-color: #ffd700;"';
} else if ($i == 2) {
$color = 'style="border-color: #C0C0C0;"';
} else if ($i == 3) {
$color = 'style="border-color: #CD7F32;"';
}
echo '<li>
<div class="nft__item" ' . $color . '>
<br>
<div class="img_holder">
<img src="' . $row["discord_pb"] . '?size=128" alt="" style="border-radius: 12px;" width="128px">
<a href="/s' . $row["website_url"] . '" class="full_link"></a>
</div>
<div class="title_holder">
<h3 class="fn_title"><a href="#"><b>' . $row["discord_username"] . '</b></a></h3>
<h6>' . $row["points"] . ' Punkte</h6>
</div>
</div>
</li>';
$i++;
}
?>
</ul>
</div>
</div>
</section>
<!-- Fun Facts -->
<?php
include "templates/footer.html";
?>
</body>
</html>