Write two functions in PHP using modern conventions optimized for php5 and with no external dependencies. The output must exactly match the format of the included code. Please carefully review attached files.
These functions are dealing with outputting menu structure based on a database. A sample of the database is included. The structure works by child categories nesting below parent categories.
Category “Animals” might be parent tab 0 (top level) and might have a record ID of 14. There could be a couple child records like “Dog” with parent tab 14, and “Cat” with parent tab 14. Parent Tab “0” is always a “top level.” Every element also has a “sort weight” which is the “order by” value to sort the display order by. These are sorted ascending…so if “cat” had a sort wither of 3 and “dog” a sort weight of 85…cat would obviously be displayed first, and dog later.
Accepts two parameters, the current user id number and the current active page. The function will query the list of all pages that are allowed for this user, and output them in a nested ul/li list. Example output is provided and must be matched EXACTLY. It is fine (perhaps even expected) to write an additional function to call as a sub-routine. If the “Allowed User Id” is “|ALL|” then it will always be displayed regardless of current user ID. If a sub-element is allowed, then the parent must also be displayed (even if permission is missing on the parent). Ignore any entry where `ParentTab` = “FUNCTION”.
Pretty self-explanatory, except there are not complete records in the database to demo this at multiple levels deep. Basically take the input URL, find it in the database table, and then recreate each level it took to get there in a ul/li list with links and titles. Example is provided.
Hi, I checked your output format, the database and the sample function. I understand your requirement and can write the php function for you. Just select my bid and I will deliver the functions today.
17 freelancers are bidding on average $197 for this job
I have read your requirements and I am interested in this job. I have more then 7 years experience in this field and I will do this job quick and professional.
We are PHP Experts and are in business since 2006 and have developed more then 300+ PHP Projects . Lets get this PHP project done and you will not be disappointed . Please check your PMB