doIt(); break; case "InstanceView": Control::processInstance($event); break; case "UISettings": Control::processUISettings($event); break; default: // call List-View require ("gui/view/ViewStart.php"); break; } } static function processNavBar($event) { switch($event) { // what did I do? case "Monitor": require("gui/view/ViewStart.php"); break; case "Admin": $view = new ListView(); $view->viewSelection(); break; case "ShowLog": require("gui/view/showlog.php"); break; case "UISettings": require("gui/view/UISettings.php"); break; default: throw new RuntimeException("Unknown NavBar event: ".$event); } } static function processViewStart($event) { switch ($event) { case "Details": if (!isset($_GET["ID"])) { header("location:ViewStart.php"); exit; } CommonData::getInstance()->setCurrentMonitor($_GET["ID"]); require 'gui/view/ViewMonitor.php'; break; default: require 'gui/view/ViewStart.php'; break; } } static function processViewMonitor($event) { // monitor functions depend always on the id of the monitor $id = $_GET["ID"]; switch ($event) { case "InstSelect": CommonData::getInstance()->setCurrentMonitor($id); require 'gui/view/ViewMonitor.php'; /* $id = $_GET["ID"]; header("Location:ViewStart.php?event=Details&ID=$id"); exit(); */ break; case "Confirm": AlarmManagementIf::confirmAlarmBalance($id); // redirect to ViewMonitor.php // this prevents continuous confirms when pressing the reload button // I don't know how 'dirty' the code is, as the manual states that // a 'http://' has to follow 'Location:' It seems to work properly though. header("Location:ViewMonitor.php?ID=$id"); exit(); break; default: CommonData::getInstance()->setCurrentMonitor($id); require 'gui/view/ViewMonitor.php'; break; } } static function processInstance($event) { $detailView = new DetailView(); $class = new GenadClass("Alarm Balance Monitor"); $detailView->view($class); } static function processUISettings($event) { } }