"); echo(""); $row = 1; foreach (dbFetchRows("SELECT * FROM `storage` AS S, `devices` AS D WHERE S.device_id = D.device_id ORDER BY D.hostname, S.storage_descr") as $drive) { if (device_permitted($drive['device_id'])) { $skipdrive = 0; if ($drive["os"] == "junos") { foreach ($config['ignore_junos_os_drives'] as $jdrive) { if (preg_match($jdrive, $drive["storage_descr"])) { $skipdrive = 1; } } $drive["storage_descr"] = preg_replace("/.*mounted on: (.*)/", "\\1", $drive["storage_descr"]); } if ($drive['os'] == "freebsd") { foreach ($config['ignore_bsd_os_drives'] as $jdrive) { if (preg_match($jdrive, $drive["storage_descr"])) { $skipdrive = 1; } } } if ($skipdrive) { continue; } if (is_integer($row/2)) { $row_colour = $list_colour_a; } else { $row_colour = $list_colour_b; } $perc = round($drive['storage_perc'], 0); $total = formatStorage($drive['storage_size']); $free = formatStorage($drive['storage_free']); $used = formatStorage($drive['storage_used']); $store_url = "graph.php?id=" . $drive['storage_id'] . "&type=".$graph_type."&from=$month&to=$now&width=400&height=125"; $store_popup = "onmouseover=\"return overlib('', LEFT);\" onmouseout=\"return nd();\""; $mini_graph = $config['base_url'] . "/graph.php?id=".$drive['storage_id']."&type=".$graph_type."&from=".$day."&to=".$now."&width=80&height=20&bg=f4f4f4"; $background = get_percentage_colours($perc); echo(""); if ($_GET['optb'] == "graphs") { echo(""); } # endif graphs $row++; } } echo("
Device Storage Usage Used
" . generate_device_link($drive) . "" . $drive['storage_descr'] . " ".print_percentage_bar (400, 20, $perc, "$used / $total", "ffffff", $background['left'], $free, "ffffff", $background['right'])." $perc"."%
"); $daily_graph = "graph.php?id=" . $drive['storage_id'] . "&type=".$graph_type."&from=$day&to=$now&width=211&height=100"; $daily_url = "graph.php?id=" . $drive['storage_id'] . "&type=".$graph_type."&from=$day&to=$now&width=400&height=150"; $weekly_graph = "graph.php?id=" . $drive['storage_id'] . "&type=".$graph_type."&from=$week&to=$now&width=211&height=100"; $weekly_url = "graph.php?id=" . $drive['storage_id'] . "&type=".$graph_type."&from=$week&to=$now&width=400&height=150"; $monthly_graph = "graph.php?id=" . $drive['storage_id'] . "&type=".$graph_type."&from=$month&to=$now&width=211&height=100"; $monthly_url = "graph.php?id=" . $drive['storage_id'] . "&type=".$graph_type."&from=$month&to=$now&width=400&height=150"; $yearly_graph = "graph.php?id=" . $drive['storage_id'] . "&type=".$graph_type."&from=$year&to=$now&width=211&height=100"; $yearly_url = "graph.php?id=" . $drive['storage_id'] . "&type=".$graph_type."&from=$year&to=$now&width=400&height=150"; echo("', LEFT);\" onmouseout=\"return nd();\"> "); echo("', LEFT);\" onmouseout=\"return nd();\"> "); echo("', LEFT);\" onmouseout=\"return nd();\"> "); echo("', LEFT);\" onmouseout=\"return nd();\"> "); echo("
"); ?>