-
Notifications
You must be signed in to change notification settings - Fork 0
/
yourMusic.php
38 lines (31 loc) · 1.08 KB
/
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
<?php
include('includes/includedFiles.php');
?>
<div class="playlistContainer">
<div class="gridViewContainer">
<h2>Playlists</h2>
<div class="buttonItems">
<button class="button green" onclick="createPlaylist()">
NEW PLAYLIST
</button>
</div>
<?php
$username = $userLoggedIn->getUsername();
$playlistQuery = mysqli_query($con, "SELECT * FROM playlist WHERE owner='$username'");
if(mysqli_num_rows($playlistQuery) == 0) {
echo "<span class='noResults'>No playlists found.</span>";
}
while($row = mysqli_fetch_array($playlistQuery)) {
$playlist = new Playlist($con, $row);
echo "
<div class='gridViewItem' role='link' targetIndex='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>