exit; } if (isset($_GET["reconfigure-progress"])) { reconfigure_progress(); exit; } if (isset($_GET["access-query"])) { events_all(); exit; } if (isset($_GET["compile-single"])) { compile_single(); exit; } if (isset($_GET["compile-destination"])) { compile_destination(); exit; } if (isset($_GET["refresh-caches"])) { refresh_caches(); exit; } if (isset($_GET["access-real"])) { access_real(); exit; } if (isset($_GET["clean-websites"])) { clean_websites(); exit; } if (isset($_GET["backup"])) {
if (preg_match("#--reconfigure#", implode(" ", $argv), $re)) { $GLOBALS["RECONFIGURE"] = true; } if (preg_match("#--replic-conf#", implode(" ", $argv), $re)) { $GLOBALS["REPLIC_CONF"] = true; } $GLOBALS["AS_ROOT"] = true; include_once dirname(__FILE__) . '/ressources/class.ldap.inc'; include_once dirname(__FILE__) . '/ressources/class.nginx.inc'; include_once dirname(__FILE__) . '/ressources/class.freeweb.inc'; include_once dirname(__FILE__) . '/framework/class.unix.inc'; include_once dirname(__FILE__) . '/ressources/class.squid.reverse.inc'; include_once dirname(__FILE__) . '/framework/frame.class.inc'; include_once dirname(__FILE__) . '/framework/class.settings.inc'; include_once dirname(__FILE__) . '/ressources/class.resolv.conf.inc'; compile_destination($argv[1]); function build_progress($text, $pourc) { $GLOBALS["CACHEFILE"] = "/usr/share/artica-postfix/ressources/logs/web/nginx-destination.progress"; echo "[{$pourc}%] {$text}\n"; $array["POURC"] = $pourc; $array["TEXT"] = $text; @file_put_contents($GLOBALS["CACHEFILE"], serialize($array)); @chmod($GLOBALS["CACHEFILE"], 0755); if ($GLOBALS["OUTPUT"]) { usleep(1000); } } function compile_destination($cacheid) { $unix = new unix();