-
Notifications
You must be signed in to change notification settings - Fork 0
/
artists.php
97 lines (86 loc) · 3.59 KB
/
artists.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
<?php
$Page = [
"title" => "MyMusic"
];
require_once("models/SpotifyStats.php");
require_once("models/include/header.php");
if ($User['valid']) {
?>
<div class="text-center">
<h1 class="display-4 mt-5 bold">Top Artists</h1>
</div>
<div class="mt-5 pl-5 pr-5 container wide">
<h2 class="mb-4">Past Week</h2>
<div class="row">
<?php
$i = 0;
foreach (getTopArtist("short_term", 48) as $a) {
$i++; ?>
<div class="col-xl-2 col-lg-2 col-md-4 col-sm-6 col-xs-12">
<div class="card mb-3">
<div class="view overlay zoom">
<img class=<?php echo "'card-img-top cover"; echo ($i > 6) ? "-songs'" : "'"; ?> src=<?php echo "'".$a['image']."'" ?>>
<a href=<?php echo "'".$a['link']."'" ?>>
<div class="mask rgba-white-slight"></div>
</a>
</div>
<div class="card-body">
<h4 class="card-title song-title"><?php echo $a['name'] ?></h4>
<p class="card-text song-sub"><?php echo $a['followers'] ?> Followers</p>
</div>
</div>
</div>
<?php }
?>
</div>
<h2 class="mb-4 mt-4">Past 6 Months</h2>
<div class="row">
<?php
$i = 0;
foreach (getTopArtist("medium_term", 48) as $a) {
$i++; ?>
<div class="col-xl-2 col-lg-2 col-md-4 col-sm-6 col-xs-12">
<div class="card mb-3">
<div class="view overlay zoom">
<img class=<?php echo "'card-img-top cover"; echo ($i > 6) ? "-songs'" : "'"; ?> src=<?php echo "'".$a['image']."'" ?>>
<a href=<?php echo "'".$a['link']."'" ?>>
<div class="mask rgba-white-slight"></div>
</a>
</div>
<div class="card-body">
<h4 class="card-title song-title"><?php echo $a['name'] ?></h4>
<p class="card-text song-sub"><?php echo $a['followers'] ?> Followers</p>
</div>
</div>
</div>
<?php }
?>
</div>
<h2 class="mb-4 mt-4">Past 2 Years</h2>
<div class="row">
<?php
$i = 0;
foreach (getTopArtist("long_term", 48) as $a) {
$i++; ?>
<div class="col-xl-2 col-lg-2 col-md-4 col-sm-6 col-xs-12">
<div class="card mb-3">
<div class="view overlay zoom">
<img class=<?php echo "'card-img-top cover"; echo ($i > 6) ? "-songs'" : "'"; ?> src=<?php echo "'".$a['image']."'" ?>>
<a href=<?php echo "'".$a['link']."'" ?>>
<div class="mask rgba-white-slight"></div>
</a>
</div>
<div class="card-body">
<h4 class="card-title song-title"><?php echo $a['name'] ?></h4>
<p class="card-text song-sub"><?php echo $a['followers'] ?> Followers</p>
</div>
</div>
</div>
<?php }
?>
</div>
</div>
<?php } else {
header("Location: index.php");
} ?>
<?php require_once("models/include/footer.php"); ?>