"Graph Setup", 1 => "Data Gathering", 2 => "Configuration", 3 => "Utilities"); /* link each menu item to a header */ $menu_items[mIndex] = array(0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 2, 3, 3); /* setup the actual menu item definitions */ $menu_items[mTitle] = array( "Graph Management", "Graph Templates", "Graph Hierarchy", "Colors", "Data Sources", "Round Robin Archives", "SNMP Interfaces", "Data Input", "CDEF's", "Cron Printout", "cacti Settings", "User Management", "Logout User" ); $menu_items[mURL] = array( "graphs.php", "graph_templates.php", "tree.php", "color.php", "ds.php", "rra.php", "snmp.php", "data.php", "cdef.php", "cron.php", "settings.php", "user_admin.php", "logout.php" ); /* NOTICE: we will have to come back and re-impliment "custom auth menus" at some point */ $user_perms = db_fetch_assoc("select auth_sections.Section from auth_sections left join auth_acl on auth_acl.SectionID=auth_sections.ID where auth_acl.UserID=$userid"); print ''; $_m_index = -1; if (sizeof($menu_headers) > 0) { for ($i=0; ($i < sizeof($menu_items[mIndex])); $i++) { if ($menu_items[mIndex][$i] != $_m_index) { $_m_index = $menu_items[mIndex][$i]; print ''; } print ''; } } print '
' . $menu_headers[$_m_index] . '
' . $menu_items[mTitle][$i] . '
'; } ?>