Online Book

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 117

ABSTRACT

The Online Book Exchange System is a simple PHP/MySQLi project that can help
book store businesses to provide their customers with an easy way to transaction online. The
system stores all the store's books to sell details and this is organized by book categories. And
customer can exchange their old book in this and get new book . In this system, the book can be
set into multiple categories so it will appear when the customer filter into a single category on
the website or online store. This system is a simple e-commerce website with an admin side in
which the store staff or admin can manage the data and most importantly the books they are
selling at their store. The store customer is required to register first on the website before making
any transaction using the system. Like some other e-commerce website, this system allow also
the book store's customer to store temporarily their selected book or items in a cart for later
checkout. The system does not support online payment which means the transaction using this
system will be cash on delivery or cash on pickup. The system generates also a monthly sales
report and ready to be printed.
CHAPTER-1

1. INTRODUCTION

1.1 Introduction
Online shopping is the process whereby consumers directly buy goods, services
etc .from a seller interactively in real-time without an intermediary service over the internet.
Online shopping is the process of buying goods and services from merchants who sell on the
Internet. Since the emergence of the World Wide Web, merchants have sought to sell their books
to people who surf the Internet. Shoppers can visit web stores from the comfort of their homes
and shop as they sit in front of the computer. Consumers buy a variety of items from online
stores. In fact, people can purchase just about anything from companies that provide their books
online. Books, clothing, household appliances, toys, hardware, software ,and health insurance are
just some of the hundreds of books consumers can buy from an online store. Many people
choose to conduct shopping online because of the convenience. For example, when a person
shops at a brick-and-mortar store, she has to drive to the store, find a parking place, and walk
throughout the store until she locates the books she needs. After finding the items she wants to
purchase, she may often need to stand in long lines at the cash register. The Online Book
Exchange System is a simple PHP/MySQLi project that can help book store businesses to
provide their customers with an easy way to transaction online. The system stores all the store's
books to sell details and this is organized by book categories. And customer can exchange their
old book in this and get new book . In this system, the book can be set into multiple categories
so it will appear when the customer filter into a single category on the website or online store.
This system is a simple e-commerce website with an admin side in which the store staff or
admin can manage the data and most importantly the books they are selling at their store. The
store customer is required to register first on the website before making any transaction using the
system. Like some other e-commerce website, this system allow also the book store's customer
to store temporarily their selected book or items in a cart for later checkout. The system does not
support online payment which means the transaction using this system will be cash on delivery
or cash on pickup. The system generates also a monthly sales report and ready to be printed.
online book exchange is the process of buying goods and services from merchants who sell on
the Internet. Since the emergence of the World Wide Web, merchants have sought to sell their
books to people who surf the Internet. Shoppers can visit web stores from the comfort of their
homes and shop as they sit in front of the computer. Consumers buy a variety of items from
online stores. In fact, people can purchase just about anything from companies that provide their
books online. Books, clothing, household appliances, toys, hardware, software, and health
insurance are just some of the hundreds of books consumers can buy from an online store. Many
people choose to conduct shopping online because of the convenience. For example, when a
person shops at a brick-and-mortar store, she has to drive to the store, find a parking place, and
walk throughout the store until she locates the books she needs. After finding the items she wants
to purchase, she may often need to stand in long lines at the cash register.

1.2 About the Project

The system stores all the store's books to sell details and this is organized by book
categories. And customer can exchange their old book in this and get new book . In this system,
the book can be set into multiple categories so it will appear when the customer filter into a
single category on the website or online store. This system is a simple e-commerce website with
an admin side in which the store staff or admin can manage the data and most importantly the
books they are selling at their store. The store customer is required to register first on the website
before making any transaction using the system. Like some other e-commerce website, this
system allow also the book store's customer to store temporarily their selected book or items in a
cart for later checkout. The system does not support online payment which means the transaction
using this system will be cash on delivery or cash on pickup. The system generates also a
monthly sales report and ready to be printed. You can purchase books online by selecting Any
Category of books. This is controlled by a admin who have full control over all the books. All
the books are stored into the Database. Online bookstore provides a platform where all the books
are kept in an arranged way and you can choose your required book by just selecting it from the
store .after selecting book and view all the description such as name of book, name of author and
price ,user can make book of it in order to get it.if user have old book they can exchange with
offer price.
1.3 Organization Profile

JPG Academy is the renowned and leading Web Designing Company which started its
service to the clients during the year 2011; its main aim is to grasp the valuable expectations of
the customers and to provide them the value which would satisfy them to the core extent. We
have gained most of our valuable customers through our cost – effective solutions which
happened on time.

In this company we provide a wide range of products and services which would enable
every customer to know about our inert domain expertise and our expertise in the leading
technologies. This company stands for innovation, creativity, expertise wisdom in its business
and detailed study. Our high quality designs and sound Web Designing skills have made us to be
in forth as a best Web Designing Company In India check our portfolio for our work showcase.
The services we offer to the clients will reach the customers with tremendous speed and with
complete value, the customers get attracted towards its service due to its unique ideas, strength
and value, the company really stands for its project management power and for its own time
management.

Our company believes it has a wide scope for the service which it offers since it provides
the unique services namely LOGO DESIGN, Web Designing , Search Engine Optimization,
Web Outsourcing, Consultancy Services, Bulk Sms & E-Mail Services and last but not the least
we also provide services Under Printing sector. Everyone knows that the service which we
provide is internet based, we assure our customers that our products which we provide will be
creative, innovative, impressive, and professional and it will for sure tent each and every
customer to come to us for more services and our service will make the customers to be in the
everlasting working relationship with our company.

Loyalty is considered to be very important in business for the buyer and for the seller; we
provide service to the customers with complete loyalty. Since we are loyal to our customer, even
we are flexible with any kind of customers, our loyalty and customer support to the customers
make them to be loyal to us, it brings more customers to us and they feel that if they come to us
expecting something they will not go back with a heavy heart. We provide quality service which
makes our customers to feel glad.
CHAPTER-2

2. SYSTEM ANALYSIS

2.1 Existing System

Things going manually like going to book shop and checking the books and buying the
books No security for data base because all the books information is keep in records and that
work is also done by man by using man power so there is chance of doing mistakes.

2.2 Proposed System


You can purchase books online by selecting Any Category of books. This is
controlled by a admin who have full control over all the books. All the books are stored into the
Database. Online bookstore provides a platform where all the books are kept in an arranged way
and you can choose your required book by just selecting it from the store .after selecting book
and view all the description such as name of book, name of author and price ,user can make book
of it in order to get it.if user have old book they can exchange with offer price.
2.3 Feasibility Studies
Preliminary investigation examine project feasibility, the likelihood the system will be
useful to the organization. The main objective of the feasibility study is to test the Technical,
Operational and Economical feasibility for adding new modules and debugging old running
system. All system is feasible if they are unlimited resources and infinite time. There are aspects
in the feasibility study portion of the preliminary investigation:

 Technical Feasibility
 Operation Feasibility
 Economical Feasibility

2.3.1. Technical Feasibility

Earlier no system existed to cater to the needs of ‘Secure Infrastructure Implementation


System’. The current system developed is technically feasible. It is a web based user interface for
audit workflow at NIC-CSD. Thus it provides an easy access to the users. The database’s
purpose is to create, establish and maintain a workflow among various entities in order to
facilitate all concerned users in their various capacities or roles. Permission to the users would be
granted based on the roles specified. Therefore, it provides the technical guarantee of accuracy,
reliability and security.

2.3.2. Operational Feasibility


Proposed projects are beneficial only if they can be turned out into information system.
That will meet the organization’s operating requirements. Operational feasibility aspects of the
project are to be taken as an important part of the project implementation.
This system is targeted to be in accordance with the above-mentioned issues. Beforehand,
the management issues and user requirements have been taken into consideration. So there is no
question of resistance from the users that can undermine the possible application benefits.
2.3.3. Economic Feasibility
A system can be developed technically and that will be used if installed must still be a good
investment for the organization. In the economical feasibility, the development cost in creating
the system is evaluated against the ultimate benefit derived from the new systems. Financial
benefits must equal or exceed the costs.
The system is economically feasible. It does not require any addition hardware or
software. Since the interface for this system is developed using the existing resources and
technologies available at NIC, There is nominal expenditure and economical feasibility for
certain.
CHAPTER-3

3. SYSTEM SPECIFICATION
3.1 Hardware Requirment

System : Pentium IV 2.4 GHz.


Hard Disk : 40 GB.
Floppy Drive : 1.44 Mb.
Monitor : 15 VGA Colour.
Mouse : Logitech.
Ram : 512 Mb.

3.2 Software Requirment

Operating System :  Windows XP or later


Database Server :  MySQL 5.0
Client :  Microsoft Internet Explorer
User Interface :  HTML with Ajax
Code Behind :  PHP
CHAPTER-4

4.SOFTWARE DESCRIPTION

4.1 Windows 10
Windows 10 is a major release of Microsoft's Windows NT operating system. It is the
direct successor to Windows 8.1, which was released nearly two years earlier. It was released to
manufacturing on July 15, 2015, and later to retail on July 29, 2015. Windows 10 was made
available for download via MSDN and TechNet, as a free upgrade for retail copies of Windows 8
and Windows 8.1 users via the Windows Store, and to Windows 7 users via Windows Update.
Windows 10 receives new builds on an on going basis, which are available at no additional cost
to users, in addition to additional test builds of Windows 10, which are available to Windows
Insiders. Devices in enterprise environments can receive these updates at a slower pace, or use
long-term support milestones that only receive critical updates, such as security patches, over
their ten-year lifespan of extended support. Windows 10 received generally positive reviews
upon its original release. Critics praised Microsoft's decision to provide the desktop-oriented
interface in line with previous versions of Windows, contrasting the tablet-oriented approach of
Windows 8, although Windows 10's touch-oriented user interface mode was criticized for
containing regressions upon the touch-oriented interface of its predecessor. Critics also praised
the improvements to Windows 10's bundled software over Windows 8.1, Xbox Live integration,
as well as the functionality and capabilities of the Cortana personal assistant and the replacement
of Internet Explorer with Microsoft Edge. However, media outlets have been critical of the
changes to operating system behaviors, including mandatory update installation, privacy
concerns over data collection performed by the OS for Microsoft and its partners, and adware-
like tactics used to promote the operating system on its release. Microsoft initially aimed to have
Windows 10 installed on over one billion devices within three years of its release that goal was
ultimately reached almost five years after release on March 16, 2020. By January 2018,
Windows 10 surpassed Windows 7 as the most popular version of Windows worldwide As of
April 2022, Windows 10 is estimated to have a 75% share of Windows PCs (has been declining
since its Jan. 2022 peak of 82%, because of introduction of its successor Windows 11, which is
now 2nd most popular Windows edition in many countries), or 57% of all PCs (the rest being
other Windows editions and other operating systems such as macOS and Linux), and 23% of all
devices (including mobile, tablet and console) are running Windows 10. On June 24, 2021,
Microsoft announced Windows 10's successor, Windows 11, which was released on October 5,
2021
Windows 10 is the final version of Windows which supports 32-bit processors (IA-32 and
ARMv7-based) and devices with BIOS firmware. Its successor, Windows 11, requires a device
that uses UEFI firmware and a 64-bit processor in any supported architecture (x86-64 and
ARMv8), though certain workarounds exist that can be used to install it on devices with legacy
BIOS firmware.

4.2 Apache
Apache server is one of the most popular Web service applications. Apache is a powerful,
flexible, HTTP/1.1 compliant web server. It is highly configurable and extensible with third-
party modules. Users can further customize Apache by writing modules using the Apache
module. Apache implements the following features:
Database Management (DBM) databases for authentication that allows the user to set up
password-protected pages with large numbers of authorized users, without bogging down the
server. Customized responses to errors and problems which allows you to set up files, or even
CGI scripts, which are returned by the server in response to errors and problems

Unlimited flexible URL rewriting and aliasing meaning Apache has no fixed limit on the
numbers of Aliases and Redirects which may be declared in the config files. In addition, a
powerful rewriting engine can be used to solve most URL manipulation problems.

Virtual Hosts which are often referred to as multi-homed servers. This allows the server to
distinguish between requests made to different IP addresses or names (mapped to the same
machine). Apache also offers dynamically configurable mass-virtual hosting. Apache can be
configured to generate reliable piped logs, such as an error log. In addition, on most UNIX
architectures, Apache can send log files to a pipe, allowing for log rotation, hit filtering, real-
time splitting of multiple vhosts into separate logs, and asynchronous DNS (Domain Naming
Service) resolving on the fly.
4.3 PHP

PHP is a server-side and general-purpose scripting language that is especially suited for web
development. PHP originally stood for Personal Home Page. However, now, it stands for
Hypertext Preprocessor. It’s a recursive acronym because the first word itself is also an acronym.
PHP was created by Rasmus Lerdorf in 1994. It’s currently maintained by the PHP Development
Team. PHP is a server-side language When you open a website on your web browser, for The
web browser sends an HTTP request to a web server where phptutorial.net locates. The web
server receives the request and responds with an HTML document. In this example, the web
browser is a client while the web server is the server. The client requests for a page, and the
server serves the request. PHP runs on the web server, processes the request, and returns the
HTML document. PHP is a general-purpose language When it comes to the purpose of the
programming languages, there are two main types: domain-specific and general-purpose
languages. The domain-specific languages are used within specific application domains. For
example, SQL is a domain-specific language. It’s used mainly for querying data from relational
databases. And SQL cannot be used for other purposes. On the other hand, PHP is a general-
purpose language because PHP can develop various applications. PHP is a cross-platform
language PHP can run on all major operating systems, including Linux, Windows, and macOS.
You can use PHP with all leading web servers such as Nginx, OpenBSD, and Apache. Some
cloud environments also support PHP like Microsoft Azure and Amazon AWS.PHP is quite
flexible. It’s not just limited to processing HTML. PHP has built-in support for generating PDF,
GIF, JPEG, and PNG images.One notable feature of PHP is that it supports many databases,
including MySQL, PostgreSQL, MS SQL, db2, Oracle Database, and MongoDB.

What can PHP do

PHP has two main applications:

 Server-side scripting – PHP is well-suited for developing dynamic websites and web
applications.
 Command-line scripting – like Python and Perl, you can run PHP script from the
command line to perform administrative tasks like sending emails and generating PDF
files.
Since PHP is designed for the web in the first place, it brings many advantages to web
development:

 Simple – PHP is quite easy to learn and get started.


 Fast – PHP websites typically run very fast.
 Stable – PHP is stable since it has been in existence for a long time.
 Open-source and free – PHP is open source and free. It means that you don’t have to pay
a license fee to use PHP to develop software products.
 Community support – PHP has an active online community that helps you whenever you
face an issue.

Common uses of PHP

 PHP performs system functions, i.e. from files on a system it can create, open, read,
write, and close them.
 PHP can handle forms, i.e. gather data from files, save data to a file, through email you
can send data, return data to the user.
 You add, delete, modify elements within your database through PHP.
 Access cookies variables and set cookies.
 Using PHP, you can restrict users to access some pages of your website.
 It can encrypt data.

Characteristics of PHP

Five important characteristics make PHP's practical nature possible −

 Simplicity

 Efficiency

 Security

 Flexibility

 Familiarity

PHP | Unique Features


As PHP can do anything related to server-side programming which contains the backend of any
web page, it holds a lot of unique features within it. The main purpose of PHP design is web
development.

Let us look into some of the unique features of PHP:

Simple, Familiar and ease of use: Its popularly known for its simplicity, familiarity and easy to
learn the language as the syntax is similar to that of ‘C’ or Pascal language. So the language is
very logical and well organized general-purpose programming language. Even people with a
normal programming background can easily understand and capture the use of language. PHP is
very advantageous for new users as its a very reliable, fluent, organized, clean, demandable and
efficient.The main strength of PHP is the availability of rich pre-defined functions. The core
distribution helps the developers implement dynamic websites very easily with secured data.
PHP applications are very easy to optimize.Loosely typed language: PHP encourages the use of
variables without declaring its data types. So this is taken care at the execution time depending
on the value assigned to the variable. Even the variable name can be changed dynamically.

Flexibility:

PHP is known for its flexibility and embedded nature as it can be well integrated with HTML,
XML, Javascript and many more. PHP can run on multiple operating systems like Windows,
Unix, Mac OS, Linux, etc. The PHP scripts can easily run on any device like laptops, mobiles,
tablets, and computer. It is very comfortably integrated with various Databases. Desktop
applications are created using advanced PHP features. The executable PHP can also be run on
command-line as well as directly on the machine. Heavyweight applications can be created
without a server or browser.It also acts as an excellent interface with relational databases.

Open Source
All PHP frameworks are open sources, No payment is required for the users and its completely
free. User can just download PHP and start using for their applications or projects. Even in
companies, the total cost is reduced for software development providing more Reliability and
flexibility. It supports a popular range of databases like MySQL, SQLite, Oracle, Sybase,
Informix, and PostgreSQL. PHP provides libraries to access these databases to interact with web
servers. Developers are free to post errors, inspect codes and can contribute to code as well as
bug fixing. Many frameworks like Codeignitor, Zend Framework, CakePHP make use of PHP.
Even many popular content management systems like WordPress, Joomla and Drupal use PHP
as prime language. Because of the above reasons many web hosting companies and Internet
Service providers prefers PHP. Cross-platform compatibility: PHP is multi-platform and known
for its portability as it can run on any operating System and windows environments. The most
common are XAMPP (Windows, Apache Server, MySQL, Perl, and PHP) and LAMP (Linux,
Apache, MySQL, PHP). As PHP is platform-independent, it’s very easy to integrate with various
databases and other technologies without re-implementation. It effectively saves a lot of energy,
time and money. Error reporting and exceptions: PHP supports much errors reporting constants
to generate errors and relevant warnings at run time. For example E_ERROR, E_WARNING,
E_PARSE, E_STRICT. PHP5 supports exception handling which is used to throw errors which
can be caught at any time.

Active community support: PHP is very rich with many diverse online community developers to
help beginners for web-based applications. These worldwide volunteers contribute many features
as well as new versions for PHP libraries. Even they contribute a translation in different
languages to help out programmers. There is a bundle of third-party open-source libraries which
provide basic functionalities. Even the documentation given by the official site helps in
implementing new features providing access to a variety of creative imagination. Fast and
efficient performance: Users generally prefer fast loading websites. For any web development,
speed becomes an important aspect which is taken care of by PHP.

PHP scripts are faster than other scripting languages like ASP.NET, PERL, and JSP. The
memory manager of PHP 7 is very optimized and fast as compared to older versions of PHP.
Even connecting to the database and loading of required data from tables, are faster than other
programming languages. It provides a built-in module for easy and efficient database
management system. The high speed of PHP is advantageous for users for its server
administration and mail functionality. Also, it supports session management and removing of
unwanted memory allocation.

Maintenance

When dealing with big projects, maintenance of code is also an important aspect of the web
development process. There are many PHP frameworks for example MVC (Model View
Controller) which makes development and maintenance of code easier. Files belonging to the
different module are maintained separately. Third-party application support and security: Many
PHP’s predefined functions support data encryption options keeping it more secure. Even the
users can use third-party applications to secure data.Real time access monitoring: PHP also
provides a summary of user’s recent logging accesses. Memory and CPU usage information:
PHP can provide memory usage information from functions like memory_get_usage() or
memory_get_peak_usage(), which can help the developers optimize their code. In the similar
way, the CPU power consumed by any script can be retrieved for further optimization.

Object oriented features: PHP supports object-oriented programming features, resulting in


increased speed and introducing added features like data encapsulation and inheritance at many
levels. Magic Constants: PHP provides many built-in magic methods starting with __(double
underscore) which are called during specific events.

For example directory path

(__DIR__), class name (__CLASS__), namespace (__NAMESPACE__), function name


(__FUNCTION__), method name (__METHOD__), line number (__LINE__), file path
(__FILE__).

Regular expression:
PHP provides regular expression functions with parsing and pattern matching methods.

PDO Class: PHP Data Objects are created by PDO class which gives a good abstraction layer for
database drivers. The PDO Classes are enriched with functions which are database independent.
It means the same functions are used for similar actions for different databases without re-
development as long as it supports PDO. In this way, the application becomes more portable
saving lot of time and effort. Use of PDO helps the application from SQL injection attacks.

Additional Features:

The feature list is endless. The other features of PHP are manipulation of images using GD
library, make remote connections using cURL, handling file system, managing user sessions,
track sessions, Use of SimpleXML Class which reads and write XML files through objects,
support of cookies and sessions, shell command-line execution, compression of ZIP archives, use
of Ajax.

4.4 MYSQL

The Structured Query Language (SQL) is the language of databases. SQL was, is, and will
stay for the foreseeable future the database language for relational database servers such as IBM
DB2, Microsoft SQL Server, MySQL, Oracle, Progress, Sybase Adaptive Server, and dozens of
others. SQL supports a small but very powerful set of statements for manipulating, managing,
and protecting data stored in a database. This power has resulted in its tremendous popularity.
Almost every database server supports SQL or a dialect of the language. Currently, SQL
products are available for every kind of computer, from a small handheld computer to a large
server, and for every operating system, including Microsoft Windows, Mac and many UNIX
variations. Structured Query Language (SQL) is a relational database language which allows you
to create, delete, access and manipulate databases. The following is a list of the main operations
that can be formulated with SQL:

 creating new databases


 deleting a database
 creating new tables in a database
 deleting tables from a database
 creating and removing users (database access control)
 executing queries against a database
 retrieving data from a database
 inserting records in a database
 updating records in a database
 deleting records from a database
 creating stored procedures in a database
 setting permissions on tables and procedures
 creating relationships between tables

MySQL is a Relational Database Management System (“RDBMS”). It is used by most


modern websites and web-based services as a convenient and fast-access storage and retrieval
solution for large volumes of data. A simple example of items which might be stored in a
MySQL database would be a site-registered user’s name with associated password (encrypted for
security), the user registration date, and number of times visited, etc.
MySQL can also be accessed using many tools. It can be easily communicated with via PHP
(PHP Hypertext Preprocessor), a scripting language whose primary focus is to manipulate
HTML for a webpage on the server before it is delivered to a client’s machine. A user can submit
queries to a database via PHP, allowing insertion, retrieval and manipulation of information
into/from the database.

Structured Query Language (SQL) is the de-facto standard programming language for
creating, updating and retrieving information that is stored in relational database management
system. A relational database is a database divided into logical units called tables, where tables
are related to one another within the database. A relational database allows large complex data to
be broken down into logical, smaller, more manageable units. Tables are related to each other
through a common key (data value) in a relational database. SQL is a formal programming
language. Speed was he developer’s main focus when SQL was being developed.
MySQL is a fast easy to use RDMS. MySQL is easier to install and use than its commercial
competitors and the fact that MySQL is open source is strongly in its favor. MySQL is available
via the General Public License (GPU). MySQL consists of a MySQL server, several utility
programs that assist the administration of the MySQL databases. MySQL’s main advantages
include the following:

 It is pre-packaged with most Linux distributions


.
 It’s quite easy to use: you can interact with a MySQL database using a few simple
statements from the SQL language.

 It’s very fast: MySQL’s developers’ main goal was speed; consequently the software was
designed from the beginning with speed in mind.

 It’s free via the GNU General Public License.


CHAPTER-5
5. MODULE DESCRIPTION

5.1 MODULES:-

Admin: – He will add all the information about the books like cost name year subject all the
complete information of the book who have all the rights do on the project and admin can view
the all book request reports . book shop details and user details and booking details .

Users: – He can search for the book he is in need if he found the book he can buy that book from
his home only. He can take book for particular date and time . and user can view the booking
history

Book shop: Book shop can add book all book information and view the booking history, and
give the status for booking

Registration: – For all the new users this module is used

Login: – The entire registered user can access the application by using this module
5.2 DFD

5.2.1 Admin Login


5.2.2 Book Shop Login
5.2.3 User Login
5.3 SYSTEM FLOW DIAGRAM
5.4 ER DIAGRAM
5.5 DATABASE DESIGN
5.5.1 Table Name: tbladmin

Fields Data types


(Constraints)
id Int(Primary,autoincrement)

name Varchar(50)

Email Varchar(50)

Mobile Bigint(12)

Password Varchar(50)

Create_date Timestamp

5.5.2 Table Name: Bookshop

Fields Data types


(Constraints)
id Int(Primary,autoincrement)

Name Varchar(50)

Mobile Bigint(12)

Email Varchar(50)

Password Varchar(50)

Bookshopname Varchar(50)

Address Varchar(100)

5.5.3 Table Name: bookdetails

Fields Data types


(Constraints)
id Int(Primary,autoincrement)

Title Varchar(300)
Author Varchar(50)

Category Varchar(50)

Description Varchar(50)

Image Varchar(50)

5.5.4 Table Name: tbluser

Fields Data types


(Constraints)
id Int(Primary,autoincrement)

Fname Varchar(50)

Lname Varchar(150)
Email Varchar(50)

Mobile Bigint(12)

Password Varchar(50)

Address Varchar(50)

Create_Date Timestamp

5.5.5 Table Name: bookrequest

Fields Data types


(Constraints)
id Int(Primary,autoincrement)

bookingNumber Varchar(50)
Userid Varchar(50)

Bookshopid Varchar(50)

Title Varchar(50)

Fromdate Date

Todate Date

Address Varchar(100)

Status Varchar(50)

Shopremarks Varchar(100)

CHAPTER-6
6.CODING DESIGN
6.1 Admin Login
<?php
session_start();
error_reporting(0);
require_once('include/config.php');
$msg = "";
if(isset($_POST['submit'])) {
$email = trim($_POST['email']);
$password = md5(($_POST['password']));
if($email != "" && $password != "") {
try {
$query = "select id, name, email, mobile, password, createdate from tbladmin where
email=:email and password=:password";
$stmt = $dbh->prepare($query);
$stmt->bindParam('email', $email, PDO::PARAM_STR);
$stmt->bindValue('password', $password, PDO::PARAM_STR);
$stmt->execute();
$count = $stmt->rowCount();
$row = $stmt->fetch(PDO::FETCH_ASSOC);
if($count == 1 && !empty($row)) {
/******************** Your code ***********************/
$_SESSION['adminid'] = $row['id'];
$_SESSION['email'] = $row['email'];
$_SESSION['name'] = $row['name'];
header("location: index.php");
} else {
$msg = "Invalid username and password!";
}
} catch (PDOException $e) {
echo "Error : ".$e->getMessage();
}
} else {
$msg = "Both fields are required!";
}
}
?>

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="description" content="">
<meta name="author" content="">

<title>DHMS | Admin Login</title>

<!-- Custom fonts for this template-->


<link href="../vendor/fontawesome-free/css/all.min.css" rel="stylesheet" type="text/css">
<link
href="https://fonts.googleapis.com/css?
family=Nunito:200,200i,300,300i,400,400i,600,600i,700,700i,800,800i,900,900i"
rel="stylesheet">

<!-- Custom styles for this template-->


<link href="../css/sb-admin-2.min.css" rel="stylesheet">

</head>

<body class="bg-gradient-primary">

<div class="container">

<!-- Outer Row -->


<div class="row justify-content-center">

<div class="col-xl-10 col-lg-12 col-md-9">

<div class="card o-hidden border-0 shadow-lg my-5">


<div class="card-body p-0">
<!-- Nested Row within Card Body -->
<div class="row">
<div class="col-lg-7 d-none d-lg-block"><img src="img/admin-banner.jpg"
width="580" height="450"></div>
<div class="col-lg-5">
<div class="p-5">
<div class="text-center">
<h1 class="h4 text-gray-900 mb-4">Book Exchange Admin</h1>
<?php if($error){?><div
class="errorWrap"><strong>ERROR</strong>:<?php echo htmlentities($error); ?> </div><?php
}
else if($msg){?><div class="succWrap"><strong>Error</strong>:<?php echo
htmlentities($msg); ?> </div><?php }?>
</div>
<form class="user" method="post">
<div class="form-group">
<input type="email" class="form-control"
id="email" name="email" aria-describedby="emailHelp"
placeholder="Enter Email Address...">
</div>
<div class="form-group">
<input type="password" name="password" class="form-control"
id="exampleInputPassword" placeholder="Password">
<a href="forgot-password.php">Forgot Password ?</a>
</div>

<input type="submit" name="submit" id="submit" value="Login"


class="btn btn-primary btn-user btn-block">

</form>
<hr>
<div class="text-center">
<a class="small" href="register.php">Forgot Password</a>
</div>
<hr />
<div class="text-center">
<a class="btn btn-primary" href="../index.php">Back to Home Page</a>
</div>
</div>
</div>
</div>
</div>
</div>
<script src="vendor/jquery/jquery.min.js"></script>
<script src="vendor/bootstrap/js/bootstrap.bundle.min.js"></script>
<script src="vendor/jquery-easing/jquery.easing.min.js"></script>
<script src="js/sb-admin-2.min.js"></script>
</body>
</html>
<style>
.succWrap{
padding: 10px;
margin: 0 0 20px 0;
background: #dd3d36;
color:#fff;
-webkit-box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);
box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);
}
</style>
View User details

<?php
session_start();
error_reporting(0);
require_once('include/config.php');
if(strlen( $_SESSION["adminid"])==0)
{
header('location:login.php');
}
else{?>
<!DOCTYPE html>
<html lang="en">

<head>

<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="description" content="">
<meta name="author" content="">

<title>DHMS | User Details</title>

<!-- Custom fonts for this template -->


<link href="../vendor/fontawesome-free/css/all.min.css" rel="stylesheet" type="text/css">
<link
href="https://fonts.googleapis.com/css?
family=Nunito:200,200i,300,300i,400,400i,600,600i,700,700i,800,800i,900,900i"
rel="stylesheet">

<!-- Custom styles for this template -->


<link href="../css/sb-admin-2.min.css" rel="stylesheet">
<script src='https://kit.fontawesome.com/a076d05399.js' crossorigin='anonymous'></script>

<!-- Custom styles for this page -->


<link href="../vendor/datatables/dataTables.bootstrap4.min.css" rel="stylesheet">

</head>

<body id="page-top">

<!-- Page Wrapper -->


<div id="wrapper">

<?php include 'include/sidebar.php'; ?>


<!-- End of Sidebar -->

<!-- Content Wrapper -->


<div id="content-wrapper" class="d-flex flex-column">

<!-- Main Content -->


<div id="content">

<?php include 'include/header.php'; ?>


<!-- End of Topbar -->

<!-- Begin Page Content -->


<div class="container-fluid">
<!-- DataTales Example -->
<div class="card shadow mb-4">
<div class="card-header py-3">
<h6 class="m-0 font-weight-bold text-primary">User Details</h6>
</div>
<div class="card-body">
<div class="table-responsive">
<table class="table table-bordered" id="dataTable" width="100%"
cellspacing="0">
<thead>
<tr>
<th>Sr.No</th>
<th>Name</th>
<th>Email</th>
<th>Mobile</th>
<th>Address</th>
<th>Action</th>

</tr>
</thead>

<?php
$sql ="SELECT id, fname,lname,email,mobile,address,id from tbluser";
$query= $dbh -> prepare($sql);
$query-> execute();
$results = $query -> fetchAll(PDO::FETCH_OBJ);
$cnt=1;
if($query -> rowCount() > 0)
{
foreach($results as $result)
{
?>
<tr>
<td><?php echo($cnt);?></td>
<td><?php echo htmlentities($result->fname);?> <?php echo htmlentities($result-
>lname);?></td>
<td><?php echo htmlentities($result->email);?></td>
<td><?php echo htmlentities($result->mobile);?></td>
<td><?php echo htmlentities($result->address);?></td>
<td><a href="user-bookings.php?uid=<?php echo htmlentities($result->id);?
>&&uname=<?php echo htmlentities($result->fname);?>" class="btn btn-primary">Booking
Details</td>
</tr>
<?php $cnt=$cnt+1; } } ?>
</table>
</div>
</div>
</div>

</div>
<!-- /.container-fluid -->
</div>
<!-- End of Main Content -->

<!-- Footer -->


<?php include 'include/footer.php'; ?>
<!-- End of Footer -->

</div>
<!-- End of Content Wrapper -->

</div>
<!-- End of Page Wrapper -->

<!-- Scroll to Top Button-->


<a class="scroll-to-top rounded" href="#page-top">
<i class="fas fa-angle-up"></i>
</a>

<!-- Logout Modal-->


<div class="modal fade" id="logoutModal" tabindex="-1" role="dialog" aria-
labelledby="exampleModalLabel"
aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="exampleModalLabel">Ready to Leave?</h5>
<button class="close" type="button" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">Select "Logout" below if you are ready to end your current
session.</div>
<div class="modal-footer">
<button class="btn btn-secondary" type="button"
data-dismiss="modal">Cancel</button>
<a class="btn btn-primary" href="login.html">Logout</a>
</div>
</div>
</div>
</div>

<!-- Bootstrap core JavaScript-->


<script src="../vendor/jquery/jquery.min.js"></script>
<script src="../vendor/bootstrap/js/bootstrap.bundle.min.js"></script>
<!-- Core plugin JavaScript-->
<script src="../vendor/jquery-easing/jquery.easing.min.js"></script>

<!-- Custom scripts for all pages-->


<script src="../js/sb-admin-2.min.js"></script>

<!-- Page level plugins -->


<script src="../vendor/datatables/jquery.dataTables.min.js"></script>
<script src="../vendor/datatables/dataTables.bootstrap4.min.js"></script>

<!-- Page level custom scripts -->


<script src="../js/demo/datatables-demo.js"></script>

</body>

</html>

<?php }?>

View Book Shop Details


<?php
session_start();
error_reporting(0);
require_once('include/config.php');
if(strlen( $_SESSION["adminid"])==0)
{
header('location:login.php');
}
else{?>

<!DOCTYPE html>
<html lang="en">

<head>

<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="description" content="">
<meta name="author" content="">

<title>ONLINE BOOK EXCHANGE</title>

<!-- Custom fonts for this template -->


<link href="../vendor/fontawesome-free/css/all.min.css" rel="stylesheet" type="text/css">
<link
href="https://fonts.googleapis.com/css?
family=Nunito:200,200i,300,300i,400,400i,600,600i,700,700i,800,800i,900,900i"
rel="stylesheet">

<!-- Custom styles for this template -->


<link href="../css/sb-admin-2.min.css" rel="stylesheet">
<script src='https://kit.fontawesome.com/a076d05399.js' crossorigin='anonymous'></script>

<!-- Custom styles for this page -->


<link href="../vendor/datatables/dataTables.bootstrap4.min.css" rel="stylesheet">

</head>

<body id="page-top">

<!-- Page Wrapper -->


<div id="wrapper">

<?php include 'include/sidebar.php'; ?>


<!-- End of Sidebar -->

<!-- Content Wrapper -->


<div id="content-wrapper" class="d-flex flex-column">

<!-- Main Content -->


<div id="content">

<?php include 'include/header.php'; ?>


<!-- End of Topbar -->

<!-- Begin Page Content -->


<div class="container-fluid">
<!-- DataTales Example -->
<div class="card shadow mb-4">
<div class="card-header py-3">
<h6 class="m-0 font-weight-bold text-primary">Book Shop Details</h6>
</div>
<div class="card-body">
<div class="table-responsive">
<table class="table table-bordered" id="dataTable" width="100%"
cellspacing="0">
<thead>
<tr>
<th>Sr.No</th>
<th>Name</th>
<th>Email</th>
<th>Mobile</th>
<th>Address</th>
<th>BOOK SHOP NAME</th>

<th>Action</th>
</tr>
</thead>

<?php
$sql ="SELECT id,name,mobile,email,address,bookshopname from
bookshop";
$query= $dbh -> prepare($sql);

$query-> execute();
$results = $query -> fetchAll(PDO::FETCH_OBJ);
$cnt=1;
if($query -> rowCount() > 0)
{
foreach($results as $result)
{
$bookshopid=$result->id;
?>
<tr>
<td><?php echo($cnt);?></td>
<td><?php echo htmlentities($result->name);?></td>
<td><?php echo htmlentities($result->email);?></td>
<td><?php echo htmlentities($result->mobile);?></td>
<td><?php echo htmlentities($result->address);?></td>
<td><?php echo htmlentities($result->bookshopname);?></td>

<td><a href="shop-exchanging.php?did=<?php echo htmlentities($result->id);?


>&&uname=<?php echo htmlentities($result->name);?>" class="btn btn-primary">Booking
Details</td>

</tr>

<?php $cnt=$cnt+1; } } ?>


</table>
</div>
</div>
</div>

</div>
<!-- /.container-fluid -->

</div>
<!-- End of Main Content -->

<!-- Footer -->


<?php include 'include/footer.php'; ?>
<!-- End of Footer -->

</div>
<!-- End of Content Wrapper -->

</div>
<!-- End of Page Wrapper -->

<!-- Scroll to Top Button-->


<a class="scroll-to-top rounded" href="#page-top">
<i class="fas fa-angle-up"></i>
</a>

<!-- Logout Modal-->


<div class="modal fade" id="logoutModal" tabindex="-1" role="dialog" aria-
labelledby="exampleModalLabel"
aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="exampleModalLabel">Ready to Leave?</h5>
<button class="close" type="button" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">Select "Logout" below if you are ready to end your current
session.</div>
<div class="modal-footer">
<button class="btn btn-secondary" type="button"
data-dismiss="modal">Cancel</button>
<a class="btn btn-primary" href="login.html">Logout</a>
</div>
</div>
</div>
</div>

<!-- Bootstrap core JavaScript-->


<script src="../vendor/jquery/jquery.min.js"></script>
<script src="../vendor/bootstrap/js/bootstrap.bundle.min.js"></script>

<!-- Core plugin JavaScript-->


<script src="../vendor/jquery-easing/jquery.easing.min.js"></script>

<!-- Custom scripts for all pages-->


<script src="../js/sb-admin-2.min.js"></script>

<!-- Page level plugins -->


<script src="../vendor/datatables/jquery.dataTables.min.js"></script>
<script src="../vendor/datatables/dataTables.bootstrap4.min.js"></script>

<!-- Page level custom scripts -->


<script src="../js/demo/datatables-demo.js"></script>

<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-


datepicker/1.9.0/css/bootstrap-datepicker.css">
<script src = "https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-
datepicker/1.9.0/js/bootstrap-datepicker.js"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js"></
script>

</body>

</html>
<?php }?>

Booking Details

<?php
session_start();
error_reporting(0);
require_once('include/config.php');
if(strlen( $_SESSION["adminid"])==0)
{
header('location:login.php');
}
else{?>
<!DOCTYPE html>
<html lang="en">

<head>

<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="description" content="">
<meta name="author" content="">

<title>Online Book Exchange</title>

<!-- Custom fonts for this template -->


<link href="../vendor/fontawesome-free/css/all.min.css" rel="stylesheet" type="text/css">
<link
href="https://fonts.googleapis.com/css?
family=Nunito:200,200i,300,300i,400,400i,600,600i,700,700i,800,800i,900,900i"
rel="stylesheet">

<!-- Custom styles for this template -->


<link href="../css/sb-admin-2.min.css" rel="stylesheet">
<script src='https://kit.fontawesome.com/a076d05399.js' crossorigin='anonymous'></script>
<!-- Custom styles for this page -->
<link href="../vendor/datatables/dataTables.bootstrap4.min.css" rel="stylesheet">

</head>
<body id="page-top">

<!-- Page Wrapper -->


<div id="wrapper">

<!-- Sidebar -->


<?php include 'include/sidebar.php';?>
<!-- End of Sidebar -->

<!-- Content Wrapper -->


<div id="content-wrapper" class="d-flex flex-column">

<!-- Main Content -->


<div id="content">

<!-- Topbar -->


<?php include 'include/header.php';?>
<!-- End of Topbar -->

<!-- Begin Page Content -->


<div class="container-fluid">

<!-- Page Heading -->


<h1 class="h3 mb-2 text-gray-800" align="center"><?php echo
ucfirst($_GET['uname']);?>'s Booking Details</h1>

<!-- DataTales Example -->


<div class="card shadow mb-4">
<div class="card-header py-3">
<h6 class="m-0 font-weight-bold text-primary">Booking Details</h6>
</div>
<div class="card-body">
<div class="table-responsive">
<table class="table table-bordered" id="dataTable" width="100%"
cellspacing="0">
<thead>
<tr>
<th>Sr No</th>
<th>Booking No.</th>
<th>User Name</th>
<th>User Email</th>
<th>USer Mobile</th>
<th>From Date</th>
<th>To Date</th>
<th>Book Name</th>

<th>Address</th>
<th>Status</th>
<th>Shop Remarks</th>

</tr>
</thead>
<?php
$booksid=intval($_GET['did']);

$sql ="SELECT bookrequest.id as bookingid,


tbluser.fname,tbluser.lname,tbluser.email,tbluser.mobile,bookrequest.fromdate,bookrequest.todat
e,bookrequest.status,bookrequest.address,bookrequest.shopremarks,bookrequest.bookingNumber
FROM bookrequest
inner join tbluser
on tbluser.id=bookrequest.userid
where bookrequest.bookshopid=:booksid";

$query= $dbh -> prepare($sql);


$query->bindParam(':booksid',$booksid, PDO::PARAM_STR);
$query-> execute();
$results = $query -> fetchAll(PDO::FETCH_OBJ);
$cnt=1;
if($query -> rowCount() > 0)
{
foreach($results as $result)
{
?>
<tr>
<td><?php echo($cnt);?></td>
<th><?php echo htmlentities($result->bookingNumber);?></th>
<td><?php echo htmlentities($result->fname);?> <?php echo htmlentities($result-
>lname);?></td>
<td><?php echo htmlentities($result->email);?></td>
<td><?php echo htmlentities($result->mobile);?></td>
<td><?php echo htmlentities($result->fromdate);?></td>
<td><?php echo htmlentities($result->todate);?></td>

<td><?php echo htmlentities($result->title);?></td>


<td><?php echo htmlentities($result->address);?></td>

<td>

<?php
$statusd=$result->status;
if ($statusd=='0') {
echo '<span class="badge badge-primary">Pending</span>';
}
elseif ($statusd=='1') {
echo '<span class="badge badge-success">Approved</span>';
}
elseif ($statusd=='2') {
echo '<span class="badge badge-danger">Cancel</span>';
}
?>
</td>
<td><?php echo htmlentities($result->shopremarks);?></td>

</tr>

<?php $cnt=$cnt+1; } } else { ?>

<tr><td colspan="9" style="color:red;">No Booking Found</td>


</tr>
<?php } ?>
</table>
</div>
</div>
</div>

</div>
<!-- /.container-fluid -->

</div>
<!-- End of Main Content -->
<!-- Footer -->
<?php include 'include/footer.php'; ?>
<!-- End of Footer -->

</div>
<!-- End of Content Wrapper -->

</div>
<!-- End of Page Wrapper -->

<!-- Scroll to Top Button-->


<a class="scroll-to-top rounded" href="#page-top">
<i class="fas fa-angle-up"></i>
</a>

<!-- Bootstrap core JavaScript-->


<script src="../vendor/jquery/jquery.min.js"></script>
<script src="../vendor/bootstrap/js/bootstrap.bundle.min.js"></script>

<!-- Core plugin JavaScript-->


<script src="../vendor/jquery-easing/jquery.easing.min.js"></script>

<!-- Custom scripts for all pages-->


<script src="../js/sb-admin-2.min.js"></script>

<!-- Page level plugins -->


<script src="../vendor/datatables/jquery.dataTables.min.js"></script>
<script src="../vendor/datatables/dataTables.bootstrap4.min.js"></script>
<!-- Page level custom scripts -->
<script src="../js/demo/datatables-demo.js"></script>

</body>

</html>
<?php }?>

BOOK SHOP REGISTER


<?php
error_reporting(0);
require_once('include/config.php');
if(isset($_POST['submit']))
{
$name=$_POST['name'];
$mobile=$_POST['mobile'];
$email=$_POST['email'];
$Password=$_POST['Password'];
$pass=md5($Password);
$RepeatPassword = $_POST['RepeatPassword'];
$Address=$_POST['Address'];
$book=$_POST['book'];
// Email id Already Exit
$usermatch=$dbh->prepare("SELECT mobile,email FROM bookshop WHERE (email=:usreml
|| mobile=:mblenmbr)");
$usermatch->execute(array(':usreml'=>$email,':mblenmbr'=>$mobile));
while($row=$usermatch->fetch(PDO::FETCH_ASSOC))
{
$usrdbeml= $row['email'];
$usrdbmble=$row['mobile'];
}

$sql="INSERT INTO
bookshop(name,mobile,email,Password,bookshopname,Address)Values(:names,:mobile,:emailid
,:Password,:bookshop,:Address)";

$query = $dbh -> prepare($sql);


$query->bindParam(':names',$name,PDO::PARAM_STR);
$query->bindParam(':mobile',$mobile,PDO::PARAM_STR);
$query->bindParam(':emailid',$email,PDO::PARAM_STR);
$query->bindParam(':Password',$pass,PDO::PARAM_STR);
$query->bindParam(':bookshop',$book,PDO::PARAM_STR);
$query->bindParam(':Address',$Address,PDO::PARAM_STR);
$query -> execute();
$lastInsertId = $dbh->lastInsertId();
if($lastInsertId>0)
{
echo "<script>alert('Registred successfully');</script>";
echo "<script>window.location.href='login.php'</script>";
}
else
{
echo "<script>alert('Something went wrong. Please try again.');</script>";
}
}

?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="description" content="">
<meta name="author" content="">
<title>ONLINE BOOK EXCHANGE SYSTEM</title>
<!-- Custom fonts for this template-->
<link href="../vendor/fontawesome-free/css/all.min.css" rel="stylesheet" type="text/css">
<link
href="https://fonts.googleapis.com/css?
family=Nunito:200,200i,300,300i,400,400i,600,600i,700,700i,800,800i,900,900i"
rel="stylesheet">

<!-- Custom styles for this template-->


<link href="../css/sb-admin-2.min.css" rel="stylesheet">
</head>
<body class="bg-gradient-primary">
<div class="container">
<div class="card o-hidden border-0 shadow-lg my-5">
<div class="card-body p-0">
<!-- Nested Row within Card Body -->
<div class="row">
<div class="col-lg-12">
<div class="p-5">
<div class="text-center">
<h1 class="h4 text-gray-900 mb-4">ONLINE BOOK EXCHANGE
SYSTEM</h1>
<?php if($error){?><div class="errorWrap"><strong>ERROR</strong>:<?php
echo htmlentities($error); ?> </div><?php }
else if($succmsg){?><div class="succWrap"><strong>SUCCESS</strong>:<?php
echo htmlentities($succmsg); ?> </div><?php }?>
</div>
<form method='post' enctype='multipart/form-data'>
<div class="form-group row">
<div class="col-sm-6">
<label for="name"><strong>Name:</strong></label>
<input type="text" class="form-control" name="name"
id="name"placeholder="Name" value="<?php echo $name; ?>">
<span style="color:red;"><?php echo $nameerror;?></span>
</div>
<div class="col-sm-6">
<label for="mobile"><strong>Mobile:</strong></label>
<input type="text" class="form-control" id="mobile" name="mobile"
placeholder="Mobile" maxlength="10" value="<?php echo $mobile; ?>">
<span style="color:red;"><?php echo $mobileerror;?></span>
</div>
</div>
<div class="form-group row">
<div class="col-sm-6">
<label for="email"><strong>Email:</strong></label>
<input type="text" class="form-control" name="email" id="email"
placeholder="Email" value="<?php echo $email; ?>">
<span style="color:red;"><?php echo $emailerror;?></span>
</div>

</div>
<div class="form-group row">
<div class="col-sm-6">
<label for="name"><strong>Password:</strong></label>
<input type="password" class="form-control" name="Password"
id="Password" placeholder="Password">
<span style="color:red;"><?php echo $Passworderror;?></span>
</div>
<div class="col-sm-6">
<label for="name"><strong>Repeat Password:</strong></label>
<input type="password" class="form-control" name="RepeatPassword"
id="RepeatPassword" placeholder="Repeat Password">
<span style="color:red;"><?php echo $mobileerror;?></span>
</div>
</div>
<div class="form-group">
<label for="name"><strong>Book Shop Name:</strong></label>
<input type="text" class="form-control" name="book"
id="book"placeholder="Book Shop">
<span style="color:red;"><?php echo $Addresserror;?></span>
</div>
<div class="form-group">
<label for="name"><strong>Address:</strong></label>
<input type="text" class="form-control" name="Address"
id="Address"placeholder="Address">
<span style="color:red;"><?php echo $Addresserror;?></span>
</div>

<input type="submit" name="submit" id="submit" class="btn btn-primary"


value="Register Now">

</form>
<hr>
<div class="text-center">
<a class="small" href="forgot-password.php">Forgot Password?</a>
</div>
<div class="text-center">
<a class="small" href="login.php">Already have an account? Login!</a>
</div>
</div>
</div>
</div>
<!-- Bootstrap core JavaScript-->
<script src="../vendor/jquery/jquery.min.js"></script>
<script src="../vendor/bootstrap/js/bootstrap.bundle.min.js"></script>
<!-- Core plugin JavaScript-->
<script src="../vendor/jquery-easing/jquery.easing.min.js"></script>
<!-- Custom scripts for all pages-->
<script src="../js/sb-admin-2.min.js"></script>
</body>
</html>
<style>
.errorWrap {
padding: 10px;
margin: 0 0 20px 0;
background: #dd3d36;
color:#fff;
-webkit-box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);
box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);
}
.succWrap{
padding: 10px;
margin: 0 0 20px 0;
background: #5cb85c;
color:#fff;
-webkit-box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);
box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);
}
</style>

Book Shop Login


<?php
session_start();
error_reporting(0);
require_once('include/config.php');
$msg = "";
if(isset($_POST['submit'])) {
$email = trim($_POST['email']);
$password = md5(($_POST['password']));
if($email != "" && $password != "") {
try {
$query = "select id,name,mobile,email,Password,bookshopname,Address from bookshop
where email=:email and Password=:password";
$stmt = $dbh->prepare($query);
$stmt->bindParam('email', $email, PDO::PARAM_STR);
$stmt->bindValue('password', $password, PDO::PARAM_STR);
$stmt->execute();
$count = $stmt->rowCount();
$row = $stmt->fetch(PDO::FETCH_ASSOC);
if($count == 1 && !empty($row)) {
/******************** Your code ***********************/
$_SESSION['bookid'] = $row['id'];
$_SESSION['email'] = $row['email'];
$_SESSION['name'] = $row['name'];
header("location: dashboard.php");
} else {
$msg = "Invalid username and password!";
}
} catch (PDOException $e) {
echo "Error : ".$e->getMessage();
}
} else {
$msg = "Both fields are required!";
}
}
?>

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="description" content="">
<meta name="author" content="">

<title>ONLINE BOOK EXCHANGE PORTAL </title>


<!-- Custom fonts for this template-->
<link href="../vendor/fontawesome-free/css/all.min.css" rel="stylesheet" type="text/css">
<link
href="https://fonts.googleapis.com/css?
family=Nunito:200,200i,300,300i,400,400i,600,600i,700,700i,800,800i,900,900i"
rel="stylesheet">

<!-- Custom styles for this template-->


<link href="../css/sb-admin-2.min.css" rel="stylesheet">

</head>

<body class="bg-gradient-primary">

<div class="container">

<!-- Outer Row -->


<div class="row justify-content-center">

<div class="col-xl-10 col-lg-12 col-md-9">

<div class="card o-hidden border-0 shadow-lg my-5">


<div class="card-body p-0">
<!-- Nested Row within Card Body -->
<div class="row">
<div class="col-lg-6 d-none d-lg-block"><img src="driver.jpg" height="450"
width="510"></div>
<div class="col-lg-6">
<div class="p-5">
<div class="text-center">
<h1 class="h4 text-gray-900 mb-4">ONLINE BOOK EXCHANGE
PORTAL</h1>
<?php if($error){?><div
class="errorWrap"><strong>ERROR</strong>:<?php echo htmlentities($error); ?> </div><?php
}
else if($msg){?><div class="succWrap"><strong>Error</strong>:<?php echo
htmlentities($msg); ?> </div><?php }?>
</div>
<form class="user" method="post">
<div class="form-group">
<input type="email" class="form-control"
id="email" name="email" aria-describedby="emailHelp"
placeholder="Enter Email Address...">
</div>
<div class="form-group">
<input type="password" name="password" class="form-control"
id="exampleInputPassword" placeholder="Password">
<a class="small" href="forgot-password.php">Forgot
Password</a>
</div>

<input type="submit" name="submit" id="submit" value="Login"


class="btn btn-primary btn-user btn-block">

</form>
<hr>

<div class="text-center">
<a class="small" href="register.php">Create an Account!</a>
</div>
<hr />
<div class="text-center">
<a class="btn btn-primary" href="../index.php">Back to Home Page</a>
</div>
</div>
</div>
</div>
</div>
</div>

</div>

</div>

</div>

<!-- Bootstrap core JavaScript-->


<script src="vendor/jquery/jquery.min.js"></script>
<script src="vendor/bootstrap/js/bootstrap.bundle.min.js"></script>

<!-- Core plugin JavaScript-->


<script src="vendor/jquery-easing/jquery.easing.min.js"></script>

<!-- Custom scripts for all pages-->


<script src="js/sb-admin-2.min.js"></script>

</body>

</html>
<style>
.succWrap{
padding: 10px;
margin: 0 0 20px 0;
background: #dd3d36;
color:#fff;
-webkit-box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);
box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);
}
</style>

Add Book
<?php
session_start();
error_reporting(0);
require_once('include/config.php');
if(strlen( $_SESSION["bookid"])==0)
{
header('location:login.php');
}
else{?>
<?php
if(isset($_POST['submit']))
{
$title=$_POST['title'];
$author=$_POST['author'];
$category=$_POST['category'];
$description=$_POST['description'];
$image=$_POST['image'];
if(empty($title))
{
$nameerror="Please Enter title";
}

else if(empty($author))
{
$mobileerror="Please Enter Author";
}

else{

$file = rand(1000,100000)."-".$_FILES['image']['name'];
$file_loc_upload = $_FILES['image']['tmp_name'];
$file_size = $_FILES['image']['size'];
$file_type = $_FILES['image']['type'];
$folderss="UploadPhoto/";
$new_file_name_photo_upload = strtolower($file);
$final_file_photo_upload=str_replace(' ','-',$new_file_name_photo_upload);
if(move_uploaded_file($file_loc_upload,$folderss.$final_file_photo_upload))
{

$sql="INSERT INTO bookdetails


(title,author,category,description,image)Values(:title,:author,:category,:description,:image)";
$query = $dbh -> prepare($sql);
$query->bindParam(':title',$title,PDO::PARAM_STR);
$query->bindParam(':author',$author,PDO::PARAM_STR);
$query->bindParam(':category',$category,PDO::PARAM_STR);
$query->bindParam(':description',$description,PDO::PARAM_STR);
$query->bindParam(':image',$final_file_photo_upload,PDO::PARAM_STR);

$query -> execute();


$lastInsertId = $dbh->lastInsertId();
if($lastInsertId>0)
{
echo "<script>alert('Registred successfully');</script>";
echo "<script>window.location.href='addbook.php'</script>";
}
else
{
echo "<script>alert('Something went wrong. Please try again.');</script>";
}
}
}
}

}
?>
<!DOCTYPE html>
<html lang="en">

<head>

<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="description" content="">
<meta name="author" content="">

<title>ONLINE BOOK EXCHANGE </title>


<!-- Custom fonts for this template -->
<link href="../vendor/fontawesome-free/css/all.min.css" rel="stylesheet" type="text/css">
<link
href="https://fonts.googleapis.com/css?
family=Nunito:200,200i,300,300i,400,400i,600,600i,700,700i,800,800i,900,900i"
rel="stylesheet">

<!-- Custom styles for this template -->


<link href="../css/sb-admin-2.min.css" rel="stylesheet">
<script src='https://kit.fontawesome.com/a076d05399.js' crossorigin='anonymous'></script>

<!-- Custom styles for this page -->


<link href="../vendor/datatables/dataTables.bootstrap4.min.css" rel="stylesheet">

</head>

<body id="page-top">

<!-- Page Wrapper -->


<div id="wrapper">

<!-- Sidebar -->


<?php include 'include/sidebar.php';?>
<!-- End of Sidebar -->

<!-- Content Wrapper -->


<div id="content-wrapper" class="d-flex flex-column">

<!-- Main Content -->


<div id="content">
<!-- Topbar -->
<?php include 'include/header.php';?>
<!-- End of Topbar -->

<!-- Begin Page Content -->


<div class="container-fluid">

<!-- Page Heading -->


<h1 class="h3 mb-2 text-gray-800">ADD BOOK DETAILS </h1>

<!-- DataTales Example -->


<div class="container">

<div class="card o-hidden border-0 shadow-lg my-5">


<div class="card-body p-0">
<!-- Nested Row within Card Body -->
<div class="row">
<div class="col-lg-12">
<div class="p-5">
<div class="text-center">
<h1 class="h4 text-gray-900 mb-4">ONLINE BOOK EXCHANGE
SYSTEM</h1>
<?php if($error){?><div class="errorWrap"><strong>ERROR</strong>:<?php
echo htmlentities($error); ?> </div><?php }
else if($succmsg){?><div class="succWrap"><strong>SUCCESS</strong>:<?php
echo htmlentities($succmsg); ?> </div><?php }?>
</div>
<form method='post' enctype='multipart/form-data'>
<div class="form-group row">
<div class="col-sm-6">
<label for="name"><strong>BOOK TITLE:</strong></label>
<input type="text" class="form-control" name="title"
id="title"placeholder="BOOK TITLE" value="<?php echo $title; ?>">
<span style="color:red;"><?php echo $nameerror;?></span>
</div>
<div class="col-sm-6">
<label for="mobile"><strong>BOOK AUTHOR:</strong></label>
<input type="text" class="form-control" id="author" name="author"
placeholder="BOOK AUTHOR" maxlength="10" value="<?php echo $author; ?>">
<span style="color:red;"><?php echo $mobileerror;?></span>
</div>
</div>

<div class="form-group row">


<div class="col-sm-6">
<label for="email"><strong>CATEGORY:</strong></label>
<input type="text" class="form-control" name="category"
id="category" placeholder="ENTER CATEGORY" value="<?php echo $category; ?>">
<span style="color:red;"><?php echo $emailerror;?></span>
</div>

</div>

<div class="form-group">
<label for="name"><strong>DESCRIPTION:</strong></label>
<input type="text" class="form-control" name="description"
id="description"placeholder="DESCRIPTION">
<span style="color:red;"><?php echo $description;?></span>
</div>
<div class="form-group row">
<div class="col-sm-6">
<label for="uploadLicenseNo"><strong>BOOK
IMAGE:</strong></label>
<input type="file" class="form-control" name="image"
id="image"placeholder="BOOK IMAGE" value="<?php echo $image;?>">
<span style="color:red;"><?php echo
$uploadLicenseNoerror;?></span>
</div>

<input type="submit" name="submit" id="submit" class="btn btn-primary"


value="Register Now">

</form>
<hr>

<div class="text-center">
<a class="small" href="forgot-password.php">Forgot Password?</a>
</div>
<div class="text-center">
<a class="small" href="login.php">Already have an account? Login!</a>
</div>

</div>
</div>
</div>
</div>
</div>
</div>

<!-- Bootstrap core JavaScript-->


<script src="../vendor/jquery/jquery.min.js"></script>
<script src="../vendor/bootstrap/js/bootstrap.bundle.min.js"></script>

<!-- Core plugin JavaScript-->


<script src="../vendor/jquery-easing/jquery.easing.min.js"></script>

<!-- Custom scripts for all pages-->


<script src="../js/sb-admin-2.min.js"></script>

</body>

</html>

<style>
.errorWrap {
padding: 10px;
margin: 0 0 20px 0;
background: #dd3d36;
color:#fff;
-webkit-box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);
box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);
}
.succWrap{
padding: 10px;
margin: 0 0 20px 0;
background: #5cb85c;
color:#fff;
-webkit-box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);
box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);
}
</style>

All Bookings

<?php
session_start();
error_reporting(0);
require_once('include/config.php');
if(strlen( $_SESSION["bookid"])==0)
{
header('location:login.php');
}
else{?>

<!DOCTYPE html>
<html lang="en">

<head>

<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="description" content="">
<meta name="author" content="">

<title>ONLINE BOOK EXCHANGE</title>

<!-- Custom fonts for this template -->


<link href="../vendor/fontawesome-free/css/all.min.css" rel="stylesheet" type="text/css">
<link
href="https://fonts.googleapis.com/css?
family=Nunito:200,200i,300,300i,400,400i,600,600i,700,700i,800,800i,900,900i"
rel="stylesheet">

<!-- Custom styles for this template -->


<link href="../css/sb-admin-2.min.css" rel="stylesheet">
<script src='https://kit.fontawesome.com/a076d05399.js' crossorigin='anonymous'></script>

<!-- Custom styles for this page -->


<link href="../vendor/datatables/dataTables.bootstrap4.min.css" rel="stylesheet">

</head>

<body id="page-top">

<!-- Page Wrapper -->


<div id="wrapper">

<!-- Sidebar -->


<?php include 'include/sidebar.php';?>
<!-- End of Sidebar -->

<!-- Content Wrapper -->


<div id="content-wrapper" class="d-flex flex-column">

<!-- Main Content -->


<div id="content">

<!-- Topbar -->


<?php include 'include/header.php';?>
<!-- End of Topbar -->

<!-- Begin Page Content -->


<div class="container-fluid">

<!-- Page Heading -->


<h1 class="h3 mb-2 text-gray-800">All Booking List</h1>

<!-- DataTales Example -->


<div class="card shadow mb-4">
<div class="card-header py-3">
<h6 class="m-0 font-weight-bold text-primary">All Booking List</h6>
</div>
<div class="card-body">
<div class="table-responsive">
<table class="table table-bordered" id="dataTable" width="100%"
cellspacing="0">
<thead>
<tr>
<th>Sr No</th>
<th>Booking No.</th>
<th>User Name</th>
<th>User Email</th>
<th>User Mobile</th>
<th>From Date</th>
<th>To Date</th>
<th>User Remark</th>
<th>Status</th>
<th>Driver Remark</th>
<th>Action</th>

</tr>
</thead>
<?php
$uid=$_SESSION['bookid'];
if(isset($_POST['submit']))
{
$bookingidss=$_POST['bookingiddd'];
$status=$_POST['status'];
$remark=$_POST['remark'];

$sql="update bookrequest set status=:status,shopremarks=:shopremarks where id=:bookingid";


$query = $dbh->prepare($sql);
$query->bindParam(':bookingid',$bookingidss,PDO::PARAM_STR);
$query->bindParam(':status',$status,PDO::PARAM_STR);
$query->bindParam(':shopremarks',$remark,PDO::PARAM_STR);

$query->execute();
//$msg="<script>toastr.success('Mobile info updated Successfully', {timeOut: 5000})</script>";
echo "<script>alert('Booked has been updated.');</script>";
echo "<script> window.location.href =bookeddetails.php;</script>";
}
$sql ="SELECT bookrequest.id as bookingid,
tbluser.fname,tbluser.lname,tbluser.email,tbluser.mobile,bookrequest.fromdate,bookrequest.todat
e,bookrequest.status,bookrequest.address,bookrequest.shopremarks,bookrequest.bookingNumber
FROM bookrequest
inner join tbluser
on tbluser.id=bookrequest.userid
where bookrequest.bookshopid=:uid ";
$query= $dbh -> prepare($sql);
$query->bindParam(':uid',$uid, PDO::PARAM_STR);
$query-> execute();
$results = $query -> fetchAll(PDO::FETCH_OBJ);
$cnt=1;
if($query -> rowCount() > 0)
{
foreach($results as $result)
{

?>
<tr>
<td><?php echo($cnt);?></td>
<th><?php echo htmlentities($result->bookingNumber);?></th>
<td><?php echo htmlentities($result->fname);?> <?php echo htmlentities($result-
>lname);?></td>
<td><?php echo htmlentities($result->email);?></td>
<td><?php echo htmlentities($result->mobile);?></td>
<td><?php echo htmlentities($result->fromdate);?></td>
<td><?php echo htmlentities($result->todate);?></td>
<td><?php echo htmlentities($result->shopremarks);?></td>

<td>
<?php
$statusd=$result->status;
if ($statusd=='0') {
echo '<span class="badge badge-primary">Pending</span>';
}
elseif ($statusd=='1') {
echo '<span class="badge badge-success">Approved</span>';
}
elseif ($statusd=='2') {
echo '<span class="badge badge-danger">Cancelled</span>';
}
?>
</td>
<td><?php echo htmlentities($result->driverremarks);?></td>
<td>
<?php $statusid=$result->bookingid;?>

<?php
$statusd=$result->status;
if ($statusd=='0') {?>
<button type="button" class="btn btn-info" data-toggle="modal" data-
target="#myModal<?php echo $statusid; ?>">View</button>

<?php } ?>

</td>

</tr>
<!-- here i am creating a modal popup code......... -->

<div id="myModal<?php echo $statusid; ?>" class="modal fade" role="dialog">


<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">&times;</button>

</div>
<div class="modal-body">
<form method="post">
<div class="row">
<input type="hidden" name="bookingiddd" value="<?php echo htmlentities($result-
>bookingid);?>">
<div class="col-md-12">
<label for="status">Status</label>
<select name="status" id="Status" class="form-control">
<option value="NA">--select--</option>
<option value="1">Approved</option>
<option value="2">Cancelled</option>

</Select>
</div>
</div>
<br></br>
<div class="row">
<div class="col-md-12">
<label for="remark">Remarks</label>
<textarea name="remark" id="remark" class="form-control"></textarea>
</div>
</div>
<input type="submit" id="submit" name="submit" value="submit" class="btn btn-primary mt-
3">
</form>
</div>
</div>
</div>
</div>

<!-- // end modal popup code........ -->

<?php $cnt=$cnt+1; } } ?>


</table>
</div>
</div>
</div>

</div>
<!-- /.container-fluid -->

</div>
<!-- End of Main Content -->

<!-- Footer -->


<?php include 'include/footer.php'; ?>
<!-- End of Footer -->

</div>
<!-- End of Content Wrapper -->
</div>
<!-- End of Page Wrapper -->

<!-- Scroll to Top Button-->


<a class="scroll-to-top rounded" href="#page-top">
<i class="fas fa-angle-up"></i>
</a>

PENDING BOOKING
<?php
session_start();
error_reporting(0);
require_once('include/config.php');
if(strlen( $_SESSION["bookid"])==0)
{
header('location:login.php');
}
else{?>

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="description" content="">
<meta name="author" content="">
<title>ONLINE BOOK EXCHANGE </title>
<!-- Custom fonts for this template -->
<link href="../vendor/fontawesome-free/css/all.min.css" rel="stylesheet" type="text/css">
<link
href="https://fonts.googleapis.com/css?
family=Nunito:200,200i,300,300i,400,400i,600,600i,700,700i,800,800i,900,900i"
rel="stylesheet">

<!-- Custom styles for this template -->


<link href="../css/sb-admin-2.min.css" rel="stylesheet">
<script src='https://kit.fontawesome.com/a076d05399.js' crossorigin='anonymous'></script>
<!-- Custom styles for this page -->
<link href="../vendor/datatables/dataTables.bootstrap4.min.css" rel="stylesheet">
</head>
<body id="page-top">
<!-- Page Wrapper -->
<div id="wrapper">
<!-- Sidebar -->
<?php include 'include/sidebar.php';?>
<!-- End of Sidebar -->
<!-- Content Wrapper -->
<div id="content-wrapper" class="d-flex flex-column">
<!-- Main Content -->
<div id="content">
<!-- Topbar -->
<?php include 'include/header.php';?>
<!-- End of Topbar -->
<!-- Begin Page Content -->
<div class="container-fluid">

<!-- Page Heading -->


<h1 class="h3 mb-2 text-gray-800">Pending Booking</h1>
<!-- DataTales Example -->
<div class="card shadow mb-4">
<div class="card-header py-3">
<h6 class="m-0 font-weight-bold text-primary">Pending Booking</h6>
</div>
<div class="card-body">
<div class="table-responsive">
<table class="table table-bordered" id="dataTable" width="100%"
cellspacing="0">
<thead>
<tr>
<th>Sr No</th>
<th>Booking No.</th>
<th>User Name</th>
<th>User Email</th>
<th>User Mobile</th>
<th>Book Name</th>
<th>From Date</th>
<th>To Date</th>
<th>Address</th>
<th>Status</th>
<th>Shop Remark</th>
<th>Action</th>
</tr>
</thead>
<?php
$uid=$_SESSION['bookid'];
if(isset($_POST['submit']))
{
$bookingidss=$_POST['bookingiddd'];
$status=$_POST['status'];
$remark=$_POST['remark'];
$sql="update tbhiredriver set status=:status,driverremarks=:driverremarks where
id=:bookingid";
$query = $dbh->prepare($sql);
$query->bindParam(':bookingid',$bookingidss,PDO::PARAM_STR);
$query->bindParam(':status',$status,PDO::PARAM_STR);
$query->bindParam(':driverremarks',$remark,PDO::PARAM_STR);

$query->execute();
//$msg="<script>toastr.success('Mobile info updated Successfully', {timeOut: 5000})</script>";
echo "<script>alert('Booked has been updated.');</script>";
echo "<script> window.location.href =bookeddetails.php;</script>";
}
$sql ="SELECT bookrequest.id as bookingid,
tbluser.fname,tbluser.lname,tbluser.email,tbluser.mobile,bookrequest.fromdate,bookrequest.todat
e,bookrequest.status,bookrequest.address,bookrequest.shopremarks,bookrequest.bookingNumber
FROM bookrequest
inner join tbluser
on tbluser.id=bookrequest.userid
where bookrequest.bookshopid=:uid and bookrequest.status='0'";
$query= $dbh -> prepare($sql);
$query->bindParam(':uid',$uid, PDO::PARAM_STR);
$query-> execute();
$results = $query -> fetchAll(PDO::FETCH_OBJ);
$cnt=1;
if($query -> rowCount() > 0)
{
foreach($results as $result)
{

?>
<tr>
<td><?php echo($cnt);?></td>
<th><?php echo htmlentities($result->bookingNumber);?></th>
<td><?php echo htmlentities($result->fname);?> <?php echo htmlentities($result-
>lname);?></td>
<td><?php echo htmlentities($result->email);?></td>
<td><?php echo htmlentities($result->mobile);?></td>
<td><?php echo htmlentities($result->fromdate);?></td>
<td><?php echo htmlentities($result->todate);?></td>
<td><?php echo htmlentities($result->remark);?></td>

<td>

<?php
$statusd=$result->status;
if ($statusd=='0') {
echo '<span class="badge badge-primary">Pending</span>';
}
elseif ($statusd=='1') {
echo '<span class="badge badge-success">Approved</span>';
}
elseif ($statusd=='2') {
echo '<span class="badge badge-danger">Cancel</span>';
}
?>
</td>
<td><?php echo htmlentities($result->driverremarks);?></td>
<td>
<?php $statusid=$result->bookingid;?>
<?php
$statusd=$result->status;
if ($statusd=='0') {?>
<button type="button" class="btn btn-info" data-toggle="modal" data-
target="#myModal<?php echo $statusid; ?>">View</button>

<?php } ?>

</td>
</tr>

<!-- here i am creating a modal popup code......... -->

<div id="myModal<?php echo $statusid; ?>" class="modal fade" role="dialog">


<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">&times;</button>

</div>
<div class="modal-body">
<form method="post">
<div class="row">
<input type="hidden" name="bookingiddd" value="<?php echo htmlentities($result-
>bookingid);?>">
<div class="col-md-12">
<label for="status">Status</label>
<select name="status" id="Status" class="form-control">
<option value="NA">--select--</option>
<option value="1">Approved</option>
<option value="2">Cancelled</option>
</Select>
</div>
</div>
<br></br>
<div class="row">
<div class="col-md-12">
<label for="remark">Remarks</label>
<textarea name="remark" id="remark" class="form-control"></textarea>
</div>
</div>
<input type="submit" id="submit" name="submit" value="submit" class="btn btn-primary mt-
3">
</form>
</div>
</div>
</div>
</div>
<!-- // end modal popup code........ -->
<?php $cnt=$cnt+1; } } ?>
</table>
</div>
</div>
</div>

</div>
<!-- /.container-fluid -->
</div>
<!-- End of Main Content -->
<!-- Footer -->
<?php include 'include/footer.php'; ?>
<!-- End of Footer -->
</div>
<!-- End of Content Wrapper -->
</div>
<!-- End of Page Wrapper -->
<!-- Scroll to Top Button-->
<a class="scroll-to-top rounded" href="#page-top">
<i class="fas fa-angle-up"></i>
</a>

<!-- Bootstrap core JavaScript-->


<script src="../vendor/jquery/jquery.min.js"></script>
<script src="../vendor/bootstrap/js/bootstrap.bundle.min.js"></script>
<!-- Core plugin JavaScript-->
<script src="../vendor/jquery-easing/jquery.easing.min.js"></script>
<!-- Custom scripts for all pages-->
<script src="../js/sb-admin-2.min.js"></script>
<!-- Page level plugins -->
<script src="../vendor/datatables/jquery.dataTables.min.js"></script>
<script src="../vendor/datatables/dataTables.bootstrap4.min.js"></script>
<!-- Page level custom scripts -->
<script src="../js/demo/datatables-demo.js"></script>
</body>
</html>
<?php } ?>

User Register

<?php
error_reporting(0);
require_once('include/config.php');
if(isset($_POST['submit']))
{
$fname=$_POST['fname'];
$lname=$_POST['lname'];
$mobile=$_POST['mobile'];
$email=$_POST['email'];
$Password=$_POST['Password'];
$pass=md5($Password);
$RepeatPassword = $_POST['RepeatPassword'];

// Email id Already Exit

$usermatch=$dbh->prepare("SELECT mobile,email FROM tbluser WHERE (email=:usreml ||


mobile=:mblenmbr)");
$usermatch->execute(array(':usreml'=>$email,':mblenmbr'=>$mobile));
while($row=$usermatch->fetch(PDO::FETCH_ASSOC))
{
$usrdbeml= $row['email'];
$usrdbmble=$row['mobile'];
}

if(empty($fname))
{
$nameerror="Please Enter First Name";
}

else if(empty($mobile))
{
$mobileerror="Please Enter Mobile No";
}
else if(empty($email))
{
$emailerror="Please Enter Email";
}

else if($email==$usrdbeml || $mobile==$usrdbmble)


{
$error="Email Id or Mobile Number Already Exists!";
}
else if($Password=="" || $RepeatPassword=="")
{

$error="Password And Confirm Password Not Empty!";

}
else if($_POST['Password'] != $_POST['RepeatPassword'])
{

$error="Password And Confirm Password Not Matched";


}

else{
$sql="INSERT INTO tbluser (fname,lname,email,mobile,password)
Values(:fname,:lname,:email,:mobile,:Password)";

$query = $dbh -> prepare($sql);


$query->bindParam(':fname',$fname,PDO::PARAM_STR);
$query->bindParam(':lname',$lname,PDO::PARAM_STR);
$query->bindParam(':email',$email,PDO::PARAM_STR);
$query->bindParam(':mobile',$mobile,PDO::PARAM_STR);
$query->bindParam(':Password',$pass,PDO::PARAM_STR);

$query -> execute();


$lastInsertId = $dbh->lastInsertId();
if($lastInsertId>0)
{
echo "<script>alert('Registred successfully');</script>";
echo "<script>window.location.href='login.php'</script>";
}
else
{
echo "<script>alert('Something went wrong. Please try again.');</script>";
}
}
}

?>

<!DOCTYPE html>
<html lang="zxx">

<head>
<meta charset="UTF-8">
<meta name="description" content="Fashi Template">
<title>Fashi | Template</title>

<!-- Google Font -->


<link href="https://fonts.googleapis.com/css?
family=Muli:300,400,500,600,700,800,900&display=swap" rel="stylesheet">
<!-- Css Styles -->
<link rel="stylesheet" href="css/bootstrap.min.css" type="text/css">
<link rel="stylesheet" href="css/font-awesome.min.css" type="text/css">
<link rel="stylesheet" href="css/themify-icons.css" type="text/css">
<link rel="stylesheet" href="css/jquery-ui.min.css" type="text/css">
<link rel="stylesheet" href="css/style.css" type="text/css">
</head>

<body>

<!-- Header Section Begin -->


<?php include 'include/header.php'; ?>
<!-- Header End -->

<div class="breacrumb-section">
<div class="container">
<div class="row">
<div class="col-lg-12">
<div class="breadcrumb-text">
<a href="#"><i class="fa fa-home"></i> Home</a>
<span>Register</span>
</div>
</div>
</div>
</div>
</div>
<div class="register-login-section spad">
<div class="container">
<div class="row">
<div class="col-lg-10 offset-lg-1">
<center><h4>Register</h4>
<?php if($error){?><div class="errorWrap"><strong>ERROR</strong>:<?
php echo htmlentities($error); ?> </div><?php }
else if($succmsg){?><div class="succWrap"><strong>SUCCESS</strong>:<?php
echo htmlentities($succmsg); ?> </div><?php }?><br><br></center>
<div class="">
<div class="register-form">

<form class="comment-form" method="post">


<div class="row">
<div class="group-input col-sm-6">
<label for="name">First Name:</label>
<input type="text" class="form-control" name="fname" id="fname"
value="<?php echo $fname; ?>" required="">
<span style="color:red;"><?php echo $nameerror;?></span>
</div>
<div class="group-input col-sm-6">
<label for="name">Last Name:</label>
<input type="text" class="form-control" name="lname" id="lname"
value="<?php echo $lname; ?>" required="">

</div>
<div class="group-input col-sm-6">
<label for="email">Email:</label>
<input type="email" class="form-control" name="email" id="email"
value="<?php echo $email; ?>" required="">
<span style="color:red;"><?php echo $emailerror;?></span>
</div>

<div class="group-input col-sm-6">


<label for="mobile">Mobile:</label>
<input type="text" class="form-control" id="mobile" name="mobile"
maxlength="10" value="<?php echo $mobile; ?>" required="">
<span style="color:red;"><?php echo $mobileerror;?></span>
</div>
<div class="group-input col-sm-6">
<label for="name">Password:</label>
<input type="password" class="form-control" name="Password"
id="Password" required="">

</div>
<div class="group-input col-sm-6">
<label for="con-pass">Confirm Password *</label>
<input type="password" class="form-control" name="RepeatPassword"
id="RepeatPassword" required="">

</div>

</div>
<input type="submit" name="submit" id="submit" class="site-btn register-btn"
value="Register Now">

</form>
<div class="switch-login">
<a href="login.php" class="or-login">Or Login</a>
</div>
</div>
</div>
</div>
</div>
</div>
</div>

<!-- Footer Section Begin -->


<?php include 'include/footer.php'; ?>
<!-- Footer Section End -->

<!-- Js Plugins -->


<script src="js/jquery-3.3.1.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/jquery-ui.min.js"></script>
<script src="js/jquery.countdown.min.js"></script>
<script src="js/jquery.zoom.min.js"></script>
<script src="js/jquery.dd.min.js"></script>
<script src="js/jquery.slicknav.js"></script>
<script src="js/owl.carousel.min.js"></script>
<script src="js/main.js"></script>
</body>

</html>

<style>
.errorWrap {
padding: 10px;
margin: 0 0 20px 0;
background: #dd3d36;
color:#fff;
-webkit-box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);
box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);
}
.succWrap{
padding: 10px;
margin: 0 0 20px 0;
background: #5cb85c;
color:#fff;
-webkit-box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);
box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);
}
</style>
User Login

<?php
session_start();
error_reporting(0);
require_once('include/config.php');
$msg = "";
if(isset($_POST['submit'])) {
$email = trim($_POST['email']);
$password = md5(($_POST['password']));
if($email != "" && $password != "") {
try {
$query = "select id, fname, lname, email, mobile, password, address, create_date from tbluser
where email=:email and password=:password";
$stmt = $dbh->prepare($query);
$stmt->bindParam('email', $email, PDO::PARAM_STR);
$stmt->bindValue('password', $password, PDO::PARAM_STR);
$stmt->execute();
$count = $stmt->rowCount();
$row = $stmt->fetch(PDO::FETCH_ASSOC);
if($count == 1 && !empty($row)) {
/******************** Your code ***********************/
$_SESSION['uid'] = $row['id'];
$_SESSION['email'] = $row['email'];
$_SESSION['name'] = $row['fname'];
header("location: index.php");
} else {
$msg = "Invalid username and password!";
}
} catch (PDOException $e) {
echo "Error : ".$e->getMessage();
}
} else {
$msg = "Both fields are required!";
}
}
?>

<!DOCTYPE html>
<html lang="zxx">

<head>
<meta charset="UTF-8">
<meta name="description" content="Fashi Template">
<title>DHMS | User Login</title>

<!-- Google Font -->


<link href="https://fonts.googleapis.com/css?
family=Muli:300,400,500,600,700,800,900&display=swap" rel="stylesheet">

<!-- Css Styles -->


<link rel="stylesheet" href="css/bootstrap.min.css" type="text/css">
<link rel="stylesheet" href="css/font-awesome.min.css" type="text/css">
<link rel="stylesheet" href="css/themify-icons.css" type="text/css">
<link rel="stylesheet" href="css/jquery-ui.min.css" type="text/css">
<link rel="stylesheet" href="css/style.css" type="text/css">
</head>

<body>

<!-- Header Section Begin -->


<?php include 'include/header.php'; ?>
<!-- Header End -->

<div class="breacrumb-section">
<div class="container">
<div class="row">
<div class="col-lg-12">
<div class="breadcrumb-text">
<a href="#"><i class="fa fa-home"></i> Home</a>
<span>Login</span>
</div>
</div>
</div>
</div>
</div>
<div class="register-login-section spad">
<div class="container">
<div class="row">
<div class="col-lg-6 offset-lg-3">
<div class="login-form">
<h2>Login</h2>
<?php if($error){?><div class="errorWrap"><strong>ERROR</strong>:<?php
echo htmlentities($error); ?> </div><?php }
else if($msg){?><div class="succWrap"><strong>Error</strong>:<?php echo
htmlentities($msg); ?> </div><?php }?>
<form method="post">
<div class="group-input">
<label for="email">Username or email address *</label>
<input type="text" id="email" name="email" autocomplete="">
</div>
<div class="group-input">
<label for="pass">Password *</label>
<input type="text" id="password" name="password" autocomplete="">
<a href="forgot-password.php">Forgot Password</a>
</div>

<input type="submit" name="submit" id="submit" value="Sign In"


class="site-btn login-btn">
</form>
<div class="switch-login">
<a href="register.php" class="or-login">Or Create An Account</a>
</div>
</div>
</div>
</div>
</div>
</div>

<!-- Footer Section Begin -->


<?php include 'include/footer.php'; ?>
<!-- Footer Section End -->

<!-- Js Plugins -->


<script src="js/jquery-3.3.1.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/jquery-ui.min.js"></script>
<script src="js/jquery.countdown.min.js"></script>
<script src="js/jquery.zoom.min.js"></script>
<script src="js/jquery.dd.min.js"></script>
<script src="js/jquery.slicknav.js"></script>
<script src="js/owl.carousel.min.js"></script>
<script src="js/main.js"></script>
</body>

</html>

<style>
.succWrap{
padding: 10px;
margin: 0 0 20px 0;
background: #dd3d36;
color:#fff;
-webkit-box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);
box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);
}
</style>

User Index
<?php
session_start();
error_reporting(0);
require_once('include/config.php');
$uid=$_SESSION['uid'];
if(isset($_POST['submit']))
{
$useridd=$_POST['useridd'];
$bookid=$_POST['bookid'];
$title=$_POST['title'];
$fromdate=$_POST['fromdate'];
$todate=$_POST['todate'];
$address=$_POST['address'];
$bookingno=mt_rand(100000000, 999999999);

$sql="INSERT INTO
bookrequest(bookingNumber,userid,bookshopid,title,fromdate,todate,address)Values(:bookingno
,:useridd,:bookid,:title,:fromdate,:todate,:address)";
$query= $dbh->prepare($sql);
$query->bindParam(':bookingno',$bookingno,PDO::PARAM_STR);
$query->bindParam(':useridd',$useridd,PDO::PARAM_STR);
$query->bindParam(':bookid',$bookid,PDO::PARAM_STR);
$query->bindParam(':title',$title,PDO::PARAM_STR);
$query->bindParam(':fromdate',$fromdate,PDO::PARAM_STR);
$query->bindParam(':todate',$todate,PDO::PARAM_STR);
$query->bindParam(':address',$address,PDO::PARAM_STR);

$query -> execute();


$lastInsertId = $dbh->lastInsertId();
if($lastInsertId>0)
{
echo "<script>alert(' Book Requested Successfully');</script>";
echo "<script type='text/javascript'> document.location = 'booking-history.php'; </script>";
}else
{ echo "<script>alert('Something went wrong. Please try again.');</script>";
echo "<script type='text/javascript'> document.location = 'booking-history.php'; </script>";
}}
?>

<!DOCTYPE html>
<html lang="zxx">

<head>
<meta charset="UTF-8">
<meta name="description" content="Fashi Template">
<title>ONLINE BOOK EXCHANGE SYSTEM</title>

<!-- Google Font -->


<link href="https://fonts.googleapis.com/css?
family=Muli:300,400,500,600,700,800,900&display=swap" rel="stylesheet">

<!-- Css Styles -->


<link rel="stylesheet" href="css/bootstrap.min.css" type="text/css">
<link rel="stylesheet" href="css/font-awesome.min.css" type="text/css">
<link rel="stylesheet" href="css/themify-icons.css" type="text/css">
<link rel="stylesheet" href="css/jquery-ui.min.css" type="text/css">
<link rel="stylesheet" href="css/style.css" type="text/css">
</head>

<body>

<!-- Header Section Begin -->


<?php include 'include/header.php'; ?>
<!-- Header End -->

<section class="product-shop spad">


<div class="container">
<div class="row">
<div class="col-lg-12 order-1 order-lg-2">

<div class="product-list">
<div class="row">
<?php
include 'include/config.php';
$sql ="SELECT id, title, author, category, description, image from bookdetails";
$query= $dbh -> prepare($sql);
$query-> execute();
$results = $query -> fetchAll(PDO::FETCH_OBJ);
$cnt=1;
if($query -> rowCount() > 0)
{
foreach($results as $result)
{
?>
<div class="col-lg-3 col-sm-6">
<div class="product-item">

<img src="book/UploadPhoto/<?php echo htmlentities($result-


>image);?>" alt="" style="width: 200px; height: 200px;">
<?php $bookuid=$result->id;?>
<div class="pi-text">
<!-- <h5><?php echo htmlentities($result->title);?></h5></a> -->

<h5 style="cursor:pointer" data-toggle="modal" data-target="#myModalss<?


php echo $bookuid; ?>">
<?php echo htmlentities($result->title);?></h5>
<div class="product-price">
<?php if(strlen($_SESSION['uid'])==0): ?>
<a class="btn btn-info" href="login.php">Request Book</a>
<?php else :?>
<button type="button" class="btn btn-info" data-toggle="modal" data-target="#myModal<?php
echo $bookuid; ?>">Request Book</button>
<?php endif;?>
</div>

</div>
</div>
</div>

<!-- here i am creating a modal popup code......... -->

<div id="myModalss<?php echo $bookuid; ?>" class="modal fade" role="dialog">


<div class="modal-dialog modal-lg ">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">&times;</button>

</div>
<div class="modal-body">

<div class="row">
<table style="width:100%">
<tr>
<th>BOOK NAME</th>
<td><?php echo htmlentities($result->title);?></td>

</tr>
<tr>
<th>AUTHOR</th>
<td><?php echo htmlentities($result->author);?></td>

</tr>
<tr>
<th>CATEGORY</th>
<td><?php echo htmlentities($result->category);?></td>

</tr>
<tr>
<th>DESCRIPTION</th>
<td><?php echo htmlentities($result->description);?></td>
</tr>
<tr>
<th>BOOK IMAGE</th>
<td><img src="book/UploadPhoto/<?php echo htmlentities($result->image);?>" alt=""
style="width: 150px; height: 150px;">
</td>
</tr>

</table>

</div>
</div>
</div>
</div>
</div>

<!-- // end modal popup code........ -->


<!-- here i am creating a modal popup code......... -->
<div id="myModal<?php echo $bookuid; ?>" class="modal fade" role="dialog">
<div class="modal-dialog modal-lg ">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">&times;</button>
</div>
<div class="modal-body">
<form method="post">
<div class="row">
<div class="col-md-6">
<input type="text" required class="form-control datepicker" id="fromdate"
placeholder="Enter From Date" name="fromdate" autocomplete="off" data-date-format="yyyy-
mm-dd">
<input type="hidden" name="useridd" id="useridd" value="<?php echo $uid; ?
>">
<input type="hidden" name="bookid"
id="bookid" value="<?php echo $bookuid;?>">
</div>
<br></br>
<div class="col-md-6">
<input type="text" required class="form-control datepicker"
placeholder="Enter To Date" name="todate" id="todate" autocomplete="off" data-date-
format="yyyy-mm-dd"> </div>
</div>
<br></br>
<div class="row">
<div class="col-md-12">
<input type="text" name="title" id="title"
class="form-control" placeholder="Enter Book Name" value="">
</div>
</div>
<br><br>
<div class="row">
<div class="col-md-12">
<textarea name="address" id="address" class="form-control"
placeholder="Enter Address"></textarea>
</div>
</div>

<input type="submit" id="submit" name="submit" value="submit" class="btn btn-


primary mt-3"> </form>
</div>
</div>
</div>
</div>

<!-- // end modal popup code........ -->

<?php $cnt=$cnt+1; } } ?>

</div>
</div>

</div>
</div>
</div>
</section>
<!-- Footer Section Begin -->
<?php include 'include/footer.php'; ?>
<!-- Footer Section End -->

<!-- Js Plugins -->


<script src="js/jquery-3.3.1.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/jquery-ui.min.js"></script>
<script src="js/jquery.countdown.min.js"></script>
<script src="js/jquery.zoom.min.js"></script>
<script src="js/jquery.dd.min.js"></script>
<script src="js/jquery.slicknav.js"></script>
<script src="js/owl.carousel.min.js"></script>
<script src="js/main.js"></script>

<link rel="stylesheet" type="text/css"


href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.9.0/css/bootstrap-
datepicker.css">
<script src = "https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-
datepicker/1.9.0/js/bootstrap-datepicker.js"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js"></
script>
</head>
</body>

</html>

<style>
.product-item .pi-text {
text-align: center;
padding-top: 6px!important;
}
</style>

<script type="text/javascript">

$('.datepicker').datepicker({
startDate: new Date()
});

</script>
CHAPTER-7
7. SOFTWARE DESCRIPTION
7.1 SYSTEM TESTING
The purpose of testing is to discover errors. Testing is the process of trying to discover
every conceivable fault or weakness in a work product. It provides a way to check the
functionality of components, sub-assemblies

, assemblies and/or a finished product It is the process of exercising software with the intent of
ensuring that the software system meets its requirements and user expectations and does not fail
in an unacceptable manner. There are various types of test. Each test type addresses a specific
testing requirement.

TYPES OF TESTS

UNIT TESTING

Unit testing involves the design of test cases that validate that the internal program logic is
functioning properly, and that program inputs produce valid outputs. All decision branches and
internal code flow should be validated. It is the testing of individual software units of the
application .it is done after the completion of an individual unit before integration. This is a
structural testing, that relies on knowledge of its construction and is invasive. Unit tests perform
basic tests at component level and test a specific business process, application, and/or system
configuration. Unit tests ensure that each unique path of a business process performs accurately
to the documented specifications and contains clearly defined inputs and expected results.
INTEGRATION TESTING
Integration tests are designed to test integrated software components to determine if they
actually run as one program. Testing is event driven and is more concerned with the basic
outcome of screens or fields. Integration tests demonstrate that although the components were
individually satisfaction, as shown by successfully unit testing, the combination of components is
correct and consistent. Integration testing is specifically aimed at exposing the problems that
arise from the combination of components.

Functional test
Functional tests provide systematic demonstrations that functions tested are available as
specified by the business and technical requirements, system documentation, and user manuals.

Functional testing is centered on the following items:

Valid Input

: identified classes of valid input must be accepted.

Invalid Input : identified classes of invalid input must be rejected.

Functions : identified functions must be exercised.

Output : identified classes of application outputs must be exercised.

Systems/Procedures: interfacing systems or procedures must be invoked.

Organization and preparation of functional tests is focused on requirements, key functions, or


special test cases. In addition, systematic coverage pertaining to identify Business process flows;
data fields, predefined processes, and successive processes must be considered for testing.
Before functional testing is complete, additional tests are identified and the effective value of
current tests is determined.

SYSTEM TESTING
System testing ensures that the entire integrated software system meets requirements. It tests a
configuration to ensure known and predictable results. An example of system testing is the
configuration oriented system integration test. System testing is based on process descriptions
and flows, emphasizing pre-driven process links and integration points.

WHITE BOX TESTING


White Box Testing is a testing in which in which the software tester has knowledge of the
inner workings, structure and language of the software, or at least its purpose. It is purpose. It is
used to test areas that cannot be reached from a black box level.

BLACK BOX TESTING


Black Box Testing is testing the software without any knowledge of the inner workings,
structure or language of the module being tested. Black box tests, as most other kinds of tests,
must be written from a definitive source document, such as specification or requirements
document, such as specification or requirements document. It is a testing in which the software
under test is treated, as a black box .you cannot “see” into it. The test provides inputs and
responds to outputs without considering how the software works.

ACCEPTANCE TESTING

User Acceptance Testing is a critical phase of any project and requires significant
participation by the end user. It also ensures that the system meets the functional requirements.

Test Results: All the test cases mentioned above passed successfully. No defects encountered.
CHAPTER -8

8. SYSTEM IMPLEMENTATION

IMPLEMENTATION PLAN:
Implementation is the state in the system where the theoretical design is turned
into a working system. The most crucial stage in achieving a new successful system and in
giving confidence on the new system for the users that will work efficiently and effectively. The
system can be implemented only after thorough testing is done and if found to work according to
the specification.

It involves careful planning, investigation of the current system and its constraints
on implementation, design of methods to achieve the changeover, an evaluation of changeover
methods apart from planning. Two major tasks of preparing the implementation are education,
training of the users and testing the systems. System analysis and design efforts will be more for
complex systems beings implemented. Based on policies of individuals’ organization an
implementation coordinating committee has been appointed.

IMPLEMENTATION PROCESS:
The implementation process begins with preparing a plain for the implementation
system. According to this plan, the other activities are to be carried out. In this plan, discussion
has been made regarding the equipment, resources and how to test the activities. Thus a clear
plan is preparing for the activities.

EQUIPMENT ACQUISITION:
One of the most important development activities is the code of programming.
The system According to the above plan, the necessary equipment has to be acquired to
implement the new system.

USER MANUALS:
Once planning has been completed the major effort of the computer department is
to ensure that the user department consists of education and trained staff, as the system becomes
more complex. The success of a system depends upon how they are operated and used. Thus the
quality of training, the personnel is connected to the success of the system.

For this purpose system and user manuals are prepared. In system manuals,
details about the forms and blocks triggers which were used to develop them were specified. In
user manuals data flow diagrams, charts and screen formats are given. Also error messages
associated were explained in details. The users were shown the success and they were taught
how to operate the system. Live demonstration and visuals aids were used to teach them.

CHAPTER-9

9. SCREEN LAYOUT AND CONCLUSION

9.1 Screen Layout

Admin Login

Dashboard
View User Details

View Book Shop Details


User Index
User Register
User Login

Book Request

Booking History
MY PROFILE
Change Password
Book Shop Register

BOOK SHOP LOGIN


Book shop Dashboard

All Bookings
Approved Booking

Add Books
9.2 Conclusion
Online Exchange bookstore has many advantages compared to its counterparts such as
physical book store, the online bookstore allows it's user to shop at one place where in physical
store the books are scattered at the different places which consumes a lot of time and online
bookstore helps in saving that time and it also avoids the problem of unavailability of books at
physical store as numerous vendors from different places sell their books at one place. This
project is efficient in maintaining users records and can perform operations on it, also reduces the
work load on the shop owner of knowing the quantity of books available and which books are
available and keeps the records .
CHAPTER-10

10.FUTURE ENHANCEMENT

Software development is never –ending process and continues the life of the software as
per the changing needs of the user from time to time. The project is no doubt has been developed
keeping in mind easy modification and enhancement that may be required from time to time.

However, there are many scopes to modify this software. As because due to shortage of
time, we here become unable to include many things. We are trying to cover all their existing
system for sales return records of the items but due to shortage of time we become unable to
include many things. Due to lake of time I here include none of them and a future scope one can
develop these returns which are so much essential. Only with a little more doing it is possible to
design the formats for those returns. Moreover, an on-line system will be more helpful to the
organization. . With almost the same data with only a little modification an on-line system can be
designed to fulfill their demands. All these can be considered to be future scope for this project.
CHAPTER-11

11. BIBLIOGRAPHY

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

For Software Engineering

 https://www.tutorialspoint.com/software_engineering

You might also like