filesystems(); $_text = " \n"; for ($i=0, $max = sizeof($fs); $i < $max; $i++) { $_text .= " \n"; $_text .= " " . htmlspecialchars($i, ENT_QUOTES) . "\n"; if ($show_mount_point) { $_text .= " " . htmlspecialchars($fs[$i]['mount'], ENT_QUOTES) . "\n"; } $_text .= " " . htmlspecialchars($fs[$i]['fstype'], ENT_QUOTES) . "\n" . " " . htmlspecialchars($fs[$i]['disk'], ENT_QUOTES) . "\n" . " " . htmlspecialchars($fs[$i]['percent'], ENT_QUOTES) . "\n" . " " . htmlspecialchars($fs[$i]['free'], ENT_QUOTES) . "\n" . " " . htmlspecialchars($fs[$i]['used'], ENT_QUOTES) . "\n" . " " . htmlspecialchars($fs[$i]['size'], ENT_QUOTES) . "\n"; if (isset($fs[$i]['options'])) $_text .= " " . htmlspecialchars($fs[$i]['options'], ENT_QUOTES) . "\n"; if( isset( $fs[$i]['inodes'] ) ) $_text .= " " . htmlspecialchars( $fs[$i]['inodes'], ENT_QUOTES ) . "\n"; $_text .= " \n"; } $_text .= " \n"; return $_text; } // // html_filesystems() // function html_filesystems () { global $XPath; global $text; global $show_mount_point; $textdir = direction(); $sum = array("size" => 0, "used" => 0, "free" => 0); $counted_devlist = array(); $scale_factor = 2; $_text = "\n"; $_text .= " \n"; if ($show_mount_point) { $_text .= " \n"; } $_text .= " \n" . " \n" . " \n" . " \n" . " \n" . " \n \n"; for ($i=1, $max = sizeof($XPath->getDataParts('/phpsysinfo/FileSystem')); $i < $max; $i++) { if ($XPath->match("/phpsysinfo/FileSystem/Mount[$i]/MountPointID")) { if (!$XPath->match("/phpsysinfo/FileSystem/Mount[$i]/Options") || !stristr($XPath->getData("/phpsysinfo/FileSystem/Mount[$i]/Options"), "bind")) { if (!in_array($XPath->getData("/phpsysinfo/FileSystem/Mount[$i]/Device/Name"), $counted_devlist)) { $sum['size'] += $XPath->getData("/phpsysinfo/FileSystem/Mount[$i]/Size"); $sum['used'] += $XPath->getData("/phpsysinfo/FileSystem/Mount[$i]/Used"); $sum['free'] += $XPath->getData("/phpsysinfo/FileSystem/Mount[$i]/Free"); if (PHP_OS != "WINNT") $counted_devlist[] = $XPath->getData("/phpsysinfo/FileSystem/Mount[$i]/Device/Name"); else $counted_devlist[] = $XPath->getData("/phpsysinfo/FileSystem/Mount[$i]/MountPoint"); } } $_text .= " \n"; if ($show_mount_point) { $_text .= " \n"; } $_text .= " \n" . " \n" . " \n" . " \n" . " \n" . " \n" . " \n"; } } $_text .= " \n"; if ($show_mount_point) { $_text .= " \n"; } else { $_text .= " \n"; } $_text .= " \n" . " \n" . " \n" . " \n \n" . "
" . $text['mount'] . "" . $text['type'] . "" . $text['partition'] . "" . $text['percent'] . "" . $text['free'] . "" . $text['used'] . "" . $text['size'] . "
" . $XPath->getData("/phpsysinfo/FileSystem/Mount[$i]/MountPoint") . "" . $XPath->getData("/phpsysinfo/FileSystem/Mount[$i]/Type") . "" . $XPath->getData("/phpsysinfo/FileSystem/Mount[$i]/Device/Name") . "" . create_bargraph($XPath->getData("/phpsysinfo/FileSystem/Mount[$i]/Used"), $XPath->getData("/phpsysinfo/FileSystem/Mount[$i]/Size"), $scale_factor, $XPath->getData("/phpsysinfo/FileSystem/Mount[$i]/Type")) . " " . $XPath->getData("/phpsysinfo/FileSystem/Mount[$i]/Percent") . "%"; if( $XPath->match( "/phpsysinfo/FileSystem/Mount[$i]/Inodes" ) ) $_text .= " (" . $XPath->getData("/phpsysinfo/FileSystem/Mount[$i]/Inodes") . "%)"; $_text .= "" . format_bytesize($XPath->getData("/phpsysinfo/FileSystem/Mount[$i]/Free")) . "" . format_bytesize($XPath->getData("/phpsysinfo/FileSystem/Mount[$i]/Used")) . "" . format_bytesize($XPath->getData("/phpsysinfo/FileSystem/Mount[$i]/Size")) . "
" . $text['totals'] . " :  " . $text['totals'] . " :  " . create_bargraph($sum['used'], $sum['size'], $scale_factor) . " " . round(100 / $sum['size'] * $sum['used']) . "%" . "" . format_bytesize($sum['free']) . "" . format_bytesize($sum['used']) . "" . format_bytesize($sum['size']) . "
\n"; return $_text; } function wml_filesystem() { global $XPath; global $text; global $show_mount_point; $_text = "\n"; for ($i = 1; $i < sizeof($XPath->getDataParts('/phpsysinfo/FileSystem')); $i++) { if ($XPath->match("/phpsysinfo/FileSystem/Mount[$i]/MountPointID")) { $_text .= "

\n"; if ($show_mount_point) { $_text .= $XPath->getData("/phpsysinfo/FileSystem/Mount[$i]/MountPoint") . "
\n"; } else { $_text .= $XPath->getData("/phpsysinfo/FileSystem/Mount[$i]/Device/Name") . "
\n"; } $_text .= "- " . $text['free'] . ": " . format_bytesize($XPath->getData("/phpsysinfo/FileSystem/Mount[$i]/Free")) . "
\n" . "- " . $text['used'] . ": " . format_bytesize($XPath->getData("/phpsysinfo/FileSystem/Mount[$i]/Used")) . "
\n" . "- " . $text['size'] . ": " . format_bytesize($XPath->getData("/phpsysinfo/FileSystem/Mount[$i]/Size")) . "
\n" . "

\n"; } } $_text .= "
\n"; return $_text; } ?>