From d1c1e258e64ff62adcb3dd04f6082cd3bc95788f Mon Sep 17 00:00:00 2001 From: Brian Flowers Date: Mon, 10 Oct 2016 17:17:40 -0400 Subject: [PATCH] Bugfixes on last commit --- index.php | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/index.php b/index.php index 60b6b10..a504978 100755 --- a/index.php +++ b/index.php @@ -98,11 +98,8 @@ foreach ($hosts as $host) $result = $db_handle->query("SELECT attribute, name FROM bdsmweb WHERE host='$host' AND graph=1"); $attributes = Array(); while($attribute = $result->fetchArray(SQLITE3_ASSOC)) - { - print_r($attribute); if ( $attribute['attribute'] ) $attributes[$attribute['attribute']] = $attribute['name']; - } $i = 0; foreach (array_keys($attributes) as $attribute) @@ -117,7 +114,7 @@ foreach ($hosts as $host) echo " context.strokeStyle = '$colors[$i]';\n"; $record = $result->fetchArray(SQLITE3_ASSOC); $final = $record['timestamp']; - echo " context.moveTo(0, ".sprintf("%d", $record['value']"".");\n"; + echo " context.moveTo(0, ".sprintf("%d", $record['value']).");\n"; while( $record = $result->fetchArray(SQLITE3_ASSOC) ) { echo " context.lineTo(".sprintf("%d", $final - $record['timestamp']).", ".(400-$record['value']*4).");\n"; -- 1.8.3.1