示例#1
0
	<title><?php 
echo gettext("OSSIM Framework");
?>
 </title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
    <meta http-equiv="Pragma" content="no-cache"/>
    <link rel="stylesheet" type="text/css" href="/ossim/style/av_common.css?t=<?php 
echo Util::get_css_id();
?>
"/>
</head>
<body>
<?php 
$upgrade = new Upgrade();
if (GET('submit')) {
    $ok = $upgrade->needs_upgrade();
    if (!$ok) {
        echo ossim_error(_("No upgrades needed"), AV_INFO);
        exit;
    }
    if (ossim_error()) {
        echo ossim_error(_("Not clean installation detected. Refusing to apply upgrades, please do it manually"));
        exit;
    }
    $upgrade->apply_needed();
    echo "<br><br>\n    <form>\n        <table width='100%' class='noborder' style='background:transparent;'>\n            <tr>\n                <td class='nobborder' style='text-align:center;'>\n                    <input type='button' onclick=\"top.frames['main'].window.location.reload();\" value='" . _("Continue") . "'/>\n                </td>\n            </tr>\n        </table>\n    </form>";
    exit;
}
// Force a certain upgrade
if (GET('version') && GET('type') && GET('force')) {
    $upgrades = $upgrade->get_all();
示例#2
0
* Class and Function List:
* Function list:
* Classes list:
*/
require_once 'ossim_conf.inc';
require_once 'classes/Upgrade.inc';
require_once 'classes/Session.inc';
require_once 'classes/Util.inc';
require_once 'classes/Sensor.inc';
$conf = $GLOBALS["CONF"];
$version = $conf->get_conf("ossim_server_version", FALSE);
$cloud_instance = $conf->get_conf("cloud_instance", FALSE) == 1 ? true : false;
$opensource = !preg_match("/pro|demo/i", $version) ? true : false;
$prodemo = preg_match("/pro|demo/i", $version) ? true : false;
$upgrade = new Upgrade();
if (Session::am_i_admin() && $upgrade->needs_upgrade()) {
    $menu["Upgrade"][] = array("name" => gettext("System Upgrade Needed"), "id" => "Upgrade", "url" => "upgrade/index.php");
    $hmenu["Upgrade"][] = array("name" => gettext("Software Upgrade"), "id" => "Upgrade", "url" => "upgrade/");
    $hmenu["Upgrade"][] = array("name" => gettext("Update Notification"), "id" => "Updates", "url" => "updates/index.php");
    $GLOBALS['ossim_last_error'] = false;
}
/* Dashboards */
$dashboards = 0;
if (Session::menu_perms("MenuControlPanel", "ControlPanelExecutive")) {
    $dashboards = 1;
    $menu["Dashboards"][] = array("name" => gettext("Dashboards"), "id" => "Executive Panel", "url" => "panel/");
}
if (Session::menu_perms("MenuControlPanel", "BusinessProcesses") || Session::menu_perms("MenuControlPanel", "ControlPanelMetrics")) {
    $dashboards = 1;
    if (Session::menu_perms("MenuControlPanel", "BusinessProcesses")) {
        $menu["Dashboards"][] = array("name" => gettext("Risk"), "id" => "Risk", "url" => "risk_maps/riskmaps.php?view=1");