0% found this document useful (0 votes)
3K views49 pages

Online Pet Shop Management System

The document describes an online pet shop management system created using PHP for the front end and MySQL for the back end. It allows users to buy and sell pets online by providing seller and buyer contact details. The current manual system is inefficient so the online system was created to improve records management, scheduling, and transactions. It provides an efficient platform for both customers and shop management.

Uploaded by

VENNILA G MCA
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3K views49 pages

Online Pet Shop Management System

The document describes an online pet shop management system created using PHP for the front end and MySQL for the back end. It allows users to buy and sell pets online by providing seller and buyer contact details. The current manual system is inefficient so the online system was created to improve records management, scheduling, and transactions. It provides an efficient platform for both customers and shop management.

Uploaded by

VENNILA G MCA
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 49

1.

INTRODUCTION

The aim of this project entitled “ONLINE PET SHOP MANAGEMENT SYSTEM” is
an online platform that will be used in order for the management provide updates and
information through the use of this website. Through this project we are planning to
digitalize this process by online marketing. Thus the individuals can also rely on other
persons across the district in order to buy variety breeds of pets. People could also be able to
come to know about the different price ranges for the same breed offered by different
persons. Thus our app provides a platform where the users could buy or sell pets by
providing the contact details of the buyers/sellers..
The current setup is being done manually; records management, appointment scheduling
and other transactions are based on pen, paper and folder methods, in line with those problems,
efficiency of outputs are also affected. With the citation of the problems encountered in the
manual setup of business, the researchers and developers decided to create an information system
that will replace the manual method of records management.
. The entire project has been developed using PHP as front end and MYSQL Server as
the back end.

1
1.1 ORGANIZATION PROFILE

KING SOFTWARE TECHNOLOGIES

As a part of services, FSL provides product requirement analysis, software/system

design, implementation, testing and release support (Software Development) to companies. We

also do Web Designing/ Development/Presentation and also provide SEO (Search Engine

Optimization) to our clients. Among the very few, we are those who provide value based

solutions with decreased IT support cost wherein delivering increased transaction volume with

efficient, productive and lower defects. Being a product and services company, FSL has varied

software products in its forte, which includes ERP Solutions, CRM Solutions, and Financial

Domain Solutions, HR and Payroll etc. FSL Software Technologies has always treated its

customers as king, and have always had strong client retention capabilities.

2
1.2 SYSTEM SPECIFICATION

1.2.1 HARDWARE REQUIREMENTS

Processor : Hi 5
Hard disk : 1 TB
Mouse : Logitech.
RAM : 4GB (minimum)
Keyboard : 110 keys enhanced.

1.2.2 SOFTWARE REQUIREMENTS

Operating system : Windows 8 / 10

IDE : Visual studio code

Front End : PHP

Back End : MYSQL

Design : HTML, CSS

Browser : Internet explorer, Firefox.

3
1.2.2.1 ABOUT THE SOFTWARE

FRONT END-PHP

PHP is a server-side scripting language designed for web development but also used as a
general-purpose programming language. As of January 2013, PHP was installed on more than
240 million websites is now produced by The PHP Group. While PHP originally stood for
Personal Home Page, it now stands for PHP Hypertext Preprocessor, which is a recursive
backronym.
PHP code can be simply mixed with HTML code, or it can be used in combination with
various tinplating engines and web frameworks. PHP code is usually processed by a PHP
interpreter, which is usually implemented as a web server's native module or a Common
Gateway Interface (CGI) executable. After the PHP code is interpreted and executed, the web
server sends resulting output to its client, usually in form of a part of the generated web page for
example, PHP code can generate a web page's HTML code, an image, or some other data. PHP
has also evolved to include a command-line interface (CLI) capability and can be used in
standalone graphical applications.
The canonical PHP interpreter, powered by the Zend Engine, is free software released
under the PHP License.
Despite its popularity, no written specification or standard existed for the PHP language
until 2014, leaving the canonical PHP interpreter as a de facto standard. Since 2014, there is
ongoing work on creating a formal PHP
The PHP interpreter only executes PHP code within its delimiters. Anything outside its
delimiters is not processed by PHP (although non-PHP text is still subject to control structures
described in PHP code.
The first form of delimiters, <?php and ?>, in XHTML and other XML documents,
creates correctly formed XML processing instructions. This means that the resulting mixture of
PHP code and other markup in the server-side file is itself well-formed XML

4
Unlike function and class names, variable names are case sensitive. Both double-quoted
and heredoc strings provide the ability to interpolate a variable's value into the string. PHP treats
newlines as whitespace in the manner of a free-form language, and statements are terminated by
a semicolon. PHP has three types of comment syntax: /* */ marks block and inline comments as
well as # are used for one-line comments. The echo statement is one of several facilities PHP
provides to output text to a web browser.
In terms of keywords and language syntax, PHP is similar to most high level
languages that follow the C style syntax. if conditions, for and while loops, and function returns
are similar in syntax to languages such as C, C++, C#, Java and Perl.
Data types
PHP stores whole numbers in a platform-dependent range, either a 64-bit or 32-bit
signedinteger equivalent to the C-language long type. Unsigned integers are converted to signed
values in certain situations this behavior is different from other programming languages. Integer
variables can be assigned using decimal (positive and negative), octal, hexadecimal, and binary
notations.
Floating point numbers are also stored in a platform-specific range. They can be
specified using floating point notation, or two forms of scientific notation. PHP has a native
Boolean type that is similar to the native Boolean types in Java and C++. Using the Boolean type
conversion rules, non-zero values are interpreted as true and zero as false, as in Perl and C++.
The null data type represents a variable that has no value. NULL is the only allowed value
for this data type.
Variables of the resource type represent references to resources from external sources.
These are typically created by functions from a particular extension, and can only be processed
by functions from the same extension examples include file, image, and database resources.

5
BACKEND MySQL:

Structure Query Language is a database query language used for storing and managing data
in Relational DBMS. SQL was the first commercial language introduced for E.F Codd's
Relational model of database. Today almost all RDBMS use SQL as the standard database
query language. SQL is used to perform all types of data operations in RDBMS.
 SQL stands for Structured Query Language. It is used for storing and managing data
in relational database management system (RDMS).
 It is a standard language for Relational Database System. It enables a user to create,
read, update and delete relational databases and tables.
 All the RDBMS like MySQL, Informix, Oracle, MS Access and SQL Server use SQL
as their standard database language.
 SQL allows users to query the database in a number of ways, using English-like
statements

Features of MySQL:

 MySQL is a Relational Database Management System or RDBMS which means that


it stores and presents data in tabular form, organized in rows and columns.
 MySQL is more secure as it consists of a solid data security layer to protect sensitive
data from intruders and passwords in MySQL are encrypted.
 MySQL is available for free to download and use from the official site of MySQL.
 MySQL is compatible with most of the operating systems, including Windows,
Linux, NetWare, Novell, Solaris and other variations of UNIX.
 MySQL provides the facility to run the clients and the server on the same computer or
on different computers, via internet or local network.
 MySQL has a unique storage engine architecture which makes it faster, cheaper and
more reliable.

6
 MySQL gives developers higher productivity by using views, Triggers and Stored
procedures
 MySQL is simple and easy to use. You can build and interact with MySQL with only the
basic knowledge of MySQL and a few simple SQL statements.
 MySQL has a client-server architecture. There can be any number of clients or
application programs which communicate with the database server (MySQL) to query
data, save changes, etc.
 MySQL is scalable and capable of handling more than 50 million rows. This is enough to
handle almost any amount of data. Although the default file size limit is 4GB but it can
be increased to 8TB.
 MySQL allows transactions to be rolled back.
 MySQL is very flexible as it supports a large number of embedded applications.

RDBMS:

RDBMS is the collection of programs and capabilities that enables the user to interact with a
relational database. A relational database management system (RDBMS) is a type of DBMS
with a row-based table structure. Most commercial RDBMSes use SQL. The most basic
RDBMS functions are related to create, read, update and delete operations, collectively
known as the CRUD cycle.

Features of RDBMS:

 An RDBMS is easily accessible using SQL commands.


 An RDBMS provides full data independence.
 The basic unit of data storage in a relational database is called a table.
 A table consists of tuples/rows/records and each record has one or more columns used
to store values.
 In RDBMS, we can use conditional operations such as joins and restrictions.

7
2. SYSTEM STUDY

System analysis aims at establishing requests for the system to be acquired, developed
and installed. It involves studying and analyzing the ways of an organization currently
processing the data to produce information. Analyzing the problem thoroughly forms the vital
part of the system study.

2.1 EXISTING SYSTEM


Existing system refers to the system that is being followed till now. The existing system
requires more computational time, more manual calculations, and the complexity involved in
Selection of features is high. The other disadvantages are lack of security of data, Deficiency of
Data accuracy, Time consuming etc. To avoid all these limitations and make the working more
accurately the system needs to be computerized.

2.1.1 DRAWBACKS OF EXISTING SYSTEM

 Lack of security of data.


 More man power.
 Time consuming.
 Consumes large volume of pare work.
 Needs manual calculations.
 No direct role for the higher officials.
 Damage of machines due to lack of attention.
 To avoid all these limitations and make the working more accurately the system
needs to be computerized.

8
2.2. PROPOSED SYSTEM

The aim of proposed system is to develop a system of improved facilities. The


proposed system can overcome all the limitations of the existing system. The system
provides proper security and reduces the manual work. The existing system has several
disadvantages and many more difficulties to work well. The proposed system tries to
eliminate or reduce these difficulties up to some extent. The proposed system will help the
user to reduce the workload and mental conflict. The proposed system helps the user to work
user friendly and he can easily do his jobs without time lagging

2.2.1 FEATURES OF PROPOSED SYSTEM

 Digitalize the process of pet marketing.


 Eliminating the commission paid to agents
 Computerization is important for every field
because the data is secure in computer.
 This project reduces human efforts, saves time and resources to an extent.
 A special feature for buying street dogs
 Can locate nearby Pet shop
through maps.
 An advanced search option for searching desired breeds of pets.
 Facility to send feedbacks and
complaints.
 Attractive user interface.

9
3.SYSTEM DESIGN AND DEVELOPMENT

3.1 FILE DESIGN

A database is a collection of interrelated data stored with minimum redundancy to serve


many users quickly and efficiently. The general objective to make information access easy,
quick, in expensive and flexible for user.

3.2 INPUT DESIGN


Input design is a part of overall system design. The main objective during the input
design is as given below:
 To produce a cost-effective method of input .
 To achieve the highest possible level of accuracy .
 To ensure that the input is acceptable and understood by the user.

INPUT FORMS
 Home page

This technic can be used to find the available of pets and other contacts.

 Admin page

This form is used to login purpose

 Customer login form

This form is used to customer login.

10
 Customer registration form

This form is used to Customer registration.

 Add Products form

This form is used to add new pets .

3.3 OUTPUT DESIGN


Outputs from computer systems required primarily to communicate the results of
processing to users. They are also used to provide a permanent copy of the results for later
consultation.
 External outputs, whose destination is outside the organization.
 Internal Outputs whose destination is within organization and they are the user’s main
interface with the computer.
 Operational outputs whose use is purely within the computer department
 Interface outputs, which involve the user in communicating directly

OUTPUT FORM
 View customers
This form is used to view the customers details.
 View products
This form is used to view the products details.
 View order details
This form is used to view the order detail

11
3.4 DATABASE DESIGN

Databases are structures that hold data. The software that enables the flow of data
through these structures is called database management system or DBMS. The most
widely used system of DBMS is something called RDBMS or Relational DBMS. This
simply means that the data is stored in tables, moreover. Whatever relationships that exist
within the data are stored Within tables. To put it simply, there are three parts that make a
database:

Tables
We all know what tables are - a matrix of rows and columns. In databases, it’s the same.
Each row is a record, or a unit of data. A record (row) can have several columns or fields.
Each field is like an attribute of that record.

Queries
Query is a question posed to the database, to retrieve a specific set of records, based on
conditions supplied in the query.

Views
These are virtua1 tables, or (a set of) stored queries. At a physical level, the data is stored
in data files specific to the DBMS. Examples of modern-day RDBMSs that are wide1y
used include Oracle, MySQL, etc. Oracle is the largest commercially available RDBMS
and MySQL) is a free and open source RDBMS that is very Well-known.

Types of SQL Commands

There are five types of SQL commands: DDL, DML, DCL, TCL, and DQL

12
Data Definition Language (DDL)

 DDL changes the structure of the table like creating a table, deleting a table, altering a
table, etc.
 All the command of DDL are auto-committed that means it permanently save all the
changes in the database.

Data Manipulation Language

 DML commands are used to modify the database. It is responsible for all form of changes
in the database.
 The command of DML is not auto-committed that means it can't permanently save all the
changes in the database. They can be rollback.

Data Control Language

DCL commands are used to grant and take back authority from any database user.Here are
some commands that come under DCL:

 Grant
 Revoke

Transaction Control Language

TCL commands can only use with DML commands like INSERT, DELETE and UPDATE
only.

13
These operations are automatically committed in the database that's why they cannot be used
while creating tables or dropping them.DQL is used to fetch the data from the database.

It uses only one command:

 SELECT

3.2.1 List Of Table

 Customer Registration
This table is used to store the customer registration details.
 Product
This table is used to store the product(pets) details.
 Order details
This table is used to store the pets order details.
 Pets add details
This table is used to store the new pets details.

14
3.5 SYSTEM DEVELOPMENT

A system development project encompasses all the activites undertaken from the time at
which a potential requirement is identified until the resulting system is fully implemented and
accepted by the user.The process can involve many stages over a long period. The following
section highlights some fundamentals issues to be considered, outlines the main stages in
development and procuring new system, and indicates when and how the auditor should be
involved.
An information system acquired today must not only satisfy present business needs it
must also be flexible and capable of being enhanced to meet changing circumstances well into
the future.Thus a pre-requisite to the introduction of a new system is for management to identify
and understand their organization’s mission and its related information needs. Writing this down
helps to ensure common understanding and direction, and provides a yardstick against which
achievements can be measured.
The first step in which the analyst must undertake is to understand the current system by
gathering all information about it. The required data are collected by several method like.
 Study of the current manuals
 Observation of the functioning
 Sampling and Research

15
3.5.2 DESCRIPTION OF MODULES

The “Online Pet shop Management System “consists of following modules

Admin

In this module the Administrator has the privileges to add all the customer details, pet
details, payment and prize details. He can search all the info about the Order and
Customer.User without username and password enter into the login is only the authenticated
user then can enter to login.

Authentication contains all the information about the authentication user. User without
user name and password cannot enter into the login if is only the authentication user then
enters to login.

Customer Registration
The customer registration module contains the details customer such as customer name,
contact no ,amount, and status.

Product Categories

The products are arranged and can be viewed in categories. This Module contain
product name, description, prize and add cart.

Add to cart
Users can add pets and birds products to cart. This module contain prize and pets
quantity details

Reports

This module contains all the information about the reports generated by the admin
based on the particular user, particular customer, and all pets all request by user.

16
4. TESTING AND IMPLEMENTATION

Software Testing is a critical element of software quality assurance and represents the
ultimate review of specification, design and code generation. System testing is the stage of
implementation, which is aimed at ensuring that the system works accurately and efficiently
before live operation commences. Testing not only has to uncover errors introduced during
coding, but also locates errors committed during the previous phase. Thus the aim of testing is
to uncover requirements, design or coding errors in the program.

TESTING STRATEGIES

Unit Testing

This is also known as ‘module’ testing. The modules of the system are testing separately.
This testing is carried out during programming stage itself. In this testing step each module is
found to be validation checks for verifying the data input given the user which both the formal
and validity of the entered.

Integration Testing

Data can be lost across an interface; one module can have an adverse effort on the other
sub functions, when combined may not produces the desired major functions. Integrated testing
is the systematic testing for constructing the uncover errors within the interface. This testing was
done with sample data. The developed system has run successful for this sample data. The need
for integrated test is to find the overall system performance.

17
User Acceptance Testing
Acceptance testing is a key factor to the success of any system. The system, under the
consideration was treated for user acceptance by constantly keeping in touch with the
prospective system user at the time of developing and making changes where ever & when ever
required.

Data Validation Testing

Data Validation is the process of testing the accuracy of data; a set of rules you can apply
to a control to specify the type and range of data that users can enter .It can be used to display
error alerts when users enter incorrect values into a form. Rather than checking for errors after a
form is completed, data validation verifies values as the form is being filled out.
A software testing strategy should be flexible enough to promote a customized testing
approach. it must be rigid enough to promote reasonable planning and management tracking as
the project progresses The general characteristics of software testing strategies are:

White Box Testing

White box testing strategy deals with the internal logic and structure of the code. White
box testing is also called as glass, structural, open box or clear box testing. The tests written
based on the white box testing strategy incorporate coverage of the code written, branches, paths,
statements and internal logic of the code etc.

18
Black box Testing

Black Box Testing is not a type of testing; it instead is a testing strategy, which does not
need any knowledge of internal design or code etc. As the name "black box" suggests, no
knowledge of internal logic or code structure is required. The base of the Black box testing
strategy lies in the selection of appropriate data as per functionality and testing it against the
functional specifications in order to check for normal and abnormal behavior of the system. Now
a days, it is becoming common to route the Testing work to a third party as the developer of the
system knows too much of the internal logic and coding of the system, which makes it unfit to
test the application by the developer.
Testing Objectives
 There are several rules that can serve as testing objectives. They are:
 Testing is the process of executing a program with the intent of finding an error.
 A good test case is one that has high probability of finding an undiscovered error
 A successful test is one that uncovers an undiscovered error.

SYSTEM IMPLEMENTATION

Implementation is the process of having the system personnel check out and put new
equipment to use, train the users to use the new system and construct any file that are needed to
see it. The final and impartment phases in the system life cycle are the implementation of the
new system. System implementation refers to the steps necessary to install a new system to put
into operation.

19
The implementation has different meaning, ranging from the conversion of a basic

application to complete replacement of computer system. Implementation includes all these

activities that take place to convert from old system to new one. The new system may be totally

new replacing an existing manual or automated system or it may be major modification to an

existing system.

The methods of implementation and time scale adopted are found out initially. Proper

implementation is essential to provide a reliable system to met organization requirements.

Successful implementations may not guarantee improvement in the organization using the new

system, but it will prevent improper installation. The implementation involves the following

things:

 Careful planning

 Investigation of the system and constraint

 Design the methods to achieve the change over

 Train the staff in the changed phase

20
5. CONCLUSION AND FUTURE ENHANCEMENTS

Conclusion As part of the project detailed study has been made about the designing and
development aspects of the project “ONLINE PETSHOP MANAGEMENT SYSTEM”
which is an opening to the component world of computerization. The project has to meet all
the requirements that were collected during analysis and designing phase. In this project,
designing a simple platform for buying and selling pets... The project is developed in such a
way that it is able to undergo future enhancement in reliable, secure manner. The successful
completion of this project has expanded my boundaries of imagination, invoked confidence,
raised my creativity and has provided with knowledge and experience.

Future Scope
Following features can be upadated in Future ˆ
 To include all varieties of breeds. ˆ
 Home delivery of pet accessories. ˆ
 An in-app chat option between the seller and buyer..

21
BIBLIOGRAPHY

REFERRED BOOK
 Brain Ward “Wicked Cool PHP “ 2005 Edition.
 David Sklar and Adam “PHP Cookbook “ Second Edition
.Elise M.Award ”System Analysis And Design “Secont Edition
 Luke Weeeling,LauraThmson “PHP and My_SQL Web Development”3rd
Edition Mario Luring ”PHP Reference Beginner to Intermediate PHP” 3rd
Edition
 W.J.GilmoreBeginning “PHP and My_SQL “3rd Edition

REFERRED WEBSITE

 www.teamtreehouse.com
 www.pluralsight.com/courses/build-dynamic
 www.codeconquest.com
 www.freewebmasterhelp.com
 www.w3schools.com

22
APPENDICES

A.DATA FLOW DIAGRAM (DFD)

LEVEL 1

Request Online Pet Shop Request


Management Seller
Buyer System
Response
Response
Response
Request

Buyer details, Seller details

s
(Fig No:1)

23
LEVEL 2

View
customers Customer
Details

View Order
order Details

Administrator Login
Update
product Product
Details

Edit
product Details

(Fig No:2)

24
B.TABLE STRUCTURE

TABLE NO :1
TABLE NAME : ADMIN
PRIMARY KEY : id
PURPOSE : This table is used to store the admin login details.

NAME TYPE SIZE DESCRIPTION

id Varchar 20 Adminid

name Varchar 25 Admin name

contact Varchar 10 Contact no

email Varchar 25 Email id

username Varchar 20 username

password Varchar 20 password

25
TABLE NO :2
TABLE NAME : customer
PRIMARY KEY : cusid
PURPOSE : This table is used to store the customer registration details.

NAME TYPE SIZE DESCRIPTION


cusid Varchar 20 customer Id

name Varchar 20 customer name

address Varchar 50 Customer Address

contact Varchar 10 Mobile number

poid Varchar 20 Product id

oqty Varchar 10 Product qantity

ostatus Varchar 20 orderstatus

date Varchar 50 Order date

otype Varchar 10 ordertype

date Varchar 25 Delivery date

26
TABLE NO :3
TABLE NAME : Prodcuts
PRIMARY KEY : poid
PURPOSE : This table is used to store the product details.

NAME TYPE SIZE DESCRIPTION

poid Varchar 20 Product id

name Varchar 20 Full name

description Varchar 25 Product description

image Varchar 50 Pets image

status Varchar 20 status

27
TABLE NO :4
TABLE NAME : order
PRIMARY KEY : orid
PURPOSE : This table is used to store the order details.

NAME TYPE SIZE DESCRIPTION

orid Varchar 20 Order Id

quantity Varchar 20 Quantity details

prize Varchar 20 Prize details

date Varchar 10 orderdate

status Varchar 10 Orderstatus

deldate Varchar 20 Order delivery status

28
C.SAMPLE CODING

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<meta name="author" content="">
<link href="../images/foods/logo.png" rel="shortcut icon">
<title>ADMIN | Petshop Online Website</title>

<!-- core CSS -->


<link href="css/bootstrap.css" rel="stylesheet">
<link href="css/bootstrap.min.css" rel="stylesheet">
<link href="css/font-awesome.min.css" rel="stylesheet">
<link href="css/animate.min.css" rel="stylesheet">
<link href="css/prettyPhoto.css" rel="stylesheet">
<link href="css/main.css" rel="stylesheet">
<link href="css/responsive.css" rel="stylesheet">
<script src="js/jquery.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/jquery.prettyPhoto.js"></script>
<script src="js/jquery.isotope.min.js"></script>
<script src="js/main.js"></script>
<script src="js/wow.min.js"></script>
<script>
29
$(function () {
$('[data-toggle="tooltip"]').tooltip()
})
</script>
<script>
function printContent(el){
var restorepage = document.body.innerHTML;
var printcontent = document.getElementById(el).innerHTML;
document.body.innerHTML = printcontent;
window.print();
document.body.innerHTML = restorepage;
}
</script>
</head><!--/head-->
<body>
<nav class="navbar navbar-inverse" role="banner">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-
target=".navbar-collapse">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a href="index.php"><h4 class="wow fadeInDown" style="margin-
top:20px; color:#FFF;"><i class="fa fa-coffee"></i> Ordering Of Product</h4></a>
</div>

<div class="collapse navbar-collapse navbar-right">


<ul class="nav navbar-nav">

30
<li class="dropdown"><a class="dropdown-toggle wow fadeInDown"
data-toggle="dropdown" href="#"><span class="glyphicon glyphicon-th"></span>
Product <span class="caret"></span></a>
<ul class="dropdown-menu">
<li><a href="addcnp.php"> Add Product </a></li>
<li><a href="update_cnp.php"> Update Product </a></li>
</ul>
</li>
<li id="reservation" class=" active wow fadeInDown"><a
href="index.php"><span class="glyphicon glyphicon-calendar"></span>
Orders</a></li>
<li id="admin" class="wow fadeInDown"><a
href="adminacc.php"><span class="glyphicon glyphicon-user"></span> Admin
Account</a></li>
<li id="logout" class="wow fadeInDown"><a id="logoutbtn" href='<?php
echo "logout_process.php?logout=1"?>'><span class="glyphicon glyphicon-
share"></span> Logout</a></li>
</ul>
</div>
</div><!--/.container-->
</nav><!--/nav-->
<br>

<div class="container">
<form id="formFilter" name="formFilter" action="admin_reservefilter.php"
method="POST" class="pull-left col-md-7 hidden-print">

<div class="form-horizontal wow fadeInDown">


<label for="filter" class="control-label"> <i class="glyphicon glyphicon-
filter"></i> VIEW RECORDS</label>
<div class="col-md-6">

31
<select name="filter" id="filter" class="form-control">
<option value="New">New</option>

<option value="cancel">Cancel</option>
<option value="completed">Completed</option>
</select>

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

<a href="" onClick="window.print();return false" class="btn btn-info pull-right


hidden-print wow fadeInDown"><img src="images/ico/printer.ico" style="max-width:
24px; max-height: 24px;"> Print</a>
<a href="index.php" class="btn btn-default pull-right hidden-print wow fadeInDown"
style="margin-right:10px;"><img src="images/ico/refresh.png" style="max-width: 24px;
max-height: 24px;"> Refresh</a>
<div class="col-md-12" style="border: solid #D9D9D9 1px; padding: 10px; padding-
top: 5px; box-shadow: #9F9F9F 2px 3px 5px; margin-top: 10px;">
<p class="wow fadeInDown"><em>Order List</em></p>
<table class="table table-hover table-condensed wow fadeInDown">
<thead style="background-color:#282828; color:#fff;">
<tr>
<th class="hidden-print" style="text-align:center;"> <span class="glyphicon
glyphicon-exclamation-sign"></span> Status</th>
<th width="120px" style="text-align:center;"><span class="glyphicon
glyphicon-user"></span> From </th>
<th style="text-align:center;"><span class="glyphicon glyphicon-
gift"></span> Product </th>
<th style="text-align:center;"><span class="glyphicon glyphicon-

32
tags"></span> Address </th>
<th style="text-align:center;"><span class="glyphicon glyphicon-
phone"></span> Contact </th>
<th style="text-align:center;"><span class="glyphicon glyphicon-
time"></span> Time </th>

</tr>
</thead>
<tbody id="tablebody">
<?php include('includes/dbconn.php');

$stat = 'new';
$total = 0;
$sql = ("SELECT tblcnp.*,tblorders.*
FROM tblorders LEFT JOIN
tblcnp ON tblorders.cnpoid = tblcnp.id WHERE
tblorders.ostatus = 'New' order by tblorders.id LIMIT 0,30 ") or die (mysqli_error());

$result=mysqli_query($con, $sql);
if(mysqli_num_rows($result)>0){
while($row = mysqli_fetch_assoc($result)){
$total = $row['prize'] * $row['oqty'];?>
<tr class="success" style="cursor:pointer;">
<td style="text-align:center;"><a href="#viewModal<?php echo $row['id']?>"
data-toggle="modal" data-target="#viewModal<?php echo $row['id']?>" class="btn btn-
default"><i class="glyphicon glyphicon-search"></i> View</a></td>
<td style="text-align:center;"><?php echo $row['cname'];?></td>
<td style="text-align:center;"><?php echo $row['name'];?></td>
<td style="text-align:center;"><?php echo $row['address'];?></td>
<td style="text-align:center;"><?php echo $row['contact'];?></td>
33
<td style="text-align:center;"><?php echo $row['timestamp'];?></td>

</tr>
?>
<!-- Modal -->
<div class="modal fade" id="viewModal<?php echo $row['id']?>" tabindex="-1"
role="dialog" aria-labelledby="myModalLabel">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-
label="Close"><span aria-hidden="true">&times;</span></button>
<h4 class="modal-title" id="myModalLabel"><i class="glyphicon glyphicon-
exclamation-sign"></i> ORDER INFORMATION</h4>
</div>
<form method="post" action="">
<div class="modal-body" id="div1">
<input type="hidden" name="fdid" value="<?php echo $row['id']?>">

<dl class="dl-horizontal wow fadeInDown" style="text-align:left">

<dt>Cake Ordered:</dt>
<dd><?php echo $row['name'].' ';?><img src="<?php echo $row['image']?>"
width="90px;" class="img-responsive img-rounded"></dd>
<dt>Description:</dt> <dd><?php echo $row['description'];?></dd>
<dt>Price:</dt> <dd><?php echo 'Shs. '.$row['prize'];?></dd>
<dt>Quantity:</dt> <dd><?php echo $row['oqty'];?></dd>
<dt>Total:</dt> <dd><?php echo 'Shs. '.number_format($total,2,'.',',');?></dd>
<hr style="border-top: 1px dashed #8c8b8b;
border-bottom: 1px dashed #fff;">

34
<h4 ><b>CUSTOMER DETAILS</b></h4>
<dt>Ordered by:</dt> <dd><?php echo $row['cname'].' ';?></dd>
<dt>Ordered Type:</dt> <dd><?php echo $row['otype'].' ';?></dd>
<dt>Date Pick-up:</dt> <dd><?php echo $row['datepickup'].' ';?></dd>
<dt>Date Order:</dt> <dd><?php echo $row['timestamp'];?></dd>
<dt>Address:</dt> <dd><?php echo $row['address'];?></dd>
<dt>Contact:</dt> <dd><?php echo $row['contact'];?></dd>

<dt>Status:</dt> <dd><?php echo $row['ostatus'];?></dd>


</dl>

</div>
<em style="font-size:12px;color:red; margin-left:20px;">Note: Updated Order status
here</em>
<div class="modal-footer">
<a href="index.php" class="btn btn-default wow fadeInDown">Close</a>
<button type="button" onClick="printContent('div1');" class="btn btn-info wow
fadeInDown"><i class="glyphicon glyphicon-print"></i> Download Receipt</button>
<button type="submit" class="btn btn-danger wow fadeInDown" name="cancel"><i
class="glyphicon glyphicon-ban-circle"></i> Cancel</button>
<button type="submit" class="btn btn-success wow fadeInDown"
name="deliver"><i class="glyphicon glyphicon-send"></i> Delivered</button>
</div>
</form>
</div>
</div>
</div>
<?php }}?>
</tbody>
</table>

35
</div>
</div>

<!-------------------------------------------------------OPEN MODAL MESSAGE---------------


------------------------------------------------->
<?php include('includes/dbconn.php');
if(isset($_POST['deliver'])){
$id = $_POST['fdid'];
$sql =("UPDATE tblorders set ostatus = 'Completed' WHERE id = '$id'") or die
(mysqli_error());

$result=mysqli_query($con, $sql);
if($result==true){
header("location:index.php");}

}
else if(isset($_POST['cancel'])){
$id = $_POST['fdid'];
$sql = ("UPDATE tblorders set ostatus = 'Cancel' WHERE id = '$id'") or die
(mysqli_error());
$result=mysqli_query($con, $sql);
if($result== true){
header("location:index.php");}
}
?>

<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
<!--*************************************************** FOOTERS
**********************************************-->

<footer id="footer" class="midnight-blue">

36
<div class="container">
<div class="row">
<div class="col-sm-12">
<center>&copy; 2019 <a target="_blank" href="#" title="#">Petshop Online
Website</a>. All Rights Reserved.</center>
</div>
</div>
</div>
</footer><!--/#footer-->

<script type="text/javascript">
$('#filter').change(function() {
$.post( $("#formFilter").attr("action"),
$("#formFilter :input").serializeArray(),
function(filter) {
//alert (filter);
$("#tablebody").empty();
$("#tablebody").html(filter);
});
$("#formFilter").change( function() {
return false;
});
});

</script>

</body>
</html>

Dbconnection.php

37
<?php
/* Database config */
$db_host = 'localhost';
$db_user = 'root';
$db_pass = '';
$db_database = 'dbcnb';
/* End config */

$con = mysqli_connect($db_host, $db_user, $db_pass, $db_database);


// Check connection
if (!$con) {
die("Connection failed: " . mysqli_connect_error());
}

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<meta name="author" content="">
<link href="images/foods/logo.png" rel="shortcut icon">
<title> Online Petshop Management System</title>

<!-- core CSS -->


<link href="css/bootstrap.css" rel="stylesheet">
<link href="css/bootstrap.min.css" rel="stylesheet">
<link href="css/font-awesome.min.css" rel="stylesheet">
<link href="css/animate.min.css" rel="stylesheet">
<link href="css/prettyPhoto.css" rel="stylesheet">
<link href="css/main.css" rel="stylesheet">

38
<link href="css/responsive.css" rel="stylesheet">

</head><!--/head-->

<body>
<nav class="navbar navbar-inverse" role="banner">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-
target=".navbar-collapse">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>

</div>
<a href="index.php"><h5 class="wow fadeInDown" style="margin-top:20px;
color:#FFF;"><img src="images/logo.jpg" width="15% "/> Sweet and healthy
cakes</h5></a>
<div class="collapse navbar-collapse navbar-right wow fadeInDown">
<ul class="nav navbar-nav">

<li><a href="index.php"><i class="fa fa-home"></i>Home</a></li>


<li ><a href="about-us.php">About Us</a></li>

<li><a href="available.php">Availables</a></li>
<li><a href="contacts.php">Contacts</a></li>
<li>
<a data-toggle="modal" data-target=".bs-example-modal-sm"
style="cursor:pointer;">Admin</a>

39
</li>

D.SAMPLE INPUT

Fig 1: Home Page

40
Fig 2:Admin Login

41
Fig 3:Customer Registration

42
Fig 4: Add Products

43
Fig 5:Update Products

44
E .SAMPLE OUTPUT

Fig 6: Products(Pets) details

45
Fig 7: Add card details

46
Fig 8:ViewOrder details

47
Fig 9:View Admin Account details

48
Fig 10:ViewOrder Complete status

49

You might also like