-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstream_body.php
More file actions
60 lines (60 loc) · 1.81 KB
/
stream_body.php
File metadata and controls
60 lines (60 loc) · 1.81 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
<?php
include "info.php";
include "config.php";
include "utils.php";
include "info2html.php";
$dir = "";
$search = "";
$arg = "";
$sort = $settings->default_sort;
EXTRACT($_GET);
EXTRACT($_POST);
$dir = decodeHTML($dir);
$sort_array = explode(",",$sort);
$fp = fsockopen($settings->host,$settings->port,$errno,$errstr,10);
if(!$fp) {
echo "$errstr ($errno)<br>\n";
}
else {
while(!feof($fp)) {
$got = fgets($fp,1024);
if(strncmp("OK",$got,strlen("OK"))==0)
break;
print "$got<br>";
if(strncmp("ACK",$got,strlen("ACK"))==0)
break;
}
if(isset($logout) && $logout=="logout") {
setcookie("phpMp_password","");
$has_password = 0;
}
$dir_url = sanitizeForURL($dir);
displayDirectory($dir,$sort,"Back to Directory",0,0);
print "<br>\n";
print "<form style=\"padding:0;margin:0;\" action=playlist.php? target=playlist method=get>\n";
print "<table border=0 cellspacing=1 bgcolor=\"";
print $colors["music"]["title"];
print "\" width=\"100%\">\n";
print "<tr><td><b>Add Stream</b></td></tr>\n";
print "<tr bgcolor=\"";
print $colors["music"]["body"][0];
print "\"><td>\n";
$dir_url = sanitizeForURL($dir);
print "<input type=input name=stream size=40>\n";
print "<input type=submit value=add name=foo><br>";
print "</td></tr></table></form>\n";
print "<br>\n";
print "<form style=\"padding:0;margin:0;\" enctype=\"multipart/form-data\" action=playlist.php? target=playlist method=post>\n";
print "<table border=0 cellspacing=1 bgcolor=\"";
print $colors["music"]["title"];
print "\" width=\"100%\">\n";
print "<tr><td><b>Load Stream From Playlist</b></td></tr>\n";
print "<tr bgcolor=\"";
print $colors["music"]["body"][0];
print "\"><td>\n";
print "<input type=file name=playlist_file size=30>\n";
print "<input type=submit value=load name=foo><br>";
print "</td></tr></table></form>\n";
}
ob_end_flush();
?>