<?php if(isset($_GET["verbose"])){$GLOBALS["VERBOSE"]=true;ini_set('display_errors', 1);ini_set('error_reporting', E_ALL);ini_set('error_prepend_string',null);ini_set('error_append_string',null);} include_once('ressources/class.templates.inc'); include_once('ressources/class.ldap.inc'); include_once('ressources/class.users.menus.inc'); include_once('ressources/class.os.system.inc'); include_once('ressources/class.os.system.tools.inc'); $usersmenus=new usersMenus(); if($usersmenus->AsArticaAdministrator==true){}else{header('location:users.index.php');exit;} if(isset($_GET["PID"])){PIDInfos();exit;} if(isset($_GET["reload"])){echo page_proc();exit;} if(isset($_GET["KillProcessByPid"])){KillProcessByPid();exit;} if(isset($_GET["popup"])){popup();exit;} if(isset($_GET["getmem"])){getmem();exit;} if(isset($_GET["getcpu"])){getCpu();exit;} if(isset($_GET["taskslist"])){processes();exit;} if(isset($_GET["home"])){home();exit;} if(isset($_GET["home-b"])){home_b();exit;} if(isset($_GET["home-c"])){home_c();exit;} if(isset($_GET["task-m"])){tasks_start();exit;} if(isset($_GET["clean-mem-js"])){clean_mem_js();exit;} if(isset($_POST["clean-mem-perform"])){clean_mem_perform();exit;} if(isset($_GET["tasks-list"])){task_list();exit;} if(isset($_POST["kill9"])){kill9();exit;} js(); function js(){ $page=CurrentPageName(); $prefix=str_replace(".","_",$page);
$GLOBALS["CLASS_UNIX"]=new unix(); $GLOBALS["CLASS_SOCKETS"]=new sockets(); $GLOBALS["CLASS_USERS"]=new settings_inc(); CheckCallable(); } $mem=round(((memory_get_usage()/1024)/1000),2);events("{$mem}MB after declarations","MAIN",__LINE__); if(strlen($argv[1])>2){events("parsing command line {$argv[1]}","MAIN",__LINE__);} if($argv[1]=="--all"){ events("-> launch_all_status()","MAIN",__LINE__); launch_all_status(); die(); } if($argv[1]=="--free"){echo getmem();exit;} if($argv[1]=="--squid"){echo squid_master_status();exit;} if($argv[1]=="--c-icap"){echo c_icap_master_status();exit;} if($argv[1]=="--kav4proxy"){echo kav4Proxy_status();exit;} if($argv[1]=="--dansguardian"){echo dansguardian_master_status();exit;} if($argv[1]=="--wifi"){echo wpa_supplicant();;exit;} if($argv[1]=="--fetchmail"){echo fetchmail();;exit;} if($argv[1]=="--milter-greylist"){echo milter_greylist();;exit;} if($argv[1]=="--framework"){echo framework();;exit;} if($argv[1]=="--pdns"){echo pdns_server()."\n".pdns_recursor();exit;} if($argv[1]=="--cyrus-imap"){echo cyrus_imap();exit;} if($argv[1]=="--mysql"){echo "\n".mysql_server()."\n".mysql_mgmt()."\n". mysql_replica();exit;} if($argv[1]=="--openldap"){echo "\n".openldap();;exit;} if($argv[1]=="--saslauthd"){echo "\n".saslauthd();;exit;} if($argv[1]=="--sysloger"){echo "\n".syslogger();;exit;} if($argv[1]=="--squid-tail"){echo "\n".squid_tail();;exit;}
exit; } if (isset($_GET["reload"])) { echo page_proc(); exit; } if (isset($_GET["KillProcessByPid"])) { KillProcessByPid(); exit; } if (isset($_GET["popup"])) { popup(); exit; } if (isset($_GET["getmem"])) { getmem(); exit; } if (isset($_GET["getcpu"])) { getCpu(); exit; } if (isset($_GET["taskslist"])) { processes(); exit; } if (isset($_GET["swap-infos"])) { GetSwap(); exit; } js();
$GLOBALS["CLASS_SOCKETS"] = new sockets(); $GLOBALS["CLASS_USERS"] = new settings_inc(); CheckCallable(); } $mem = round(memory_get_usage() / 1024 / 1000, 2); events("{$mem}MB after declarations", "MAIN", __LINE__); if (strlen($argv[1]) > 2) { events("parsing command line {$argv[1]}", "MAIN", __LINE__); } if ($argv[1] == "--all") { events("-> launch_all_status()", "MAIN", __LINE__); launch_all_status(); die; } if ($argv[1] == "--free") { echo getmem(); exit; } if ($argv[1] == "--squid") { echo squid_master_status(); exit; } if ($argv[1] == "--c-icap") { echo c_icap_master_status(); exit; } if ($argv[1] == "--kav4proxy") { echo kav4Proxy_status(); exit; } if ($argv[1] == "--dansguardian") {