Example #1
0
    }
    @socket_close($socket);
}
// Switch off web indicator
if ($what == 'all') {
    Web_indicator::set_off('Reload_policies');
    Web_indicator::set_off('Reload_sensors');
    Web_indicator::set_off('Reload_plugins');
    Web_indicator::set_off('Reload_directives');
    Web_indicator::set_off('Reload_servers');
} else {
    Web_indicator::set_off('Reload_' . $what);
}
// Reset main indicator if no more policy reload need
if (!Web_indicator::is_on('Reload_policies') && !Web_indicator::is_on('Reload_sensors') && !Web_indicator::is_on('Reload_plugins') && !Web_indicator::is_on('Reload_directives') && !Web_indicator::is_on('Reload_servers')) {
    Web_indicator::set_off('ReloadPolicy');
}
if ($what == 'tasks') {
    try {
        $frcon = new Frameworkd_socket();
        $frcon->write("control action=\"refresh_inventory_task\"\n");
    } catch (Exception $e) {
        $error = _('An error occurred while updating Agent cache...');
        echo ossim_error($error);
    }
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <script type="text/javascript" src="../js/jquery.min.js"></script>
Example #2
0
    $out = @socket_read($socket, 2048);
    if (strncmp($out, 'ok id="2"', 9) != 0) {
        $error = sprintf(_("Bad response from %s server. Please, wait until it's available again or check if it's running at %s"), Session::is_pro() ? "USM" : "OSSIM", "{$address}:{$port}");
        echo ossim_error($error);
        exit;
    }
    @socket_shutdown($socket);
    @socket_close($socket);
}
// Switch off web indicator
if ($what == 'all') {
    Web_indicator::set_off('Reload_policies');
    Web_indicator::set_off('Reload_sensors');
    Web_indicator::set_off('Reload_servers');
} else {
    Web_indicator::set_off('Reload_' . $what);
}
// ReloadPolicy key deprecated, now using Reload_policies always
// Reset main indicator if no more policy reload need
/*
if (!Web_indicator::is_on('Reload_policies') && !Web_indicator::is_on('Reload_sensors') && !Web_indicator::is_on('Reload_plugins') 
    && !Web_indicator::is_on('Reload_directives') && !Web_indicator::is_on('Reload_servers')) {
    Web_indicator::set_off('ReloadPolicy');
}
*/
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <script type="text/javascript" src="../js/jquery.min.js"></script>
    <link rel="stylesheet" type="text/css" href="../style/av_common.css?t=<?php