Esempio n. 1
0
    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();
    $awstats_buildstaticpages = $unix->LOCATE_AWSTATS_BUILDSTATICPAGES_BIN();
    if (strlen($awstats) == 0) {
        if ($GLOBALS["VERBOSE"]) {
            echo "awstats failed 'awstats.pl' no such file\n";
        }
        $unix->send_email_events("awstats failed: \"awstats.pl\" no such file", "please contact Artica support team", "system");
        die;
Esempio n. 2
0
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();
	$awstats_buildstaticpages=$unix->LOCATE_AWSTATS_BUILDSTATICPAGES_BIN();
	
	if(strlen($awstats)==0){