summaryrefslogtreecommitdiff
path: root/includes/include.php
diff options
context:
space:
mode:
authorTheTroll <trolldev@gmail.com>2010-02-23 13:58:42 +0100
committerTheTroll <trolldev@gmail.com>2010-02-23 13:58:42 +0100
commit902ee1ab48b46fa117aad0e3508f58df40bcbe3e (patch)
tree69bff970e7b4d54c111adabbb265a044ffd25775 /includes/include.php
parent99ebedf5abf6b064fd413512a4df06b3b78f9f62 (diff)
downloadistreamdev-902ee1ab48b46fa117aad0e3508f58df40bcbe3e.tar.gz
istreamdev-902ee1ab48b46fa117aad0e3508f58df40bcbe3e.tar.bz2
Fixed empty or lonely timers
Print the status of the timer modifications
Diffstat (limited to 'includes/include.php')
-rwxr-xr-xincludes/include.php21
1 files changed, 16 insertions, 5 deletions
diff --git a/includes/include.php b/includes/include.php
index 2dd59e9..6fe31ad 100755
--- a/includes/include.php
+++ b/includes/include.php
@@ -156,17 +156,28 @@ function start_stream($type, $name, $title, $desc, $qname, $qparams, $category,
function delete_timer($timer)
{
- vdrdeltimer($timer);
-
+ $ret = vdrdeltimer($timer);
+
+ $message = " <li class=\"textbox\"><p><font color='black'>{$ret}</font></p></li>";
+
include('includes/inc_timers.php');
}
function set_timer($channame, $date, $stime, $etime, $desc, $prevtimer)
{
+ $ret = vdrsettimer($prevtimer, $channame, $date, $stime, $etime, $desc);
+
+ if ($prevtimer == -1)
+ $settype = "creat";
+ else
+ $settype = "edit";
+
+ $retarray = explode(":", $ret);
- if ($prevtimer != -1)
- vdrdeltimer($prevtimer);
- vdrsettimer($channame, $date, $stime, $etime, $desc);
+ if (!is_numeric(substr($retarray[0], 0, 1)))
+ $message = " <li class=\"textbox\"><p><font color='red'>Error: {$retarray[0]}</font></p></li>";
+ else
+ $message = " <li class=\"textbox\"><p><font color='green'>Timer {$settype}ed successfully </font></p></li>";
include('includes/inc_timers.php');
}