$GLOBALS["VERBOSE"] = true; } if (preg_match("#--force#", implode(" ", $argv))) { $GLOBALS["FORCE"] = true; } $users = new usersMenus(); if (!$users->awstats_installed) { "echo awstats not installed....\n"; die; } if ($argv[1] == "--single") { exectute_awstats($argv[2], true); exit; } if ($argv[1] == "--postfix") { awstats_mail(); exit; } if ($argv[1] == "--postfix-parse") { artica_parse($argv[2], false); exit; } if ($argv[1] == "--cleanlogs") { clean_maillogs(); exit; } if ($argv[1] == "--cron") { awstats_cron(); exit; } run_general();
if(posix_getuid()<>0){die("Cannot be used in web server mode\n\n");} include_once(dirname(__FILE__).'/ressources/class.ini.inc'); include_once(dirname(__FILE__).'/framework/class.unix.inc'); include_once(dirname(__FILE__).'/framework/frame.class.inc'); include_once(dirname(__FILE__).'/ressources/class.os.system.inc'); include_once(dirname(__FILE__).'/ressources/class.mysql.inc'); include_once(dirname(__FILE__).'/ressources/class.awstats.inc'); if(preg_match("#--verbose#",implode(" ",$argv))){$GLOBALS["VERBOSE"]=true;} if(preg_match("#--force#",implode(" ",$argv))){$GLOBALS["FORCE"]=true;} $users=new usersMenus(); if(!$users->awstats_installed){"echo awstats not installed....\n";die();} if($argv[1]=="--single"){exectute_awstats($argv[2],true);exit;} if($argv[1]=="--postfix"){awstats_mail();exit;} if($argv[1]=="--postfix-parse"){artica_parse($argv[2],false);exit;} if($argv[1]=="--cleanlogs"){clean_maillogs();exit;} if($argv[1]=="--cron"){awstats_cron();exit;} run_general(); function run_general(){ $unix=new unix(); $perl=$unix->find_program("perl"); $awstats=$unix->LOCATE_AWSTATS_BIN();