SlideShare a Scribd company logo
1 of 59
A Project Report on
“ONLINE BOOK STORE”
Submitted in partial fulfilment of
VI SEMESTER BCA
As prescribed by
INDIAN ACADEMY DEGREE COLLEGE
AUTONOMOUS
Developed by
KOMALA.L 19IABCA045
Under the guidance of
Mrs.Sona.K. V
CERTIFICATE
This is to certify that the project entitled “ONLINE BOOK STORE”, is a
bonafide work done by KOMALA.L (19IABCA045)submitted in partial fulfilment of
VI Semester BCA, as prescribed by INDIAN ACADEMY DEGREE COLLEGE
AUTONOMOUS, during the academic year 2021-2022.
Internal Guide Head of the Department
Mrs.Sona.K.V Ms. Anuradha. P
External Examiners:
1.
2.
DECLARATION
We, KOMALA.L (19IABCA045) here by declare that this project work entitled
“ONLINE BOOK STORE” is submitted to department of Computer Science, Indian
Academy Degree College Autonomous, Bangalore for partial fulfilment of the
requirement for the award of Bachelor of Computer Application is a result of original
work carried out by ourself. We further declare that we have not submitted this project
report either in part or in full to any other university for the award of any Degree.
Date: Student Name:
Place: KOMAL .L (19IABCA045)
ACKNOWLEDGEMENT
I would like to express my sincere gratitude to our respected Principal, Dr. Srinidhi K Parthasarathy
who gave opportunity to do the project and complete it successfully. I am very much thankful to him.
I would like to express my special thanks to our H.O.D (Computer science) Mrs. Anuradha P, for
providing constant support and cooperation during the project development. I take this opportunity to
express my thanks to our project guide Mrs.Sona.K.Vfor the valuable help and guidance to develop
this project. I would also like to thank my parents and friends who helped me a lot in finalizing this
project.
ABSTRACT
The main objective of the project is to create an online book store that allows users to search and purchase a
book online based on title, author and subject. The selected books are displayed in a tabular format and the user
can order their books online through credit card payment. Using this Website the user can purchase a book
online instead of going out to a book store and wasting time.
Online Book store is an online web application where the customer can purchase books online. Through a web
browser the customers can search for a book by its title or author, later can add to the shopping cart and finally
purchase using credit card transaction. The user can login using his account details or new customers can set up
an account very quickly. They should give the details of their name, contact number and shipping address. The
user can also give feedback to a book by giving ratings on a score of five. The books are divided into many
categories based on subject like Software, Database, English, Architecture etc.
The Online Book Store Website provides customers with online shopping through a web browser. A customer
can, create,sign in to his account, place items into a shopping cart and purchase using his credit card details.
The Administrator will have additional functionalities when compared to the common user. He can add, delete
and update the book details, book categories, member information and also confirm a placed order.
CONTENT
SL.NO PARTICULARS PAGE NO
1. INTRODUCTION 1
2. OBJECTIVE 1
3. PROPOSED SYSTEM 2
4. SYSTEM REQUIREMENTS 4
5. SYSTEM DESIGN 5
6. DATA FLOW DIAGRAM 9
7. E-R DIAGRAM 14
8. DATABASE DESIGN 17
9. CODING 23
10. SYSTEM TESTING 35
11. PROJECTOUTPUT 40
12. CONCLUSION 54
13. REFERENCE 55
1
INTRODUCTION
The main objective of the project is to create an online book store that allows users to search and
purchase a book based on title, author and subject. The selected books are displayed in a tabular format
and the user can order their books online through cash on delivery and PayPal. The Administrator will
have additional functionalities when compared to the common user.
The motivation to create this project has many sources:
• Interest to develop a good user-friendly website with many online transactions using a database.
• To increase my knowledge horizon in technologies like PHP, SQL, CSS, HTML.
• To gain good experience in PHP before joining in a full-time job.
OBJECTIVE:
My objective is to design such an application using which one can say 'goodbye' to the days when you
stood in line waiting, and waiting some more for a store clerk to finally check out your items. Online
shopping transactions occur instantly-saving you time to get your other errands done! Additionally,
unlike a store, online shopping has friendly customer service representatives available 24 hours a day,
7 days a week to assist you with locating, purchasing and shipping your merchandise.
My main aim is to design such a book store where customer can visit our site anytime of the
day from anywhere to view the available books, choose any of them and can order by paying online
or can opt for cash on delivery as well. The administrator will regularly add any new books available
to them for sale. The administrator will take books from the reputed publishers and vendors only.
2
PROPOSED SYSTEM:
This online application enables the end users to register online, select the book from the book shop,
read the list and order book online. By just selecting the book that the user wants to have. The results
after selecting the book from the book list will directly appear in the screen of the online book store
admin. By using this application, the work is reduced and we can also say that the work is nullified.
The administrator will regularly add any new books available to them for sale. The user will be given
a username and a password to login.
Modules:
Administrator module
Customer Module
Administrator module
Admin can view all the information about the user edit the all details about the customer.
 Create book category
 Manage book categories
 Add book
 Manage book
 Manage user order
Customer Module
This Functionalities provided:
 View product’s list
 Register
 Place orders
3
Admin Module
1. Dashboard: In this section admin can see all detail in brief like total order, confirmed order,
and Total user.
2. Reg Users: In this section admin can manage register user (view/update).
3. Book Category: In this section admin can manage book category (Add and Update).
4. Book Menu: In this section admin can manage book menu (Add and Update).
5. Orders: In this section admin can view the book order details and they have also right to change
order status according to current status.
6. Search Order: In this section admin can search particular order with the help of order number.
7. Reports: In this section admin can view order details, order counts and sales report according
to dates.
Admin can also update his profile, change password and recover password.
User Module
1.Book Menu: In this section user can view which book available in book store.
2. My Accounts: In this section user can his/her password, view and update his/her profile and logout
from accounts.
3.My orders: In this section user can view order history after login.
4. Cart: In this section user can add their book which he/her want to order.
5. User has also a facility to cancel order if he/her wants to cancel.
Brief Information about homepage
In this page guest user (user which not registered) can view online book store menu, search book
according book name and guest user can also sign up in online book store and registered user can sign
in. User can also track their order without login.
4
SYSTEM REQUIREMENTS
Hardware Requirement:
 Hardware - Pentium
 Speed - 1.1 GHz
 RAM - 1GB
 Hard Disk - 20 GB
 Key Board - Standard Windows Keyboard
 Mouse - Two or Three Button Mouse
 Monitor - SVGA
Software Requirements:
 Operating System : Windows / Linux / Mac
 Technology : PHP
 Web Technologies : Html, JavaScript, CSS
 IDE : Notepad++
 Web Server : WAMP / XAMPP / LAMP / MAMP (any one)
 Database : My SQL
5
SYSTEM DESIGN
INTRODUCTION:
Design is the first step in the development phase for any techniques and principles for the purpose of
defining a device, a process or system in sufficient detail to permit its physical realization.
Once the software requirements have been analysed and specified the software design involves three
technical activities - design, coding, implementation and testing that are required to build and verify
the software.
The design activities are of main importance in this phase, because in this activity, decisions ultimately
affecting the success of the software implementation and its ease of maintenance are made. These
decisions have the final bearing upon reliability and maintainability of the system. Design is the only
way to accurately translate the customer’s requirements into finished software or a system.
Design is the place where quality is fostered in development. Software design is a process through
which requirements are translated into a representation of software. Software design is conducted in
two steps. Preliminary design is concerned with the transformation of requirements into data.
UML Diagrams:
Actor:
A coherent set of roles that users of use cases play when interacting with the use `cases.
Use case:
A description of sequence of actions, including variants, that a system performs that yields an
observable result of value of an actor.
UML stands for Unified Modelling Language. UML is a language for specifying, visualizing and
documenting the system. This is the step while developing any product after analysis. The goal from
this is to produce a model of the entities involved in the project which later need to be built. The
representation of the entities that are to be used in the product being developed need to be designed.
6
There are various kinds of methods in software design:
They are as follows:
 Use case Diagram
 Sequence Diagram
 Collaboration Diagram
 Activity Diagram
 State chat Diagram
USECASE DIAGRAMS:
Use case diagrams model behaviour within a system and helps the developers
understand of what the user require. The stick man represents what’s called an actor.
Use case diagram can be useful for getting an overall view of the system and clarifying who can do
and more importantly what they can’t do.
Use case diagram consists of use cases and actors and shows the interaction between the use case and
actors.
 The purpose is to show the interactions between the use case and actor.
 To represent the system requirements from user’s perspective.
 An actor could be the end-user of the system or an external system.
USECASE DIAGRAM:
A Use case is a description of set of sequence of actions. Graphically it is rendered as an ellipse with
solid line including only its name. Use case diagram is a behavioral diagram that shows a set of use
cases and actors and their relationship. It is an association between the use cases and actors. An actor
represents a real-world object. Primary Actor – Sender, Secondary Actor Receiver.
7
Admin Use Case Diagram:
Admin
Dashboard
Manage Registered
Users
Manage Book Categories
Add / update
Manage Book Menu
Add/ Update
Order Management
Report Generation
Update Profile
Change Password
8
User Use Case Diagram :
User
DATA FLOW DIAGRAM
Signup
Sign in
Place order
Order Tracking
Change Password
Update Profile
9
The Data Flow Diagram shows the flow of data or information. It can be partitioned into single
processes or functions. Data Flow Diagrams can be grouped together or decomposed into multiple
processes. There can be physical DFD's that represent the physical files and transactions, or they can
be business DFD's (logical, or conceptual).
When it's used?
The DFD is an excellent communication tool for analysts to model processes and functional
requirements. One of the primary tools of the structured analysis efforts of the 1970's it was developed
and enhanced by the likes of Yourdon, McMenamin, Palmer, Gane and Sarson. It is still considered
one of the best modeling techniques for eliciting and representing the processing requirements of a
system.
Used effectively, it is a useful and easy to understand modeling tool. It has broad application
and usability across most software development projects. It is easily integrated with data modeling,
workflow modeling tools, and textual specs. Together with these, it provides analysts and developers
with solid models and specs. Alone, however, it has limited usability. It is simple and easy to
understand by users and can be easily extended and refined with further specification into a physical
version for the design and development teams.
The different versions are Context Diagrams (Level 0), Partitioned Diagrams (single process
only -- one level), functionally decomposed, leveled sets of Data Flow Diagrams.
Data Store
It is a repository of information. In the physical model, this represents a file, table, etc. In the
logical model, a data store is an object or entity.
DataFlows
DFDs show the flow of data from external entities into the system, showed how the data moved
from one process to another, as well as its logical storage. There are only four symbols:
 Squares representing external entities, which are sources or destinations of data.
10
 Rounded rectangles representing processes, which take data as input, do something to it, and
output it.
 Arrows representing the data flows, which can either, be electronic data or physical items.
 Open-ended rectangles representing data stores, including electronic stores such as databases
or XML files and physical stores such as or filing cabinets or stacks of paper.
There are several common modeling rules for creating DFDs:
 All processes must have at least one data flow in and one data flow out.
 All processes should modify the incoming data, producing new forms of outgoing data.
 Each data store must be involved with at least one data flow.
 Each external entity must be involved with at least one data flow.
 A data flow must be attached to at least one process.
DFDs are nothing more than a network of related system functions and indicate from where
information is received and to where it is sent. It is the starting point in the system that decomposes
the requirement specifications down to the lowest level detail.
The four symbols in DFD, each of which has its meaning. They are given below:
 External entities are outside to system but they either supply input data in the system or use the
system output. These are represented by square of rectangle. External entities that supply data
into a system are sometimes called Sources. External entities that use system data are
sometimes called sinks.
 Dataflow models that passages of data in the system and are represented by line by joining
system components. An arrow indicates the direction of the flow and the line is labeled by the
name of the dataflow.
 Process show that the systems do. Each process has one or more data inputs and one or data
outputs. Circles in DFD represent them. Each high level process may be consisting of more
than one lower level processes. Process will be expanded in sequent level DFD. A circle or a
bubble represents a process that transforms incoming data flow into outgoing dataflow.
The high level processes in a system are:
11
 Receivable process.
 Verifiable process.
 Disposal process.
 File or data store is a repository of data. They contain data that is retained in the system. Process
can enter data into data store or retrieved data from the data store. An open rectangle is a data
store, data at rest.
 0-Level DFD:
 DFD for Admin Process
Order receipt&
confirmation
Books & other
details
CONTEXT DTAGRAM
Personal Details &
Select product
Order & reports
User
Admin
Online Book
Store
Data
1.0
Admin
Process
Admin
Status
Book Product
Product
Order
Store
Access process
Reviews
12
 DFD For User Registration and Profile Update
Enter data
View Profile
Edit data
User Details
Register
User
Registration
Process
2.0
status
Profile Update
2.1
User Updates
13


 DFD for shopping and checkout process
order Details
Confirmation
& receipt
confirms Cart Details
Place Order
Selected
Product
Book info
Login
User
Select
Product
3.0
Add to Cart
3.1
Checkout
3.2
Order
Book
Cart
User
14
E-R Diagrams:
The Entity-Relationship (ER) model was originally proposed by Peter in 1976 [Chen76] as a way to
unify the network and relational database views. Simply stated the ER model is a conceptual data
model that views the real world as entities and relationships. A basic component of the model is the
Entity-Relationship diagram which is used to visually represents data objects. Since Chen wrote his
paper the model has been extended and today it is commonly used for database design for the database
designer, the utility of the ER model is:
 it maps well to the relational model. The constructs used in the ER model can easily be
transformed into relational tables.
 it is simple and easy to understand with a minimum of training. Therefore, the model can be
used by the database designer to communicate the design to the end user.
 In addition, the model can be used as a design plan by the database developer to implement a
data model in a specific database management software.
Connectivity and Cardinality
The basic types of connectivity for relations are: one-to-one, one-to-many, and many-to-many. A one-
to-one (1:1) relationship is when at most one instance of a entity A is associated with one instance of
entity B. For example, "employees in the company are each assigned their own office. For each
employee there exists a unique office and for each office there exists a unique employee.
A one-to-many (1: N) relationships is when for one instance of entity A, there are zero, one, or many
instances of entity B, but for one instance of entity B, there is only one instance of entity A. An example
of a 1: N relationships is a department has many employees each employee is assigned to one
department
/A many-to-many (M: N) relationship, sometimes called non-specific, is when for one instance of
entity A, there are zero, one, or many instances of entity B and for one instance of entity B there are
zero, one, or many instances of entity A. The connectivity of a relationship describes the mapping of
associated
15
ER Notation
There is no standard for representing data objects in ER diagrams. Each modeling methodology uses
its own notation. The original notation used by Chen is widely used in academics texts and journals
but rarely seen in either CASE tools or publications by non-academics. Today, there are a number of
notations used, among the more common are Bachman, crow's foot, and IDEFIX.
All notational styles represent entities as rectangular boxes and relationships as lines connecting
boxes. Each style uses a special set of symbols to represent the cardinality of a connection. The notation
used in this document is from Martin. The symbols used for the basic ER constructs are:
 Entities are represented by labelled rectangles. The label is the name of the entity. Entity names
should be singular nouns.
 Relationships are represented by a solid line connecting two entities. The name of the
relationship is written above the line. Relationship names should be verbs
 Attributes, when included, are listed inside the entity rectangle. Attributes which are
identifiers are underlined. Attribute names should be singular nouns.
 Cardinality of many is represented by a line ending in a crow's foot. If the crow's foot is
omitted, the cardinality is one.
 Existence is represented by placing a circle or a perpendicular bar on the line. Mandatory
existence is shown by the bar (looks like a 1) next to the entity for an instance is required.
Optional existence is shown by placing a circle next to the entity that is optional.
16
ER Diagram:
email
user
User id
password
name
email
phone
state
city
address
Choose
items
Book
b_id
B_na
me
B_cat
price
B_desc
B_sub
cat
Cart
Cart_id
usern
m
Book_i
d
qty
amount
Adds
to
order
orderID
Cart_i
d
Order
_date
amount
confir
m
contact
con_id usern
m
Write
query
stock
Bk_nam
e
17
DATABASE DESIGN
The data in the system has to be stored and retrieved from database. Designing the database is part of
system design. Data elements and data structures to be stored have been identified at analysis stage.
They are structured and put together to design the data storage and retrieval system.
A database is a collection of interrelated data stored with minimum redundancy to serve many users
quickly and efficiently. The general objective is to make database access easy, quick, inexpensive and
flexible for the user. Relationships are established between the data items and unnecessary data items
are removed. Normalization is done to get an internal consistency of data and to have minimum
redundancy and maximum stability. This ensures minimizing data storage required, minimizing
chances of data inconsistencies and optimizing for updates. The MS Access database has been chosen
for developing the relevant databases.
Online Book Store contains 10 MySQL tables:
users: This table stores the user and admin details.
18
cart: This table stores the details of cart.
categories: This table stores the categories details.
19
client: This table stores the client details.
Inventory: This table stores the inventory details.
Order: This table stores the order details.
20
Order_list: This table stores the order_list details.
product: This table stores the product details.
21
sub_ categories: This table stores the sub_categories details.
system: This table stores the system details.
22
23
CODING
Home Page:
<!-- Header-->
<header class="bg-dark py-5" id="main-header">
<div class="container px-4 px-lg-5 my-5">
<div class="text-center text-white">
<h1 class="display-4 fw-bolder">If you want to make intelligent, get books from here.</h1>
<p class="lead fw-normal text-white-50 mb-0">Shop Now!</p>
</div>
</div>
</header>
<!-- Section-->
<style>
.book-cover{
object-fit:contain !important;
height:auto !important;
}
</style>
<section class="py-5">
<div class="container px-4 px-lg-5 mt-5">
<div class="row gx-4 gx-lg-5 row-cols-md-3 row-cols-xl-4 justify-content-center">
<?php
$products = $conn->query("SELECT * FROM `products` where status = 1 order by rand()
limit 8 ");
while($row = $products->fetch_assoc()):
$upload_path = base_app.'/uploads/product_'.$row['id'];
$img = "";
if(is_dir($upload_path)){
$fileO = scandir($upload_path);
if(isset($fileO[2]))
24
$img = "uploads/product_".$row['id']."/".$fileO[2];
// var_dump($fileO);
}
foreach($row as $k=> $v){
$row[$k] = trim(stripslashes($v));
}
$inventory = $conn->query("SELECT * FROM inventory where product_id =
".$row['id']);
$inv = array();
while($ir = $inventory->fetch_assoc()){
$inv[] = number_format($ir['price']);
}
?>
<div class="col mb-5">
<div class="card product-item">
<!-- Product image-->
<img class="card-img-top w-100 book-cover" src="<?php echo validate_image($img)
?>" alt="..." />
<!-- Product details-->
<div class="card-body p-4">
<div class="">
<!-- Product name-->
<h5 class="fw-bolder"><?php echo $row['title'] ?></h5>
<!-- Product price-->
<?php foreach($inv as $k=> $v): ?>
<span><b>Price: </b><?php echo $v ?></span>
<?php endforeach; ?>
</div>
<p class="m-0"><small>By: <?php echo $row['author'] ?></small></p>
</div>
<!-- Product actions-->
25
<div class="card-footer p-4 pt-0 border-top-0 bg-transparent">
<div class="text-center">
<a class="btn btn-flat btn-primary " href=".?p=view_product&id=<?php echo
md5($row['id']) ?>">View</a>
</div>
</div>
</div>
</div>
<?php endwhile; ?>
</div>
</div>
</section>
CODING FOR INDEX:
<?php
session_start();
$count = 0;
// connecto database
$title = "Index";
require_once "./template/header.php";
require_once "./functions/database_functions.php";
$conn = db_connect();
$row = select4LatestBook($conn);
?>
<!-- Example row of columns -->
<p class="lead text-center text-muted">Latest books</p>
<div class="row">
<?php foreach($row as $book) { ?>
<div class="col-md-3">
<a href="book.php?bookisbn=<?php echo $book['book_isbn']; ?>">
26
<img class="img-responsive img-thumbnail" src="./bootstrap/img/<?php echo
$book['book_image']; ?>">
</a>
</div>
<?php } ?>
</div>
<?php
if(isset($conn)) {mysqli_close($conn);}
require_once "./template/footer.php";
?>
CODING FOR CONTACT:
<?php
$title = "Contact";
require_once "./template/header.php";
?>
<div class="row">
<div class="col-md-3"></div>
<div class="col-md-6 text-center">
<form class="form-horizontal">
<fieldset>
<legend>Contact</legend>
<p class="lead">I’d love to hear from you! Complete the form to
send me an email.</p>
<div class="form-group">
<label for="inputName" class="col-lg-2 control-
label">Name</label>
<div class="col-lg-10">
<input type="text" class="form-control" id="inputName"
placeholder="Name">
</div>
</div>
<div class="form-group">
27
<label for="inputEmail" class="col-lg-2 control-
label">Email</label>
<div class="col-lg-10">
<input type="text" class="form-control" id="inputEmail"
placeholder="Email">
</div>
</div>
<div class="form-group">
<label for="textArea" class="col-lg-2 control-
label">Textarea</label>
<div class="col-lg-10">
<textarea class="form-control" rows="3"
id="textArea"></textarea>
<span class="help-block">A longer block of help text that
breaks onto a new line and may extend beyond one line.</span>
</div>
</div>
<div class="form-group">
<div class="col-lg-10 col-lg-offset-2">
<button type="reset" class="btn btn-default">Cancel</button>
<button type="submit" class="btn btn-
primary">Submit</button>
</div>
</div>
</fieldset>
</form>
</div>
<div class="col-md-3"></div>
</div>
<?php
require_once "./template/footer.php";
?>
28
Login page:
<style>
#uni_modal .modal-content>.modal-footer,#uni_modal .modal-content>.modal-header{
display:none;
}
</style>
<div class="container-fluid">
<div class="row">
<h3 class="float-right">
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</h3>
<div class="col-lg-12">
<h3 class="text-center">Login</h3>
<hr>
<form action="" id="login-form">
<div class="form-group">
<label for="" class="control-label">Email</label>
<input type="email" class="form-control form" name="email" required>
</div>
<div class="form-group">
<label for="" class="control-label">Password</label>
<input type="password" class="form-control form" name="password" required>
</div>
<div class="form-group d-flex justify-content-between">
<a href="javascript:void()" id="create_account">Create Account</a>
<button class="btn btn-primary btn-flat">Login</button>
29
</div>
</form>
</div>
</div>
</div>
<script>
$(function(){
$('#create_account').click(function(){
uni_modal("","registration.php","mid-large")
})
$('#login-form').submit(function(e){
e.preventDefault();
start_loader()
if($('.err-msg').length > 0)
$('.err-msg').remove();
$.ajax({
url:_base_url_+"classes/Login.php?f=login_user",
method:"POST",
data:$(this).serialize(),
dataType:"json",
error:err=>{
console.log(err)
alert_toast("an error occured",'error')
end_loader()
},
success:function(resp){
if(typeof resp == 'object' && resp.status == 'success'){
alert_toast("Login Successfully",'success')
setTimeout(function(){
location.reload()
30
},2000)
}else if(resp.status == 'incorrect'){
var _err_el = $('<div>')
_err_el.addClass("alert alert-danger err-msg").text("Incorrect Credentials.")
$('#login-form').prepend(_err_el)
end_loader()
}else{
console.log(resp)
alert_toast("an error occured",'error')
end_loader()
}
}
})
})
})
</script>
CODING FOR EDIT BOOKS:
<?php
// if save change happen
if(!isset($_POST['save_change'])){
echo "Something wrong!";
exit;
}
$isbn = trim($_POST['isbn']);
$title = trim($_POST['title']);
$author = trim($_POST['author']);
$descr = trim($_POST['descr']);
$price = floatval(trim($_POST['price']));
31
$publisher = trim($_POST['publisher']);
if(isset($_FILES['image']) && $_FILES['image']['name'] != ""){
$image = $_FILES['image']['name'];
$directory_self = str_replace(basename($_SERVER['PHP_SELF']), '',
$_SERVER['PHP_SELF']);
$uploadDirectory = $_SERVER['DOCUMENT_ROOT'] . $directory_self .
"bootstrap/img/";
$uploadDirectory .= $image;
move_uploaded_file($_FILES['image']['tmp_name'], $uploadDirectory);
}
require_once("./functions/database_functions.php");
$conn = db_connect();
// if publisher is not in db, create new
$findPub = "SELECT * FROM publisher WHERE publisher_name = '$publisher'";
$findResult = mysqli_query($conn, $findPub);
if(!$findResult){
// insert into publisher table and return id
$insertPub = "INSERT INTO publisher(publisher_name) VALUES ('$publisher')";
$insertResult = mysqli_query($conn, $insertPub);
if(!$insertResult){
echo "Can't add new publisher " . mysqli_error($conn);
exit;
}
}
$query = "UPDATE books SET
book_title = '$title',
32
book_author = '$author',
book_descr = '$descr',
book_price = '$price'";
if(isset($image)){
$query .= ", book_image='$image' WHERE book_isbn = '$isbn'";
} else {
$query .= " WHERE book_isbn = '$isbn'";
}
// two cases for fie , if file submit is on => change a lot
$result = mysqli_query($conn, $query);
if(!$result){
echo "Can't update data " . mysqli_error($conn);
exit;
} else {
header("Location: admin_edit.php?bookisbn=$isbn");
}
?>
View_Categoriespage:
<?php
$title = "All Book Categories";
$sub_title = "";
if(isset($_GET['c']) && isset($_GET['s'])){
$cat_qry = $conn->query("SELECT * FROM categories where md5(id) = '{$_GET['c']}'");
if($cat_qry->num_rows > 0){
$title = $cat_qry->fetch_assoc()['category'];
}
$sub_cat_qry = $conn->query("SELECT * FROM sub_categories where md5(id) =
'{$_GET['s']}'");
if($sub_cat_qry->num_rows > 0){
$sub_title = $sub_cat_qry->fetch_assoc()['sub_category'];
33
}
}
elseif(isset($_GET['c'])){
$cat_qry = $conn->query("SELECT * FROM categories where md5(id) = '{$_GET['c']}'");
if($cat_qry->num_rows > 0){
$title = $cat_qry->fetch_assoc()['category'];
}
}
elseif(isset($_GET['s'])){
$sub_cat_qry = $conn->query("SELECT * FROM sub_categories where md5(id) =
'{$_GET['s']}'");
if($sub_cat_qry->num_rows > 0){
$title = $sub_cat_qry->fetch_assoc()['sub_category'];
}
}
?>
<!-- Header-->
<header class="bg-dark py-5" id="main-header">
<div class="container px-4 px-lg-5 my-5">
<div class="text-center text-white">
<h1 class="display-4 fw-bolder"><?php echo $title ?></h1>
<p class="lead fw-normal text-white-50 mb-0"><?php echo $sub_title ?></p>
</div>
</div>
</header>
<!-- Section-->
<section class="py-5">
<div class="container px-4 px-lg-5 mt-5">
<div class="row gx-2 gx-lg-5 row-cols-1 row-cols-md-2 row-cols-xl-2 justify-content-center">
34
<?php
$whereData = "";
$categories = $conn->query("SELECT * FROM `categories` where status = 1 order by
category asc ");
while($row = $categories->fetch_assoc()):
foreach($row as $k=> $v){
$row[$k] = trim(stripslashes($v));
}
$row['description'] = strip_tags(stripslashes(html_entity_decode($row['description'])));
?>
<div class="col mb-6 mb-2">
<a href="./?p=products&c=<?php echo md5($row['id']) ?>" class="card category-item
text-dark">
<div class="card-body p-4">
<div class="">
<!-- Product name-->
<h5 class="fw-bolder border-bottom border-primary"><?php echo $row['category']
?></h5>
</div>
<p class="m-0 truncate"><?php echo $row['description'] ?></p>
</div>
</a>
</div>
<?php endwhile; ?>
</div>
</div>
</section>
CODING FOR REGISTATION:
<?php
35
session_start();
$_SESSION['err'] = 1;
foreach($_POST as $key => $value){
if(trim($value) == ''){
$_SESSION['err'] = 0;
}
break;
}
if($_SESSION['err'] == 0){
header("Location: checkout.php");
} else {
unset($_SESSION['err']);
}
$_SESSION['ship'] = array();
foreach($_POST as $key => $value){
if($key != "submit"){
$_SESSION['ship'][$key] = $value;
}
}
require_once "./functions/database_functions.php";
// print out header here
$title = "Purchase";
require "./template/header.php";
// connect database
if(isset($_SESSION['cart']) && (array_count_values($_SESSION['cart']))){
?>
36
<table class="table">
<tr>
<th>Item</th>
<th>Price</th>
<th>Quantity</th>
<th>Total</th>
</tr>
<?php
foreach($_SESSION['cart'] as $isbn => $qty){
$conn = db_connect();
$book = mysqli_fetch_assoc(getBookByIsbn($conn, $isbn));
?>
<tr>
<td><?php echo $book['book_title'] . " by " . $book['book_author']; ?></td>
<td><?php echo "$" . $book['book_price']; ?></td>
<td><?php echo $qty; ?></td>
<td><?php echo "$" . $qty * $book['book_price']; ?></td>
</tr>
<?php } ?>
<tr>
<th>&nbsp;</th>
<th>&nbsp;</th>
<th><?php echo $_SESSION['total_items']; ?></th>
<th><?php echo "$" . $_SESSION['total_price']; ?></th>
</tr>
<tr>
<td>Shipping</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
37
<td>20.00</td>
</tr>
<tr>
<th>Total Including Shipping</th>
<th>&nbsp;</th>
<th>&nbsp;</th>
<th><?php echo "$" . ($_SESSION['total_price'] + 20); ?></th>
</tr>
</table>
<form method="post" action="process.php" class="form-horizontal">
<?php if(isset($_SESSION['err']) && $_SESSION['err'] == 1){ ?>
<p class="text-danger">All fields have to be filled</p>
<?php } ?>
<div class="form-group">
<label for="card_type" class="col-lg-2 control-label">Type</label>
<div class="col-lg-10">
<select class="form-control" name="card_type">
<option value="VISA">VISA</option>
<option value="MasterCard">MasterCard</option>
<option value="American Express">American Express</option>
</select>
</div>
</div>
<div class="form-group">
<label for="card_number" class="col-lg-2 control-label">Number</label>
<div class="col-lg-10">
<input type="text" class="form-control" name="card_number">
</div>
</div>
38
<div class="form-group">
<label for="card_PID" class="col-lg-2 control-label">PID</label>
<div class="col-lg-10">
<input type="text" class="form-control" name="card_PID">
</div>
</div>
<div class="form-group">
<label for="card_expire" class="col-lg-2 control-label">Expiry Date</label>
<div class="col-lg-10">
<input type="date" name="card_expire" class="form-control">
</div>
</div>
<div class="form-group">
<label for="card_owner" class="col-lg-2 control-label">Name</label>
<div class="col-lg-10">
<input type="text" class="form-control" name="card_owner">
</div>
</div>
<div class="form-group">
<div class="col-lg-10 col-lg-offset-2">
<button type="reset" class="btn btn-default">Cancel</button>
<button type="submit" class="btn btn-primary">Purchase</button>
</div>
</div>
</form>
<p class="lead">Please press Purchase to confirm your purchase, or Continue Shopping to
add or remove items.</p>
<?php
} else {
39
echo "<p class="text-warning">Your cart is empty! Please make sure you add some
books in it!</p>";
}
if(isset($conn)){ mysqli_close($conn); }
require_once "./template/footer.php";
?>
RegistrationPage:
<style>
#uni_modal .modal-content>.modal-footer,#uni_modal .modal-content>.modal-header{
display:none;
}
</style>
<div class="container-fluid">
<form action="" id="registration">
<div class="row">
<h3 class="text-center">Create New Account
<span class="float-right">
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</span>
</h3>
<hr>
</div>
<div class="row align-items-center h-100">
40
<div class="col-lg-5 border-right">
<div class="form-group">
<label for="" class="control-label">Firstname</label>
<input type="text" class="form-control form-control-sm form" name="firstname"
required>
</div>
<div class="form-group">
<label for="" class="control-label">Lastname</label>
<input type="text" class="form-control form-control-sm form" name="lastname"
required>
</div>
<div class="form-group">
<label for="" class="control-label">Contact</label>
<input type="text" class="form-control form-control-sm form" name="contact"
required>
</div>
<div class="form-group">
<label for="" class="control-label">Gender</label>
<select name="gender" id="" class="custom-select select" required>
<option>Male</option>
<option>Female</option>
</select>
</div>
41
</div>
<div class="col-lg-7">
<div class="form-group">
<label for="" class="control-label">Default Delivery Address</label>
<textarea class="form-control form" rows='3'
name="default_delivery_address"></textarea>
</div>
<div class="form-group">
<label for="" class="control-label">Email</label>
<input type="text" class="form-control form-control-sm form" name="email" required>
</div>
<div class="form-group">
<label for="" class="control-label">Password</label>
<input type="password" class="form-control form-control-sm form" name="password"
required>
</div>
<div class="form-group d-flex justify-content-between">
<a href="javascript:void()" id="login-show">Already have an Account</a>
<button class="btn btn-primary btn-flat">Register</button>
</div>
</div>
</div>
</form>
</div>
42
<script>
$(function(){
$('#login-show').click(function(){
uni_modal("","login.php")
})
$('#registration').submit(function(e){
e.preventDefault();
start_loader()
if($('.err-msg').length > 0)
$('.err-msg').remove();
$.ajax({
url:_base_url_+"classes/Master.php?f=register",
method:"POST",
data:$(this).serialize(),
dataType:"json",
error:err=>{
console.log(err)
alert_toast("an error occured",'error')
end_loader()
},
success:function(resp){
if(typeof resp == 'object' && resp.status == 'success'){
alert_toast("Account succesfully registered",'success')
setTimeout(function(){
43
location.reload()
},2000)
}else if(resp.status == 'failed' && !!resp.msg){
var _err_el = $('<div>')
_err_el.addClass("alert alert-danger err-msg").text(resp.msg)
$('[name="password"]').after(_err_el)
end_loader()
}else{
console.log(resp)
alert_toast("an error occured",'error')
end_loader()
}
}
})
})
})
</script>
44
SYSTEM TESTING
ProjectImplementation & Testing
At the end of the system design, it is the beginning for the actual coding to develop the proposed
system. During development phase, the table structure of the database will be first built-in order to
provide a suitable data type that suit the system back-end development, system connection and data
transfer. Next, the computer side client program will be developed and follow by will be the web
services that allow mobile phone client program to communicate with the server and lastly mobile
phone side client program will be developed. In testing phase, several test cases will be carrying out
to test the system in order to determine the system reliability and system accuracy. According to the
test cases, a system testing report will be generated for further review to figure out the system
weaknesses and made improvement accordingly. In the deployment phase, several training will be
provided for the particular restaurant staff such as how to operate the system, the procedure of
handling different event and several instructions that need to be follow when operating the system.
Implementation Issues & Challenges
During the system implementation phase, several challenges need to be confronted because it
involves end users to test the production system with various situation. The possible challenges may
face are as following:
User without background
The users are required to have basic knowledge of how to operate a computer system and android
mobile phone in order to use the system. This will be difficulty to give training to the user as the
basic knowledge information can be obtained from internet easily.
The screensize of different device
This would be one of the issues that will encounter while implementing the system. Because user is
able to download the mobile application from the official website and use it as a client device to
place order. Therefore, if the user device screens size are too small or too big. The content and
interface of the application may not consistence.
45
Development Tools
DatabaseEnvironment :
The proposed system will need a database system to support in order to store the huge amount of data.
MySQL database system will be chosen to support the proposed system because it is well-known open
source relational database management system. Other than that, MySQL database system provides
software developer with a client program with easy understanding graphical user interface that can
communicate to the MySQL database server named as MySQL Workbench 6.3 CE. By doing so,
software developer can interact with the database system with the user friendliness client program and
without using the command prompt, at the end it may speed up the development progress.
Web Technology:
The proposed system is a cross platform system, which include Windows desktop client and Android
mobile phone client. Therefore, it require to implement web services in order to support the Android
mobile phone client device to fetch data from the database server and store data back to the database
server. In this project, WampServer is used to support the issue that mention earlier. WampServer is
a Windows web development environment that built-in comes together with the Apache, PHP and
MySQL database. Furthermore, PHP will be the programming language that used to create the web
services that store in the server and it is able to call by the Android mobile phone client to perform
particular task.
System Platform :
The project is a cross platform based system which includes Windows desktop client device and
Android mobile phone client device in order to operate the proposed system
Therefore, IOS mobile phone client device will not compatible with the proposed system.
ProjectManagementTool
For the rule of thumb to develop a system, it requires to have an intact system planning which serve
as a guide line during the development phases. Microsoft Project is a project management software
program and it has been used in the project to design the system planning, project timeline, managing
of resources, tracking development progress and etc.
46
Visual ParadigmCommunity Edition
In this project, Visual Paradigm software has been used to create document for several system planning
diagram such as Use-Case diagram, Activity diagram, Class diagram and etc. By doing so, software
developer are able to visualize the system communicate information much more concisely and clearly.
TestPlan
After the system has been developed, it will move to system testing phase. In system testing phase, the
developed system is required to install on appropriate devices for testing purpose. After the system
installation has been completed, the system testing task will be performed by different roles of user
such as manager role and staff role. The purpose of system testing is to identify and determine the
degree of system stability. At the same time, it is given an opportunity for developer to figure out error
or bug that has not been raise and encounter during the system development phase. Those error or bug
that has been found during the system testing activities will be solved before the system release. Each
and every testing before system testing phases is actually tested by the system developer itself.
Therefore, it might cause some biases toward the testing due to the system developer have knowledge
about the system software logics and lead the result to be inappropriate. There are four types of testing
that will be used to test the developed system which includes unit testing, integration testing, system
testing and acceptance testing.
Unit Testing
First of all, unit testing will be the first testing method that used to test the developed system. It consists
of testing activities that test the system module by module which has not been integrated as a whole.
By doing unit testing, developer are able to identify error and bug easily since it is finding the error
and bug through a unit part of the system rather than finding error through the complete system. In
addition, developer will test the unit part of the system with the validation and the correctness of data
value. Valid and invalid input will be entering to test and ensure the system processes perform with an
expected result.
47
Functional Testing
After conducted the unit testing, functional testing will begin to test the developed system. Functional
testing is performed to verify that the system application processes that perform and functioning
appropriately according to the design specifications. In functional testing, the core system application
functions will be tested with several test cases in order to ensure that the entire system functioning as
a whole and perform task that with the expected results.
Testing
System testing of the software and hardware is a testing conducted on a system which is complete,
integrated system that works as a whole. System testing is a critical testing procedure that must be
conducted by software developer before the system released. During system testing it can evaluate the
system’s compliance with its specified requirements according to the system design. Furthermore,
several testing activities in system testing test not only the design of the system, but also the behavior
and the believed expectations result from the customer. In addition, various complex test cases that
used to test the system are according to the business process requirements which are collected from
the user. Meanwhile, errors or bugs that detected during the testing is required software developer look
into it from the initial step of the business process to the end of the process to ensure it have expected
result in order to solve the errors or bugs to determine the degree of system stability.
Acceptance Testing
Last but not lease, acceptance testing also known as user acceptance testing would be the final testing
procedure that perform to test the developed software system. In acceptance testing, the testing
activities are different compare to the testing activities that mentioned previously because the tester
that tests the system will be the final user which do not have knowledge about the system logic. If the
final user encountered an error while using the system, system developer are required to maintain the
system as soon as possible and release a new patch for the existing system to recover the error.
Meanwhile, final user will use the system that visualized as to support their real business routine
operation, therefore software support team are required to stand by to provide technical support while
final user need any help or support that regarding the system.
If there is no errors detected by the final user while using the system for a long period, the development
job of developer is consider as complete and the system will be a final system pr
48
SNAPSHORTS
Home Page:
Registerpage:
49
 ADD NEW BOOK
 ADMIN LOGIN PAGE
50
 LIST OF PUBLISHERS
 FULL CATALOGS OF BOOKS
51
 CONTACT US PAGE
 MY CART
52
CONCLUSION
After a decade, the advancement and innovation of technology help people to manage their task easily
and efficiently. In many other industry areas have been used management system to assist their
business grow long time ago, therefore it is also a trend that cause F&B industry to make use of a
management system for their business. At the end of this project, the system can reduce and replace
the human manpower task, reduce the time consume for each transaction and generate report for further
management purpose by fully utilizing the system.
Obviously, the propose system can help improve the productivity of the book store and thus directly
did an impact to the profitability of the book store. Furthermore, it can also help bookstore to reduce
the cost of operation in term of manpower, because the system has already facilitated majority of the
business process by using the system. Therefore, it is believed that the system can lead the book store’s
business grow from time to time.
On the other hand, the technology nowadays allows the portability requirement easy to achieve.
Therefore, portability has become one of the factors that have to take into consideration in the system
development process. Because portability brings a lot of benefit to user while they using the system
such as it provides convenience, accessibility, easy to communicate and etc. Hence, portability has
done an impact to the social that everybody is much more preferable to complete their task with
portable device.
In order to fulfil these all requirement, our proposed method is combined the book store which is in
mobile platform into the book store system which is in computer platform. The integration of both
features which develop a system that can let user to have an experience of portability which is user can
process their book ordering through using their smart phone or tablet. Besides, book store manage their
daily operation management through using the computer platform it is because computer have some
other features such as it has a wider screen, other compatible system that can help to manage the book
store and some other driver that needed to communicate with that necessary hardware.
53
References
For PHP
 https://www.w3schools.com/php/default.asp
 https://www.sitepoint.com/php/
 https://www.php.net/
For MySQL
https://www.mysql.com/
http://www.mysqltutorial.org
For XAMPP
https://www.apachefriends.org/download.html

More Related Content

Similar to komala.docx

harachical method clusting in data mining
harachical method clusting in data miningharachical method clusting in data mining
harachical method clusting in data miningdhaliwalharsh055
 
HDFC banking system SRS Document
HDFC banking system  SRS DocumentHDFC banking system  SRS Document
HDFC banking system SRS DocumentNavjeetKajal
 
Book Shop Management System
Book Shop Management SystemBook Shop Management System
Book Shop Management SystemMuhammadRifat12
 
Project Presentation.pptx
Project Presentation.pptxProject Presentation.pptx
Project Presentation.pptxYogendraVerma48
 
ToolsTrade.com Project Final pres
ToolsTrade.com Project Final presToolsTrade.com Project Final pres
ToolsTrade.com Project Final prespurvanahar
 
E-COMMERCE WITH RESPECT TO CAMERA & IT’S.pptx
E-COMMERCE WITH RESPECT TO CAMERA & IT’S.pptxE-COMMERCE WITH RESPECT TO CAMERA & IT’S.pptx
E-COMMERCE WITH RESPECT TO CAMERA & IT’S.pptxAbbasSayyed5
 
Book Selling Website Report
Book Selling Website ReportBook Selling Website Report
Book Selling Website ReportSaloni Bajaj
 
Bank management system
Bank management systemBank management system
Bank management systemsumanadas37
 
B2 b website by we bdevelopment park
B2 b website by we bdevelopment parkB2 b website by we bdevelopment park
B2 b website by we bdevelopment parkArunkhatri87
 
ONLINE SHOPPINGKART FOR WOMENEMPOWERMENT
ONLINE SHOPPINGKART FOR WOMENEMPOWERMENTONLINE SHOPPINGKART FOR WOMENEMPOWERMENT
ONLINE SHOPPINGKART FOR WOMENEMPOWERMENTGuna Santhu
 
e-Commerce Website Development Proposal
e-Commerce Website Development Proposale-Commerce Website Development Proposal
e-Commerce Website Development ProposalIndicsoft Technologies
 
Project Report_Food Bazar_Ver1
Project Report_Food Bazar_Ver1Project Report_Food Bazar_Ver1
Project Report_Food Bazar_Ver1MEGHA JAIN
 
Library manaementreport1
Library manaementreport1Library manaementreport1
Library manaementreport1Rohit Verma
 

Similar to komala.docx (20)

BookStore
BookStoreBookStore
BookStore
 
harachical method clusting in data mining
harachical method clusting in data miningharachical method clusting in data mining
harachical method clusting in data mining
 
HDFC banking system SRS Document
HDFC banking system  SRS DocumentHDFC banking system  SRS Document
HDFC banking system SRS Document
 
Project Documentation
Project DocumentationProject Documentation
Project Documentation
 
Book Shop Management System
Book Shop Management SystemBook Shop Management System
Book Shop Management System
 
Project Presentation.pptx
Project Presentation.pptxProject Presentation.pptx
Project Presentation.pptx
 
power
powerpower
power
 
ToolsTrade.com Project Final pres
ToolsTrade.com Project Final presToolsTrade.com Project Final pres
ToolsTrade.com Project Final pres
 
E-COMMERCE WITH RESPECT TO CAMERA & IT’S.pptx
E-COMMERCE WITH RESPECT TO CAMERA & IT’S.pptxE-COMMERCE WITH RESPECT TO CAMERA & IT’S.pptx
E-COMMERCE WITH RESPECT TO CAMERA & IT’S.pptx
 
Book Selling Website Report
Book Selling Website ReportBook Selling Website Report
Book Selling Website Report
 
Bank management system
Bank management systemBank management system
Bank management system
 
E-commerce Proposal
E-commerce Proposal E-commerce Proposal
E-commerce Proposal
 
Online shopping system.pptx
Online shopping system.pptxOnline shopping system.pptx
Online shopping system.pptx
 
B2 b website by we bdevelopment park
B2 b website by we bdevelopment parkB2 b website by we bdevelopment park
B2 b website by we bdevelopment park
 
ONLINE SHOPPINGKART FOR WOMENEMPOWERMENT
ONLINE SHOPPINGKART FOR WOMENEMPOWERMENTONLINE SHOPPINGKART FOR WOMENEMPOWERMENT
ONLINE SHOPPINGKART FOR WOMENEMPOWERMENT
 
e-Commerce Website Development Proposal
e-Commerce Website Development Proposale-Commerce Website Development Proposal
e-Commerce Website Development Proposal
 
online shopping
online shoppingonline shopping
online shopping
 
Project Report_Food Bazar_Ver1
Project Report_Food Bazar_Ver1Project Report_Food Bazar_Ver1
Project Report_Food Bazar_Ver1
 
Library manaementreport1
Library manaementreport1Library manaementreport1
Library manaementreport1
 
Kamran Ali CV
Kamran Ali CVKamran Ali CV
Kamran Ali CV
 

Recently uploaded

Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphThiyagu K
 
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...anjaliyadav012327
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactPECB
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...fonyou31
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDThiyagu K
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsTechSoup
 
social pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajansocial pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajanpragatimahajan3
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...Sapna Thakur
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docxPoojaSen20
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Disha Kariya
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Celine George
 
9548086042 for call girls in Indira Nagar with room service
9548086042  for call girls in Indira Nagar  with room service9548086042  for call girls in Indira Nagar  with room service
9548086042 for call girls in Indira Nagar with room servicediscovermytutordmt
 

Recently uploaded (20)

Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SD
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
social pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajansocial pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajan
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
 
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 
Advance Mobile Application Development class 07
Advance Mobile Application Development class 07Advance Mobile Application Development class 07
Advance Mobile Application Development class 07
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docx
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
 
9548086042 for call girls in Indira Nagar with room service
9548086042  for call girls in Indira Nagar  with room service9548086042  for call girls in Indira Nagar  with room service
9548086042 for call girls in Indira Nagar with room service
 

komala.docx

  • 1. A Project Report on “ONLINE BOOK STORE” Submitted in partial fulfilment of VI SEMESTER BCA As prescribed by INDIAN ACADEMY DEGREE COLLEGE AUTONOMOUS Developed by KOMALA.L 19IABCA045 Under the guidance of Mrs.Sona.K. V
  • 2. CERTIFICATE This is to certify that the project entitled “ONLINE BOOK STORE”, is a bonafide work done by KOMALA.L (19IABCA045)submitted in partial fulfilment of VI Semester BCA, as prescribed by INDIAN ACADEMY DEGREE COLLEGE AUTONOMOUS, during the academic year 2021-2022. Internal Guide Head of the Department Mrs.Sona.K.V Ms. Anuradha. P External Examiners: 1. 2.
  • 3. DECLARATION We, KOMALA.L (19IABCA045) here by declare that this project work entitled “ONLINE BOOK STORE” is submitted to department of Computer Science, Indian Academy Degree College Autonomous, Bangalore for partial fulfilment of the requirement for the award of Bachelor of Computer Application is a result of original work carried out by ourself. We further declare that we have not submitted this project report either in part or in full to any other university for the award of any Degree. Date: Student Name: Place: KOMAL .L (19IABCA045)
  • 4. ACKNOWLEDGEMENT I would like to express my sincere gratitude to our respected Principal, Dr. Srinidhi K Parthasarathy who gave opportunity to do the project and complete it successfully. I am very much thankful to him. I would like to express my special thanks to our H.O.D (Computer science) Mrs. Anuradha P, for providing constant support and cooperation during the project development. I take this opportunity to express my thanks to our project guide Mrs.Sona.K.Vfor the valuable help and guidance to develop this project. I would also like to thank my parents and friends who helped me a lot in finalizing this project.
  • 5. ABSTRACT The main objective of the project is to create an online book store that allows users to search and purchase a book online based on title, author and subject. The selected books are displayed in a tabular format and the user can order their books online through credit card payment. Using this Website the user can purchase a book online instead of going out to a book store and wasting time. Online Book store is an online web application where the customer can purchase books online. Through a web browser the customers can search for a book by its title or author, later can add to the shopping cart and finally purchase using credit card transaction. The user can login using his account details or new customers can set up an account very quickly. They should give the details of their name, contact number and shipping address. The user can also give feedback to a book by giving ratings on a score of five. The books are divided into many categories based on subject like Software, Database, English, Architecture etc. The Online Book Store Website provides customers with online shopping through a web browser. A customer can, create,sign in to his account, place items into a shopping cart and purchase using his credit card details. The Administrator will have additional functionalities when compared to the common user. He can add, delete and update the book details, book categories, member information and also confirm a placed order.
  • 6. CONTENT SL.NO PARTICULARS PAGE NO 1. INTRODUCTION 1 2. OBJECTIVE 1 3. PROPOSED SYSTEM 2 4. SYSTEM REQUIREMENTS 4 5. SYSTEM DESIGN 5 6. DATA FLOW DIAGRAM 9 7. E-R DIAGRAM 14 8. DATABASE DESIGN 17 9. CODING 23 10. SYSTEM TESTING 35 11. PROJECTOUTPUT 40 12. CONCLUSION 54 13. REFERENCE 55
  • 7. 1 INTRODUCTION The main objective of the project is to create an online book store that allows users to search and purchase a book based on title, author and subject. The selected books are displayed in a tabular format and the user can order their books online through cash on delivery and PayPal. The Administrator will have additional functionalities when compared to the common user. The motivation to create this project has many sources: • Interest to develop a good user-friendly website with many online transactions using a database. • To increase my knowledge horizon in technologies like PHP, SQL, CSS, HTML. • To gain good experience in PHP before joining in a full-time job. OBJECTIVE: My objective is to design such an application using which one can say 'goodbye' to the days when you stood in line waiting, and waiting some more for a store clerk to finally check out your items. Online shopping transactions occur instantly-saving you time to get your other errands done! Additionally, unlike a store, online shopping has friendly customer service representatives available 24 hours a day, 7 days a week to assist you with locating, purchasing and shipping your merchandise. My main aim is to design such a book store where customer can visit our site anytime of the day from anywhere to view the available books, choose any of them and can order by paying online or can opt for cash on delivery as well. The administrator will regularly add any new books available to them for sale. The administrator will take books from the reputed publishers and vendors only.
  • 8. 2 PROPOSED SYSTEM: This online application enables the end users to register online, select the book from the book shop, read the list and order book online. By just selecting the book that the user wants to have. The results after selecting the book from the book list will directly appear in the screen of the online book store admin. By using this application, the work is reduced and we can also say that the work is nullified. The administrator will regularly add any new books available to them for sale. The user will be given a username and a password to login. Modules: Administrator module Customer Module Administrator module Admin can view all the information about the user edit the all details about the customer.  Create book category  Manage book categories  Add book  Manage book  Manage user order Customer Module This Functionalities provided:  View product’s list  Register  Place orders
  • 9. 3 Admin Module 1. Dashboard: In this section admin can see all detail in brief like total order, confirmed order, and Total user. 2. Reg Users: In this section admin can manage register user (view/update). 3. Book Category: In this section admin can manage book category (Add and Update). 4. Book Menu: In this section admin can manage book menu (Add and Update). 5. Orders: In this section admin can view the book order details and they have also right to change order status according to current status. 6. Search Order: In this section admin can search particular order with the help of order number. 7. Reports: In this section admin can view order details, order counts and sales report according to dates. Admin can also update his profile, change password and recover password. User Module 1.Book Menu: In this section user can view which book available in book store. 2. My Accounts: In this section user can his/her password, view and update his/her profile and logout from accounts. 3.My orders: In this section user can view order history after login. 4. Cart: In this section user can add their book which he/her want to order. 5. User has also a facility to cancel order if he/her wants to cancel. Brief Information about homepage In this page guest user (user which not registered) can view online book store menu, search book according book name and guest user can also sign up in online book store and registered user can sign in. User can also track their order without login.
  • 10. 4 SYSTEM REQUIREMENTS Hardware Requirement:  Hardware - Pentium  Speed - 1.1 GHz  RAM - 1GB  Hard Disk - 20 GB  Key Board - Standard Windows Keyboard  Mouse - Two or Three Button Mouse  Monitor - SVGA Software Requirements:  Operating System : Windows / Linux / Mac  Technology : PHP  Web Technologies : Html, JavaScript, CSS  IDE : Notepad++  Web Server : WAMP / XAMPP / LAMP / MAMP (any one)  Database : My SQL
  • 11. 5 SYSTEM DESIGN INTRODUCTION: Design is the first step in the development phase for any techniques and principles for the purpose of defining a device, a process or system in sufficient detail to permit its physical realization. Once the software requirements have been analysed and specified the software design involves three technical activities - design, coding, implementation and testing that are required to build and verify the software. The design activities are of main importance in this phase, because in this activity, decisions ultimately affecting the success of the software implementation and its ease of maintenance are made. These decisions have the final bearing upon reliability and maintainability of the system. Design is the only way to accurately translate the customer’s requirements into finished software or a system. Design is the place where quality is fostered in development. Software design is a process through which requirements are translated into a representation of software. Software design is conducted in two steps. Preliminary design is concerned with the transformation of requirements into data. UML Diagrams: Actor: A coherent set of roles that users of use cases play when interacting with the use `cases. Use case: A description of sequence of actions, including variants, that a system performs that yields an observable result of value of an actor. UML stands for Unified Modelling Language. UML is a language for specifying, visualizing and documenting the system. This is the step while developing any product after analysis. The goal from this is to produce a model of the entities involved in the project which later need to be built. The representation of the entities that are to be used in the product being developed need to be designed.
  • 12. 6 There are various kinds of methods in software design: They are as follows:  Use case Diagram  Sequence Diagram  Collaboration Diagram  Activity Diagram  State chat Diagram USECASE DIAGRAMS: Use case diagrams model behaviour within a system and helps the developers understand of what the user require. The stick man represents what’s called an actor. Use case diagram can be useful for getting an overall view of the system and clarifying who can do and more importantly what they can’t do. Use case diagram consists of use cases and actors and shows the interaction between the use case and actors.  The purpose is to show the interactions between the use case and actor.  To represent the system requirements from user’s perspective.  An actor could be the end-user of the system or an external system. USECASE DIAGRAM: A Use case is a description of set of sequence of actions. Graphically it is rendered as an ellipse with solid line including only its name. Use case diagram is a behavioral diagram that shows a set of use cases and actors and their relationship. It is an association between the use cases and actors. An actor represents a real-world object. Primary Actor – Sender, Secondary Actor Receiver.
  • 13. 7 Admin Use Case Diagram: Admin Dashboard Manage Registered Users Manage Book Categories Add / update Manage Book Menu Add/ Update Order Management Report Generation Update Profile Change Password
  • 14. 8 User Use Case Diagram : User DATA FLOW DIAGRAM Signup Sign in Place order Order Tracking Change Password Update Profile
  • 15. 9 The Data Flow Diagram shows the flow of data or information. It can be partitioned into single processes or functions. Data Flow Diagrams can be grouped together or decomposed into multiple processes. There can be physical DFD's that represent the physical files and transactions, or they can be business DFD's (logical, or conceptual). When it's used? The DFD is an excellent communication tool for analysts to model processes and functional requirements. One of the primary tools of the structured analysis efforts of the 1970's it was developed and enhanced by the likes of Yourdon, McMenamin, Palmer, Gane and Sarson. It is still considered one of the best modeling techniques for eliciting and representing the processing requirements of a system. Used effectively, it is a useful and easy to understand modeling tool. It has broad application and usability across most software development projects. It is easily integrated with data modeling, workflow modeling tools, and textual specs. Together with these, it provides analysts and developers with solid models and specs. Alone, however, it has limited usability. It is simple and easy to understand by users and can be easily extended and refined with further specification into a physical version for the design and development teams. The different versions are Context Diagrams (Level 0), Partitioned Diagrams (single process only -- one level), functionally decomposed, leveled sets of Data Flow Diagrams. Data Store It is a repository of information. In the physical model, this represents a file, table, etc. In the logical model, a data store is an object or entity. DataFlows DFDs show the flow of data from external entities into the system, showed how the data moved from one process to another, as well as its logical storage. There are only four symbols:  Squares representing external entities, which are sources or destinations of data.
  • 16. 10  Rounded rectangles representing processes, which take data as input, do something to it, and output it.  Arrows representing the data flows, which can either, be electronic data or physical items.  Open-ended rectangles representing data stores, including electronic stores such as databases or XML files and physical stores such as or filing cabinets or stacks of paper. There are several common modeling rules for creating DFDs:  All processes must have at least one data flow in and one data flow out.  All processes should modify the incoming data, producing new forms of outgoing data.  Each data store must be involved with at least one data flow.  Each external entity must be involved with at least one data flow.  A data flow must be attached to at least one process. DFDs are nothing more than a network of related system functions and indicate from where information is received and to where it is sent. It is the starting point in the system that decomposes the requirement specifications down to the lowest level detail. The four symbols in DFD, each of which has its meaning. They are given below:  External entities are outside to system but they either supply input data in the system or use the system output. These are represented by square of rectangle. External entities that supply data into a system are sometimes called Sources. External entities that use system data are sometimes called sinks.  Dataflow models that passages of data in the system and are represented by line by joining system components. An arrow indicates the direction of the flow and the line is labeled by the name of the dataflow.  Process show that the systems do. Each process has one or more data inputs and one or data outputs. Circles in DFD represent them. Each high level process may be consisting of more than one lower level processes. Process will be expanded in sequent level DFD. A circle or a bubble represents a process that transforms incoming data flow into outgoing dataflow. The high level processes in a system are:
  • 17. 11  Receivable process.  Verifiable process.  Disposal process.  File or data store is a repository of data. They contain data that is retained in the system. Process can enter data into data store or retrieved data from the data store. An open rectangle is a data store, data at rest.  0-Level DFD:  DFD for Admin Process Order receipt& confirmation Books & other details CONTEXT DTAGRAM Personal Details & Select product Order & reports User Admin Online Book Store Data 1.0 Admin Process Admin Status Book Product Product Order Store Access process Reviews
  • 18. 12  DFD For User Registration and Profile Update Enter data View Profile Edit data User Details Register User Registration Process 2.0 status Profile Update 2.1 User Updates
  • 19. 13    DFD for shopping and checkout process order Details Confirmation & receipt confirms Cart Details Place Order Selected Product Book info Login User Select Product 3.0 Add to Cart 3.1 Checkout 3.2 Order Book Cart User
  • 20. 14 E-R Diagrams: The Entity-Relationship (ER) model was originally proposed by Peter in 1976 [Chen76] as a way to unify the network and relational database views. Simply stated the ER model is a conceptual data model that views the real world as entities and relationships. A basic component of the model is the Entity-Relationship diagram which is used to visually represents data objects. Since Chen wrote his paper the model has been extended and today it is commonly used for database design for the database designer, the utility of the ER model is:  it maps well to the relational model. The constructs used in the ER model can easily be transformed into relational tables.  it is simple and easy to understand with a minimum of training. Therefore, the model can be used by the database designer to communicate the design to the end user.  In addition, the model can be used as a design plan by the database developer to implement a data model in a specific database management software. Connectivity and Cardinality The basic types of connectivity for relations are: one-to-one, one-to-many, and many-to-many. A one- to-one (1:1) relationship is when at most one instance of a entity A is associated with one instance of entity B. For example, "employees in the company are each assigned their own office. For each employee there exists a unique office and for each office there exists a unique employee. A one-to-many (1: N) relationships is when for one instance of entity A, there are zero, one, or many instances of entity B, but for one instance of entity B, there is only one instance of entity A. An example of a 1: N relationships is a department has many employees each employee is assigned to one department /A many-to-many (M: N) relationship, sometimes called non-specific, is when for one instance of entity A, there are zero, one, or many instances of entity B and for one instance of entity B there are zero, one, or many instances of entity A. The connectivity of a relationship describes the mapping of associated
  • 21. 15 ER Notation There is no standard for representing data objects in ER diagrams. Each modeling methodology uses its own notation. The original notation used by Chen is widely used in academics texts and journals but rarely seen in either CASE tools or publications by non-academics. Today, there are a number of notations used, among the more common are Bachman, crow's foot, and IDEFIX. All notational styles represent entities as rectangular boxes and relationships as lines connecting boxes. Each style uses a special set of symbols to represent the cardinality of a connection. The notation used in this document is from Martin. The symbols used for the basic ER constructs are:  Entities are represented by labelled rectangles. The label is the name of the entity. Entity names should be singular nouns.  Relationships are represented by a solid line connecting two entities. The name of the relationship is written above the line. Relationship names should be verbs  Attributes, when included, are listed inside the entity rectangle. Attributes which are identifiers are underlined. Attribute names should be singular nouns.  Cardinality of many is represented by a line ending in a crow's foot. If the crow's foot is omitted, the cardinality is one.  Existence is represented by placing a circle or a perpendicular bar on the line. Mandatory existence is shown by the bar (looks like a 1) next to the entity for an instance is required. Optional existence is shown by placing a circle next to the entity that is optional.
  • 23. 17 DATABASE DESIGN The data in the system has to be stored and retrieved from database. Designing the database is part of system design. Data elements and data structures to be stored have been identified at analysis stage. They are structured and put together to design the data storage and retrieval system. A database is a collection of interrelated data stored with minimum redundancy to serve many users quickly and efficiently. The general objective is to make database access easy, quick, inexpensive and flexible for the user. Relationships are established between the data items and unnecessary data items are removed. Normalization is done to get an internal consistency of data and to have minimum redundancy and maximum stability. This ensures minimizing data storage required, minimizing chances of data inconsistencies and optimizing for updates. The MS Access database has been chosen for developing the relevant databases. Online Book Store contains 10 MySQL tables: users: This table stores the user and admin details.
  • 24. 18 cart: This table stores the details of cart. categories: This table stores the categories details.
  • 25. 19 client: This table stores the client details. Inventory: This table stores the inventory details. Order: This table stores the order details.
  • 26. 20 Order_list: This table stores the order_list details. product: This table stores the product details.
  • 27. 21 sub_ categories: This table stores the sub_categories details. system: This table stores the system details.
  • 28. 22
  • 29. 23 CODING Home Page: <!-- Header--> <header class="bg-dark py-5" id="main-header"> <div class="container px-4 px-lg-5 my-5"> <div class="text-center text-white"> <h1 class="display-4 fw-bolder">If you want to make intelligent, get books from here.</h1> <p class="lead fw-normal text-white-50 mb-0">Shop Now!</p> </div> </div> </header> <!-- Section--> <style> .book-cover{ object-fit:contain !important; height:auto !important; } </style> <section class="py-5"> <div class="container px-4 px-lg-5 mt-5"> <div class="row gx-4 gx-lg-5 row-cols-md-3 row-cols-xl-4 justify-content-center"> <?php $products = $conn->query("SELECT * FROM `products` where status = 1 order by rand() limit 8 "); while($row = $products->fetch_assoc()): $upload_path = base_app.'/uploads/product_'.$row['id']; $img = ""; if(is_dir($upload_path)){ $fileO = scandir($upload_path); if(isset($fileO[2]))
  • 30. 24 $img = "uploads/product_".$row['id']."/".$fileO[2]; // var_dump($fileO); } foreach($row as $k=> $v){ $row[$k] = trim(stripslashes($v)); } $inventory = $conn->query("SELECT * FROM inventory where product_id = ".$row['id']); $inv = array(); while($ir = $inventory->fetch_assoc()){ $inv[] = number_format($ir['price']); } ?> <div class="col mb-5"> <div class="card product-item"> <!-- Product image--> <img class="card-img-top w-100 book-cover" src="<?php echo validate_image($img) ?>" alt="..." /> <!-- Product details--> <div class="card-body p-4"> <div class=""> <!-- Product name--> <h5 class="fw-bolder"><?php echo $row['title'] ?></h5> <!-- Product price--> <?php foreach($inv as $k=> $v): ?> <span><b>Price: </b><?php echo $v ?></span> <?php endforeach; ?> </div> <p class="m-0"><small>By: <?php echo $row['author'] ?></small></p> </div> <!-- Product actions-->
  • 31. 25 <div class="card-footer p-4 pt-0 border-top-0 bg-transparent"> <div class="text-center"> <a class="btn btn-flat btn-primary " href=".?p=view_product&id=<?php echo md5($row['id']) ?>">View</a> </div> </div> </div> </div> <?php endwhile; ?> </div> </div> </section> CODING FOR INDEX: <?php session_start(); $count = 0; // connecto database $title = "Index"; require_once "./template/header.php"; require_once "./functions/database_functions.php"; $conn = db_connect(); $row = select4LatestBook($conn); ?> <!-- Example row of columns --> <p class="lead text-center text-muted">Latest books</p> <div class="row"> <?php foreach($row as $book) { ?> <div class="col-md-3"> <a href="book.php?bookisbn=<?php echo $book['book_isbn']; ?>">
  • 32. 26 <img class="img-responsive img-thumbnail" src="./bootstrap/img/<?php echo $book['book_image']; ?>"> </a> </div> <?php } ?> </div> <?php if(isset($conn)) {mysqli_close($conn);} require_once "./template/footer.php"; ?> CODING FOR CONTACT: <?php $title = "Contact"; require_once "./template/header.php"; ?> <div class="row"> <div class="col-md-3"></div> <div class="col-md-6 text-center"> <form class="form-horizontal"> <fieldset> <legend>Contact</legend> <p class="lead">I’d love to hear from you! Complete the form to send me an email.</p> <div class="form-group"> <label for="inputName" class="col-lg-2 control- label">Name</label> <div class="col-lg-10"> <input type="text" class="form-control" id="inputName" placeholder="Name"> </div> </div> <div class="form-group">
  • 33. 27 <label for="inputEmail" class="col-lg-2 control- label">Email</label> <div class="col-lg-10"> <input type="text" class="form-control" id="inputEmail" placeholder="Email"> </div> </div> <div class="form-group"> <label for="textArea" class="col-lg-2 control- label">Textarea</label> <div class="col-lg-10"> <textarea class="form-control" rows="3" id="textArea"></textarea> <span class="help-block">A longer block of help text that breaks onto a new line and may extend beyond one line.</span> </div> </div> <div class="form-group"> <div class="col-lg-10 col-lg-offset-2"> <button type="reset" class="btn btn-default">Cancel</button> <button type="submit" class="btn btn- primary">Submit</button> </div> </div> </fieldset> </form> </div> <div class="col-md-3"></div> </div> <?php require_once "./template/footer.php"; ?>
  • 34. 28 Login page: <style> #uni_modal .modal-content>.modal-footer,#uni_modal .modal-content>.modal-header{ display:none; } </style> <div class="container-fluid"> <div class="row"> <h3 class="float-right"> <button type="button" class="close" data-dismiss="modal" aria-label="Close"> <span aria-hidden="true">&times;</span> </button> </h3> <div class="col-lg-12"> <h3 class="text-center">Login</h3> <hr> <form action="" id="login-form"> <div class="form-group"> <label for="" class="control-label">Email</label> <input type="email" class="form-control form" name="email" required> </div> <div class="form-group"> <label for="" class="control-label">Password</label> <input type="password" class="form-control form" name="password" required> </div> <div class="form-group d-flex justify-content-between"> <a href="javascript:void()" id="create_account">Create Account</a> <button class="btn btn-primary btn-flat">Login</button>
  • 36. 30 },2000) }else if(resp.status == 'incorrect'){ var _err_el = $('<div>') _err_el.addClass("alert alert-danger err-msg").text("Incorrect Credentials.") $('#login-form').prepend(_err_el) end_loader() }else{ console.log(resp) alert_toast("an error occured",'error') end_loader() } } }) }) }) </script> CODING FOR EDIT BOOKS: <?php // if save change happen if(!isset($_POST['save_change'])){ echo "Something wrong!"; exit; } $isbn = trim($_POST['isbn']); $title = trim($_POST['title']); $author = trim($_POST['author']); $descr = trim($_POST['descr']); $price = floatval(trim($_POST['price']));
  • 37. 31 $publisher = trim($_POST['publisher']); if(isset($_FILES['image']) && $_FILES['image']['name'] != ""){ $image = $_FILES['image']['name']; $directory_self = str_replace(basename($_SERVER['PHP_SELF']), '', $_SERVER['PHP_SELF']); $uploadDirectory = $_SERVER['DOCUMENT_ROOT'] . $directory_self . "bootstrap/img/"; $uploadDirectory .= $image; move_uploaded_file($_FILES['image']['tmp_name'], $uploadDirectory); } require_once("./functions/database_functions.php"); $conn = db_connect(); // if publisher is not in db, create new $findPub = "SELECT * FROM publisher WHERE publisher_name = '$publisher'"; $findResult = mysqli_query($conn, $findPub); if(!$findResult){ // insert into publisher table and return id $insertPub = "INSERT INTO publisher(publisher_name) VALUES ('$publisher')"; $insertResult = mysqli_query($conn, $insertPub); if(!$insertResult){ echo "Can't add new publisher " . mysqli_error($conn); exit; } } $query = "UPDATE books SET book_title = '$title',
  • 38. 32 book_author = '$author', book_descr = '$descr', book_price = '$price'"; if(isset($image)){ $query .= ", book_image='$image' WHERE book_isbn = '$isbn'"; } else { $query .= " WHERE book_isbn = '$isbn'"; } // two cases for fie , if file submit is on => change a lot $result = mysqli_query($conn, $query); if(!$result){ echo "Can't update data " . mysqli_error($conn); exit; } else { header("Location: admin_edit.php?bookisbn=$isbn"); } ?> View_Categoriespage: <?php $title = "All Book Categories"; $sub_title = ""; if(isset($_GET['c']) && isset($_GET['s'])){ $cat_qry = $conn->query("SELECT * FROM categories where md5(id) = '{$_GET['c']}'"); if($cat_qry->num_rows > 0){ $title = $cat_qry->fetch_assoc()['category']; } $sub_cat_qry = $conn->query("SELECT * FROM sub_categories where md5(id) = '{$_GET['s']}'"); if($sub_cat_qry->num_rows > 0){ $sub_title = $sub_cat_qry->fetch_assoc()['sub_category'];
  • 39. 33 } } elseif(isset($_GET['c'])){ $cat_qry = $conn->query("SELECT * FROM categories where md5(id) = '{$_GET['c']}'"); if($cat_qry->num_rows > 0){ $title = $cat_qry->fetch_assoc()['category']; } } elseif(isset($_GET['s'])){ $sub_cat_qry = $conn->query("SELECT * FROM sub_categories where md5(id) = '{$_GET['s']}'"); if($sub_cat_qry->num_rows > 0){ $title = $sub_cat_qry->fetch_assoc()['sub_category']; } } ?> <!-- Header--> <header class="bg-dark py-5" id="main-header"> <div class="container px-4 px-lg-5 my-5"> <div class="text-center text-white"> <h1 class="display-4 fw-bolder"><?php echo $title ?></h1> <p class="lead fw-normal text-white-50 mb-0"><?php echo $sub_title ?></p> </div> </div> </header> <!-- Section--> <section class="py-5"> <div class="container px-4 px-lg-5 mt-5"> <div class="row gx-2 gx-lg-5 row-cols-1 row-cols-md-2 row-cols-xl-2 justify-content-center">
  • 40. 34 <?php $whereData = ""; $categories = $conn->query("SELECT * FROM `categories` where status = 1 order by category asc "); while($row = $categories->fetch_assoc()): foreach($row as $k=> $v){ $row[$k] = trim(stripslashes($v)); } $row['description'] = strip_tags(stripslashes(html_entity_decode($row['description']))); ?> <div class="col mb-6 mb-2"> <a href="./?p=products&c=<?php echo md5($row['id']) ?>" class="card category-item text-dark"> <div class="card-body p-4"> <div class=""> <!-- Product name--> <h5 class="fw-bolder border-bottom border-primary"><?php echo $row['category'] ?></h5> </div> <p class="m-0 truncate"><?php echo $row['description'] ?></p> </div> </a> </div> <?php endwhile; ?> </div> </div> </section> CODING FOR REGISTATION: <?php
  • 41. 35 session_start(); $_SESSION['err'] = 1; foreach($_POST as $key => $value){ if(trim($value) == ''){ $_SESSION['err'] = 0; } break; } if($_SESSION['err'] == 0){ header("Location: checkout.php"); } else { unset($_SESSION['err']); } $_SESSION['ship'] = array(); foreach($_POST as $key => $value){ if($key != "submit"){ $_SESSION['ship'][$key] = $value; } } require_once "./functions/database_functions.php"; // print out header here $title = "Purchase"; require "./template/header.php"; // connect database if(isset($_SESSION['cart']) && (array_count_values($_SESSION['cart']))){ ?>
  • 42. 36 <table class="table"> <tr> <th>Item</th> <th>Price</th> <th>Quantity</th> <th>Total</th> </tr> <?php foreach($_SESSION['cart'] as $isbn => $qty){ $conn = db_connect(); $book = mysqli_fetch_assoc(getBookByIsbn($conn, $isbn)); ?> <tr> <td><?php echo $book['book_title'] . " by " . $book['book_author']; ?></td> <td><?php echo "$" . $book['book_price']; ?></td> <td><?php echo $qty; ?></td> <td><?php echo "$" . $qty * $book['book_price']; ?></td> </tr> <?php } ?> <tr> <th>&nbsp;</th> <th>&nbsp;</th> <th><?php echo $_SESSION['total_items']; ?></th> <th><?php echo "$" . $_SESSION['total_price']; ?></th> </tr> <tr> <td>Shipping</td> <td>&nbsp;</td> <td>&nbsp;</td>
  • 43. 37 <td>20.00</td> </tr> <tr> <th>Total Including Shipping</th> <th>&nbsp;</th> <th>&nbsp;</th> <th><?php echo "$" . ($_SESSION['total_price'] + 20); ?></th> </tr> </table> <form method="post" action="process.php" class="form-horizontal"> <?php if(isset($_SESSION['err']) && $_SESSION['err'] == 1){ ?> <p class="text-danger">All fields have to be filled</p> <?php } ?> <div class="form-group"> <label for="card_type" class="col-lg-2 control-label">Type</label> <div class="col-lg-10"> <select class="form-control" name="card_type"> <option value="VISA">VISA</option> <option value="MasterCard">MasterCard</option> <option value="American Express">American Express</option> </select> </div> </div> <div class="form-group"> <label for="card_number" class="col-lg-2 control-label">Number</label> <div class="col-lg-10"> <input type="text" class="form-control" name="card_number"> </div> </div>
  • 44. 38 <div class="form-group"> <label for="card_PID" class="col-lg-2 control-label">PID</label> <div class="col-lg-10"> <input type="text" class="form-control" name="card_PID"> </div> </div> <div class="form-group"> <label for="card_expire" class="col-lg-2 control-label">Expiry Date</label> <div class="col-lg-10"> <input type="date" name="card_expire" class="form-control"> </div> </div> <div class="form-group"> <label for="card_owner" class="col-lg-2 control-label">Name</label> <div class="col-lg-10"> <input type="text" class="form-control" name="card_owner"> </div> </div> <div class="form-group"> <div class="col-lg-10 col-lg-offset-2"> <button type="reset" class="btn btn-default">Cancel</button> <button type="submit" class="btn btn-primary">Purchase</button> </div> </div> </form> <p class="lead">Please press Purchase to confirm your purchase, or Continue Shopping to add or remove items.</p> <?php } else {
  • 45. 39 echo "<p class="text-warning">Your cart is empty! Please make sure you add some books in it!</p>"; } if(isset($conn)){ mysqli_close($conn); } require_once "./template/footer.php"; ?> RegistrationPage: <style> #uni_modal .modal-content>.modal-footer,#uni_modal .modal-content>.modal-header{ display:none; } </style> <div class="container-fluid"> <form action="" id="registration"> <div class="row"> <h3 class="text-center">Create New Account <span class="float-right"> <button type="button" class="close" data-dismiss="modal" aria-label="Close"> <span aria-hidden="true">&times;</span> </button> </span> </h3> <hr> </div> <div class="row align-items-center h-100">
  • 46. 40 <div class="col-lg-5 border-right"> <div class="form-group"> <label for="" class="control-label">Firstname</label> <input type="text" class="form-control form-control-sm form" name="firstname" required> </div> <div class="form-group"> <label for="" class="control-label">Lastname</label> <input type="text" class="form-control form-control-sm form" name="lastname" required> </div> <div class="form-group"> <label for="" class="control-label">Contact</label> <input type="text" class="form-control form-control-sm form" name="contact" required> </div> <div class="form-group"> <label for="" class="control-label">Gender</label> <select name="gender" id="" class="custom-select select" required> <option>Male</option> <option>Female</option> </select> </div>
  • 47. 41 </div> <div class="col-lg-7"> <div class="form-group"> <label for="" class="control-label">Default Delivery Address</label> <textarea class="form-control form" rows='3' name="default_delivery_address"></textarea> </div> <div class="form-group"> <label for="" class="control-label">Email</label> <input type="text" class="form-control form-control-sm form" name="email" required> </div> <div class="form-group"> <label for="" class="control-label">Password</label> <input type="password" class="form-control form-control-sm form" name="password" required> </div> <div class="form-group d-flex justify-content-between"> <a href="javascript:void()" id="login-show">Already have an Account</a> <button class="btn btn-primary btn-flat">Register</button> </div> </div> </div> </form> </div>
  • 49. 43 location.reload() },2000) }else if(resp.status == 'failed' && !!resp.msg){ var _err_el = $('<div>') _err_el.addClass("alert alert-danger err-msg").text(resp.msg) $('[name="password"]').after(_err_el) end_loader() }else{ console.log(resp) alert_toast("an error occured",'error') end_loader() } } }) }) }) </script>
  • 50. 44 SYSTEM TESTING ProjectImplementation & Testing At the end of the system design, it is the beginning for the actual coding to develop the proposed system. During development phase, the table structure of the database will be first built-in order to provide a suitable data type that suit the system back-end development, system connection and data transfer. Next, the computer side client program will be developed and follow by will be the web services that allow mobile phone client program to communicate with the server and lastly mobile phone side client program will be developed. In testing phase, several test cases will be carrying out to test the system in order to determine the system reliability and system accuracy. According to the test cases, a system testing report will be generated for further review to figure out the system weaknesses and made improvement accordingly. In the deployment phase, several training will be provided for the particular restaurant staff such as how to operate the system, the procedure of handling different event and several instructions that need to be follow when operating the system. Implementation Issues & Challenges During the system implementation phase, several challenges need to be confronted because it involves end users to test the production system with various situation. The possible challenges may face are as following: User without background The users are required to have basic knowledge of how to operate a computer system and android mobile phone in order to use the system. This will be difficulty to give training to the user as the basic knowledge information can be obtained from internet easily. The screensize of different device This would be one of the issues that will encounter while implementing the system. Because user is able to download the mobile application from the official website and use it as a client device to place order. Therefore, if the user device screens size are too small or too big. The content and interface of the application may not consistence.
  • 51. 45 Development Tools DatabaseEnvironment : The proposed system will need a database system to support in order to store the huge amount of data. MySQL database system will be chosen to support the proposed system because it is well-known open source relational database management system. Other than that, MySQL database system provides software developer with a client program with easy understanding graphical user interface that can communicate to the MySQL database server named as MySQL Workbench 6.3 CE. By doing so, software developer can interact with the database system with the user friendliness client program and without using the command prompt, at the end it may speed up the development progress. Web Technology: The proposed system is a cross platform system, which include Windows desktop client and Android mobile phone client. Therefore, it require to implement web services in order to support the Android mobile phone client device to fetch data from the database server and store data back to the database server. In this project, WampServer is used to support the issue that mention earlier. WampServer is a Windows web development environment that built-in comes together with the Apache, PHP and MySQL database. Furthermore, PHP will be the programming language that used to create the web services that store in the server and it is able to call by the Android mobile phone client to perform particular task. System Platform : The project is a cross platform based system which includes Windows desktop client device and Android mobile phone client device in order to operate the proposed system Therefore, IOS mobile phone client device will not compatible with the proposed system. ProjectManagementTool For the rule of thumb to develop a system, it requires to have an intact system planning which serve as a guide line during the development phases. Microsoft Project is a project management software program and it has been used in the project to design the system planning, project timeline, managing of resources, tracking development progress and etc.
  • 52. 46 Visual ParadigmCommunity Edition In this project, Visual Paradigm software has been used to create document for several system planning diagram such as Use-Case diagram, Activity diagram, Class diagram and etc. By doing so, software developer are able to visualize the system communicate information much more concisely and clearly. TestPlan After the system has been developed, it will move to system testing phase. In system testing phase, the developed system is required to install on appropriate devices for testing purpose. After the system installation has been completed, the system testing task will be performed by different roles of user such as manager role and staff role. The purpose of system testing is to identify and determine the degree of system stability. At the same time, it is given an opportunity for developer to figure out error or bug that has not been raise and encounter during the system development phase. Those error or bug that has been found during the system testing activities will be solved before the system release. Each and every testing before system testing phases is actually tested by the system developer itself. Therefore, it might cause some biases toward the testing due to the system developer have knowledge about the system software logics and lead the result to be inappropriate. There are four types of testing that will be used to test the developed system which includes unit testing, integration testing, system testing and acceptance testing. Unit Testing First of all, unit testing will be the first testing method that used to test the developed system. It consists of testing activities that test the system module by module which has not been integrated as a whole. By doing unit testing, developer are able to identify error and bug easily since it is finding the error and bug through a unit part of the system rather than finding error through the complete system. In addition, developer will test the unit part of the system with the validation and the correctness of data value. Valid and invalid input will be entering to test and ensure the system processes perform with an expected result.
  • 53. 47 Functional Testing After conducted the unit testing, functional testing will begin to test the developed system. Functional testing is performed to verify that the system application processes that perform and functioning appropriately according to the design specifications. In functional testing, the core system application functions will be tested with several test cases in order to ensure that the entire system functioning as a whole and perform task that with the expected results. Testing System testing of the software and hardware is a testing conducted on a system which is complete, integrated system that works as a whole. System testing is a critical testing procedure that must be conducted by software developer before the system released. During system testing it can evaluate the system’s compliance with its specified requirements according to the system design. Furthermore, several testing activities in system testing test not only the design of the system, but also the behavior and the believed expectations result from the customer. In addition, various complex test cases that used to test the system are according to the business process requirements which are collected from the user. Meanwhile, errors or bugs that detected during the testing is required software developer look into it from the initial step of the business process to the end of the process to ensure it have expected result in order to solve the errors or bugs to determine the degree of system stability. Acceptance Testing Last but not lease, acceptance testing also known as user acceptance testing would be the final testing procedure that perform to test the developed software system. In acceptance testing, the testing activities are different compare to the testing activities that mentioned previously because the tester that tests the system will be the final user which do not have knowledge about the system logic. If the final user encountered an error while using the system, system developer are required to maintain the system as soon as possible and release a new patch for the existing system to recover the error. Meanwhile, final user will use the system that visualized as to support their real business routine operation, therefore software support team are required to stand by to provide technical support while final user need any help or support that regarding the system. If there is no errors detected by the final user while using the system for a long period, the development job of developer is consider as complete and the system will be a final system pr
  • 55. 49  ADD NEW BOOK  ADMIN LOGIN PAGE
  • 56. 50  LIST OF PUBLISHERS  FULL CATALOGS OF BOOKS
  • 57. 51  CONTACT US PAGE  MY CART
  • 58. 52 CONCLUSION After a decade, the advancement and innovation of technology help people to manage their task easily and efficiently. In many other industry areas have been used management system to assist their business grow long time ago, therefore it is also a trend that cause F&B industry to make use of a management system for their business. At the end of this project, the system can reduce and replace the human manpower task, reduce the time consume for each transaction and generate report for further management purpose by fully utilizing the system. Obviously, the propose system can help improve the productivity of the book store and thus directly did an impact to the profitability of the book store. Furthermore, it can also help bookstore to reduce the cost of operation in term of manpower, because the system has already facilitated majority of the business process by using the system. Therefore, it is believed that the system can lead the book store’s business grow from time to time. On the other hand, the technology nowadays allows the portability requirement easy to achieve. Therefore, portability has become one of the factors that have to take into consideration in the system development process. Because portability brings a lot of benefit to user while they using the system such as it provides convenience, accessibility, easy to communicate and etc. Hence, portability has done an impact to the social that everybody is much more preferable to complete their task with portable device. In order to fulfil these all requirement, our proposed method is combined the book store which is in mobile platform into the book store system which is in computer platform. The integration of both features which develop a system that can let user to have an experience of portability which is user can process their book ordering through using their smart phone or tablet. Besides, book store manage their daily operation management through using the computer platform it is because computer have some other features such as it has a wider screen, other compatible system that can help to manage the book store and some other driver that needed to communicate with that necessary hardware.
  • 59. 53 References For PHP  https://www.w3schools.com/php/default.asp  https://www.sitepoint.com/php/  https://www.php.net/ For MySQL https://www.mysql.com/ http://www.mysqltutorial.org For XAMPP https://www.apachefriends.org/download.html