require('config.php'); if (isset($_GET['host'])) { $host = $_GET['host']; } else { $host = 'WWW'; } ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <meta http-equiv="content-style-type" content="text/css" /> <meta name="generator" content="Billing" /> <meta http-equiv="Pragma" content="no-cache" /> <meta content="no-cache" http-equiv="no-cache" /> <meta http-equiv="Cache-Control" content="no-cache" /> <title>Collctd </title> <meta name="description" content="Collectd " /> </head> <body>
$result_ifaces = mysql_query("SELECT DISTINCT `iface` FROM `collectd` WHERE `state`=1 AND `host`='{$host}' RDER BY `order`"); $i = 1; $datas = array(); while ($iface = mysql_fetch_array($result_ifaces)) { $ifaces[$i] = $iface['iface']; $result_name = mysql_query("SELECT `descr`,`type` FROM `collectd` WHERE `state`=1 AND `host`='{$host}' AND `iface`='{$iface['iface']}'"); $j = 0; while ($data = mysql_fetch_array($result_name)) { $descrs[$i][$j] = $data['descr']; $types[$i][$j] = $data['type']; $j++; } $i++; } ?> <div align="center"> <h2>Monitoring </h2></div> <table border="0" style="width: 100%; text-align: center;"> <tr> $iface = $ifaces[$i]; $path = 'http://admin.local.net/collectd/'; ?> <td align="center"> <h3>-== ==-</h3> $params = '?iface=' . $iface . '&type=' . $types[$i][$j] . '&host=' . $host; $imgUrl = $path . 'graph.php' . $params; $url = $path . 'detail.php?' . $params; ?> <a href=""><img src="" alt="" /></a> <hr size="2" color="black" /> </td> '; } ?> </tr> </table> </body> |