-
Notifications
You must be signed in to change notification settings - Fork 0
/
yourMusic.php
54 lines (30 loc) · 1008 Bytes
/
yourMusic.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
<?php
include("includes/includedFiles.php");
?>
<div class="playlistsContainer">
<div class="gridViewContainer">
<h2>PLAYLISTS</h2>
<div class="buttonItems">
<button class="button green" onclick="createPlaylist()">NEW PLAYLIST</button>
</div>
<?php
$username = $userLoggedIn->getUsername();
$playlistsQuery = mysqli_query($con, "SELECT * FROM playlists WHERE owner='$username'");
if(mysqli_num_rows($playlistsQuery) == 0) {
echo "<span class='noResults'>You don't have any playlists yet.</span>";
}
while($row = mysqli_fetch_array($playlistsQuery)) {
$playlist = new Playlist($con, $row);
echo "<div class='gridViewItem' role='link' tabindex='0'
onclick='openPage(\"playlist.php?id=" . $playlist->getId() . "\")'>
<div class='playlistImage'>
<img src='assets/images/icons/playlist.png'>
</div>
<div class='gridViewInfo'>"
. $playlist->getName() .
"</div>
</div>";
}
?>
</div>
</div>