-
Notifications
You must be signed in to change notification settings - Fork 0
/
browse.php
63 lines (45 loc) · 1.94 KB
/
browse.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
<?php
include("includes/included_files.php");
?>
<h1 class="text-center heading"> POPULAR ALBUMS </h1>
<div class="gridviewContainer p-5 text-center">
<?php
$albumQuery = mysqli_query($con, "SELECT * from albums ORDER BY RAND() LIMIT 10");
while($row= mysqli_fetch_array($albumQuery)){
echo "<span role='link' tabindex='0' onclick='openPage(\"album.php?id=" . $row['id'] . "\")' class='album-links'>
<div class='grid-view-item'>
<img src='" . $row['image'] . "'alt='img' class='album-img'>
<div class='album-title grid-view-info text-center'>". $row['title'] . "</div>
</div>
</span>";
}
?>
</div>
<h1 class="text-center heading"> POPULAR ARTISTS </h1>
<div class="gridviewContainer p-5 text-center">
<?php
$artistQuery = mysqli_query($con, "SELECT * from artists ORDER BY RAND() LIMIT 10");
while($row= mysqli_fetch_array($artistQuery)){
echo "<span role='link' tabindex='0' onclick='openPage(\"artist.php?id=" . $row['id'] . "\")' class='album-links'>
<div class='grid-view-item'>
<img src='" . $row['artist_image'] . "'alt='img' class='album-img'>
<div class='album-title grid-view-info text-center'>". $row['name'] . "</div>
</div>
</span>";
}
?>
</div>
<h1 class="text-center heading"> POPULAR GENRES </h1>
<div class="gridviewContainer p-5 text-center">
<?php
$genreQuery = mysqli_query($con, "SELECT * from genres");
while($row= mysqli_fetch_array($genreQuery)){
echo "<span role='link' tabindex='0' onclick='openPage(\"genre.php?id=" . $row['id'] . "\")' class='album-links'>
<div class='grid-view-item'>
<img src='" . $row['image'] . "'alt='img' class='album-img'>
<div class='album-title grid-view-info text-center'>". ucfirst($row['name']) . "</div>
</div>
</span>";
}
?>
</div>