Location: PHPKode > projects > Cancerbero - The watchdog of the ports > cancerbero-0.6/site/menu.html
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<html>
<head>
<TITLE>Cancerbero, the watchdog of the ports</TITLE>
<LINK REL="SHORTCUT ICON" HREF="icons/cancerbero.ico">
<link href="include/smenustyles.css" type="text/css" rel="stylesheet">
	<!-- menu code begin -->
<style type="text/css" media="all" title="text/css">
<!--

#menubar
	{
	margin-top: 2px;
	margin-bottom: 20px;
	color: #000;
	font-size: 10px;
	background-color: #dadedc;
	width: 100%;
	height: 21px;
	display: block;
	text-align: left;
	position: relative;
	border-style: solid;
	border-width: 1px 0 1px 0;
	z-index: 10;
	border-color: #FFA537 #FFA537 #FFA537 #FFA537;
	}
	
.menuendspacer
	{
	position: relative;
	display: block;
	width: 30px;
	height: 20px;
	float: left;
	}

#menubaritem1, #menubaritem2, #menubaritem3, #menubaritem4, #menubaritem5, #menubaritem6, #menubaritem7
	{
	font-weight: bold;
	color: #767e7a;
	float: left;
	height: 20px;
	background-color: transparent;
	position: relative;
	display: block;
	}
	
#menubaritem1 a, #menubaritem2 a, #menubaritem3 a, #menubaritem4 a, #menubaritem5 a, #menubaritem6 a, #menubaritem7 a
	{
	padding: 4px 10px 5px 10px;
	color: #767e7a;
	background-color: transparent;
	display: block;
	text-decoration: none
	}
	
#menubaritem1 a:hover, #menubaritem2 a:hover, #menubaritem3 a:hover, #menubaritem4 a:hover, #menubaritem5 a:hover, #menubaritem6 a:hover, #menubaritem7 a:hover
	{
	background-color: #cccfcc;
	display: block;
	}

#menu1, #menu2, #menu3, #menu4, #menu5, #menu6, #menu7
	{
	font-weight: normal;
	background-color: #f0f3f2;
	text-align: left;
	position: absolute;
	z-index: 10;
	margin-top: 21px;
	margin-left: 0px;
	width: 100px;
	visibility: hidden;
	border-color: #fff #aaa #aaa #fff;
	border-width: 1px 1px 1px 1px;
	border-style: solid;
	clear: left;
	}
	
.menuitem1, .menuitem2, .menuitem3, .menuitem4, .menuitem5, .menuitem6, .menuitem7
	{
	color: #000;
	width: 100%;
	color: green;
	background-color: #fff;
	position: relative;
	display: block;
	}
	
.menuitem1 a, .menuitem2 a, .menuitem3 a, .menuitem4 a, .menuitem5 a, .menuitem6 a, .menuitem7 a
	{
	color: #000;
	padding: 5px 10px 5px 10px;
	background-color: #f0f3f2;
	}
	
.menuitem1 a:hover, .menuitem2 a:hover, .menuitem3 a:hover, .menuitem4 a:hover, .menuitem5 a:hover, .menuitem6 a:hover, .menuitem7 a:hover
	{
	padding: 5px 10px 5px 10px;
	background-color: #dadedc;
	}
	
-->
</style>


<script type="text/javascript">
// <!--
var menus = 6;
var currentMenu = 0;
var selectedMenu = 0;
var clicked = false;

function nothing()
	{
	// dummy function providing a dead link
	// replace with real links
	}

function selectMenu(m) // click on a menu header
	{
	if(clicked) // the menu is already active
		{
		clicked=false;
		selectedMenu=0;
		currentMenu=m;
		hideAll(-1)
		}
	else
		{
		clicked=true;
		selectedMenu=m;
		currentMenu=m;
		
		hideAll(m); // except m
		if(document.getElementById)
			{
			var themenu=document.getElementById("menu"+m);
			themenu.style.visibility="visible";
			}
		}
	}


function showMenu(m) // display a full menu on rollover
	{
	if(clicked)
		{
		hideAll(m);
		if(document.getElementById)
			{
			var themenubaritem=document.getElementById("menubaritem"+m);
			themenubaritem.style.background="#cccfcc";
			var thermenu=document.getElementById("menu"+m);
			thermenu.style.visibility="visible";
			}
		}
		selectedMenu=0;
		currentMenu=m;
	}
	
	
function doMenuChoice(m,n) // click a menu item
	{
	selectedMenu=0;
	currentMenu=-1;
	hideAll(currentMenu);
	clicked=false;
	alert("You chose menu "+m+" item "+n);
	return false;
	}
	
	
function hideAll(e) // hide all menus except e
	{
	
		for(i=1;i<=menus;i++)
			{
			if(e!=i)
				{
				if(document.getElementById)
					{
					var themenubaritem=document.getElementById("menubaritem"+i);
					themenubaritem.style.background="transparent";
					var themenu=document.getElementById("menu"+i);
					themenu.style.visibility="hidden";
					}
				}
			}
	}
	

// -->

function showhide(id){
	if (document.getElementById){
	obj = document.getElementById(id);
	if (obj.style.display == "none"){
		obj.style.display = "";
	} else {
		obj.style.display = "none";
		}
	}
}

function multishowhide(){
	for(var i=0; i<arguments.length; i++) {
		showhide(arguments[i]);
	}
}

function oneshowallhide(){
	for(var i=0; i<arguments.length; i++) {
		if ( i == "0" ) {
			obj = document.getElementById(arguments[i]);
			obj.style.display = "none";
		} else {
			obj = document.getElementById(arguments[i]);
			obj.style.display = "";
		}
		showhide(arguments[i]);
	}
}




function makeStringFromSelect(selectCtrl) {
	var i;
	var j = 0;
	var outlist = "";

	for (i = 0; i < selectCtrl.options.length; i++) {
		if (j > 0) {
			outlist = outlist + ", ";
		}
		outlist = outlist + selectCtrl.options[i].value;
		j++;
	}
	return outlist;
}

function addItems(fromCtrl, toCtrl) {
	var i;
	var j;
	var itemexists;
	var nextitem;

	// step through all items in fromCtrl
	for (i = 0; i < fromCtrl.options.length; i++) {
		if (fromCtrl.options[i].selected) {
			// search toCtrl to see if duplicate
			j = 0;
			itemexists = false;
			while ((j < toCtrl.options.length) && (!(itemexists))) {
				if (toCtrl.options[j].value == fromCtrl.options[i].value) {
					itemexists = true;
					alert(fromCtrl.options[i].value + " found!");
				}
				j++;
			}
			if (!(itemexists)) {
				// add the item
				nextitem = toCtrl.options.length;
				toCtrl.options[nextitem] = new Option(fromCtrl.options[i].text);
				toCtrl.options[nextitem].value = fromCtrl.options[i].value;
			}
		}
	}
}

function removeItems(fromCtrl) {
	var i = 0;
	var j;
	var k = 0;

	while (i < (fromCtrl.options.length - k)) {
		if (fromCtrl.options[i].selected) {
			// remove the item
			for (j = i; j < (fromCtrl.options.length - 1); j++) {
				fromCtrl.options[j].text = fromCtrl.options[j+1].text;
				fromCtrl.options[j].value = fromCtrl.options[j+1].value;
				fromCtrl.options[j].selected = fromCtrl.options[j+1].selected;
			}
			k++;
		} else {
			i++;
		}
	}
	for (i = 0; i < k; i++) {
		fromCtrl.options[fromCtrl.options.length - 1] = null;
	}
}


</script>



</head>
<?php
	$config = new ReadConfig;
	$general = $config->General('check_alive');
	$refresh = ($general['check_alive']/2)*1000;

	if (isset($_SERVER['REQUEST_URI'])) {
  		$referer = parse_url($_SERVER['REQUEST_URI']);
		$path = $referer['path'];
		if (!ereg("index",$path)) {
			echo "<body>";
		} else {
			echo "<body onLoad=\"setTimeout('self.location.reload()', $refresh)\">";
		}
	}
?>

<!-- http://www.wpdfd.com/editorial/simplemenus.htm-->
<div id="page">
<div align="center">
	<div class="row">
		<a href="http://cancerbero.sf.net"><img title="Go to Cancerbero site!" src="icons/titulo-cancerbero.png" border="0" alt="Cancerbero"></a>
	</div>

	<!-- menu code start -->
	<div id="menubar">
		<div class="menuendspacer"></div>
		<div id="menubaritem1" style="width: 80px">
			<div id="menu1" style="width: 80px">
				<div class="menuitem1">
					<a href="index.php">General</a>
				</div>
			</div>
			<a onmouseover="showMenu(1)" onmouseout="hideAll(currentMenu)" href="javascript:selectMenu(1)">Live Info</a>
		</div>
		<div id="menubaritem2" style="width: 90px">
			<div id="menu2" style="width: 160px">
				<div class="menuitem1">
					<a href="snapshots.php?snap=last10">Last 10 IPs scanned</a>
				</div>
				<div class="menuitem2">
					<a href="snapshots.php?snap=today">Today's IPs scanned</a>
				</div>
				<div class="menuitem3">
					<a href="snapshots.php?snap=last24h">Last 24h IPs scanned</a>
				</div>
				<div class="menuitem4">
					<a href="snapshots.php?snap=last72h">Last 72h IPs scanned</a>
				</div>
				<div class="menuitem5">
					<a href="snapshots.php?snap=nodns">IPs without DNS resolution</a>
				</div>
			</div>
			<a onmouseover="showMenu(2)" onmouseout="hideAll(currentMenu)" href="javascript:selectMenu(2)">Snapshots</a>
		</div>
		<div id="menubaritem3" style="width: 70px">
			<div id="menu3">
				<div class="menuitem1">
					<a href="search_forms.php?search=host">By Host</a>
				</div>
				<div class="menuitem2">
					<a href="search_forms.php?search=service">By service</a>
				</div>
				<div class="menuitem3">
					<a href="search_forms.php?search=port">By port</a>
				</div>
				<div class="menuitem4">
					<a href="search_forms.php?search=mail">By email</a>
				</div>
			</div>
			<a onmouseover="showMenu(3)" onmouseout="hideAll(currentMenu)" href="javascript:selectMenu(3)">Search</a>
		</div>
		<div id="menubaritem4" style="width: 70px">
			<div id="menu4" style="width: 80px">
				<div class="menuitem1">
					<a href="stats.php?stat=general">General</a>
				</div>
				<div class="menuitem2">
					<a href="stats.php?stat=service">By service</a>
				</div>
				<div class="menuitem3">
					<a href="stats.php?stat=port">By port</a>
				</div>
				<div class="menuitem4">
					<a href="stats.php?stat=os">By OS</a>
				</div>
			</div>
			<a onmouseover="showMenu(4)" onmouseout="hideAll(currentMenu)" href="javascript:selectMenu(4)">Stats</a>
		</div>
		<div id="menubaritem5" style="width: 80px">
			<div id="menu5">
				<div class="menuitem1">
					<a href="alerts.php?sensors=null&ranges=null&levels=null&alerts=null&status=unchecked&order_by=ID&order_way=ASC">View Alerts</a>
				</div>
			</div>
			<a onmouseover="showMenu(5)" onmouseout="hideAll(currentMenu)" href="javascript:selectMenu(5)">Alerts</a>
		</div>
		<div id="menubaritem6" style="width: 70px">
			<div id="menu6" style="width: 80px">
				<div class="menuitem1">
					<a href="config.php?conf=general">General</a>
				</div>
				<div class="menuitem2">
					<a href="config.php?conf=sensor&save=begining">Sensor</a>
				</div>
				<div class="menuitem3">
					<a href="config.php?conf=range">Range</a>
				</div>
				<div class="menuitem4">
					<a href="config.php?conf=nmap_conf">Nmap conf</a>
				</div>
				<div class="menuitem5">
					<a href="config.php?conf=plugins">Plugins</a>
				</div>
				<div class="menuitem6">
					<a href="config.php?conf=alerts">Alerts</a>
				</div>
				<div class="menuitem7">
					<a href="owner_manager.php?conf=list">Owners</a>
				</div>
			</div>
			<a onmouseover="showMenu(6)" onmouseout="hideAll(currentMenu)" href="javascript:selectMenu(6)">Config</a>
		</div>
		<div id="menubaritem7" style="width: 80px">
			<div id="menu7">
				<div class="menuitem1">
					<a href="http://cancerbero.sourceforge.net/wikka.php?wakka=Documentation">Online manual</a>
				</div>
				<div class="menuitem2">
					<a href="http://sf.net/forum/?group_id=152591">Forums</a>
				</div>
				<div class="menuitem3">
					<a href="http://cancerbero.sf.net/faq.html">FAQ</a>
				</div>
				<div class="menuitem4">
					<a href="about.php">About</a>
				</div>
			</div>
			<a onmouseover="showMenu(7)" onmouseout="hideAll(currentMenu)" href="javascript:selectMenu(7)">Help</a>
		</div>
	</div>
	<!-- menu code end -->
Return current item: Cancerbero - The watchdog of the ports