exit; } if (isset($_GET["ping-host"])) { ping_host(); exit; } if (isset($_GET["etc-timezone"])) { etc_timezone(); exit; } if (isset($_GET["ucarp-isactive"])) { ucarp_isactive(); exit; } if (isset($_GET["ps-mem"])) { ps_mem(); exit; } if (isset($_GET["installv2"])) { installv2(); exit; } while (list($num, $line) = each($_GET)) { $f[] = "{$num}={$line}"; } writelogs_framework("unable to understand query !!!!!!!!!!!..." . @implode(",", $f), "main()", __FILE__, __LINE__); die; function arp_resolve() { $ip = $_GET["arp-resolve"]; $unix = new unix();
function admin_logs() { if (system_is_overloaded()) { return; } $unix = new unix(); $pidfile = "/etc/artica-postfix/pids/" . basename(__FILE__) . "." . __FUNCTION__ . ".pid"; $pid = @file_get_contents($pidfile); if ($unix->process_exists($pid)) { writelogs("Already running pid {$pid}", __FUNCTION__, __FILE__, __LINE__); return; } $t = 0; include_once dirname(__FILE__) . '/ressources/class.mysql.inc'; $q = new mysql(); foreach (glob("{$GLOBALS["ARTICALOGDIR"]}/adminevents/*") as $filename) { $sql = @file_get_contents($filename); if (trim($sql) == null) { @unlink($filename); } $q->QUERY_SQL($sql, "artica_events"); if (!$q->ok) { writelogs("Fatal, {$q->mysql_error}", __FUNCTION__, __FILE__, __LINE__); if (strpos($q->mysql_error, "Column count doesn't match value count") > 0) { @unlink($filename); } if (strpos($q->mysql_error, "nknown column") > 0) { writelogs("Fatal -> DROP TABLE ", __FUNCTION__, __FILE__, __LINE__); $q->QUERY_SQL("DROP TABLE adminevents", "artica_events"); $q->BuildTables(); } continue; } @unlink($filename); } ps_mem(); }
} if ($argv[1] == "--openemm") { echo openemm() . "\n" . openemm_sendmail(); exit; } if ($argv[1] == "--exec-nice") { $GLOBALS["VERBOSE"] = true; echo "\"{$GLOBALS["CLASS_UNIX"]->EXEC_NICE()}\"\n"; die; } if ($argv[1] == "--ntpd") { echo ntpd_server(); die; } if ($argv[1] == "--ps-mem") { echo ps_mem(); die; } if ($argv[1] == "--arpd") { echo arpd(); die; } if ($GLOBALS["VERBOSE"]) { echo "cannot understand {$argv[1]} assume perhaps it is a function\n"; } if ($argv[1] == "--functions") { $arr = get_defined_functions(); print_r($arr); die; } if ($argv[1] == "--all-squid") {