Location: PHPKode > projects > SnortCenter 2.x > snortcenter-release/menu.php
<SCRIPT>
function fwLoadMenus() {
 if (window.sensors) return;
<?php include("config.php"); ?>
 window.sensors = new Menu("root",<?php echo $menu_width[sensors]; ?>,15,"Arial, Helvetica, sans-serif",11,"#cccccc","#000000","#595959","#efe51c");
 sensors.addMenuItem("<?php echo $lang[0]; ?>","location='sensor.php?<?php echo"sensor_id=$sensor_id";?>'");
 sensors.addMenuItem("<?php echo $lang[1]; ?>","location='add_sensor.php?do=new'");
 sensors.addMenuItem("<?php echo $lang[2]; ?>","location='sensor.php?do=sensor_del'");
 sensors.hideOnMouseOut=true;

 window.sensor_config = new Menu("root",<?php echo $menu_width[sensor_config]; ?>,15,"Arial, Helvetica, sans-serif",11,"#cccccc","#000000","#595959","#efe51c");
 sensor_config.addMenuItem("<?php echo $lang[270]; ?>","location='sensor_rules.php?<?php echo"sensor_id=$sensor_id&category=$category&s_pos=$s_pos";?>'");
 sensor_config.addMenuItem("<?php echo $lang[271]; ?>","location='sensor_vars.php?<?php echo"sensor_id=$sensor_id";?>'");
 sensor_config.addMenuItem("<?php echo $lang[272]; ?>","location='sensor_spp.php?<?php echo"sensor_id=$sensor_id";?>'");
 sensor_config.addMenuItem("<?php echo $lang[273]; ?>","location='sensor_spo.php?<?php echo"sensor_id=$sensor_id";?>'");
 sensor_config.addMenuItem("<?php echo $lang[274]; ?>","location='sensor_ruletype.php?<?php echo"sensor_id=$sensor_id";?>'");
 sensor_config.addMenuItem("<?php echo $lang[275]; ?>","location='sensor_class.php?<?php echo"sensor_id=$sensor_id";?>'");
 sensor_config.addMenuItem("<?php echo $lang[276]; ?>","location='sensor_reference.php?<?php echo"sensor_id=$sensor_id";?>'");
 sensor_config.addMenuItem("<?php echo $lang[316]; ?>","location='sensor_decode.php?<?php echo"sensor_id=$sensor_id";?>'");
 sensor_config.hideOnMouseOut=true;


 window.update_rules = new Menu("<?php echo $lang[3]; ?>",<?php echo $menu_width[update_rules]; ?>,15,"Arial, Helvetica, sans-serif",11,"#cccccc","#000000","#595959","#efe51c");
 update_rules.addMenuItem("<?php echo $lang[4]; ?>","location='db_pars.php?source=net&force=yes&<?php echo"sensor_id=$sensor_id";?>'");
 update_rules.addMenuItem("<?php echo $lang[5]; ?>","location='db_pars.php?source=cp_upload&<?php echo"sensor_id=$sensor_id";?>'");
 update_rules.addMenuItem("<?php echo $lang[6]; ?>","location='db_pars.php?source=upload&<?php echo"sensor_id=$sensor_id";?>'");
 update_rules.hideOnMouseOut=true;

 window.rules = new Menu("<?php echo $lang[268]; ?>",<?php echo $menu_width[rules]; ?>,15,"Arial, Helvetica, sans-serif",11,"#cccccc","#000000","#595959","#efe51c");
 rules.addMenuItem("<?php echo $lang[7]; ?>","location='rules.php?<?php echo"sensor_id=$sensor_id&category=$category&s_pos=$s_pos";?>'");
 rules.addMenuItem("<?php echo $lang[8]; ?>","location='edit_rule.php?rule=new&<?php echo"sensor_id=$sensor_id";?>'");

 rules.hideOnMouseOut=true;

 window.vars = new Menu("<?php echo $lang[9]; ?>",<?php echo $menu_width[vars]; ?>,15,"Arial, Helvetica, sans-serif",11,"#cccccc","#000000","#595959","#efe51c");
 vars.addMenuItem("<?php echo $lang[10]; ?>","location='vars.php?<?php echo"sensor_id=$sensor_id";?>'");
 vars.addMenuItem("<?php echo $lang[11]; ?>","location='edit_vars.php?var=new&<?php echo"sensor_id=$sensor_id";?>'");
 vars.hideOnMouseOut=true;

 window.spp = new Menu("<?php echo $lang[12]; ?>",<?php echo $menu_width[spp]; ?>,15,"Arial, Helvetica, sans-serif",11,"#cccccc","#000000","#595959","#efe51c");
 spp.addMenuItem("<?php echo $lang[13]; ?>","location='spp.php?<?php echo"sensor_id=$sensor_id";?>'");
 spp.addMenuItem("<?php echo $lang[14]; ?>","location='edit_spp.php?spp=new&<?php echo"sensor_id=$sensor_id";?>'");
 spp.hideOnMouseOut=true;

 window.spo = new Menu("<?php echo $lang[15]; ?>",<?php echo $menu_width[spo]; ?>,15,"Arial, Helvetica, sans-serif",11,"#cccccc","#000000","#595959","#efe51c");
 spo.addMenuItem("<?php echo $lang[16]; ?>","location='spo.php?<?php echo"sensor_id=$sensor_id";?>'");
 spo.addMenuItem("<?php echo $lang[17]; ?>","location='edit_spo.php?spo=new&<?php echo"sensor_id=$sensor_id";?>'");
 spo.hideOnMouseOut=true;
 
 window.ruletype = new Menu("<?php echo $lang[18]; ?>",<?php echo $menu_width[ruletype]; ?>,15,"Arial, Helvetica, sans-serif",11,"#cccccc","#000000","#595959","#efe51c");
 ruletype.addMenuItem("<?php echo $lang[19]; ?>","location='ruletype.php?<?php echo"sensor_id=$sensor_id";?>'");
 ruletype.addMenuItem("<?php echo $lang[20]; ?>","location='edit_ruletype.php?rule=new&<?php echo"sensor_id=$sensor_id";?>'");
 ruletype.hideOnMouseOut=true;

 window.classif = new Menu("<?php echo $lang[21]; ?>",<?php echo $menu_width[classif]; ?>,15,"Arial, Helvetica, sans-serif",11,"#cccccc","#000000","#595959","#efe51c");
 classif.addMenuItem("<?php echo $lang[22]; ?>","location='class.php?<?php echo"sensor_id=$sensor_id";?>'");
 classif.addMenuItem("<?php echo $lang[23]; ?>","location='edit_class.php?class=new&<?php echo"sensor_id=$sensor_id";?>'");
 classif.hideOnMouseOut=true;
 
 window.reference = new Menu("<?php echo $lang[265]; ?>",<?php echo $menu_width[reference]; ?>,15,"Arial, Helvetica, sans-serif",11,"#cccccc","#000000","#595959","#efe51c");
 reference.addMenuItem("<?php echo $lang[266]; ?>","location='reference.php?<?php echo"sensor_id=$sensor_id";?>'");
 reference.addMenuItem("<?php echo $lang[267]; ?>","location='edit_ref.php?ref=new&<?php echo"sensor_id=$sensor_id";?>'");
 reference.hideOnMouseOut=true;

 window.decode = new Menu("<?php echo $lang[312]; ?>",<?php echo $menu_width[decode]; ?>,15,"Arial, Helvetica, sans-serif",11,"#cccccc","#000000","#595959","#efe51c");
 decode.addMenuItem("<?php echo $lang[313]; ?>","location='decode.php?<?php echo"sensor_id=$sensor_id";?>'");
 decode.addMenuItem("<?php echo $lang[314]; ?>","location='edit_dec.php?ref=new&<?php echo"sensor_id=$sensor_id";?>'");
 decode.hideOnMouseOut=true;


 
 window.config = new Menu("root",<?php echo $menu_width[config]; ?>,15,"Arial, Helvetica, sans-serif",11,"#cccccc","#000000","#595959","#efe51c");
 config.addMenuItem("<?php echo $lang[277]; ?>","location='edit_template.php?<?php echo"sensor_id=$sensor_id&do=new";?>'");
 config.addMenuItem(rules,"location='rules.php?<?php echo"sensor_id=$sensor_id&category=$category&s_pos=$s_pos";?>'");
 config.addMenuItem(vars,"location='vars.php?<?php echo"sensor_id=$sensor_id";?>'");
 config.addMenuItem(spp,"location='spp.php?<?php echo"sensor_id=$sensor_id";?>'"); 
 config.addMenuItem(spo,"location='spo.php?<?php echo"sensor_id=$sensor_id";?>'"); 
 config.addMenuItem(ruletype,"location='ruletype.php?<?php echo"sensor_id=$sensor_id";?>'");
 config.addMenuItem(classif,"location='class.php?<?php echo"sensor_id=$sensor_id";?>'");
 config.addMenuItem(reference,"location='reference.php?<?php echo"sensor_id=$sensor_id";?>'");
 config.addMenuItem(decode,"location='decode.php?<?php echo"sensor_id=$sensor_id";?>'");


 config.hideOnMouseOut=true;

 window.users = new Menu("<?php echo $lang[24]; ?>",<?php echo $menu_width[users]; ?>,15,"Arial, Helvetica, sans-serif",11,"#cccccc","#000000","#595959","#efe51c");
 users.addMenuItem("<?php echo $lang[25]; ?>","location='user_admin.php?<?php echo"sensor_id=$sensor_id";?>'");
 users.addMenuItem("<?php echo $lang[26]; ?>","location='user_admin.php?edit_user=Add+User&<?php echo"sensor_id=$sensor_id";?>'");
 users.hideOnMouseOut=true;

 window.admin = new Menu("root",<?php echo $menu_width[admin]; ?>,15,"Arial, Helvetica, sans-serif",11,"#cccccc","#000000","#595959","#efe51c");
 admin.addMenuItem(update_rules);
 admin.addMenuItem(users,"location='user_admin.php?<?php echo"sensor_id=$sensor_id";?>'");
<!--  admin.addMenuItem("<?php echo $lang[27]; ?>","location=''"); -->
<!--  admin.addMenuItem("<?php echo $lang[29]; ?>","location='setup.php?do=database'"); -->
<!--  admin.addMenuItem("<?php echo $lang[30]; ?>","location='delall.php'"); -->
 admin.addMenuItem("<?php echo $lang[31]; ?>","location='setup.php?do=license'");
 admin.hideOnMouseOut=true;

 admin.writeMenus();
} // fwLoadMenus()

function MM_swapImgRestore() { //v3.0
 var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
 var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
 var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
 if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.0
 var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
 d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
 if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
 for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
 if(!x && document.getElementById) x=document.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
 var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
 if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function MM_displayStatusMsg(msgStr) { //v1.0
 status=msgStr;
 document.MM_returnValue = true;
}
</SCRIPT>
Return current item: SnortCenter 2.x