Registrations to Open-AudIT forums are now closed. To ask any new questions please visit Opmantek Community Questions.

Open-AudIT

What's on your network?
It is currently Thu Mar 28, 2024 8:40 pm

All times are UTC + 10 hours




Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
PostPosted: Mon Dec 17, 2007 10:20 pm 
Offline
Moderator
User avatar

Joined: Tue Jan 25, 2005 3:09 am
Posts: 2140
Location: Scotland
One of the best features of Open-Audit is the ease with which we can add additional views.

Say for example we need to see which systems are not being kept current in terms of their anti-virus software, or to tell us what versions of anti virus are deployed and where.

We could believe the Anti-virus software vendor's console (if we have one). However, typically this will only tell us about machines which have been discovered by, or manually added to the Anti Virus system. Furthermore if we have no central admin tool for anti virus software we would need to check each machine in turn.

A far better option would be to list everything using Open-Audit. However at the time of writing this FAQ there is no view defined to let us see this information.

This FAQ shows how to add this new view.

First we need to take an existing view and modify it.

The best view to start with is the main system view, since it contains a similar layout to the one we are trying to ahive. This is called list_viewdef_all_system.php and lives in the main openaudit folder.
Copy this file to list_viewef_all_systems_virus_uptodate_test.php and edit it with a text editor.

[code]
<?php

$query_array=array("headline"=>__("List all Systems"),
"sql"=>"SELECT * FROM `system`",
"sort"=>"system_name",
"dir"=>"ASC",
"get"=>array("file"=>"system.php",
"title"=>__("Go to System"),
"var"=>array("pc"=>"%system_uuid",
"view"=>"summary",
),
),
"fields"=>array("10"=>array("name"=>"system_uuid",
"head"=>__("UUID"),
"show"=>"n",
),
"20"=>array("name"=>"net_ip_address",
"head"=>__("IP"),
"show"=>"y",
"link"=>"y",
),
"30"=>array("name"=>"system_name",
"head"=>__("Hostname"),
"show"=>"y",
"link"=>"y",
),
"40"=>array("name"=>"net_user_name",
"head"=>__("Network User"),
"show"=>"y",
"link"=>"y",
),
"50"=>array("name"=>"net_domain",
"head"=>__("Domain"),
"show"=>$show_domain,
),
"60"=>array("name"=>"system_os_name",
"head"=>__("OS"),
"show"=>$show_os,
),
"70"=>array("name"=>"system_service_pack",
"head"=>__("Servicepack"),
"show"=>$show_service_pack,
),
"80"=>array("name"=>"system_timestamp",
"head"=>__("Date Audited"),
"show"=>$show_date_audited,
),
"90"=>array("name"=>"system_system_type",
"head"=>__("System Type"),
"show"=>$show_type,
"align"=>"center",
),
"100"=>array("name"=>"system_description",
"head"=>__("Description"),
"show"=>$show_description,
),


),
);
?>
[/code]

A few words of warning before you start changing things. The file is a PHP file, and therefore, you must keep the basic structure more or less. Particularly try to avoid adding anything including comments, and even blank lines outside the <php and ?> tags as this will probably break things.

[code]
<?php
// This is a viewdef from Open Audit
$query_array=array("headline"=>__("List Anti Virus Information"),
"sql"=>"SELECT * FROM `system`",
"sort"=>"virus_uptodate",
"dir"=>"ASC",
"get"=>array("file"=>"system.php",
"title"=>__("Anti Virus Status"),
"var"=>array("pc"=>"%system_uuid",
"view"=>"security",
),
),
// More comments
"fields"=>array("10"=>array("name"=>"system_uuid",
"head"=>__("UUID"),
"show"=>"n",
),
"20"=>array("name"=>"system_os_name",
"head"=>__("System OS Name"),
"show"=>"n",
"link"=>"n",
),
"30"=>array("name"=>"system_name",
"head"=>__("Hostname"),
"show"=>"y",
"link"=>"y",
),
"40"=>array("name"=>"net_user_name",
"head"=>__("Network User"),
"show"=>"y",
"link"=>"n",
),
"50"=>array("name"=>"virus_manufacturer",
"head"=>__("Anti Virus Software Vendor"),
"show"=>"n",
"link"=>"n",
),
"60"=>array("name"=>"virus_name",
"head"=>__("Anti Virus Software Name"),
"show"=>"y",
"link"=>"n",
),
"70"=>array("name"=>"virus_version",
"head"=>__("Anti Virus Software Version"),
"show"=>"y",
"link"=>"n",
),
"80"=>array("name"=>"virus_uptodate",
"head"=>__("Anti Virus Up To Date"),
"show"=>"y",
"link"=>"n",
),
"90"=>array("name"=>"system_timestamp",
"head"=>__("Last Audited"),
"show"=>"y",
"link"=>"n",
),
),
);
?>[/code]

If you modify things to look like the above, then we should be ready to test the page.

To do this, use the URL https://{your_server_name}/openaudit/list.php?view=all_systems_virus_uptodate_test

As you can see, we have added in fields from the database. For a full list of database fields you would be best to use phpmyadmin [http://www.phpmyadmin.net/home_page/index.php] which is included with XAMPP and indeed most LAMP and WAMP packages, and indeed with most versions of Linux.


You could also look in the scripts folder of Open-Audit for the openaudit.sql script, which contains all of the sql needed to set up Open-Audit. This includes all of the table names etc. We are only using one table in this case, the system table.

Lets go through the changes we made.

The first thing we have done is add in a couple of comments. Be careful with these, if you place them in the wrong place you will probably break things.

Next we have changed the "headline"

[code] $query_array=array("headline"=>__("List Anti Virus Information"), [/code]
This is the Title or Headline of our new page. Note the fact that it is in between __() tags, this ensures it is translated if a suitable translation exists.

Next we modified the fields we wish to display. Note that for the purposes of this FAQ we added in a few field we wont actually display. The UUID is the most important one. This is used as the joining field, in views where we interrogate more than one table (although it doesn't apply here). We have also included the software manufacturer. Change the "show" => "n" to "y" and you will see this field will then appear on your view.

Note that the fields appear horizontally in numerical order i.e. "60"=>array( appears after "50"=>array(
If we need to add in another field between 50 and 60 we could call it "55"=>

Note also that the order in the php file is unimportant so long as the structure is kept. So we could add in "55" => at the end of the array, and it would still appear between 50 and 60.

Now that we are happy with our new view, we need to add it to the menu.

To do this, we need to edit another file. This is called include_menu_array.php and I would suggest you take a backup copy of this file before you proceed, since breaking this, breaks pretty much everything :!:

[code]
<?php
if(!isset($name)) $name = "";
$menue_array = array(

"machine" => array(
"10" => array("name"=>"Hardware",
"link"=>"system.php?pc=$pc&amp;view=hardware",
"image"=>"images/printer.png",
"class"=>"menuparent",
"childs"=>array("05"=>array("name"=>"All", "link"=>"system.php?pc=$pc&amp;view=hardware", "image"=>"images/statistics.png", "title"=>"",),
"10"=>array("name"=>"Fixed Disks", "link"=>"system.php?pc=$pc&amp;view=hardware&amp;category=hard_drive", "image"=>"images/harddisk.png", "title"=>"",),
"20"=>array("name"=>"Partitions", "link"=>"system.php?pc=$pc&amp;view=hardware&amp;category=partition", "image"=>"images/partition.png", "title"=>"",),
"30"=>array("name"=>"SCSI Controller", "link"=>"system.php?pc=$pc&amp;view=hardware&amp;category=scsi_controller", "image"=>"images/scsi.png", "title"=>"",),
"40"=>array("name"=>"Optical Drive", "link"=>"system.php?pc=$pc&amp;view=hardware&amp;category=optical_drive", "image"=>"images/optical.png", "title"=>"",),
"50"=>array("name"=>"Floppy Drive", "link"=>"system.php?pc=$pc&amp;view=hardware&amp;category=floppy", "image"=>"images/floppy.png", "title"=>"",),
"60"=>array("name"=>"Tape Drive", "link"=>"system.php?pc=$pc&amp;view=hardware&amp;category=tape_drive", "image"=>"images/tape.png", "title"=>"",),
"70"=>array("name"=>"Processor", "link"=>"system.php?pc=$pc&amp;view=hardware&amp;category=processor", "image"=>"images/processor.png", "title"=>"",),
"80"=>array("name"=>"Bios", "link"=>"system.php?pc=$pc&amp;view=hardware&amp;category=bios", "image"=>"images/bios.png", "title"=>"",),
"90"=>array("name"=>"Memory", "link"=>"system.php?pc=$pc&amp;view=hardware&amp;category=memory", "image"=>"images/memory.png", "title"=>"",),
"100"=>array("name"=>"Network Card", "link"=>"system.php?pc=$pc&amp;view=hardware&amp;category=network_card", "image"=>"images/network_device.png", "title"=>"",),
"105"=>array("name"=>"Gateway", "link"=>"list.php?view=statistic_gateway", "image"=>"images/network_device.png", "title"=>"",),
"110"=>array("name"=>"Video Adapter", "link"=>"system.php?pc=$pc&amp;view=hardware&amp;category=video", "image"=>"images/display.png", "title"=>"",),
"120"=>array("name"=>"Monitor", "link"=>"system.php?pc=$pc&amp;view=hardware&amp;category=monitor", "image"=>"images/display.png", "title"=>"",),
"130"=>array("name"=>"Soundcard", "link"=>"system.php?pc=$pc&amp;view=hardware&amp;category=sound", "image"=>"images/audio.png", "title"=>"",),
"140"=>array("name"=>"Keyboard and Mouse", "link"=>"system.php?pc=$pc&amp;view=hardware&amp;category=keyboard,mouse", "image"=>"images/keyboard.png", "title"=>"",),
"150"=>array("name"=>"Modem", "link"=>"system.php?pc=$pc&amp;view=hardware&amp;category=modem", "image"=>"images/modem.png", "title"=>"",),
"160"=>array("name"=>"Battery", "link"=>"system.php?pc=$pc&amp;view=hardware&amp;category=battery", "image"=>"images/battery.png", "title"=>"",),
"170"=>array("name"=>"Printer", "link"=>"system.php?pc=$pc&amp;view=hardware&amp;category=printer", "image"=>"images/printer.png", "title"=>"",),
"180"=>array("name"=>"USB", "link"=>"system.php?pc=$pc&amp;view=hardware&amp;category=usb", "image"=>"images/usb.png", "title"=>"",),
),
),
"20" => array("name"=>"Software",
"link"=>"list.php?pc=$pc&amp;view=software_for_system",
"image"=>"images/software.png",
"class"=>"menuparent",
"childs"=>array("10"=>array("name"=>"Installed Software", "link"=>"list.php?pc=$pc&amp;view=software_for_system", "image"=>"images/software.png", "title"=>"",),
"20"=>array("name"=>"System Components", "link"=>"list.php?pc=$pc&amp;view=syscomp_for_system", "image"=>"images/settings_2.png", "title"=>"",),
"30"=>array("name"=>"Hotfixes &amp; Patches", "link"=>"list.php?pc=$pc&amp;view=hotfixes_patches_for_system", "image"=>"images/software_2.png", "title"=>"",),
"40"=>array("name"=>"Run at Startup", "link"=>"list.php?pc=$pc&amp;view=startupsoftware_for_system", "image"=>"images/scsi.png", "title"=>"",),
"50"=>array("name"=>"Software Audit-Trail", "link"=>"list.php?pc=$pc&amp;view=software_audit_system_trail", "image"=>"images/audit.png", "title"=>"",),
"60"=>array("name"=>"Uninstalled Software", "link"=>"list.php?pc=$pc&amp;view=software_uninstalled_for_system", "image"=>"images/audit.png", "title"=>"",),
"70"=>array("name"=>"Keys", "link"=>"list.php?pc=$pc&amp;view=keys_for_system", "image"=>"images/key_2.png", "title"=>"",),
"80"=>array("name"=>"IE BHO's", "link"=>"list.php?pc=$pc&amp;view=ie_bho_for_system", "image"=>"images/browser_bho.png", "title"=>"",),
"90"=>array("name"=>"Codecs", "link"=>"list.php?pc=$pc&amp;view=codecs_for_system", "image"=>"images/audio.png", "title"=>"",),
"100"=>array("name"=>"Services", "link"=>"list.php?pc=$pc&amp;view=services_for_system", "image"=>"images/services.png", "title"=>"",),
),
),
"30" => array("name"=>"OS Settings",
"link"=>"system.php?pc=$pc&amp;view=os",
"image"=>"images/os.png",
"class"=>"menuparent",
"childs"=>array("10"=>array("name"=>"All", "link"=>"system.php?pc=$pc&amp;view=os", "image"=>"images/statistics.png", "title"=>"",),
"20"=>array("name"=>"OS Information", "link"=>"system.php?pc=$pc&amp;view=os&amp;category=os", "image"=>"images/os.png", "title"=>"",),
"30"=>array("name"=>"Software", "link"=>"system.php?pc=$pc&amp;view=os&amp;category=software", "image"=>"images/software.png", "title"=>"",),
"40"=>array("name"=>"Shared Drives", "link"=>"system.php?pc=$pc&amp;view=os&amp;category=shares", "image"=>"images/shared_drive.png", "title"=>"",),

),
),
"50" => array("name"=>"Security",
"link"=>"system.php?pc=$pc&amp;view=security",
"image"=>"images/security.png",
"class"=>"menuparent",
"childs"=>array("10"=>array("name"=>"All", "link"=>"system.php?pc=$pc&amp;view=security&amp;category=", "image"=>"images/statistics.png", "title"=>"",),
"20"=>array("name"=>"Firewall", "link"=>"system.php?pc=$pc&amp;view=security&amp;category=firewall_xpsp2,firewall_other", "image"=>"images/firewall.png", "title"=>"",),
"30"=>array("name"=>"Antivirus", "link"=>"system.php?pc=$pc&amp;view=security&amp;category=antivirus_xp,antivirus_other", "image"=>"images/antivirus.png", "title"=>"",),
"40"=>array("name"=>"Portscan", "link"=>"system.php?pc=$pc&amp;view=security&amp;category=nmap", "image"=>"images/nmap.png", "title"=>"",),
),
),
"60" => array("name"=>"Users &amp; Groups",
"link"=>"system.php?pc=$pc&amp;view=users_groups",
"image"=>"images/users_2.png",
"class"=>"menuparent",
"childs"=>array("10"=>array("name"=>"All", "link"=>"system.php?pc=$pc&amp;view=users_groups&amp;category=", "image"=>"images/statistics.png", "title"=>"",),
"20"=>array("name"=>"Users", "link"=>"system.php?pc=$pc&amp;view=users_groups&amp;category=users", "image"=>"images/users.png", "title"=>"",),
"30"=>array("name"=>"Groups", "link"=>"system.php?pc=$pc&amp;view=users_groups&amp;category=groups", "image"=>"images/groups.png", "title"=>"",),
),
),
"70" => array("name"=>"IIS Settings",
"link"=>"system.php?pc=$pc&amp;view=iis",
"image"=>"images/browser.png",
"title"=>"",
),
"80" => array("name"=>"Disk Usage Graphs",
"link"=>"system_graphs.php?pc=$pc",
"image"=>"images/harddisk.png",
"title"=>"",
),
"90" => array("name"=>"Audit Trail",
"link"=>"./list.php?pc=$pc&amp;view=audit_trail_for_system",
"image"=>"images/audit.png",
"title"=>"",
),
"100" => array("name"=>"PDF-Report (Quick)",
"link"=>"system_export.php?pc=$pc&amp;view=report",
"image"=>"images/printer_l.png",
"title"=>"",
),
"110" => array("name"=>"PDF-Report (Full)",
"link"=>"system_export.php?pc=$pc&amp;view=report_full",
"image"=>"images/printer.png",
"title"=>"",
),
),
"misc" => array(

"10" => array("name"=>"Queries",
"link"=>"./list.php?view=all_systems",
"title"=>"Total Computers",
"class"=>"menuparent",
"childs"=>array("10"=>array("name"=>"All Audited Systems", "link"=>"./list.php?view=all_systems", "image"=>"images/computer.png", "title"=>"All Audited Systems",),
"15"=>array("name"=>"All Systems More Info", "link"=>"./list.php?view=all_systems_more", "image"=>"images/computer.png", "title"=>"All Audited Systems More Info",),
"20"=>array("name"=>"All Servers", "link"=>"./list.php?view=all_servers", "image"=>"images/server.png", "title"=>"All Servers",),
"30"=>array("name"=>"All Win-Workstations", "link"=>"./list.php?view=all_win_workstations", "image"=>"images/computer_2.png", "title"=>"All Win-Workstations",),
"40"=>array("name"=>"All Laptops", "link"=>"./list.php?view=all_laptops", "image"=>"images/laptop.png", "title"=>"All Laptops",),
"50"=>array("name"=>"All Software", "link"=>"./list.php?view=all_software", "image"=>"images/software_2.png", "title"=>" All Software",),
"55"=>array("name"=>"All Software with Hosts", "link"=>"./list.php?view=all_software_hosts", "image"=>"images/software_2.png", "title"=>" All Software",),
"60"=>array("name"=>"All Hotfixes &amp; Patches", "link"=>"./list.php?view=all_hotfixes_patches", "image"=>"images/software.png", "title"=>"All Hotfixes &amp; Patches",),
"70"=>array("name"=>"All IE BHO's", "link"=>"./list.php?view=all_ie_bho", "image"=>"images/browser_bho.png", "title"=>"All IE Browser-Helper-Objects",),
"80"=>array("name"=>"All Services", "link"=>"./list.php?view=all_services", "image"=>"images/services.png", "title"=>"All Services",),
"90"=>array("name"=>"All Keys", "link"=>"./list.php?view=all_keys", "image"=>"images/key_2.png", "title"=>"All Keys",),
"100"=>array("name"=>"All Office-Keys", "link"=>"./list.php?view=keys_for_software&amp;type=office%&amp;headline_addition=Office", "image"=>"images/key_1.png", "title"=>"All Office Keys",),
"110"=>array("name"=>"All Windows-Keys", "link"=>"./list.php?view=keys_for_software&amp;type=windows%&amp;headline_addition=Windows", "image"=>"images/key_3.png", "title"=>"All Widnows Keys",),


),
),
"20" => array("name"=>"Other Items",
"link"=>"#",
"class"=>"menuparent",
"childs"=>array("10"=>array("name"=>"Printers", "link"=>"./list.php?view=all_printers", "image"=>"images/printer.png", "title"=>"List all Printer",),
"20"=>array("name"=>"Monitors", "link"=>"./list.php?view=all_monitors", "image"=>"images/display.png", "title"=>"",),
"30"=>array("name"=>"Networked Items", "link"=>"./list.php?view=other_networked", "image"=>"images/network_device.png", "title"=>"",),
"40"=>array("name"=>"Non-Networked", "link"=>"./list.php?view=other_non_networked", "image"=>"images/non_network.png", "title"=>"",),
"50"=>array("name"=>"All Other Devices", "link"=>"./list.php?view=other_all", "image"=>"images/non_network.png", "title"=>"",),
),
),
"30" => array("name"=>"Discovered Ports",
"link"=>"#",
"class"=>"menuparent",
"childs"=>array("10"=>array("name"=>"All Active Ports", "link"=>"./list.php?view=all_nmap_ports", "image"=>"images/nmap.png", "title"=>"Active ports discovered by NMAP scan",),
"20"=>array("name"=>"All Active Ports with hosts", "link"=>"./list.php?view=nmap_ports_hosts", "image"=>"images/nmap.png", "title"=>"Active ports discovered by NMAP scan with hosts",),
"30"=>array("name"=>"Active Ports on Systems", "link"=>"./list.php?view=all_nmap_ports_systems", "image"=>"images/nmap.png", "title"=>"Active ports discovered by NMAP scan on systems",),
"40"=>array("name"=>"Active Ports with Systems", "link"=>"./list.php?view=nmap_ports_systems", "image"=>"images/nmap.png", "title"=>"Active ports discovered by NMAP scan with systems",),
"50"=>array("name"=>"Active Ports on Other Hosts", "link"=>"./list.php?view=all_nmap_ports_other", "image"=>"images/nmap.png", "title"=>"Active ports discovered by NMAP scan on other systems",),
"60"=>array("name"=>"Active Ports with Other Hosts", "link"=>"./list.php?view=nmap_ports_other", "image"=>"images/nmap.png", "title"=>"Active ports discovered by NMAP scan with other systems",),

),
),
"40" => array("name"=>"Software Register",
"link"=>"#",
"class"=>"menuparent",
"childs"=>array("10"=>array("name"=>"Software Register", "link"=>"./software_register.php", "image"=>"images/software.png", "title"=>"",),
"20"=>array("name"=>"Add Software", "link"=>"./software_register_add.php", "image"=>"images/software_2.png", "title"=>"",),
"30"=>array("name"=>"Delete Software", "link"=>"./software_register_del.php", "image"=>"images/software_3.png", "title"=>"",),
),
),
"50" => array("name"=>"Statistics",
"link"=>"#",
"class"=>"menuparent",
"childs"=>array("10"=>array("name"=>"OS Type", "link"=>"./list.php?view=statistic_os", "image"=>"images/os.png", "title"=>"OS Type",),
"20"=>array("name"=>"IE Versions", "link"=>"./list.php?view=statistic_ie", "image"=>"images/browser.png", "title"=>"Internet Explorer Versions",),
"25"=>array("name"=>"Firefox Versions", "link"=>"./list.php?view=statistic_firefox", "image"=>"images/browser_ff.png", "title"=>"Mozilla Firefox Versions",),
"30"=>array("name"=>"Memory Size", "link"=>"./list.php?view=statistic_memory", "image"=>"images/memory.png", "title"=>"Memory Size",),
"40"=>array("name"=>"Processor Types", "link"=>"./list.php?view=statistic_processor", "image"=>"images/processor.png", "title"=>"Processor Types",),

"50"=>array("name"=>"Hard Drive", "link"=>"./list.php?view=statistic_harddrive", "image"=>"images/harddisk.png", "title"=>"Hard Drive",),
"60"=>array("name"=>"Keys", "link"=>"./list.php?view=statistic_keys", "image"=>"images/key_2.png", "title"=>"Keys",),
"70"=>array("name"=>"Gateway", "link"=>"list.php?view=statistic_gateway", "image"=>"images/network_device.png", "title"=>"",),
/* This next bit wont work, we need a Parameter for each choice FIXME
"70"=>array("name"=>"AllByOSType", "link"=>"statistics.php?sub=s12", "image"=>"images/o_specialized.png", "title"=>"",),
"80"=>array("name"=>"AllByIeVersions", "link"=>"statistics.php?sub=s13", "image"=>"images/browser_l.png", "title"=>"",),
"90"=>array("name"=>"AllByMemorySizes", "link"=>"statistics.php?sub=s14", "image"=>"images/memory.png", "title"=>"",),
"100"=>array("name"=>"AllByProcessor", "link"=>"statistics.php?sub=s15", "image"=>"images/processor.png", "title"=>"",),
"110"=>array("name"=>"AllByDisks", "link"=>"statistics.php?sub=s16", "image"=>"images/harddisk.png", "title"=>"",),
*/
),
),
"60" => array("name"=>"Admin",
"link"=>"#",
"class"=>"menuparent",
"childs"=>array("10"=>array("name"=>"Config", "link"=>"admin_config.php?sub=1", "image"=>"images/settings.png", "title"=>"",),
// "20"=>array("name"=>"Audit Config", "link"=>"setup_audit.php", "image"=>"images/settings_2.png", "title"=>"",),
"30"=>array("name"=>"Add a System", "link"=>"admin_pc_add_1.php?sub=1", "image"=>"images/add.png", "title"=>"",),
"40"=>array("name"=>"Delete Systems", "link"=>"./list.php?view=delete_system", "image"=>"images/delete.png", "title"=>"",),
"45"=>array("name"=>"Delete Systems Not Audited in the last " . $days_systems_not_audited ." days", "link"=>"./list.php?view=delete_missed_audit", "image"=>"images/delete.png", "title"=>"",),
"50"=>array("name"=>"Delete Other Items", "link"=>"./list.php?view=delete_other", "image"=>"images/delete.png", "title"=>"",),
// "60"=>array("name"=>"Audit My Machine", "link"=>"scripts/audit.vbs", "image"=>"images/audit.png", "title"=>"",),
"70"=>array("name"=>"Backup Database", "link"=>"database_backup_form.php", "image"=>"images/tape.png", "title"=>"",),
"80"=>array("name"=>"Restore Database", "link"=>"database_restore_form.php", "image"=>"images/tape.png", "title"=>"",),
),
),
"70" => array("name"=>"Help",
"link"=>"#",
"class"=>"menuparent",
"childs"=>array("10"=>array("name"=>"Frequently Asked Questions", "link"=>"http://www.open-audit.org/phpBB3/viewforum.php?f=6", "image"=>"images/summary_l.png", "title"=>"Browse the FAQs at open-audit.org",),
// "20"=>array("name"=>"Audit Config", "link"=>"setup_audit.php", "image"=>"images/settings_2.png", "title"=>"",),
"30"=>array("name"=>"Support", "link"=>"http://www.open-audit.org/phpBB3/viewforum.php?f=10", "image"=>"images/browser_bho_l.png", "title"=>"Support from Open-Adudit.org",),
"40"=>array("name"=>"Using Open-Audit with OpenOffice", "link"=>"./tutorials/Open Audit Battery Report.htm", "image"=>"images/x-office-spreadsheet.png", "title"=>"Using the Open-Audit database from OpenOffice to create more complex reports.",),
),
),
),
);


?>
[/code]

As you can see in the above example, the menu array look very similar to the list viewdef.
If we want to add our new view to the Main menu, we need to add it in to the "Queries" section, we scroll down to about line 116 where it says "55"=>array("name"=>"All Software with Hosts", .... and add in a line like this ...
[code]
"56"=>array("name"=>"All Anti Virus Status", "link"=>"./list.php?view=all_systems_virus_uptodate_test", "image"=>"images/o_firewall.png", "title"=>" All Anti Virus Software",),
[/code]

This will add a line in to the Query menu with the Shield Icon, which links to the new view def.

[attachment=0] File comment: New View
New View.jpg
New View.jpg [ 95.36 KiB | Viewed 38669 times ]


That is it, our new view added!

Please let me know if there are any points which need clarifying, or any additional information you require.

_________________
Andrew

[size=85]OA Server: Windows XP/ XAMPP, Mandriva/Apache, Ubuntu
Auditing: 300+ Wstns, 20+ Srvrs, Thin clients, Linux boxes, Routers, etc
OS's: Windows XP , W2K Srvr, W2K3 Srvr, W2K8, Vista, Windows 7, Linuxes (and a Mac at home)
LDAP: Active Directory[/size]


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC + 10 hours


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group