The aim of this lab is to introduce you pagination, working with date and time, and to encourage you to think about large-scale application requirements.
(Pagination) Use pagination to display lists of item summaries one page at a time. Each page should have not only "Previous" and "Next" links, but also explicit page numbers that link to that page of item summaries. Ideally, though these are not required, you would also provide "First" and "Last" links, and the current page number would be highlighted and not a link.
Implement this task by extending the list-detail example (list-detail.zip). A solution based on the list-detail example is here.
This task addresses an important practical problem. It is primarily a problem solving task - managing the arithmetic of list offsets, etc. - rather than a specifically Web programming task. Note that the arithmetic can be done either in PHP or in Smarty (Smarty is probably easier).
Further extend the list-detail example so that it records the epoch (timestamp) when each item is added to the database an,d when displaying the item detail, it also displays the epoch (timestamp) when the item was added and the time in days (and hours if less than 24 hours) since it was added.
You will need to add a column to your database table to store the timestamp.
(Date) Modify the MySQL version of the prime ministers database example so that it correctly computes the duration (in years, months and days) of the current prime minister's tenure.
Try to make your solution reasonably general. A good solution (not required) would compute the duration of every prime minister's tenure (from the start and finish dates).
Choose any popular Web site.
Consider the design of an application to provide a public library catalog service.
There are two classes of users of the site: library patrons and librarians. Library patrons should be able to browse the catalog, register, login, select books to reserve, renew books they have previously checked out, and write reviews of books. The librarians should be able to add and remove books from the libary catalog, authorize registration of patrons, check out books for patrons (when so requested), and check in books that patrons have returned.
Clearly, it should only be possible to reserve a book if the library already has a copy of it, it should only be possible to renew a book if the patron has currently borrowed it, it should only be possible to login if registration has been approved, it should only be possible to reserve or renew a book if the patron has logged in, it should only be possible to check out a book for a patron if the patron is already registed, and so on.
Complete Task 1 and either Task 2 or Task 3.