setLanguageFile('frontend', 'language.email.notif'); $cfg[] = $class_database->getConfigurations('backend_email'); $bytes = disk_free_space("/"); $si_prefix = array('B', 'KB', 'MB', 'GB', 'TB', 'EB', 'ZB', 'YB'); $base = 1024; $class = min((int) log($bytes, $base), count($si_prefix) - 1); $data = sprintf('%1.2f', $bytes / pow($base, $class)) . ' ' . $si_prefix[$class]; $free = sprintf('%1.2f', $bytes / pow($base, $class)); if ($si_prefix[$class] == 'GB') { if ($free < 5) { VNotify::queInit('disk_usage', array($cfg['backend_email']), $data); } } if ($si_prefix[$class] == 'MB') { if ($free < 900) { VNotify::queInit('disk_usage', array($cfg['backend_email']), $data); } }