diff options
author | TheTroll <trolldev@gmail.com> | 2010-02-22 23:22:26 +0100 |
---|---|---|
committer | TheTroll <trolldev@gmail.com> | 2010-02-22 23:22:26 +0100 |
commit | 22136c401ac7f240f60d0d9ce71c7274429b38e0 (patch) | |
tree | 2c6de263f5527de9c4031dc2e1fcbc121e99858f /includes/include.php | |
parent | e897147a3acb1ca4baacf0f5fec976a0ea8c90ee (diff) | |
download | istreamdev-22136c401ac7f240f60d0d9ce71c7274429b38e0.tar.gz istreamdev-22136c401ac7f240f60d0d9ce71c7274429b38e0.tar.bz2 |
Timers implemntation WIP
Diffstat (limited to 'includes/include.php')
-rwxr-xr-x | includes/include.php | 32 |
1 files changed, 31 insertions, 1 deletions
diff --git a/includes/include.php b/includes/include.php index 46e758f..4cf2834 100755 --- a/includes/include.php +++ b/includes/include.php @@ -48,9 +48,22 @@ function selectpage() case ("timers"): gen_timers(); break; - case ("edit_timer"): + case ("edittimer"): gen_edit_timer(); break; + case ("deletetimer"): + $timer = $_REQUEST['timer']; + delete_timer($timer); + break; + case ("addtimer"): + $channame = $_REQUEST['chan']; + $date = $_REQUEST['date']; + $stime = $_REQUEST['stime']; + $etime = $_REQUEST['etime']; + $desc = $_REQUEST['desc']; + $prevtimer = $_REQUEST['prevtimer']; + set_timer($channame, $date, $stime, $etime, $desc, $prevtimer); + break; case ("startstream"): $type = $_REQUEST['type']; $name = $_REQUEST['name']; @@ -141,4 +154,21 @@ function start_stream($type, $name, $title, $desc, $qname, $qparams, $category, include('includes/inc_stream.php'); } +function delete_timer($timer) +{ + vdrdeltimer($timer); + + include('includes/inc_timers.php'); +} + +function set_timer($channame, $date, $stime, $etime, $desc, $prevtimer) +{ + + if ($prevtimer != -1) + vdrdeltimer($prevtimer); + vdrsettimer($channame, $date, $stime, $etime, $desc); + + include('includes/inc_timers.php'); +} + ?> |