SPECIFICATION:

Write a straightforward E-shop utility using PHP and MySQL*. This is usually a bookshop, music retailer, clothes retailer, or the remainder you prefer to. There should be a “client” interface to allow prospects to pick and purchase devices (do not be involved regarding the associated fee facet of points). Ideally there should even be a password-protected “proprietor” interface, to allow the E-shop operator to view/edit stock and pending orders.

The practice is deliberately “onerous” given the temporary deadline, and I do not anticipate all people basically to complete it to perfection. This is likely to be taken into account throughout the marking.

MARKING SCHEME:

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

[B 5%] Functionality to publish an HTML web-page on a server such that it is seen on the World Giant Web. ***

[C 10%] Functionality to make an HTML kind speak with a PHP script.**

[D 10%] Functionality to make a PHP script work along with a MySQL database.**

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

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

[G 10%] Presentation. (This would possibly embody relevant use of images, colour, textual content material fonts, style-sheets and dynamic HTML options.)

[H 10%] Readability and readability of coding and related documentation (e.g. use of suggestions, relevant indentation and plenty of others.)

NOTES:

*Should you occur to wish to use fully completely different web-based utilized sciences (e.g. ASP, JSP, Pearl) please accomplish that. Nonetheless, please do NOT use high-level software program program packages which require no programming talents (e.g. “wysiwyg” HTML editors), as these fairly defeat the intention of taking this module.

** In courses A to D, the marks are awarded in a “binary” technique (i.e. the student receives each your full weighting mark or else zero). Thus 30% is likely to be obtained simply by demonstrating a major data of HTML, PHP and MySQL. The remaining courses are marked in a “regular” type (i.e. any number of marks between zero and the weighting value is likely to be awarded).

*** Throughout the event of server failure (or completely different irresolvable technical difficulties) Class B is likely to be eradicated and the weightings of the other courses scaled accordingly.

SOLUTION:

My digital retailer utility is for the sale of books and completely different assorted merchandise purchased by the Wandle Industrial Museum.

This enchancment is a logical extension to an current static website. The information and first construction of my utility are derived from this pre-existing work.

THE MAIN INTERFACE:

the preliminary show, not along with the distinctive frames used throughout the Museum website. Most of the content material materials throughout the prime and bottom frames is non purposeful and is included for completeness, this moreover helps reveal the dynamic HTML that provided secondary navigation buildings.

This show confirmed the precept physique of the shop knowledge and the “shopping for basket” options on the button. This internet web page provides entry to:

1) A whole guidelines of the online “catalogue”;

2) A subset of listed by product class;

three) A subset of based on client outlined search phrases;

4) Further detailed particulars about an merchandise;

5) Functionality in order so as to add devices to a session based “shopping for basket”;

6) Functionality you registered clients to write down down information opinions;

If a client is new to the making use of, he/she is confirmed the message “Welcome. Already a purchaser? Click on on proper right here to enroll”, in some other case they see their client title and a button to the suitable named “My account” which allows them to edit their knowledge . This knowledge is saved in a client facet cookie that is retained for 30 minutes.

ABOUT THE SUMMARY DISPLAY:

The summary of issues reveals the merchandise code, title, value, description and stock stage of all devices. The present moreover incorporates two additional completely different potentialities, 1 devices which might be out of stock are current in crimson textual content material. 2 devices that are not purchased by the use of the online retailer are “grayed-out” in every these circumstances the “buy” button is away from all exhibits for a given merchandise.

THE BASKET:

The Basket Initially there’s not shopping for basket until the buyer supplies an merchandise, until such time clicking on the “view basket button reveals a default show.

When an merchandise is added, its quantity is about to 1 by default, this may occasionally each be elevated by together with the similar merchandise to the basket as soon as extra or by clicking throughout the increment button on the basket present show confirmed proper right here. As quickly as a basket is created and the buyer enters the system the subsequent selections might be discovered under the product description:

1) Clear cart;

2) Proceed shopping for;

three) Checkout;

If the merchandise is de-incremented to zero then it is away from the basket.

The basket depends on PHP intervals and in distinction to the purchasers identification, which is reined for 30 minutes, is just not going to persist after the event on the browser is closed.

If the buyer is unknown to the making use of when he/she makes an try to complete the transaction, they’re going to be requested to enroll, if the buyer has an account he/she’s going to login and proceed with the transaction.

If the buyer has not purchased an account he/she ought to register sooner than with the power to finish purchasing for one thing.

ADDING ITEMS TO THE SHOPPING BASKET:

Objects is likely to be added to purchasing basket each from any summary itemizing, or an merchandise description internet web page.

A summary internet web page exhibits major merchandise knowledge in a tabular format whithout photos, such as a result of the one confirmed correct by clicking on the “buy” button on the left on the merchandise line.

This may also be completed from the merchandise factor internet web page, which is displayed by clicking the devices code confirmed on the left of the summary present.

Each merchandise factor internet web page moreover contains a “buy” button along with the other shopping for basket devices” These are on the summary internet web page nevertheless on the bottom so require scrolling

The database helps two kinds of devices, “books”, as confirmed above, which embody knowledge explicit to finding out provides, and “gadgets” which solely embody major merchandise knowledge, merchandise code, title and value.

The place photos ae not accessible a substitute is routinely instituted until the administrator specifies an precise image.

ABOUT THE USER:

If the buyer is unknown to the making use of when he/she makes an try to complete the transaction, they’re going to be requested to enroll, if the buyer has an account he/she’s going to login and proceed with the transaction

If the buyer has not purchased an account he/she ought to register sooner than with the power to finish purchasing for one thing. Proper right here we see the influence of an invalid try to register a model new account. The client is given a textual content material description of the error and the suspect entities are highlight in sequence until all anomalies have been resolved.

After the buyer has registered he/she is requested to print the form for his/her reference. Then is logged in and will bypass authentication when purchasing for.

The making use of has been onerous coded with one administrative account, the username is “system” and the password is “god” Bear in mind there’s in the mean time no resolution to alter this.

The administration present permits the purchasers to:

1) define new merchandise varieties;

2) Edit and delete clients;

three) Add, edit and delete courses;

This show permits the buyer to each edit an current data merchandise in a given class acknowledged by its product code or create a model new product date merchandise. The making use of contains a explicit set of validation requirements as confirmed throughout the subsequent image. Objects are listed alpha numerically, left to correct.

Proper right here we see the outcomes of a failed data entry operation denoted by crosses to point invalid or missing entries for given fields, likewise a tick signifies the sphere is official.

It is potential to have a clear acceptable entry – eg, if there are no photos these containers should be left clear.

The question mark is to double confirm the intention to go away clear in certain circumstances

This show reveals that theadministrator has chosen to delete a client’s account from the database – the edit and delete options use the similar present apart from that the edit function would not current the delete warning

The interface The image reveals the preliminary (welcome) show, not along with the frames used throughout the Museum website.

This show confirmed the precept physique of the shop knowledge and the “shopping for basket” options at prime and the button. This internet web page provides entry to:

1) A whole guidelines of the online “catalogue”;

2) A subset of listed by product class;

three) Functionality to order listed by product code, value or title, in acceding order;

4) A subset of based on client outlined search phrases;

5) Further detailed particulars about an merchandise;

6) Functionality in order so as to add devices to a session based “shopping for basket”;

If a client is new to the making use of, he/she is confirmed the message “Welcome. Already a purchaser? Click on on proper right here to enroll”, in some other case they see their client title and a button to the suitable named “My account” which allows them to edit their knowledge. This knowledge is saved in a client facet cookie that is retained for 30 minutes.

The administration present permits the purchasers to:

1) Define new merchandise varieties;

2) Edit and delete clients;

three) Add, edit and delete courses;

4) Add, edit, switch and delete merchandise;

5) Edit and add help knowledge;

6) Create and restore dumps of tables;

DATABASE DICTIONARY:

A data dictionary defines the widespread phrases, codes, and conventions used. Listed beneath are the database lookup tables required for the shop database utility.

Desk: bookinfo:

Suggestions: E ebook explicit metadata. Space Variety Null Default
code varchar(5) No No
author varchar(50) No Unknown
author varchar(100) No Unknown
isbn varchar(15) No None
illustrations varchar(15) Certain Certain - gray
date date Certain NULL
dimensions varchar(100) No Unknown
summary textual content material No
type varchar(16) No

Desk: courses:
Suggestions: Product metadata Space Variety Null Default
id int(three) No
title varchar(50) No
etype int(1) No 2
Key phrases varchar(100) No

Desk: prospects:
Suggestions: Purchaser billing knowledge. Space Variety Null Default
uname varchar(15) No
first_name varchar(25) No
last_name varchar(25) No
phone varchar(20) No
e mail varchar(50) No
zip varchar(10) No
metropolis varchar(50) No
country_code int(2) No zero
bill_address varchar(90) No
modified timestamp(14) Certain NULL

Desk: orderdata:
Suggestions: Purchaser order knowledge Space Variety Null Default
ordernumber int(5) No zero
itemcode varchar(5) title varchar(100) No
quantity int(three) No zero
complete float No zero
standing int(11) No zero
stamp timestamp(14) Certain NULL

Desk: orders:
Suggestions: purchaser order refferance data. Space Variety Null Default
uname varchar(15) No zero
ordernumber int(5) No
standing int(1) No zero
date date Certain NULL

Desk: opinions:
Suggestions: client information opinions and rations. Space Variety Null Default
uname varchar(15) No zero
type int(1) No
rating int(1) No zero
stamp timestamp(14) Certain NULL
evaluation textual content material No

Desk: merchandise:
Desk suggestions: Predominant product data. Space Variety Null Default
code varchar(5) No
category_id int(three) No 1
title varchar(100) No
key phrases varchar(255) No
small_image varchar(15) No nopic.jpg
large_image varchar(15) No nopic.jpg
description textual content material No
value decimal(5,2) No 00.00
date_modified date No 0000-00-00
standing int(1) No 1
Desk: purchase:
Suggestions: Predominant product data. Space Variety Null Default
code varchar(5) No
date timestamp(14) Certain NULL
stock int(three) No> 15
worth decimal(5,2) No 00.00

Desk: pwl:
Suggestions: Particular person password/entry knowledge. Space Variety Null Default
uname varchar(15) No
upass varchar(100) No 5d2e19393cc5ef67
created timestamp(14) Certain NULL

Desk: syshelpindex:
Suggestions: System help matter index.Space Variety Null Default
cat int(2) No zero
matter varchar(30) No

Desk: syshelpinfo:
Suggestions: system help knowledge.Space Variety Null Default
cat int(three) No zero
title varchar(30) No
knowledge textual content material No
image varchar(20) No
type int(1) No zero

FILE STRUCTURE:

The digital retailer utility is for the sale of books and completely different assorted merchandise purchased by the Wandle Industrial Museum. This enchancment is a logical extension to an current static website.

The making use of’s recordsdata are saved in 9 subdirectories. These are as follows:

../htdocs/order.htg/ That’s the basis itemizing of the online utility, it incorporates all belongings related to the website. All generic recordsdata and ancillary parts are saved at this stage. (three.74mb 263 recordsdata)

  • continfo.php – contact and ordering knowledge (PHP 4.01kb).
  • create_db.sql – Database development (SQL dump 5.82kb).
  • credit-cards.gif – Usable financial institution playing cards varieties (image 2.02kb).
  • cvc.jpg – Clarifying the place to find a CVC value (image 6.0kb).
  • dictionary.txt – MYSQL Data Dictionary (textual content material 2.85kb).
  • low value.gif – Animalised 10% low value for members uncover (image 111.kb).
  • discount1.gif – Selling a 10% low value for members (image 53.6kb).
  • avicon.ico – Depiction of a straightforward waterwheel (icon 318b).
  • index.htm – Personalized website 404 error internet web page (HTML 1.76kb).
  • new_ani.gif – An animation of the phrase ‘new’ (image 1.66kb).
  • presents.gif – Graphic of the textual content material ‘confirm these explicit presents’ (image 1.77).
  • pleasenote.gif – A burning animation of the textual content material ‘please observe’ (image 14.7kb).
  • reset.gif – Graphical enter kind reset button (image 1.28kb).
  • retailer.gif – Small of the particular museum retailer (image7.31kb).
  • submit.gif – Graphical enter kind submit button (image 1.18kb).

../htdocs/order.htg/widespread.htg/ This itemizing incorporates all widespread utility scripts and completely different belongings that the online utility depends upon upon.(185kb 50 recordsdata)

  • about0.gif – Graphic of the textual content material ‘dwelling internet web page’ (image zero.98kb).
  • alart.gif – Animalised rotating crimson warning bulb (image 2.04kb).
  • alert.gif – A human skull with the phrase ‘warning’ (three.39kb).
  • archive0.gif – Graphic of the textual content material ‘archive’ (image 970b).
  • backg.jpg – Wallpaper drawing depicting a watermill as a watermark (image 13.6kb).
  • background.jpg – Wallpaper that features a marble stone type influence (image 4.59kb).
  • major.css – Website formatting and formatting descriptions (vogue sheet 7.53kb).
  • brics.gif – Animalised uncovered circuits in a wall behind the wallpaper (image 7.46kb).
  • caurtion.gif – Animalised rotating warning avenue sign (image 6.53kb).
  • cnote.htm – Website copyright and attribution knowledge (HTML 1.95kb).
  • constants.inc – Software program worldwide data values (PHP embody 161b).
  • contact0.gif – Graphic of the textual content material ‘contacts’ (image 976b).
  • db_lib.php – Widespread database entry options and utilities (PHP 25.2kb .
  • disclaimer.gif – Animalised flashing graphic of the textual content material ‘disclaimer’ (image 4.57kb).
  • email2.gif – Drawing of an mail out area over a globe (image 1.12kb).
  • fax.gif – Drawing of a major fax machine (image 231b).
  • feed0.gif – Graphic of the textual content material ‘options’ (image 990b).
  • focus.js – Script to place think about a hidden popup window (javascript 165b).
  • home0.gif – Graphic of the textual content material ‘regular’ (image 967b).
  • iiv.gif – Clear graphic of the Investing in Volunteers emblem (image 2.63kb).
  • iiv.fpg – Opaque graphic of the Investing in Volunteers emblem (image 4.49kb).
  • index.htm – Personalized website 404 error internet web page (HTML 1.76kb).
  • knowledge.gif – Clear museum emblem with contact knowledge (image 2.31).
  • jfooter.js – Code to dynamically generate internet web page footer knowledge (javascript 2.41kb)
  • letter.gif – Drawing of two straightforward letters (image 698b).
  • linksb.jpg – A spider in an web on a small depiction of a browser (image 1.18.kb).
  • linkware.gif – Clear graphic of the textual content material ‘all provides on this website are hyperlink ware’ (image 1.56).
  • map0.gif – Graphic of the textual content material ‘sitemap’ (image 989b).
  • members0.gif – Graphic of the textual content material ‘members’ (image 984b).
  • misc.inc – Freeola SQL service entry authentication data (PHP embody 144b).
  • news0.gif – Graphic of the textual content material ‘data letter’ (image 947b).
  • l_misc.inc – SQL authentication data for my server (PHP embody 144b).
  • nopic.jpg – Uncover of there being no accessible (image 5.40).
  • order0.gif – Graphic of the textual content material ‘Mail Order’ (image zero.96kb).
  • phone.gif – Clear graphic of a crimson telephone (image 281kb).
  • print.css – Show formatting descriptions (vogue sheet three.65kb).
  • registered.gif – Opaque graphic of the registered museums emblem (image 428b).
  • registered3.gif – Clear graphic of the registered museums emblem (image 2.80b).
  • resize.js – Code to dynamically change a window to the image measurement (javascript 1.05kb).
  • search.gif – Graphic of the textual content material search’ (image 108b).
  • sqldumper.inc – Code to dynamically create an SQL dump file (PHP embody
  • stop.gif – Clear graphic of a crimson hand (image 2.64kb).
  • time.js – Code to dynamically present a countdown timer (javascript 591b).
  • toc.js – Code to dynamically present a navigation development (javascript three.34kb)
  • wandlemuseu.gif – Clear animated graphic of the textual content material ‘The Wandle Industrial Museum’ (image 42.3kb).
  • webbo.gif – Clear graphic of webbo’s head (image 1.16kb).
  • webo1.gif – Clear graphic of webbo (image three.81kb).
  • wimlogo.gif – Opaque graphic of the museum’s waterwheel emblem (image 417b)

../htdocs/order.htg/data_backup/ This itemizing is used to retailer SQL dump recordsdata..(242kb three recordsdata)

../htdocs/order.htg/help/ This itemizing is used to retailer graphics for help desk database. (336kb 26 recordsdata)

../htdocs/order.htg/photos.htg/ This itemizing is used to retailer graphics for the shop database. (2.41mb 91 recordsdata)

../htdocs/order.htg/mysqlsnips This itemizing incorporates a set of textual content material recordsdata related to occasion SQL directions.

../htdocs/order.htg/retailer.htg/ This itemizing incorporates all the provide recordsdata related to most people areas of the shop database utility scripts and completely different template belongings that the online utility depends upon upon. (85.1kb 20 recordsdata)

  • basket.php – Create and maintains a session based shopping for basked (PHP 9.29bk).
  • book_detail.php – Code block for displaying detailed knowledge for a selected information (PHP 2.41kb).
  • buttons.inc – Code block for displaying movement bottoms related to product knowledge (embody 2.43kb).
  • catalog.php – Generates clients view of the primary catalogue interface (PHP 6.63kb).
  • checkout.php – Script for updating the product and order database (PHP 5.02kb).
  • help.php – Present clients view of the system help desk interface (PHP 6.71kb).
  • login.php – Script for client and database administration login operations (PHP 7.91).
  • outdated login.php – Old-fashioned login script (PHP8.99kb).
  • orderend.php – Code block for displaying shopping for basket buttons (PHP 1.36kb).
  • ordertop.php – Code block for displaying shot knowledge and first controls (PHP5.73kb).
  • pagefoot.inc – Code block to create the ending HTML internet web page development (Embody 801b).
  • pagehead.inc – Code block to create the start HTML internet web page development (Embody 854b).
  • product_detail.php – Code block for displaying detailed product knowledge (PHP 1.15kb).
  • product_list.php – Code block for displaying summary merchandise knowledge (PHP three.07kb).
  • product_show.php – Code block that exhibits completely different summary knowledge (PHP3.16).
  • quick.inc – Code block for displaying a message to the buyer (embody 897b).
  • signin.php – Present logon straightforward login show.(PHP three.08kb).
  • phrases.php – Present phrases and conditions (PHP 5.83kb).
  • terms2.php – Present phrases and conditions far a child window (PHP 5.75kb).
  • thankyou.php – Present remaining affirmation show (PHP three.28kb).

../htdocs/order.htg/substitute.htg/ This itemizing incorporates all the provide recordsdata related to the administration areas of the shop database and completely different utility scripts. (240kb 34 recordsdata)

  • addcat.php – Add additional merchandise courses to the database (PHP 2.18kb).
  • addproduct.php – Add additional devices to the database (PHP 6.30kb).
  • admin.php – Website content material materials administration interface (PHP 65.9kb).
  • backup.php – Generates database dump recordsdata (PHP 5.21kb).
  • berror_form.inc – Current errors for model spanking new information database devices (Embody PHP three.0kb).
  • bookinfo.inc – Code block for information data entry (Embody 6.64kb).
  • bookup.inc – Present editable information knowledge (Embody 10.2kb).
  • buttons.inc – Code block to create modifying command buttons (Embody 4.41kb).
  • change.php – Provide code for substitute affirmation messages (PHP14.4kb).
  • edithelp.php – Permits modifying and creation of help desk knowledge (PHP14.0kb).
  • entbuttons.inc – Code block for data entry sorts command buttons (Embody 1.21kb).
  • error.gif – Clear graphic of a cartoon cross (Image 118b).
  • good.gif – Clear graphic fo a cartoon tick (Image 126b).
  • help.php – Present administrators view of the system help desk interface (PHP 6.22kb).
  • index.php – Administrative entry to database modification efficiency (PHP 12.5kb)
  • invoice.php – Generate present purchaser invoices for printing (PHP 5.33kb).
  • mysqlsend.php – Permit client to execute personalized SQL instructions (PHP 4.59)
  • newcat_form.inc – .Present new the category title error correction (Embody 773b).
  • newname_table.inc – Present new product entry kind (Embody 438b).
  • newproduct.php – Substitute/delete data from the inventory database (PHP 781kb).
  • newtypeform.inc – Present new class entry kind (Embody 563kb).
  • observe.inc – Present system knowledge messages (Embody 524b).
  • oldorders.php – Present summary data for closed orders (PHP three.22kb).
  • orders.php – Present chosen open order knowledge (PHP 7.77kb).
  • perror_form.inc – Present product knowledge Errors (Embody 1.99).
  • productinfo.inc – Present product enter kind (Embody three.68).
  • productup.inc – Present editable product knowledge (Embody 7.02kb).
  • quest.gif – Clear graphic fo a question mark (Image 114b).
  • stock.php – Administrative stock data summary (PHP 9.07).
  • add.jpg – Graphical add button (image 1.84kb).
  • add.php – Copy photos to the images.htg itemizing on the server (PHP 5.40kb).
  • userorders.php – Present client order historic previous (PHP 2.36kb).
  • clients.php – Present editable client login knowledge (PHP10.04kb).

Leave a Reply