2016-07-13

SPECIFICATION:

Write a simple E-shop application using PHP and MySQL*. This may be a bookshop, music shop, clothes store, or anything else you wish. There should be a “user” interface to allow customers to select and purchase items (don’t worry about the payment side of things). Ideally there should also be a password-protected “owner” interface, to allow the E-shop operator to view/edit stock and pending orders.

The exercise is deliberately “hard” given the short deadline, and I do not expect everyone necessarily to complete it to perfection. This will be taken into account in the marking.

MARKING SCHEME:

[A 5%] Ability to write working HTML code (i.e. code that creates successful markup on a browser window).**

[B 5%] Ability to post an HTML web-page on a server such that it is visible on the World Wide Web. ***

[C 10%] Ability to make an HTML form communicate with a PHP script.**

[D 10%] Ability to make a PHP script interact with a MySQL database.**

[E 40%] Functionality (the extent to which the software’s operation complies with – or exceeds- the original specification).

[F 10%] User friendliness (the extent to which the browser displays are clear and self-explanatory).

[G 10%] Presentation. (This could include appropriate use of images, colour, text fonts, style-sheets and dynamic HTML functions.)

[H 10%] Clarity and readability of coding and related documentation (e.g. use of comments, appropriate indentation etc.)

NOTES:

*If you wish to use different web-based technologies (e.g. ASP, JSP, Pearl) please do so. However, please do NOT use high-level software packages which require no programming skills (e.g. “wysiwyg” HTML editors), as these rather defeat the purpose of taking this module.

** In categories A to D, the marks are awarded in a “binary” manner (i.e. the student receives either the entire weighting mark or else zero). Thus 30% can be obtained simply by demonstrating a basic knowledge of HTML, PHP and MySQL. The remaining categories are marked in a “continuous” fashion (i.e. any number of marks between zero and the weighting value can be awarded).

*** In the event of server failure (or other irresolvable technical difficulties) Category B will be removed and the weightings of the other categories scaled accordingly.

SOLUTION:

My electronic shop application is for the sale of books and other assorted item sold by the Wandle Industrial Museum.

This development is a logical extension to an existing static website. The data and basic layout of my application are derived from this pre-existing work.

THE MAIN INTERFACE:

the initial screen, not including the original frames used in the Museum website. Most of the content in the top and bottom frames is non functional and is included for completeness, this also helps demonstrate the dynamic HTML that provided secondary navigation structures.

This screen shown the main body of the shop information and the “shopping basket” functions at the button. This page provides access to:

1) A complete list of the online “catalogue”;

2) A subset of the catalogue listed by product category;

3) A subset of the catalogue based on user defined search terms;

4) More detailed information about an item;

5) Ability to add items to a session based “shopping basket”;

6) Ability you registered users to write book reviews;

If a user is new to the application, he/she is shown the message “Welcome. Already a customer? Click here to sign in”, otherwise they see their user name and a button to the right named “My account” which allows them to edit their information . This information is stored in a client side cookie that is retained for 30 minutes.

ABOUT THE SUMMARY DISPLAY:

The summary of items shows the item code, title, price, description and stock level of all items. The display also includes two additional other possibilities, 1 items that are out of stock are show in red text. 2 items that are not sold through the online shop are “grayed-out” in both these cases the “buy” button is removed from all displays for a given item.

THE BASKET:

The Basket Initially there is not shopping basket until the user adds an item, until such time clicking on the “view basket button shows a default screen.

When an item is added, its quantity is set to one by default, this can either be increased by adding the same item to the basket again or by clicking in the increment button on the basket display screen shown here. Once a basket is created and the user enters the system the following options are available under the product description:

1) Clear cart;

2) Continue shopping;

3) Checkout;

If the item is de-incremented to zero then it is removed from the basket.

The basket is based on PHP sessions and unlike the users identity, which is reined for 30 minutes, will not persist after the instance on the browser is closed.

If the user is unknown to the application when he/she attempts to complete the transaction, they will be asked to sign in, if the user has an account he/she can login and continue with the transaction.

If the user has not got an account he/she must register before being able to finish buying anything.

ADDING ITEMS TO THE SHOPPING BASKET:

Items can be added to shopping basket either from any summary listing, or an item description page.

A summary page displays basic item information in a tabular format whithout images, such as the one shown right by clicking on the “buy” button at the left on the item line.

This can also be done from the item detail page, which is displayed by clicking the items code shown on the left of the summary display.

Each item detail page also includes a “buy” button as well as the other shopping basket tools” These are on the summary page but at the bottom so require scrolling

The database supports two forms of items, “books”, as shown above, which include information specific to reading materials, and “goods” which only include basic item information, item code, title and price.

Where images ae not available a replacement is automatically instituted until the administrator specifies a real image.

ABOUT THE USER:

If the user is unknown to the application when he/she attempts to complete the transaction, they will be asked to sign in, if the user has an account he/she can login and continue with the transaction

If the user has not got an account he/she must register before being able to finish buying anything. Here we see the effect of an invalid attempt to register a new account. The user is given a text description of the error and the suspect entities are highlight in sequence until all anomalies have been resolved.

After the user has registered he/she is asked to print the form for his/her reference. Then is logged in and can bypass authentication when buying.

The application has been hard coded with one administrative account, the username is “system” and the password is “god” Note there is currently no way to change this.

The administration display allows the users to:

1) define new item types;

2) Edit and delete users;

3) Add, edit and delete categories;

This screen allows the user to either edit an existing data item in a given category identified by its product code or create a new product date item. The application includes a specific set of validation criteria as shown in the next image. Items are listed alpha numerically, left to right.

Here we see the result of a failed data entry operation denoted by crosses to denote invalid or missing entries for given fields, likewise a tick indicates the field is valid.

It is possible to have a blank correct entry – eg, if there are no images these boxes should be left clear.

The question mark is to double check the intention to leave blank in certain cases

This screen shows that theadministrator has chosen to delete a user’s account from the database – the edit and delete functions use the same display except that the edit function does not show the delete warning

The interface The image shows the initial (welcome) screen, not including the frames used in the Museum website.

This screen shown the main body of the shop information and the “shopping basket” functions at top and the button. This page provides access to:

1) A complete list of the online “catalogue”;

2) A subset of the catalogue listed by product category;

3) Ability to order the catalogue listed by product code, price or title, in acceding order;

4) A subset of the catalogue based on user defined search terms;

5) More detailed information about an item;

6) Ability to add items to a session based “shopping basket”;

If a user is new to the application, he/she is shown the message “Welcome. Already a customer? Click here to sign in”, otherwise they see their user name and a button to the right named “My account” which allows them to edit their information. This information is stored in a client side cookie that is retained for 30 minutes.

The administration display allows the users to:

1) Define new item types;

2) Edit and delete users;

3) Add, edit and delete categories;

4) Add, edit, move and delete products;

5) Edit and add help information;

6) Create and restore dumps of tables;

DATABASE DICTIONARY:

A data dictionary defines the common terms, codes, and conventions used. Listed below are the database lookup tables required for the shop database application.

FILE STRUCTURE:

The electronic shop application is for the sale of books and other assorted item sold by the Wandle Industrial Museum. This development is a logical extension to an existing static website.

The application’s files are stored in 9 subdirectories. These are as follows:

../htdocs/order.htg/ This is the root directory of the web application, it contains all resources related to the website. All generic files and ancillary elements are stored at this level. (3.74mb 263 files)

continfo.php – contact and ordering information (PHP 4.01kb).

create_db.sql – Database structure (SQL dump 5.82kb).

credit-cards.gif – Usable credit cards types (image 2.02kb).

cvc.jpg – Clarifying where to find a CVC value (image 6.0kb).

dictionary.txt – MYSQL Data Dictionary (text 2.85kb).

discount.gif – Animalised 10% discount for members notice (image 111.kb).

discount1.gif – Advertising a 10% discount for members (image 53.6kb).

avicon.ico – Depiction of a simple waterwheel (icon 318b).

index.htm – Custom website 404 error page (HTML 1.76kb).

new_ani.gif – An animation of the word ‘new’ (image 1.66kb).

offers.gif – Graphic of the text ‘check these special offers’ (image 1.77).

pleasenote.gif – A burning animation of the text ‘please note’ (image 14.7kb).

reset.gif – Graphical input form reset button (image 1.28kb).

shop.gif – Small photograph of the real museum shop (image7.31kb).

submit.gif – Graphical input form submit button (image 1.18kb).

../htdocs/order.htg/common.htg/ This directory contains all common utility scripts and other resources that the web application depends upon.(185kb 50 files)

about0.gif – Graphic of the text ‘home page’ (image 0.98kb).

alart.gif – Animalised rotating red warning bulb (image 2.04kb).

alert.gif – A human skull with the word ‘warning’ (3.39kb).

archive0.gif – Graphic of the text ‘archive’ (image 970b).

backg.jpg – Wallpaper drawing depicting a watermill as a watermark (image 13.6kb).

background.jpg – Wallpaper featuring a marble stone type effect (image 4.59kb).

basic.css – Website formatting and formatting descriptions (style sheet 7.53kb).

brics.gif – Animalised exposed circuits in a wall behind the wallpaper (image 7.46kb).

caurtion.gif – Animalised rotating caution road sign (image 6.53kb).

cnote.htm – Website copyright and attribution information (HTML 1.95kb).

constants.inc – Application global data values (PHP include 161b).

contact0.gif – Graphic of the text ‘contacts’ (image 976b).

db_lib.php – Common database access functions and utilities (PHP 25.2kb .

disclaimer.gif – Animalised flashing graphic of the text ‘disclaimer’ (image 4.57kb).

email2.gif – Drawing of an mail out box over a globe (image 1.12kb).

fax.gif – Drawing of a basic fax machine (image 231b).

feed0.gif – Graphic of the text ‘feedback’ (image 990b).

focus.js – Script to place focus on a hidden popup window (javascript 165b).

home0.gif – Graphic of the text ‘general’ (image 967b).

iiv.gif – Transparent graphic of the Investing in Volunteers logo (image 2.63kb).

iiv.fpg – Opaque graphic of the Investing in Volunteers logo (image 4.49kb).

index.htm – Custom website 404 error page (HTML 1.76kb).

info.gif – Transparent museum logo with contact information (image 2.31).

jfooter.js – Code to dynamically generate page footer information (javascript 2.41kb)

letter.gif – Drawing of two simple letters (image 698b).

linksb.jpg – A spider in a web on a small depiction of a browser (image 1.18.kb).

linkware.gif – Transparent graphic of the text ‘all materials on this website are link ware’ (image 1.56).

map0.gif – Graphic of the text ‘sitemap’ (image 989b).

members0.gif – Graphic of the text ‘members’ (image 984b).

misc.inc – Freeola SQL service access authentication data (PHP include 144b).

news0.gif – Graphic of the text ‘news letter’ (image 947b).

l_misc.inc – SQL authentication data for my server (PHP include 144b).

nopic.jpg – Notice of there being no available photo (image 5.40).

order0.gif – Graphic of the text ‘Mail Order’ (image 0.96kb).

phone.gif – Transparent graphic of a red telephone (image 281kb).

print.css – Screen formatting descriptions (style sheet 3.65kb).

registered.gif – Opaque graphic of the registered museums logo (image 428b).

registered3.gif – Transparent graphic of the registered museums logo (image 2.80b).

resize.js – Code to dynamically change a window to the image size (javascript 1.05kb).

search.gif – Graphic of the text search’ (image 108b).

sqldumper.inc – Code to dynamically create an SQL dump file (PHP include

stop.gif – Transparent graphic of a red hand (image 2.64kb).

time.js – Code to dynamically display a countdown timer (javascript 591b).

toc.js – Code to dynamically display a navigation structure (javascript 3.34kb)

wandlemuseu.gif – Transparent animated graphic of the text ‘The Wandle Industrial Museum’ (image 42.3kb).

webbo.gif – Transparent graphic of webbo’s head (image 1.16kb).

webo1.gif – Transparent graphic of webbo (image 3.81kb).

wimlogo.gif – Opaque graphic of the museum’s waterwheel logo (image 417b)

../htdocs/order.htg/data_backup/ This directory is used to store SQL dump files..(242kb 3 files)

../htdocs/order.htg/help/ This directory is used to store graphics for help desk database. (336kb 26 files)

../htdocs/order.htg/images.htg/ This directory is used to store graphics for the shop database. (2.41mb 91 files)

../htdocs/order.htg/mysqlsnips This directory contains a set of text files related to example SQL commands.

../htdocs/order.htg/shop.htg/ This directory contains all the source files related to the public areas of the shop database utility scripts and other template resources that the web application depends upon. (85.1kb 20 files)

basket.php – Create and maintains a session based shopping basked (PHP 9.29bk).

book_detail.php – Code block for displaying detailed information for a selected book (PHP 2.41kb).

buttons.inc – Code block for displaying action bottoms related to product information (include 2.43kb).

catalog.php – Generates users view of the primary catalogue interface (PHP 6.63kb).

checkout.php – Script for updating the product and order database (PHP 5.02kb).

help.php – Display users view of the system help desk interface (PHP 6.71kb).

login.php – Script for user and database administration login operations (PHP 7.91).

old login.php – Obsolete login script (PHP8.99kb).

orderend.php – Code block for displaying shopping basket buttons (PHP 1.36kb).

ordertop.php – Code block for displaying shot information and primary controls (PHP5.73kb).

pagefoot.inc – Code block to create the ending HTML page structure (Include 801b).

pagehead.inc – Code block to create the starting HTML page structure (Include 854b).

product_detail.php – Code block for displaying detailed product information (PHP 1.15kb).

product_list.php – Code block for displaying summary item information (PHP 3.07kb).

product_show.php – Code block that displays alternative summary information (PHP3.16).

prompt.inc – Code block for displaying a message to the user (include 897b).

signin.php – Display logon simple login screen.(PHP 3.08kb).

terms.php – Display terms and conditions (PHP 5.83kb).

terms2.php – Display terms and conditions far a child window (PHP 5.75kb).

thankyou.php – Display final confirmation screen (PHP 3.28kb).

../htdocs/order.htg/update.htg/ This directory contains all the source files related to the administration areas of the shop database and other utility scripts. (240kb 34 files)

addcat.php – Add additional item categories to the database (PHP 2.18kb).

addproduct.php – Add additional items to the database (PHP 6.30kb).

admin.php – Website content management interface (PHP 65.9kb).

backup.php – Generates database dump files (PHP 5.21kb).

berror_form.inc – Current errors for new book database items (Include PHP 3.0kb).

bookinfo.inc – Code block for book data entry (Include 6.64kb).

bookup.inc – Display editable book information (Include 10.2kb).

buttons.inc – Code block to create editing command buttons (Include 4.41kb).

change.php – Source code for update confirmation messages (PHP14.4kb).

edithelp.php – Enables editing and creation of help desk information (PHP14.0kb).

entbuttons.inc – Code block for data entry forms command buttons (Include 1.21kb).

error.gif – Transparent graphic of a cartoon cross (Image 118b).

fine.gif – Transparent graphic fo a cartoon tick (Image 126b).

help.php – Display administrators view of the system help desk interface (PHP 6.22kb).

index.php – Administrative access to database modification functionality (PHP 12.5kb)

invoice.php – Generate display customer invoices for printing (PHP 5.33kb).

mysqlsend.php – Enable user to execute custom SQL instructions (PHP 4.59)

newcat_form.inc – .Display new the category name error correction (Include 773b).

newname_table.inc – Display new product entry form (Include 438b).

newproduct.php – Update/delete data from the inventory database (PHP 781kb).

newtypeform.inc – Display new category entry form (Include 563kb).

note.inc – Display system information messages (Include 524b).

oldorders.php – Display summary data for closed orders (PHP 3.22kb).

orders.php – Display selected open order information (PHP 7.77kb).

perror_form.inc – Display product information Errors (Include 1.99).

productinfo.inc – Display product input form (Include 3.68).

productup.inc – Display editable product information (Include 7.02kb).

quest.gif – Transparent graphic fo a question mark (Image 114b).

stock.php – Administrative stock data summary (PHP 9.07).

upload.jpg – Graphical upload button (image 1.84kb).

upload.php – Copy images to the images.htg directory on the server (PHP 5.40kb).

userorders.php – Display user order history (PHP 2.36kb).

users.php – Display editable user login information (PHP10.04kb).

Seeking for best budget laptop, go to Laptop Factory Outlet, a Singapore SME that focus in second hand laptop singapore,best budget laptop & macbook refurbished,cheapest laptop. A advertising & marketing project for used mackbook pro singapore,refurbished mac,refurbished macbook pro & second hand laptop singapore by Kelvin Scotts – Top digital marketing agency Singapore

Show more