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.
|