diff --git a/getgraph.php b/getgraph.php index bec0aeb..c63d313 100644 --- a/getgraph.php +++ b/getgraph.php @@ -1,37 +1,27 @@ hostname; + $bug_t=$row2->bug; + $sec_t=$row2->sec; + $url_t="/view_page.php?action=viewallpkgs&servername=$host_t"; + $arr_t['hostname']=$host_t; + $arr_t['bug']=$bug_t; + $arr_t['sec']=$sec_t; + $arr_t['url']=$url_t; + + $data[] = $arr_t; + } +} - require_once './inc/db.php'; -// header("Content-type: image/png"); -//$output_file='/tmp/myimage.png'; - $dblink = db_connect(); - - // Packages with updates -// $dbquery2 = "select packagename,count(*) as cunt from packages WHERE packtype='bug' group by packagename order by cunt DESC, packagename ASC;"; - $dbquery2 = "select hostname, sum(if (packtype='bug',1,0)) as bug, sum(if (packtype='sec',1,0)) as sec from packages group by hostname;"; - $dbresult2 = mysqli_query($dblink, $dbquery2); -// echo "
Package | Short Desc | Num of Affected servers |