summaryrefslogtreecommitdiff
path: root/includes/inc_home.php
diff options
context:
space:
mode:
authorTheTroll <trolldev@gmail.com>2010-02-24 14:16:31 +0100
committerTheTroll <trolldev@gmail.com>2010-02-24 14:16:31 +0100
commit6d2af1fac7bd066b75ebd237cc538e29fd21b729 (patch)
treed9e047923576b6c99cffc3dc66de5e4b77aa8789 /includes/inc_home.php
parent626bd613fd2909cb83fe5b03a19f67a8a9f97d66 (diff)
downloadistreamdev-6d2af1fac7bd066b75ebd237cc538e29fd21b729.tar.gz
istreamdev-6d2af1fac7bd066b75ebd237cc538e29fd21b729.tar.bz2
Now support media sources instead of only one media path (see the $mediasources config variable)
Changed the way we browse dirs (with a mediapath and a subdir)
Diffstat (limited to 'includes/inc_home.php')
-rwxr-xr-xincludes/inc_home.php51
1 files changed, 34 insertions, 17 deletions
diff --git a/includes/inc_home.php b/includes/inc_home.php
index 4996969..9515860 100755
--- a/includes/inc_home.php
+++ b/includes/inc_home.php
@@ -1,30 +1,47 @@
<?php
-global $vdrenabled, $vdrrecpath;
+global $vdrenabled, $vdrrecpath, $mediasources;
print "<body onorientationchange=\"updateOrientation();\" onload=\"updateOrientation();\">\r\n";
print "<div id=\"topbar\" class=\"transparent\">\r\n";
print "<div id=\"title\">iStreamdev</div>\r\n";
print "</div>\r\n";
print "<div id=\"content\">\r\n";
+
+// VDR menus
if ($vdrenabled)
{
- print " <span class=\"graytitle\">VDR</span>\r\n";
- print " <ul class=\"pageitem\">\r\n";
- print " <li class=\"menu\"><a href=\"javascript:sendForm('channels');\"><img src=\"images/pictos/tv.png\" /><span class=\"name\">Channels</span><span class=\"arrow\"></span></a></li>\r\n";
- print " <form name=\"channels\" id=\"channels\" method=\"post\" action=\"index.php\"><input name=\"action\" type=\"hidden\" id=\"action\" value=\"listcategory\" /></form>\r\n";
- print " <li class=\"menu\"><a class=\"noeffect\" href=\"javascript:sendForm('recordings');\"><img src=\"images/pictos/record.png\" /><span class=\"name\">Recordings</span><span class=\"arrow\"></span></a></li>\r\n";
- print " <form name=\"recordings\" id=\"recordings\" method=\"post\" action=\"index.php\"><input name=\"action\" type=\"hidden\" id=\"action\" value=\"recordings\" /><input name=\"dir\" type=\"hidden\" id=\"dir\" value=\"{$vdrrecpath}\" /></form>\r\n";
- print " <li class=\"menu\"><a class=\"noeffect\" href=\"javascript:sendForm('epg');\"><img src=\"images/pictos/epg.png\" /><span class=\"name\">Program Guide</span><span class=\"arrow\"></span></a></li>\r\n";
- print " <form name=\"epg\" id=\"epg\" method=\"post\" action=\"index.php\"><input name=\"action\" type=\"hidden\" id=\"action\" value=\"epg\" /></form>\r\n";
- print " <li class=\"menu\"><a class=\"noeffect\" href=\"javascript:sendForm('timers');\"><img src=\"images/pictos/timers.png\" /><span class=\"name\">Timers</span><span class=\"arrow\"></span></a></li>\r\n";
- print " <form name=\"timers\" id=\"timers\" method=\"post\" action=\"index.php\"><input name=\"action\" type=\"hidden\" id=\"action\" value=\"timers\" /></form>\r\n";
- print " </ul>";
+ print " <span class=\"graytitle\">VDR</span>\r\n";
+ print " <ul class=\"pageitem\">\r\n";
+ print " <li class=\"menu\"><a href=\"javascript:sendForm('channels');\"><img src=\"images/pictos/tv.png\" /><span class=\"name\">Channels</span><span class=\"arrow\"></span></a></li>\r\n";
+ print " <form name=\"channels\" id=\"channels\" method=\"post\" action=\"index.php\"><input name=\"action\" type=\"hidden\" id=\"action\" value=\"listcategory\" /></form>\r\n";
+ print " <li class=\"menu\"><a class=\"noeffect\" href=\"javascript:sendForm('recordings');\"><img src=\"images/pictos/record.png\" /><span class=\"name\">Recordings</span><span class=\"arrow\"></span></a></li>\r\n";
+ print " <form name=\"recordings\" id=\"recordings\" method=\"post\" action=\"index.php\"><input name=\"action\" type=\"hidden\" id=\"action\" value=\"recordings\" /><input name=\"dir\" type=\"hidden\" id=\"dir\" value=\"{$vdrrecpath}\" /></form>\r\n";
+ print " <li class=\"menu\"><a class=\"noeffect\" href=\"javascript:sendForm('epg');\"><img src=\"images/pictos/epg.png\" /><span class=\"name\">Program Guide</span><span class=\"arrow\"></span></a></li>\r\n";
+ print " <form name=\"epg\" id=\"epg\" method=\"post\" action=\"index.php\"><input name=\"action\" type=\"hidden\" id=\"action\" value=\"epg\" /></form>\r\n";
+ print " <li class=\"menu\"><a class=\"noeffect\" href=\"javascript:sendForm('timers');\"><img src=\"images/pictos/timers.png\" /><span class=\"name\">Timers</span><span class=\"arrow\"></span></a></li>\r\n";
+ print " <form name=\"timers\" id=\"timers\" method=\"post\" action=\"index.php\"><input name=\"action\" type=\"hidden\" id=\"action\" value=\"timers\" /></form>\r\n";
+ print " </ul>";
+}
+
+// Media menus
+print " <span class=\"graytitle\">MEDIA</span>\r\n";
+print " <ul class=\"pageitem\">\r\n";
+foreach($mediasources as $sname => $spath)
+{
+ print " <li class=\"menu\">\r\n";
+ print " <a class=\"noeffect\" href=\"javascript:sendForm('media {$sname} {$spath}');\">\r\n";
+ print " <img src=\"images/pictos/media.png\" />\r\n";
+ print " <span class=\"name\">{$sname}</span>\r\n";
+ print " <span class=\"arrow\"></span>\r\n";
+ print " </a>\r\n";
+ print " </li>\r\n";
+ print " <form name=\"media\" id=\"media {$sname} {$spath}\" method=\"post\" action=\"index.php\">\r\n";
+ print " <input name=\"action\" type=\"hidden\" id=\"action\" value=\"media\" />\r\n";
+ print " <input name=\"mediapath\" type=\"hidden\" id=\"mediapath\" value=\"{$spath}\" />\r\n";
+ print " <input name=\"subdir\" type=\"hidden\" id=\"subdir\" value=\"/\" />\r\n";
+ print " </form>\r\n";
}
-print " <span class=\"graytitle\">MEDIA</span>\r\n";
-print " <ul class=\"pageitem\">\r\n";
-print " <li class=\"menu\"><a class=\"noeffect\" href=\"javascript:sendForm('media');\"><img src=\"images/pictos/media.png\" /><span class=\"name\">Media Files</span><span class=\"arrow\"></span></a></li>\r\n";
-print " <form name=\"media\" id=\"media\" method=\"post\" action=\"index.php\"><input name=\"action\" type=\"hidden\" id=\"action\" value=\"media\" /></form>\r\n";
-print " </ul>";
+print " </ul>";
print "</div>";
?>