php...menu generation...
| From: | Bruce Douglas | Date: | Thu, 01 May 2003 23:18:20 +0000 |
| Subject: | php...menu generation... | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-146027@lists.php.net to get a copy of this message | ||
Hey....
A quick question.... I'm creating a quick/dirty dropdown menu... The menu
will allow the user to select the number of items/(per page) that are to be
displayed on a given page. At the bottom of the page will be the usual
first/prev/next/last links as well as the ability to select individual pages
for the items listed. The item list will be dynamically generated from a
mysql query.
I'd like the menu to look like:
Drop Down Menu
xxxx
-------------
50
100
200
.
.
.
A rough sample page would be
+-----------------------------------------------+
| menu |
| |
| |
| item 1 |
| item 2 |
| item 3 |
| item 4 |
| . |
| . |
| . |
| . |
| . |
| item n |
| |
| |
| |
| first prev next last |
| 1 2 3..... |
| |
+-----------------------------------------------+
So if there were 300 items and the user selected 100 from the menu...The
firts page would display 100 items, the 2nd the next 100 etc.... The user
would be able to select from the first/prev/next/last links, as well as go
directly to the specific page as needed by slecting on the number.
I'd also like to be able to display the following numbers at the bottome
depending on how many pages would be displayed based on the number of items
to be displayed.....
less than 5 pages
1 2 3 4 5
less than 10 pages
1 2 3 4 5 6 7 10
less than 20 pages
1 2 3 4 5 6 7 10 15 20
or something resembling this!!!
I'm asking.. as I've done a quick look on google, and I didn't see anything
that was close... I know it's not that difficult.. but I'd rather not
reinvent the wheel..there's way too much of that being done.....
Any code/samples would be appreciated as I'm on a tight schedule.....
Thanks!!!!
Bruce
bedouglas@earthlink.net