diff options
author | TheTroll <trolldev@gmail.com> | 2010-02-23 13:58:42 +0100 |
---|---|---|
committer | TheTroll <trolldev@gmail.com> | 2010-02-23 13:58:42 +0100 |
commit | 902ee1ab48b46fa117aad0e3508f58df40bcbe3e (patch) | |
tree | 69bff970e7b4d54c111adabbb265a044ffd25775 /includes/include.php | |
parent | 99ebedf5abf6b064fd413512a4df06b3b78f9f62 (diff) | |
download | istreamdev-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-x | includes/include.php | 21 |
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'); } |