function build_progress($text, $pourc) { if ($GLOBALS["BYWIZARD"]) { if ($pourc < 90) { $pourc = 90; } if ($pourc > 90) { $pourc = 90; } build_progress_wizard($text, $pourc); } $echotext = $text; echo "Starting......: " . date("H:i:s") . " {$pourc}% {$echotext}\n"; $cachefile = "/usr/share/artica-postfix/ressources/logs/web/squid.caches.progress"; $array["POURC"] = $pourc; $array["TEXT"] = $text; @file_put_contents($cachefile, serialize($array)); @chmod($cachefile, 0755); }
function build_progress($text, $pourc) { if ($GLOBALS["BYWIZARD"]) { if ($pourc < 20) { $pourc = 20; } if ($pourc > 90) { $pourc = 90; } build_progress_wizard($text, $pourc); } $GLOBALS["CACHEFILE"] = "/usr/share/artica-postfix/ressources/logs/web/system.partition.progress"; if ($GLOBALS["VERBOSE"]) { echo "******************** {$pourc}% {$text} ********************\n"; } $cachefile = $GLOBALS["CACHEFILE"]; $array["POURC"] = $pourc; $array["TEXT"] = $text; @file_put_contents($cachefile, serialize($array)); @chmod($cachefile, 0755); }