Ejemplo n.º 1
0
function UPDATE_AWSTATS($value)
{
    $array = unserialize(base64_decode($value));
    $EXEC_NICE = EXEC_NICE();
    if (is_file("/usr/bin/nohup")) {
        $nohup = "/usr/bin/nohup ";
    }
    $reload_datas = $nohup . $EXEC_NICE . LOCATE_PHP5_BIN() . " " . dirname(__FILE__) . "/exec.artica.meta.users.php --export-awstats >/dev/null 2>&1 &";
    if ($array["servername"] == null) {
        send_email_events("Failed updating {$array["servername"]} awstats config", null, "CLOUD");
        return true;
    }
    include_once 'ressources/class.awstats.inc';
    $aw = new awstats($array["servername"]);
    while (list($key, $val) = each($array)) {
        $aw->SET($key, $val);
    }
    send_email_events("Success updating {$array["servername"]} awstats config " . count($array) . " items", null, "CLOUD");
    return true;
}
Ejemplo n.º 2
0
function Save()
{
    $aw = new awstats($_GET["servername"]);
    $aw->SET("AwstatsEnabled", $_GET["AwstatsEnabled"]);
    $aw->SET("LogFile", $_GET["LogFile"]);
    $aw->SET("LogType", $_GET["LogType"]);
    $aw->SET("LogFormat", $_GET["LogFormat"]);
    $aw->SET("LogSeparator", $_GET["LogSeparator"]);
    $sock = new sockets();
    $ArticaMetaEnabled = $sock->GET_INFO("ArticaMetaEnabled");
    if ($ArticaMetaEnabled == 1) {
        $sock->getFrameWork("cmd.php?artica-meta-awstats=yes");
    }
}