大家HELP HELP我吧
Web Programming
Overview
This programming assignment is to let you to have hands-on experience to build commerical web sites using various technologies and protocols. This assignment is worth 20 marks.You are required to build a web site based on 3-tier architecture for a hypothetical company selling products to customers. The business model is B2C (business to customer) providing shop-front to customers in the form of company homepage of portal. The followings are the tools required for building the web site:
- Database: MySQL
- Server-side programming: PHP
- Client-side programming: JavaScript, HTML
The following functions have to be included in the web site:
- Customer registration and log-on in order to place order in the company.
- generate unique customer ID for each new customer
- check if customer already exists
- store new registered customer info into database: customer ID, registration date and necessary personal details
- only registered customer with correct username/password can place order
- Allow existing customer to change personal details.
- Display the customer last-visit time and last-order summary info using cookie technology.
- Browsing of product catalogue: product code, product description, unit price, ... .
- Place order in a shopping cart.
- during product browsing from one web page to another, the order details for each product selected by customers have to be stored temporarily--try the usage of session variables
- an order is created once the customer confirmed to purchase the selected products
- an order can have multiple products
- generate unique order ID for each new order
- during product browsing from one web page to another, the order details for each product selected by customers have to be stored temporarily--try the usage of session variables
- Reject customer order if the quantity in stock is not enough. Display error messages to customer.
- Display invoice and store order information in database when order is accepted.
- the invoice is a reference for the transaction between customer and company
- order info:order ID, order time, customer ID, product codes (multiple products allowed), quantity, price, shipping address, contact person, contact phone number
- Perform necessary data validation for user input.
- Company staff log-on to list received orders. Orders can be searched by order ID, or by specifying a date interval to give a summary list of orders. Further click on order ID will give order details.
Marking Criteria
- [1 marks] creation of database with appropriate tables, attributes and constraints
- [1 marks] HTML forms for customer registration and log-on
- [2 marks] client-side scripting and data validation for customer registration, log-on and personal details update
- [2 marks] server-side scripting and processing for customer registration, log-on and personal details update
- [2 marks] use cookies to display customer last-visit time and last-order summary info
- [1 marks] HTML and procesing for product browsing
- [1 marks] data validation and processing for customer to place order in shopping cart
- [2 marks] implementation of shopping cart
- [3 marks] server-side scripting and database processing when order is received
- [1 marks] produce invoice
- [2 marks] list order by order ID and by date
- [2 marks] display order details when order ID is clicked
What to Hand In
The deliverables are:- script file for creation of database and tables
- all php and html files