PHP Classes

Automatic Drop Down Menu: Generate an hierarchic drop down menus of links

Recommend this page to a friend!
  Info   Screenshots Screenshots   View files View files (8)   DownloadInstall with Composer Download .zip   Reputation   Support forum (2)   Blog    
Ratings Unique User Downloads Download Rankings
StarStarStar 45%Total: 1,489 All time: 2,630 This week: 488Up
Version License PHP version Categories
addme 1Freeware3.0HTML
Description 

Author

This class can be used to generate hierarchic drop down menus of HTML links.

It can build an hierarchy of menus, sub-menus and items with given link names, URLs and icon images.

The class generates HTML with CSS style definitions and Javascript to make the menus and sub-menus open as drop down menus.

Picture of Die Mitchell
Name: Die Mitchell <contact>
Classes: 1 package by
Country: Argentina Argentina
Age: 59
All time rank: 185323 in Argentina Argentina
Week rank: 321 Up5 in Argentina Argentina Up

Details

This class works with mysql so in order to see well the frames, the mysql requirements (like tables and columns) must be set. The top frame and right frame were not added, so you can use your own COMPANY DESCRIPTION (top frame) and your own right frame that could be your BASKET frame You can change the background standardmenu.jpg image used as the background image of the menu bar image. This image must be located in the images/ subdirectory You have to create in this example the following tables in order to work properly: CREATE TABLE `categoria` (`CodigoCA` int(3) NOT NULL auto_increment,`NombreCA` varchar(40) collate latin1_spanish_ci NOT NULL, PRIMARY KEY (`CodigoCA`), UNIQUE KEY `NombreCA` (`NombreCA`)) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_spanish_ci CREATE TABLE `subcategorias` (`CodigoCA` int(3) NOT NULL,`CodigoSC` int(3) NOT NULL,`NombreSC` varchar(30) collate latin1_spanish_ci NOT NULL, PRIMARY KEY (`CodigoCA`,`CodigoSC`), UNIQUE KEY `CodigoCA` (`CodigoCA`,`NombreSC`), KEY `CodigoSC` (`CodigoSC`), KEY `NombreSC` (`NombreSC`), CONSTRAINT `subcategorias_ibfk_1` FOREIGN KEY (`CodigoCA`) REFERENCES `categoria` (`CodigoCA`)) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_spanish_ci CREATE TABLE `marcas` (`CodigoM` int(3) NOT NULL auto_increment,`Marca` varchar(30) collate latin1_spanish_ci NOT NULL, PRIMARY KEY (`CodigoM`), UNIQUE KEY `Marca` (`Marca`)) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_spanish_ci CREATE TABLE `modelos` (`CodigoM` int(3) NOT NULL, `CodigoMO` int(5) NOT NULL, `ModeloN` varchar(35) collate latin1_spanish_ci NOT NULL, `DescripcionM` varchar(40) collate latin1_spanish_ci default NULL, PRIMARY KEY (`CodigoM`,`CodigoMO`), KEY `CodigoMO` (`CodigoMO`), KEY `ModeloN` (`ModeloN`), CONSTRAINT `modelos_ibfk_1` FOREIGN KEY (`CodigoM`) REFERENCES `marcas` (`CodigoM`)) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_spanish_ci CREATE TABLE `modcatsub` (`CodigoM` int(3) NOT NULL,`CodigoMO` int(5) NOT NULL, `CodigoCA` int(3) NOT NULL,`CodigoSC` int(3) NOT NULL default '0', `Visiblenet` enum('N','S') collate latin1_spanish_ci NOT NULL, PRIMARY KEY (`CodigoM`,`CodigoMO`,`CodigoCA`,`CodigoSC`), KEY `CodigoCA` (`CodigoCA`,`CodigoSC`), KEY `CodigoSC` (`CodigoSC`), KEY `CodigoMO` (`CodigoMO`), CONSTRAINT `modcatsub_ibfk_8` FOREIGN KEY (`CodigoSC`) REFERENCES `subcategorias` (`CodigoSC`), CONSTRAINT `modcatsub_ibfk_5` FOREIGN KEY (`CodigoM`) REFERENCES `marcas` (`CodigoM`), CONSTRAINT `modcatsub_ibfk_6` FOREIGN KEY (`CodigoMO`) REFERENCES `modelos` (`CodigoMO`), CONSTRAINT `modcatsub_ibfk_7` FOREIGN KEY (`CodigoCA`) REFERENCES `categoria` (`CodigoCA`)) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_spanish_ci The field `DescripcionM` is created in the table `modelos`, in order to set a description of the model. Remember that if you want to show these descriptions then you have to add the column in the query1. The field `Visiblenet` is created in the table `modcatsub`, in order to set if the model is going to be shown in internet or not. Remember that if you want to use this option you must add a "where Visiblenet = "S" " clause in the query1. I have added two menu bar options (contactos and principal), to let you see how you can add menu bar options that dont depend on the mysql results.

Screenshots  
  • Imagensite
  • imagesite2.jpg
  Files folder image Files  
File Role Description
Plain text file class_MENU.php Class Where the menu is build
Plain text file global.inc.php Class File requiered
Plain text file housecenterframe.php Example Frame where the products are going to be shown
Plain text file houseleftframe.php Example Frame with the automatic menu bar
Plain text file imagen3.php Aux. To set the menu bar image settings
Plain text file productpage.html Data FRAMES PAGE
Plain text file readme.txt Doc. Some words
Image file standardmenu.jpg Output Background image

 Version Control Unique User Downloads Download Rankings  
 0%
Total:1,489
This week:0
All time:2,630
This week:488Up
User Ratings User Comments (1)
 All time
Utility:60%StarStarStarStar
Consistency:55%StarStarStar
Documentation:45%StarStarStar
Examples:55%StarStarStar
Tests:-
Videos:-
Overall:45%StarStarStar
Rank:3298
 
actually the code is too old and completely out of date.
6 years ago (zinsou A.A.E.Moïse)
22%StarStar