<?php 

/*
** SellaNMS
** $Id: events.php,v 1.19 2005/03/31 18:57:12 sella Exp $
** Copyright (c) 2001 Digital Genesis Software, LLC. All Rights Reserved.
** Released under the GPL Version 2 License.
** http://www.digitalgenesis.com
*/

require_once('modules/events/modules/eventviewer.php');
require_once('modules/events/modules/alarms.php');
require_once('modules/events/modules/alerts.php');
require_once('modules/events/modules/recoveries.php');
require_once('modules/events/modules/currentnotifications.php');

class Events extends Module {
	function Events() {
		$this->dependants[] = new Alarms();
		$this->dependants[] = new Recoveries;
		$this->dependants[] = new Alerts;
		$this->dependants[] = new CurrentNotifications();

		$this->cache_ext = 'php';
	}

	function shouldUpdate() {
		return false;
	}

	function getContent($tabs) {
		for ($i = 0; $i < $tabs; $i++) {
			$indent .= "\t";
		}

		$content = "";

		$content .= sprintf("%s<?php require_once('../libs/dgsutil/cgi.php'); ?>\n", $indent);
		$content .= sprintf("%s<?php \$data = getFormData(); ?>\n", $indent);
		$content .= sprintf("%s<FRAMESET ROWS=\"100%%\" COLS=\"50%%, 50%%\" FRAMEBORDER=\"1\" FRAMESPACING=\"0\">\n", $indent);
		$content .= sprintf("%s\t<FRAMESET ROWS=\"70%%, 30%%\" COLS=\"100%%\" FRAMEBORDER=\"1\" FRAMESPACING=\"0\">\n", $indent);
		$content .= sprintf("%s\t\t<FRAME NAME=\"alarms\" SRC=\"sella_nms-alarms.php?rand=<?php printf('%%s', \$data['rand']); ?>\">\n", $indent);
		$content .= sprintf("%s\t\t<FRAME NAME=\"recoveries\" SRC=\"sella_nms-recoveries.php?rand=<?php printf('%%s', \$data['rand']); ?>\">\n", $indent);
		$content .= sprintf("%s\t</FRAMESET>\n", $indent);
		$content .= sprintf("%s\t<FRAMESET ROWS=\"25%%, 75%%\" COLS=\"100%%\" FRAMEBORDER=\"1\" FRAMESPACING=\"0\">\n", $indent);
		$content .= sprintf("%s\t\t<FRAME NAME=\"currentnotificiations\" SRC=\"sella_nms-currentnotifications.php?rand=<?php printf('%%s', \$data['rand']); ?>\" SCROLLING=\"yes\">\n", $indent);
		$content .= sprintf("%s\t\t<FRAME NAME=\"alerts\" SRC=\"sella_nms-alerts.php?rand=<?php printf('%%s', \$data['rand']); ?>\" SCROLLING=\"yes\">\n", $indent);
		$content .= sprintf("%s\t</FRAMESET>\n", $indent);
		$content .= sprintf("%s</FRAMESET>\n", $indent);

		return $content;
	}
}

/*
** Local Variables:
** c-basic-offset: 3
** tab-width: 3
** End:
** vim600: fdm=marker
** vim: noet ts=3 sw=3
*/

?>
