summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xincludes/inc_media.php2
-rw-r--r--includes/inc_mp3.php27
-rwxr-xr-xindexmusic.php32
-rw-r--r--streammusic.php8
4 files changed, 65 insertions, 4 deletions
diff --git a/includes/inc_media.php b/includes/inc_media.php
index b871a42..f39272a 100755
--- a/includes/inc_media.php
+++ b/includes/inc_media.php
@@ -95,7 +95,7 @@ else
|| preg_match("'" .$fileext ." $'", $audiotypes)
)
{
- print "<li class=\"menu\"><a href=\"streammusic.php?file={$dir}{$value}\"><img src=\"images/pictos/audio.png\" /><span class=\"name\">$value</span><span class=\"arrow\"></span></a></li>\r\n";
+ print "<li class=\"menu\"><a href=\"streammusic.php?dir={$dir}&file={$value}\"><img src=\"images/pictos/audio.png\" /><span class=\"name\">$value</span><span class=\"arrow\"></span></a></li>\r\n";
}
}
}
diff --git a/includes/inc_mp3.php b/includes/inc_mp3.php
new file mode 100644
index 0000000..78da942
--- /dev/null
+++ b/includes/inc_mp3.php
@@ -0,0 +1,27 @@
+<?php
+print "<body class=\"ipodlist\" onorientationchange=\"updateOrientation();\" onload=\"updateOrientation();\">\r\n";
+print "<div id=\"topbar\" class=\"transparent\">\r\n";
+print "<div id=\"leftnav\">\r\n";
+print " <a href=\"javascript:sendForm('getback')\">Back</a></div>\r\n";
+print "<div id=\"rightnav\">\r\n";
+print " <a href=\"index.php\"><img alt=\"home\" src=\"images/home.png\" /></a></div>\r\n";
+
+print "<div id=\"title\">iStreamdev</div>\r\n";
+print "</div>\r\n";
+print "<div id=\"content\">\r\n";
+print " <ul>";
+print " <li><a class=\"noeffect\" href=\"javascript:document.s1.Play();\">";
+print " <span class=\"number\">1</span><span class=\"auto\"></span><span class=\"name\">Boom Boom Pow</span><span class=\"time\">4:11</span>";
+print " </a></li>";
+
+print " <li><a class=\"noeffect\" href=\"javascript:document.s2.Play();\">";
+print " <span class=\"number\">2</span><span class=\"auto\"></span><span class=\"name\">Rock That Body</span><span class=\"time\">4:28</span></a></li>";
+
+print "</div>\r\n";
+
+print "<div style=\"position:absolute; left:0; top:0\">";
+print "<embed enablejavascript=\"true\" autoplay=\"false\" height=\"0\" name=\"s1\" src=\"http://a1.phobos.apple.com/us/r2000/004/Music/22/97/88/mzm.lzzanxzf.aac.p.m4a\" width=\"0\" loop=\"true\" controller=\"false\" qtnext1=\"<http://a1.phobos.apple.com/us/r2000/012/Music/a9/6e/92/mzm.chcdvuzt.aac.p.m4a>\" />";
+print "<embed enablejavascript=\"true\" autoplay=\"false\" height=\"0\" name=\"s2\" src=\"http://a1.phobos.apple.com/us/r2000/012/Music/a9/6e/92/mzm.chcdvuzt.aac.p.m4a\" width=\"0\" />";
+print "</div>";
+?>
+
diff --git a/indexmusic.php b/indexmusic.php
new file mode 100755
index 0000000..6fd01a8
--- /dev/null
+++ b/indexmusic.php
@@ -0,0 +1,32 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+<head>
+<meta content="yes" name="apple-mobile-web-app-capable" />
+<meta http-equiv="content-type" content="text/html; charset=UTF-8">
+<meta content="minimum-scale=1.0, width=device-width, maximum-scale=0.6667, user-scalable=no" name="viewport" />
+<link href="css/style.css" rel="stylesheet" type="text/css" />
+<script src="javascript/spinningwheel-min.js" type="text/javascript"></script>
+<script src="javascript/ajax.js" type="text/javascript"></script>
+<script src="javascript/functions.js" type="text/javascript"></script>
+<title>iStreamdev</title>
+<link href="images/startup.png" rel="apple-touch-startup-image" />
+<link rel="apple-touch-icon" href="images/istreamdev.png"/>
+<link rel="stylesheet" href="css/spinningwheel.css" type="text/css" media="all" />
+</head>
+
+
+<?php
+ include ('includes/inc_mp3.php');
+?>
+
+<div id="footer">
+
+ iStreamdev version: <? print $isdversion; ?>
+</div>
+
+</body>
+
+</html>
+
+
diff --git a/streammusic.php b/streammusic.php
index e1170f7..ab93cce 100644
--- a/streammusic.php
+++ b/streammusic.php
@@ -1,14 +1,16 @@
<?php
//set headers to mp3
+$dir = $_GET['dir'];
$file = $_GET['file'];
header("Content-Transfer-Encoding: binary");
header("Content-Type: audio/mp3");
-header('Content-length: ' . filesize($file));
+header('Content-length: ' . filesize($dir.$file));
header('Content-Disposition: attachment; filename="track.mp3"');
header('X-Pad: avoid browser bug');
Header('Cache-Control: no-cache');
-readfile($file);
-die();
+readfile($dir.$file);
+$URL="index.php?action=media&dir=$dir";
+header ("Location: $URL");
?>