exit; } foreach ($out_list['globals'] as $global) { eval($global); } $_SESSION['backend_version'] = $version; // check disk usage nfsend_query("get-du", array(), 0); // Parameter parsing: check for tab and profileswitch list($status, $tab_changed, $profile_changed) = ParseInput(); if ($status == FALSE) { SendHeader(1); ShowMessages(); exit; } if ($_SESSION['tab'] != 2 && !allowed_nfsen_section()) { $_SESSION['tab'] = 2; } // tab processing $label = $TabList[$_SESSION['tab']]; switch ($label) { // no further processing needed for tabs 0 - 3 case "Home": case "Graphs": if ($tab_changed || !array_key_exists('sub_tab', $_SESSION)) { $_SESSION['sub_tab'] = 0; } break; case "Details": include "details.php"; Process_Details_tab($tab_changed, $profile_changed);
function navigator() { global $self; global $TabList; global $GraphTabs; $numtabs = count($TabList); $plugins = GetPlugins(); $profiles = GetProfiles(); $profileswitch = $_SESSION['profileswitch']; switch ($_SESSION['profileinfo']['type'] & 3) { case 0: $profile_type = 'live'; break; case 1: $profile_type = 'history'; break; case 2: $profile_type = 'continuous'; break; default: $type = 'unknown'; } $profile_type .= ($_SESSION['profileinfo']['type'] & 4) > 0 ? ' / shadow' : ''; $perms = allowed_nfsen_section(); $disabled = ''; if (!$perms) { $disabled = 'font-style:italic;color: #aeaeae;text-decoration:none;cursor:default;'; } global $conf; ?> <!-- <div style="position:absolute;right:30px;top:15px;vertical-align:bottom;width:450px;"> <table border=0 align="right" style="margin:0px;padding:0px;background-color:transparent;border:0px none"> <tr> <td align="right" class="black" nowrap style="background-color:transparent;border:0px none"> <a class="white" <?php echo $_SESSION['tab'] == 2 ? "style='font-weight:bold !important'" : ""; ?> href="nfsen.php?tab=2"><?php echo _("Details"); ?> </a> </td> <td style='padding:0px 7px 0px 7px' class='separator'><img src='/ossim/pixmaps/1x1.png'/></td> <td> <a style="<?php echo $disabled; echo $_SESSION['tab'] == 0 ? ";font-weight:bold !important" : ""; ?> " class="white" href="<?php echo $perms ? "nfsen.php?tab=0" : "javascript:;"; ?> "><?php echo _("Overview"); ?> </a> </td> <td style='padding:0px 7px 0px 7px' class='separator'><img src='/ossim/pixmaps/1x1.png'/></td> <td> <a style="<?php echo $disabled; echo $_SESSION['tab'] == 1 ? ";font-weight:bold !important" : ""; ?> " class="white" href="<?php echo $perms ? "nfsen.php?tab=1" : "javascript:;"; ?> "><?php echo _("Graphs"); ?> </a> </td> </tr> </table> </div> --> <form action="<?php echo $self; ?> " name='navi' method="POST"> <div class="shadetabs" style="display:none"><br> <table border='0' cellpadding="0" cellspacing="0"> <tr> <td> <ul> <?php for ($i = 0; $i < $numtabs; $i++) { if ($i == $_SESSION['tab']) { echo "<li class='selected'><a href='{$self}?tab={$i}'>" . $TabList[$i] . "</a></li>\n"; } else { echo "<li><a href='{$self}?tab={$i}'>" . $TabList[$i] . "</a></li>\n"; } } ?> </ul> </td> <td class="navigator"> <?php echo $profile_type; ?> </td> <td class="navigator"><?php echo _("Profile"); ?> :</td> </tr> </table> <input type="hidden" id="profilemenu_field" name="profileswitch" value="<?php echo Util::htmlentities($profileswitch); ?> "> </div> <?php $_tab = $_SESSION['tab']; if ($TabList[$_tab] == 'Graphs') { $_sub_tab = $_SESSION['sub_tab']; $base_url = Menu::get_menu_url('/ossim/nfsen/nfsen.php?tab=1', 'environment', 'netflow', 'graph'); ?> <div class="shadetabs"> <br> <table border='0' cellpadding="0" cellspacing="0" class="noborder" align="center"> <tr> <td class="noborder" style="padding-bottom:5px;text-align:center"> <?php for ($i = 0; $i < count($GraphTabs); $i++) { $g_url = $base_url . '&sub_tab=' . $i; if ($i > 0) { echo "| "; } if ($i == $_sub_tab) { echo "<a href='{$g_url}'><strong>" . $GraphTabs[$i] . "</strong></a>\n"; } else { echo "<a href='{$g_url}'>" . $GraphTabs[$i] . "</a>\n"; } } ?> </td> </tr> </table> </div> <?php } if ($TabList[$_tab] == 'Plugins') { if (count($plugins) == 0) { ?> <div class="shadetabs"><br> <h3 style='margin-left: 10px;margin-bottom: 2px;margin-top: 2px;'>No plugins available!</h3> </div> <?php } else { ?> <div class="shadetabs"><br> <table border='0' cellpadding="0" cellspacing="0"> <tr> <td> <ul> <?php for ($i = 0; $i < count($plugins); $i++) { if ($i == $_SESSION['sub_tab']) { print "<li class='selected'><a href='{$self}?sub_tab={$i}'>" . Util::htmlentities($plugins[$i]) . "</a></li>\n"; } else { print "<li><a href='{$self}?sub_tab={$i}'>" . Util::htmlentities($plugins[$i]) . "</a></li>\n"; } } ?> </ul> </td> </tr> </table> </div> <?php } } print "</form>\n"; print "<script language='Javascript' type='text/javascript'>\n"; print "selectMenus['profilemenu'] = 0;\n"; /* $i = 0; $savegroup = ''; $groupid = 0; foreach ($profiles as $profileswitch) { if (preg_match("/^(.+)\/(.+)/", $profileswitch, $matches)) { $profilegroup = $matches[1]; $profilename = $matches[2]; $profilename = Util::htmlentities($profilename); $profilegroup = Util::htmlentities($profilegroup); $profileswitch = Util::htmlentities($profileswitch); if ($profilegroup == '.') { print "selectOptions[selectOptions.length] = '0||$profilename||./$profilename'; \n"; } else { if ($profilegroup != $savegroup) { $savegroup = $profilegroup; print "selectOptions[selectOptions.length] = '0||$profilegroup||@@0.$i'; \n"; $groupid = $i; $i++; } print "selectOptions[selectOptions.length] = '0.$groupid||$profilename||$profilegroup/$profilename'; \n"; } } else { print "selectOptions[selectOptions.length] = '0||".Util::htmlentities($profileswitch)."||".Util::htmlentities($profileswitch)."'; \n"; } $i++; } */ //print "selectRelateMenu('profilemenu', function() { document.navi.submit(); });\n"; // print "selectRelateMenu('profilemenu', false);\n"; print "</script>\n"; print "<noscript><h3 class='errstring'>" . _("Your browser does not support JavaScript! NfSen will not work properly!") . "</h3></noscript>\n"; $bk = base64_decode(urldecode($_SESSION['bookmark'])); }