From 902ee1ab48b46fa117aad0e3508f58df40bcbe3e Mon Sep 17 00:00:00 2001 From: TheTroll Date: Tue, 23 Feb 2010 13:58:42 +0100 Subject: Fixed empty or lonely timers Print the status of the timer modifications --- includes/include.php | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) (limited to 'includes/include.php') 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 = "
  • {$ret}

  • "; + 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 = "
  • Error: {$retarray[0]}

  • "; + else + $message = "
  • Timer {$settype}ed successfully

  • "; include('includes/inc_timers.php'); } -- cgit v1.2.3