Sie sind auf Seite 1von 248

Online Grocery Shop 2018

Contents
Page No

CHAPTER 1:Introduction 6

CHAPTER 2: System Analysis 7-14

2.1: Existing System 7

2.2: Proposed System 7-8

2.3: Feasibility Study 8-13

2.3.1 Technical Feasibility 8

2.3.2 Operational Feasibility 9

2.3.3 Economic Feasibility 10

2.3.4 Social Feasibility 10-11

2.3.5 Market Research 11

2.3.6 Alternative Solution 11

Page
1
Online Grocery Shop 2018

2.3.7 Feasibility Report 12-13

2.4: Project Category, Tools & Platform 13

2.5: Hardware Requirement 14

2.6: Software Requirement 14

CHAPTER 3: System Requirement and Specification 15-25

3.1: Overview 15

3.2: Module Description 15-17

3.3: Requirement Analysis 17

3.4: SDLC Methodology 19

3.5: Functional Requirement 20-24

CHAPTER 4: System Planning and Design 25-37

Page
2
Online Grocery Shop 2018

4.1 Project Planning 26

4.2 Project Scheduling 27-28

4.3Entity –Relation Diagram (E-R D) 29

4.4 Data Flow Diagrams(DFD) 30

4.4.1 Software Engineering Data Flow Diagram 3-33

4.4.2 Schema / Database Design 34-37

CHAPTER 5: Technology Description 38-49

5.1 HTML 38

5.2 JavaScript 42-44

5.3 AJAX 44-45

5.4 jQuery 45-46

Page
3
Online Grocery Shop 2018

5.5 Microsoft SQL Server 46-48

5.6 Android Studio 49

CHAPTER 6: Coding and Outputs Screens 50-227

CHAPTER 7: Testing and Debugging Technique 228-241

7.1 Team Interaction 51

7.2 Test Objective 51-52

7.3 Process Overview 52

7.4 Testing Process 53-54

7.5 Test Cases 54-57

7.6 Unit Testing 57

7.7 White Box Testing 58

7.8 Black Box Testing 58

Page
4
Online Grocery Shop 2018

7.9 System Testing 59

7.10 Integration Testing 59-62

7.11 Creation of Admin Profiles and Access rights 62

7.12 Costs Estimation of the project along with cost 62

7.13 Estimation Model 62-63

CHAPTER 8: Future Scope Of the project 242

CHAPTER 9: Conclusion 243

CHAPTER 10: Bibliography 244

CHAPTER 11: Reference 246-248

Page
5
Online Grocery Shop 2018

Chapter: 1

Introduction
The "Online Grocery Shop" has been developed to override the problems
prevailing in the practicing manual system. This software is supported to
eliminate and in some cases reduce the hardships faced by this existing system.
Moreover this system is designed for the particular need of the company to
carry out operations in a smooth and effective manner.

The application is reduced as much as possible to avoid errors while entering


the data. It also provides error message while entering invalid data. No formal
knowledge is needed for the user to use this system. Thus by this all it proves it
is user-friendly. Online Grocery Shop , as described above, can lead to error
free, secure, reliable and fast management system. It can assist the user to
concentrate on their other activities rather to concentrate on the record keeping.
Thus it will help organization in better utilization of resources.

Every organization, whether big or small, has challenges to overcome and


managing the information of Customer, Grocery, Stock, Address, Product.
Every Online Grocery Shop has different Grocery needs, therefore we design
exclusive employee management systems that are adapted to your managerial
requirements. This is designed to assist in strategic planning, and will help you
ensure that your organization is equipped with the right level of information and
details for your future goals. Also, for those busy executive who are always on
the go, our systems come with remote access features, which will allow you to
manage your workforce anytime, at all times. These system will ultimately
allow to better manage resources.

Page
6
Online Grocery Shop 2018

Chapter 2

System Analysis

2.1 EXISTING SYSTEM


The Existing system doesn’t fulfill the following activities.
• The present system executes all features in manual.
• The system maintains all the records in computer with Microsoft
Excel.
• There is lack of security, accreditation and low quality.
• In this system ,the students can only view the contents of the
website which are noted as free tutorials.
• To get the restricted materials which are not free, the student
should firstly be registered.

2.2 PROPOSED SYSTEM

This System fulfilling the following activities:

• Reducing the complexity of the system and maintain the large


information of the data.

Page
7
Online Grocery Shop 2018

• This system maintains a dynamic website by which content can


be management easily by the system admin.
• The teachers can maintain the contents of the website and
provide tutorials on specific topic but can’t able to manage the
contents of the website.
• This system maintains a website for an education centre in
purpose of studying through online tutorials.

2.3 Feasibility study

2.3.1 Technical Feasibility

Evaluating the technical feasibility is the trickiest part of a


feasibility study. This is because, at this point in time, not too many
detailed design of the system, making it difficult to access issues
like performance, costs on (on account of kind of technology to be
deployed) etc. A number of issues have to be considered while
doing a technical analysis.

1.Understand the different technologies involved in the proposed


system:

Before Commencing the project, we have to be very clear about


what are the technologies that are to be required for the
development of the new system.

2. Find out whether the organization currently possesses the required


technologies:
Page
8
Online Grocery Shop 2018

• Is the required technology available with the organization?


• If so is the capacity sufficient?

2.3.2 Operational Feasibility

Proposed projects are beneficial only if they can be turned into


information systems that will meet the organizations operating
requirements. Simply stated, this test of feasibility asks if the system
will work when it is developed and installed. Are there major barriers
to Implementation? Here are Questions that will help test operational
feasibility of a project:

• Is there sufficient support for the project from management


from users? If the current system is well liked and used to the
extent that persons will not be able to see reasons for change,
there may be resistance.
• Are the current business methods acceptable to the user? If
they are not, Users may welcome a change that will bring
about a more operation and useful systems.
• Has the user been involved in the planning and development
of the project?
• Early involvement reduces the chances of resistance to the
system and in
• General and increases the likelihood of successful project.

Page
9
Online Grocery Shop 2018

Since the proposed system was to help reduce the hardships


encountered. In the existing manual system, the new system was
considered to be operational feasible.

2.3.3 Economic Feasibility

Economic feasibility attempts 2 weigh the costs of developing and


implementing a new system, against the benefits that would accrue
from having the new system in place. This feasibility study gives the
top management the economic justification for the new system.
A simple economic analysis which gives the actual comparison of
costs and benefits are much more meaningful in this case. In addition,
this proves to be useful point of reference to compare actual costs as
the project progresses. There could be various types of intangible
benefits on account of automation. These could include increased
customer satisfaction, improvement in product quality better decision-
making timeliness of information, expediting activities, improved
accuracy of operations, better documentation and record keeping,
faster retrieval of information, better employee morale.

Page
10
Online Grocery Shop 2018

2.3.4 Social Feasibility

Consideration of whether the proposed system would prove


acceptable to the people who would be affected by its introduction.
Describe the effect on users from the introduction of the new system;
consider whether there will be a need of retraining the workforce.
Will there be a need for relocation of some of the workforce? Will
some jobs become deskilled? Will the current workforce be able to
perform effectively any new tasks introduced by the proposed
system? Describe how you propose to ensure user co-operation before
changes are introduced.

2.3.5 Market Research

A comprehensive market research identifying a need for the product.


Detail all market research you carried out, listing sources of
information. Justify any conclusions you have drawn from your
research. Identify the potential customer base for your product,
together with evidence of customer need for the product. Describe
how you propose to complete with similar products on the market.

2.3.6 Alternative Solution


Page
11
Online Grocery Shop 2018

Consideration of alternative solutions should be documented. At least


two alternative business or technical systems options should be
considered. Details the difference between these options and the
proposed system. Justify your choice of the proposed system and the
reasons for rejecting the alternative options.

2.3.7 Feasibility Report

At this point, all of the planning for the project has been done and if
the feasibility study has shown that the project is likely to succeed
within its constraints, then it only remains for us to start the
requirements analysis and thus proceed with the project.

Feasibility Study
System: Online Grocery Shop
Author:
Product
The project requires a web application to be developed that will
allow a website for an education center online through tutorials.
Technical Feasibility

Page
12
Online Grocery Shop 2018

The web application will be developed using camp and servers.


Social Feasibility
Some training for the visitor/admin are required but all users are IT
literate.

Market Research
Market research says that this application would be useful for the

visitor as it could seamlessly help them to share documents.

Economic Feasibility
The application can be developed within budget.
Alternate Solution
Could be a desktop system but that would not allow documents to be
shared online.

2.4 Project category, Tools and platform


This project is a web-based application develop on Java-JEE
technology frameworks using the following tools:

• RDBMS (Relational Data base System)


• OOPS (Object Oriented Programming System)
• PHP
• MySQL

Page
13
Online Grocery Shop 2018

2.5 Hardware Requirement Specification

➢ Processor: Pentium Processor


➢ Storage: 80 GB
➢ Memory: 1 GB RAM
➢ Network Adapter: Ethernet Adapter
➢ Modem: 128kbps

2.6 Software Requirement Specification


➢ Platform: Android
➢ Operating System: Android Lollipop or above Android Versions
➢ Tools: Sublime Text, Android Studio, Photoshop CS6
➢ Front-End Tool: PHP, AJAX, Jquery,Bootstrap.
➢ Back-End Tool: MySQL Server

Page
14
Online Grocery Shop 2018

Chapter 3

System Requirement and Specification

3.1 Overview

This system maintains the information about Online Grocery Shop, where
shopkeeper can add his products. This information is maintained through two
following modules:
• Admin login
• Customer login

3.2 Module Description

Admin Login
Admin module is mainly for the owner of the system. This module performs
the work of regular checking process. Everyone needs current information
about anything. So, this module is responsible for updating the information
continuously if any, in the system so that one can find timely information. But
the main function of this module is to handle security of this system. Different
types of authentication and authorization process is performed for this purpose.

Page
15
Online Grocery Shop 2018

This module handles the entire task related to products like specifying and
allocating the space and related cost.
Customer Login
In the customer service module, the customer will use this website to on-line
shopping. And also, the customer sends the request to the shopping.

3.3 Requirement Analysis

Functional Requirements are those that refer to the functionality of the system,
i.e. What services it will provide to the user. Non-functional (Supplementary)
requirements pertain to other information needed to produce the correct system
and are detailed separately.

Functional Requirements (UML)

The Unified Modelling Language allows the software engineer to express an


analysis model using the modelling notation that is governed by a set of
syntactic semantic rules. A UML system is represented using five different
views that describe the system from distinctly different perspective. Each view
is defined by a set of diagrams, which is as follows.

Page
16
Online Grocery Shop 2018

• User Model View

1. This view represents the system from the user’s perspective.


2. The analysis representation describes a usage scenario from the end-
user’s perspective.
• Structural model view
1. In this model the data and functionality are arrived from inside the
system.
2. This model view models the static structures.

• Behavioural Model View


• It represents the dynamic of behavioural as parts of the system, depicting the
interactions of collection between various structural elements described in the
user model and structural model view.
• Implementation Model View
• In this the structural and behavioural as parts of the system are represented as
they are to be built.
• Environmental Model View
• In this the structural and behavioural aspects of the environment in which the
system is to be implemented are represented.

UML is specifically constructed through two different domains they are:

• UML Analysis modelling, this focuses on the user model and structural model
views of the system.
Page
17
Online Grocery Shop 2018

• UML design modelling, which focuses on the behavioural modelling,


implementation modelling and environmental model views.

Use case Diagrams represent the functionality of the system from a user’s point
of view. Use cases are used during requirements elicitation and analysis to
represent the functionality of the system. Use cases focus on the behaviour of
the system from external point of view.
Actors are external entities that interact with the system. Examples of actors
include users like administrator, bank customer, etc., or another system like
central database.

Page
18
Online Grocery Shop 2018

3.4 SDLC Methodology

Often, a modeler defines a set of general objectives for software but does not
identify detailed input, processing, or output requirements. In other cases, the
developer may be unsure of the efficiency of an algorithm, the adaptability of an
operating system, or the form that human/machine interaction should take. In
these, and many other situations, a prototyping paradigm may offer the best
approach.
The prototyping paradigm begins with requirements gathering. Developer and
modeler meet and define the overall objectives for the software, identify
whatever requirements are known, and outline areas where further definition is
mandatory. A "quick design" then occurs. The quick design focuses on a
representation of those aspects of the software that will be visible to the
modeler/admin (e.g., input approaches and output formats). The quick design
leads to the construction of a prototype. The prototype is evaluated by the
Page
19
Online Grocery Shop 2018

modeler/admin and used to refine requirements for the software to be


developed. Iteration occurs as the prototype is tuned to satisfy the needs of the
modeler, while at the same time enabling the developer to better understand
what needs to be done.
Ideally, the prototype serves as a mechanism for identifying software
requirements. If a working prototype is built, the developer attempts to use
existing program fragments or applies tools (e.g., report generators, window
managers) that enable working programs to be generated quickly.

3.5Functional Requirements
Functional Requirements are those that refer to the functionality of the
system, i.e., what services it will provide to the admin. Non-functional
(supplementary) requirements pertain to other information needed to produce
the correct system and are detailed separately.

Page
20
Online Grocery Shop 2018

Use Case Diagram

Authenticati
on

Order
Products

Feedback

Change
Customer details

Track Order

Authentication

Adds Product

Approve Order

Approve
Admin Products

Change
Password

Page
21
Online Grocery Shop 2018

Non-Functional Requirements
In addition to the obvious features and functions that you will provide in your
system, there are other requirements that don't actually DO anything, but are
important characteristics nevertheless. These are called "non-functional
requirements" or sometimes "Quality Attributes." For example, attributes such
as performance, security, usability, compatibility. Isn’t a "feature" of the system
but are a required characteristic. You can't write a specific line of code to
implement them; rather they are "emergent" properties that arise from the entire
solution. The specification needs to describe any such attributes the modeler
requires. You must decide the kind of requirements that apply to your project
and include those that are appropriate.
Each requirement is simply stated in English. Each requirement must be
objective and quantifiable; there must be some measurable way to assess
whether the requirement has been met.
Often deciding on quality attributes requires making trade-offs, e.g., between
performance and maintainability. In the APPENDIX you must include an
engineering analysis of any significant decisions regarding trade-offs between
competing attributes.
Here are some examples of non-functional requirements:

Performance requirements
Requirements about resources required, response time, transaction rates,
throughput, benchmark specifications or anything else having to do with
performance.

Page
22
Online Grocery Shop 2018

Operating constraints

List any run-time constraints. This could include system resources, people,
needed software.

Platform constraints

Discuss the target platform. Be as specific or general as the admin requires. If


the admin doesn't care, there are still platform constraints.
Since the application will be developed in PHP it is platform independent.
Accuracy and Precision
Requirements about the accuracy and precision of the data. (Do you know the
difference?) Beware of 100% requirements; they often cost too much.
Modifiability
Requirements about the effort required to make changes in the software. Often,
the measurement is personnel effort (person- months).
Portability
The effort required to move the software to a different target platform. The
measurement is most commonly person-months or % of modules that need
changing.

Reliability

Page
23
Online Grocery Shop 2018

Requirements about how often the software fails. The measurement is often
expressed in MTBF (mean time between failures). The definition of a failure
must be clear. Also, don't confuse reliability with availability which is quite a
different kind of requirement. Be sure to specify the consequences of software
failure, how to protect from failure, a strategy for error detection, and a strategy
for correction.

Security
One or more requirements about protection of your system and its data. The
measurement can be expressed in a variety of ways (effort, skill level, time ...)
to break into the system. Do not discuss solutions (e.g. passwords) in a
requirements document.
Only secured admin can access the application.
No one can go to any independent page without logging in.

Usability
Requirements about how difficult it will be to learn and operate the system. The
requirements are often expressed in learning time or similar metrics.

Legal
There may be legal issues involving privacy of information, intellectual
property rights, export of restricted technologies, etc.

Page
24
Online Grocery Shop 2018

Chapter 4
System Planning and Design
4.1 Project Planning

Project planning is concerned with identifying the following for every project:

• Activities
• Milestones
• Deliverables.

A plan must be drawn up to guide the development towards the project goal. A
plan is drawn up at the start of a project. This plan should be used as the driver
for the project. The initial plan is not static and must be modified as the project
progresses.

Planning is required for development activities from specification through to


delivery of the system.

Page
25
Online Grocery Shop 2018

4.2 Project Scheduling:


Grant Chart

Person(s) Week Week Week Week Week Week


Task
Responsible 1 2 3 4 5 6

Communicatio
n

Quick Plan

Modelling
Quick Design

Construction of
Prototype

Deployment,
Delivery and
Feedback

4.3 Entity- Relation Diagram (E-R-D):


An entity relationship diagram (ERD) shows the relationships of entity sets
stored in a database. An entity in this context is a component of data. It
illustrates the logical structure of databases. At first glance an entity relationship
diagram looks very much like a flowchart. It is the specialized symbols, and the

Page
26
Online Grocery Shop 2018

meanings of those symbols, that make it unique. There are five main
components of an ERD:

1. Entities, which are represented by rectangles. An entity is an object or

concept about which you want to store information.

Entity

2. Actions, which are represented by diamond shapes, show how two entities
share information in the database.

Relation

3.Attributes, which are represented by ovals. A key attribute is the unique,


distinguishing characteristic of the entity.

Attributes

Page
27
Online Grocery Shop 2018

4.connecting lines, solid lines that connect attributes to show the relationships
of entities in the diagram.

5.Cardinality specifies how many instances of an entity relate to one instance of


another entity. Ordinality is also closely linked to cardinality. While cardinality
specifies the occurrences of a relationship, ordinality describes the relationship
as either mandatory or optional. In other words, cardinality specifies the
absolute minimum number of relationships.

Entity

Relation

Entity

Page
28
Online Grocery Shop 2018

Er-diagram
Entity - Relationship Diagram: -

Page
29
Online Grocery Shop 2018

4.4DATA FLOW DIAGRAMS(DFD):

A graphical tool used to describe and analyse the moment of data through a
system manual or automated including the process, stores of data, and delays in
the system. Data Flow Diagrams are the central tool and the basis from which
other components are developed. The transformation of data from input to
output, through processes, may be described logically and independently of the
physical components associated with the system. The DFD is also known as a
data flow graph or a bubble chart.
DFDs are the model of the proposed system. They clearly should show the
requirements on which the new system should be built. Later during activity this
is taken as the basis for drawing the system’s structure charts. The Basic
Notation used to create a DFD’s are as follows:

Page
30
Online Grocery Shop 2018

4.4.1Software Engineering Paradigm Applied


Data Flow Diagram (DFD)

‘0’ LEVEL DIAGRAM

Context
Level DFD
Customer

Online
Grocery
Shop
Admin

ADMIN DATA

Page
31
Online Grocery Shop 2018

‘1’ LEVEL DIAGRAM (FOR CUSTOMER)

Regis-
Registration data ration Registration details

Login data login details


customer Login Customer
Customer

Update data Update update info


profile

Product product info Checkout


Order

Track
Track data Tracking details

Page
32
Online Grocery Shop 2018

‘1’ LEVEL DIAGRAM (FOR ADMIN)

Login Details Login Details admin


Login

Admin

Products info
View
Produc products
ts

Order data Approve customer details Processing


Orders

Page
33
Online Grocery Shop 2018

4.4.2 Schema/Database Design


Table name: -admin
Column Type Key Description

id int (10) Primary Key User id


username varchar (255 User name
)
password varchar (255 User Password
)

Table name: -Cart

Column Type Key

id int (20) Primary Key


uid int (20)
p_id int (20)
price decimal (18,2)

qty int (20)

Page
34
Online Grocery Shop 2018

Table name: -Category

Column Type Key

id int (10) Primary Key


category varchar (255 No

Table name: -Checkout


Column Type Key

id int (10) Primary Key


name varchar (255
)
address varchar (255
)
phone int (20)
zip int (20)
uid int (20)
p_id int (20)
total decimal (18,
2)
status varchar (500
)

Page
35
Online Grocery Shop 2018

Table name: -Product


Column Type Key

id int (10) Primary Key


producttitle varchar (255
)
productovervie varchar (255
w )
price decimal (18,
2)
image1 varchar (255
)
category varchar (255
)
status int (10)
stock int (20)

Table name: -Sorder


Column Type Key

id int (10) Primary Key


p_id int (20)
price decimal (18,
2)
qty varchar (255
)
total decimal (18,
2)
oid int (20)

Page
36
Online Grocery Shop 2018

Table Name: -User

Column Type Null

id int (10) Primary Key


email varchar (255
)
password varchar (255
)
full name varchar (255
)
phone varchar (20)
address varchar (255
)

Page
37
Online Grocery Shop 2018

Chapter 5

Technology Description

5.1 HTML

HTML, Hypertext Mark-up Language, is the predominant mark-up language for


web pages. It provides a means to describe the structure of text-based
information in a document—by denoting certain text as headings, paragraphs,
lists, and so on—and to supplement that text with interactive forms, embedded
images, and other objects. HTML is written in the form of labels (known as
tags), surrounded by angle brackets. HTML can also describe, to some degree,
the appearance and semantics of a document, and can include embedded
scripting language code which can affect the behaviour of web browser and
other HTML processors.

Hypertext Mark-up Language (HTML), the languages of the world wide web
(WWW), allows users to produces Web pages that include text, graphics and
pointer to other web pages (Hyperlink).

HTML is not a programming language but it is an application of ISO standard


8879, SGML (Standard Generalized Mark-up Language), but specialized to
hypertext and adapted to the web. The idea behind hypertext is that instead of
reading text in rigid linear structure, we can easily jump from one point to
another point. We can navigate through the information based on our interest

Page
38
Online Grocery Shop 2018

and preference. A mark-up language is simply a series of elements, each


delimited with special characters that define how text or other items enclosed
within the elements should be displayed. Hyperlinks are underlined or
emphasized works that load to other documents or some portions of the same
document.

HTML provides tags (special codes) to make the document look attractive.
HTML tags are not case-sensitive. Using graphics, fonts, different sizes, colour,
etc., can enhance the presentation of the document. Anything that is not a tag is
part of the document itself.

Basic HTML Tags:

• <! -- -- > specifies comments


• <A>……. </A> Creates hypertext links
• <B>……. </B> Formats text as bold
• <BODY>…<BODY> Contains all tags and text in the HTML document
• <FRAME>…</FRAME>Defines a particular frame in a set of frames
• <FORM>…</FORM>Encloses a fill-out form
• <H#>…</H#> Creates headings of different levels (1- 6)
• <HEAD>…</HEAD>Contains tags that specify information about a
document
• <HTML>…</HTML>Contains all other other HTML tags
• <META>…</META>Provides meta- information about a document
• <SCRIPT>…</SCRIPT>Contains client-side or server-side script

Page
39
Online Grocery Shop 2018

• <TABLE>…</TABLE> Creates a table


• <TD>…</TD> Indicates table data in a table
• <TR>…</TR> Designates a table row
• <TH>…</TH>Creates a heading in a table

Advantages

➢ A HTML document is small and hence easy to send over the net. It is
small because it does not include formatted information.
➢ HTML is platform independent.
➢ HTML tags are not case-sensitive.

5.2 JavaScript

JavaScript is a script-based programming language that was developed by


Netscape communication Corporation. JavaScript was originally called live
script to indicate its relationship with Java. Java script supports the development
of both silent and server components of web-based applications. On the silent
side, it can be used to write programs that are executed by a web browser and
then update the browser’s display accordingly.

Page
40
Online Grocery Shop 2018

Even though JavaScript supports both client and server web programming, we
prefer JavaScript at client-side programming since most of the browsers
supports it. Java scripts is almost as easy to learn as HTML, and JavaScript
statements can be including in HTML documents by enclosing the statements
between a pair of scripting tags:

<SCRIPTS>. </SCRIPTS>.
<SCRIPTS LANGAUGE=”JavaScript”>
JavaScript statements
</SCRIPT>

Here are a few things we can do with java script:

➢ Validate the contents of a form and make calculations.


➢ Add scrolling or changing message to the browser’s status line.
➢ Animate images or rotate images the change when we move the mouse
➢ Detect the browser in use and display different content for different
browsers.
➢ Detect installed plug-ins and notify the user if a plug –in is required.

We can do much more with JavaScript, including creating entire application.

Page
41
Online Grocery Shop 2018

Advantages

➢ JavaScript can be used for server-side and client-side scripting.

➢ It is more flexible than VBScript.

➢ JavaScript is the default scripting languages at Client-side since all the


browsers supports it.

5.3 AJAX

AJAX stands for Asynchronous Java Script and XML.It is the use of the
XMLHttpRequest object to communicate with server-side scripts. It can send as
well as receive information in a verity of formats, including JSON, XML,
HTML, and even text files. AJAX’S most appealing characteristic is its
“asynchronous” nature, which means it can do all of this without having to
refresh the page. The two major features of AJAX are:

• Make requests to the server without reloading the page


• Receive and work with data from server

Page
42
Online Grocery Shop 2018

ADVANTAGES

➢ Reduce the traffic travels between the client and the server.
➢ Response time is faster so increases performance and speed.
➢ It can use JSON which is alternative to XML. JSON is key value
pair and works like an array.
➢ It can use Firefox browser with an add – on called as Firebug to
debug all Ajax calls.
➢ Ready Open source JavaScript libraries available for use – jQuery,
Prototype, Scriptaculous, etc.
➢ AJAX communicates over HTTP Protocol.

5.4JQUERY

JQuery is a cross platform java scripts library designed to simplify the client-
side scripting of HTML. JQuery is the most popular JavaScript library in use
today, with installation on 65% of the top 10 million highest trafficked site on
the web. It is free, open source software licenced under the MIT License. Its
syntax is designed to make it easier to navigate a document, select DOM
elements, create animations, handle events, and develop Ajax applications. It
also provides capabilities for developers to create abstraction for low level
interaction and animation, advanced effects and high level, theme-able widgets.
The modular to the jQuery library allows the creation of powerful dynamic and
web applications. The set of JQuery core features- DOM element selections,

Page
43
Online Grocery Shop 2018

traversal and manipulating-enabled by its selector engine, create a new


“Programming style”, fusing algorithm and data structures.

ADVANTAGES

➢ Ease of use: This is pretty much the main advantage of using JQuery, it
is a lot easier to use compared to standard JavaScript and another
JavaScript libreries. apart from simple syntax, it also requires much less
lines of code to achieve the same feature in comparison
➢ Large library: JQuery enables us to perform hordes of functions in
comparison to other java scripts libraries.
➢ Strong open source community: jQuery, while relatively new has a
following that religiously devote their time to develop and enhance the
functionality of jQuery. Thus, there are hundreds of prewritten plugs in
available for download to instantly speed up our development process.
Another advantage behind this is the efficiency and security of the script.
➢ Great documentation and tutorials: The JQuery website has a
comprehensive documentation and tutorials to get even an absolute
beginner in programming to get the ball rolling with this library.
➢ Ajax support: JQuery support Ajax enables a sleeker interface where
actions can be performed on pages without requiring to entire page to be
reloaded.

Page
44
Online Grocery Shop 2018

5.5 Microsoft SQL Server

Databases help the business access information more quickly. This, in turn,
allows employees to get more done in less time, which allows business to grow
more rapidly. When businesses grow more rapidly, there are generally more
jobs and higher pay and the economy dose better. This all sounds wonderful,
doesn’t it? So then why don’t we see database helping companies and
organizations progress their business faster?
Productivity is main contributor, but there are many others. In fact databases are
very difficult to understand on a holistic level. From programming to
maintaining and from deploying to managing, databases can be tricky to keep
up with when thinking about the business. In this post, we’ll take a closer look
at what challenges are faced by virtualization admins who are, in one way or
another, connected to Microsoft SQL Server (MSSQL) in addition to some of
the advantages of using the software.
The main reason Microsoft SQL Server is a favorite of developers and
virtualization admins alike is its ease of use. Development and troubleshooting
are typically the toughest aspects to perfect when thinking about getting a SQL
project into production. MSSQL comes with excellent tools that will save you a
lot time in these areas – tools like SQL Server Profiler, SQL Server
management Studio, BI tools and Database Tuning Advisor.
Setting up almost everything, from installing on a VM to initial Query writing
and editing, is incredible easy with MSSQL – especially in comparison to other
SQL products. If there are problems in any stage of development, there is a
plethora of online support and Documentation in Addition to live product

Page
45
Online Grocery Shop 2018

support, whereas the support option for other SQL products are not nearly as
robust.

MSSQL Memory Management Challenges:Although we can always program


code better to be a little (or a lot) more efficient, the real struggles with MSSQL
happen when managing it in a virtual environment. MSSQL tends to “hog” the
allocated memory, at least from the VM’s perspective, seemingly using 100%
of its virtual memory. A common practice is to simply ignore this monitored
utilization and takethe DBA’s recommendation for VM memory configuration.
This only leads to inefficiency or evenperformance problems and doesn’t give
any application-tier insight to the infrastructure. By giving an arbitrary amount
of resource capacity to the VM running the application, resources not used are
wasted. On the flip side, when the capacity isn’t big enough, application
performance can suffer. Without the proper insight or visibility into the
application to find out actual resource utilization, ventilation admins are often
the scapegoat for when something goes wrong.
The Finger-pointing Scenario: So, what if performance dose become an issue?
Who’s at fault, and how do you resolve it? It the coding, the resource supply on
the virtual machine or internal to the application? Without proper
communication or awareness of all parties involved, it’s often difficult to
pinpoint the bottleneck. This is when the finger-pointing begins. If the
application’s middleware components were aware of the sizing of the underling
VM infrastructure and vice versa, then there wouldn’t be any bottlenecks from a
resource allocation perspective.
How else is the VM supposed to know how much memory to give to the
application if the database memory isn’t sized correctly which is leading into an
unacceptable response time or QOS? In this situation, rather than spending time

Page
46
Online Grocery Shop 2018

troubleshooting, it would benefit the performance output of the application if


there was a proper supply of computing resource to the consuming database
server. Conversely, if the DBA had proof/justification that the underling
infrastructure was free of resource contention bottlenecks, s/he would be able to
troubleshoot performance issues much more quickly. Eliminating bottlenecks
on the infrastructure reduces the number of places a finger can point in a
degraded performance situation and enables teams to refocus their time on
innovative projects for the business.
Data definition:Defining tables and structure in the database (DDL used to
create, alter and drop schema objects such as tables and indexes).
Data manipulation:Used to manipulate the data within those schema objects
(DML Inserting, Updating, Deleting the data, and Querying the Database).
A schema is a collection of database objects that can include: tables, views,
indexes and sequences

List of SQL statements that can be issued against an Oracle database schema
are:
• ALTER – Change an existing table, view or index definition (DDL)
• AUDIT- Track the changes made to a table (DDL)
• COMMENT- Add a comment to a table or column in a table (DDL)
• COMMIT- Make all recent changes permanent (DDL – transactional)
• CREATE- Create new database objects such as tables or views (DDL)
• DELETE- Delete rows from a database table (DML)
• DROP- Drop a database object such as a table, view or index (DDL)
• GRANT- Allow another user to access database objects such as tables or
views (DDL)
Page
47
Online Grocery Shop 2018

• INSERT- Insert new data into a database table (DML)


• No AUDIT- Turn off the auditing function(DDL)
• REVOKE- Disallow a user access to database objects such as tables and
views (DDL)
• ROLLBACK- Undo any recent changes to the database (DML-
Transactional)
• SELECT- Retrieve data from a database table (DML)

• TRUNCATE- Delete all rows from a database table (cannot be rolled


back)(DML)
• UPDATE- Change the values of some date item in a database table
(DML)

Advantages
➢ High Speed: SQL Queries can be used to retrieve large amounts of
records from a database quickly and efficiently.

➢ Well Defined Standards Exist:SQL database use long – established


standard, which is being adopted by ANSI & ISO. Non – SQL database
do not adhere to any clear standard.
➢ NO Coding Required:Using standard SQL it is easier to manage
database systems without having to write substantial amount of code.
➢ Emergence of ORDBMS:Previously SQL database were synonymous
with
Page
48
Online Grocery Shop 2018

Relational database. With the emergence of Object Oriented DBMS, object


storage capabilities are extended to relational database.

5.6 Android Studio


Android Studio is the official integrated development
environment (IDE) for Google's Android operating system, built
on JetBrains' IntelliJ IDEA software and designed specifically
for Android development. It is available for download
on Windows, macOS and Linux based operating systems. It is a
replacement for the Eclipse Android Development Tools (ADT) as
primary IDE for native Android application development.
Android Studio was announced on May 16, 2013 at the Google
I/O conference. It was in early access preview stage starting from
version 0.1 in May 2013, then entered beta stage starting from version
0.8 which was released in June 2014. The first stable build was
released in December 2014, starting from version 1.0. The current
stable version is 3.1 released in March 2018

Page
49
Online Grocery Shop 2018

CHAPTER 7
Coding & Output Screen

Page
50
Online Grocery Shop 2018

Program: index.php
<?php
session_start();
error_reporting(0);
include('admin/includes/config.php');
?>
<!DOCTYPE html>
<html lang="zxx">
<head>
<title>Online Groccery Shop</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta charset="utf-8" />
<meta name="keywords" content="Beverages Responsive web template,
Bootstrap Web Templates, Flat Web Templates, Android Compatible web
template,
SmartPhone Compatible web template, free WebDesigns for Nokia,
Samsung, LG, Sony Ericsson, Motorola web design" />
<script>
addEventListener("load", function () {
setTimeout(hideURLbar, 0);
}, false);

function hideURLbar() {
window.scrollTo(0, 1);

Page
51
Online Grocery Shop 2018

}
</script>
<style>
.fixed-ratio-resize { /* basic responsive img */
max-width: 100%;
height: auto;
width: auto\9; /* IE8 */
}
</style>
<!-- Custom Theme files -->
<link href="css/bootstrap.css" type="text/css" rel="stylesheet" media="all">
<link href="css/style.css" type="text/css" rel="stylesheet" media="all">
<!-- banner slider -->
<link rel="stylesheet" type="text/css" href="css/zoomslider.css" />
<!--gallery -->
<link type="text/css" rel="stylesheet" href="css/cm-overlay.css" />
<!-- //gallery -->
<script src="js/jquery-2.2.3.min.js"></script>
<!-- numscroller -->
<script type="text/javascript" src="js/numscroller-1.0.js"></script>
<script src="js/bootstrap.js"></script>
<!-- font-awesome icons -->
<link href="css/font-awesome.css" rel="stylesheet">
<!-- //Custom Theme files -->

Page
52
Online Grocery Shop 2018

<!-- web-fonts -->


<link href="//fonts.googleapis.com/css?family=Righteous" rel="stylesheet">
<link
href="//fonts.googleapis.com/css?family=Mukta+Mahee:200,300,400,500,600
,700,800" rel="stylesheet">
<!-- //web-fonts -->
</head>

<!-- Modal -->


<div id="reg" class="modal fade" role="dialog">
<div class="modal-dialog">

<!-- Modal content-->


<div class="modal-content">
<div class="modal-header" style="background-color: #343d46;">
<button type="button" class="close" data-dismiss="modal">&times;</button>

</div>
<div class="modal-body" style="background-color: #d0d0d0;">

<form action="register.php" method="post">


<div class="modal-content" style="background-color: #d0d0d0;">
<h1>Sign Up</h1>
<p>Please fill in this form to create an account.</p>

Page
53
Online Grocery Shop 2018

<p>Email ID</p>
<input type="text" name="email" class="form-control">
<p>Password</p>
<input type="password" name="password" class="form-control">
<p>FullName</p>
<input type="text" name="fullname" class="form-control">
<p>Phone</p>
<input type="text" name="phone" class="form-control">
<p>Address</p>
<input type="text" name="address" class="form-control">
<label>
<input type="checkbox" checked="checked" name="remember"
style="margin-bottom:15px">By creating an account you agree to our <a
href="#" style="color:dodgerblue">Terms & Privacy</a>.
</label>
<br>
<div class="clearfix">
<button type="submit" name="submit" class="btn-success">Sign
Up</button>
</div>
</div>
</form>
</div>

Page
54
Online Grocery Shop 2018

</div>
</div>
</div>
<!-- Modal -->
<div id="log" class="modal fade" role="dialog">
<div class="modal-dialog">

<!-- Modal content-->


<div class="modal-content">
<div class="modal-header" style="background-color: #343d46;">
<button type="button" class="close" data-dismiss="modal">&times;</button>

</div>
<div class="modal-body" style="background-color: #d0d0d0;">

<form action="login.php" method="post">


<div class="modal-content" style="background-color: #d0d0d0;">
<h1>Log In</h1>
<p>Please fill in your details</p>

<p>Email ID</p>
<input type="text" name="email" class="form-control" placeholder="Enter
Email">
<p>Password</p>

Page
55
Online Grocery Shop 2018

<input type="password" name="password" class="form-control"


placeholder="Enter Password">
<p></p>
<br>
<div class="clearfix">
<button type="submit" name="login" class="btn-success">Log In</button>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
<body>
<!--/banner-bottom-->
<div class="w3_agilits_banner_bootm">
<!-- header -->
<div class="container">
<div class="w3_agile_logo">
<h1>
<a href="index.php">
<img src="images/logo.png" alt="" />Grocery Shop</a>
</h1>
</div>

Page
56
Online Grocery Shop 2018

<div class="agileits_w3layouts_nav">
<div id="toggle_m_nav">
<div id="m_nav_menu" class="m_nav">
<div class="m_nav_ham w3_agileits_ham" id="m_ham_1"></div>
<div class="m_nav_ham" id="m_ham_2"></div>
<div class="m_nav_ham" id="m_ham_3"></div>
</div>

</div>
<div id="m_nav_container" class="m_nav wthree_bg">
<nav class="menu menu--sebastian">
<ul id="m_nav_list" class="m_nav menu__list">
<li class="m_nav_item menu__item menu__item--current"
id="m_nav_item_1">
<a href="index.php" class="menu__link"> Home </a>
</li>
<li class="m_nav_item menu__item" id="moble_nav_item_2">
<a href="about.php" class="menu__link"> About Us </a>
</li>
<li class="m_nav_item menu__item" id="moble_nav_item_6">
<a href="contact.php" class="menu__link"> Contact </a>
</li>

<li class="m_nav_item menu__item" id="moble_nav_item_6">

Page
57
Online Grocery Shop 2018

<a href="shop.php" class="menu__link"> Shop</a>


</li>

<li class="m_nav_item menu__item" id="moble_nav_item_3">


<a href="listcart.php" class="menu__link"><i class="fa fa-shopping-
cart">Cart </i></a>
</li>

<?php if(isset($_SESSION["email"])) {?>


<h4 style="color: #66cd00" >Welcome <a href="my-account.php"><?php
echo $_SESSION["name"]; ?></a> | <a style="color: #66cd00"
href="logout.php">Logout</a></h3>
<?php } else { ?>

<li class="m_nav_item menu__item" id="moble_nav_item_7">


<a href="newlogin.php" class="menu__link" data-target="#log"> Login </a>
</li>
<li class="m_nav_item menu__item" id="moble_nav_item_8">
<a href="newreg.php" class="menu__link" class="menu__link" data-
target="#reg"> Register </a>
</li>
<div class="topnav">
<div class="search-container">

Page
58
Online Grocery Shop 2018

<form action="/action_page.php">
<input type="text" placeholder="Search.." name="search">
<button type="submit"><i class="fa fa-search"></i></button>
</form>
</div>
<?php } ?>

</ul>
</nav>
</div>
</div>
</div>
<!--// header -->
<div class="w3_agilits_inner_bottom">
<div class="wthree_agile_login">
<ul>
<li>
<i class="fa fa-phone" aria-hidden="true"></i> (+000) 009 455 4088</li>
<li>
<i class="fa fa-envelope-o list-icon" aria-hidden="true"></i>
<a href="mailto:info@example.com">info@ymail.com</a>
</li>
</ul>
</div>

Page
59
Online Grocery Shop 2018

</div>
</div>
<!--//banner-bottom-->
<!--/banner-section-->
<div id="demo-1" data-zs-
src='["images/b3.jpg","images/b5.jpg","images/b1.jpg","images/b2.jpg","imag
es/b4.jpg"]' data-zs-overlay="dots">
<div class="demo-inner-content">

<!--/banner-info-->
<div class="baner-info">
<h4>WELCOME </h4>
<h3>
Every day you get our best</h3>
<p>Freshness you can taste. Values you can trust.</p>
<a class="hvr-rectangle-out w3_play_icon1" href="shop.php"> Shop
Now</a>
</div>
<!--/banner-ingo-->
</div>
</div>
<!--/banner-section-->
<!--about -->

Page
60
Online Grocery Shop 2018

<div id="about" class="wthree-about section-w3ls">


<div class="container">
<div class="agileits-banner-grids text-center">
<div class="banner-bottom-girds">
<div class="services_agile" id="services">
<div class="services-top">

<?php
$sql= "SELECT * FROM category ORDER BY id DESC LIMIT 0,4";
$rs=$con->query($sql);
while($row=$rs->fetch_assoc())
{

?>

<div class="col-md-3 col-sm-4 col-xs-4 service_grid text-center">


<div class="serviceinfo_agile ih-item circle colored effect17 active">
<div class="img">
<img src="images/a1.jpg" class="img-responsive" alt="img">
</div>

Page
61
Online Grocery Shop 2018

<div class="info">
<p><?php echo $row['category']; ?></p>
</div>
</div>
</div>

<?php } ?>

<div class="clearfix"></div>
</div>
</div>
<div class="clearfix"></div>
</div>
</div>

<div class="clearfix"> </div>

</div>
</div>

<!-- menu -->


<div class="w3ls-services section-w3ls">
<div class="container">

Page
62
Online Grocery Shop 2018

<h3 class="w3ls-title">
<span>P</span>RODUCTS</h3>
<div class="grid">

<?php

$sql= "SELECT * FROM product WHERE status='1'";


$rs=$con->query($sql);
while($row=$rs->fetch_assoc())
{

?>

<figure class="col-md-2" style="border-style: solid; margin-right: 30px;


margin-bottom: 20px; padding: 8px;">
<img src="admin/img/productimages/<?php echo $row['image1'];?>" alt="t1"
class="img-responsive" style="width:200px ;height:150px;" />

<h4><strong><a href="proview.php"><?php echo


$row['producttitle'];?></a></strong></h4>
<h4>Rs <?php echo $row['price'];?><br>

Page
63
Online Grocery Shop 2018

<p>Stock <?php echo $row['stock'];?></p>

<form action="addcart.php" method="post"><input type="hidden"


name="p_id" value="<?php echo $row['id'] ;?>">

<input type="hidden" name="uid" value="<?php echo $_SESSION['UID']


;?>">

<input type="hidden" name="price" value="<?php echo $row['price'] ;?>">


<input type="number" name="qty" value="1" style="width: 50px;" min="1"
max="10"><br><br>

<?php
if(isset($_SESSION['UID']) && $_SESSION['UID']!='')
{
?>
<input type="submit" name="sub" value="Add To Cart" class="btn btn-
info">
<?php
}
else

Page
64
Online Grocery Shop 2018

{
?>
<input type="button" value="Login to buy" class="btn btn-info"
onclick="window.location='newlogin.php'">
<?php }
?>
</form>

</h4>

</figure>

<?php
}
?>

</div>
</div>
</div>
<!-- //menu -->

Page
65
Online Grocery Shop 2018

<!-- footer -->


<div class="agile-footer w3ls-section">
<div class="container">
<div class="list-footer">
<ul class="footer-nav">
<li>
<a href="index.php">Home</a>
</li>
<li>
<a href="about.php">About</a>
</li>
<li>
<a href="shop.php">Shop</a>
</li>
</ul>
</div>
<div class="agileits_w3layouts-footer-bottom">
<div class="w3_agile-footer-grids">
<div class="col-md-3 w3_agile-footer1 f1">
<h2>
<a href="index.php">Groccery</a>
</h2>

Page
66
Online Grocery Shop 2018

<h5 class="f1">about us</h5>


<p>Tis is a <strong>DEMO</strong> website currently in development.</p>
</div>
<div class="col-md-6 w3_agile-footer1 f2">
<div class="f1">
<h5>support</h5>
<ul class="w3ls-footer-bottom-list">

<li>
<a href="#">FAQ</a>
</li>

</ul>
</div>
<div class="clearfix"></div>
</div>
<div class="col-md-3 w3_agile-footer1 f3">
<h5>follow us</h5>
<ul class="footer-social-icons">
<li>
<a href="#">
<i class="fa icon1 fa-facebook icons" aria-hidden="true"></i>
</a>
</li>

Page
67
Online Grocery Shop 2018

<li>
<a href="#">
<i class="fa icon2 fa-twitter icons" aria-hidden="true"></i>
</a>
</li>
<li>
<a href="#">
<i class="fa icon3 fa-google-plus icons" aria-hidden="true"></i>
</a>
</li>
<li>
<a href="#">
<i class="fa icon3 fa-linkedin icon4 icons" aria-hidden="true"></i>
</a>
</li>
</ul>
</div>
<div class="clearfix"></div>
</div>
</div>
<div class="agileits_w3layouts-copyright">
<p>© 2018 SVIMS GROUP B| Design by Gourav
</p>
</div>

Page
68
Online Grocery Shop 2018

</div>
</div>
<!-- //footer -->
<!-- banner slider -->
<script src="js/modernizr-2.6.2.min.js"></script>
<script src="js/jquery.zoomslider.min.js"></script>
<!-- //banner slider -->
<!-- //gallery -->
<script src="js/jquery.tools.min.js"></script>
<script src="js/jquery.mobile.custom.min.js"></script>
<script src="js/jquery.cm-overlay.js"></script>

<script>
$(document).ready(function () {
$('.cm-overlay').cmOverlay();
});
</script>
<!-- //gallery -->
<!-- testimonials -->
<!-- required-js-files-->
<link href="css/owl.carousel.css" rel="stylesheet">
<script src="js/owl.carousel.js"></script>
<script>
$(document).ready(function () {

Page
69
Online Grocery Shop 2018

$("#owl-demo").owlCarousel({
items: 1,
lazyLoad: true,
autoPlay: false,
navigation: true,
navigationText: true,
pagination: true,
});
});
</script>
<!--//required-js-files-->
<!-- start-smooth-scrolling -->
<script src="js/move-top.js"></script>
<script src="js/easing.js"></script>
<script>
jQuery(document).ready(function ($) {
$(".scroll").click(function (event) {
event.preventDefault();

$('html,body').animate({
scrollTop: $(this.hash).offset().top
}, 1000);
});
});

Page
70
Online Grocery Shop 2018

</script>
<!-- //end-smooth-scrolling -->
<!-- smooth-scrolling-of-move-up -->
<script>
$(document).ready(function () {
$().UItoTop({
easingType: 'easeOutQuart'
});

});
</script>
<script src="js/SmoothScroll.min.js"></script>
<!-- //smooth-scrolling-of-move-up -->
<!-- navigation -->
<script src="js/main.js"></script>
<!-- //navigation -->
<!-- newsletter modal -->
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-
hidden="true">
<div class="modal-dialog modal-md">
<div class="modal-content text-center">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-
hidden="true">

Page
71
Online Grocery Shop 2018

&times;</button>
<div class="col-md-9 col-sm-9 col-xs-9 sub-head">
<h4 class="modal-title" id="myModalLabel">
subscribe to our newsletter</h4>
</div>
<div class="col-md-3 col-sm-3 col-xs-3 sub-img">
<img src="images/news.png" alt="" class="img-responsive" />
</div>
<div class="clearfix"></div>
</div>
<div class="modal-body">
<div class="row">
<div class="newsletter">
<h6>signup to our newsletter and be the first to know about latest
news,special offers,events and
discounts.
</h6>
<form class="form-horizontal" method="post" action="#">
<div class="form-group">
<div class="col-sm-8">
<input type="email" class="form-control" id="email1" placeholder="Enter
your Email" />
</div>
<div class="col-sm-4">

Page
72
Online Grocery Shop 2018

<button type="submit" class="btn btn-primary btn-sm">


Submit</button>
</div>
<div class="clearfix"></div>

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

</script>
<!-- //newsletter modal -->
<!-- Bootstrap core JavaScript
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->
</body>
</html>

Page
73
Online Grocery Shop 2018

Program: shop.php
<?php include("includes/header.php"); ?>
<div class="w3ls-services section-w3ls">
<div class="container">
<h3 class="w3ls-title">
<span>P</span>RODUCTS</h3>
<div class="grid">
<?php
$sql= "SELECT * FROM product WHERE status='1'";
Page
74
Online Grocery Shop 2018

$rs=$con->query($sql);
while($row=$rs->fetch_assoc())
{
?>
<figure class="col-md-2" style="border-style: solid; margin-right: 30px;
margin-bottom: 20px; padding: 8px;">
<img src="admin/img/productimages/<?php echo $row['image1'];?>" alt="t1"
class="img-responsive" style="width:200px ;height:150px;" />
<h4><strong><a href="product-view.php"><?php echo
$row['producttitle'];?></a></strong></h4>
<h4>Rs <?php echo $row['price'];?><br>
<p>Stock <?php echo $row['stock'];?></p>
<form action="addcart.php" method="post"><input type="hidden"
name="p_id" value="<?php echo $row['id'] ;?>">
<input type="hidden" name="uid" value="<?php echo $_SESSION['UID']
;?>">
<input type="hidden" name="price" value="<?php echo $row['price'] ;?>">
<input type="number" name="qty" value="1" style="width: 50px;" min="1"
max="10"><br><br>
<?php
if(isset($_SESSION['UID']) && $_SESSION['UID']!='')
{
?>

Page
75
Online Grocery Shop 2018

<input type="submit" name="sub" value="Add To Cart" class="btn btn-


info">
<?php
}
else
{
?>
<input type="button" value="Login to buy" class="btn btn-info"
onclick="window.location='newlogin.php'">
<?php }
?>
</form>
</h4>
</figcaption>
</figure>
<?php
}
?>
</div>
</div>
</div>

<?php include("includes/footer.php"); ?>

Page
76
Online Grocery Shop 2018

Program: newlogin.php
<?php include('includes/header.php'); ?>
<div class="container" style="margin:40px auto; " >
<br>
<body>
<form action="login.php" method="post">

Page
77
Online Grocery Shop 2018

<div class="container">
<h1>Log In</h1>
<p>Please fill in your details</p>

<p>Email ID</p>
<input type="text" name="email" class="form-control" required
pattern="^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-
z]{2,3})$">
<p>Password</p>
<br>
<input type="password" name="password" class="form-control">
<br>
<div class="clearfix">
<button type="submit" name="login" class="btn-success">Log In</button>
</div>
<br>
<h5>Don't have account we got you covered <a href="newreg.php">Click
Here</a></h5>
</div>
<?php
include('includes/footer.php');
?>
<br>
</div>

Page
78
Online Grocery Shop 2018

</form>
</body>

Program: newreg.php
<?php include('includes/header.php'); ?>
<div class="container">
<br>

Page
79
Online Grocery Shop 2018

<form action="register.php" method="post">


<div class="container">
<h1>Sign Up</h1>
<p>Please fill in this form to create an account.</p>

<p>Email ID</p>
<input type="text" name="email" class="form-control" required pattern="^[_a-
z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$">
<p>Password</p>
<input type="password" name="password" class="form-control">
<p>FullName</p>
<input type="text" name="fullname" class="form-control" required>
<p>Phone</p>
<input type="text" name="phone" class="form-control" required pattern="[1-
9]{1}[0-9]{9}">
<p>Address</p>
<input type="text" name="address" class="form-control" required>
<p></p>
<div class="clearfix">
<button type="submit" name="submit" class="btn-success">Sign Up</button>
</div>
</div>
<br>

Page
80
Online Grocery Shop 2018

<?php
include('includes/footer.php');
?>

</form>
</div>

Program: login.php
<?php
session_start();
include('admin/includes/config.php');
?>
<?php
$email=$_POST['email'];
$password=$_POST['password'];
$src="SELECT * FROM `user` WHERE `email`='$email' AND
`password`='$password'";
$rs=mysqli_query($con,$src);
if(mysqli_num_rows($rs)>0){
$row=mysqli_fetch_assoc($rs);
$_SESSION['email']=$row['email'];
$_SESSION['password']=$row['password'];
$_SESSION['UID']=$row['id'];
$_SESSION['name']=$row['fullname'];

Page
81
Online Grocery Shop 2018

$u_rs=mysqli_query($con,$src);

if(mysqli_num_rows($rs)>0){
$_SESSION['email']=$email;
$_SESSION['password']=$password;
?><script>
window.location='index.php';
</script>
<?php
}
else{
echo "<script type='text/javascript'>alert('Invalid Details');</script>";
}
}
else
{
?>
<script>
alert('Invalid Details');
window.location='newlogin.php';
</script>
<?php
}
?>

Page
82
Online Grocery Shop 2018

Program: logout.php
<?php
session_start();
session_destroy();
header("Location: index.php");
?>

Page
83
Online Grocery Shop 2018

Program: listcart.php
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-
awesome/4.7.0/css/font-awesome.min.css">
<?php
include('includes/header.php');?>
<div class="panel panel-default">
<div class="panel-heading"><h1>My Cart</h1></div>
<div class="panel-body">
<table id="zctb" class="display table table-striped table-bordered table-hover"
cellspacing="0" width="100%">
<thead>
<tr style="background-color: #000; color: #fff;">
<th>Product Name</th>

<th>Price</th>
<th>Quantity</th>
<th>Total</th>
<th>Remove</th>

</tr>
</thead>

<?php

Page
84
Online Grocery Shop 2018

$total=0;
$sql= "SELECT * FROM cart WHERE uid='".$_SESSION['UID']."'";
$rs=$con->query($sql);
while($row=$rs->fetch_assoc())
{

$sqlp= "SELECT * FROM product WHERE id='".$row['p_id']."'";


$rsp=$con->query($sqlp);
while($rowp=$rsp->fetch_assoc())
{
$total=$total+ ($row['price']*$row['qty']);
?>
<tr>
<td> <?php echo $rowp['producttitle'];?> </td>
<td> <?php echo $row['price'];?> </td>
<td> <?php echo $row['qty'];?> </td>
<td> <?php echo $row['price']*$row['qty'];?> </td>
<td align="center"><form action="delfrmcart.php" method="post"><input
type="hidden" name="id" value="<?php echo $row['id']; ?>">
<button type="submit" class="btn btn-danger" style="padding: 5px;"><i
style="font-size: 20px;" class="fa fa-trash"></i></button>
</form>
</td>

Page
85
Online Grocery Shop 2018

</tr>

<?php
}
}
?>
<tr style="background-color: #ccc;">
<td colspan="4"><strong>Grand Total</strong> </td>

<td colspan="5"> Rs <?php echo $total; ?> </td>


</tr>
<?php
if(isset($_SESSION['UID']) && $_SESSION['UID']!='')
{
?>
<tr style="background-color: #ccc;"">
<td align="right" colspan="5"><form action="checkout.php" method="post">
<button type="submit" class="btn btn-success" style="padding:
5px;">Checkout</button>
</form>
<?php
}
else
{

Page
86
Online Grocery Shop 2018

?>
<tr style="background-color: #ccc;"">
<td align="right" colspan="5"><form action="newlogin.php" method="post">
<button type="submit" class="btn btn-info" style="padding: 5px;">Login
In</button>
</form>
<?php } ?>
</td>
</tr>
</table>
</div>
</div>
</div>
<?php
include('includes/footer.php');
?>
</body>

</form>

Page
87
Online Grocery Shop 2018

Program: checkout.php

<?php
include('admin/includes/config.php'); ?>

<body>
<?php include('includes/header.php');?>

Page
88
Online Grocery Shop 2018

<?php
if(isset($_POST['submit']))
{
$name=$_POST['name'];
$address=$_POST['address'];
$phone=$_POST['phone'];
$zip=$_POST['zip'];

$total=0;
$sql= "SELECT * FROM cart WHERE uid='".$_SESSION['UID']."'";
$rs=$con->query($sql);
while($row=$rs->fetch_assoc())
{
$total=$total+($row['price']*$row['qty']);

$ins="INSERT INTO checkout SET


name='$name',address='$address',phone='$phone',zip='$zip',uid='".$_SESSION
['UID']."',total='$total'";
$con->query($ins);

$last_id = mysqli_insert_id($con);

Page
89
Online Grocery Shop 2018

$sql= "SELECT * FROM cart WHERE uid='".$_SESSION['UID']."'";


$rs=$con->query($sql);
while($row=$rs->fetch_assoc())
{

$tt=$row['price']*$row['qty'];

$ins="INSERT INTO sorder SET


p_id='".$row['p_id']."',price='".$row['price']."',qty='".$row['qty']."',total='$tt',oid
='$last_id' ";
$con->query($ins);

$sqlprd= "SELECT * FROM product WHERE id='".$row['p_id']."'";


$rsprd=$con->query($sqlprd);
while($rowprd=$rsprd->fetch_assoc())
{
$stk=$rowprd['stock']-$row['qty'];
$upd="UPDATE product SET stock='$stk' WHERE id='".$row['p_id']."'";
$con->query($upd);
}

Page
90
Online Grocery Shop 2018

$del="DELETE FROM cart WHERE uid='".$_SESSION['UID']."'";


$con->query($del);
?>
<script type="text/javascript">window.location='ordercreate.php'</script>
<?php
}

?>
<div class="ts-main-content">

<div class="content-wrapper">
<div class="container-fluid">

<div class="row">
<div class="col-md-12">

<h2 class="page-title">Shipping Address</h2>

<div class="row">
<div class="col-md-12">

Page
91
Online Grocery Shop 2018

<div class="panel panel-default">

<div class="panel-body">
<form method="post" class="form-horizontal" enctype="multipart/form-data">
<div class="form-group">
<label class="col-sm-2 control-label">FullName<span
style="color:red">*</span></label>
<div class="col-sm-4">
<input type="text" name="name" class="form-control" required>
</div>
</div>

<div class="form-group">
<label class="col-sm-2 control-label">Address<span
style="color:red">*</span></label>
<div class="col-sm-5">
<input type="text" name="address" class="form-control" required>
</div>
</div>

<div class="form-group">
<label class="col-sm-2 control-label">Mobile No.<span
style="color:red">*</span></label>

Page
92
Online Grocery Shop 2018

<div class="col-sm-3">
<input type="text" name="phone" class="form-control" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">Zip Code<span
style="color:red">*</span></label>
<div class="col-sm-3">
<input type="text" name="zip" class="form-control" required>
</div>
</div>
<div class="hr-dashed"></div>
</div>
</div>
</div>
</div>
<div class="container-fluid">
<h1>Payment Option</h1>
<br>

<input type="radio" name="cod" value="cod" checked> Cash On


Delivery(COD)<br>

</div>

Page
93
Online Grocery Shop 2018

<div class="form-group">
<div class="col-sm-8 col-sm-offset-2">
<button class="btn btn-primary" name="submit"
type="submit">Proceed</button>
</div>
</div>

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

Page
94
Online Grocery Shop 2018

</form>
<br>
<?php include('includes/footer.php');?>

Program: ordercreate.php

<?php include("includes/header.php"); ?>

Page
95
Online Grocery Shop 2018

<br>
<form action="shop.php" method="post">
<div class="container">
<h1>Thank You</h1>
<p>Thank You For Shopping With Us.Have A Great Day.</p>
<div class="container">
<input type="submit" name="submit" class="btn-info" value="Go To
Shopping" style="float: right; "><a href="shop.php"></a>
</div>
</form>
</div>
<br>
<br><br><br><br><br><br>
<?php include("includes/footer.php"); ?>

Program: addcart.php

<?php
include('admin/includes/config.php');
?>
<?php
if(isset($_POST['sub']))
{
$uid=$_POST['uid'];

Page
96
Online Grocery Shop 2018

$p_id=$_POST['p_id'];
$price=$_POST['price'];
$qty=$_POST['qty'];
$sql="INSERT INTO cart SET uid='$uid',p_id='$p_id',price='$price',qty='$qty'
";
$con->query($sql);
$smsg="Product added successfully";

header('location:index.php');
}
?>

Program: delfrmcart.php

<?php
include('admin/includes/config.php');
$id=$_POST['id'];
$del="DELETE FROM cart WHERE id='$id'";
$con->query($del);
header("location:listcart.php");
?>

Page
97
Online Grocery Shop 2018

Program: my-account.php
<?php
session_start();
error_reporting(0);
include('admin/includes/config.php');

$id=$_POST['UID'];

Page
98
Online Grocery Shop 2018

$sql="SELECT * FROM user WHERE id='$id'";


$rs=$con->query($sql);
$rowed=$rs->fetch_assoc();

if(strlen($_SESSION['UID'])==0)
{
header('location:index.php');
}
else{

if(isset($_POST['submit']))
{
$id=$_POST['UID'];
$fullname=$_POST['fullname'];
$phone=$_POST['phone'];
$address=$_POST['address'];
$password=$_POST['password'];

$sql="UPDATE user SET


fullname='$fullname',phone='$phone',address='$address',password='$password'
WHERE id='".$_SESSION['UID']."'";
$rs=$con->query($sql);

Page
99
Online Grocery Shop 2018

$smsg="Details updated successfully";


}

?>
<!doctype html>
<html lang="en" class="no-js">

<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1,
minimum-scale=1, maximum-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<meta name="theme-color" content="#3e454c">

<title>Online Grocery Shop </title>

<!-- Font awesome -->


<link rel="stylesheet" href="css/font-awesome.min.css">
<!-- Sandstone Bootstrap CSS -->
<link rel="stylesheet" href="css/bootstrap.min.css">

Page
100
Online Grocery Shop 2018

<!-- Bootstrap Datatables -->


<link rel="stylesheet" href="css/dataTables.bootstrap.min.css">
<!-- Bootstrap social button library -->
<link rel="stylesheet" href="css/bootstrap-social.css">
<!-- Bootstrap select -->
<link rel="stylesheet" href="css/bootstrap-select.css">
<!-- Bootstrap file input -->
<link rel="stylesheet" href="css/fileinput.min.css">
<!-- Awesome Bootstrap checkbox -->
<link rel="stylesheet" href="css/awesome-bootstrap-checkbox.css">
<!-- Admin Stye -->
<link rel="stylesheet" href="css/style.css">
<style>
.errorWrap {
padding: 10px;
margin: 0 0 20px 0;
background: #fff;
border-left: 4px solid #dd3d36;
-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;

Page
101
Online Grocery Shop 2018

background: #fff;
border-left: 4px solid #5cb85c;
-webkit-box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);
box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);
}
h2 {
display: block;
font-size: 2em;
margin-top: 0.67em;
margin-bottom: 0.67em;
margin-left: 0;
margin-right: 0;
font-weight: bold;
}
</style>

</head>

<body>
<?php include('includes/header.php');?>
<div>

<div class="row">
<div class="col-md-12">

Page
102
Online Grocery Shop 2018

<h2 class="page-title">My Account</h2>

<div class="row">
<div class="col-md-12">
<div class="panel panel-default">

<?php
if(isset($smsg) && $smsg!="")
{
?>
<div class="alert alert-success alert-dismissible">
<a href="#" class="close" data-dismiss="alert" aria-label="close">&times;</a>
<strong>Success!</strong> <?php echo $smsg; ?>
</div>
<?php }?>

<div class="panel-body">
<form method="post" class="form-horizontal" enctype="multipart/form-data">
<div class="form-group">
<label class="col-sm-2 control-label">Full Name<span
style="color:red">*</span></label>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nb
sp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbs
p&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbs

Page
103
Online Grocery Shop 2018

p&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbs
p&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp<a
href="mngorder.php" style="font-size: 20px;">Track Orders</a>
<div class="col-sm-4">
<input type="text" name="fullname" value="<?php echo
$rowed['fullname'];?>" class="form-control">
</div>
</div>

<?php
$ret=mysqli_query($con,"select email from user where
id='".$_SESSION['UID']."'");
while($row=mysqli_fetch_array($ret))
{

?>
<div class="form-group">
<label class="col-sm-2 control-label">Email<span
style="color:red">*</span></label>
<div class="col-sm-4">
<input type="Email" name="email" value="<?php echo $row['email'];?>"
class="form-control" readonly>
</div>

Page
104
Online Grocery Shop 2018

</div>
<?php } ?>

<div class="form-group">
<label class="col-sm-2 control-label">Phone No.<span
style="color:red">*</span></label>
<div class="col-sm-4">
<input type="text" name="phone" value="<?php echo $rowed['phone'];?>"
class="form-control" pattern="[1-9]{1}[0-9]{9}" >
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">Address<span
style="color:red">*</span></label>
<div class="col-sm-4">
<input type="text" name="address" value="<?php echo $rowed['address'];?>"
class="form-control" >
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">Password<span
style="color:red">*</span></label>
<div class="col-sm-4">

Page
105
Online Grocery Shop 2018

<input type="password" name="password" value="<?php echo


$rowed['password'];?>" class="form-control">
</div>
</div>
</div>
<div class="hr-dashed"></div>
</div>
</div>
</div>
</div>
<div class="form-group">
<div class="col-sm-8 col-sm-offset-2">
<button class="btn btn-default" type="reset">Cancel</button>
<button class="btn btn-primary" name="submit" type="submit">Save
changes</button>
</div>
</div>

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

Page
106
Online Grocery Shop 2018

</div>
</div>
</div>
</div>
<?php include('includes/footer.php') ?>

<!-- Loading Scripts -->


<script src="js/jquery.min.js"></script>
<script src="js/bootstrap-select.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/jquery.dataTables.min.js"></script>
<script src="js/dataTables.bootstrap.min.js"></script>
<script src="js/Chart.min.js"></script>
<script src="js/fileinput.js"></script>
<script src="js/chartData.js"></script>
<script src="js/main.js"></script>
</body>
</html>
<?php } ?>

Page
107
Online Grocery Shop 2018

Program:mngorder.php

<?php
session_start();
error_reporting(0);
include('admin/includes/config.php');
?>

Page
108
Online Grocery Shop 2018

<!doctype html>
<html lang="en" class="no-js">

<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1,
minimum-scale=1, maximum-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<meta name="theme-color" content="#3e454c">

<title>Online Grocery Store |Admin Panel </title>

<!-- Font awesome -->


<link rel="stylesheet" href="css/font-awesome.min.css">
<!-- Sandstone Bootstrap CSS -->
<link rel="stylesheet" href="css/bootstrap.min.css">
<!-- Bootstrap Datatables -->
<link rel="stylesheet" href="css/dataTables.bootstrap.min.css">
<!-- Bootstrap social button library -->
<link rel="stylesheet" href="css/bootstrap-social.css">
<!-- Bootstrap select -->
<link rel="stylesheet" href="css/bootstrap-select.css">

Page
109
Online Grocery Shop 2018

<!-- Bootstrap file input -->


<link rel="stylesheet" href="css/fileinput.min.css">
<!-- Awesome Bootstrap checkbox -->
<link rel="stylesheet" href="css/awesome-bootstrap-checkbox.css">
<!-- Admin Stye -->
<link rel="stylesheet" href="css/style.css">
<style>
.errorWrap {
padding: 10px;
margin: 0 0 20px 0;
background: #fff;
border-left: 4px solid #dd3d36;
-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: #fff;
border-left: 4px solid #5cb85c;
-webkit-box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);
box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);
}
</style>

Page
110
Online Grocery Shop 2018

</head>

<body>
<?php include('includes/header.php');?>

<div class="ts-main-content">

<div class="content-wrapper">
<div class="container-fluid">

<div class="row">
<div class="col-md-12">

<h2 class="page-title">Your Orders</h2>

<!-- Zero Configuration Table -->


<div class="panel panel-default">

<div class="panel-body">
<?php if($error){?><div class="errorWrap"><strong>ERROR</strong>:<?php
echo htmlentities($error); ?> </div><?php }
else if($msg){?><div class="succWrap"><strong>SUCCESS</strong>:<?php
echo htmlentities($msg); ?> </div><?php }?>

Page
111
Online Grocery Shop 2018

<table id="zctb" class="display table table-striped table-bordered table-hover"


cellspacing="0" width="100%">
<thead>
<tr>

<th>Name</th>
<th>Address</th>
<th>Phone</th>
<th>Zip Code</th>
<th>Total</th>
<th>View</th>
<th>Status</th>
</tr>
</thead>
<tbody>

<?php
$sql= "SELECT * FROM checkout WHERE uid='".$_SESSION['UID']."'";
$rs=$con->query($sql);
while($row=$rs->fetch_assoc())
{

$sqlu= "SELECT * FROM user WHERE id='".$row['uid']."'";


$rsu=$con->query($sqlu);

Page
112
Online Grocery Shop 2018

$rowu=$rsu->fetch_assoc();

$sqlp= "SELECT * FROM product WHERE id='".$row['p_id']."'";


$rsp=$con->query($sqlp);
$rowp=$rsp->fetch_assoc();
?>
<!-- Modal -->
<div id="myModal<?php echo $row['id']; ?>" class="modal fade"
role="dialog">
<div class="modal-dialog">

<!-- Modal content-->


<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">&times;</button>
<h4 class="modal-title">Details</h4>
</div>
<div class="modal-body">
<?php
$sqlr="SELECT * FROM sorder WHERE oid='".$row['id']."'";
$rsr=$con->query($sqlr);
while($rowr=$rsr->fetch_assoc())
{
$sqlpr= "SELECT * FROM product WHERE id='".$rowr['p_id']."'";

Page
113
Online Grocery Shop 2018

$rspr=$con->query($sqlpr);
$rowpr=$rspr->fetch_assoc();
?>
<p><?php echo $rowpr['producttitle']?> <?php echo $rowr['price'];?> X <?php
echo $rowr['qty'];?>= <?php echo $rowr['total'];?></p>

<?php
}
?>
</div>
</div>
</div>
</div>

<tr>
<td> <?php echo $row['name'];?> </td>
<td> <?php echo $row['address'];?> </td>
<td> <?php echo $row['phone'];?> </td>
<td> <?php echo $row['zip'];?> </td>
<td> <?php echo $row['total'];?> </td>
<td><button type="button" class="btn btn-info" data-toggle="modal" data-
target="#myModal<?php echo $row['id']; ?>">View</button></td>
<td><?php echo $row['status'];?></td>
</tr>

Page
114
Online Grocery Shop 2018

<?php
}
?>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- Loading Scripts -->
<script src="js/jquery.min.js"></script>
<script src="js/bootstrap-select.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/jquery.dataTables.min.js"></script>
<script src="js/dataTables.bootstrap.min.js"></script>
<script src="js/Chart.min.js"></script>
<script src="js/fileinput.js"></script>
<script src="js/chartData.js"></script>
<script src="js/main.js"></script>
</body>
</html>

Page
115
Online Grocery Shop 2018

<?php include("includes/footer.php") ?>

Program: register.php

<?php
session_start();
include('admin/includes/config.php');
?>
<?php
if(isset($_POST['submit']))
{
$email=$_POST['email'];
$password=$_POST['password'];
$fullname=$_POST['fullname'];
$phone=$_POST['phone'];
$address=$_POST['address'];
$src="SELECT `email` FROM `user` WHERE `email`='".$email."'";
$res=mysqli_query($con,$src);
if(mysqli_num_rows($res)>0){
echo "<script type='text/javascript'>alert('You Are Already Registered');
document.location = 'newreg.php';</script>";
}else{

Page
116
Online Grocery Shop 2018

$sql="INSERT INTO user SET


email='$email',password='$password',fullname='$fullname',phone='$phone',add
ress='$address'";
$rs=$con->query($sql);
header('location:index.php');
}}
?>

Page
117
Online Grocery Shop 2018

Program: about.php

<!DOCTYPE html>
<html lang="zxx">
<head>
<title>About Us</title>
<meta name="viewport" content="width=device-width, initial-
scale=1">
<meta charset="utf-8" />
<meta name="keywords" content="Beverages Responsive web
template, Bootstrap Web Templates, Flat Web Templates, Android
Compatible web template,
SmartPhone Compatible web template, free WebDesigns for Nokia,
Samsung, LG, Sony Ericsson, Motorola web design" />
<script>
addEventListener("load", function () {
setTimeout(hideURLbar, 0);
}, false);

function hideURLbar() {
window.scrollTo(0, 1);
}
</script>
Page
118
Online Grocery Shop 2018

<!-- Custom Theme files -->


<link href="css/bootstrap.css" type="text/css" rel="stylesheet"
media="all">
<link href="css/style.css" type="text/css" rel="stylesheet"
media="all">
<script src="js/jquery-2.2.3.min.js"></script>
<!-- numscroller -->
<script type="text/javascript" src="js/numscroller-1.0.js"></script>
<script src="js/bootstrap.js"></script>
<!-- font-awesome icons -->
<link href="css/font-awesome.css" rel="stylesheet">
<!-- //Custom Theme files -->
<!-- web-fonts -->
<link href="//fonts.googleapis.com/css?family=Righteous"
rel="stylesheet">
<link
href="//fonts.googleapis.com/css?family=Mukta+Mahee:200,300,400
,500,600,700,800" rel="stylesheet">
<!-- //web-fonts -->
</head>

<!-- Modal -->


<div id="reg" class="modal fade" role="dialog">
<div class="modal-dialog">

Page
119
Online Grocery Shop 2018

<!-- Modal content-->


<div class="modal-content">
<div class="modal-header" style="background-color: #343d46;">
<button type="button" class="close" data-
dismiss="modal">&times;</button>

</div>
<div class="modal-body" style="background-color: #d0d0d0;">

<form action="register.php" method="post">


<div class="modal-content" style="background-color: #d0d0d0;">
<h1>Sign Up</h1>
<p>Please fill in this form to create an account.</p>

<p>Email ID</p>
<input type="text" name="email" class="form-control">
<p>Password</p>
<input type="password" name="password" class="form-control">
<p>FullName</p>
<input type="text" name="fullname" class="form-control">
<p>Phone</p>
<input type="text" name="phone" class="form-control">
<p>Address</p>

Page
120
Online Grocery Shop 2018

<input type="text" name="address" class="form-control">


<label>
<input type="checkbox" checked="checked" name="remember"
style="margin-bottom:15px">By creating an account you agree to our
<a href="#" style="color:dodgerblue">Terms & Privacy</a>.
</label>
<br>
<div class="clearfix">
<button type="submit" name="submit" class="btn-success">Sign
Up</button>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
<!-- Modal -->
<div id="log" class="modal fade" role="dialog">
<div class="modal-dialog">

<!-- Modal content-->


<div class="modal-content">
<div class="modal-header" style="background-color: #343d46;">

Page
121
Online Grocery Shop 2018

<button type="button" class="close" data-


dismiss="modal">&times;</button>

</div>
<div class="modal-body" style="background-color: #d0d0d0;">

<form action="login.php" method="post">


<div class="modal-content" style="background-color: #d0d0d0;">
<h1>Log In</h1>
<p>Please fill in your details</p>

<p>Email ID</p>
<input type="text" name="email" class="form-control"
placeholder="Enter Email">
<p>Password</p>
<input type="password" name="password" class="form-control"
placeholder="Enter Password">
<p></p>
<br>
<div class="clearfix">
<button type="submit" name="login" class="btn-success">Log
In</button>
</div>
</div>

Page
122
Online Grocery Shop 2018

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

<!--/banner-bottom-->
<div class="w3_agilits_banner_bootm">
<!-- header -->
<div class="container">
<div class="w3_agile_logo">
<h1>
<a href="index.php">
<img src="images/logo.png" alt="" />Grocery Shop</a>
</h1>
</div>
<div class="agileits_w3layouts_nav">
<div id="toggle_m_nav">
<div id="m_nav_menu" class="m_nav">
<div class="m_nav_ham w3_agileits_ham" id="m_ham_1"></div>
<div class="m_nav_ham" id="m_ham_2"></div>
<div class="m_nav_ham" id="m_ham_3"></div>
</div>

Page
123
Online Grocery Shop 2018

</div>
<div id="m_nav_container" class="m_nav wthree_bg">
<nav class="menu menu--sebastian">
<ul id="m_nav_list" class="m_nav menu__list">
<li class="m_nav_item menu__item menu__item--current"
id="m_nav_item_1">
<a href="index.php" class="menu__link"> Home </a>
</li>
<li class="m_nav_item menu__item" id="moble_nav_item_2">
<a href="about.php" class="menu__link"> About Us </a>
</li>
<li class="m_nav_item menu__item" id="moble_nav_item_6">
<a href="contact.php" class="menu__link"> Contact </a>
</li>

<li class="m_nav_item menu__item" id="moble_nav_item_6">


<a href="shop.php" class="menu__link"> Shop</a>
</li>

<li class="m_nav_item menu__item" id="moble_nav_item_3">


<a href="listcart.php" class="menu__link"><i class="fa fa-shopping-
cart">Cart </i></a>

Page
124
Online Grocery Shop 2018

</li>

<?php if(isset($_SESSION["email"])) {?>


<h4 style="color: #66cd00" >Welcome <a href="my-
account.php"><?php echo $_SESSION["name"]; ?></a> | <a
style="color: #66cd00" href="logout.php">Logout</a></h3>
<?php } else { ?>

<li class="m_nav_item menu__item" id="moble_nav_item_7">


<a href="#" class="menu__link" data-toggle="modal" data-
target="#log"> Login </a>
</li>
<li class="m_nav_item menu__item" id="moble_nav_item_8">
<a href="#" class="menu__link" class="menu__link" data-
toggle="modal" data-target="#reg"> Register </a>
</li>
<div class="topnav">
<div class="search-container">
<form action="/action_page.php">
<input type="text" placeholder="Search.." name="search">
<button type="submit"><i class="fa fa-search"></i></button>
</form>
</div>
<?php } ?>

Page
125
Online Grocery Shop 2018

</ul>
</nav>
</div>
</div>
</div>
<!--// header -->
<div class="w3_agilits_inner_bottom">
<div class="wthree_agile_login">
<ul>
<li>
<i class="fa fa-phone" aria-hidden="true"></i> (+000) 009 455
4088</li>
<li>
<i class="fa fa-envelope-o list-icon" aria-hidden="true"></i>
<a href="mailto:info@example.com">info@example.com</a>
</li>
</ul>
</div>

</div>
</div>
<!--//banner-bottom-->
<!--// header -->

Page
126
Online Grocery Shop 2018

<div class="w3_agilits_inner_bottom">

</div>
</div>
<div class="inner-div">
<img src="images/g1.jpg" width="100%;">
</div>
<!--/banner-inner-->
<!--about -->
<div class="wthree-about section-w3ls">
<div class="container">
<h3 class="w3ls-title">
<span>a</span>bout us</h3>
<h5>Save more with Us! We give you the lowest prices on all your
grocery needs.</h5>
<div class="col-md-7 w3ls-about-left">
<p>Our e-store is a low-price online supermarket that gets products
across categories like grocery, fruits & vegetables,beverages delivered
to your doorstep.</p>
<p class="about-bottom">Since we are still in R&D we will surely be
expanding our services.</p>
</div>
<div class="col-md-5 w3ls-row">
<div class="col-md-6 col-sm-6 wthree-about-left">

Page
127
Online Grocery Shop 2018

<img src="images/a4.jpg" class="img-responsive" alt="" />


</div>
<div class="col-md-6 col-sm-6 w3ls-row alert wthree-about-right">
<img src="images/a3.jpg" class="img-responsive" alt="" />
</div>
<div class="clearfix"> </div>
</div>
<div class="clearfix"> </div>

</div>
</div>
<!-- //about -->
<!-- stats -->
<div class="wthree-stats">
<div class="stats-bg col-md-6">
</div>

</div>
<div class="col-sm-6 col-xs-6 stats-grid">
<div class='numscroller numscroller-big-bottom' data-slno='1' data-
min='0' data-max='900' data-delay='.5' data-
increment="1">900</div>
<div class="stats-img stat2">
<p>visitors</p>

Page
128
Online Grocery Shop 2018

</div>
</div>

</div>
<div class="clearfix"></div>
</div>
<div class="clearfix"></div>
</div>
<!-- //stats -->

<!--team -->
<div class="agileits-team section-w3ls" id="team">
<div class="container">
<h3 class="w3ls-title">
<span>t</span>eam</h3>
<div class="team-w3ls">
<div class="col-md-3 col-sm-4 col-xs-4 team-grid w3_agileits">
<img class="col-md-10 col-sm-10 col-xs-10 img-w3l t1-wthree img-
responsive" src="images/img.png" alt="">
<div class="col-md-2 col-sm-2 col-xs-2 social-icons">
<ul>
<li>
<a href="#" class="fa fa-facebook icon icon-border facebook"> </a>

Page
129
Online Grocery Shop 2018

</li>
<li>
<a href="#" class="fa fa-twitter icon icon-border twitter"> </a>
</li>
<li>
<a href="#" class="fa fa-google-plus icon icon-border googleplus">
</a>
</li>
</ul>
<div class="clearfix"> </div>
</div>
<div class="clearfix"></div>
<div class="agileits-team-bottom">
<h5>Gourav Karmakar</h5>
<p>Lorem ipsum dolor sit amet.Cras rutrum iaculis enim, non
convallis felis mattis.</p>
</div>
</div>
<div class="col-md-3 col-sm-4 col-xs-4 team-grid w3_agileits t2">
<img class="col-md-10 col-sm-10 col-xs-10 img-w3l t1-wthree img-
responsive" src="images/img.png" alt="">
<div class="col-md-2 col-sm-2 col-xs-2 social-icons">
<ul>
<li>

Page
130
Online Grocery Shop 2018

<a href="#" class="fa fa-facebook icon icon-border facebook"> </a>


</li>
<li>
<a href="#" class="fa fa-twitter icon icon-border twitter"> </a>
</li>
<li>
<a href="#" class="fa fa-google-plus icon icon-border googleplus">
</a>
</li>
</ul>
<div class="clearfix"> </div>
</div>
<div class="clearfix"></div>
<div class="agileits-team-bottom">
<h5>Abhishek Das</h5>
<p>Lorem ipsum dolor sit amet.Cras rutrum iaculis enim, non
convallis felis mattis.</p>
</div>
</div>
<div class="col-md-3 col-sm-4 col-xs-4 w3_agileits team-grid">
<img class="col-md-10 col-sm-10 col-xs-10 img-w3l t1-wthree
img-responsive" src="images/img.png" alt="">
<div class="col-md-2 col-sm-2 col-xs-2 social-icons">
<ul>

Page
131
Online Grocery Shop 2018

<li>
<a href="#" class="fa fa-facebook icon icon-border facebook"> </a>
</li>
<li>
<a href="#" class="fa fa-twitter icon icon-border twitter"> </a>
</li>
<li>
<a href="#" class="fa fa-google-plus icon icon-border googleplus">
</a>
</li>
</ul>
<div class="clearfix"> </div>
</div>
<div class="clearfix"></div>
<div class="agileits-team-bottom">
<h5>Subhajit Chowdhury</h5>
<p>Lorem ipsum dolor sit amet.Cras rutrum iaculis enim, non
convallis felis mattis.</p>
</div>
</div>
<div class="col-md-3 col-sm-4 col-xs-4 w3_agileits team-grid">
<img class="col-md-10 col-sm-10 col-xs-10 img-w3l t1-wthree
img-responsive" src="images/img.png" alt="">
<div class="col-md-2 col-sm-2 col-xs-2 social-icons">

Page
132
Online Grocery Shop 2018

<ul>
<li>
<a href="#" class="fa fa-facebook icon icon-border facebook"> </a>
</li>
<li>
<a href="#" class="fa fa-twitter icon icon-border twitter"> </a>
</li>
<li>
<a href="#" class="fa fa-google-plus icon icon-border googleplus">
</a>
</li>
</ul>
<div class="clearfix"> </div>
</div>
<div class="clearfix"></div>
<div class="agileits-team-bottom">
<h5>Nabanita Chowdhury</h5>
<p>Lorem ipsum dolor sit amet.Cras rutrum iaculis enim, non
convallis felis mattis.</p>
</div>
</div>
<div class="clearfix"></div>
</div>
</div>

Page
133
Online Grocery Shop 2018

</div>
<!-- //team-->
<!-- slide -->
<div class="slide text-center">
<h4><a href="#">Want To Join Us</a></h4>

</div>
<!-- //slide -->

<!-- footer -->


<?php include('includes/footer.php'); ?>
<!-- //footer -->

Page
134
Online Grocery Shop 2018

Program: contact.php

<?php include('admin/includes/config.php');

include('includes/header.php') ?>
<!--/banner-inner-->
<!-- contact -->
<div class="contact-bottom section-w3ls main-pos" id="contact">
<div class="container">
Page
135
Online Grocery Shop 2018

<h3 class="w3ls-title">
<span>c</span>ontact us</h3>
<div class="contact-right-w3l">
<form action="#" method="post">
<div class="contact-input">
<input type="text" class="name" name="name" placeholder="First
Name" required="">
</div>
<div class="contact-input">
<input type="text" class="name" name="name" placeholder="Last
Name" required="">
</div>
<div class="contact-input">
<input type="email" class="name" name="name"
placeholder="Email" required="">
</div>
<div class="contact-input">
<input type="text" class="name" name="name"
placeholder="Subject" required="">
</div>
<div class="contact-input">
<textarea placeholder="Your Message" required=""></textarea>
</div>
<input type="submit" value="SEND MESSAGE">

Page
136
Online Grocery Shop 2018

</form>
</div>
<div class="clearfix"></div>
<div class="contact-main">
<div class="col-md-6 col-sm-6 col-xs-6 contact-left-w3ls">
<h3 class="h3-w3l">contact info</h3>
<div class="mail contact-grid-agileinfo c1">
<div class="contact-icon-wthree">
<span class="fa fa-envelope" aria-hidden="true"></span>
</div>
<div class="contact-text-agileinfo">
<h4>Mail us</h4>
<p>
<a href="mailto:info@example.com">info@ymail.com</a>
</p>
</div>
<div class="clearfix"></div>
</div>
<div class="call contact-grid-agileinfo c2">
<div class="contact-icon-wthree">
<span class="fa fa-phone" aria-hidden="true"></span>
</div>
<div class="contact-text-agileinfo">
<h4>Call us</h4>

Page
137
Online Grocery Shop 2018

<p>+18044261149</p>
</div>
<div class="clearfix"></div>
</div>
<div class="clearfix"></div>
</div>
</div>
<div class="col-md-6 col-sm-6 col-xs-6 map">
<h3 class="h3-w3l">on the map</h3>
<iframe
src="https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d
3687.545667449648!2d88.40071031457961!3d22.44611998524802!
2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x3a02721f
580b31dd%3A0x74ee2656583f7da8!2sSwami+Vivekananda+Institut
e+of+Modern+Science!5e0!3m2!1sen!2sin!4v1523113887663"
width="600" height="450" frameborder="0" style="border:0"
allowfullscreen></iframe>"
</div>
<div class="clearfix"></div>
</div>
</div>
</div>
<!-- //contact -->
<!-- footer -->

Page
138
Online Grocery Shop 2018

<?php include('includes/footer.php'); ?>


<!-- //footer -->

Program: index.php

<?php
session_start();
include('includes/config.php');
if(isset($_POST['login']))
{
$email=$_POST['username'];
$password=($_POST['password']);
Page
139
Online Grocery Shop 2018

$sql ="SELECT UserName,Password FROM admin WHERE


UserName=:email and Password=:password";
$query= $dbh -> prepare($sql);
$query-> bindParam(':email', $email, PDO::PARAM_STR);
$query-> bindParam(':password', $password,
PDO::PARAM_STR);
$query-> execute();
$results=$query->fetchAll(PDO::FETCH_OBJ);
if($query->rowCount() > 0)
{
$_SESSION['alogin']=$_POST['username'];
$_SESSION['password']=$_POST['password'];
echo "<script type='text/javascript'> document.location =
'dashboard.php'; </script>";
} else{
echo "<script>alert('Invalid Details');</script>";
}
}
?>
<!doctype html>
<html lang="en" class="no-js">

Page
140
Online Grocery Shop 2018

<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,
initial-scale=1, minimum-scale=1, maximum-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<title>Online Groccery Store Admin Login</title>
<link rel="stylesheet" href="css/font-awesome.min.css">
<link rel="stylesheet" href="css/bootstrap.min.css">
<link rel="stylesheet"
href="css/dataTables.bootstrap.min.css">
<link rel="stylesheet" href="css/bootstrap-social.css">
<link rel="stylesheet" href="css/bootstrap-select.css">
<link rel="stylesheet" href="css/fileinput.min.css">
<link rel="stylesheet" href="css/awesome-bootstrap-
checkbox.css">
<link rel="stylesheet" href="css/style.css">
</head>
<body>

Page
141
Online Grocery Shop 2018

<div class="login-page bk-img" style="background-image:


url(img/new.jpg);">
<div class="form-content">
<div class="container">
<div class="row">
<div class="col-md-6 col-md-offset-3">
<h1 class="text-center text-bold text-light mt-4x">Sign
in</h1>
<div class="well row pt-2x pb-3x bk-light"
style="background-color: #cbfdcb;">
<div class="col-md-8 col-md-offset-2" style="background-
color: #cbfdcb;">
<form method="post">

<label for="" class="text-uppercase text-sm">Your Username


</label>
<input type="text" placeholder="Username"
name="username" class="form-control mb">
<label for="" class="text-uppercase text-
sm">Password</label>

Page
142
Online Grocery Shop 2018

<input type="password" placeholder="Password"


name="password" class="form-control mb">
<button class="btn btn-primary btn-block" name="login"
type="submit">LOGIN</button>
</form>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- Loading Scripts -->
<script src="js/jquery.min.js"></script>
<script src="js/bootstrap-select.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/jquery.dataTables.min.js"></script>
<script src="js/dataTables.bootstrap.min.js"></script>
<script src="js/Chart.min.js"></script>
<script src="js/fileinput.js"></script>
<script src="js/chartData.js"></script>

Page
143
Online Grocery Shop 2018

<script src="js/main.js"></script>
</body>
</html>

Program: dashboard.php
<?php
session_start();
error_reporting(0);
include('includes/config.php');
if(strlen($_SESSION['alogin'])==0)
{
header('location:index.php');
}
Page
144
Online Grocery Shop 2018

else{
?>
<!doctype html>
<html lang="en" class="no-js">

<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-
scale=1, minimum-scale=1, maximum-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<meta name="theme-color" content="#3e454c">

<title>Online Grocery Store | Admin Dashboard</title>

<!-- Font awesome -->


<link rel="stylesheet" href="css/font-awesome.min.css">
<!-- Sandstone Bootstrap CSS -->
<link rel="stylesheet" href="css/bootstrap.min.css">
<!-- Bootstrap Datatables -->
<link rel="stylesheet" href="css/dataTables.bootstrap.min.css">
<!-- Bootstrap social button library -->
<link rel="stylesheet" href="css/bootstrap-social.css">

Page
145
Online Grocery Shop 2018

<!-- Bootstrap select -->


<link rel="stylesheet" href="css/bootstrap-select.css">
<!-- Bootstrap file input -->
<link rel="stylesheet" href="css/fileinput.min.css">
<!-- Awesome Bootstrap checkbox -->
<link rel="stylesheet" href="css/awesome-bootstrap-checkbox.css">
<!-- Admin Stye -->
<link rel="stylesheet" href="css/style.css">
</head>
<style>
h2 {
display: block;
font-size: 2em;
margin-top: 0.67em;
margin-bottom: 0.67em;
margin-left: 0;
margin-right: 0;
font-weight: bold;
}
</style>
<body>
<?php include('includes/header.php');?>

<div class="ts-main-content">

Page
146
Online Grocery Shop 2018

<?php include('includes/leftbar.php');?>
<div class="content-wrapper">
<div class="container-fluid">

<div class="row">
<div class="col-md-12">

<h2 class="page-title">Dashboard</h2>

<div class="row">
<div class="col-md-12">
<div class="row">
<div class="col-md-3">
<div class="panel panel-default">
<div class="panel-body bk-primary text-light">
<div class="stat-panel text-center">
<?php
$sql ="SELECT id from user ";
$query = $dbh -> prepare($sql);
$query->execute();
$results=$query->fetchAll(PDO::FETCH_OBJ);
$regusers=$query->rowCount();
?>

Page
147
Online Grocery Shop 2018

<div class="stat-panel-number h1 "><?php echo


htmlentities($regusers);?></div>
<div class="stat-panel-title text-uppercase">Reg Users</div>
</div>
</div>
<a href="reg-users.php" class="block-anchor panel-footer">Full
Detail <i class="fa fa-arrow-right"></i></a>
</div>
</div>
<div class="col-md-3">
<div class="panel panel-default">
<div class="panel-body bk-success text-light">
<div class="stat-panel text-center">
<?php
$sql1 ="SELECT id from product ";
$query1 = $dbh -> prepare($sql1);;
$query1->execute();
$results1=$query1->fetchAll(PDO::FETCH_OBJ);
$totalvehicle=$query1->rowCount();
?>
<div class="stat-panel-number h1 "><?php echo
htmlentities($totalvehicle);?></div>
<div class="stat-panel-title text-uppercase">List Products</div>
</div>

Page
148
Online Grocery Shop 2018

</div>
<a href="list-product.php" class="block-anchor panel-footer text-
center">Full Detail &nbsp; <i class="fa fa-arrow-right"></i></a>
</div>
</div>
<div class="col-md-3">
<div class="panel panel-default">
<div class="panel-body bk-info text-light">
<div class="stat-panel text-center">
<?php
$sql2 ="SELECT id from category";
$query2= $dbh -> prepare($sql2);
$query2->execute();
$results2=$query2->fetchAll(PDO::FETCH_OBJ);
$bookings=$query2->rowCount();
?>

<div class="stat-panel-number h1 "><?php echo


htmlentities($bookings);?></div>
<div class="stat-panel-title text-uppercase">No of Category</div>
</div>
</div>
<a href="list-cat.php" class="block-anchor panel-footer text-
center">Full Detail &nbsp; <i class="fa fa-arrow-right"></i></a>

Page
149
Online Grocery Shop 2018

</div>
</div>
<div class="col-md-3">
<div class="panel panel-default">
<div class="panel-body bk-warning text-light">
<div class="stat-panel text-center">
<?php
$sql3 ="SELECT id from checkout ";
$query3= $dbh -> prepare($sql3);
$query3->execute();
$results3=$query3->fetchAll(PDO::FETCH_OBJ);
$brands=$query3->rowCount();
?>
<div class="stat-panel-number h1 "><?php echo
htmlentities($brands);?></div>
<div class="stat-panel-title text-uppercase">No Of Orders</div>
</div>
</div>
<a href="manage-order.php" class="block-anchor panel-footer text-
center">Full Detail &nbsp; <i class="fa fa-arrow-right"></i></a>
</div>
</div>
</div>
</div>

Page
150
Online Grocery Shop 2018

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

<!-- Loading Scripts -->


<script src="js/jquery.min.js"></script>
<script src="js/bootstrap-select.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/jquery.dataTables.min.js"></script>
<script src="js/dataTables.bootstrap.min.js"></script>
<script src="js/Chart.min.js"></script>
<script src="js/fileinput.js"></script>
<script src="js/chartData.js"></script>
<script src="js/main.js"></script>

<script>

window.onload = function(){

// Line chart from swirlData for dashReport


var ctx = document.getElementById("dashReport").getContext("2d");

Page
151
Online Grocery Shop 2018

window.myLine = new Chart(ctx).Line(swirlData, {


responsive: true,
scaleShowVerticalLines: false,
scaleBeginAtZero : true,
multiTooltipTemplate: "<%if (label){%><%=label%>: <%}%><%=
value %>",
});

// Pie Chart from doughutData


var doctx = document.getElementById("chart-
area3").getContext("2d");
window.myDoughnut = new Chart(doctx).Pie(doughnutData,
{responsive : true});

// Dougnut Chart from doughnutData


var doctx = document.getElementById("chart-
area4").getContext("2d");
window.myDoughnut = new Chart(doctx).Doughnut(doughnutData,
{responsive : true});
}
</script>
</body>
</html>
<?php } ?>

Page
152
Online Grocery Shop 2018

Program: post-aorder.php
<?php
session_start();
error_reporting(0);
include('includes/config.php');
if(strlen($_SESSION['alogin'])==0)
{
header('location:index.php');
}
else{

if(isset($_POST['submit']))
{

Page
153
Online Grocery Shop 2018

$producttitle=$_POST['producttitle'];
$productoverview=$_POST['productoverview'];
$price=$_POST['price'];
$stock=$_POST['stock'];
$category=$_POST['category'];
$image1=$_FILES["image1"]["name"];

move_uploaded_file($_FILES["image1"]["tmp_name"],"img/producti
mages/".$_FILES["image1"]["name"]);

$sql="INSERT INTO product SET


producttitle='$producttitle',productoverview='$productoverview',Price
='$price',stock='$stock',category='$category',image1='$image1'";
$rs=$con->query($sql);
$smsg="Product added successfully";
}

?>
<!doctype html>
<html lang="en" class="no-js">

<head>

Page
154
Online Grocery Shop 2018

<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-
scale=1, minimum-scale=1, maximum-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<meta name="theme-color" content="#3e454c">

<title>Online Grocery Shop | Admin Post Order</title>

<!-- Font awesome -->


<link rel="stylesheet" href="css/font-awesome.min.css">
<!-- Sandstone Bootstrap CSS -->
<link rel="stylesheet" href="css/bootstrap.min.css">
<!-- Bootstrap Datatables -->
<link rel="stylesheet" href="css/dataTables.bootstrap.min.css">
<!-- Bootstrap social button library -->
<link rel="stylesheet" href="css/bootstrap-social.css">
<!-- Bootstrap select -->
<link rel="stylesheet" href="css/bootstrap-select.css">
<!-- Bootstrap file input -->
<link rel="stylesheet" href="css/fileinput.min.css">
<!-- Awesome Bootstrap checkbox -->
<link rel="stylesheet" href="css/awesome-bootstrap-checkbox.css">

Page
155
Online Grocery Shop 2018

<!-- Admin Stye -->


<link rel="stylesheet" href="css/style.css">
<style>
.errorWrap {
padding: 10px;
margin: 0 0 20px 0;
background: #fff;
border-left: 4px solid #dd3d36;
-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: #fff;
border-left: 4px solid #5cb85c;
-webkit-box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);
box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);
}
h2 {
display: block;
font-size: 2em;
margin-top: 0.67em;
margin-bottom: 0.67em;

Page
156
Online Grocery Shop 2018

margin-left: 0;
margin-right: 0;
font-weight: bold;
}
</style>

</head>

<body>
<?php include('includes/header.php');?>
<div class="ts-main-content">
<?php include('includes/leftbar.php');?>
<div class="content-wrapper">
<div class="container-fluid">

<div class="row">
<div class="col-md-12">

<h2 class="page-title">Post A Product</h2>

<div class="row">
<div class="col-md-12">
<div class="panel panel-default">
<div class="panel-heading">Basic Info</div>

Page
157
Online Grocery Shop 2018

<?php
if(isset($smsg) && $smsg!="")
{
?>
<div class="alert alert-success alert-dismissible">
<a href="#" class="close" data-dismiss="alert" aria-
label="close">&times;</a>
<strong>Success!</strong> <?php echo $smsg; ?>
</div>
<?php }?>

<div class="panel-body">
<form method="post" class="form-horizontal"
enctype="multipart/form-data">
<div class="form-group">
<label class="col-sm-2 control-label">Product Title<span
style="color:red">*</span></label>
<div class="col-sm-4">
<input type="text" name="producttitle" class="form-control"
required>
</div>
</div>

<div class="form-group">

Page
158
Online Grocery Shop 2018

<label class="col-sm-2 control-label">Product Overview<span


style="color:red">*</span></label>
<div class="col-sm-10">
<input type="text" name="productoverview" class="form-control"
required>
</div>
</div>

<div class="form-group">
<label class="col-sm-2 control-label">Price<span
style="color:red">*</span></label>
<div class="col-sm-3">
<input type="text" name="price" class="form-control" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">Stock<span
style="color:red">*</span></label>
<div class="col-sm-3">
<input type="number" name="stock" class="form-control">
</div>
</div>
<div class="form-group">

Page
159
Online Grocery Shop 2018

<label class="col-sm-2 control-label">Category<span


style="color:red">*</span></label>
<div class="col-sm-3">
<select name="category" class="form-control">
<?php
$sql="SELECT * FROM category";
$rs=$con->query($sql);
while($row=$rs->fetch_assoc())
{
?>

<option value="<?php echo $row['id'];?>"> <?php echo


$row['category']; ?></option>
<?php
}
?>
</select>
</div>
</div>

<div class="form-group">

Page
160
Online Grocery Shop 2018

<label class="col-sm-2 control-label">Upload Image<span


style="color:red">*</span></label>
<div class="col-sm-3">
<input type="file" name="image1">
</div>

</div>
<div class="hr-dashed"></div>
</div>
</div>
</div>
</div>
<div class="form-group">
<div class="col-sm-8 col-sm-offset-2">
<button class="btn btn-default" type="reset">Cancel</button>
<button class="btn btn-primary" name="submit" type="submit">Save
changes</button>
</div>
</div>

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

Page
161
Online Grocery Shop 2018

</div>

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

<!-- Loading Scripts -->


<script src="js/jquery.min.js"></script>
<script src="js/bootstrap-select.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/jquery.dataTables.min.js"></script>
<script src="js/dataTables.bootstrap.min.js"></script>
<script src="js/Chart.min.js"></script>
<script src="js/fileinput.js"></script>
<script src="js/chartData.js"></script>
<script src="js/main.js"></script>
</body>
</html>
<?php } ?>

Page
162
Online Grocery Shop 2018

Program:list-product.php
<?php
session_start();
error_reporting(0);
include('includes/config.php');
if(strlen($_SESSION['alogin'])==0)
{
header('location:index.php');
}
else{

?>

Page
163
Online Grocery Shop 2018

<!doctype html>
<html lang="en" class="no-js">

<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-
scale=1, minimum-scale=1, maximum-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<meta name="theme-color" content="#3e454c">

<title>Online Grocery Shop | Admin Post Order</title>

<!-- Font awesome -->


<link rel="stylesheet" href="css/font-awesome.min.css">
<!-- Sandstone Bootstrap CSS -->
<link rel="stylesheet" href="css/bootstrap.min.css">
<!-- Bootstrap Datatables -->
<link rel="stylesheet" href="css/dataTables.bootstrap.min.css">
<!-- Bootstrap social button library -->
<link rel="stylesheet" href="css/bootstrap-social.css">
<!-- Bootstrap select -->
<link rel="stylesheet" href="css/bootstrap-select.css">

Page
164
Online Grocery Shop 2018

<!-- Bootstrap file input -->


<link rel="stylesheet" href="css/fileinput.min.css">
<!-- Awesome Bootstrap checkbox -->
<link rel="stylesheet" href="css/awesome-bootstrap-checkbox.css">
<!-- Admin Stye -->
<link rel="stylesheet" href="css/style.css">
<style>
.errorWrap {
padding: 10px;
margin: 0 0 20px 0;
background: #fff;
border-left: 4px solid #dd3d36;
-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: #fff;
border-left: 4px solid #5cb85c;
-webkit-box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);
box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);
}
h2 {

Page
165
Online Grocery Shop 2018

display: block;
font-size: 2em;
margin-top: 0.67em;
margin-bottom: 0.67em;
margin-left: 0;
margin-right: 0;
font-weight: bold;
}
</style>

</head>

<body>
<?php include('includes/header.php');?>
<div class="ts-main-content">
<?php include('includes/leftbar.php');?>
<div class="content-wrapper">
<div class="container-fluid">

<div class="row">
<div class="col-md-12">

Page
166
Online Grocery Shop 2018

<h2 class="page-title" >List Of Product <a href="post-aorder.php"


class="btn btn-success" style="float:right;"> Add a Product
</a></h2>

<div class="row">
<div class="col-md-10">

<table style="width:100%">
<tr>
<th>Product Title</th>
<th>Price</th>
<th>Image</th>
<th>Category</th>
<th>Status</th>
<th align="center">Action</th>
</tr>
<tr>
<?php
$sql= "SELECT * FROM product";
$rs=$con->query($sql);
while($row=$rs->fetch_assoc())
{

Page
167
Online Grocery Shop 2018

?>
<tr>
<td> <?php echo $row['producttitle'];?> </td>
<td> <?php echo $row['price'];?> </td>
<td> <img src="img/productimages/<?php echo $row['image1'];?>"
style="width:100px;"> </td>
<td> <?php echo $row['category'];?> </td>

<td>
<?php
if ($row['status']==1) {

?>
<form action="inactive.php" method="post"><input type="hidden"
name="id" value="<?php echo $row['id']; ?>">

<input type="hidden" name="type" value="inactive">

<input type="submit" value="active" class="btn btn-success">


</form>
<?php
}
else
{

Page
168
Online Grocery Shop 2018

?>

<form action="inactive.php" method="post"><input type="hidden"


name="id" value="<?php echo $row['id']; ?>">

<input type="hidden" name="type" value="active">


<input type="submit" value="Inactive" class="btn btn-danger">
</form>

<?php
}
?>
</td>
</td><td><form action="upd-pro.php" method="post"><input
type="hidden" name="id" value="<?php echo $row['id']; ?>">
<input type="submit" value="Update" class="btn btn-primary btn-
md">
</form></td>

</tr>
<?php

Page
169
Online Grocery Shop 2018

}
?>
</table>
</div>
<div class="hr-dashed"></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>

<!-- Loading Scripts -->


<script src="js/jquery.min.js"></script>
<script src="js/bootstrap-select.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/jquery.dataTables.min.js"></script>

Page
170
Online Grocery Shop 2018

<script src="js/dataTables.bootstrap.min.js"></script>
<script src="js/Chart.min.js"></script>
<script src="js/fileinput.js"></script>
<script src="js/chartData.js"></script>
<script src="js/main.js"></script>
</body>
</html>
<?php } ?>

Program:add-cat.php
<?php
session_start();
error_reporting(0);
include('includes/config.php');

Page
171
Online Grocery Shop 2018

if(strlen($_SESSION['alogin'])==0)
{
header('location:index.php');
}
else{

if(isset($_POST['submit']))
{
$category=$_POST['category'];
$sql="INSERT INTO category SET category='$category'";
$con->query($sql);

$smsg="Category added successfully";


}

?>
<!doctype html>
<html lang="en" class="no-js">

<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">

Page
172
Online Grocery Shop 2018

<meta name="viewport" content="width=device-width, initial-


scale=1, minimum-scale=1, maximum-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<meta name="theme-color" content="#3e454c">

<title>Online Grocery Shop | Admin Post Order</title>

<!-- Font awesome -->


<link rel="stylesheet" href="css/font-awesome.min.css">
<!-- Sandstone Bootstrap CSS -->
<link rel="stylesheet" href="css/bootstrap.min.css">
<!-- Bootstrap Datatables -->
<link rel="stylesheet" href="css/dataTables.bootstrap.min.css">
<!-- Bootstrap social button library -->
<link rel="stylesheet" href="css/bootstrap-social.css">
<!-- Bootstrap select -->
<link rel="stylesheet" href="css/bootstrap-select.css">
<!-- Bootstrap file input -->
<link rel="stylesheet" href="css/fileinput.min.css">
<!-- Awesome Bootstrap checkbox -->
<link rel="stylesheet" href="css/awesome-bootstrap-checkbox.css">
<!-- Admin Stye -->
<link rel="stylesheet" href="css/style.css">

Page
173
Online Grocery Shop 2018

<style>
.errorWrap {
padding: 10px;
margin: 0 0 20px 0;
background: #fff;
border-left: 4px solid #dd3d36;
-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: #fff;
border-left: 4px solid #5cb85c;
-webkit-box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);
box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);
}
h2 {
display: block;
font-size: 2em;
margin-top: 0.67em;
margin-bottom: 0.67em;
margin-left: 0;
margin-right: 0;

Page
174
Online Grocery Shop 2018

font-weight: bold;
}
</style>

</head>

<body>
<?php include('includes/header.php');?>
<div class="ts-main-content">
<?php include('includes/leftbar.php');?>
<div class="content-wrapper">
<div class="container-fluid">

<div class="row">
<div class="col-md-12">

<h2 class="page-title">Post A Category</h2>

<div class="row">
<div class="col-md-12">
<div class="panel panel-default">
<div class="panel-heading">Basic Info</div>
<?php
if(isset($smsg) && $smsg!="")

Page
175
Online Grocery Shop 2018

{
?>
<div class="alert alert-success alert-dismissible">
<a href="#" class="close" data-dismiss="alert" aria-
label="close">&times;</a>
<strong>Success!</strong> <?php echo $smsg; ?>
</div>
<?php } ?>
<div class="panel-body">
<form method="post" class="form-horizontal"
enctype="multipart/form-data">
<div class="form-group">
<label class="col-sm-2 control-label">Product Category<span
style="color:red">*</span></label>
<div class="col-sm-4">
<input type="text" name="category" class="form-control" required>
</div>
</div>
</div>
<div class="hr-dashed"></div>
</div>
</div>
</div>
</div>

Page
176
Online Grocery Shop 2018

<div class="form-group">
<div class="col-sm-8 col-sm-offset-2">
<button class="btn btn-default" type="reset">Cancel</button>
<button class="btn btn-primary" name="submit" type="submit">Save
changes</button>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- Loading Scripts -->
<script src="js/jquery.min.js"></script>
<script src="js/bootstrap-select.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/jquery.dataTables.min.js"></script>
<script src="js/dataTables.bootstrap.min.js"></script>
<script src="js/Chart.min.js"></script>

Page
177
Online Grocery Shop 2018

<script src="js/fileinput.js"></script>
<script src="js/chartData.js"></script>
<script src="js/main.js"></script>
</body>
</html>
<?php } ?>

Program: list-cat.php

<?php
session_start();
error_reporting(0);
include('includes/config.php');
if(strlen($_SESSION['alogin'])==0)

Page
178
Online Grocery Shop 2018

{
header('location:index.php');
}
else{

?>
<!doctype html>
<html lang="en" class="no-js">

<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-
scale=1, minimum-scale=1, maximum-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<meta name="theme-color" content="#3e454c">

<title>Online Grocery Shop | Admin Post Order</title>

<!-- Font awesome -->


<link rel="stylesheet" href="css/font-awesome.min.css">

Page
179
Online Grocery Shop 2018

<!-- Sandstone Bootstrap CSS -->


<link rel="stylesheet" href="css/bootstrap.min.css">
<!-- Bootstrap Datatables -->
<link rel="stylesheet" href="css/dataTables.bootstrap.min.css">
<!-- Bootstrap social button library -->
<link rel="stylesheet" href="css/bootstrap-social.css">
<!-- Bootstrap select -->
<link rel="stylesheet" href="css/bootstrap-select.css">
<!-- Bootstrap file input -->
<link rel="stylesheet" href="css/fileinput.min.css">
<!-- Awesome Bootstrap checkbox -->
<link rel="stylesheet" href="css/awesome-bootstrap-checkbox.css">
<!-- Admin Stye -->
<link rel="stylesheet" href="css/style.css">
<style>
.errorWrap {
padding: 10px;
margin: 0 0 20px 0;
background: #fff;
border-left: 4px solid #dd3d36;
-webkit-box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);
box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);
}
.succWrap{

Page
180
Online Grocery Shop 2018

padding: 10px;
margin: 0 0 20px 0;
background: #fff;
border-left: 4px solid #5cb85c;
-webkit-box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);
box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);
}
h2 {
display: block;
font-size: 2em;
margin-top: 0.67em;
margin-bottom: 0.67em;
margin-left: 0;
margin-right: 0;
font-weight: bold;
}
</style>

</head>

<body>
<?php include('includes/header.php');?>
<div class="ts-main-content">
<?php include('includes/leftbar.php');?>

Page
181
Online Grocery Shop 2018

<div class="content-wrapper">
<div class="container-fluid">

<div class="row">
<div class="col-md-12">

<h2 class="page-title">Post A Category <a href="add-cat.php"


class="btn btn-success" style="float:right;"> Add New Category
</a></h2>

<div class="row">
<div class="col-md-12">

<table style="width:100%">
<tr>
<th>Category Name</th>
<th>Action</th>
</tr>
<?php
$sql= "SELECT * FROM category";
$rs=$con->query($sql);
while($row=$rs->fetch_assoc())
{

Page
182
Online Grocery Shop 2018

?>
<tr>
<td> <?php echo $row['category']; ?> </td>
<td><form action="del-cat.php" method="post"><input
type="hidden" name="id" value="<?php echo $row['id']; ?>">

<input type="submit" value="Delete" onclick="return confirm('Are


You Sure');" class="btn btn-danger">
</form>
</td>
</tr>
<?php
}
?>
</table>

</div>
</div>
</div>
<div class="hr-dashed"></div>
</div>
</div>

Page
183
Online Grocery Shop 2018

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

<!-- Loading Scripts -->


<script src="js/jquery.min.js"></script>
<script src="js/bootstrap-select.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/jquery.dataTables.min.js"></script>
<script src="js/dataTables.bootstrap.min.js"></script>
<script src="js/Chart.min.js"></script>
<script src="js/fileinput.js"></script>
<script src="js/chartData.js"></script>
<script src="js/main.js"></script>
</body>
</html>

Page
184
Online Grocery Shop 2018

<?php } ?>

Program:manage-order.php
<?php
session_start();
error_reporting(0);
include('includes/config.php');
if(strlen($_SESSION['alogin'])==0)
{
header('location:index.php');
}
else{
?>

<!doctype html>

Page
185
Online Grocery Shop 2018

<html lang="en" class="no-js">

<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-
scale=1, minimum-scale=1, maximum-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<meta name="theme-color" content="#3e454c">

<title>Online Grocery Store |Admin Panel </title>

<!-- Font awesome -->


<link rel="stylesheet" href="css/font-awesome.min.css">
<!-- Sandstone Bootstrap CSS -->
<link rel="stylesheet" href="css/bootstrap.min.css">
<!-- Bootstrap Datatables -->
<link rel="stylesheet" href="css/dataTables.bootstrap.min.css">
<!-- Bootstrap social button library -->
<link rel="stylesheet" href="css/bootstrap-social.css">
<!-- Bootstrap select -->
<link rel="stylesheet" href="css/bootstrap-select.css">
<!-- Bootstrap file input -->

Page
186
Online Grocery Shop 2018

<link rel="stylesheet" href="css/fileinput.min.css">


<!-- Awesome Bootstrap checkbox -->
<link rel="stylesheet" href="css/awesome-bootstrap-checkbox.css">
<!-- Admin Stye -->
<link rel="stylesheet" href="css/style.css">
<style>
.errorWrap {
padding: 10px;
margin: 0 0 20px 0;
background: #fff;
border-left: 4px solid #dd3d36;
-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: #fff;
border-left: 4px solid #5cb85c;
-webkit-box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);
box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);
}
</style>

Page
187
Online Grocery Shop 2018

</head>

<body>
<?php include('includes/header.php');?>

<div class="ts-main-content">
<?php include('includes/leftbar.php');?>
<div class="content-wrapper">
<div class="container-fluid">

<div class="row">
<div class="col-md-12">

<h2 class="page-title">Manage Order</h2>

<!-- Zero Configuration Table -->


<div class="panel panel-default">
<div class="panel-heading">Orders Info</div>
<div class="panel-body">
<?php if($error){?><div
class="errorWrap"><strong>ERROR</strong>:<?php echo
htmlentities($error); ?> </div><?php }

Page
188
Online Grocery Shop 2018

else if($msg){?><div
class="succWrap"><strong>SUCCESS</strong>:<?php echo
htmlentities($msg); ?> </div><?php }?>
<table id="zctb" class="display table table-striped table-bordered
table-hover" cellspacing="0" width="100%">
<thead>
<tr>

<th>Name</th>
<th>Address</th>
<th>Phone</th>
<th>Zip Code</th>
<th>Total</th>
<th>View</th>
<th>Action</th>
</tr>
</thead>
<tbody>
<?php
if(isset($_POST['status']))
{
$upd="UPDATE checkout SET status='".$_POST['status']."' WHERE
id='".$_POST['id']."'";
$con->query($upd);

Page
189
Online Grocery Shop 2018

$sql= "SELECT * FROM checkout";


$rs=$con->query($sql);
while($row=$rs->fetch_assoc())
{

$sqlu= "SELECT * FROM user WHERE id='".$row['uid']."'";


$rsu=$con->query($sqlu);
$rowu=$rsu->fetch_assoc();

$sqlp= "SELECT * FROM product WHERE id='".$row['p_id']."'";


$rsp=$con->query($sqlp);
$rowp=$rsp->fetch_assoc();

?>

<!-- Modal -->


<div id="myModal<?php echo $row['id']; ?>" class="modal fade"
role="dialog">
<div class="modal-dialog">

Page
190
Online Grocery Shop 2018

<!-- Modal content-->


<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-
dismiss="modal">&times;</button>
<h4 class="modal-title">Details</h4>
</div>
<div class="modal-body">
<?php

$sqlr="SELECT * FROM sorder WHERE oid='".$row['id']."'";


$rsr=$con->query($sqlr);
while($rowr=$rsr->fetch_assoc())
{

$sqlpr= "SELECT * FROM product WHERE id='".$rowr['p_id']."'";


$rspr=$con->query($sqlpr);
$rowpr=$rspr->fetch_assoc();

?>
<p><?php echo $rowpr['producttitle']?> <?php echo $rowr['price'];?>
X <?php echo $rowr['qty'];?>= <?php echo $rowr['total'];?></p>

Page
191
Online Grocery Shop 2018

<?php
}

?>

</div>

</div>

</div>
</div>

<tr>

<td> <?php echo $row['name'];?> </td>


<td> <?php echo $row['address'];?> </td>
<td> <?php echo $row['phone'];?> </td>
<td> <?php echo $row['zip'];?> </td>
<td> <?php echo $row['total'];?> </td>

Page
192
Online Grocery Shop 2018

<td><button type="button" class="btn btn-info" data-toggle="modal"


data-target="#myModal<?php echo $row['id'];
?>">View</button></td>
<td><form id="frm<?php echo $row['id'];?>" action=""
method="post">
<input type="hidden" name="id" value="<?php echo $row['id'];?>">
<select name="status"
onchange="document.getElementById('frm<?php echo
$row['id'];?>').submit();" >
<option value="processing" <?php if($row['status']=='processing'){?>
selected <?php } ?>>Processing</option>
<option value="shipped" <?php if($row['status']=='shipped'){?>
selected <?php } ?> >Shipped</option>
<option value="complete" <?php if($row['status']=='complete'){?>
selected <?php } ?>>Complete</option>
</select>
</form>
</td>
</tr>
<?php
}
?>
</tbody>
</table>

Page
193
Online Grocery Shop 2018

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

<!-- Loading Scripts -->


<script src="js/jquery.min.js"></script>
<script src="js/bootstrap-select.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/jquery.dataTables.min.js"></script>
<script src="js/dataTables.bootstrap.min.js"></script>
<script src="js/Chart.min.js"></script>
<script src="js/fileinput.js"></script>
<script src="js/chartData.js"></script>
<script src="js/main.js"></script>
</body>
</html>
<?php } ?>

Page
194
Online Grocery Shop 2018

Program:reg-users.php

<?php
session_start();
error_reporting(0);
include('includes/config.php');
if(strlen($_SESSION['alogin'])==0)
{
header('location:index.php');
}
else{

?>

Page
195
Online Grocery Shop 2018

<!doctype html>
<html lang="en" class="no-js">

<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-
scale=1, minimum-scale=1, maximum-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<meta name="theme-color" content="#3e454c">

<title>Online Grocery Shop | Admin Post Order</title>

<!-- Font awesome -->


<link rel="stylesheet" href="css/font-awesome.min.css">
<!-- Sandstone Bootstrap CSS -->
<link rel="stylesheet" href="css/bootstrap.min.css">
<!-- Bootstrap Datatables -->
<link rel="stylesheet" href="css/dataTables.bootstrap.min.css">
<!-- Bootstrap social button library -->
<link rel="stylesheet" href="css/bootstrap-social.css">
<!-- Bootstrap select -->
<link rel="stylesheet" href="css/bootstrap-select.css">

Page
196
Online Grocery Shop 2018

<!-- Bootstrap file input -->


<link rel="stylesheet" href="css/fileinput.min.css">
<!-- Awesome Bootstrap checkbox -->
<link rel="stylesheet" href="css/awesome-bootstrap-checkbox.css">
<!-- Admin Stye -->
<link rel="stylesheet" href="css/style.css">
<style>
.errorWrap {
padding: 10px;
margin: 0 0 20px 0;
background: #fff;
border-left: 4px solid #dd3d36;
-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: #fff;
border-left: 4px solid #5cb85c;
-webkit-box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);
box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);
}
h2 {

Page
197
Online Grocery Shop 2018

display: block;
font-size: 2em;
margin-top: 0.67em;
margin-bottom: 0.67em;
margin-left: 0;
margin-right: 0;
font-weight: bold;
}
</style>

</head>

<body>
<?php include('includes/header.php');?>
<div class="ts-main-content">
<?php include('includes/leftbar.php');?>
<div class="content-wrapper">
<div class="container-fluid">

<div class="row">
<div class="col-md-12">

<div class="row">

Page
198
Online Grocery Shop 2018

<div class="col-md-10">
<br>

<table style="width:100%">
<tr>
<th>Fullname</th>
<th>Email</th>
<th>Password</th>
<th>Phone</th>
<th>Address</th>
<th>Action</th>
</tr>
<tr>
<?php
$sql= "SELECT * FROM user";
$rs=$con->query($sql);
while($row=$rs->fetch_assoc())
{

?>
<tr>
<td> <?php echo $row['fullname'];?> </td>
<td> <?php echo $row['email'];?> </td>

Page
199
Online Grocery Shop 2018

<td> <?php echo $row['password'];?> </td>


<td> <?php echo $row['phone'];?> </td>
<td> <?php echo $row['address'];?> </td>
<td><form action="del-reg.php" method="post"><input
type="hidden" name="id" value="<?php echo $row['id']; ?>">
<input type="submit" value="Delete" class="btn btn-danger btn-
md">
</form></td>

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

</div>
<div class="hr-dashed"></div>
</div>
</div>
</div>
</div>
</div>

Page
200
Online Grocery Shop 2018

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

<!-- Loading Scripts -->


<script src="js/jquery.min.js"></script>
<script src="js/bootstrap-select.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/jquery.dataTables.min.js"></script>
<script src="js/dataTables.bootstrap.min.js"></script>
<script src="js/Chart.min.js"></script>
<script src="js/fileinput.js"></script>
<script src="js/chartData.js"></script>
<script src="js/main.js"></script>
</body>
</html>
<?php } ?>

Page
201
Online Grocery Shop 2018

Program:upd-pro.php

<?php
session_start();
error_reporting(0);
include('includes/config.php');

$id=$_POST['id'];

$sql="SELECT * FROM product WHERE id='$id'";


$rs=$con->query($sql);
$rowed=$rs->fetch_assoc();

Page
202
Online Grocery Shop 2018

if(strlen($_SESSION['alogin'])==0)
{
header('location:index.php');
}
else{

if(isset($_POST['submit']))
{
$id=$_POST['id'];
$producttitle=$_POST['producttitle'];
$productoverview=$_POST['productoverview'];
$price=$_POST['price'];
$stock=$_POST['stock'];
$category=$_POST['category'];
$image1=$_FILES["image1"]["name"];

if($_FILES["image1"]["name"]!='')
{
move_uploaded_file($_FILES["image1"]["tmp_name"],"img/producti
mages/".$_FILES["image1"]["name"]);

$sql="UPDATE product SET


producttitle='$producttitle',productoverview='$productoverview',Price

Page
203
Online Grocery Shop 2018

='$price',stock='$stock',category='$category',image1='$image1'
WHERE id='$id'";
}
else
{
$sql="UPDATE product SET
producttitle='$producttitle',productoverview='$productoverview',Price
='$price',stock='$stock',category='$category' WHERE id='$id'";
}
$rs=$con->query($sql);

$smsg="Product updated successfully";


}

?>
<!doctype html>
<html lang="en" class="no-js">

<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-
scale=1, minimum-scale=1, maximum-scale=1">

Page
204
Online Grocery Shop 2018

<meta name="description" content="">


<meta name="author" content="">
<meta name="theme-color" content="#3e454c">

<title>Online Grocery Shop | Admin Post Order</title>

<!-- Font awesome -->


<link rel="stylesheet" href="css/font-awesome.min.css">
<!-- Sandstone Bootstrap CSS -->
<link rel="stylesheet" href="css/bootstrap.min.css">
<!-- Bootstrap Datatables -->
<link rel="stylesheet" href="css/dataTables.bootstrap.min.css">
<!-- Bootstrap social button library -->
<link rel="stylesheet" href="css/bootstrap-social.css">
<!-- Bootstrap select -->
<link rel="stylesheet" href="css/bootstrap-select.css">
<!-- Bootstrap file input -->
<link rel="stylesheet" href="css/fileinput.min.css">
<!-- Awesome Bootstrap checkbox -->
<link rel="stylesheet" href="css/awesome-bootstrap-checkbox.css">
<!-- Admin Stye -->
<link rel="stylesheet" href="css/style.css">
<style>
.errorWrap {

Page
205
Online Grocery Shop 2018

padding: 10px;
margin: 0 0 20px 0;
background: #fff;
border-left: 4px solid #dd3d36;
-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: #fff;
border-left: 4px solid #5cb85c;
-webkit-box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);
box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);
}
h2 {
display: block;
font-size: 2em;
margin-top: 0.67em;
margin-bottom: 0.67em;
margin-left: 0;
margin-right: 0;
font-weight: bold;
}

Page
206
Online Grocery Shop 2018

</style>

</head>

<body>
<?php include('includes/header.php');?>
<div class="ts-main-content">
<?php include('includes/leftbar.php');?>
<div class="content-wrapper">
<div class="container-fluid">

<div class="row">
<div class="col-md-12">

<h2 class="page-title">Update Product</h2>

<div class="row">
<div class="col-md-12">
<div class="panel panel-default">
<div class="panel-heading">Basic Info</div>
<?php
if(isset($smsg) && $smsg!="")
{
?>

Page
207
Online Grocery Shop 2018

<div class="alert alert-success alert-dismissible">


<a href="#" class="close" data-dismiss="alert" aria-
label="close">&times;</a>
<strong>Success!</strong> <?php echo $smsg; ?>
</div>
<?php }?>

<div class="panel-body">
<form method="post" class="form-horizontal"
enctype="multipart/form-data">
<div class="form-group">
<label class="col-sm-2 control-label">Product Title<span
style="color:red">*</span></label>
<div class="col-sm-4">
<input type="text" name="producttitle" value="<?php echo
$rowed['producttitle'];?>" class="form-control" required>
</div>
</div>

<div class="form-group">
<label class="col-sm-2 control-label">Product Overview<span
style="color:red">*</span></label>
<div class="col-sm-10">

Page
208
Online Grocery Shop 2018

<input type="text" name="productoverview" value="<?php echo


$rowed['productoverview'];?>" class="form-control" required>
</div>
</div>

<div class="form-group">
<label class="col-sm-2 control-label">Price<span
style="color:red">*</span></label>
<div class="col-sm-3">
<input type="text" name="price" value="<?php echo
$rowed['price'];?>" class="form-control" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">Stock<span
style="color:red">*</span></label>
<div class="col-sm-3">
<input type="number" name="stock" class="form-control">
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">Category<span
style="color:red">*</span></label>
<div class="col-sm-3">

Page
209
Online Grocery Shop 2018

<select name="category" class="form-control">


<?php
$sql="SELECT * FROM category";
$rs=$con->query($sql);
while($row=$rs->fetch_assoc())
{
?>

<option value="<?php echo $row['id'];?>" <?php


if($row['id']==$rowed['category']) {?> selected <?php }?>> <?php
echo $row['category']; ?></option>
<?php
}
?>
</select>
</div>
</div>

<input type="hidden" name="id" value="<?php echo $rowed['id'];


?>">

<div class="form-group">
<label class="col-sm-2 control-label">Upload Image<span
style="color:red">*</span>

Page
210
Online Grocery Shop 2018

<img src="img/productimages/<?php echo $rowed['image1'];?>"


style="width:100px;">
</label>
<div class="col-sm-3">
<input type="file" name="image1">
</div>

</div>
<div class="hr-dashed"></div>
</div>
</div>
</div>
</div>

<div class="form-group">
<div class="col-sm-8 col-sm-offset-2">
<button class="btn btn-default" type="reset">Cancel</button>

Page
211
Online Grocery Shop 2018

<button class="btn btn-primary" name="submit" type="submit">Save


changes</button>
</div>
</div>

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

</div>
</div>
</div>
<!-- Loading Scripts -->
<script src="js/jquery.min.js"></script>
<script src="js/bootstrap-select.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/jquery.dataTables.min.js"></script>
<script src="js/dataTables.bootstrap.min.js"></script>
<script src="js/Chart.min.js"></script>
<script src="js/fileinput.js"></script>

Page
212
Online Grocery Shop 2018

<script src="js/chartData.js"></script>
<script src="js/main.js"></script>
</body>
</html>
<?php } ?>

Program:change-password.php

<?php
session_start();
error_reporting(0);
include('includes/config.php');
if(strlen($_SESSION['alogin'])==0)
{
header('location:index.php');

Page
213
Online Grocery Shop 2018

}
else{
// Code for change password
if(isset($_POST['submit']))
{
$password=($_POST['password']);
$newpassword=($_POST['newpassword']);
$username=$_SESSION['alogin'];
$sql ="SELECT Password FROM admin WHERE
UserName=:username and Password=:password";
$query= $dbh -> prepare($sql);
$query-> bindParam(':username', $username, PDO::PARAM_STR);
$query-> bindParam(':password', $password, PDO::PARAM_STR);
$query-> execute();
$results = $query -> fetchAll(PDO::FETCH_OBJ);
if($query -> rowCount() > 0)
{
$con="update admin set Password=:newpassword where
UserName=:username";
$chngpwd1 = $dbh->prepare($con);
$chngpwd1-> bindParam(':username', $username,
PDO::PARAM_STR);
$chngpwd1-> bindParam(':newpassword', $newpassword,
PDO::PARAM_STR);

Page
214
Online Grocery Shop 2018

$chngpwd1->execute();
$msg="Your Password succesfully changed";
}
else {
$error="Your current password is not valid.";
}
}
?>

<!doctype html>
<html lang="en" class="no-js">

<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-
scale=1, minimum-scale=1, maximum-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<meta name="theme-color" content="#3e454c">

<title>Online Shopping| Admin Change Password</title>

<!-- Font awesome -->

Page
215
Online Grocery Shop 2018

<link rel="stylesheet" href="css/font-awesome.min.css">


<!-- Sandstone Bootstrap CSS -->
<link rel="stylesheet" href="css/bootstrap.min.css">
<!-- Bootstrap Datatables -->
<link rel="stylesheet" href="css/dataTables.bootstrap.min.css">
<!-- Bootstrap social button library -->
<link rel="stylesheet" href="css/bootstrap-social.css">
<!-- Bootstrap select -->
<link rel="stylesheet" href="css/bootstrap-select.css">
<!-- Bootstrap file input -->
<link rel="stylesheet" href="css/fileinput.min.css">
<!-- Awesome Bootstrap checkbox -->
<link rel="stylesheet" href="css/awesome-bootstrap-checkbox.css">
<!-- Admin Stye -->
<link rel="stylesheet" href="css/style.css">
<script type="text/javascript">
function valid()
{
if(document.chngpwd.newpassword.value!=
document.chngpwd.confirmpassword.value)
{
alert("New Password and Confirm Password Field do not match !!");
document.chngpwd.confirmpassword.focus();
return false;

Page
216
Online Grocery Shop 2018

}
return true;
}
</script>
<style>
.errorWrap {
padding: 10px;
margin: 0 0 20px 0;
background: #fff;
border-left: 4px solid #dd3d36;
-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: #fff;
border-left: 4px solid #5cb85c;
-webkit-box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);
box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);
}
h2 {
display: block;
font-size: 2em;

Page
217
Online Grocery Shop 2018

margin-top: 0.67em;
margin-bottom: 0.67em;
margin-left: 0;
margin-right: 0;
font-weight: bold;
}
</style>

</head>

<body>
<?php include('includes/header.php');?>
<div class="ts-main-content">
<?php include('includes/leftbar.php');?>
<div class="content-wrapper">
<div class="container-fluid">

<div class="row">
<div class="col-md-12">

<h2 class="page-title">Change Password</h2>

<div class="row">

Page
218
Online Grocery Shop 2018

<div class="col-md-10">
<div class="panel panel-default">
<div class="panel-heading">Form fields</div>
<div class="panel-body">
<form method="post" name="chngpwd" class="form-horizontal"
onSubmit="return valid();">

<?php if($error){?><div
class="errorWrap"><strong>ERROR</strong>:<?php echo
htmlentities($error); ?> </div><?php }
else if($msg){?><div
class="succWrap"><strong>SUCCESS</strong>:<?php echo
htmlentities($msg); ?> </div><?php }?>
<div class="form-group">
<label class="col-sm-4 control-label">Current Password</label>
<div class="col-sm-8">
<input type="password" class="form-control" name="password"
id="password" required>
</div>
</div>
<div class="hr-dashed"></div>

<div class="form-group">

Page
219
Online Grocery Shop 2018

<label class="col-sm-4 control-label">New Password</label>


<div class="col-sm-8">
<input type="password" class="form-control" name="newpassword"
id="newpassword" required>
</div>
</div>
<div class="hr-dashed"></div>

<div class="form-group">
<label class="col-sm-4 control-label">Confirm Password</label>
<div class="col-sm-8">
<input type="password" class="form-control"
name="confirmpassword" id="confirmpassword" required>
</div>
</div>
<div class="hr-dashed"></div>

<div class="form-group">
<div class="col-sm-8 col-sm-offset-4">

<button class="btn btn-primary" name="submit" type="submit">Save


changes</button>

Page
220
Online Grocery Shop 2018

</div>
</div>

</form>

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

</div>

</div>
</div>

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

<!-- Loading Scripts -->


<script src="js/jquery.min.js"></script>
<script src="js/bootstrap-select.min.js"></script>

Page
221
Online Grocery Shop 2018

<script src="js/bootstrap.min.js"></script>
<script src="js/jquery.dataTables.min.js"></script>
<script src="js/dataTables.bootstrap.min.js"></script>
<script src="js/Chart.min.js"></script>
<script src="js/fileinput.js"></script>
<script src="js/chartData.js"></script>
<script src="js/main.js"></script>

</body>

</html>
<?php } ?>

Program:del-cat.php
<?php
include('includes/config.php');

$id=$_POST['id'];
$del="DELETE FROM category WHERE id='$id'";
$con->query($del);
header("location:list-cat.php");

?>
Program:del-pro.php
Page
222
Online Grocery Shop 2018

<?php
include('includes/config.php');

$id=$_POST['id'];
$delpro="DELETE FROM product WHERE id='$id'";
$con->query($delpro);
header("location:list-product.php");

?>

Program: del-reg.php

<?php
include('includes/config.php');
$id=$_POST['id'];
$delpro="DELETE FROM user WHERE id='$id'";
$con->query($delpro);
header("location:reg-users.php");
?>

Program:inactive.php

<?php

Page
223
Online Grocery Shop 2018

include('includes/config.php');
$id=$_POST['id'];
if ($_POST['type']=="inactive") {
$upd="UPDATE product SET status='0' where id='$id'";
}
else
{
echo $upd="UPDATE product SET status='1' where id='$id'";
}
$con->query($upd);
header("location:list-product.php");
?>

ACTIVITY XML
<webview android:id="@+id/myWebView"
android:layout_height="fill_parent"
android:layout_width="fill_parent" android:scrollbars="none"
xmlns:android="http://schemas.android.com/apk/res/android">
</webview>
MAIN ACTIVITY.JAVA
WebView myWebView = (WebView)
findViewById(R.id.webview);
myWebView.loadUrl("http://www.example.com");
package com.sirseni.simpleandroidwebviewexample;

Page
224
Online Grocery Shop 2018

import android.app.Activity;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.webkit.WebSettings;
import android.webkit.WebView;
import android.webkit.WebViewClient;
public class MainActivity extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {

super.onCreate(savedInstanceState);

setContentView(R.layout.activity_main);

WebView myWebView = (WebView)


findViewById(R.id.myWebView);

myWebView.loadUrl("http://www.centerend.com");

myWebView.setWebViewClient(new MyWebViewClient());

WebSettings webSettings = myWebView.getSettings();

Page
225
Online Grocery Shop 2018

webSettings.setJavaScriptEnabled(true);
}
// Use When
the user clicks a link from a web page in your WebView
private class MyWebViewClient extends WebViewClient {

140

@Override

public boolean shouldOverrideUrlLoading(WebView view, String


url) {

if (Uri.parse(url).getHost().equals("www.centerend.com")) {

return false;
}
Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(url));

startActivity(intent);

return true;
}

Page
226
Online Grocery Shop 2018

}
}

ANDROID MANIFEST.XML
<manifest package="com.sirseni.simpleandroidwebviewexample"
xmlns:android="http://schemas.android.com/apk/res/android">
<uses-permission android:name="android.permission.INTERNET">
<application android:allowbackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme">
<activity android:label="@string/app_name"
android:name=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN">
<category android:name="android.intent.category.LAUNCHER">
</category></action></intent-filter>
</activity>
</application>
</uses-permission></manifest>

Page
227
Online Grocery Shop 2018

Chapter 7
Testing and Debugging Technique

7.1 Team Interaction

The following describes the level of team interaction necessary to have a


successful product.

• The Test Team will work closely with the Development Team to achieve a
high quality design and admin interface specifications based on modeler
requirements. The Test Team is responsible for visualizing test cases and
raising quality issues and concerns during meetings to address issues early
enough in the development cycle.

• Since the application interacts with a back-end system component, the Test
Team will need to include a plan for integration testing. Integration testing
must be executed successfully prior to system testing.

7.2 Test Objective


The objective our test plan is to find and report as many bugs as possible to
improve the integrity of our program. Although exhaustive testing is not
possible, we will exercise a broad range of tests to achieve our goal. We will be
testing a Binary Search Tree Application utilizing a pre-order traversal format.
Page
228
Online Grocery Shop 2018

There will be eight key functions used to manage our application: load, store,
clear, search, insert, delete, list in ascending order, and list in descending order.
Our admin interface to utilize these functions is designed to be admin-friendly
and provide easy manipulation of the tree. The application will only be used as
a demonstration tool, but we would like to ensure that it could be run from a
variety of platforms with little impact on performance or usability.

7.3 Process Overview

The following represents the overall flow of the testing process:

1. Identify the requirements to be tested. All test cases shall be derived


using the current Program Specification.
2. Identify which particular test(s) will be used to test each module.
3. Review the test data and test cases to ensure that the unit has been
thoroughly verified and that the test data and test cases are adequate to
verify proper operation of the unit.
4. Identify the expected results for each test.
5. Document the test case configuration, test data, and expected results.
6. Perform the test(s).
7. Document the test data, test cases, and test configuration used during the
testing process. This information shall be submitted via the Unit/System
Test Report (STR).
8. Successful unit testing is required before the unit is eligible for
component integration/system testing.
9. Unsuccessful testing requires a Bug Report Form to be generated. This
document shall describe the test case, the problem encountered, its
possible cause, and the sequence of events that led to the problem. It shall
be used as a basis for later technical analysis.
Page
229
Online Grocery Shop 2018

10.Test documents and reports shall be submitted. Any specifications to be


reviewed, revised, or updated shall be handled immediately.

7.4 Testing Process

b. Design
System
Test
c. e.
a. Organize Design/Bui Design/Bui
Project ld Test ld Test f. Signoff
Proc. Proc.
d.
Organize
Project
The fig 2.1 above outlines the Test Process approach that will be followed.

Organize Project involves creating a System Test Plan, Schedule & Test
Approach, and assigning responsibilities.

b.Design/Build System Test involves identifying Test Cycles, Test Cases,


Entrance & Exit Criteria, Expected Results, etc. In general, test
conditions/expected results will be identified by the Test Team in conjunction
with the Development Team. The Test Team will then identify Test Cases and
the Data required. The Test conditions are derived from the Program
Specifications Document.

Page
230
Online Grocery Shop 2018

c.Design/Build Test Procedures includes setting up procedures such as Error


Management systems and Status reporting.

d.Build Test Environment includes requesting/building hardware, software and


data set-ups.

e.Execute System Tests – The tests identified in the Design/Build Test


Procedures will be executed. All results will be documented and Bug Report
Forms filled out and given to the Development Team as necessary.

f.Signoff - Signoff happens when all pre-defined exit criteria have been
achieved.

7.5 Test Cases

The following outlines the types of testing that will be done for unit, integration,
and system testing. The user should be enter his / her email id and password so
that he / she can able to go for the further options. Trying to submit without
filling the from properly. Check for acknowledge from the server. The test case
will While it includes what will be tested, the specific use cases that determine
how the testing is done will be detailed in the Test Design Document. The test

Page
231
Online Grocery Shop 2018

case will check the application for the same since a user can only login with the
correct email id and password. cases that will be used for designing use.

Cases is shown in Figure 2.1 and onwards

Tested By: Avik Neogi


Test Type Unit Testing
Test Case Number 1
Test Case Name Admin Identification
Test Case Description
The admin should enter user id and password so that admin
can able to go for the further options. The test case will check
the application for the same since an admin can only login
with the correct user id, password.

Item(s) to be tested

1 Verification of the user id and password with the record in the database.

Specifications
Expected
Input Output/Result
1) Correct Admin id and password 1) Successful login
2) Incorrect Id or Password 2) Failure Message

Page
232
Online Grocery Shop 2018

Tested By: Gourav Karmakar


Test Type Unit Testing
Test Case Number 2
Test Case Name Admin adds product
Test Case Description

The admin uploads the product and they can also delete their
products or update the same.

Item(s) to be tested
1 Check whether the admin id logged in.

2 Check if the admin has selected a document and the size of that is< 2 MB.

Specifications
Expected
Input Output/Result
1) Check whether portfolio is selected. 1) A message asks that image is added or not.
2) Check whether the size of the 2) Return an error message.
document is < 2 MB.

Page
233
Online Grocery Shop 2018

Tested By: Gourav Karmakar


Test Type Unit Testing
Test Case Number 3
Test Case Name Approves Order
Test Case Description Admin is connected to the Internet and with the order
page.
The suspension acknowledgement goes to the admin
whose agency details is suspended.
Item(s) to be tested
Verification of the admin id and password with the record in the
1
database.
Specifications
Expected
Input Output/Result
3) Correct Admin id and password 3) Successful login
4) Incorrect Id or Password 4) Failure Message

Page
234
Online Grocery Shop 2018

7.6 Unit Testing

Unit Testing is done at the source or code level for language-specific


programming errors such as bad syntax, logic errors, or to test particular
functions or code modules. The unit test cases shall be designed to test the
validity of the programs correctness.

7.7 White Box Testing

In white box testing, the UI is bypassed. Inputs and outputs are tested directly
at the code level and the results are compared against specifications. This form
of testing ignores the function of the program under test and will focus only on
its code and the structure of that code. Test case designers shall generate cases
that not only cause each condition to take on all possible values at least once,
but that cause each such condition to be executed at least once. To ensure this
happens, we will be applying Branch Testing. Because the functionality of the
program is relatively simple, this method will be feasible to apply.

Each function of the binary tree repository is executed independently;


therefore, a program flow for each function has been derived from the code.

Page
235
Online Grocery Shop 2018

7.8 Black Box Testing

Black box testing typically involves running through every possible input to
verify that it results in the right outputs using the software as an end-admin
would. We have decided to perform Equivalence Partitioning and Boundary
Value Analysis testing on our application.

7.9 System Testing


The goals of system testing are to detect faults that can only be exposed by
testing the entire integrated system or some major part of it. Generally, system
testing is mainly concerned with areas such as performance, security, validation,
load/stress, and configuration sensitivity. But in our case well focus only on
function validation and performance. And in both cases we will use the black-
box method of testing.

7.10 Integration Testing


Integration testing is the phase in software testing in which individual software
modules are combined and tested as a group .It occurs after unit testing and
before validation testing . Integration testing takes as its input modules that have
been unit tested , groups them in larger as its output the integrated system ready
for system testing.
The purpose of integration testing is to verify functional , performance ,and
reliability requirements placed on major design items. These “design items”,
group of units ,are exercised through their interfaces using black-box testing .
success and error cases being simulated via appropriate parameter and data

Page
236
Online Grocery Shop 2018

inputs. Simulated usage of shared data areas and inter-process communication is


tested and individual subsystems are exercised through their input interface .
Test cases are constructed to test whether all the components within
assemblages interact correctly,for example across procedure calls or process
activations,and this is done after testing individual modules,i.e.,unit testing.The
overall idea is a building block approach .In which verified assemblages are
added to a verified assemblages are added to a verified base which is then used
to support the integration testing of further assemblages.
Software integration testing is performed according to the software
development life cycle (SDLC) after module and functional tests. The cross
dependencies for software integration testing are: schedule for integration
testing, strategy and selection of the tools used for integration, define the
cyclomatical complexity of the software and software architecture ,reusability
of modules and life-cycle and versioning management.
Some different types of integration testing are big-bang, top-down, and bottom-
up, mixed or sandwich and risky-hardest. Other Integration , patterns are:
collaboration integration , backbone integration , layer integration , client-server
integration , distributed services integration and high – frequency integration.
In the big-bang approach , most of the developed modules are coupled together
to form a complete software system or major part of the system and then used
for integration testing.
A type of big-bang integration testing is called usage model testing which can
be used in both software system or major part of the system and then used for
integration testing. this method is very effective for saving time in the
integration testing process. However , if the test cases and their results are not
recorded properly , the entire integration process will be more complicated and
may prevent the testing team from achieving the goal of integration testing.

Page
237
Online Grocery Shop 2018

A type of big-bang integration testing is called usage model testing which can
be used in both software and hardware integration testing. The basis behind this
type of integration testing is to run user-like workloads in integrated user-like
environments. In doing the testing in this manner, the environment is proofed,
while the individual components are proofed indirectly through their use. Usage
Model testing takes an optimistic approach to testing, because it expects to have
few problems with the individual components. The strategy relies heavily on the
component developers to do the isolated unit testing for their product. The goal
of the strategy is to avoid redoing the testing done by the developers, and
instead flesh-out problems caused by the interaction of the components in the
environment. For integration testing, Usage Model testing can be more efficient
and provides better test coverage than traditional focused functional integration
testing. To be more efficient and accurate, care must be used in defining the
user-like workloads for creating realistic scenarios in exercising the
environment. This gives confidence that the integrated environment will work
as expected for the target customers.
Bottom up testing is an approach to integrated testing where the lowest level
components are tested first, then used to facilitate the testing of higher level
components. The process is repeated until the component at the top of the
hierarchy is tested.
All the bottom or low-level modules, procedures or functions are integrated and
then tested. After the integration testing of lower level integrated modules, the
next level of modules will be formed and can be used for integration testing.
This approach is helpful only when all or most of the modules of the same
development level are ready. This method also helps to determine the levels of
software developed and makes it easier to report testing progress in the form of
a percentage.

Page
238
Online Grocery Shop 2018

Top-down testing is an approach to integrated testing where the top integrated


modules are tested and the branch of the modules is tested step by step until the
end of the related module. Sandwich testing is an approach to combine top
down testing with bottom up testing.
One limitation to this sort of testing is that any conditions not stated in specified
integration tests, outside of the confirmation of the execution of design items,
will generally not be tested.

System Security measures (Implementation of security


for the project developed)
• Only authorized admin’s are allowed.
• Without signing in admins are not allowed to go an intermediate page by
typing an URL. For all such efforts, admins will be redirected to the
home page.

Database/Data security
• Database is present in remote machine.
• Oracle’s default securities are applied.

Page
239
Online Grocery Shop 2018

7.11 Creation of Admin profiles and access rights


• The admin must create admin’s profile manually

7.12Cost Estimation of the Project along with Cost


7.13Estimation Model

Analogous estimate of effort or cost

Used for Early Estimate or Individual Activity Estimate


Sample example shown below is for two major deliverables of a software
project. You use a previous project as a benchmark for analogous estimation.
Using your experience you will estimate a multiplier.

Multipliers:
1. Prototyping: 0.75.
2. Testing: 0.5
3. Deployment: 0.5
Finally, if you want to convert to cost, you would use current rates for the
resource

Page
240
Online Grocery Shop 2018

Previous Effort Cost


Previou Current
WBS Similar Multiplie (Previou (Rs.
s Project
ID Project r s Effort 600/hr.
Effort Estimate
Activity * 0.75) )
40 30
Prototypin Prototypin Rs.
1 Work- 0.75 Work-
g g 18000/-
Hours hours
20
10 Work- Rs.
2 Testing Work- Testing 0.50
Hours 6000/-
Hours
Tota 40 Work- Rs.
l Hours 24000/-

Total Hour: 40h

Page
241
Online Grocery Shop 2018

CHAPTER 8

Future scope and further enhancement of the


Project

In future, we will get more different types of technology coming and


developing the website so that the agencies can easily search the
modelers through website. To increase the security level. Agency and
Modeler can communicate with each other through message box.
Chatting could be held between them.
We had performed the initial stages of the project like determining the
platform to execute project codes, database concerning figures (ER
diagram, Schema diagram).

Page
242
Online Grocery Shop 2018

CHAPTER 9

CONCLUSION

Through the online model, the agency can easily get the modeler after
logging in. The admin approves it.But through this portal they can
also easily search modeler. It never contains any cost it just contains
the charges which is requiring to surfing the internet.

In an era of applying for modelers in future there will be some more


new technologies will be developed rather than this which can make
human life easier because day by day technology is increasing and it
also saves time.

Page
243
Online Grocery Shop 2018

CHAPTER 10

Bibliography

1. Roger S. Pressman. Software Engineering: A Practioner's Approach


(Sixth Edition, International Edition). McGraw-Hill, 2005.
2. Html & CSS fifth edition written by Thomas A.Powell
3. DBMS Book wriiten by D.s Sherawat& Sanjay Sharma , 2007
4. Php book written by Steven Holzner,2000
5. Learning Php, My Sql& Java Script written by Robin Nixon 4th
edition,2015
6. The Complete Reference Php is written by Steven Holzner,2008
7. The Database Management System is written by L.MathuKrithiga
Venkatesh,2008
8. The BeginningPhp 5.3 is written by Matt Doyle,2010
9. Java Programming is written by P.Rizwan Ahmed,2013
10.Php My Sql& Web Development is written by Janet Valade, 25 th Jan
2008
11.Html, CSS& Java script Web publishing is written by Laura
Lemay,15thJan 2016.
12.Database Systems Concepts Sixth edition is written by Silberschatz A.
13.Web Design with Html,1css,Javascript and Jquery set is written by Jon
Duckett, 15th Aug 2014.
14.Beginning Php,Apache,MySql& Web development is written by
Page
244
Online Grocery Shop 2018

15.Software Engineering : A Practioner&#39;s Approach, Roger S.


Pressman.,Sixth Edition,
16.International Edition. McGraw-Hill, 2005.
17. HTML &amp; CSS, Thomas A. Powell, fifth edition, McGraw-Hill
18. Basic java and jsp,P. Rizwan, Second edition.
19. Javascript2, Ivor Horton.
20. Beginning PHP &amp; Apache, Gary Cornell and Cay S. Horstmann,
Second edition.,
21.SunSoft Press, 1997.
22. MYSQL &amp; PHP Introduction, Robert Eckstein and Marc Loy and
Dave Wood, O&#39;Reilly,
23.Fourth edition 1998.
24. DBMS , D.S Sherawat &amp; Sanjay Sharma, 2007
25. The Complete Reference Of PHP, Steven Holzner, 2008
26. Learning MySql &amp; Java Script, Robin Nixon, 4 th edition, 2015
27. The Beginning Of cakePHP 5.3, Matt Doyle, 2010
28. Software Engineering, Roger S. Pressman, 2005
29. The Database Management System, L. Mathu, 2008
30. Database Management Systems Concepts, Silberschatz A.
31. Web-Design with HTML, CSS, JAVASCRIPT and JQUERY, Jon
Duckett, 2014
32. Beginning of Database, R. K. Narayanan, 2010
33. PHP Objects, Patterns, and Practice (Paperback), Matt Zandstra, 2007

CHAPTER 11
Page
245
Online Grocery Shop 2018

REFFERENCE

1. https://youtu.be/FgSysHTsb6A

2. https://youtu.be/doobakPif3s

3. https://youtu.be/wp6Ngpk5XiY

4. https://youtu.be/skpdlX_HkfU

5. https://youtu.be/AFbBgtWHPks

6. http://www.w3.org/TR/html5

7. https://html.spec.whatwg.org/multipage/index.html

8. http://www.w3.org/TR/html401

9. http://www.w3.org/TR/xhtml1

10. http://www.w3.org/TR/CSS21/

11. http://www.w3.org/TR/css3-color/

12. https://youtu.be/0wYSviHeRbs

13. https://youtu.be/38PqyQc_z9o

14. https://youtu.be/SSA0atvePSI

15. https://youtu.be/psQKo3TCPhk

16. https://youtu.be/UP_ARpmBBsc
Page
246
Online Grocery Shop 2018

17. https://youtu.be/d_UuOVhuCF8

18. https://youtu.be/AOkvMF7ul74

19. https://youtu.be/am8u3HLH8HE
20. http://www.freestudentprojects.com/studentprojectreport/online-
clinic-
21. management-system/
22. https://www.kashipara.com/project/php/1008/online-clinic-
management-
23. system-php- web-application- source-code
24. https://www.studentprojectcode.com/phppro/online-clinic-
management-system/
25. https://www.youtube.com/watch?v=yxQpdHR9dZM
26. https://iprogrammerblog.blogspot.in/2015/05/online-clinic-
management-system-in- php.html
27. https://www.freeprojectz.com/paid-projects/clinic-
management-system.html
28. https://www.codeproject.com/Questions/660170/sample_clinic_
system.php
29. https://w3schools.com/php/phpsampleproject/online-clinic-
system.html
30. https://www.tutorialspoint.com/php/sample_project_ppt/hospita
_management_system/

Page
247
Online Grocery Shop 2018

31. https://www.projecttutorials.com/powerpoint_project/clinic -
management-system
32. https://www.w3schools.com/sample_websites_forms.php
33. https://www.freestudentprojects.com/sampleprojectstudents/RC
Sclinic.php
34. https://www.youtube.com/watch?v=mnf0zemQpEI
35. https://www.codeproject.com/Articles/759094/Step-by- Step-
PHP- Tutorials-for-Beginners- Creating
36. http://php.net/manual/en/tutorial.php
37. http://www.crimsondesigns.com/tutorials/beginner-web-
design-tutorials.php
38. https://www.tutorialspoint.com/php/
39. https://www.w3schools.com/js/js_intro.asp
40. https://www.w3schools.com/nodejs/nodejs_modules.asp

Page
248

Das könnte Ihnen auch gefallen