A Easy E-Store Software Utilizing PHP and MySQL
SPECIFICATION:
Write a easy E-shop software utilizing PHP and MySQL*. This can be a bookshop, music store, garments retailer, or anything you would like. There needs to be a “person” interface to permit prospects to pick out and buy gadgets (don’t be concerned in regards to the cost aspect of issues). Ideally there must also be a password-protected “proprietor” interface, to permit the E-shop operator to view/edit inventory and pending orders.
The exercise is intentionally “arduous” given the brief deadline, and I don’t count on everybody essentially to finish it to perfection. This will probably be taken into consideration within the marking.
MARKING SCHEME:
[A 5%] Capability to jot down working HTML code (i.e. code that creates profitable markup on a browser window).**
[B 5%] Capability to submit an HTML web-page on a server such that it’s seen on the World Large Net. ***
[C 10%] Capability to make an HTML kind talk with a PHP script.**
[D 10%] Capability 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 pictures, 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 on.)
NOTES:
*In case you want to use totally different web-based applied sciences (e.g. ASP, JSP, Pearl) please achieve this. Nevertheless, please do NOT use high-level software program packages which require no programming expertise (e.g. “wysiwyg” HTML editors), as these slightly defeat the aim of taking this module.
** In classes A to D, the marks are awarded in a “binary” method (i.e. the coed receives both all the weighting mark or else zero). Thus 30% may be obtained just by demonstrating a primary data 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 will probably be eliminated and the weightings of the opposite classes scaled accordingly.
SOLUTION:
My digital store software is for the sale of books and different assorted merchandise offered by the Wandle Industrial Museum.
This improvement is a logical extension to an present static web site. The information and primary format of my software are derived from this pre-existing work.
THE MAIN INTERFACE:
the preliminary display screen, not together with the unique frames used within the Museum web site. A lot of the content material within the prime and backside frames is non practical and is included for completeness, this additionally helps exhibit the dynamic HTML that offered secondary navigation buildings 성인용품.
This display screen proven the principle physique of the store data and the “purchasing basket” capabilities on the button. This web page offers entry to:
1) A whole listing of the web “catalogue”;
2) A subset of {the catalogue} listed by product class;
3) A subset of {the catalogue} based mostly on person outlined search phrases;
4) Extra detailed details about an merchandise;
5) Capability so as to add gadgets to a session based mostly “purchasing basket”;
6) Capability you registered customers to jot down ebook evaluations;
If a person is new to the appliance, he/she is proven the message “Welcome. Already a buyer? Click on right here to register”, in any other case they see their person title and a button to the appropriate named “My account” which permits them to edit their data . This data 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 degree of all gadgets. The show additionally consists of two extra different potentialities, 1 gadgets which are out of inventory are present in crimson textual content. 2 gadgets that aren’t offered by the web store are “grayed-out” in each these instances the “purchase” button is faraway from all shows for a given merchandise.
THE BASKET:
The Basket Initially there’s not purchasing basket till the person provides an merchandise, till such time clicking on the “view basket button exhibits a default display screen.
When an merchandise is added, its amount is about 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 display screen proven right here. As soon as a basket is created and the person enters the system the next choices can be found below the product description:
1) Clear cart;
2) Proceed purchasing;
3) Checkout;
If the merchandise is de-incremented to zero then it’s faraway from the basket.
The basket is predicated on PHP periods and in contrast to the customers id, which is reined for half-hour, is not going to persist after the occasion on the browser is closed.
If the person is unknown to the appliance when he/she makes an attempt to finish the transaction, they are going to be requested to register, if the person has an account he/she will login and proceed with the transaction.
If the person has not obtained 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 purchasing basket both from any abstract itemizing, or an merchandise description web page.
A abstract web page shows primary merchandise data in a tabular format whithout pictures, such because the one proven proper by clicking on the “purchase” button on the left on the merchandise line.
This may also be executed from the merchandise element web page, which is displayed by clicking the gadgets code proven on the left of the abstract show.
Every merchandise element web page additionally features a “purchase” button in addition to the opposite purchasing basket instruments” These are on the abstract web page however on the backside so require scrolling
The database helps two types of gadgets, “books”, as proven above, which embrace data particular to studying supplies, and “items” which solely embrace primary merchandise data, merchandise code, title and value.
The place pictures ae not accessible a substitute is mechanically instituted till the administrator specifies an actual picture.
ABOUT THE USER:
If the person is unknown to the appliance when he/she makes an attempt to finish the transaction, they are going to be requested to register, if the person has an account he/she will login and proceed with the transaction
If the person has not obtained 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 and register a brand new account. The person 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 person 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 arduous coded with one administrative account, the username is “system” and the password is “god” Notice there’s presently no technique to change this.
The administration show permits the customers to:
1) outline new merchandise varieties;
2) Edit and delete customers;
3) Add, edit and delete classes;
This display screen permits the person 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 sector is legitimate.
It’s attainable to have a clean right entry – eg, if there aren’t any pictures these boxes needs to be left clear.
The query mark is to double test the intention to depart clean in sure instances
This display screen exhibits that theadministrator has chosen to delete a person’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) display screen, not together with the frames used within the Museum web site.
This display screen proven the principle physique of the store data and the “purchasing basket” capabilities at prime and the button. This web page offers entry to:
1) A whole listing of the web “catalogue”;
2) A subset of {the catalogue} listed by product class;
3) Capability to order {the catalogue} listed by product code, value or title, in acceding order;
4) A subset of {the catalogue} based mostly on person outlined search phrases;
5) Extra detailed details about an merchandise;
6) Capability so as to add gadgets to a session based mostly “purchasing basket”;
If a person is new to the appliance, he/she is proven the message “Welcome. Already a buyer? Click on right here to register”, in any other case they see their person title and a button to the appropriate named “My account” which permits them to edit their data. This data is saved in a consumer aspect cookie that’s retained for half-hour.
The administration show permits the customers to:
1) Outline new merchandise varieties;
2) Edit and delete customers;
3) Add, edit and delete classes;
4) Add, edit, transfer and delete merchandise;
5) Edit and add assist data;
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 software.
Table: bookinfo: Feedback: Guide particular metadata. Discipline Kind Null Default code varchar(5) No No creator 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 sort varchar(16) No
Table: classes:
Feedback: Product metadata Discipline Kind Null Default
id int(3) No
title varchar(50) No
etype int(1) No 2
Key phrases varchar(100) No
Table: prospects:
Feedback: Buyer billing data. Discipline Kind Null Default
uname varchar(15) No
first_name varchar(25) No
last_name varchar(25) No
telephone varchar(20) No
e-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 data Discipline Kind 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. Discipline Kind Null Default
uname varchar(15) No 0
ordernumber int(5) No
standing int(1) No 0
date date Sure NULL
Table: evaluations:
Feedback: person ebook evaluations and rations. Discipline Kind Null Default
uname varchar(15) No 0
sort int(1) No
score int(1) No 0
stamp timestamp(14) Sure NULL
assessment textual content No
Table: merchandise:
Table feedback: Major product knowledge. Discipline Kind 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: Major product knowledge. Discipline Kind Null Default
code varchar(5) No
date timestamp(14) Sure NULL
inventory int(3) No> 15
price decimal(5,2) No 00.00
Table: pwl:
Feedback: Consumer password/entry data. Discipline Kind Null Default
uname varchar(15) No
upass varchar(100) No 5d2e19393cc5ef67
created timestamp(14) Sure NULL
Table: syshelpindex:
Feedback: System assist topic index.Discipline Kind Null Default
cat int(2) No 0
topic varchar(30) No
Table: syshelpinfo:
Feedback: system assist data.Discipline Kind Null Default
cat int(3) No 0
title varchar(30) No
information textual content No
picture varchar(20) No
sort int(1) No 0
FILE STRUCTURE:
The digital store software is for the sale of books and different assorted merchandise offered by the Wandle Industrial Museum. This improvement is a logical extension to an present static web site.
The applying’s information are saved in 9 subdirectories. These are as follows:
../htdocs/order.htg/ That is the foundation listing of the net software, it accommodates all sources associated to the web site. All generic information and ancillary components are saved at this degree. (3.74mb 263 information)
- continfo.php – contact and ordering data (PHP 4.01kb).
- create_db.sql – Database construction (SQL dump 5.82kb).
- credit-cards.gif – Usable bank cards varieties (picture 2.02kb).
- cvc.jpg – Clarifying the place to discover a CVC worth (picture 6.0kb).
- dictionary.txt – MYSQL Information 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 web site 404 error web page (HTML 1.76kb).
- new_ani.gif – An animation of the phrase ‘new’ (picture 1.66kb).
- gives.gif – Graphic of the textual content ‘test these particular gives’ (picture 1.77).
- pleasenote.gif – A burning animation of the textual content ‘please observe’ (picture 14.7kb).
- reset.gif – Graphical enter kind reset button (picture 1.28kb).
- store.gif – Small {photograph} of the true museum store (image7.31kb).
- submit.gif – Graphical enter kind submit button (picture 1.18kb).
../htdocs/order.htg/widespread.htg/ This listing accommodates all widespread utility scripts and different sources that the net software relies upon upon.(185kb 50 information)
- about0.gif – Graphic of the textual content ‘house web 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 sort impact (picture 4.59kb).
- primary.css – Web site formatting and formatting descriptions (model 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 – Web site copyright and attribution data (HTML 1.95kb).
- constants.inc – Software 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 primary fax machine (picture 231b).
- feed0.gif – Graphic of the textual content ‘suggestions’ (picture 990b).
- focus.js – Script to position deal with a hidden popup window (javascript 165b).
- home0.gif – Graphic of the textual content ‘normal’ (picture 967b).
- iiv.gif – Clear graphic of the Investing in Volunteers brand (picture 2.63kb).
- iiv.fpg – Opaque graphic of the Investing in Volunteers brand (picture 4.49kb).
- index.htm – Customized web site 404 error web page (HTML 1.76kb).
- information.gif – Clear museum brand with contact data (picture 2.31).
- jfooter.js – Code to dynamically generate web page footer data (javascript 2.41kb)
- letter.gif – Drawing of two easy letters (picture 698b).
- linksb.jpg – A spider in an internet on a small depiction of a browser (picture 1.18.kb).
- linkware.gif – Clear graphic of the textual content ‘all supplies on this web site 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 photograph (picture 5.40).
- order0.gif – Graphic of the textual content ‘Mail Order’ (picture 0.96kb).
- telephone.gif – Clear graphic of a crimson phone (picture 281kb).
- print.css – Display formatting descriptions (model sheet 3.65kb).
- registered.gif – Opaque graphic of the registered museums brand (picture 428b).
- registered3.gif – Clear graphic of the registered museums brand (picture 2.80b).
- resize.js – Code to dynamically change a window to the picture measurement (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 brand (picture 417b)
../htdocs/order.htg/data_backup/ This listing is used to retailer SQL dump information..(242kb 3 information)
../htdocs/order.htg/assist/ This listing is used to retailer graphics for assist desk database. (336kb 26 information)
../htdocs/order.htg/pictures.htg/ This listing is used to retailer graphics for the store database. (2.41mb 91 information)
../htdocs/order.htg/mysqlsnips This listing accommodates a set of textual content information associated to instance SQL instructions.
../htdocs/order.htg/store.htg/ This listing accommodates all of the supply information associated to the general public areas of the store database utility scripts and different template sources that the net software relies upon upon. (85.1kb 20 information)
- basket.php – Create and maintains a session based mostly purchasing basked (PHP 9.29bk).
- book_detail.php – Code block for displaying detailed data for a particular ebook (PHP 2.41kb).
- buttons.inc – Code block for displaying motion bottoms associated to product data (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 person and database administration login operations (PHP 7.91).
- outdated login.php – Out of date login script (PHP8.99kb).
- orderend.php – Code block for displaying purchasing basket buttons (PHP 1.36kb).
- ordertop.php – Code block for displaying shot data and first controls (PHP5.73kb).
- pagefoot.inc – Code block to create the ending HTML web page construction (Embody 801b).
- pagehead.inc – Code block to create the beginning HTML web page construction (Embody 854b).
- product_detail.php – Code block for displaying detailed product data (PHP 1.15kb).
- product_list.php – Code block for displaying abstract merchandise data (PHP 3.07kb).
- product_show.php – Code block that shows various abstract data (PHP3.16).
- immediate.inc – Code block for displaying a message to the person (embrace 897b).
- signin.php – Show logon easy login display 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 remaining affirmation display screen (PHP 3.28kb).
../htdocs/order.htg/replace.htg/ This listing accommodates all of the supply information associated to the administration areas of the store database and different utility scripts. (240kb 34 information)
- addcat.php – Add extra merchandise classes to the database (PHP 2.18kb).
- addproduct.php – Add extra gadgets to the database (PHP 6.30kb).
- admin.php – Web site content material administration interface (PHP 65.9kb).
- backup.php – Generates database dump information (PHP 5.21kb).
- berror_form.inc – Present errors for brand new ebook database gadgets (Embody PHP 3.0kb).
- bookinfo.inc – Code block for ebook knowledge entry (Embody 6.64kb).
- bookup.inc – Show editable ebook data (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 – Allows enhancing and creation of assist desk data (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).
- wonderful.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 person to execute customized SQL directions (PHP 4.59)
- newcat_form.inc – .Show new the class title error correction (Embody 773b).
- newname_table.inc – Show new product entry kind (Embody 438b).
- newproduct.php – Replace/delete knowledge from the stock database (PHP 781kb).
- newtypeform.inc – Show new class entry kind (Embody 563kb).
- observe.inc – Show system data messages (Embody 524b).
- oldorders.php – Show abstract knowledge for closed orders (PHP 3.22kb).
- orders.php – Show chosen open order data (PHP 7.77kb).
- perror_form.inc – Show product data Errors (Embody 1.99).
- productinfo.inc – Show product enter kind (Embody 3.68).
- productup.inc – Show editable product data (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 pictures to the pictures.htg listing on the server (PHP 5.40kb).
- userorders.php – Show person order historical past (PHP 2.36kb).
- customers.php – Show editable person login data (PHP10.04kb).