diff options
-rwxr-xr-x[-rw-r--r--] | includes/inc_epg.php | 0 | ||||
-rwxr-xr-x | includes/inc_timers.php | 3 | ||||
-rwxr-xr-x[-rw-r--r--] | includes/inc_utils.php | 0 | ||||
-rwxr-xr-x | includes/inc_vdr.php | 72 | ||||
-rwxr-xr-x | includes/include.php | 9 | ||||
-rwxr-xr-x | index.php | 3 |
6 files changed, 60 insertions, 27 deletions
diff --git a/includes/inc_epg.php b/includes/inc_epg.php index 721cc9f..721cc9f 100644..100755 --- a/includes/inc_epg.php +++ b/includes/inc_epg.php diff --git a/includes/inc_timers.php b/includes/inc_timers.php index 9d66e27..c5ce230 100755 --- a/includes/inc_timers.php +++ b/includes/inc_timers.php @@ -25,7 +25,8 @@ print " <span class=\"arrow\"></span>"; print " </a>"; print " </li>"; print " <form name=\"new_timer\" id=\"new_timer\" method=\"post\" action=\"index.php\">"; -print " <input name=\"action\" type=\"hidden\" id=\"action\" value=\"new_timer\"/>"; +print " <input name=\"action\" type=\"hidden\" id=\"action\" value=\"edit_timer\"/>"; +print " <input name=\"timer\" type=\"hidden\" id=\"timer\" value=\"-1\" />"; print " </form>"; print "</ul>"; diff --git a/includes/inc_utils.php b/includes/inc_utils.php index a984794..a984794 100644..100755 --- a/includes/inc_utils.php +++ b/includes/inc_utils.php diff --git a/includes/inc_vdr.php b/includes/inc_vdr.php index 0a7f48a..79eb22e 100755 --- a/includes/inc_vdr.php +++ b/includes/inc_vdr.php @@ -94,27 +94,40 @@ function vdrgetinfostream($stream = "NULL", $ischan = 1) return array($epgtitle, $epgdesc, $channame); } -function vdrgettimerinfo($timernum=0) +function vdrgettimerinfo($timernum=-1) { global $svdrpip, $svdrpport; - $svdrp = new SVDRP($svdrpip, $svdrpport); - $svdrp->Connect(); - $timer = $svdrp->Command("LSTT " .$timernum); - $svdrp->Disconnect(); - - $timerarray = explode(":", $timer); - - $typearray = explode(" ", $timerarray[0]); - $type = $typearray[1]; - $channel = $timerarray[1]; + if ($timernum != -1) + { + $svdrp = new SVDRP($svdrpip, $svdrpport); + $svdrp->Connect(); + $timer = $svdrp->Command("LSTT " .$timernum); + $svdrp->Disconnect(); + + $timerarray = explode(":", $timer); + + $typearray = explode(" ", $timerarray[0]); + $type = $typearray[1]; + $channel = $timerarray[1]; + $date = $timerarray[2]; + $stime = $timerarray[3]; + $etime = $timerarray[4]; + $desc = $timerarray[7]; + } + else + { + $type = 1; + $channel = 1; + $date = date('Y-m-d'); + $stime = date('Hi'); + $etime = date('Hi'); + $desc = "New timer"; + } + $channame = vdrgetchanname($channel); - $date = $timerarray[2]; - $starthour = $timerarray[3]; - $endhour = $timerarray[4]; - $desc = $timerarray[7]; - - return array($type, $channame, $date, $starthour, $endhour, $desc); + + return array($type, $channame, $date, $stime, $etime, $desc); } function vdrgetchannum($chan = "NULL") @@ -252,6 +265,31 @@ function vdrlistchannels($category = "NULL") fclose($fp); } +function vdrlistchannelsdrop($chansel = "") +{ + global $vdrchannels; + + $chanselected = 0; + + $fp = fopen ($vdrchannels,"r"); + while ($line = fgets($fp, 1024)) + { + if ($line[0] == ":") + continue; + + $channels = explode(":", $line); + $channels = explode(";", $channels[0]); + $chan = $channels[0]; + if (($chan == $chansel) && !$chanselected) + { + print "<option selected value=\"{$chan}\">{$chan}</option>"; + $chanselected = 1; + } + else + print "<option value=\"{$chan}\">{$chan}</option>"; + } +} + function vdrlisttimers() { global $svdrpip, $svdrpport; diff --git a/includes/include.php b/includes/include.php index 4810227..46e758f 100755 --- a/includes/include.php +++ b/includes/include.php @@ -48,9 +48,6 @@ function selectpage() case ("timers"): gen_timers(); break; - case ("new_timer"): - gen_new_timer(); - break; case ("edit_timer"): gen_edit_timer(); break; @@ -111,13 +108,9 @@ function gen_timers() { include('includes/inc_timers.php'); } -function gen_new_timer() -{ - include('new_timer.html'); -} function gen_edit_timer() { - include('edit_timer.html'); + include('includes/inc_edittimer.php'); } @@ -15,11 +15,12 @@ include('includes/include.php'); <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 -selectpage(); + selectpage(); ?> <div id="footer"> |