Recommend this page to a friend! |
Download .zip |
Info | Screenshots | View files (7) | Download .zip | Reputation | Support forum (1) | Blog | Links |
Last Updated | Ratings | Unique User Downloads | Download Rankings | |||||
2005-07-05 (11 years ago) | 54% | Total: 6,147 This week: 1 | All time: 346 This week: 1,047 |
Version | License | Categories | ||||
category_tree 1.0 | GNU General Publi... | HTML, Databases |
Description | Author | |||||||||||||
This class can generate an HTML table with a tree of links to an hierarchical list of items retrieved from MySQL dabatase tables. |
|
This class transforms a n-tree into a 2d array, expanding the selected branch. It has to be used to generate hierarchic menus with categories which contains products. For this class application, you have to know that only categories with at least one associated product are visible. The tree shows the different categories but not the categories'products. If you want to see them, you should write an application which selects the products in the clicked category and print them. Categories and products belong to two tables in the database and they are created when you load the two scripts. --------------------------------------------------------------------------------------------------------------------------------------------------------------------- ------------------------------------------------------------ Which documents are in the compressed file? ---------------------------------------------------------- --------------------------------------------------------------------------------------------------------------------------------------------------------------------- You can find : - A Class which contains the two classes which are at the present time in the program - A doc tree.php which enables you to define a tree - A category.php4 which helps you to manage categories - Two scripts in order to create the two tables and the contents for the example in your database (Mysql) that you have already created before. - A php document (DB_connect.php4) where you have to fill in your host, your username, its password and your database name. These information are nessecary for the database connection. - An other php document which is called example.php4.It enables you to show and test the tree. - A screenshot.gif in order to see an outline of the tree when we will print it. --------------------------------------------------------------------------------------------------------------------------------------------------------------------- ------------------------------------------------------------------- How to use the compressed file? ------------------------------------------------------------------- --------------------------------------------------------------------------------------------------------------------------------------------------------------------- After you have downloaded the compressed file, you should : 1. Load the two scripts in the SQL file in your Mysql database. Thanks to that, you will create the two tables in order to use this tree application example. 2. Replace the information in the DB_connect.php4 document in order to allow the connection to the application database. You fill there your mean of connection (ex: "localhost"), your user for the database connection (ex: "root") and the password for this user. You also must indicate your database name. 3. Finally, you can load the example.php4 and see the tree! |
Screenshots | ||
Files |
File | Role | Description |
---|---|---|
category.sql | Data | sql for category's table |
Category_class.php4 | Class | category's class |
DB_connect.php4 | Conf. | database connection |
example.php4 | Example | example |
product.sql | Data | sql for product's table |
readme.txt | Doc. | Documentation |
Tree_class.php4 | Class | tree's class |
Version Control | Unique User Downloads | Download Rankings | |||||||||||||||
0% |
|
|
User Ratings | ||||||||||||||||||||||||||||||
|
Applications that use this package |
If you know an application of this package, send a message to the author to add a link here.