-
Notifications
You must be signed in to change notification settings - Fork 1
/
playlist.php
112 lines (96 loc) · 2.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
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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Home</title>
<link rel="stylesheet" href="css/bootstrap.css">
<link rel="stylesheet" href="style_main.css">
<link rel="stylesheet" href="css/font-awesome.css">
<script src="js/jquery.js"></script>
<script src="js/bootstrap.js"></script>
</head>
<style>
.btn{
width:150px;
margin-top:10px;
}
#just
{
float: left;
}
#img{
padding: 4px;
margin-left: -20px;
}
#just{
height: 50px;
width:100%;
}
#lis li{
width:auto;
}
ul.addon li{
color:blue;
}
iframe{
-moz-border-radius: 12px;
-webkit-border-radius: 12px;
border-radius: 12px;
-moz-box-shadow: 4px 4px 14px #000;
-webkit-box-shadow: 4px 4px 14px #000;
box-shadow: 4px 4px 14px #000;
-moz-transform:rotate(20deg);
-webkit-transform:rotate(20deg);
-o-transform:rotate(20deg);
-ms-transform:rotate(20deg);
filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=.2);
}
.head{
color:black;
font-family: sans-serif;
text-shadow: 1px 1.2px 2px grey;
}
</style>
<body>
<div id="just"></div>
<div class="row">
<div class="col-sm-8 col-md-4 col-md-offset-2">
<!--fetch playlist-->
<?php
// get uid
include('dbconfig.php');
/*$user=$_SESSION["email"];
$u="SELECT * FROM user_details WHERE `email`='$user' ";
$r=mysqli_query($con,$sql);
$row=mysqli_fetch_assoc($r);
$uid=$row["uid"];
*/
$uid=1;
//get all playlists of user and display it
$sql="SELECT * FROM playlist_user WHERE uid='$uid' ";
$r=mysqli_query($con,$sql);
?>
<ul class="list-type addon">
<?php
while($row=mysqli_fetch_assoc($r))
{
echo "<li class='list-group-item head' style:'color:black;'><i class='fa fa-caret-down'></i> ".$row["playlist_name"]." <i class='fa fa-caret'></i>";
echo "<ul>";
$pid=$row["p_id"];
$n=$row["playlist_name"];
$sl="SELECT * FROM playlist_song WHERE `pid`='$uid' ";
$rr=mysqli_query($con,$sl);
while($row1=mysqli_fetch_assoc($rr))
{
echo "<li style='float:left;list-style:none;'><i class='fa fa-music'></i> ".$row1["song_name"]."</li>";
echo "<li style='float:right;list-style:none'><a href='delete_playlist.php?playlist_id=".$pid."&playlist_song=".$row1["song_name"]."'><i class='fa fa-minus-circle'></i></li><br/>";
}
echo "</ul>";
echo "</li>";
}
?>
</ul>
</div>
<div class="col-sm-2 col-md-3"><img src="images/playlist.jpg" id="img"/>
</div>
</body>
</html>