<?php 

/*
** SellaNMS
** $Id: browserbody_template.php,v 1.8 2006/01/24 07:08:09 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('../config/config.php');
require_once('../modules/browser/modules/dgssearch/config/config.php');
require_once('../modules/browser/modules/dgssearch/libs/dgsutil/dgssearch.php');
require_once('../libs/dgsutil/cgi.php');

$data = getFormData();

if ($data['function'] == 'Browse' || $data['q'] == 'Browse Network Elements') {
	$data['q'] = false;
	$data['function'] = 'Browse';
}

if ($data['q']) {
	unset($database['browse']);

	chdir('../modules/browser/modules/dgssearch');
	require_once('search.php');
} else {
	if ($data['function'] == 'Display') {
?>

<FRAMESET ROWS="100%" COLS="50%, 50%" FRAMEBORDER="1" FRAMESPACING="0">
	<FRAMESET ROWS="15%, 45%, 40%" COLS="100%" FRAMEBORDER="1" FRAMESPACING="0">
		<FRAME NAME="elementviewer" SRC="sella_nms-elementviewer.php?<?php printf('router=%d&rand=%d', $data['router'], $data['rand']); ?>">
		<FRAME NAME="interfacelister" SRC="sella_nms-interfacelister.php?<?php printf('router=%d&rand=%d', $data['router'], $data['rand']); ?>">
		<FRAME NAME="connectionlister" SRC="sella_nms-connectionlister.php?<?php printf('router=%d&rand=%d', $data['router'], $data['rand']); ?>">
	</FRAMESET>
	<FRAMESET ROWS="50%, 50%" COLS="100%" FRAMEBORDER="1" FRAMESPACING="0">
		<FRAME NAME="interfaceviewer" SRC="sella_nms-interfaceviewer.php?<?php printf('interface=%d&rand=%d', $data['interface'], $data['rand']); ?>">
		<FRAME NAME="elementalerts" SRC="sella_nms-elementalerts.php?<?php printf('router=%d&rand=%d', $data['router'], $data['rand']); ?>">
	</FRAMESET>
</FRAMESET>

<?php
	} else if (is_array($database)) {
		while (list($idx, ) = each($database)) {
			if ($idx != 'browse') {
				unset($database[$idx]);
			}
		}
	}
	$q = 'Browse Network Elements';

	chdir('../modules/browser/modules/dgssearch');
	require_once('search.php');
}

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

?>
