SPECIFICATION:
Write a easy E-shop utility utilizing PHP and MySQL*. This can be a bookshop, music store, clothes retailer, or the rest you want. There ought to be a “consumer” interface to permit clients to pick and buy objects (don’t fret in regards to the payment aspect of issues). Ideally there also needs to be a password-protected “proprietor” interface, to permit the E-shop operator to view/edit inventory and pending orders.
The train is intentionally “exhausting” given the short deadline, and I don’t count on everybody essentially to finish it to perfection. This can be taken into consideration within the marking.
MARKING SCHEME:
[A 5%] Potential to jot down working HTML code (i.e. code that creates profitable markup on a browser window).**
[B 5%] Potential to submit an HTML web-page on a server such that it’s seen on the World Large Web. ***
[C 10%] Potential to make an HTML type talk with a PHP script.**
[D 10%] Potential to make a PHP script work together with a MySQL database.**
[E 40%] Performance (the extent to which the software program’s operation complies with – or exceeds- the unique specification).
[F 10%] Consumer friendliness (the extent to which the browser shows are clear and self-explanatory).
[G 10%] Presentation. (This might embrace acceptable use of photos, color, textual content fonts, style-sheets and dynamic HTML capabilities.)
[H 10%] Readability and readability of coding and associated documentation (e.g. use of feedback, acceptable indentation and so forth.)
NOTES:
*For those who want to use completely different web-based applied sciences (e.g. ASP, JSP, Pearl) please accomplish that. Nonetheless, please do NOT use high-level software program packages which require no programming abilities (e.g. “wysiwyg” HTML editors), as these reasonably defeat the aim of taking this module.
** In classes A to D, the marks are awarded in a “binary” method (i.e. the scholar receives both your entire weighting mark or else zero). Thus 30% may be obtained just by demonstrating a fundamental information of HTML, PHP and MySQL. The remaining classes are marked in a “steady” vogue (i.e. any variety of marks between zero and the weighting worth may be awarded).
*** Within the occasion of server failure (or different irresolvable technical difficulties) Class B can be eliminated and the weightings of the opposite classes scaled accordingly.
SOLUTION:
My digital store utility is for the sale of books and different assorted merchandise offered by the Wandle Industrial Museum.
This development is a logical extension to an present static website. The information and fundamental structure of my utility are derived from this pre-existing work.
THE MAIN INTERFACE:
the preliminary screen, not together with the unique frames used within the Museum website. A lot of the content material within the prime and backside frames is non purposeful and is included for completeness, this additionally helps exhibit the dynamic HTML that supplied secondary navigation buildings.
This screen proven the primary body of the store info and the “shopping basket” capabilities on the button. This page gives entry to:
1) A whole listing of the online “catalogue”;
2) A subset of {the catalogue} listed by product class;
3) A subset of {the catalogue} based mostly on consumer outlined search phrases;
4) Extra detailed details about an merchandise;
5) Potential so as to add objects to a session based mostly “shopping basket”;
6) Potential you registered customers to jot down ebook critiques;
If a consumer is new to the applying, he/she is proven the message “Welcome. Already a buyer? Click on right here to register”, in any other case they see their consumer name and a button to the suitable named “My account” which permits them to edit their info . This info is saved in a consumer aspect cookie that’s retained for half-hour.
ABOUT THE SUMMARY DISPLAY:
The abstract of things exhibits the merchandise code, title, value, description and inventory stage of all objects. The show additionally contains two further different potentialities, 1 objects which are out of inventory are present in crimson textual content. 2 objects that aren’t offered by way of the online store are “grayed-out” in each these cases the “purchase” button is faraway from all shows for a given merchandise.
THE BASKET:
The Basket Initially there may be not shopping basket till the consumer provides an merchandise, till such time clicking on the “view basket button exhibits a default screen.
When an merchandise is added, its amount is ready to 1 by default, this could both be elevated by including the identical merchandise to the basket once more or by clicking within the increment button on the basket show screen proven right here. As soon as a basket is created and the consumer enters the system the next choices can be found below the product description:
1) Clear cart;
2) Proceed shopping;
3) Checkout;
If the merchandise is de-incremented to zero then it’s faraway from the basket.
The basket relies on PHP classes and in contrast to the customers identification, which is reined for half-hour, won’t persist after the occasion on the browser is closed.
If the consumer is unknown to the applying when he/she makes an attempt to finish the transaction, they are going to be requested to register, if the consumer has an account he/she will login and proceed with the transaction.
If the consumer has not received an account he/she should register earlier than having the ability to end shopping for something.
ADDING ITEMS TO THE SHOPPING BASKET:
Objects may be added to shopping basket both from any abstract itemizing, or an merchandise description page.
A abstract page shows fundamental merchandise info in a tabular format whithout photos, such because the one proven proper by clicking on the “purchase” button on the left on the merchandise line.
This may also be achieved from the merchandise element page, which is displayed by clicking the objects code proven on the left of the abstract show.
Every merchandise element page additionally features a “purchase” button in addition to the opposite shopping basket instruments” These are on the abstract page however on the backside so require scrolling
The database helps two types of objects, “books”, as proven above, which embrace info particular to studying supplies, and “items” which solely embrace fundamental merchandise info, merchandise code, title and value.
The place photos ae not accessible a substitute is robotically instituted till the administrator specifies a real picture.
ABOUT THE USER:
If the consumer is unknown to the applying when he/she makes an attempt to finish the transaction, they are going to be requested to register, if the consumer has an account he/she will login and proceed with the transaction
If the consumer has not received an account he/she should register earlier than having the ability to end shopping for something. Right here we see the impact of an invalid try to register a brand new account. The consumer is given a textual content description of the error and the suspect entities are spotlight in sequence till all anomalies have been resolved.
After the consumer has registered he/she is requested to print the shape for his/her reference. Then is logged in and might bypass authentication when shopping for.
The applying has been exhausting coded with one administrative account, the username is “system” and the password is “god” Word there may be at present no option to change this.
The administration show permits the customers to:
1) outline new merchandise sorts;
2) Edit and delete customers;
3) Add, edit and delete classes;
This screen permits the consumer to both edit an present knowledge merchandise in a given class recognized by its product code or create a brand new product date merchandise. The applying features a particular set of validation standards as proven within the subsequent picture. Objects are listed alpha numerically, left to proper.
Right here we see the results of a failed knowledge entry operation denoted by crosses to indicate invalid or lacking entries for given fields, likewise a tick signifies the sphere is legitimate.
It’s potential to have a clean appropriate entry – eg, if there are not any photos these boxes ought to be left clear 웅진코웨이정수기.
The query mark is to double examine the intention to go away clean in sure cases
This screen exhibits that theadministrator has chosen to delete a consumer’s account from the database – the edit and delete capabilities use the identical show besides that the edit perform doesn’t present the delete warning
The interface The picture exhibits the preliminary (welcome) screen, not together with the frames used within the Museum website.
This screen proven the primary body of the store info and the “shopping basket” capabilities at prime and the button. This page gives entry to:
1) A whole listing of the online “catalogue”;
2) A subset of {the catalogue} listed by product class;
3) Potential to order {the catalogue} listed by product code, value or title, in acceding order;
4) A subset of {the catalogue} based mostly on consumer outlined search phrases;
5) Extra detailed details about an merchandise;
6) Potential so as to add objects to a session based mostly “shopping basket”;
If a consumer is new to the applying, he/she is proven the message “Welcome. Already a buyer? Click on right here to register”, in any other case they see their consumer name and a button to the suitable named “My account” which permits them to edit their info. This info is saved in a consumer aspect cookie that’s retained for half-hour.
The administration show permits the customers to:
1) Outline new merchandise sorts;
2) Edit and delete customers;
3) Add, edit and delete classes;
4) Add, edit, transfer and delete products;
5) Edit and add assist info;
6) Create and restore dumps of tables;
DATABASE DICTIONARY:
An information dictionary defines the widespread phrases, codes, and conventions used. Listed beneath are the database lookup tables required for the store database utility.
Table: bookinfo: Feedback: E-book particular metadata. Subject Sort Null Default code varchar(5) No No writer varchar(50) No Unknown writer varchar(100) No Unknown isbn varchar(15) No None illustrations varchar(15) Sure Sure - grey date date Sure NULL dimensions varchar(100) No Unknown abstract textual content No kind varchar(16) No
Table: classes:
Feedback: Product metadata Subject Sort Null Default
id int(3) No
name varchar(50) No
etype int(1) No 2
Key phrases varchar(100) No
Table: clients:
Feedback: Buyer billing info. Subject Sort Null Default
uname varchar(15) No
first_name varchar(25) No
last_name varchar(25) No
phone varchar(20) No
electronic mail varchar(50) No
zip varchar(10) No
metropolis varchar(50) No
country_code int(2) No 0
bill_address varchar(90) No
modified timestamp(14) Sure NULL
Table: orderdata:
Feedback: Buyer order info Subject Sort Null Default
ordernumber int(5) No 0
itemcode varchar(5) title varchar(100) No
amount int(3) No 0
whole float No 0
standing int(11) No 0
stamp timestamp(14) Sure NULL
Table: orders:
Feedback: buyer order refferance knowledge. Subject Sort Null Default
uname varchar(15) No 0
ordernumber int(5) No
standing int(1) No 0
date date Sure NULL
Table: critiques:
Feedback: consumer ebook critiques and rations. Subject Sort Null Default
uname varchar(15) No 0
kind int(1) No
ranking int(1) No 0
stamp timestamp(14) Sure NULL
evaluation textual content No
Table: products:
Table feedback: Main product knowledge. Subject Sort Null Default
code varchar(5) No
category_id int(3) 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 No
value decimal(5,2) No 00.00
date_modified date No 0000-00-00
standing int(1) No 1
Table: buy:
Feedback: Main product knowledge. Subject Sort Null Default
code varchar(5) No
date timestamp(14) Sure NULL
inventory int(3) No> 15
value decimal(5,2) No 00.00
Table: pwl:
Feedback: Consumer password/entry info. Subject Sort Null Default
uname varchar(15) No
upass varchar(100) No 5d2e19393cc5ef67
created timestamp(14) Sure NULL
Table: syshelpindex:
Feedback: System assist topic index.Subject Sort Null Default
cat int(2) No 0
topic varchar(30) No
Table: syshelpinfo:
Feedback: system assist info.Subject Sort Null Default
cat int(3) No 0
title varchar(30) No
data textual content No
picture varchar(20) No
kind int(1) No 0
FILE STRUCTURE:
The digital store utility is for the sale of books and different assorted merchandise offered by the Wandle Industrial Museum. This development is a logical extension to an present static website.
The applying’s recordsdata are saved in 9 subdirectories. These are as follows:
../htdocs/order.htg/ That is the foundation listing of the web utility, it incorporates all assets associated to the website. All generic recordsdata and ancillary components are saved at this stage. (3.74mb 263 recordsdata)
- continfo.php – contact and ordering info (PHP 4.01kb).
- create_db.sql – Database construction (SQL dump 5.82kb).
- credit-cards.gif – Usable bank cards sorts (picture 2.02kb).
- cvc.jpg – Clarifying the place to discover a CVC worth (picture 6.0kb).
- dictionary.txt – MYSQL Knowledge Dictionary (textual content 2.85kb).
- low cost.gif – Animalised 10% low cost for members discover (picture 111.kb).
- discount1.gif – Promoting a ten% low cost for members (picture 53.6kb).
- avicon.ico – Depiction of a easy waterwheel (icon 318b).
- index.htm – Customized website 404 error page (HTML 1.76kb).
- new_ani.gif – An animation of the phrase ‘new’ (picture 1.66kb).
- gives.gif – Graphic of the textual content ‘examine these particular gives’ (picture 1.77).
- pleasenote.gif – A burning animation of the textual content ‘please word’ (picture 14.7kb).
- reset.gif – Graphical enter type reset button (picture 1.28kb).
- store.gif – Small photograph of the real museum store (image7.31kb).
- submit.gif – Graphical enter type submit button (picture 1.18kb).
../htdocs/order.htg/widespread.htg/ This listing incorporates all widespread utility scripts and different assets that the web utility relies upon upon.(185kb 50 recordsdata)
- about0.gif – Graphic of the textual content ‘home page’ (picture 0.98kb).
- alart.gif – Animalised rotating crimson warning bulb (picture 2.04kb).
- alert.gif – A human cranium with the phrase ‘warning’ (3.39kb).
- archive0.gif – Graphic of the textual content ‘archive’ (picture 970b).
- backg.jpg – Wallpaper drawing depicting a watermill as a watermark (picture 13.6kb).
- background.jpg – Wallpaper that includes a marble stone kind impact (picture 4.59kb).
- fundamental.css – Website formatting and formatting descriptions (type sheet 7.53kb).
- brics.gif – Animalised uncovered circuits in a wall behind the wallpaper (picture 7.46kb).
- caurtion.gif – Animalised rotating warning street signal (picture 6.53kb).
- cnote.htm – Website copyright and attribution info (HTML 1.95kb).
- constants.inc – Utility world knowledge values (PHP embrace 161b).
- contact0.gif – Graphic of the textual content ‘contacts’ (picture 976b).
- db_lib.php – Widespread database entry capabilities and utilities (PHP 25.2kb .
- disclaimer.gif – Animalised flashing graphic of the textual content ‘disclaimer’ (picture 4.57kb).
- email2.gif – Drawing of an mail out box over a globe (picture 1.12kb).
- fax.gif – Drawing of a fundamental fax machine (picture 231b).
- feed0.gif – Graphic of the textual content ‘suggestions’ (picture 990b).
- focus.js – Script to put give attention to a hidden popup window (javascript 165b).
- home0.gif – Graphic of the textual content ‘common’ (picture 967b).
- iiv.gif – Clear graphic of the Investing in Volunteers emblem (picture 2.63kb).
- iiv.fpg – Opaque graphic of the Investing in Volunteers emblem (picture 4.49kb).
- index.htm – Customized website 404 error page (HTML 1.76kb).
- data.gif – Clear museum emblem with contact info (picture 2.31).
- jfooter.js – Code to dynamically generate page footer info (javascript 2.41kb)
- letter.gif – Drawing of two easy letters (picture 698b).
- linksb.jpg – A spider in a web on a small depiction of a browser (picture 1.18.kb).
- linkware.gif – Clear graphic of the textual content ‘all supplies on this website are hyperlink ware’ (picture 1.56).
- map0.gif – Graphic of the textual content ‘sitemap’ (picture 989b).
- members0.gif – Graphic of the textual content ‘members’ (picture 984b).
- misc.inc – Freeola SQL service entry authentication knowledge (PHP embrace 144b).
- news0.gif – Graphic of the textual content ‘information letter’ (picture 947b).
- l_misc.inc – SQL authentication knowledge for my server (PHP embrace 144b).
- nopic.jpg – Discover of there being no accessible picture (picture 5.40).
- order0.gif – Graphic of the textual content ‘Mail Order’ (picture 0.96kb).
- phone.gif – Clear graphic of a crimson phone (picture 281kb).
- print.css – Screen formatting descriptions (type sheet 3.65kb).
- registered.gif – Opaque graphic of the registered museums emblem (picture 428b).
- registered3.gif – Clear graphic of the registered museums emblem (picture 2.80b).
- resize.js – Code to dynamically change a window to the picture dimension (javascript 1.05kb).
- search.gif – Graphic of the textual content search’ (picture 108b).
- sqldumper.inc – Code to dynamically create an SQL dump file (PHP embrace
- cease.gif – Clear graphic of a crimson hand (picture 2.64kb).
- time.js – Code to dynamically show a countdown timer (javascript 591b).
- toc.js – Code to dynamically show a navigation construction (javascript 3.34kb)
- wandlemuseu.gif – Clear animated graphic of the textual content ‘The Wandle Industrial Museum’ (picture 42.3kb).
- webbo.gif – Clear graphic of webbo’s head (picture 1.16kb).
- webo1.gif – Clear graphic of webbo (picture 3.81kb).
- wimlogo.gif – Opaque graphic of the museum’s waterwheel emblem (picture 417b)
../htdocs/order.htg/data_backup/ This listing is used to retailer SQL dump recordsdata..(242kb 3 recordsdata)
../htdocs/order.htg/assist/ This listing is used to retailer graphics for assist desk database. (336kb 26 recordsdata)
../htdocs/order.htg/photos.htg/ This listing is used to retailer graphics for the store database. (2.41mb 91 recordsdata)
../htdocs/order.htg/mysqlsnips This listing incorporates a set of textual content recordsdata associated to instance SQL instructions.
../htdocs/order.htg/store.htg/ This listing incorporates all of the supply recordsdata associated to the general public areas of the store database utility scripts and different template assets that the web utility relies upon upon. (85.1kb 20 recordsdata)
- basket.php – Create and maintains a session based mostly shopping basked (PHP 9.29bk).
- book_detail.php – Code block for displaying detailed info for a specific ebook (PHP 2.41kb).
- buttons.inc – Code block for displaying motion bottoms associated to product info (embrace 2.43kb).
- catalog.php – Generates customers view of the first catalogue interface (PHP 6.63kb).
- checkout.php – Script for updating the product and order database (PHP 5.02kb).
- assist.php – Show customers view of the system assist desk interface (PHP 6.71kb).
- login.php – Script for consumer and database administration login operations (PHP 7.91).
- old login.php – Out of date login script (PHP8.99kb).
- orderend.php – Code block for displaying shopping basket buttons (PHP 1.36kb).
- ordertop.php – Code block for displaying shot info and first controls (PHP5.73kb).
- pagefoot.inc – Code block to create the ending HTML page construction (Embody 801b).
- pagehead.inc – Code block to create the beginning HTML page construction (Embody 854b).
- product_detail.php – Code block for displaying detailed product info (PHP 1.15kb).
- product_list.php – Code block for displaying abstract merchandise info (PHP 3.07kb).
- product_show.php – Code block that shows various abstract info (PHP3.16).
- immediate.inc – Code block for displaying a message to the consumer (embrace 897b).
- signin.php – Show logon easy login screen.(PHP 3.08kb).
- phrases.php – Show phrases and circumstances (PHP 5.83kb).
- terms2.php – Show phrases and circumstances far a toddler window (PHP 5.75kb).
- thankyou.php – Show last affirmation screen (PHP 3.28kb).
../htdocs/order.htg/replace.htg/ This listing incorporates all of the supply recordsdata associated to the administration areas of the store database and different utility scripts. (240kb 34 recordsdata)
- addcat.php – Add further merchandise classes to the database (PHP 2.18kb).
- addproduct.php – Add further objects to the database (PHP 6.30kb).
- admin.php – Website content material management interface (PHP 65.9kb).
- backup.php – Generates database dump recordsdata (PHP 5.21kb).
- berror_form.inc – Present errors for brand new ebook database objects (Embody PHP 3.0kb).
- bookinfo.inc – Code block for ebook knowledge entry (Embody 6.64kb).
- bookup.inc – Show editable ebook info (Embody 10.2kb).
- buttons.inc – Code block to create enhancing command buttons (Embody 4.41kb).
- change.php – Supply code for replace affirmation messages (PHP14.4kb).
- edithelp.php – Permits enhancing and creation of assist desk info (PHP14.0kb).
- entbuttons.inc – Code block for knowledge entry types command buttons (Embody 1.21kb).
- error.gif – Clear graphic of a cartoon cross (Picture 118b).
- fine.gif – Clear graphic fo a cartoon tick (Picture 126b).
- assist.php – Show directors view of the system assist desk interface (PHP 6.22kb).
- index.php – Administrative entry to database modification performance (PHP 12.5kb)
- bill.php – Generate show buyer invoices for printing (PHP 5.33kb).
- mysqlsend.php – Allow consumer to execute customized SQL directions (PHP 4.59)
- newcat_form.inc – .Show new the class name error correction (Embody 773b).
- newname_table.inc – Show new product entry type (Embody 438b).
- newproduct.php – Replace/delete knowledge from the stock database (PHP 781kb).
- newtypeform.inc – Show new class entry type (Embody 563kb).
- word.inc – Show system info messages (Embody 524b).
- oldorders.php – Show abstract knowledge for closed orders (PHP 3.22kb).
- orders.php – Show chosen open order info (PHP 7.77kb).
- perror_form.inc – Show product info Errors (Embody 1.99).
- productinfo.inc – Show product enter type (Embody 3.68).
- productup.inc – Show editable product info (Embody 7.02kb).
- quest.gif – Clear graphic fo a query mark (Picture 114b).
- inventory.php – Administrative inventory knowledge abstract (PHP 9.07).
- add.jpg – Graphical add button (picture 1.84kb).
- add.php – Copy photos to the photographs.htg listing on the server (PHP 5.40kb).
- userorders.php – Show consumer order historical past (PHP 2.36kb).
- customers.php – Show editable consumer login info (PHP10.04kb).