summaryrefslogtreecommitdiff
path: root/includes/include.php
diff options
context:
space:
mode:
Diffstat (limited to 'includes/include.php')
-rwxr-xr-xincludes/include.php32
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');
+}
+
?>