diff --git a/check-services.php b/check-services.php index 6c3c79b586..8544bbd477 100755 --- a/check-services.php +++ b/check-services.php @@ -4,7 +4,7 @@ include("includes/defaults.inc.php"); include("config.php"); include("includes/functions.php"); -$sql = "SELECT * FROM devices AS D, services AS S WHERE D.status = '1' AND S.device_id = D.device_id ORDER by D.device_id DESC"; +$sql = "SELECT * FROM devices AS D, services AS S WHERE S.device_id = D.device_id ORDER by D.device_id DESC"; $query = mysql_query($sql); while ($service = mysql_fetch_array($query)) { @@ -52,7 +52,8 @@ while ($service = mysql_fetch_array($query)) { shell_exec($create); } - rrdtool_update($rrd,"N:".$status); - + if($status = "1" || $status = "0") { + rrdtool_update($rrd,"N:".$status); + } } ?> diff --git a/html/pages/services.php b/html/pages/services.php index 344addec37..400a5548e9 100644 --- a/html/pages/services.php +++ b/html/pages/services.php @@ -7,8 +7,6 @@ echo("Details"); print_optionbar_end(); -print_r($_GET); - if($_GET['status'] == '0') { $where = " AND service_status = '0'"; } else { unset ($where); } echo("
"); @@ -39,7 +37,7 @@ if ($_SESSION['userlevel'] >= '5') { $periods = array('day', 'week', 'month', 'year'); - echo('
'); + echo('
'); foreach($periods as $period) { $graph_array['from'] = $$period;