$sql['hosts'] = "SELECT * FROM `conf_hosts` WHERE `subnet-name` IS NULL OR `subnet-name` = ''"; if (($value = $db->dbQuery($val->ValidateSQL($sql['hosts'], $dbconn), $dbconn)) !== -1) { $hostdata['unassigned'] = $db->dbArrayResults($value); } // generate our graphs but check for gd lib extensions first if (function_exists('imagedestroy')) { $graph = new PHPGraphLibPie(450, 200); foreach ($hostdata as $key => $value) { $array[$key] = count($value); $total = $total + count($value); } $graph->addData($array); $graph->setTitle("Hosts to Subnet Assignments: Total static hosts #" . $total); $graph->setLabelTextColor("50, 50, 50"); $graph->setLegendTextColor("50, 50, 50"); $graph->setLegendOutlineColor("black"); $graph->createGraph(); } } } else { // page view restricted by access level $ERROR = $err->GenerateErrorLink("help/help.html", "#undef", $defined['error'], $errors['level']); } } else { // general authentication error $ERROR = $err->GenerateErrorLink("help/help.html", "#undef", $defined['error'], $errors['auth_n']); } } else { // Possible XSS attack $ERROR = $err->GenerateErrorLink("help/help.html", "#undef", $defined['error'], $errors['xss_config'], NULL, NULL); }