From: Brian Flowers Date: Mon, 10 Oct 2016 21:17:40 +0000 (-0400) Subject: Bugfixes on last commit X-Git-Url: http://git.slightlycyberpunk.com%2C%20git.slightlycyberpunk.com/git/?a=commitdiff_plain;h=d1c1e258e64ff62adcb3dd04f6082cd3bc95788f;p=bdsm-web.git Bugfixes on last commit --- 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";