Web Design Lezione 2
Sviluppo della traccia di progetto per l’esame di Web Design
The task is to create a book review website. The first page contains the menu and a welcome message.
The menu can be found on every page and includes the following items: Register, Login, Review, Books, Delete registration, Log out, that are links looking buttons.
The Registration page contains a form with the following types of fields: text, password, number, select, radio, checkbox, submit, and fieldset, legend elements. Each field must have “label” attribute correctly implemented.
The Login page contains two input fields: one for user name, and one for password, and the submit button.
On the Books page will be listed all books in a table, with their attributes, reviews, and the review’s username. The table must contain some header cells that span many columns. In the table each normal (td) cell must have “headers” attribute correctly implemented.
If the user is not logged in, the Review page contains only the text: “You must be logged in to review.” If the user is logged in, the Review page contains a form for the purpose of recording a book (fields like author, title, etc.), including a textarea field for review, and a submit button. Each field must have “label” attribute correctly implemented.
The site works as follows. If a user wants to review, he must log in (of course, for this purpose, he must register once before). After logging in, if the user wants to review several books, for each book he must click on the Review link (button), enter the book data and the review, of course, without having to login again for a new book review.
When the user clicks on the Delete registration or Log out menu items, the appropriate action will be executed, provided that the user had been logged.
In order to track user switching between different pages you must implement session tracking, that will also have to be functional, when the user disables cookies. This mean, that the session tracking must be implemented not only using session_start(); but also using hidden form field and URL rewriting methods.
To solve this problem the object-oriented approach should be used.
The database and data tables should be set up as follows automatically. When you need to insert a new row of data in the database, you have to check whether the database and the table already exist and, if not, you have to create them. To connect to the database server you have to use the user name “root” and the password is ” (empty string), as the default is in XAMPP, and the name of the database must be ‘books’.
For the Books page you should prepare a dedicated CSS file for print styling which will take effect automatically when the user wants to print the page, and in which the content, the units and formatting are set in accordance with the printed page as follows:
the menu will not be printed;
you can not use pixels on the printed page;
the user does not want to waste the paper, therefore the entire width of the printed page shall be filled with content.
Only XHTML or HTML5, CSS and PHP languages can be used to solve the problem.
The CSS codes should be written as separate files, so the (X)HTML files do not contain CSS codes. Whenever possible, the PHP codes should also be placed in separate files.
All the client-side (ie generated HTML) pages of the project must conform to the XHTML 1.0 strict or HTML5 standard requirement system. The fulfillment of standardization (validity of the page) can be checked on the http://validator.w3.org/ website.
Do not use programs downloaded from the Internet and libraries.
The project should be uploaded to the system CooSpace in the Tasks part. There is no deadline for the submission of the project, but I need 2-3 weeks for evaluation.