function Folders_interdis($folder) { if (!isset($_SESSION[__FUNCTION__])) { $disk = new harddrive(); $array = $disk->Folders_interdis(); $_SESSION[__FUNCTION__] = $array; } else { $array = $_SESSION[__FUNCTION__]; } if (!$array[$folder]) { return false; } else { return true; } }
function Folders_interdis($folder) { if ($folder == "/lib64") { return true; } if ($folder == "/selinux") { return true; } if ($folder == "/run") { return true; } if ($folder == "/lib32") { return true; } if (preg_match("#\\{.*?\$#", $folder)) { return true; } if (!isset($_SESSION[__FUNCTION__])) { $disk = new harddrive(); $array = $disk->Folders_interdis(); $_SESSION[__FUNCTION__] = $array; } else { $array = $_SESSION[__FUNCTION__]; } if (!$array[$folder]) { return false; } else { return true; } }
function FollowHardDisks() { include_once 'ressources/class.harddrive.inc'; $hard = new harddrive(); $hard->BuildSizes(); $textes[] = 'title'; $donnees[] = ''; if (is_array($hard->main_array["folders_list"])) { reset($hard->main_array["folders_list"]); } while (list($num, $ligne) = each($hard->main_array["folders_list"])) { $tsize = $hard->main_array["folders_size"][$ligne] / 1000; if ($tsize > 1000) { $tsize = round($tsize / 1000, 2); $tsize = $tsize . ' Go'; } else { $tsize = $tsize . ' Mb'; } $textes[] = "{$ligne}: {$tsize}"; $donnees[] = $hard->main_array["folders_size"][$ligne] / 1000; $array_value_text[] = $hard->main_array["folders_size"][$ligne] / 1000 . " Mb"; } $total = $hard->main_array["sum"]["total"] / 1000; if ($total > 1000) { $total = round($total / 1000, 2) . " Go"; } else { $total = $total . " mb"; } $textes[] = "Total: " . $total; $donnees[] = $hard->main_array["sum"]["total"] / 1000; $links = array("url" => "javascript:LoadAjax('folderslist','system.harddisk.php?follow=yes',_category_)", "target" => "javascript"); BuildPieBigChart(array($textes, $donnees), $array_value_text, $links); }
function DeleteFolderList() { $hard = new harddrive(); $hard->delete_path($_GET["DeleteFolderList"]); }