Esempio n. 1
0
if (!$users->AsSystemAdministrator) {
    $tpl = new templates();
    echo "alert('" . $tpl->javascript_parse_text("{ERROR_NO_PRIVS}") . "');";
    die;
    exit;
}
if (isset($_POST["ArticaLogDir"])) {
    ArticaLogDir();
    exit;
}
if (isset($_GET["tabs"])) {
    tabs();
    exit;
}
if (isset($_GET["master"])) {
    master_index();
    exit;
}
if (isset($_GET["client"])) {
    client_index();
    exit;
}
if (isset($_GET["ActAsASyslogServer"])) {
    ActAsASyslogServerSave();
    exit;
}
if (isset($_GET["ActAsASyslogClient"])) {
    ActAsASyslogClientSave();
    exit;
}
if (isset($_GET["syslog-servers-list"])) {
Esempio n. 2
0
function master_index()
{
    @unlink($GLOBALS["MasterIndexFile"]);
    $ini = new iniFrameWork();
    $ini->loadFile('/etc/artica-postfix/artica-update.conf');
    if (trim($ini->_params["AUTOUPDATE"]["autoinstall"]) == null) {
        $ini->_params["AUTOUPDATE"]["autoinstall"] = "yes";
    }
    if ($ini->_params["AUTOUPDATE"]["autoinstall"] != "yes") {
        $autoinstall = false;
    }
    $uri = $ini->_params["AUTOUPDATE"]["uri"];
    $arrayURI = parse_url($uri);
    $MAIN_URI = "{$arrayURI["scheme"]}://{$arrayURI["host"]}";
    echo "Starting......: " . date("H:i:s") . " Refreshing index file...\n";
    $curl = new ccurl("{$uri}?time=" . time());
    if (!$curl->GetFile($GLOBALS["MasterIndexFile"])) {
        _artica_update_event(0, "Error {$curl->error}", null, __FILE__, __LINE__);
        echo "Starting......: " . date("H:i:s") . " Error {$curl->error_num};{$curl->error}, Try direct\n";
        if (!$GLOBALS["NOT_FORCE_PROXY"]) {
            echo "Starting......: " . date("H:i:s") . " FATAL: Unable to download index file, try in direct mode\n";
            $GLOBALS["NOT_FORCE_PROXY"] = true;
            return master_index();
        }
        if ($curl->error == "{CURLE_COULDNT_RESOLVE_HOST}") {
            if ($arrayURI["host"] == "www.artica.fr") {
                if (!$GLOBALS["CHANGED"]) {
                    echo "Starting......: " . date("H:i:s") . " trying www.articatech.net\n";
                    $ini->_params["AUTOUPDATE"]["uri"] = "http://www.articatech.net/auto.update.php";
                    $ini->saveFile("/etc/artica-postfix/artica-update.conf");
                    $GLOBALS["CHANGED"] = true;
                    return master_index();
                }
            }
        }
        return;
    }
    if (!is_file($GLOBALS["MasterIndexFile"])) {
        echo "Starting......: " . date("H:i:s") . " {$GLOBALS["MasterIndexFile"]} no such file...\n";
        return;
    }
    return true;
}
Esempio n. 3
0
<?php
	include_once('ressources/class.templates.inc');
	include_once('ressources/class.ldap.inc');
	include_once('ressources/class.users.menus.inc');
	
	
	$users=new usersMenus();
	if(!$users->AsSystemAdministrator){
		$tpl=new templates();
		echo "alert('". $tpl->javascript_parse_text("{ERROR_NO_PRIVS}")."');";
		die();exit();
	}


	if(isset($_GET["tabs"])){tabs();exit;}
	if(isset($_GET["master"])){master_index();exit;}
	if(isset($_GET["client"])){client_index();exit;}
	if(isset($_GET["ActAsASyslogServer"])){ActAsASyslogServerSave();exit;}
	if(isset($_GET["ActAsASyslogClient"])){ActAsASyslogClientSave();exit;}
	if(isset($_GET["syslog-servers-list"])){SyslogServerList();exit;}
	if(isset($_GET["syslog-host"])){SyslogServerListAdd();exit;}
	if(isset($_GET["syslog-host-delete"])){SyslogServerListDel();exit;}
js();

function js(){
		$page=CurrentPageName();
		$html="
		
		
		function syslogConfigLoad(){
			$('#BodyContent').load('$page?tabs=yes');