-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathplaylist.php
61 lines (47 loc) · 1.35 KB
/
playlist.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
<?php
require_once('frame_header.php');
verifyUserSession();
$userid = $_SESSION["loginUsername"];
if(isset($_GET['pid'])){
$pid=$_GET['pid'];
}
else{
header("Location: user.php");
}
$playlist=new Playlist($conn,$pid);
echo "<input type='hidden' class='userid' value='$userid'>";
echo "<input type='hidden' class='pid' value='$pid'>";
?>
<div class="container-fluid">
<div class="row">
<div class="col-md text-primary">
<span class="details">Playlist:</span> <?php echo $playlist->getTitle() ?>
</div>
<div class="col-md text-primary">
<span class="details">Created By</span> <?php echo $playlist->getOwner() ?>
</div>
<div class="col-md text-primary">
<span class="details">Songs</span> <?php echo $playlist->getNumber() ?>
</div>
<div class="col-md text-primary">
<span class="details">Created At</span> <?php echo $playlist->getDate() ?>
</div>
</div>
<ul class="tracklist">
<?php
$trackIdArray=$playlist->getTrackid();
$array=array();
foreach ($trackIdArray as $trackid) {
array_push($array,$trackid);
}
$displayDrop = true;
if($userid != $playlist->getOwner()){
$displayDrop = false;}
Track::printTracks($conn,$array,true,$displayDrop)
?>
</ul>
</div>
<?php
require_once("includes/optionsMenu.php");
require_once('frame_footer.php');
?>