-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathmusicPlayer.php
More file actions
120 lines (102 loc) · 4.66 KB
/
Copy pathmusicPlayer.php
File metadata and controls
120 lines (102 loc) · 4.66 KB
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
113
114
115
116
117
118
119
120
<?php session_start(); ?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="description" content="">
<title> MUlody Project </title>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js"></script>
<script src='js/document_ready.js'></script>
<script>
$.urlParam = function(name){
var results = new RegExp('[\?&]' + name + '=([^]*)').exec(window.location.href);
if (results==null) return null;
else results = results[1] || 0;
if(results.search("&") != -1) results = results.split('&')[0];
return results;
}
$(document).ready(function(){
var hrefVar=decodeURI($.urlParam('path'));
var full="Music/"+hrefVar;
$('#playingAudio').attr("src", full).detach().appendTo("#audioPlayer");
var title = hrefVar.split('/');
title = title[title.length-1];
$('#audioCardTitle').text(title.slice(0,-4));
var isPlaying = $.urlParam('playing');
if(isPlaying == 1) $("#audioPlayer")[0].play();
var play_mode = $.urlParam('play_mode');
if(play_mode != null){
$('#ctrlBtn > label.active').removeClass('active');
$('#'+play_mode).parent().addClass('active');
}
});
</script>
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" rel="stylesheet">
<style>
body{
padding-top: 70px;
background-image: url("./image/zen01.jpg");
}
</style>
</head>
<body>
<div id="HEADER"></div>
<div class='container-fluid'>
<div class="row">
<div class="offset-md-2 col-md-7">
<?php include "php/playerPane.php"; ?>
<?php include "php/loadComment.php"; ?>
</div><!-- End of col -->
<div class="col-md-3">
<div class="row justify-content-center mr-1">
<div class="btn-group btn-group-toggle mb-1" data-toggle="buttons" id="ctrlBtn">
<label class="btn btn-outline-dark active">
<input type="radio" name="options" id="once" autocomplete="off"> ONCE
</label>
<label class="btn btn-outline-dark">
<input type="radio" name="options" id="loop" autocomplete="off"> LOOP
</label>
</div>
</div>
<ul class="list-group list-group-flush" id="playlist">
<?php include "php/loadPlayList.php"; ?>
</ul>
</div>
</div><!--End of row-->
<div class="modal fade" id="exampleModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="exampleModalLabel">Comment</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div><!--End of modal-header-->
<div class="modal-body">
<form>
<div class="form-group">
<label for="commentator-name" class="col-form-label">Commetator:</label>
<output type="text" class="form-controls" id="commentator-name">
<?php echo $_SESSION['UserName']; ?>
</output>
</div>
<div class="form-group">
<label for="message-text" class="col-form-label">Message:</label>
<textarea class="form-control" name="comment" id="cmtMSG"></textarea>
</div><!--End of form-group-->
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
<button type="button" class="btn btn-primary" data-dismiss="modal" id="commitCmt">Save changes</button>
</div><!--End of modal_footer-->
</form>
</div><!--End of modal-body-->
</div><!--End of modal-content-->
</div><!--End of modal-dialog-->
</div><!--End of modal-->
</div><!-- End of container -->
</body>
<script src="js/playlistAction.js"></script>
<script src="js/leaveComment.js"></script>
</html>