Reference no: EM132460720
NIT1204 Web Application and Server Management Assignment - Victoria University, Australia
Assessment Overview - You are to develop from the beginning a web site for the guitar shop example of the unit. This web site relies on the guitar shop database of the text book. It provides the user with pages allowing them to work enter certain information for use with this database.
You will design and develop your web site with NetBeans using PHP, HTML and Cascading Style Sheets.
Description - The purpose of this assignment is for you to build a small Web site for the guitar shop example used in this unit. Your site provides forms for working with information from the database. The guitar shop data comes from the database, my_guitar_shop2, that was installed in Lab 4. You may need to re-run the script provided in that lab to carry out the assignment if it is not available on your computer. The site allows two options to the user when interacting with your site, and you must program both options. The user can use the site to either:
1. enter data for a new system/database administrator who can use the database, or
2. enter data about a new order, for ordering products from the guitar shop
Your site needs to support both options (both functions), but the user chooses whether to take option 1 next or option 2 next. In reality, you would not develop a system exactly as described in this assignment (you would not have a user who would add an administrator as well as be a customer entering order details), but are developing it for the purposes of this assignment.
This assignment involves creation of PHP files corresponding to 4 pages of your web site and all are connected to an external CSS file. You will need to determine how your site will be designed and then you will develop the pages using PHP, HTML and CSS. The pages and CSS file you will develop are explained below.
Page for selecting entering administrator details or entering order
The first page of your site the user sees will be as follows (we will ignore use of a home page in this assignment). The user will see a heading conveying what this page is about. The page will allow the user to either select the option of entering in the details of a new system or database administrator (we will refer to them as an "administrator"), or alternatively, entering details about a new order of instruments from the shop. The user cannot select both options as the same time; the user must select either to add a new administrator's details or to enter details about a new order.
Selecting an option is based on an HTML form, so the user is presented with a brief form presenting both these options. The method of selecting an option requires a form and not some other way that excludes a form, otherwise marks cannot be awarded for this criterion.
Before an option is selected, there must be a paragraph above the form explaining to the user about selecting one of the two options.
Page for administrator entry
If the user selects the option of adding a new administrator, then the next page of your site the user sees will be the page for administrator entry. Include a heading to convey what this page is about. The user will be presented with a form that contains fields for the following details of the administrator in this page:
first name
last name
email address
password
Your script must verify that what was entered into email address text box is indeed in correct email address format, otherwise must give an error message and ask user to re-enter correct email address.
Once all details of the administrator have been correctly entered and submitted, a brand new feedback page is shown in the browser to replace the page for administrator entry. This feedback page displays the following text in blue colour to the user, where the actual administrator's details that the user enters are substituted for the name and email address above. Your message should look exactly as it does above with the same formatting.
Page for order details
This page is similar to the page for administrator entry in that it also contains a form. Include a heading to convey what this page is about. However, in this page the following details are entered by the customer:
1. pull-down menu of customers currently in database
2. total amount of order in dollars
3. a particular credit card from a set of credit cards (Mastercard, etc.)
4. credit card number
5. expiry date, including both month and year
The user uses the pull-down menu (1. above) of customers in database to select who they are so that their order details can be added to the database.
The credit card number entered is verified that it is 16 digits in length. If this is not the case, a message is provided to the user to explain what the problem is and that they need to re-enter the card number.
The user enters the total of the order (2. above), but this data is not inserted into the orders table. The total amount is used to carry out the following two activities.
Determine the amount for shipping the order. The amount for shipping is worked out using the following information:
Order total
|
Amount for shipping
|
$0 - $199
|
$5
|
$200 - $399
|
$10
|
$400 - $599
|
$15
|
$600 - $799
|
$20
|
Calculates the amount of tax. The amount of tax is calculated as 10% of the total order. After this amount is calculated, it is inserted into the table.
The script will use the above details to add a brand new row into the orders table for this new order.
When the form is submitted, the script determines current time and date and adds them to the orderDate column in same format as dates and times already stored in the table. To determine the date for shipping the order to the customer, the script adds 5 days to the date of the order (the time of shipping can be treated as the same as the time of the order). After the date and time of shipping is determined, it is inserted into the orders table.
When the form is submitted, based on whom the customer selected from the pull-down menu:
- the script retrieves their customer ID from the customers table and inserts that customer ID into the orders table for the new row
- using the customer ID, the script looks up this customer's shipping and billing addresses from customers table and inserts the IDs of both of these addresses into the new row
Once all details have been correctly entered and submitted, a brand new feedback page is shown in the browser. This feedback page displays an HTML table to verify the details entered and contains the following columns:
- Customer name
- Date of order (without showing the time of order)
- Date for shipping the order (without showing the time of shipping)
- The amount for shipping the order
- The amount of tax on the order
- The address to which the order will be shipped
Ensure that the table has headings to convey what the columns contain.
Other issues
There must be links from both feedback pages back to the first page of the site (the page for selecting entry of administrator details or entering an order).
Ensure that file contents are laid out properly and neatly and that all code is indented consistently and properly.
HTML that you generate must comply with the current standards in using the HTML language. As just one example only, do not use deprecated elements.
Attachment:- Web Application and Server Management Assignment File.rar