You are on page 1of 200

A project report on

PHOENIX GAMING ACCESSORIES PORTAL

Submitted in partial fulfilment for the award of the degree of

B.Sc. Computer Science


By

C.SHANKAR GANESH - 18BCS0090


K. SHARAN - 18BCS0113
P. XAVIER RAJA- 18BCS0088

Under the guidance of


Prof. CHARANYA.R
SCHOOL OF INFORMATION TECHNOLOGY
&ENGINEERING

VELLORE VIT

JUNE 2021
DECLARATION

I hereby declare that the thesis entitled “PHOENIX GAMING ACCESSORIES


PORTAL” submitted by me, for the award of the degree of Specify the name of the
degree VIT is a record of bonfide work carried out by me under the supervision of
Guide Name

I further declare that the work reported in this thesis has not been submitted and
will not be submitted, either in part or in full, for the award of any other degree or
diploma in this institute or any other institute or university.

Place: Vellore

Date: 21/4/2021

Signature of the Candidate

K. SHARAN

C. SHANKAR GANESH

P. XAVIER RAJA
CERTIFICATE

This is to certify that the thesis entitled “PHOENIX GAMING ACCESSORIES


PORTAL” submitted by K.SHARAN(18BCS0113) , C.SHANKAR
GANESH(18BCS0090) , P.XAVIER RAJA- (18BCS0088) SITE ,VIT, for the award of
the degree of Name of the degree is a record of bonafide work carried out by
him/her under my supervision.

The contents of this report have not been submitted and will not be submitted either in
part or in full, for the award of any other degree or diploma in this institute or any
other institute or university. The Project report fulfils the requirements and regulations
of VIT and in my opinion meets the necessary standards for submission.

Signature of the Guide Signature of the HOD

Internal Examiner External


Examiner
ABSTRACT

Electronic Business offers innovative ways of doing business through Internet.


Internet revolution has introduced number of advanced technologies to access
organizations all over the world in an efficient but simple manner. Internet traffic is
increasing exponentially as a result of wireless access, mobile computing and other
innovative communication technologies. Now a days the life style of the people is
different. People feel uncomfortable and time consuming for going crowded markets.
So, E-Shopping is a boon as it saves lot of time. Online shopping is a process whereby
consumers directly buy goods, services etc. from a seller without an intermediary
service over the Internet. Shoppers can visit web stores from the comfort of their house
and shop as by sitting in front of the computer. Online stores are usually available 24
hours a day and many consumers have internet access both at work and at home. So, it
is very convenient for them to shop Online.

i
ACKNOWLEDGEMENT

It is my pleasure to express with deep sense of gratitude to CHARANYA R,


Associate Professor, School of information technology & engineering, Vellore Institute of
Technology, for his/her constant guidance, continual encouragement, understanding; more
than all, he taught me patience in my endeavor. My association with him / her is not
confined to academics only, but it is a great opportunity on my part of work with an
intellectual and expert in the field of Internet of Things.
I would like to express my gratitude to Dr.G.Viswanathan, Chancellor, VIT
University, Vellore, Shri G.V.Sekar, Vice Chancellor, Dr. S. Narayanan, Pro-Vice
Chancellor, and Dr. Balakrishna Tripathy, Dean, SITE, for providing with an
environment to work in and for his inspiration during the tenure of the course.

In jubilant mood I express ingeniously my whole-hearted thanks to I


MALASERENE, Head of Department Computer Science and Associate Professor, all
teaching staff and members working as limbs of our university for their not-self-centered
enthusiasm coupled with timely encouragements showered on me with zeal, which
prompted the acquirement of the requisite knowledge to finalize my course study
successfully. I would like to thank my parents for their support.

It is indeed a pleasure to thank my friends who persuaded and encouraged me to


take up and complete this task. At last but not least, I express my gratitude and
appreciation to all those who have helped me directly or indirectly toward the successful
completion of this project.

Place: Vellore

Date: 21/4/2021
K. SHARAN

C.SHANKAR GANESH

P. XAVIER RAJA
iii
CONTENTS

CONTENTS.................................................................................................iv
LIST OF FIGURES......................................................................................ix

LIST OF TABLES.....................................................................................xi

CHAPTER 1

1.1 INTRODUCTION……………………………………………………………………7

1.2 OBJECTIVES………………………………………………………………………..7

1.3 SCOPE OF THE PROJECT…………………………………………………………7

1.4 SYSTEM CONGIGURATION

1.4.1 HARDWARE CONFIGURATION…………………………………………..8

1.4.2 SOFTWARE CONFIGURATION……………………………………………8

1.5 FUCTIONAL REQUIREMENTS……………………………………………….…8

1.6 NON-FUCTIONAL REQUIREMENTS……………………………….……………8

CHAPTER-2

2.1 LITERATURE SURVEY………………………………………………..………...9

2.2 PROPOSED SYSTEM……………………………………………………………..10

2.2.1 CUSTOMER………………………………………………………………….10

2.2.2 SYSTEM………………………………………………………………...……10

2.4.3 ADVANTAGES OF PROPOSED SYSTEM…………………………...……11

iv
CHAPTER-3

DETAILED DESIGN OF THE PROJECT/ SYSTEM DESIGN


3.1 MODULE DESCRIPTION …………………………………………………….…11

CHAPTER-4
IMPLEMENTATION OF THE SYSTEM
4.1 CODING ………………………………...……………………………..………….12
4.2 UML DIAGRAM……………………………………………………….………….189
4.2.1 USE CASE DIAGRAM………………………………………….…………..189
4.2.2 ARCHITECTURE DIAGRAM…………………………………..………….189

4.3 TEST CASES………………………………………………………………………190


4.3.1 UNIT TESTING…………………………………………………………..194
4.3.2 INTEGRATION TESTING………………………………..………….…..197
CHAPTER-5
CONCLUSTION AND FUTURE WORK
5.1 CONCLUTION…………………………………………………………..………...199
5.2 FUTURE WORK…………………………………………..………………………199

REFERENCE…………………………………………………………..………………......200

v
LIST OF FIGURES:

HOME PAGE………..………………………………………………….……..13
LOGIN PAGE………………………………………..………………….…….33
SIGN PAGE..………..………………………………………………….……..33
PRODUCT PAGE…………..………………………..………………….…….43
PRODUCT DETAIL………………………………………………………..… 53
CART PAGE…….…..………………………………………………….……..70
PAYMENT DETAIL…………………………………………………………..91
MY ACCOUNT …………………………………………………………...….103
WISHLIST………………………………………………………………...……111
TRACK ORDER……………………………………………………………….121
ADMIN……………………………………………………………………....…132
PAYMENT………………………………………………………………….….148
DATABASE…………………………………………………………….………191

LIST OF TABLES:

USE CASE DIAGRAM ……………………………………………………….192


ARCHITURE DIAGRAM………..…………………………………….…..…..192
FLOW CHART………………………………………………………………….193
UNIT TESTING…………………………………………………………………194
INTEGRATION TESTING…………………………………..…………………197
CHAPTER-1

1. INTRODUCTION ABOUT AREA:


The main aim of the project is to sell the products to the customers directly from the
manufacturer without any intermediary sub dealers and to have access to wide range of
products through online. Nowadays every one prefers online shopping so we are offering
many gaming consoles and games. We buy game key and cd directly from manufacturers so
we can sell in a reasonable price and also in our site we clearly mentioned the offers and
what are the pc requirements to play that game so it is easy to check the customers whether
the game will work on there pc or PlayStation. In this website people who are interested in
gaming can visit the page and all sorts of gaming products are available in this so customer
no need to order each type of in in different sites. If customer wants to buy a console and
related games and controller, he/she can buy in our site in combo offers so they can avail a
huge discount and also, they can read the reviews of the by the people given so it is easier to
choose which type of game they need to buy They can contact us to get information of their
order and upcoming games and additional offers and their product delivery date in the
contact us page

1.2 OBJECTIVE OF THE PROJECT:


PHOENIX GAMING accessorises an ecommerce portal where we provide you
with all sorts of gaming products ranging from your preferred console, special edition
accessories, gaming headphones, best bundle deals to the most recently launched games and
what’s even better is we promise the most competitive prices. By this project we will be able
to connect to the customer so that direct dealing of products can be accomplished. This will
result in a significant decrease in the prices of the products currently available in the market.

1.3 SCOPE
 To connect directly to the customer.
 Providing information to customers regarding their orders through mail
 Customers can review after they bought a product.

 It satisfies the user requirement


 Notifications to the farmer and customer form server side.

7
1.4 SYSTEM DEVELOPMENT

1.4.1 HARDWARE CONFIGURATION


The hardware used for the development of the project is
PROCESSOR RAM : 8 GB (RAM)
MONITOR HARD DISK : NORMAL
CD-DRIVE : NORMAL

1.4.2 SOFTWARE CONFIGURATION


The software used for the development of the project is:
OPERATING SYSTEM : WINDOWS 10
FRONT END : HTML, CSS, JAVASCRIPT, PHP
BACKEND : PHP MY ADMIN
BACKEND : XAMPP SERVER

8
1.5 FUNCTIONAL REQUIREMENTS

 Connecting Directly to the Customer via application.


 Information is automatically stored
 They can create an account and add their desired products to their Cart
 If you cancel, that current page then comes to the home page.
 Customers can Review the product.
 Should provide access to authorized users only.

1.6 NON – FUNCTIONAL REQUIREMENTS

 Security purpose: To set a password for some field


 The system should have a speed for easy for operate it
 The system should reload within 10seconds.
 The system is designed for a user-friendly environment so that farmers can perform
the tasks easily and in an effective way
 Should maintain a complete audit trail of all the user interactions with the system
 The System should be available for 24/7.
 Having the feedback page to the system then only identifies the mistakes and the
correct it also which are the requirements liked by them
 Should provide information via SMS and Email to the users for all the activities
requiring their attention.

9
CHAPTER-2

2.1 LITERATURE SURVEY:

AUTHORS: Katie Larsen, McClarty Aline Orr, Peter M. Frey


TITLE: GAMING IN EDUCATION
Digital games are considered to be the largest and fastest growing market segment of
the multibillion-dollar entertainment industry. The global market is worth billions of
dollars (Kirriemuir & McFarlane, 2004), and development costs, revenue, and
audiences for digital games are comparable—and often exceed—that of the movie
industry (Kirriemuir, 2002). With 97% of US teens playing some type of digital game
on a regular basis (Lenhart, Kahne, Middaugh, Macgill, Evans, & Vitak, 2008), it is
not surprising that there is a large and growing interest in the applicability of games in
education.

AUTHORS: Miroslav Minović,Miloš Milovanović, Dusan Starcevic

TITLE: Game-Based Learning


The first computer games appeared in the fifties of the 20th century - since then, their
development has proceeded at a vertiginous speed. It was almost impossible to
assume that they will become one of the dominant social phenomena, and that, in the
last decade of the 20th century, the industry of computer games generate more
revenue from the film industry.

10
2.4 PROPOSED SYSTEM: -

2.4.1 Customers:

 A convenient method to order the gaming products such as food grains,


vegetables online in wholesale or retail.
 Direct trade between customers and farmers through a virtual intermediary.
Ensuring a reliable customer service for customer satisfaction.
 Timely delivery of stock keeping in mind non-perishability of goods.

2.4.2 System:

 The System being a new concept would be useful for conducting direct trade
between customers and manufacturers
 Customer satisfaction would result in building goodwill and reputation in
market to increase reliability
 Employing better ways for customer satisfaction and customer retention
through quality services and efficient consumer grievance system through
feedback.

2.4.3 ADVANTAGES:-

 To provide information in minimum time and also with minimum effort.


 To avoid human committed errors and misclassification as far as possible.
 Safety. It is very much protected in such a way that it gives permission to the
users to access only when the username and password is correct.
 To offer better services in comparison with the services offered by the present
system.
 To ensure the avoidance of the duplication of the various process.
 To build up a fully multi user online system.
 To design the project with the flexibility so that it can be changed in future
and thus making an extension of the expected life of the system.

11
 To make the system easily maintainable so that the workers and users of the
system can handle the system satisfactorily with easy and convenience.

CHAPTER-3

3.1 MODULES DESCRIPTION:

1.PC DIGITAL
It displays various games which is available on pc

2.PLAYSTATION
It displays various games which is available on PlayStation

3.XBOX
It displays various games which is available on XBOX

4.CONSOLES
It displays various consoles that are available on market

5.LOGIN/SIGNUP
User can log in to their account by entering their username and password and also,
they can create account if they don’t have

6.CART
In this page it displays what are products that are been added by the customer

7.PAYMENTS
It allows you to enter credit and debit card details to pay the amount for the product

12
CHAPTER-4

4.1 IMPLEMENTATION:

HOME

<?php

session_start();

error_reporting(0);

include('includes/config.php');

if(isset($_GET['action']) && $_GET['action']=="add"){

$id=intval($_GET['id']);

if(isset($_SESSION['cart'][$id])){

$_SESSION['cart'][$id]['quantity']++;

}else{

$sql_p="SELECT * FROM products WHERE id={$id}";

$query_p=mysqli_query($con,$sql_p);

if(mysqli_num_rows($query_p)!=0){

$row_p=mysqli_fetch_array($query_p);

$_SESSION['cart'][$row_p['id']]=array("quantity" => 1, "price" =>


$row_p['productPrice']);

}else{

$message="Product ID is invalid";

echo "<script>alert('Product has been added to the cart')</script>";

13
echo "<script type='text/javascript'> document.location ='my-cart.php'; </script>";

?>

<!DOCTYPE html>

<html lang="en">

<head>

<title>Shopping Portal Home Page</title>

<!-- Bootstrap Core CSS -->

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

<!-- Customizable CSS -->

<link rel="stylesheet" href="assets/css/main.css">

<link rel="stylesheet" href="assets/css/green.css">

<link rel="stylesheet" href="assets/css/owl.carousel.css">

<link rel="stylesheet" href="assets/css/owl.transitions.css">

<!--<link rel="stylesheet" href="assets/css/owl.theme.css">-->

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

<link rel="stylesheet" href="assets/css/rateit.css">

<link rel="stylesheet" href="assets/css/bootstrap-select.min.css">

<link rel="stylesheet" href="assets/css/config.css">

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

<link href='http://fonts.googleapis.com/css?family=Roboto:300,400,500,700'
rel='stylesheet' type='text/css'>

</head>

<style>

.product-image:hover div.image img,

14
.product-image:focus div.image img {

transform: scale(1.1);

transition: ease all 0.5s;

.image {

overflow: hidden;

background: #f3f3f3;

.product-image:hover,

.product-image:focus {

box-shadow: 0 0 50px -10px #29a329;

border-bottom: solid #29a329 5px;

Ink wishlist {

position : absolute;

left: 20px;

</style>

<body class="cnt-home">

<header class="header-style-1">

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

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

<?php include('includes/menu-bar.php');?>

</header>

15
<div class="body-content outer-top-xs" id="top-banner-and-menu">

<div class="container">

<div class="product-container homepage-container">

<div class="row">

<div class="col-xs-12 col-sm-12 col-md-10 homebanner-holder">

<div id="hero" class="homepage-slider3">

<div id="owl-main" class="owl-carousel owl-inner-nav owl-ui-sm">

<div class="full-width-slider">

<div class="item full-width-slider" style="background-image:


url(img/sliders/slider1.JPG);">

</div>

</div>

<div class="full-width-slider">

<div class="item full-width-slider" style="background-image:


url(img/sliders/slider2.jpg);">

</div>

</div>

<div class="full-width-slider">

<div class="item full-width-slider" style="background-image:


url(img/sliders/slider3.png);">

</div>

</div>

<div class="full-width-slider">

<div class="item full-width-slider" style="background-image:


url(img/sliders/slider4.JPG);">

16
</div>

</div>

</div>

</div>

<div class="col-xs-12 col-sm-11 col-md-2 sidebar">

<?php include('includes/side-menu.php');?>

</div>

<div class="info-boxes wow fadeInUp">

<div class="info-boxes-inner">

<div class="row">

<div class="col-md-6 col-sm-4 col-lg-4">

<div class="info-box">

<div class="row">

<div class="col-xs-2">

<i class="icon fa fa-dollar"></i>

</div>

<div class="col-xs-10">

<h4 class="info-box-heading green">money back</h4>

</div>

</div>

<h6 class="text">30 Day Money Back Guarantee.</h6>

</div>

</div>

<div class="hidden-md col-sm-4 col-lg-4">

17
<div class="info-box">

<div class="row">

<div class="col-xs-2">

<i class="icon fa fa-truck"></i>

</div>

<div class="col-xs-10">

<h4 class="info-box-heading orange">free shipping</h4>

</div>

</div>

<h6 class="text">free ship-on oder over Rs. 600.00</h6>

</div>

</div>

<div class="col-md-6 col-sm-4 col-lg-4">

<div class="info-box">

<div class="row">

<div class="col-xs-2">

<i class="icon fa fa-gift"></i>

</div>

<div class="col-xs-10">

<h4 class="info-box-heading red">Special Sale</h4>

</div>

</div>

<h6 class="text">All items-sale up to 20% off </h6>

</div>

18
</div>

</div>

</div>

</div>

</div>

</div>

<div id="product-tabs-slider" class="scroll-tabs inner-bottom-vs wow fadeInUp">

<div class="more-info-tab clearfix">

<h3 class="new-product-title pull-left">Featured Products</h3>

<ul class="nav nav-tabs nav-tab-line pull-right" id="new-products-1">

<li class="active"><a href="#all" data-toggle="tab">All</a></li>

<li><a href="#Pc Games" data-toggle="tab">Pc Games</a></li>

<li><a href="#PlayStation" data-toggle="tab">PlayStation</a></li>

</ul><!-- /.nav-tabs -->

</div>

<div class="tab-content outer-top-xs">

<div class="tab-pane in active" id="all">

<div class="product-slider">

<div class="owl-carousel home-owl-carousel custom-carousel owl-theme" data-


item="4">

<?php

$ret=mysqli_query($con,"select * from products");

while ($row=mysqli_fetch_array($ret))

19
{

?>

<div class="col-sm-8">

<div class="item item-carousel">

<div class="products">

<div class="product">

<div class="product-image">

<div class="image" >

<a href="product-details.php?pid=<?php echo htmlentities($row['id']);?>">

<img src="admin/productimages/<?php echo htmlentities($row['id']);?>/<?php echo


htmlentities($row['productImage1']);?>" data-echo="admin/productimages/<?php
echo htmlentities($row['id']);?>/<?php echo htmlentities($row['productImage1']);?>"
width="215" height="240" alt=""></a>

</div>

</div>

<div class="product-info text-center">

<h3 class="name"><a href="product-details.php?pid=<?php echo


htmlentities($row['id']);?>"><?php echo htmlentities($row['productName']);?
></a></h3>

<div class="rating rateit-small"></div>

<div class="description"></div>

<div class="product-price">

<span class="price">

Rs.<?php echo htmlentities($row['productPrice']);?> </span>

<span class="price-before-discount">Rs.<?php echo


htmlentities($row['productPriceBeforeDiscount']);?> </span>

20
</div>

</div>

<?php if($row['productAvailability']=='In Stock'){?>

<div class="action"><a href="index.php?page=product&action=add&id=<?php echo


$row['id']; ?>" class="lnk btn btn-primary"><i class="fa fa-shopping-cart"></i> Add
to Cart</a></div>

<?php } else {?>

<div class="action btn btn-primary" style="color:red; background-color:black;">Out


of Stock</div>

<?php } ?>

</div>

</div>

</div>

</div>

<?php } ?>

</div>

</div>

</div>

<div class="tab-pane" id="books">

<div class="product-slider">

<div class="owl-carousel home-owl-carousel custom-carousel owl-theme">

<?php

$ret=mysqli_query($con,"select * from products where category=3");

while ($row=mysqli_fetch_array($ret))

21
?>

<div class="col-sm-8">

<div class="item item-carousel">

<div class="products">

<div class="product">

<div class="product-image">

<div class="image">

<a href="product-details.php?pid=<?php echo htmlentities($row['id']);?>">

<img src="admin/productimages/<?php echo htmlentities($row['id']);?>/<?php echo


htmlentities($row['productImage1']);?>" data-echo="admin/productimages/<?php
echo htmlentities($row['id']);?>/<?php echo htmlentities($row['productImage1']);?>"
width="215" height="240" alt=""></a>

</div>

</div>

<div class="product-info text-center">

<h3 class="name"><a href="product-details.php?pid=<?php echo


htmlentities($row['id']);?>"><?php echo htmlentities($row['productName']);?
></a></h3>

<div class="rating rateit-small"></div>

<div class="description"></div>

<div class="product-price">

<span class="price">

Rs. <?php echo htmlentities($row['productPrice']);?></span>

<span class="price-before-discount">Rs.<?php echo


htmlentities($row['productPriceBeforeDiscount']);?></span>

</div>

22
</div>

<?php if($row['productAvailability']=='In Stock'){?>

<div class="action"><a href="index.php?page=product&action=add&id=<?php echo


$row['id']; ?>" class="lnk btn btn-primary"><i class="fa fa-shopping-cart"></i> Add
to Cart</a></div>

<?php } else {?>

<div class="action btn btn-primary" style="color:red; background-color:black;">Out


of Stock</div>

<?php } ?>

</div>

</div>

</div>

</div>

<?php } ?>

</div>

</div>

</div>

<div class="tab-pane" id="PlayStation">

<div class="product-slider">

<div class="owl-carousel home-owl-carousel custom-carousel owl-theme">

<?php

$ret=mysqli_query($con,"select * from products where category=5");

while ($row=mysqli_fetch_array($ret))

?>

23
<div class="col-sm-8">

<div class="item item-carousel">

<div class="products">

<div class="product">

<div class="product-image">

<div class="image">

<a href="product-details.php?pid=<?php echo htmlentities($row['id']);?>">

<img src="admin/productimages/<?php echo htmlentities($row['id']);?>/<?php echo


htmlentities($row['productImage1']);?>" data-echo="admin/productimages/<?php
echo htmlentities($row['id']);?>/<?php echo htmlentities($row['productImage1']);?>"
width="215" height="240" alt=""></a>

</div>

</div>

<div class="product-info text-center">

<h3 class="name"><a href="product-details.php?pid=<?php echo


htmlentities($row['id']);?>"><?php echo htmlentities($row['productName']);?
></a></h3>

<div class="rating rateit-small"></div>

<div class="description"></div>

<div class="product-price">

<span class="price">

Rs.<?php echo htmlentities($row['productPrice']);?></span>

<span class="price-before-discount">Rs.<?php echo


htmlentities($row['productPriceBeforeDiscount']);?></span>

</div>

</div>

24
<?php if($row['productAvailability']=='In Stock'){?>

<div class="action"><a href="index.php?page=product&action=add&id=<?php echo


$row['id']; ?>" class="lnk btn btn-primary"><i class="fa fa-shopping-cart"></i> Add
to Cart</a></div>

<?php } else {?>

<div class="action btn btn-primary" style="color:red; background-color:black;">Out


of Stock</div>

<?php } ?>

</div>

</div>

</div>

</div>

<?php } ?>

</div>

</div>

</div>

</div>

</div>

<div class="sections prod-slider-small outer-top-small">

<div class="row">

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

<section class="section">

<h3 class="section-title">Sony PlayStation</h3>

<div class="owl-carousel homepage-owl-carousel custom-carousel outer-top-xs owl-


theme" data-item="2">

25
<?php

$ret=mysqli_query($con,"select * from products where category=1 and


subCategory=0");

while ($row=mysqli_fetch_array($ret))

?>

<div class="col-sm-8">

<div class=" item-carousel">

<div class="products">

<div class="product">

<div class="product-image">

<div class="image">

<a href="product-details.php?pid=<?php echo htmlentities($row['id']);?>"><img


src="admin/productimages/<?php echo htmlentities($row['id']);?>/<?php echo
htmlentities($row['productImage1']);?>" data-echo="admin/productimages/<?php
echo htmlentities($row['id']);?>/<?php echo htmlentities($row['productImage1']);?>"
width="215" height="240"></a>

</div>

</div>

<div class="product-info text-center">

<h3 class="name"><a href="product-details.php?pid=<?php echo


htmlentities($row['id']);?>"><?php echo htmlentities($row['productName']);?
></a></h3>

<div class="rating rateit-small"></div>

<div class="description"></div>

<div class="product-price">

26
<span class="price">

Rs. <?php echo htmlentities($row['productPrice']);?></span>

<span class="price-before-discount">Rs.<?php echo


htmlentities($row['productPriceBeforeDiscount']);?></span>

</div>

</div>

<?php if($row['productAvailability']=='In Stock'){?>

<div class="action"><a href="index.php?page=product&action=add&id=<?php echo


$row['id']; ?>" class="lnk btn btn-primary"><i class="fa fa-shopping-cart"></i> Add
to Cart</a></div>

<?php } else {?>

<div class="action btn btn-primary" style="color:red; background-color:black;">Out


of Stock</div>

<?php } ?>

</div>

</div>

</div>

</div>

<?php }?>

</div>

</section>

</div>

<div class="col-md-6">

<section class="section">

<h3 class="section-title">XBox</h3>

27
<div class="owl-carousel homepage-owl-carousel custom-carousel outer-top-xs owl-
theme" data-item="2">

<?php

$ret=mysqli_query($con,"select * from products where category=4");

while ($row=mysqli_fetch_array($ret))

?>

<div class="col-sm-8">

<div class="item item-carousel">

<div class="products">

<div class="product">

<div class="product-image">

<div class="image">

<a href="product-details.php?pid=<?php echo htmlentities($row['id']);?>"><img


src="admin/productimages/<?php echo htmlentities($row['id']);?>/<?php echo
htmlentities($row['productImage1']);?>" data-echo="admin/productimages/<?php
echo htmlentities($row['id']);?>/<?php echo htmlentities($row['productImage1']);?>"
width="215" height="240"></a>

</div>

</div>

<div class="product-info text-center">

<h3 class="name"><a href="product-details.php?pid=<?php echo


htmlentities($row['id']);?>"><?php echo htmlentities($row['productName']);?
></a></h3>

<div class="rating rateit-small"></div>

28
<div class="description"></div>

<div class="product-price">

<span class="price">

Rs .<?php echo htmlentities($row['productPrice']);?></span>

<span class="price-before-discount">Rs.<?php echo


htmlentities($row['productPriceBeforeDiscount']);?></span>

</div>

</div>

<?php if($row['productAvailability']=='In Stock'){?>

<div class="action"><a href="index.php?page=product&action=add&id=<?php echo


$row['id']; ?>" class="lnk btn btn-primary"><i class="fa fa-shopping-cart"></i> Add
to Cart</a></div>

<?php } else {?>

<div class="action btn btn-primary" style="color:red; background-color:black;">Out


of Stock</div>

<?php } ?>

</div>

</div>

</div>

</div>

<?php }?>

</div>

</section>

</div>

</div>

29
</div>

<section class="section featured-product inner-xs wow fadeInUp">

<h3 class="section-title">HeadPhones</h3>

<div class="owl-carousel best-seller custom-carousel owl-theme outer-top-xs">

<?php

$ret=mysqli_query($con,"select * from products where category=5");

while ($row=mysqli_fetch_array($ret))

?>

<div class="item">

<div class="products">

<div class="product">

<div class="product-micro">

<div class="row product-micro-row">

<div class="col col-xs-5">

<div class="product-image">

<div class="image">

<a href="admin/productimages/<?php echo htmlentities($row['id']);?>/<?php echo


htmlentities($row['productImage1']);?>" data-lightbox="image-1" data-title="<?php
echo htmlentities($row['productName']);?>">

<img data-echo="admin/productimages/<?php echo htmlentities($row['id']);?>/<?php


echo htmlentities($row['productImage1']);?>" width="190" height="180" alt="">

<div class="zoom-overlay"></div>

</a>

</div>

30
</div>

</div>

<div class="col col-xs-6">

<div class="product-info">

<h3 class="name"><a href="product-details.php?pid=<?php echo


htmlentities($row['id']);?>"><?php echo htmlentities($row['productName']);?
></a></h3>

<div class="rating rateit-small"></div>

<div class="product-price">

<span class="price">

Rs. <?php echo htmlentities($row['productPrice']);?>

</span>

</div>

<?php if($row['productAvailability']=='In Stock'){?>

<div class="action"><a href="index.php?page=product&action=add&id=<?php echo


$row['id']; ?>" class="lnk btn btn-primary"><i class="fa fa-shopping-cart"></i> Add
to Cart</a></div>

<?php } else {?>

<div class="action btn btn-primary" style="color:red; background-color:black;">Out


of Stock</div>

<?php } ?>

</div>

</div>

</div>

</div>

</div>

31
</div>

</div><?php } ?>

</div>

</section>

</div>

</div>

<?php include('includes/brands-slider.php');?>

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

<br>

<script src="assets/js/jquery-1.11.1.min.js"></script>

<script src="assets/js/bootstrap.min.js"></script>

<script src="assets/js/bootstrap-hover-dropdown.min.js"></script>

<script src="assets/js/owl.carousel.min.js"></script>

<script src="assets/js/echo.min.js"></script>

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

<script src="assets/js/bootstrap-slider.min.js"></script>

<script src="assets/js/jquery.rateit.min.js"></script>

<script type="text/javascript" src="assets/js/lightbox.min.js"></script>

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

<script src="assets/js/wow.min.js"></script>

<script src="assets/js/scripts.js"></script>

<script src="switchstylesheet/switchstylesheet.js"></script>

</body>

</html>

32
Home Page: Fig1

LOGIN AND SIGN IN

<?php

session_start();

error_reporting(0);

include('includes/config.php');

// Code user Registration

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

$name=$_POST['fullname'];

$email=$_POST['emailid'];

$contactno=$_POST['contactno'];

$password=md5($_POST['password']);

$query=mysqli_query($con,"insert into users(name,email,contactno,password)


values('$name','$email','$contactno','$password')");

if($query)

33
{

echo "<script>alert('You are successfully register');</script>";

else{

echo "<script>alert('Not register something went worng');</script>";

// Code for User login

if(isset($_POST['login']))

$email=$_POST['email'];

$password=md5($_POST['password']);

$query=mysqli_query($con,"SELECT * FROM users WHERE email='$email' and


password='$password'");

$num=mysqli_fetch_array($query);

if($num>0)

$extra="index.php";

$_SESSION['login']=$_POST['email'];

$_SESSION['id']=$num['id'];

$_SESSION['username']=$num['name'];

$uip=$_SERVER['REMOTE_ADDR'];

$status=1;

$log=mysqli_query($con,"insert into userlog(userEmail,userid,status) values('".


$_SESSION['login']."','".$_SESSION['id']."','$status')");

34
$host=$_SERVER['HTTP_HOST'];

$uri=rtrim(dirname($_SERVER['PHP_SELF']),'/\\');

header("location:http://$host$uri/$extra");

exit();

else

$extra="login.php";

$email=$_POST['email'];

$uip=$_SERVER['REMOTE_ADDR'];

$status=0;

$log=mysqli_query($con,"insert into userlog(userEmail,userid,status)


values('$email','".$_SESSION['id']."','$status')");

$host = $_SERVER['HTTP_HOST'];

$uri = rtrim(dirname($_SERVER['PHP_SELF']),'/\\');

header("location:http://$host$uri/$extra");

$_SESSION['errmsg']="Invalid email id or Password";

exit();

?>

<!DOCTYPE html>

<html lang="en">

35
<head>

<title>Phoenix Gaming | Signi-in | Signup</title>

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

<link rel="stylesheet" href="assets/css/main.css">

<link rel="stylesheet" href="assets/css/green.css">

<link rel="stylesheet" href="assets/css/owl.carousel.css">

<link rel="stylesheet" href="assets/css/owl.transitions.css">

<!--<link rel="stylesheet" href="assets/css/owl.theme.css">-->

<link href="assets/css/lightbox.css" rel="stylesheet">

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

<link rel="stylesheet" href="assets/css/rateit.css">

<link rel="stylesheet" href="assets/css/bootstrap-selecmin.css">

<link rel="stylesheet" href="assets/css/config.css">

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

<link href='http://fonts.googleapis.com/css?family=Roboto:300,400,500,700'
rel='stylesheet' type='text/css'>

<script type="text/javascript">

function valid()

if(document.register.password.value!= document.register.confirmpassword.value)

alert("Password and Confirm Password Field do not match !!");

document.register.confirmpassword.focus();

return false;

36
return true;

</script>

<script>

function userAvailability() {

$("#loaderIcon").show();

jQuery.ajax({

url: "check_availability.php",

data:'email='+$("#email").val(),

type: "POST",

success:function(data){

$("#user-availability-status1").html(data);

$("#loaderIcon").hide();

},

error:function (){}

});

</script>

</head>

<body class="cnt-home">

<header class="header-style-1">

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

<?php include('includes/menu-bar.php');?>

37
<?php include('includes/top-header.php');?>

</header>

<div class="body-content outer-top-xs">

<div class="container">

<div class="breadcrumb">

<div class="container">

<div class="breadcrumb-inner">

<ul class="list-inline list-unstyled">

<li><a href="index.php">Home</a></li>

<li><a class='active' href="login.php">Authentication</a></li>

</ul>

</div>

</div>

</div>

<div class="sign-in-page inner-bottom-sm">

<div class="row">

<!-- Sign-in -->

<div class="col-md-5 col-sm-6 sign-in inner-left-xs">

<h4 class="">Sign In</h4>

<p class="">Hello, Welcome to your account.</p>

<form class="register-form outer-top-xs" method="post">

<span style="color:red;" >

<?php

echo htmlentities($_SESSION['errmsg']);

38
?>

<?php

echo htmlentities($_SESSION['errmsg']="");

?>

</span>

<div class="form-group">

<label class="info-title" for="exampleInputEmail1">Email Address


<span>*</span></label>

<input type="email" name="email" class="form-control unicase-form-control text-


input" id="exampleInputEmail1" >

</div>

<div class="form-group">

<label class="info-title" for="exampleInputPassword1">Password


<span>*</span></label>

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


text-input" id="exampleInputPassword1" >

</div>

<div class="radio outer-xs">

<a href="forgot-password.php" class="forgot-password pull-left">Forgot your


Password?</a>

</div>

<button type="submit" class="btn-upper btn btn-primary checkout-page-button"


name="login">Login</button>

</form>

</div>

<!-- Sign-in -->

39
<!-- create a new account -->

<div class="col-md-5 col-sm-6 create-new-account pull-right">

<h4 class="checkout-subtitle">create a new account</h4>

<p class="text title-tag-line">Create your own Shopping account.</p>

<form class="register-form outer-top-xs" role="form" method="post"


name="register" onSubmit="return valid();">

<div class="form-group">

<label class="info-title" for="fullname">Full Name <span>*</span></label>

<input type="text" class="form-control unicase-form-control text-input"


id="fullname" name="fullname" required="required">

</div>

<div class="form-group">

<label class="info-title" for="exampleInputEmail2">Email Address


<span>*</span></label>

<input type="email" class="form-control unicase-form-control text-input" id="email"


onBlur="userAvailability()" name="emailid" required >

<span id="user-availability-status1" style="font-size:12px;"></span>

</div>

<div class="form-group">

<label class="info-title" for="contactno">Contact No. <span>*</span></label>

<input type="text" class="form-control unicase-form-control text-input"


id="contactno" name="contactno" maxlength="10" required >

</div>

<div class="form-group">

<label class="info-title" for="password">Password. <span>*</span></label>

40
<input type="password" class="form-control unicase-form-control text-input"
id="password" name="password" required >

</div>

<div class="form-group">

<label class="info-title" for="confirmpassword">Confirm Password.


<span>*</span></label>

<input type="password" class="form-control unicase-form-control text-input"


id="confirmpassword" name="confirmpassword" required >

</div>

<button type="submit" name="submit" class="btn-upper btn btn-primary checkout-


page-button" id="submit">Sign Up</button>

</form>

<span class="checkout-subtitle outer-top-xs">Sign Up Today And You'll Be Able


To : </span>

<div class="checkbox">

<label class="checkbox">

Speed your way through the checkout.

</label>

<label class="checkbox">

Track your orders easily.

</label>

<label class="checkbox">

Keep a record of all your purchases.

</label>

</div>

</div><!-- create a new account -->

41
</div>

</div>

<?php include('includes/brands-slider.php');?>

</div>

</div>

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

<script src="assets/js/jquery-1.11.1.min.js"></script>

<script src="assets/js/bootstrap.min.js"></script>

<script src="assets/js/bootstrap-hover-dropdown.min.js"></script>

<script src="assets/js/owl.carousel.min.js"></script>

<script src="assets/js/echo.min.js"></script>

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

<script src="assets/js/bootstrap-slider.min.js"></script>

<script src="assets/js/jquery.rateit.min.js"></script>

<script type="text/javascript" src="assets/js/lightbox.min.js"></script>

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

<script src="assets/js/wow.min.js"></script>

<script src="assets/js/scripts.js"></script>

<script src="switchstylesheet/switchstylesheet.js"></script>

</body>

</html>

42
Sign in and Create Account Page: Fig 2

PRODUCT CATEGORY

<?php

session_start();

error_reporting(0);

include('includes/config.php');

$cid=intval($_GET['cid']);

if(isset($_GET['action']) && $_GET['action']=="add"){

$id=intval($_GET['id']);

if(isset($_SESSION['cart'][$id])){

$_SESSION['cart'][$id]['quantity']++;

}else{

$sql_p="SELECT * FROM products WHERE id={$id}";

$query_p=mysqli_query($con,$sql_p);

43
if(mysqli_num_rows($query_p)!=0){

$row_p=mysqli_fetch_array($query_p);

$_SESSION['cart'][$row_p['id']]=array("quantity" => 1, "price" =>


$row_p['productPrice']);

if(strlen($_SESSION['login'])==0)

header('location:login.php');

else

mysqli_query($con,"insert into cart(userId,productId) values('".$_SESSION['id']."','".


$id."')");

echo "<script>alert('Product has been added to the cart')</script>";

// COde for Wishlist

if(isset($_GET['pid']) && $_GET['action']=="wishlist" ){

if(strlen($_SESSION['login'])==0)

header('location:login.php');

else

44
mysqli_query($con,"insert into wishlist(userId,productId) values('".
$_SESSION['id']."','".$_GET['pid']."')");

echo "<script>alert('Product added in wishlist');</script>";

header('location:my-wishlist.php');

?>

<!DOCTYPE html>

<html lang="en">

<head>

<title>Product Category</title>

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

<link rel="stylesheet" href="assets/css/main.css">

<link rel="stylesheet" href="assets/css/green.css">

<link rel="stylesheet" href="assets/css/owl.carousel.css">

<link rel="stylesheet" href="assets/css/owl.transitions.css">

<!--<link rel="stylesheet" href="assets/css/owl.theme.css">-->

<link href="assets/css/lightbox.css" rel="stylesheet">

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

<link rel="stylesheet" href="assets/css/rateit.css">

<link rel="stylesheet" href="assets/css/bootstrap-select.min.css">

<link rel="stylesheet" href="assets/css/config.css">

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

<link href='http://fonts.googleapis.com/css?family=Roboto:300,400,500,700'
rel='stylesheet' type='text/css'>

45
<script src="assets/js/html5shiv.js"></script>

<script src="assets/js/respond.min.js"></script>

</head>

<header class="header-style-1">

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

<?php include('includes/menu-bar.php');?>

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

</header>

<body class="cnt-home">

<div class="body-content outer-top-xs">

<div class='container' >

<div class='row outer-bottom-sm'>

<div class='col-md-2 sidebar'>

<div class="side-menu animate-dropdown outer-bottom-xs">

<div class="head"><i class="icon fa fa-align-justify fa-fw"></i>Sub


Categories</div>

<nav class="yamm megamenu-horizontal" role="navigation">

<ul class="nav">

<li class="dropdown menu-item">

<?php $sql=mysqli_query($con,"select id,subcategory from subcategory where


categoryid='$cid'");

while($row=mysqli_fetch_array($sql))

?>

46
<a href="sub-category.php?scid=<?php echo $row['id'];?>" class="dropdown-
toggle">

<?php echo $row['subcategory'];?></a>

<?php }?>

</li>

</ul>

</nav>

</div>

<div class="sidebar-module-container">

<h3 class="section-title">Shop by</h3>

<div class="sidebar-filter">

<div class="sidebar-widget wow fadeInUp outer-bottom-xs ">

<div class="widget-header m-t-20">

<h4 class="widget-title">Category</h4>

</div>

<div class="sidebar-widget-body m-t-10">

<?php $sql=mysqli_query($con,"select id,categoryName from category");

while($row=mysqli_fetch_array($sql))

?>

<div class="accordion">

<div class="accordion-group">

<div class="accordion-heading">

<a href="category.php?cid=<?php echo $row['id'];?>" class="accordion-toggle


collapsed">

47
<?php echo $row['categoryName'];?>

</a>

</div>

</div>

</div>

<?php } ?>

</div>

</div>

</div>

</div>

</div>

<div class='col-md-9'>

<div id="category" class="category-carousel hidden-xs">

<div class="item">

<div class="container-fluid">

<div class="caption vertical-top text-center">

<?php $sql=mysqli_query($con,"select categoryName from category where


id='$cid'");

while($row=mysqli_fetch_array($sql))

?>

<div class="excerpt hidden-sm hidden-md" >

<?php echo htmlentities($row['categoryName']);?>

</div>

<?php } ?>

48
</div>

</div>

</div>

</div>

<div class="search-result-container">

<div id="myTabContent" class="tab-content">

<div class="tab-pane active " id="grid-container">

<div class="category-product inner-top-vs">

<div class="row">

<?php

$ret=mysqli_query($con,"select * from products where category='$cid'");

$num=mysqli_num_rows($ret);

if($num>0)

while ($row=mysqli_fetch_array($ret))

{?>

<div class="col-lg-4 ">

<div class="products">

<div class="product">

<div class="product-image">

<div class="image">

<a href="product-details.php?pid=<?php echo htmlentities($row['id']);?>"><img


src="assets/images/blank.gif" data-echo="admin/productimages/<?php echo
htmlentities($row['id']);?>/<?php echo htmlentities($row['productImage1']);?>" alt=""
width="340" height="400"></a>

49
</div>

</div>

<div class="product-info text-center">

<h3 class="name" style="font-size:20px;"><a href="product-details.php?pid=<?php


echo htmlentities($row['id']);?>"><?php echo htmlentities($row['productName']);?
></a></h3>

<div class="rating rateit-small"></div>

<div class="description"></div>

<div class="product-price">

<span class="price">

Rs. <?php echo htmlentities($row['productPrice']);?></span>

<span class="price-before-discount">Rs. <?php echo


htmlentities($row['productPriceBeforeDiscount']);?></span>

</div>

</div>

<div class="cart clearfix animate-effect">

<div class="action text-center">

<ul class="list-unstyled">

<li class="add-cart-button btn-group">

<a class="btn btn-primary icon" href="category.php?pid=<?php echo


htmlentities($row['id'])?>&&action=wishlist" title="Wishlist">

<i class="icon fa fa-heart" style="color:red;"></i>

</a>

<?php if($row['productAvailability']=='In Stock'){?>

50
</button>

<a href="category.php?page=product&action=add&id=<?php echo $row['id']; ?>


pid=<?php echo htmlentities($row['id'])?>"title="cart">

<button class="btn btn-primary" type="button"> <i class="fa fa-shopping-cart"></i>


Add to cart</button> </a>

<?php } else {?>

<div class="btn btn-primary" style="color:red; background:black;">Out of


Stock</div>

<?php } ?>

</li>

</ul>

</div>

</div>

</div>

</div>

</div>

<?php } } else {?>

<script type='text/javascript'> document.location ='my-cart.php'; </script>";

<?php } ?>

</div>

</div>

</div>

</div>

</div>

</div></div>

51
<?php include('includes/brands-slider.php');?>

<br>

</br>

</div></div>

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

<script src="assets/js/jquery-1.11.1.min.js"></script>

<script src="assets/js/bootstrap.min.js"></script>

<script src="assets/js/bootstrap-hover-dropdown.min.js"></script>

<script src="assets/js/owl.carousel.min.js"></script>

<script src="assets/js/echo.min.js"></script>

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

<script src="assets/js/bootstrap-slider.min.js"></script>

<script src="assets/js/jquery.rateit.min.js"></script>

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

<script src="assets/js/wow.min.js"></script>

<script src="assets/js/scripts.js"></script>

<script src="switchstylesheet/switchstylesheet.js"></script>

</body>

</html>

52
Product Category Page: Fig 4

PRODUCT DETAIL

<?php

session_start();

error_reporting(0);

include('includes/config.php');

$cid=intval($_GET['cid']);

if(isset($_GET['action']) && $_GET['action']=="add"){

$id=intval($_GET['id']);

if(isset($_SESSION['cart'][$id])){

$_SESSION['cart'][$id]['quantity']++;

}else{

$sql_p="SELECT * FROM products WHERE id={$id}";

$query_p=mysqli_query($con,$sql_p);

53
if(mysqli_num_rows($query_p)!=0){

$row_p=mysqli_fetch_array($query_p);

$_SESSION['cart'][$row_p['id']]=array("quantity" => 1, "price" =>


$row_p['productPrice']);

echo "<script>alert('Product has been added to the cart')</script>";

echo "<script type='text/javascript'> document.location ='my-cart.php'; </script>";

}else{

$message="Product ID is invalid";

$pid=intval($_GET['pid']);

if(isset($_GET['pid']) && $_GET['action']=="wishlist" ){

if(strlen($_SESSION['login'])==0)

header('location:login.php');

else

mysqli_query($con,"insert into wishlist(userId,productId) values('".


$_SESSION['id']."','$pid')");

echo "<script>alert('Product added in wishlist');</script>";

header('location:my-wishlist.php');

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

$qty=$_POST['quality'];

$price=$_POST['price'];

$value=$_POST['value'];

$name=$_POST['name'];

$summary=$_POST['summary'];

$review=$_POST['review'];

mysqli_query($con,"insert into
productreviews(productId,quality,price,value,name,summary,review)
values('$pid','$qty','$price','$value','$name','$summary','$review')");

?>

<!DOCTYPE html>

<html lang="en">

<head>

<title>Product Details</title>

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

<link rel="stylesheet" href="assets/css/main.css">

<script src="https://kit.fontawesome.com/e4b9747d10.js"
crossorigin="anonymous"></script>

<link rel="stylesheet" href="assets/css/green.css">

<link rel="stylesheet" href="assets/css/owl.carousel.css">

<link rel="stylesheet" href="assets/css/owl.transitions.css">

<link href="assets/css/lightbox.css" rel="stylesheet">

55
<link rel="stylesheet" href="assets/css/animate.min.css">

<link rel="stylesheet" href="assets/css/rateit.css">

<link rel="stylesheet" href="assets/css/bootstrap-select.min.css">

<link rel="stylesheet" href="assets/css/config.css">

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

<link href='http://fonts.googleapis.com/css?family=Roboto:300,400,500,700'
rel='stylesheet' type='text/css'>

</head>

<header class="header-style-1">

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

<?php include('includes/menu-bar.php');?>

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

</header>

<body class="cnt-home">

<div class="body-content outer-top-sm">

<div class='container'>

<div class='row single-product outer-bottom-sm '>

<div class='col-md-2 sidebar'>

<div class="sidebar-module-container">

<div class="sidebar-widget outer-bottom-xs wow fadeInUp">

<h3 class="section-title">Category</h3>

<div class="sidebar-widget-body m-t-10">

<div class="accordion">

<?php $sql=mysqli_query($con,"select id,categoryName from category");

while($row=mysqli_fetch_array($sql))

56
{

?>

<div class="accordion-group">

<div class="accordion-heading">

<a href="category.php?cid=<?php echo $row['id'];?>" class="accordion-toggle


collapsed">

<?php echo $row['categoryName'];?>

</a>

</div>

</div>

<?php } ?>

</div>

</div>

</div>

<div class="sidebar-widget hot-deals wow fadeInUp">

<h3 class="section-title">hot deals</h3>

<div class="owl-carousel sidebar-carousel custom-carousel owl-theme outer-top-xs">

<?php

$ret=mysqli_query($con,"select * from products order by rand() limit 1 ");

while ($rws=mysqli_fetch_array($ret)) {

?>

<div class="item">

<div class="products">

<div class="hot-deal-wrapper">

<div class="image">

57
<img src="admin/productimages/<?php echo htmlentities($rws['id']);?>/<?php echo
htmlentities($rws['productImage1']);?>" width="200" height="334" alt="">

</div>

</div>

<div class="product-info text-left m-t-20">

<h5 class="name"><a href="product-details.php?pid=<?php echo


htmlentities($rws['id']);?>"><?php echo htmlentities($rws['productName']);?
></a></h5>

<br>

<div class="rating rateit-small"></div>

<div class="product-price">

<span class="price">&#8377; <?php echo htmlentities($rws['productPrice']);?>.00

</span>

<span class="price-before-discount">&#8377;<?php echo


htmlentities($rws['productPriceBeforeDiscount']);?>.00</span>

</div></div>

</div>

</div>

<?php } ?>

</div></div>

</div>

</div>

<?php

$ret=mysqli_query($con,"select * from products where id='$pid'");

$num=mysqli_num_rows($ret);

58
if($num>0)

while($row=mysqli_fetch_array($ret))

{?>

<div class='col-md-7'>

<div class="row wow fadeInUp">

<div class="col-xs-12 col-sm-6 col-md-5 gallery-holder">

<div class="product-item-holder size-big single-product-gallery small-gallery">

<div id="owl-single-product">

<div class="" id="slide1">

<a data-lightbox="image-1" data-title="<?php echo


htmlentities($row['productName']);?>" href="admin/productimages/<?php echo
htmlentities($row['id']);?>/<?php echo htmlentities($row['productImage1']);?>">

<img class="" alt="" src="assets/images/blank.gif" data-


echo="admin/productimages/<?php echo htmlentities($row['id']);?>/<?php echo
htmlentities($row['productImage1']);?>" width="300" height="250" />

</a>

</div>

<div class="" id="slide1">

<a data-lightbox="image-1" data-title="<?php echo


htmlentities($row['productName']);?>" href="admin/productimages/<?php echo
htmlentities($row['id']);?>/<?php echo htmlentities($row['productImage1']);?>" >

<img class="" alt="" src="assets/images/blank.gif" data-


echo="admin/productimages/<?php echo htmlentities($row['id']);?>/<?php echo
htmlentities($row['productImage1']);?>" width="300" height="250" />

</a>

</div>

59
<div class="" id="slide2">

<a data-lightbox="image-1" data-title="Gallery" href="admin/productimages/<?php


echo htmlentities($row['id']);?>/<?php echo htmlentities($row['productImage2']);?
>">

<img class="img-responsive" alt="" src="assets/images/blank.gif" data-


echo="admin/productimages/<?php echo htmlentities($row['id']);?>/<?php echo
htmlentities($row['productImage2']);?>" />

</a>

</div>

<div class="" id="slide3">

<a data-lightbox="image-1" data-title="Gallery" href="admin/productimages/<?php


echo htmlentities($row['id']);?>/<?php echo htmlentities($row['productImage3']);?
>">

<img class="img-responsive" alt="" src="assets/images/blank.gif" data-


echo="admin/productimages/<?php echo htmlentities($row['id']);?>/<?php echo
htmlentities($row['productImage3']);?>" />

</a>

</div>

</div>

<div class="single-product-gallery-thumbs gallery-thumbs">

<div id="owl-single-product-thumbnails">

<div class="item">

<a class="horizontal-thumb active" data-target="#owl-single-product" data-slide="1"


href="#slide1">

<img class="img-responsive" width="100" height="100" alt=""


src="assets/images/blank.gif" data-echo="admin/productimages/<?php echo
htmlentities($row['id']);?>/<?php echo htmlentities($row['productImage1']);?>" />

60
</a>

</div>

<div class="item">

<a class="horizontal-thumb" data-target="#owl-single-product" data-slide="2"


href="#slide2">

<img class="img-responsive" width="100" height="100" alt=""


src="assets/images/blank.gif" data-echo="admin/productimages/<?php echo
htmlentities($row['id']);?>/<?php echo htmlentities($row['productImage2']);?>"/>

</a>

</div>

<div class="item">

<a class="horizontal-thumb" data-target="#owl-single-product" data-slide="3"


href="#slide3">

<img class="img-responsive" width="100" height="100" alt=""


src="assets/images/blank.gif" data-echo="admin/productimages/<?php echo
htmlentities($row['id']);?>/<?php echo htmlentities($row['productImage3']);?>" />

</a>

</div>

</div>

</div>

</div>

</div>

<div class="col-sm-6 col-md-7 product-info-block">

<div class="product-info">

<h1 class="name" ><?php echo htmlentities($row['productName']);?></h1>

61
<a class="heart" data-toggle="tooltip" data-placement="right" title="Wishlist"
href="product-details.php?pid=<?php echo htmlentities($row['id'])?
>&&action=wishlist">

<i class="fa fa-heart">Add to wishlist</i>

</a>

<?php $rt=mysqli_query($con,"select * from productreviews where


productId='$pid'");

$num=mysqli_num_rows($rt);

{?>

<div class="rating-reviews m-t-20">

<div class="row">

<div class="col-sm-3">

<div class="rating rateit-small"></div>

</div>

<div class="col-sm-8">

<div class="reviews">

<a href="#" class="lnk">(<?php echo htmlentities($num);?> Reviews)</a>

</div>

</div>

</div></div>

<?php } ?>

<div class="stock-container info-container m-t-10">

<div class="row">

<div class="col-sm-3">

<div class="stock-box">

62
<span class="label">Product Brand :</span>

</div>

</div>

<div class="col-sm-9">

<div class="stock-box">

<span class="value"><?php echo htmlentities($row['productCompany']);?></span>

</div>

</div>

</div>

</div>

<div class="stock-container info-container m-t-10">

<div class="row">

<div class="col-sm-3">

<div class="stock-box">

<span class="label">Availability :</span>

</div>

</div>

<div class="col-sm-9">

<div class="stock-box">

<span class="value" style="color:#29a329;"> &#10003;<?php echo


htmlentities($row['productAvailability']);?></span>

</div>

</div>

</div></div>

<div class="stock-container info-container m-t-10">

63
<div class="row">

<div class="col-sm-4">

<div class="stock-box">

<span class="label">Shipping Charge :</span>

</div>

</div>

<div class="col-sm-15">

<div class="stock-box">

<span class="value"><?php if($row['shippingCharge']==0)

echo "Free";

else

echo htmlentities($row['shippingCharge']);

?></span>

</div>

</div>

</div></div>

<div class="price-container info-container m-t-20">

<div class="row">

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

<div class="price-box">

64
<span class="price" style="color:black;">&#8377;<?php echo
htmlentities($row['productPrice']);?></span>

&ensp;

<b style="font-size:20px; font-weight:100;">MRP</b> <span class="price-


strike">&#8377;<?php echo htmlentities($row['productPriceBeforeDiscount']);?
></span>

</div>

</div>

</div>

</div>

<div class="quantity-container info-container">

<div class="row">

<div class="col-sm-7">

<?php if($row['productAvailability']=='In Stock'){?>

<a href="product-details.php?page=product&action=add&id=<?php echo


$row['id']; ?>" class="btn btn-primary"><i class="fa fa-shopping-cart inner-right-
vs"></i> Add to cart</a>

<?php } else {?>

<div class="btn btn-primary" style="color:red; background:black;">Out of


Stock</div>

<?php } ?>

</div>

</div>

</div>

<div class="product-social-link m-t-20 text-right">

<span class="social-label">Share :</span>

65
<div class="social-icons">

<ul class="list-inline">

<li><a class="fa fa-facebook" href="http://facebook.com/transvelo"></a></li>

<li><a class="fa fa-twitter" href="#"></a></li>

</ul>

</div>

</div>

</div></div>

</div>

<div class="product-tabs inner-bottom-xs wow fadeInUp">

<div class="row">

<div class="col-sm-3">

<ul id="product-tabs" class="nav nav-tabs nav-tab-cell">

<li class="active"><a data-toggle="tab"


href="#description">DESCRIPTION</a></li>

<li><a data-toggle="tab" href="#review">Product&Details</a></li>

</ul>

</div>

<div class="col-sm-9">

<div class="tab-content">

<div id="description" class="tab-pane in active">

<div class="product-tab">

<p class="text"><?php echo $row['productDescription'];?></p>

</div>

</div>

66
<div id="review" class="tab-pane">

<div class="product-tab">

<div class="product-reviews">

<p class="text"><?php echo $row['productDetail'];?></p>

</div>

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

</div></div>

</div>

<?php $cid=$row['category'];

$subcid=$row['subCategory']; ?>

<section class="section featured-product wow fadeInUp" >

<h3 class="section-title" >Realted Products </h3>

<div class="owl-carousel home-owl-carousel upsell-product custom-carousel owl-


theme outer-top-xs" >

<?php

$qry=mysqli_query($con,"select * from products where subCategory='$subcid' and


category='$cid'");

while($rw=mysqli_fetch_array($qry))

{?>

<div class="item item-carousel" >

<div class="products">

<div class="product">

<div class="product-image">

<div class="image">

67
<a href="product-details.php?pid=<?php echo htmlentities($rw['id']);?>"><img
src="assets/images/blank.gif" data-echo="admin/productimages/<?php echo
htmlentities($rw['id']);?>/<?php echo htmlentities($rw['productImage1']);?>"
width="200" height="240" alt=""></a>

</div>

</div>

<div class="product-info text-center">

<h3 class="name" style="font-size:20px;"><a href="product-details.php?pid=<?php


echo htmlentities($rw['id']);?>"><?php echo htmlentities($rw['productName']);?
></a></h3>

<div class="rating rateit-small"></div>

<div class="description"></div>

<div class="product-price">

<span class="price">

&#8377;<?php echo htmlentities($rw['productPrice']);?>.00</span>

<span class="price-before-discount">&#8377; <?php echo


htmlentities($rw['productPriceBeforeDiscount']);?>.00</span>

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

</div></div>

<?php } ?>

</div>

</section>

</div></div>

</div>

<?php }} else {?>

<script type='text/javascript'> document.location ='my-cart.php'; </script>";

68
<?php } ?>

</div></div>

</div></div>

</div>

<br>

</br>

<?php include('includes/brands-slider.php');?>

<script src="assets/js/jquery-1.11.1.min.js"></script>

<script src="assets/js/bootstrap.min.js"></script>

<script src="assets/js/bootstrap-hover-dropdown.min.js"></script>

<script src="assets/js/owl.carousel.min.js"></script>

<script src="assets/js/echo.min.js"></script>

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

<script src="assets/js/bootstrap-slider.min.js"></script>

<script src="assets/js/jquery.rateit.min.js"></script>

<script type="text/javascript" src="assets/js/lightbox.min.js"></script>

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

<script src="assets/js/wow.min.js"></script>

<script src="assets/js/scripts.js"></script>

<script src="switchstylesheet/switchstylesheet.js"></script>

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

</body>

</html>

69
Product Detail Fig.5

CART

<?php

session_start();

error_reporting(0);

include('includes/config.php');

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

if(!empty($_SESSION['cart'])){

foreach($_POST['quantity'] as $key => $val){

if($val==0){

unset($_SESSION['cart'][$key]);

}else{

$_SESSION['cart'][$key]['quantity']=$val;

mysqli_query ($con, "UPDATE cart set qty=3 WHERE productId='".


$_SESSION['cart']."'");

70
}

echo "<script>alert('Your Cart has been Updated');</script>";

// Code for Remove a Product from Cart

if(isset($_POST['remove_code']))

if(!empty($_SESSION['cart'])){

foreach($_POST['remove_code'] as $key){

unset($_SESSION['cart'][$key]);

echo "<script>alert('Product remove from cart');</script>";

// code for insert product in order table

if(isset($_POST['ordersubmit']))

if(strlen($_SESSION['login'])==0)

header('location:login.php');

else{

$quantity=$_POST['quantity'];

71
$pdd=$_SESSION['pid'];

$value=array_combine($pdd,$quantity);

foreach($value as $qty=> $val34){

mysqli_query($con,"insert into orders(userId,productId,quantity) values('".


$_SESSION['id']."','$qty','$val34')");

mysqli_query($con,"delete from cart where productId= $qty");

header('location:payment-method.php');

// code for billing address updation

if(isset($_POST['update']))

$baddress=$_POST['billingaddress'];

$bstate=$_POST['bilingstate'];

$bcity=$_POST['billingcity'];

$bpincode=$_POST['billingpincode'];

$query=mysqli_query($con,"update users set


billingAddress='$baddress',billingState='$bstate',billingCity='$bcity',billingPincode='
$bpincode' where id='".$_SESSION['id']."'");

if($query)

echo "<script>alert('Billing Address has been updated');</script>";

72
// code for Shipping address updation

if(isset($_POST['shipupdate']))

$saddress=$_POST['shippingaddress'];

$sstate=$_POST['shippingstate'];

$scity=$_POST['shippingcity'];

$spincode=$_POST['shippingpincode'];

$query=mysqli_query($con,"update users set


shippingAddress='$saddress',shippingState='$sstate',shippingCity='$scity',shippingPi
ncode='$spincode' where id='".$_SESSION['id']."'");

if($query)

echo "<script>alert('Shipping Address has been updated');</script>";

}?>

<!DOCTYPE html>

<html lang="en">

<head>

<title>My Cart</title>

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

<link rel="stylesheet" href="assets/css/main.css">

<link rel="stylesheet" href="assets/css/green.css">

<link rel="stylesheet" href="assets/css/owl.carousel.css">

<link rel="stylesheet" href="assets/css/owl.transitions.css">

<!--<link rel="stylesheet" href="assets/css/owl.theme.css">-->

73
<link href="assets/css/lightbox.css" rel="stylesheet">

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

<link rel="stylesheet" href="assets/css/rateit.css">

<link rel="stylesheet" href="assets/css/bootstrap-select.min.css">

<link rel="stylesheet" href="assets/css/config.css">

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

<link href='http://fonts.googleapis.com/css?family=Roboto:300,400,500,700'
rel='stylesheet' type='text/css'>

</head>

<body class="cnt-home">

<header class="header-style-1">

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

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

<?php include('includes/menu-bar.php');?>

</header>

<div class="body-content">

<div class="container">

<div class="breadcrumb">

<div class="container">

<div class="breadcrumb-inner">

<ul class="list-inline list-unstyled">

<li><a href="index.php">Home</a></li>

<li><a class='active' href="my-cart.php">Shopping Cart</a></li>

</ul>

</div></div>

74
</div>

<div class="row inner-bottom-sm">

<div class="shopping-cart">

<div class="col-md-12 col-sm-12 shopping-cart-table ">

<div class="cart-title"> Shopping Cart</div>

<div class="table-responsive">

<form name="cart" method="post">

<input type="submit" name="submit" value="Refresh" class="btn btn-upper btn-


primary pull-right outer-right-xs outer-bottom-small">

<table class="table table-bordered">

<thead>

<tr>

<th class="cart-romove item">Remove</th>

<th class="cart-product-name item">Product Name</th>

<th class="cart-stock item">Avalability</th>

<th class="cart-qty item">Quantity</th>

<th class="cart-sub-total item">Price Per unit</th>

<th class="cart-sub-total item">Save</th>

<th class="cart-total last-item">total price</th>

</tr>

</thead> <tfoot>

<tr>

<td colspan="7">

<div class="shopping-cart-btn">

<span class="">

75
<a href="index.php" class="btn btn-upper btn-primary outer-left-xs">Continue
Shopping</a>

</span>

</div>

</td>

</tr>

</tfoot>

<tbody>

<?php

if(!empty($_SESSION['cart'])){

?>

<?php

$pdtid=array();

$sql = "SELECT * FROM products WHERE id IN(";

foreach($_SESSION['cart'] as $id => $value){

$sql .=$id. ",";

$sql=substr($sql,0,-1) . ") ORDER BY id ASC";

$query = mysqli_query($con,$sql);

$totalprice=0;

$totalqunty=0;

if(!empty($query)){

while($row = mysqli_fetch_array($query)){

$quantity=$_SESSION['cart'][$row['id']]['quantity'];

$subtotal= $_SESSION['cart'][$row['id']]['quantity']*$row['productPrice'];

76
$totalprice = $totalprice + $subtotal+$row['shippingCharge'];

$_SESSION['qnty']=$totalqunty+=$quantity;

array_push($pdtid,$row['id']);

//print_r($_SESSION['pid'])=$pdtid;exit;

?>

<tr>

<td class="romove-item"><input type="checkbox" name="remove_code[]"


value="<?php echo htmlentities($row['id']);?>" /></td>

<td class="cart-product-name-info">

<a class="entry-thumbnail pull-left" href="product-details.php?pid=<?php echo


htmlentities($pd=$row['id']);?>"">

<img src="admin/productimages/<?php echo $row['id'];?>/<?php echo


$row['productImage1'];?>" alt="" width="114" height="146">

</a>

<div class="cart-product pull-left">

<h4 class='cart-product-description' style="color:black; font-size:20px;"><a


href="product-details.php?pid=<?php echo htmlentities($pd=$row['id']);?>" ><?php
echo $row['productName'];

$_SESSION['sid']=$pd;

?></a>

<div class="row">

<div class="col-sm-4">

<div class="rating rateit-small"></div>

</div>

<div class="col-sm-9">

77
<?php $rt=mysqli_query($con,"select * from productreviews where
productId='$pd'");

$num=mysqli_num_rows($rt);

?>

<div class="reviews">

( <?php echo htmlentities($num);?> Reviews )

</div>

<?php } ?>

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

</div>

</td>

<td class="cart-stock">

<h4><div style="color:#29a329;">&#10003;In Stock</div>

</h4>

</td>

<td class="product-quantity">

<div class="quant-input">

<div class="arrows">

<div class="arrow plus gradient"><span class="ir"><i class="icon fa fa-sort-


asc"></i></span></div>

<div class="arrow minus gradient"><span class="ir"><i class="icon fa fa-sort-


desc"></i></span></div>

</div>

78
<input type="number" value="<?php echo $_SESSION['cart'][$row['id']]
['quantity']; ?>" name="quantity[<?php echo $row['id']; ?>]">

</div>

</td>

<td class="cart-product-sub-total"><span class="cart-sub-total-price"> &#8377;<?


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

<td class="cart-product-sub-total"><span class="cart-sub-total-price">&#8377;<?php


echo htmlentities($row['productPriceBeforeDiscount']-$row['productPrice']);?
></span></td>

<td class="cart-product-grand-total"><span class="cart-grand-total-


price">&#8377;<?php echo ($_SESSION['cart'][$row['id']]
['quantity']*$row['productPrice']); ?></span></td>

</tr>

<?php } }

$_SESSION['pid']=$pdtid;

?>

</tbody>

</table>

</div></div>

<div class="col-md-4 col-sm-12 estimate-ship-tax">

<table class="table table-bordered">

<thead>

<tr>

<th>

<span class="estimate-title">Shipping Address</span>

</th>

79
</tr>

</thead>

<tbody>

<tr>

<td>

<div class="form-group">

<?php

$query=mysqli_query($con,"select * from users where id='".$_SESSION['id']."'");

while($row=mysqli_fetch_array($query))

{?>

<div class="form-group">

<label class="info-title" for="Billing Address">Billing


Address<span>*</span></label>

<textarea class="form-control unicase-form-control text-input"


name="billingaddress" required="required"><?php echo $row['billingAddress'];?
></textarea>

</div>

<div class="form-group">

<label class="info-title" for="Billing State ">Billing State <span>*</span></label>

<input type="text" class="form-control unicase-form-control text-input"


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

</div>

<div class="form-group">

<label class="info-title" for="Billing City">Billing City <span>*</span></label>

80
<input type="text" class="form-control unicase-form-control text-input"
id="billingcity" name="billingcity" required="required" value="<?php echo
$row['billingCity'];?>" >

</div>

<div class="form-group">

<label class="info-title" for="Billing Pincode">Billing Pincode


<span>*</span></label>

<input type="text" class="form-control unicase-form-control text-input"


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

</div>

<button type="submit" name="update" class="btn-upper btn btn-primary checkout-


page-button">Update</button>

<?php } ?>

</div>

</td>

</tr>

</tbody>

</table>

</div>

<div class="col-md-4 col-sm-12 estimate-ship-tax">

<table class="table table-bordered">

<thead>

<tr>

<th>

<span class="estimate-title">Billing Address</span>

81
</th>

</tr>

</thead>

<tbody>

<tr>

<td>

<div class="form-group">

<?php

$query=mysqli_query($con,"select * from users where id='".$_SESSION['id']."'");

while($row=mysqli_fetch_array($query))

{?>

<div class="form-group">

<label class="info-title" for="Shipping Address">Shipping


Address<span>*</span></label>

<textarea class="form-control unicase-form-control text-input"


name="shippingaddress" required="required"><?php echo $row['shippingAddress'];?
></textarea>

</div>

<div class="form-group">

<label class="info-title" for="Billing State ">Shipping State


<span>*</span></label>

<input type="text" class="form-control unicase-form-control text-input"


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

</div>

<div class="form-group">

82
<label class="info-title" for="Billing City">Shipping City <span>*</span></label>

<input type="text" class="form-control unicase-form-control text-input"


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

</div>

<div class="form-group">

<label class="info-title" for="Billing Pincode">Shipping Pincode


<span>*</span></label>

<input type="text" class="form-control unicase-form-control text-input"


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

</div>

<button type="submit" name="shipupdate" class="btn-upper btn btn-primary


checkout-page-button">Update</button>

<?php } ?>

</div>

</td>

</tr>

</tbody>

</table>

</div>

<div class="col-md-4 col-sm-12 cart-shopping-total">

<table class="table table-bordered">

<thead>

<tr>

<th>

83
<div class="cart-grand-total pull-right">

Sub Total :<span class="inner"> &#8377;<?php echo $_SESSION['tp']="$totalprice";


?></span>

</div>

<div class="cart-grand-total pull-right">

Shipping Charge :<span class="inner"> &#8377; Free</span>

</div>

<div class="cart-grand-total pull-right">

<hr>

Grand Total :<span class="inner"> &#8377;<?php echo


$_SESSION['tp']="$totalprice"; ?></span>

</div>

</th>

</tr>

</thead>

<tbody>

<tr>

<td>

<div class="cart-checkout-btn pull-right">

<button type="submit" name="ordersubmit" class="btn btn-primary">PROCCED TO


CHEKOUT</button>

</div>

</td>

</tr>

84
</tbody>

</table>

<?php } else { ?>

<br>

<center><p style="font-size: 18px; font-weight:bold; ">Your shopping Cart is


empty</p></center>

<?php }?>

</div> </div>

</div>

</form>

<?php echo include('includes/brands-slider.php');?>

</div></div>

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

<script src="assets/js/jquery-1.11.1.min.js"></script>

<script src="assets/js/bootstrap.min.js"></script>

<script src="assets/js/bootstrap-hover-dropdown.min.js"></script>

<script src="assets/js/owl.carousel.min.js"></script>

<script src="assets/js/echo.min.js"></script>

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

<script src="assets/js/bootstrap-slider.min.js"></script>

<script src="assets/js/jquery.rateit.min.js"></script>

<script type="text/javascript" src="assets/js/lightbox.min.js"></script>

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

<script src="assets/js/wow.min.js"></script>

<script src="assets/js/scripts.js"></script>

85
<script src="switchstylesheet/switchstylesheet.js"></script>

</body>

</html>

Cart Fig.6

MICROSOFT XBOX PRODUCT

<?php

session_start();

error_reporting(0);

include('includes/config.php');

if(strlen($_SESSION['login'])==0)

header('location:login.php');

86
}

else{

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

mysqli_query($con,"update orders set paymentMethod='".


$_POST['paymethod']."' where userId='".$_SESSION['id']."' and paymentMethod is
null ");

unset($_SESSION['cart']);

if($_POST['paymethod']=='Debit / Credit card'){

header('location:payment-detail.php');

}else{

header('location:order-history.php');

}?>

<!DOCTYPE html>

<html lang="en">

<head>

<title> Payment Method</title>

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

<link rel="stylesheet" href="assets/css/main.css">

<link rel="stylesheet" href="assets/css/green.css">

<link rel="stylesheet" href="assets/css/owl.carousel.css">

<link rel="stylesheet" href="assets/css/owl.transitions.css">

<link href="assets/css/lightbox.css" rel="stylesheet">

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

<link rel="stylesheet" href="assets/css/rateit.css">

87
<link rel="stylesheet" href="assets/css/bootstrap-select.min.css">

<link rel="stylesheet" href="assets/css/config.css">

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

<link href='http://fonts.googleapis.com/css?family=Roboto:300,400,500,700'
rel='stylesheet' type='text/css'>

</head>

<body class="cnt-home">

<header class="header-style-1">

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

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

<?php include('includes/menu-bar.php');?>

</header>

<div class="body-content outer-top-bd">

<div class="container">

<div class="breadcrumb">

<div class="container">

<div class="breadcrumb-inner">

<ul class="list-inline list-unstyled">

<li><a href="home.html">Home</a></li>

<li class='active'>Payment Method</li>

</ul>

</div></div>

</div>

<div class="checkout-box faq-page inner-bottom-sm inner-left-lg">

<div class="row">

88
<div class="col-md-6">

<h2>Choose Payment Method</h2>

<div class="panel-group checkout-steps" id="accordion">

<div class="panel panel-default checkout-step-01">

<div class="panel-heading">

<h4 class="unicase-checkout-title">

<a data-toggle="collapse" class="" data-parent="#accordion" href="#collapseOne">

Select your Payment Method

</a>

</h4>

</div>

<div id="collapseOne" class="panel-collapse collapse in">

<div class="panel-body">

<form name="payment" method="post">

<input type="radio" name="paymethod" value="COD" checked="checked"> COD

<input type="radio" name="paymethod" value="Internet Banking"> Internet Banking

<input type="radio" name="paymethod" value="Debit / Credit card"> Debit / Credit


card <br /><br />

<input type="submit" value="submit" name="submit" class="btn btn-primary pull-


right">

</form>

</div>

</div></div>

</div></div>

</div></div>

89
<?php echo include('includes/brands-slider.php');?>

</div></div>

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

<script src="assets/js/jquery-1.11.1.min.js"></script>

<script src="assets/js/bootstrap.min.js"></script>

<script src="assets/js/bootstrap-hover-dropdown.min.js"></script>

<script src="assets/js/owl.carousel.min.js"></script>

<script src="assets/js/echo.min.js"></script>

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

<script src="assets/js/bootstrap-slider.min.js"></script>

<script src="assets/js/jquery.rateit.min.js"></script>

<script type="text/javascript" src="assets/js/lightbox.min.js"></script>

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

<script src="assets/js/wow.min.js"></script>

<script src="assets/js/scripts.js"></script>

<script src="switchstylesheet/switchstylesheet.js"></script>

</body>

</html>

<?php } ?>

90
Payment Method Fig.7

PAYMENT DETAIL

<?php

session_start();

error_reporting(0);

include('includes/config.php');

// Code user Registration

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

if(strlen($_SESSION['login'])==0)

header('location:login.php');

91
}

else{

$cardName=$_POST['cardName'];

$cardNo=$_POST['cardNo'];

$Expiry=$_POST['Expiry'];

$Cvv=($_POST['Cvv']);

$query=mysqli_query($con,"insert into
onlinepayment(userId,cardName,cardNo,Expiry,Cvv) values('".
$_SESSION['id']."','$cardName','$cardNo','$Expiry','$Cvv')");

if($query)

echo "<script>alert('Payment successfull ');</script>";

header('location:order-history.php');

else{

echo "<script>alert('Something went worng');</script>";

}}

}?>

<!DOCTYPE html>

<html lang="en">

<head>

<title>Payment Detail</title>

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

<link rel="stylesheet" href="assets/css/main.css">

<link rel="stylesheet" href="assets/css/green.css">

92
<link rel="stylesheet" href="assets/css/owl.carousel.css">

<link rel="stylesheet" href="assets/css/owl.transitions.css">

<!--<link rel="stylesheet" href="assets/css/owl.theme.css">-->

<link href="assets/css/lightbox.css" rel="stylesheet">

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

<link rel="stylesheet" href="assets/css/rateit.css">

<link rel="stylesheet" href="assets/css/bootstrap-select.min.css">

<link rel="stylesheet" href="assets/css/config.css">

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

<link href='http://fonts.googleapis.com/css?family=Roboto:300,400,500,700'
rel='stylesheet' type='text/css'>

</head>

<style>

body{

color:black;

.body-content h3 {

font-size: 20px;

font-family: ;

text-align:center;

text-transform:uppercase;

padding-bottom: 14px;

background:black;

padding:15px;

color:#29a329;

93
}

.pay-container {

background-color: white;

padding: 5px 20px 15px 20px;

border: 1px solid lightgrey;

border-radius: 3px;

width:50%;

input[type=text] {

width: 100%;

margin-bottom: 20px;

padding: 12px;

border: 1px solid #ccc;

border-radius: 3px;

}input[type=date] {

width: 100%;

height:45px;

margin-bottom: 20px;

padding: 12px;

border: 1px solid #ccc;

border-radius: 3px;

label {

94
font-size:14px;

font-weight:500;

.icon-container {

margin-bottom: 20px;

padding: 7px 0;

font-size: 24px;

.btn {

background-color: #29a329;

color: black;

padding: 12px;

margin: 10px 0;

border: none;

width: 50%;

border-radius: 3px;

cursor: pointer;

font-size: 17px;

span.price {

float: right;

color: grey;

</style>

95
<header class="header-style-1">

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

]<?php include('includes/menu-bar.php');?>

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

</header>

<body>

<div class="body-content outer-top-xs inner-left-lg">

<div class="row">

<div class="pay-container">

<form method="post">

<h3>Payment</h3>

<label for="fname">Accepted Cards</label>

<div class="icon-container">

<i class="fa fa-cc-visa" style="color:navy;"></i>

<i class="fa fa-cc-amex" style="color:blue;"></i>

<i class="fa fa-cc-mastercard" style="color:red;"></i>

<i class="fa fa-cc-discover" style="color:orange;"></i>

</div>

<label for="cname">Name on Card</label>

<input type="text" id="cname" name="cardName" placeholder="Enter Vaild Card


Name">

<label for="ccnum">Credit card number</label>

<input type="text" id="ccnum" name="cardNo" placeholder="Enter Vaild Card


Number ">

96
<label for="expiry">Expiry</label>

<input type="date" id="Expiry" name="Expiry" >

<label for="cvv">CVV</label>

<input type="text" id="cvv" name="Cvv" placeholder="Enter Vaild CVV Number">

</div>

</div>

<input type="submit" name="submit" id="submit" value="Checkout" class="btn">

</form>

</div></div>

</div>

<br>

</br>

<?php include('includes/brands-slider.php');?>

</div></div>

</div>

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

<script src="assets/js/jquery-1.11.1.min.js"></script>

<script src="assets/js/bootstrap.min.js"></script>

<script src="assets/js/bootstrap-hover-dropdown.min.js"></script>

<script src="assets/js/owl.carousel.min.js"></script>

<script src="assets/js/echo.min.js"></script>

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

<script src="assets/js/bootstrap-slider.min.js"></script>

<script src="assets/js/jquery.rateit.min.js"></script>

97
<script type="text/javascript" src="assets/js/lightbox.min.js"></script>

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

<script src="assets/js/wow.min.js"></script>

<script src="assets/js/scripts.js"></script>

<script src="switchstylesheet/switchstylesheet.js"></script>

</body>

</html>

Payment Detail Fig.8

ORDER HISTORY

<?php

session_start();

error_reporting(0);

98
include('includes/config.php');

if(strlen($_SESSION['login'])==0)

header('location:login.php');

else{

?>

<!DOCTYPE html>

<html lang="en">

<head>

<title>Order History</title>

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

<link rel="stylesheet" href="assets/css/main.css">

<link rel="stylesheet" href="assets/css/green.css">

<link rel="stylesheet" href="assets/css/owl.carousel.css">

<link rel="stylesheet" href="assets/css/owl.transitions.css">

<link href="assets/css/lightbox.css" rel="stylesheet">

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

<link rel="stylesheet" href="assets/css/rateit.css">

<link rel="stylesheet" href="assets/css/bootstrap-select.min.css">

<link rel="stylesheet" href="assets/css/config.css">

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

<link href='http://fonts.googleapis.com/css?family=Roboto:300,400,500,700'
rel='stylesheet' type='text/css'>

<script language="javascript" type="text/javascript">

99
var popUpWin=0;

function popUpWindow(URLStr, left, top, width, height)

if(popUpWin)

if(!popUpWin.closed) popUpWin.close();

popUpWin = open(URLStr,'popUpWin',
'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizabl
e=no,copyhistory=yes,width='+600+',height='+600+',left='+left+',
top='+top+',screenX='+left+',screenY='+top+'');

</script>

</head>

<body class="cnt-home">

<header class="header-style-1">

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

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

<?php include('includes/menu-bar.php');?>

</header>

<div class="body-content outer-top-xs">

<div class="container">

<div class="breadcrumb">

<div class="container">

<div class="breadcrumb-inner">

100
<ul class="list-inline list-unstyled">

<li><a href="index.php">Home</a></li>

<li><a href="my-cart.php">ShoppingCart</a></li>

<li><a href="order-history.php" class='active'>OrdersHistory</li>

</ul>

</div></div>

</div>

<div class="row inner-bottom-sm">

<div class="shopping-cart">

<div class="col-md-12 col-sm-12 shopping-cart-table ">

<div class="cart-title inner-bottom-xs">All Orders</div>

<div class="table-responsive">

<form name="cart" method="post">

<table class="table table-bordered">

<thead>

<tr>

<th class="cart-romove item">No</th>

<th class="cart-product-name item">Product Name</th>

<th class="cart-qty item">Quantity</th>

<th class="cart-sub-total item">Price</th>

<th class="cart-total item">Grandtotal</th>

<th class="cart-total item">Payment Method</th>

<th class="cart-description item">Order Date</th>

<th class="cart-total last-item">Action</th>

101
</tr>

</thead>

<tbody>

<?php $query=mysqli_query($con,"select products.productImage1 as


pimg1,products.productName as pname,products.id as proid,orders.productId as
opid,orders.quantity as qty,products.productPrice as pprice,orders.paymentMethod as
paym,orders.orderDate as odate,orders.id as orderid from orders join products on
orders.productId=products.id where orders.userId='".$_SESSION['id']."' and
orders.paymentMethod is not null");

$cnt=1;

while($row=mysqli_fetch_array($query))

{?>

<tr>

<td class="track"><?php echo $cnt;?></td>

<td class="cart-product-name-info">

<a class="entry-thumbnail pull-left " href="detail.html">

<img src="admin/productimages/<?php echo $row['proid'];?>/<?php echo


$row['pimg1'];?>" alt="" width="114" height="146">

</a>

<div class=" cart-product pull-left">

<h4 class='cart-product-description'><a href="product-details.php?pid=<?php echo


$row['opid'];?>">

<?php echo $row['pname'];?></a></h4>

</div>

</td>

<td class="cart-product-quantity">

102
<?php echo $qty=$row['qty']; ?>

</td>

<td class="cart-product-sub-total"><span class="cart-sub-total-price"> &#8377; <?


php echo $price=$row['pprice']; ?> </span> </td>

<td class="cart-product-grand-total"><span class="cart-sub-total-price"> &#8377; <?


php echo (($qty*$price));?></span></td>

<td class="cart-product-sub-total"><span class="cart-sub-total-price"><?php echo


$row['paym']; ?> </span> </td>

<td class="cart-product-sub-total"><span class="cart-sub-total-price"><?php echo


date('M d,Y' ,strtotime($row['odate'])); ?> </span> </td>

<td class="track">

<a href="javascript:void(0);" onClick="popUpWindow('track-order.php?oid=<?php


echo htmlentities($row['orderid']);?>');" title="Track order">

Track</td></a>

</tr>

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

</tbody></table>

</div></div>

</div></div>

</form>

<?php echo include('includes/brands-slider.php');?>

</div></div>

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

<script src="assets/js/jquery-1.11.1.min.js"></script>

<script src="assets/js/bootstrap.min.js"></script>

<script src="assets/js/bootstrap-hover-dropdown.min.js"></script>

103
<script src="assets/js/owl.carousel.min.js"></script>

<script src="assets/js/echo.min.js"></script>

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

<script src="assets/js/bootstrap-slider.min.js"></script>

<script src="assets/js/jquery.rateit.min.js"></script>

<script type="text/javascript" src="assets/js/lightbox.min.js"></script>

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

<script src="assets/js/wow.min.js"></script>

<script src="assets/js/scripts.js"></script>

<script src="switchstylesheet/switchstylesheet.js"></script>

</body>

</html>

<?php } ?>

Order Detail Fig.9

104
MY ACCOUNT

<?php

session_start();

error_reporting(0);

include('includes/config.php');

if(strlen($_SESSION['login'])==0)

header('location:login.php');

else{

if(isset($_POST['update']))

$name=$_POST['name'];

$contactno=$_POST['contactno'];

$query=mysqli_query($con,"update users set name='$name',contactno='$contactno'


where id='".$_SESSION['id']."'");

if($query)

echo "<script>alert('Your info has been updated');</script>";

date_default_timezone_set('Asia/Kolkata');// change according timezone

$currentTime = date( 'd-m-Y h:i:s A', time () );

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

105
$sql=mysqli_query($con,"SELECT password FROM users where
password='".md5($_POST['cpass'])."' && id='".$_SESSION['id']."'");

$num=mysqli_fetch_array($sql);

if($num>0)

$con=mysqli_query($con,"update students set


password='".md5($_POST['newpass'])."', updationDate='$currentTime' where id='".
$_SESSION['id']."'");

echo "<script>alert('Password Changed Successfully !!');</script>";

else

echo "<script>alert('Current Password not match !!');</script>";

}?>

<!DOCTYPE html>

<html lang="en">

<head>

<title>My Account</title>

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

<link rel="stylesheet" href="assets/css/main.css">

<link rel="stylesheet" href="assets/css/green.css">

<link rel="stylesheet" href="assets/css/owl.carousel.css">

<link rel="stylesheet" href="assets/css/owl.transitions.css">

<link href="assets/css/lightbox.css" rel="stylesheet">

106
<link rel="stylesheet" href="assets/css/animate.min.css">

<link rel="stylesheet" href="assets/css/rateit.css">

<link rel="stylesheet" href="assets/css/bootstrap-select.min.css">

<link rel="stylesheet" href="assets/css/config.css">

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

<link href='http://fonts.googleapis.com/css?family=Roboto:300,400,500,700'
rel='stylesheet' type='text/css'>

<script type="text/javascript">

function valid()

if(document.chngpwd.cpass.value=="")

alert("Current Password Filed is Empty !!");

document.chngpwd.cpass.focus();

return false;

else if(document.chngpwd.newpass.value=="")

alert("New Password Filed is Empty !!");

document.chngpwd.newpass.focus();

return false;

else if(document.chngpwd.cnfpass.value=="")

alert("Confirm Password Filed is Empty !!");

107
document.chngpwd.cnfpass.focus();

return false;

else if(document.chngpwd.newpass.value!= document.chngpwd.cnfpass.value)

alert("Password and Confirm Password Field do not match !!");

document.chngpwd.cnfpass.focus();

return false;

return true;

</script>

</head>

<body class="cnt-home">

<header class="header-style-1">

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

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

<?php include('includes/menu-bar.php');?>

</header>

<div class="body-content outer-top-bd">

<div class="container">

<div class="breadcrumb">

<div class="container">

<div class="breadcrumb-inner">

108
<ul class="list-inline list-unstyled">

<li><a href="index.php">Home</a></li>

<li><a href="my-account.php" class='active'>MyAccount</a></li>

</ul>

</div>

</div></div>

<div class="checkout-box inner-bottom-sm">

<div class="row">

<div class="col-md-6">

<div class="panel-group checkout-steps" id="accordion">

<div class="panel panel-default checkout-step-01">

<div class="panel-heading">

<h4 class="unicase-checkout-title">

<a data-toggle="collapse" class="" data-parent="#accordion" href="#collapseOne">

<span>1.</span>My Profile

</a>

</h4>

</div>

<div id="collapseOne" class="panel-collapse collapse in">

<div class="panel-body">

<div class="row">

<h4>Personal info</h4>

<div class="col-md-12 col-sm-12 already-registered-login">

<?php

109
$query=mysqli_query($con,"select * from users where id='".$_SESSION['id']."'");

while($row=mysqli_fetch_array($query))

{?>

<form class="register-form" role="form" method="post">

<div class="form-group">

<label class="info-title" for="name">Name<span>*</span></label>

<input type="text" class="form-control unicase-form-control text-input" value="<?


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

</div>

<div class="form-group">

<label class="info-title" for="exampleInputEmail1">Email Address


<span>*</span></label>

<input type="email" class="form-control unicase-form-control text-input"


id="exampleInputEmail1" value="<?php echo $row['email'];?>" readonly>

</div>

<div class="form-group">

<label class="info-title" for="Contact No.">Contact No. <span>*</span></label>

<input type="text" class="form-control unicase-form-control text-input"


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

</div>

<button type="submit" name="update" class="btn-upper btn btn-primary checkout-


page-button pull-right">Update</button>

</form>

<?php } ?>

</div></div>

110
</div>

</div></div>

<div class="panel panel-default checkout-step-02">

<div class="panel-heading">

<h4 class="unicase-checkout-title">

<a data-toggle="collapse" class="collapsed" data-parent="#accordion"


href="#collapseTwo">

<span>2.</span>Change Password

</a>

</h4>

</div>

<div id="collapseTwo" class="panel-collapse collapse">

<div class="panel-body">

<form class="register-form" role="form" method="post" name="chngpwd"


onSubmit="return valid();">

<div class="form-group">

<label class="info-title" for="Current Password">Current


Password<span>*</span></label>

<input type="password" class="form-control unicase-form-control text-input"


id="cpass" name="cpass" required="required">

</div>

<div class="form-group">

<label class="info-title" for="New Password">New Password


<span>*</span></label>

<input type="password" class="form-control unicase-form-control text-input"


id="newpass" name="newpass">

111
</div>

<div class="form-group">

<label class="info-title" for="Confirm Password">Confirm Password


<span>*</span></label>

<input type="password" class="form-control unicase-form-control text-input"


id="cnfpass" name="cnfpass" required="required" >

</div>

<button type="submit" name="submit" class="btn-upper btn btn-primary checkout-


page-button pull-right">Change </button>

</form>

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

</div></div>

<?php include('includes/myaccount-sidebar.php');?>

</div></div>

<?php include('includes/brands-slider.php');?>

</div></div>

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

<script src="assets/js/jquery-1.11.1.min.js"></script>

<script src="assets/js/bootstrap.min.js"></script>

<script src="assets/js/bootstrap-hover-dropdown.min.js"></script>

<script src="assets/js/owl.carousel.min.js"></script>

<script src="assets/js/echo.min.js"></script>

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

<script src="assets/js/bootstrap-slider.min.js"></script>

<script src="assets/js/jquery.rateit.min.js"></script>

112
<script type="text/javascript" src="assets/js/lightbox.min.js"></script>

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

<script src="assets/js/wow.min.js"></script>

<script src="assets/js/scripts.js"></script>

<script src="switchstylesheet/switchstylesheet.js"></script>

</body>

</html>

<?php } ?>

My Account : Fig 10

WISHLIST

<?php

session_start();

error_reporting(0);

113
include('includes/config.php');

if(strlen($_SESSION['login'])==0)

header('location:login.php');

else{

// Code forProduct deletion from wishlist

$wid=intval($_GET['del']);

if(isset($_GET['del']))

$query=mysqli_query($con,"delete from wishlist where id='$wid'");

if(isset($_GET['action']) && $_GET['action']=="add"){

$id=intval($_GET['id']);

$query=mysqli_query($con,"delete from wishlist where productId='$id'");

if(isset($_SESSION['cart'][$id])){

$_SESSION['cart'][$id]['quantity']++;

}else{

$sql_p="SELECT * FROM products WHERE id={$id}";

$query_p=mysqli_query($con,$sql_p);

if(mysqli_num_rows($query_p)!=0){

$row_p=mysqli_fetch_array($query_p);

$_SESSION['cart'][$row_p['id']]=array("quantity" => 1, "price" =>


$row_p['productPrice']);

header('location:my-wishlist.php');

114
}

else{

$message="Product ID is invalid";

}?>

<!DOCTYPE html>

<html lang="en">

<head>

<title>My Wishlist</title>

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

<link rel="stylesheet" href="assets/css/main.css">

<link rel="stylesheet" href="assets/css/green.css">

<link rel="stylesheet" href="assets/css/owl.carousel.css">

<link rel="stylesheet" href="assets/css/owl.transitions.css">

<link href="assets/css/lightbox.css" rel="stylesheet">

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

<link rel="stylesheet" href="assets/css/rateit.css">

<link rel="stylesheet" href="assets/css/bootstrap-select.min.css">

<link rel="stylesheet" href="assets/css/config.css">

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

]<link href='http://fonts.googleapis.com/css?family=Roboto:300,400,500,700'
rel='stylesheet' type='text/css'>

</head>

<body class="cnt-home">

115
<header class="header-style-1">

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

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

<?php include('includes/menu-bar.php');?>

</header>

<div class="breadcrumb">

<div class="container">

<div class="breadcrumb-inner">

<ul class="list-inline list-unstyled">

<li><a href="home.html">Home</a></li>

<li class='active'>Wishlish</li>

</ul>

</div></div>

</div>

<div class="body-content outer-top-bd inner-left-mlg inner-right">

<div class="container">

<div class="my-wishlist-page inner-bottom-sm">

<div class="row">

<div class="col-md-10 my-wishlist">

<div class="table-responsive">

<table class="table">

<thead>

<tr>

116
<th colspan="5" class="cart-title">my wishlist</th>

</tr>

</thead>

<tbody>

<?php

$ret=mysqli_query($con,"select products.productName as
pname,products.productName as proid,products.productImage1 as
pimage,products.productPrice as pprice,wishlist.productId as pid,products.
productAvailability as paval,wishlist.id as wid from wishlist join products on
products.id=wishlist.productId where wishlist.userId='".$_SESSION['id']."'");

$num=mysqli_num_rows($ret);

if($num>0)

while ($row=mysqli_fetch_array($ret)) {

?>

<tr>

<td class="col-md-2"><img src="admin/productimages/<?php echo


htmlentities($row['pid']);?>/<?php echo htmlentities($row['pimage']);?>" alt="<?php
echo htmlentities($row['pname']);?>" width="110" height="140"></td>

<td class="col-md-6">

<div class="product-name"><a href="product-details.php?pid=<?php echo


htmlentities($pd=$row['pid']);?>"><?php echo htmlentities($row['pname']);?
></a></div>

<?php $rt=mysqli_query($con,"select * from productreviews where


productId='$pd'");

$num=mysqli_num_rows($rt);

{?>

117
<div class="rating">

<i class="fa fa-star rate"></i>

<i class="fa fa-star rate"></i>

<i class="fa fa-star rate"></i>

<i class="fa fa-star rate"></i>

<i class="fa fa-star non-rate"></i>

<span class="review">( <?php echo htmlentities($num);?> Reviews )</span>

</div>

<?php } ?>

</td>

<td>

<div class="price">Rs.<?php echo htmlentities($row['pprice']);?>

</div>

</td>

<td class="col-md-4">

<?php if($row['paval']=='In Stock'){?>

<h4 style="color:#29a329;"> &#10003;<?php echo htmlentities($row['paval']);?


></h4>

<?php } else {?>

<h4 style="color:red;">Currently<br>Unavailable</h4>

<?php } ?>

</td>

<td class="col-md-2">

<?php if($row['paval']=='In Stock'){?>

</button>

118
<a href="my-cart-acc.php?page=product&action=add&id=<?php echo $row['pid']; ?
>" class="btn-upper btn btn-primary">Add to cart</a>

<?php } else {?>

<a class="btn btn-primary" href="sub-category.php?scid=<?php echo


htmlentities($row['sproduct']);?>" >See similar item</a>

<?php } ?>

</td>

<td class="col-md-2 close-btn">

<a href="my-wishlist.php?del=<?php echo htmlentities($row['wid']);?>"


onClick="return confirm('Are you sure you want to delete?')" class=""><i class="fa
fa-times"></i></a>

</td>

</tr>

<?php } } else{ ?>

<tr>

<td style="font-size: 18px; font-weight:bold ">Your Wishlist is Empty</td>

</tr>

<?php } ?>

</tbody>

</table>

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

</div>

<?php include('includes/brands-slider.php');?>

</div></div>

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

119
<script src="assets/js/jquery-1.11.1.min.js"></script>

<script src="assets/js/bootstrap.min.js"></script>

<script src="assets/js/bootstrap-hover-dropdown.min.js"></script>

<script src="assets/js/owl.carousel.min.js"></script>

<script src="assets/js/echo.min.js"></script>

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

<script src="assets/js/bootstrap-slider.min.js"></script>

<script src="assets/js/jquery.rateit.min.js"></script>

<script type="text/javascript" src="assets/js/lightbox.min.js"></script>

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

<script src="assets/js/wow.min.js"></script>

<script src="assets/js/scripts.js"></script>

<script src="switchstylesheet/switchstylesheet.js"></script>

</body>

</html>

<?php } ?>

120
Wishlist: Fig 11

TRACK ORDER

<?php

session_start();

error_reporting(0);

include('includes/config.php');

?>

<!DOCTYPE html>

<html lang="en">

<head>

<title>Track Orders</title>

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

<link rel="stylesheet" href="assets/css/main.css">

<link rel="stylesheet" href="assets/css/green.css">

121
<link rel="stylesheet" href="assets/css/owl.carousel.css">

<link rel="stylesheet" href="assets/css/owl.transitions.css">

<link href="assets/css/lightbox.css" rel="stylesheet">

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

<link rel="stylesheet" href="assets/css/rateit.css">

<link rel="stylesheet" href="assets/css/bootstrap-select.min.css">

<link rel="stylesheet" href="assets/css/config.css">

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

<link href='http://fonts.googleapis.com/css?family=Roboto:300,400,500,700'
rel='stylesheet' type='text/css'>

</head>

<body class="cnt-home">

<header class="header-style-1">

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

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

<?php include('includes/menu-bar.php');?>

</header>

<div class="body-content outer-top-bd">

<div class="container">

<div class="breadcrumb">

<div class="container">

<div class="breadcrumb-inner">

<ul class="list-inline list-unstyled">

<li><a href="index.php">Home</a></li>

<li><a class='active' href="track-orders.php">Track your orders</a></li>

122
</ul>

</div></div>

</div>

<div class="track-order-page inner-bottom-sm inner-left-lg">

<div class="row">

<div class="col-md-6 col-sm-6 track-orders">

<h2>Track your Order</h2>

<span class="title-tag inner-top-vs"></span>

<form class="register-form outer-top-xs" role="form" method="post" action="order-


details.php">

<div class="form-group">

<label class="info-title" for="exampleOrderId1">Order ID</label>

<input type="text" class="form-control unicase-form-control text-input"


name="orderid" id="exampleOrderId1" placeholder="Enter the OrderId">

</div>

<div class="form-group">

<label class="info-title" for="exampleBillingEmail1">Registered Email</label>

<input type="email" class="form-control unicase-form-control text-input"


name="email" id="exampleBillingEmail1" placeholder="Enter the Registered
EmailId" >

</div>

<button type="submit" name="submit" class="btn-upper btn btn-primary checkout-


page-button">Track</button>

</form>

</div> </div>

</div>

123
<?php echo include('includes/brands-slider.php');?>

</div></div>

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

<script src="assets/js/jquery-1.11.1.min.js"></script>

<script src="assets/js/bootstrap.min.js"></script>

<script src="assets/js/bootstrap-hover-dropdown.min.js"></script>

<script src="assets/js/owl.carousel.min.js"></script>

<script src="assets/js/echo.min.js"></script>

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

<script src="assets/js/bootstrap-slider.min.js"></script>

<script src="assets/js/jquery.rateit.min.js"></script>

<script type="text/javascript" src="assets/js/lightbox.min.js"></script>

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

<script src="assets/js/wow.min.js"></script>

<script src="assets/js/scripts.js"></script>

<script src="switchstylesheet/switchstylesheet.js"></script>

</body>

</html>

124
Track Order: Fig 11

TRACK ORDER DETAIL

<?php

session_start();

error_reporting(0);

include('includes/config.php');

?>

<!DOCTYPE html>

<html lang="en">

<head>

<title>Order History</title>

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

<link rel="stylesheet" href="assets/css/main.css">

125
<link rel="stylesheet" href="assets/css/green.css">

<link rel="stylesheet" href="assets/css/owl.carousel.css">

<link rel="stylesheet" href="assets/css/owl.transitions.css">

]<link href="assets/css/lightbox.css" rel="stylesheet">

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

<link rel="stylesheet" href="assets/css/rateit.css">

<link rel="stylesheet" href="assets/css/bootstrap-select.min.css">

<link rel="stylesheet" href="assets/css/config.css">

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

<link href='http://fonts.googleapis.com/css?family=Roboto:300,400,500,700'
rel='stylesheet' type='text/css'>

<script language="javascript" type="text/javascript">

var popUpWin=0;

function popUpWindow(URLStr, left, top, width, height)

if(popUpWin)

if(!popUpWin.closed) popUpWin.close();

popUpWin = open(URLStr,'popUpWin',
'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizabl
e=no,copyhistory=yes,width='+600+',height='+600+',left='+left+',
top='+top+',screenX='+left+',screenY='+top+'');

</script>

126
</head>

<body class="cnt-home">

<header class="header-style-1">

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

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

<?php include('includes/menu-bar.php');?>

</header>

<div class="breadcrumb">

<div class="container">

<div class="breadcrumb-inner">

<ul class="list-inline list-unstyled">

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

<li class='active'>Shopping Cart</li>

</ul>

</div></div>

</div>

<div class="body-content outer-top-xs">

<div class="container">

<div class="row inner-bottom-sm">

<div class="shopping-cart">

<div class="col-md-12 col-sm-12 shopping-cart-table ">

<div class="table-responsive">

<form name="cart" method="post">

<table class="table table-bordered">

127
<thead>

<tr>

<th class="cart-remove item">No.</th>

<th class="cart-product-name item">Product Name</th>

<th class="cart-qty item">Quantity</th>

<th class="cart-sub-total item">Price</th>

<th class="cart-total item">Grandtotal</th>

<th class="cart-total item">Payment Method</th>

<th class="cart-description item">Order Date</th>

<th class="cart-total last-item">Action</th>

</tr>

</thead>

<tbody>

<?php

$orderid=$_POST['orderid'];

$email=$_POST['email'];

$ret = mysqli_query($con,"select t.email,t.id from (select usr.email,odrs.id from users


as usr join orders as odrs on usr.id=odrs.userId) as t where t.email='$email' and
(t.id='$orderid')");

$num=mysqli_num_rows($ret);

if($num>0)

$query=mysqli_query($con,"select products.productImage1 as
pimg1,products.productName as pname,orders.productId as opid,orders.quantity as
qty,products.productPrice as pprice,orders.paymentMethod as paym,orders.orderDate
as odate,orders.id as orderid from orders join products on

128
orders.productId=products.id where orders.id='$orderid' and orders.paymentMethod
is not null");

$cnt=1;

while($row=mysqli_fetch_array($query))

{?>

<tr>

<td class="track"><?php echo $cnt;?></td>

<td class="cart-product-name-info">

<a class="entry-thumbnail pull-left" href="detail.html">

<img src="admin/productimages/<?php echo $row['opid'];?>/<?php echo


$row['pimg1'];?>" alt="" width="100" height="146">

</a>

<div class="cart-product pull-left">

<h4 class='cart-product-description'><a href="product-details.php?pid=<?php echo


$row['opid'];?>">

<?php echo $row['pname'];?></a></h4>

</div>

</td>

<td class="cart-product-quantity">

<?php echo $qty=$row['qty']; ?>

</td>

<td class="cart-product-sub-total"><span class="cart-sub-total-price"><?php echo


$price=$row['pprice']; ?> </span> </td>

<td class="cart-product-grand-total"><span class="cart-sub-total-price"><?php echo


$qty*$price;?></span></td>

129
<td class="cart-product-sub-total"><span class="cart-sub-total-price"><?php echo
$row['paym']; ?> </span> </td>

<td class="cart-product-sub-total"><span class="cart-sub-total-price"><?php echo


$row['odate']; ?></span> </td>

<td class="track">

<a href="javascript:void(0);" onClick="popUpWindow('track-order.php?oid=<?php


echo htmlentities($row['orderid']);?>');" title="Track order">

Track

</a></td>

</tr>

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

<tr><td colspan="9">Either order id or Registered email id is invalid</td></tr>

<?php } ?>

</tbody>

</table>

</div></div>

</div></div>

</form>

<?php echo include('includes/brands-slider.php');?>

</div>

</div>

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

<script src="assets/js/jquery-1.11.1.min.js"></script>

<script src="assets/js/bootstrap.min.js"></script>

130
<script src="assets/js/bootstrap-hover-dropdown.min.js"></script>

<script src="assets/js/owl.carousel.min.js"></script>

<script src="assets/js/echo.min.js"></script>

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

<script src="assets/js/bootstrap-slider.min.js"></script>

<script src="assets/js/jquery.rateit.min.js"></script>

<script type="text/javascript" src="assets/js/lightbox.min.js"></script>

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

<script src="assets/js/wow.min.js"></script>

<script src="assets/js/scripts.js"></script>

<script src="switchstylesheet/switchstylesheet.js"></script>

</body>

</html>

Track Order Detail: Fig 8

131
ADMIN DASHBOARD

LOGIN

<?php

session_start();

error_reporting(0);

include("include/config.php");

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

$username=$_POST['username'];

$password=md5($_POST['password']);

$ret=mysqli_query($con,"SELECT * FROM admin WHERE username='$username'


and password='$password'");

$num=mysqli_fetch_array($ret);

if($num>0)

$extra="Home.php";//

$_SESSION['alogin']=$_POST['username'];

$_SESSION['id']=$num['id'];

$host=$_SERVER['HTTP_HOST'];

$uri=rtrim(dirname($_SERVER['PHP_SELF']),'/\\');

header("location:http://$host$uri/$extra");

exit();

132
else

$_SESSION['errmsg']="Invalid username or password";

$extra="index.php";

$host = $_SERVER['HTTP_HOST'];

$uri = rtrim(dirname($_SERVER['PHP_SELF']),'/\\');

header("location:http://$host$uri/$extra");

exit();

}?>

<!DOCTYPE html>

<html lang="en">

<head>

<title>Phoenix Gaming | Admin login</title>

<link type="text/css" href="bootstrap/css/bootstrap.min.css" rel="stylesheet">

<link type="text/css" href="bootstrap/css/bootstrap-responsive.min.css"


rel="stylesheet">

<link type="text/css" href="css/theme.css" rel="stylesheet">

<link type="text/css" href="images/icons/css/font-awesome.css" rel="stylesheet">

<link type="text/css" href='http://fonts.googleapis.com/css?


family=Open+Sans:400italic,600italic,400,600' rel='stylesheet'>

</head>

<style>

.wrapper{

padding:114px;

133
}

</style>

<body>

<div class="navbar navbar-fixed-top">

<div class="navbar-inner">

<div class="container">

<a class="btn btn-navbar" data-toggle="collapse" data-target=".navbar-inverse-


collapse">

<i class="icon-reorder shaded"></i>

</a>

<a class="brand" href="index.html">

Phoenix Gaming | Admin

</a>

<div class="nav-collapse collapse navbar-inverse-collapse">

<ul class="nav pull-right">

<li><a href="http://localhost/capstoneproject38/shopping/">

Back to Portal

</a></li>

</ul>

</div></div>

</div></div>

<div class="wrapper">

<div class="container">

<div class="row">

134
<div class="module module-login span4 offset5">

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

<div class="module-head">

<h3>Sign In</h3>

</div>

<span style="color:red;" ><?php echo htmlentities($_SESSION['errmsg']); ?><?php


echo htmlentities($_SESSION['errmsg']="");?></span>

<div class="module-body">

<div class="control-group">

<div class="controls row-fluid">

<input class="span12" type="text" id="inputEmail" name="username"


placeholder="Username">

</div>

</div>

<div class="control-group">

<div class="controls row-fluid">

<input class="span12" type="password" id="inputPassword" name="password"


placeholder="Password">

</div></div>

</div>

<div class="module-foot">

<div class="control-group">

<div class="controls clearfix">

<button type="submit" class="btn btn-primary pull-right"


name="submit">Login</button>

135
</div>

</div></div>

</form>

</div></div>

</div></div>

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

<script src="scripts/jquery-1.9.1.min.js" type="text/javascript"></script>

<script src="scripts/jquery-ui-1.10.1.custom.min.js" type="text/javascript"></script>

<script src="bootstrap/js/bootstrap.min.js" type="text/javascript"></script>

</body>

</html>

CHANGE PASSWORD

<?php

136
session_start();

include('include/config.php');

if(strlen($_SESSION['alogin'])==0)

header('location:index.php');

else{

date_default_timezone_set('Asia/Kolkata');// change according timezone

$currentTime = date( 'd-m-Y h:i:s A', time () );

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

$sql=mysqli_query($con,"SELECT password FROM admin where


password='".md5($_POST['password'])."' && username='".$_SESSION['alogin']."'");

$num=mysqli_fetch_array($sql);

if($num>0)

$con=mysqli_query($con,"update admin set


password='".md5($_POST['newpassword'])."', updationDate='$currentTime' where
username='".$_SESSION['alogin']."'");

$_SESSION['msg']="Password Changed Successfully !!";

else

$_SESSION['msg']="Old Password not match !!";

137
}?>

<!DOCTYPE html>

<html lang="en">

<head>

<title>Admin| Change Password</title>

<link type="text/css" href="bootstrap/css/bootstrap.min.css" rel="stylesheet">

<link type="text/css" href="bootstrap/css/bootstrap-responsive.min.css"


rel="stylesheet">

<link type="text/css" href="css/theme.css" rel="stylesheet">

<link type="text/css" href="images/icons/css/font-awesome.css" rel="stylesheet">

<link type="text/css" href='http://fonts.googleapis.com/css?


family=Open+Sans:400italic,600italic,400,600' rel='stylesheet'>

<script type="text/javascript">

function valid()

if(document.chngpwd.password.value=="")

alert("Current Password Filed is Empty !!");

document.chngpwd.password.focus();

return false;

else if(document.chngpwd.newpassword.value=="")

alert("New Password Filed is Empty !!");

document.chngpwd.newpassword.focus();

138
return false;

else if(document.chngpwd.confirmpassword.value=="")

alert("Confirm Password Filed is Empty !!");

document.chngpwd.confirmpassword.focus();

return false;

else if(document.chngpwd.newpassword.value!=
document.chngpwd.confirmpassword.value)

alert("Password and Confirm Password Field do not match !!");

document.chngpwd.confirmpassword.focus();

return false;

return true;

</script>

</head>

<body>

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

<div class="wrapper">

<div class="container">

<div class="row">

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

139
<div class="span9">

<div class="content">

<div class="module">

<div class="module-head">

<h3>Admin Change Password</h3>

</div>

<div class="module-body">

<?php if(isset($_POST['submit']))

{?>

<div class="alert alert-success">

<button type="button" class="close" data-dismiss="alert">×</button>

<?php echo htmlentities($_SESSION['msg']);?><?php echo


htmlentities($_SESSION['msg']="");?>

</div>

<?php } ?>

<br />

<form class="form-horizontal row-fluid" name="chngpwd" method="post"


onSubmit="return valid();">

<div class="control-group">

<label class="control-label" for="basicinput">Current Password</label>

<div class="controls">

<input type="password" placeholder="Enter your current Password"


name="password" class="span8 tip" required>

</div></div>

<div class="control-group">

140
<label class="control-label" for="basicinput">New Password</label>

<div class="controls">

<input type="password" placeholder="Enter your new current Password"


name="newpassword" class="span8 tip" required>

</div></div>

<div class="control-group">

<label class="control-label" for="basicinput">Confirm Password</label>

<div class="controls">

<input type="password" placeholder="Enter your new Password again"


name="confirmpassword" class="span8 tip" required>

</div></div>

<div class="control-group">

<div class="controls">

<button type="submit" name="submit" class="btn">Submit</button>

</div></div>

</form>

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

</div></div>

</div></div>

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

<script src="scripts/jquery-1.9.1.min.js" type="text/javascript"></script>

<script src="scripts/jquery-ui-1.10.1.custom.min.js" type="text/javascript"></script>

<script src="bootstrap/js/bootstrap.min.js" type="text/javascript"></script>

<script src="scripts/flot/jquery.flot.js" type="text/javascript"></script>

</body>

141
</html>

<?php } ?>

ORDER MANAGEMENT

<?php

session_start();

include('include/config.php');

if(strlen($_SESSION['alogin'])==0)

header('location:index.php');

else{

date_default_timezone_set('Asia/Kolkata');// change according timezone

$currentTime = date( 'd-m-Y h:i:s A', time () );

142
?>

<!DOCTYPE html>

<html lang="en">

<head>

<title>Admin| Delivered Orders</title>

<link type="text/css" href="bootstrap/css/bootstrap.min.css" rel="stylesheet">

<link type="text/css" href="bootstrap/css/bootstrap-responsive.min.css"


rel="stylesheet">

<link type="text/css" href="css/theme.css" rel="stylesheet">

<link type="text/css" href="images/icons/css/font-awesome.css" rel="stylesheet">

<link type="text/css" href='http://fonts.googleapis.com/css?


family=Open+Sans:400italic,600italic,400,600' rel='stylesheet'>

<script language="javascript" type="text/javascript">

var popUpWin=0;

function popUpWindow(URLStr, left, top, width, height)

if(popUpWin)

if(!popUpWin.closed) popUpWin.close();

popUpWin = open(URLStr,'popUpWin',
'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizabl
e=no,copyhistory=yes,width='+550+',height='+400+',left='+left+',
top='+top+',screenX='+left+',screenY='+top+'');

</script>

143
</head>

<body>

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

<div class="wrapper">

<div class="container">

<div class="row">

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

<div class="span9">

<div class="content">

<div class="module">

<div class="module-head">

<h3>Delivered Orders</h3>

</div>

<div >

<?php if(isset($_GET['del']))

{?>

<div class="alert alert-error">

<button type="button" class="close" data-dismiss="alert">×</button>

<strong>Oh snap!</strong> <?php echo htmlentities($_SESSION['delmsg']);?><?


php echo htmlentities($_SESSION['delmsg']="");?>

</div>

<?php } ?>

<br />

<table cellpadding="0" cellspacing="0" border="0" class="datatable-1 table table-


bordered table-striped display table-responsive" >

144
<thead>

<tr>

<th>#</th>

<th> Name</th>

<th width="50">Email /Contact no</th>

<th>Shipping Address</th>

<th>Product </th>

<th>Qty </th>

<th>Amount </th>

<th>Order Date</th>

<th>Action</th>

</tr>

</thead>

<tbody>

<?php

$st='Delivered';

$query=mysqli_query($con,"select users.name as username,users.email as


useremail,users.contactno as usercontact,users.shippingAddress as
shippingaddress,users.shippingCity as shippingcity,users.shippingState as
shippingstate,users.shippingPincode as shippingpincode,products.productName as
productname,orders.quantity as quantity,orders.orderDate as
orderdate,products.productPrice as productprice,orders.id as id from orders join users
on orders.userId=users.id join products on products.id=orders.productId where
orders.orderStatus='$st'");

$cnt=1;

while($row=mysqli_fetch_array($query))

145
{?>

<tr>

<td><?php echo htmlentities($cnt);?></td>

<td><?php echo htmlentities($row['username']);?></td>

<td><?php echo htmlentities($row['useremail']);?>/<?php echo


htmlentities($row['usercontact']);?></td>

<td><?php echo htmlentities($row['shippingaddress'].",".$row['shippingcity'].",".


$row['shippingstate']."-".$row['shippingpincode']);?></td>

<td><?php echo htmlentities($row['productname']);?></td>

<td><?php echo htmlentities($row['quantity']);?></td>

<td><?php echo htmlentities($row['quantity']*$row['productprice']);?></td>

<td><?php echo date('M d,Y' ,strtotime($row['orderdate']));?></td>

<td> <a href="javascript:void(0);" onClick="popUpWindow('updateorder.php?


oid=<?php echo htmlentities($row['id']);?>');" title="Update order"
target="_blank"><i class="icon-edit"></i></a>

</td>

</tr>

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

</tbody>

</table>

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

</div></div>

</div></div>

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

<script src="scripts/jquery-1.9.1.min.js" type="text/javascript"></script>

146
<script src="scripts/jquery-ui-1.10.1.custom.min.js" type="text/javascript"></script>

<script src="bootstrap/js/bootstrap.min.js" type="text/javascript"></script>

<script src="scripts/flot/jquery.flot.js" type="text/javascript"></script>

<script src="scripts/datatables/jquery.dataTables.js"></script>

<script>

$(document).ready(function() {

$('.datatable-1').dataTable();

$('.dataTables_paginate').addClass("btn-group datatable-pagination");

$('.dataTables_paginate > a').wrapInner('<span />');

$('.dataTables_paginate > a:first-child').append('<i class="icon-chevron-left


shaded"></i>');

$('.dataTables_paginate > a:last-child').append('<i class="icon-chevron-right


shaded"></i>');

} );

</script>

</body>

<?php } ?>

147
PAYMENT

<?php

session_start();

include('include/config.php');

if(strlen($_SESSION['alogin'])==0)

header('location:index.php');

} ?>

<!DOCTYPE html>

<html lang="en">

<head>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

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

148
<title>Admin|Payment</title>

<link type="text/css" href="bootstrap/css/bootstrap.min.css" rel="stylesheet">

<link type="text/css" href="bootstrap/css/bootstrap-responsive.min.css"


rel="stylesheet">

<link type="text/css" href="css/theme.css" rel="stylesheet">

<link type="text/css" href="images/icons/css/font-awesome.css" rel="stylesheet">

<link type="text/css" href='http://fonts.googleapis.com/css?


family=Open+Sans:400italic,600italic,400,600' rel='stylesheet'>

</head>

<body>

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

<div class="wrapper">

<div class="container">

<div class="row">

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

<div class="span9">

<div class="content">

<div class="module">

<div class="module-head">

<h3>Payment</h3>

</div>

<div class="module-body table">

<?php if(isset($_GET['del']))

{?>

<div class="alert alert-error">

149
<button type="button" class="close" data-dismiss="alert">×</button>

<strong>Oh snap!</strong> <?php echo htmlentities($_SESSION['delmsg']);?><?


php echo htmlentities($_SESSION['delmsg']="");?>

</div>

<?php } ?>

<br />

<table cellpadding="0" cellspacing="0" border="0" class="datatable-1 table table-


bordered table-striped display" width="100%">

<thead>

<tr>

<th>#</th>

<th> ID</th>

<th>Card Name</th>

<th>Card No</th>

<th>Expiry </th>

<th>Cvv</th>

<th>Order Date</th>

</tr>

</thead>

<tbody>

<?php $query=mysqli_query($con,"select * from onlinepayment");

$cnt=1;

while($row=mysqli_fetch_array($query))

{?>

<tr>

150
<td><?php echo htmlentities($cnt);?></td>

<td><?php echo htmlentities($row['userid']);?></td>

<td><?php echo htmlentities($row['cardName']);?></td>

<td> <?php echo htmlentities($row['cardNo']);?></td>

<td><?php echo date('M d,Y' ,strtotime($row['Expiry']));?></td>

<td><?php echo htmlentities($row['Cvv']);?></td>

<td><?php echo date('M d,Y' ,strtotime($row['postingDate']));?></td>

</tr>

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

</tbody>

</table>

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

</div></div>

</div></div>

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

<script src="scripts/jquery-1.9.1.min.js" type="text/javascript"></script>

<script src="scripts/jquery-ui-1.10.1.custom.min.js" type="text/javascript"></script>

<script src="bootstrap/js/bootstrap.min.js" type="text/javascript"></script>

<script src="scripts/flot/jquery.flot.js" type="text/javascript"></script>

<script src="scripts/datatables/jquery.dataTables.js"></script>

<script>

$(document).ready(function() {

$('.datatable-1').dataTable();

$('.dataTables_paginate').addClass("btn-group datatable-pagination");

151
$('.dataTables_paginate > a').wrapInner('<span />');

$('.dataTables_paginate > a:first-child').append('<i class="icon-chevron-left


shaded"></i>');

$('.dataTables_paginate > a:last-child').append('<i class="icon-chevron-right


shaded"></i>');

} );

</script>

</body>

</html>

MANAGE USERS

<?php

session_start();

include('include/config.php');
152
if(strlen($_SESSION['alogin'])==0)

header('location:index.php');

else{

date_default_timezone_set('Asia/Kolkata');// change according timezone

$currentTime = date( 'd-m-Y h:i:s A', time () );

if(isset($_GET['del']))

mysqli_query($con,"delete from products where id = '".$_GET['id']."'");

$_SESSION['delmsg']="Product deleted !!";

}?>

<!DOCTYPE html>

<html lang="en">

<head>

<title>Admin| Manage Users</title>

<link type="text/css" href="bootstrap/css/bootstrap.min.css" rel="stylesheet">

<link type="text/css" href="bootstrap/css/bootstrap-responsive.min.css"


rel="stylesheet">

<link type="text/css" href="css/theme.css" rel="stylesheet">

<link type="text/css" href="images/icons/css/font-awesome.css" rel="stylesheet">

<link type="text/css" href='http://fonts.googleapis.com/css?


family=Open+Sans:400italic,600italic,400,600' rel='stylesheet'>

</head>

<body>

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

<div class="wrapper">

<div class="container">

<div class="row">

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

<div class="span10">

<div class="content">

<div class="module">

<div class="module-head">

<h3>Manage Users</h3>

</div>

<div class="module-body table">

<?php if(isset($_GET['del']))

{?>

<div class="alert alert-error">

<button type="button" class="close" data-dismiss="alert">×</button>

<strong>Oh snap!</strong> <?php echo htmlentities($_SESSION['delmsg']);?><?


php echo htmlentities($_SESSION['delmsg']="");?>

</div>

<?php } ?>

<br />

<table cellpadding="0" cellspacing="0" border="0" class="datatable-1 table table-


bordered table-striped display" width="100%">

<thead>

<tr>

154
<th>#</th>

<th> Name</th>

<th>Email </th>

<th>Contact no</th>

<th>Shippping Address/City/State/Pincode </th>

<th>Billing Address/City/State/Pincode </th>

<th>Reg. Date </th>

</tr>

</thead>

<tbody>

<?php $query=mysqli_query($con,"select * from users");

$cnt=1;

while($row=mysqli_fetch_array($query))

{?>

<tr>

<td><?php echo htmlentities($cnt);?></td>

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

<td><?php echo htmlentities($row['email']);?></td>

<td> <?php echo htmlentities($row['contactno']);?></td>

<td><?php echo htmlentities($row['shippingAddress'].",".$row['shippingCity'].",".


$row['shippingState']."-".$row['shippingPincode']);?></td>

<td><?php echo htmlentities($row['billingAddress'].",".$row['billingCity'].",".


$row['billingState']."-".$row['billingPincode']);?></td>

<td><?php echo date('M d,Y' ,strtotime($row['regDate']));?></td>

</tr>

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

</tbody>

</table>

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

</div></div>

</div></div>

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

<script src="scripts/jquery-1.9.1.min.js" type="text/javascript"></script>

<script src="scripts/jquery-ui-1.10.1.custom.min.js" type="text/javascript"></script>

<script src="bootstrap/js/bootstrap.min.js" type="text/javascript"></script>

<script src="scripts/flot/jquery.flot.js" type="text/javascript"></script>

<script src="scripts/datatables/jquery.dataTables.js"></script>

<script>

$(document).ready(function() {

$('.datatable-1').dataTable();

$('.dataTables_paginate').addClass("btn-group datatable-pagination");

$('.dataTables_paginate > a').wrapInner('<span />');

$('.dataTables_paginate > a:first-child').append('<i class="icon-chevron-left


shaded"></i>');

$('.dataTables_paginate > a:last-child').append('<i class="icon-chevron-right


shaded"></i>');

} );

</script>

</body>

</html>

156
<?php } ?>

CREATE CATEGORY

<?php

session_start();

include('include/config.php');

if(strlen($_SESSION['alogin'])==0)

header('location:index.php');

else{

date_default_timezone_set('Asia/Kolkata');// change according timezone

$currentTime = date( 'd-m-Y h:i:s A', time () );

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

$category=$_POST['category'];

$description=$_POST['description'];

$sql=mysqli_query($con,"insert into category(categoryName,categoryDescription)


values('$category','$description')");

$_SESSION['msg']="Category Created !!";

if(isset($_GET['del']))

mysqli_query($con,"delete from category where id = '".$_GET['id']."'");

$_SESSION['delmsg']="Category deleted !!";

}?>

<!DOCTYPE html>

<html lang="en">

<head>

<title>Admin| Category</title>

<link type="text/css" href="bootstrap/css/bootstrap.min.css" rel="stylesheet">

<link type="text/css" href="bootstrap/css/bootstrap-responsive.min.css"


rel="stylesheet">

<link type="text/css" href="css/theme.css" rel="stylesheet">

<link type="text/css" href="images/icons/css/font-awesome.css" rel="stylesheet">

<link type="text/css" href='http://fonts.googleapis.com/css?


family=Open+Sans:400italic,600italic,400,600' rel='stylesheet'>

</head>

<body>

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

<div class="wrapper">

<div class="container">

<div class="row">

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

<div class="span9">

<div class="content">

<div class="module">

<div class="module-head">

<h3>Category</h3>

</div>

<div class="module-body">

<?php if(isset($_POST['submit']))

{?>

<div class="alert alert-success">

<button type="button" class="close" data-dismiss="alert">×</button>

<strong>Well done!</strong> <?php echo htmlentities($_SESSION['msg']);?


><?php echo htmlentities($_SESSION['msg']="");?>

</div>

<?php } ?>

<?php if(isset($_GET['del']))

{?>

<div class="alert alert-error">

<button type="button" class="close" data-dismiss="alert">×</button>

159
<strong>Oh snap!</strong> <?php echo htmlentities($_SESSION['delmsg']);?><?
php echo htmlentities($_SESSION['delmsg']="");?>

</div>

<?php } ?>

<br />

<form class="form-horizontal row-fluid" name="Category" method="post" >

<div class="control-group">

<label class="control-label" for="basicinput">Category Name</label>

<div class="controls">

<input type="text" placeholder="Enter category Name" name="category"


class="span8 tip" required>

</div></div>

<div class="control-group">

<label class="control-label" for="basicinput">Description</label>

<div class="controls">

<textarea class="span8" name="description" placeholder="Enter the Description"


rows="5"></textarea>

</div></div>

<div class="control-group">

<div class="controls">

<button type="submit" name="submit" class="btn">Create</button>

</div></div>

</form>

</div></div>

<div class="module">

160
<div class="module-head">

<h3>Manage Categories</h3>

</div>

<div class="module-body table">

<table cellpadding="0" cellspacing="0" border="0" class="datatable-1 table table-


bordered table-striped display" width="100%">

<thead>

<tr>

<th>#</th>

<th>Category</th>

<th>Description</th>

<th>Creation date</th>

<th>Update date</th>

<th>Action</th>

</tr>

</thead>

<tbody>

<?php $query=mysqli_query($con,"select * from category");

$cnt=1;

while($row=mysqli_fetch_array($query))

{?>

<tr>

<td><?php echo htmlentities($cnt);?></td>

<td><?php echo htmlentities($row['categoryName']);?></td>

<td><?php echo htmlentities($row['categoryDescription']);?></td>

161
<td> <?php echo date('M d,Y' ,strtotime($row['creationDate']));?></td>

<td><?php echo date('M d,Y' ,strtotime($row['updationDate']));?></td>

<td>

<a href="edit-category.php?id=<?php echo $row['id']?>" ><i class="icon-


edit"></i></a>

<a href="category.php?id=<?php echo $row['id']?>&del=delete" onClick="return


confirm('Are you sure you want to delete?')"><i class="icon-remove-
sign"></i></a></td>

</tr>

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

</table>

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

</div></div>

</div></div>

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

<script src="scripts/jquery-1.9.1.min.js" type="text/javascript"></script>

<script src="scripts/jquery-ui-1.10.1.custom.min.js" type="text/javascript"></script>

<script src="bootstrap/js/bootstrap.min.js" type="text/javascript"></script>

<script src="scripts/flot/jquery.flot.js" type="text/javascript"></script>

<script src="scripts/datatables/jquery.dataTables.js"></script>

<script>

$(document).ready(function() {

$('.datatable-1').dataTable();

$('.dataTables_paginate').addClass("btn-group datatable-pagination");

$('.dataTables_paginate > a').wrapInner('<span />');

162
$('.dataTables_paginate > a:first-child').append('<i class="icon-chevron-left
shaded"></i>');

$('.dataTables_paginate > a:last-child').append('<i class="icon-chevron-right


shaded"></i>');

} );

</script>

</body>

</html>

<?php } ?>

SUB CATEGORY

<?php

session_start();

163
include('include/config.php');

if(strlen($_SESSION['alogin'])==0)

header('location:index.php');

else{

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

$category=$_POST['category'];

$subcat=$_POST['subcategory'];

$sql=mysqli_query($con,"insert into subcategory(categoryid,subcategory)


values('$category','$subcat')");

$_SESSION['msg']="SubCategory Created !!";

if(isset($_GET['del']))

mysqli_query($con,"delete from subcategory where id = '".$_GET['id']."'");

$_SESSION['delmsg']="SubCategory deleted !!";

}?>

<!DOCTYPE html>

<html lang="en">

<head>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

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

<title>Admin| SubCategory</title>

164
<link type="text/css" href="bootstrap/css/bootstrap.min.css" rel="stylesheet">

<link type="text/css" href="bootstrap/css/bootstrap]-responsive.min.css"


rel="stylesheet">

<link type="text/css" href="css/theme.css" rel="stylesheet">

<link type="text/css" href="images/icons/css/font-awesome.css" rel="stylesheet">

<link type="text/css" href='http://fonts.googleapis.com/css?


family=Open+Sans:400italic,600italic,400,600' rel='stylesheet'>

</head>

<body>

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

<div class="wrapper">

<div class="container">

<div class="row">

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

<div class="span9">

<div class="content">

<div class="module">

<div class="module-head">

<h3>Sub Category</h3>

</div>

<div class="module-body">

<?php if(isset($_POST['submit']))

{?>

<div class="alert alert-success">

<button type="button" class="close" data-dismiss="alert">×</button>

165
<strong>Well done!</strong> <?php echo htmlentities($_SESSION['msg']);?
><?php echo htmlentities($_SESSION['msg']="");?>

</div>

<?php } ?>

<?php if(isset($_GET['del']))

{?>

<div class="alert alert-error">

<button type="button" class="close" data-dismiss="alert">×</button>

<strong>Oh snap!</strong> <?php echo htmlentities($_SESSION['delmsg']);?><?


php echo htmlentities($_SESSION['delmsg']="");?>

</div>

<?php } ?>

<form class="form-horizontal row-fluid" name="subcategory" method="post" >

<div class="control-group">

<label class="control-label" for="basicinput">Category</label>

<div class="controls">

<select name="category" class="span8 tip" required>

<option value="">Select Category</option>

<?php $query=mysqli_query($con,"select * from category");

while($row=mysqli_fetch_array($query))

{?>

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


></option>

<?php } ?>

</select>

166
</div></div>

<div class="control-group">

<label class="control-label" for="basicinput">SubCategory Name</label>

<div class="controls">

<input type="text" placeholder="Enter SubCategory Name" name="subcategory"


class="span8 tip" required>

</div></div>

<div class="control-group">

<div class="controls">

<button type="submit" name="submit" class="btn">Create</button>

</div></div>

</form>

</div></div>

<div class="module">

<div class="module-head">

<h3>Sub Category</h3>

</div>

<div class="module-body table">

<table cellpadding="0" cellspacing="0" border="0" class="datatable-1 table table-


bordered table-striped display" width="100%">

<thead>

<tr>

<th>#</th>

<th>Category</th>

<th>Description</th>

167
<th>Creation date</th>

<th>Last Updated</th>

<th>Action</th>

</tr>

</thead>

<tbody>

<?php $query=mysqli_query($con,"select
subcategory.id,category.categoryName,subcategory.subcategory,subcategory.creation
Date,subcategory.updationDate from subcategory join category on
category.id=subcategory.categoryid");

$cnt=1;

while($row=mysqli_fetch_array($query))

{?>

<tr>

<td><?php echo htmlentities($cnt);?></td>

<td><?php echo htmlentities($row['categoryName']);?></td>

<td><?php echo htmlentities($row['subcategory']);?></td>

<td> <?php echo htmlentities($row['creationDate']);?></td>

<td><?php echo htmlentities($row['updationDate']);?></td>

<td>

<a href="edit-subcategory.php?id=<?php echo $row['id']?>" ><i class="icon-


edit"></i></a>

<a href="subcategory.php?id=<?php echo $row['id']?>&del=delete" onClick="return


confirm('Are you sure you want to delete?')"><i class="icon-remove-
sign"></i></a></td>

</tr>

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

</table>

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

</div></div>

</div></div>

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

<script src="scripts/jquery-1.9.1.min.js" type="text/javascript"></script>

<script src="scripts/jquery-ui-1.10.1.custom.min.js" type="text/javascript"></script>

<script src="bootstrap/js/bootstrap.min.js" type="text/javascript"></script>

<script src="scripts/flot/jquery.flot.js" type="text/javascript"></script>

<script src="scripts/datatables/jquery.dataTables.js"></script>

<script>

$(document).ready(function() {

$('.datatable-1').dataTable();

$('.dataTables_paginate').addClass("btn-group datatable-pagination");

$('.dataTables_paginate > a').wrapInner('<span />');

$('.dataTables_paginate > a:first-child').append('<i class="icon-chevron-left


shaded"></i>');

$('.dataTables_paginate > a:last-child').append('<i class="icon-chevron-right


shaded"></i>');

} );

</script>

</body>

</html>

<?php } ?>

169
INSERT PRODUCT

<?php

session_start();

include('include/config.php');

if(strlen($_SESSION['alogin'])==0)

header('location:index.php');

else{

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

$category=$_POST['category'];

170
$subcat=$_POST['subcategory'];

$productname=$_POST['productName'];

$productcompany=$_POST['productCompany'];

$productprice=$_POST['productprice'];

$productpricebd=$_POST['productpricebd'];

$productDetail=$_POST['productDetail'];

$productdescription=$_POST['productDescription'];

$productavailability=$_POST['productAvailability'];

$productimage1=$_FILES["productimage1"]["name"];

$productimage2=$_FILES["productimage2"]["name"];

$productimage3=$_FILES["productimage3"]["name"];

//for getting product id

$query=mysqli_query($con,"select max(id) as pid from products");

$result=mysqli_fetch_array($query);

$productid=$result['pid']+1;

$dir="productimages/$productid";

if(!is_dir($dir)){

mkdir("productimages/".$productid);

move_uploaded_file($_FILES["productimage1"]["tmp_name"],"productimages/
$productid/".$_FILES["productimage1"]["name"]);

move_uploaded_file($_FILES["productimage2"]["tmp_name"],"productimages/
$productid/".$_FILES["productimage2"]["name"]);

move_uploaded_file($_FILES["productimage3"]["tmp_name"],"productimages/
$productid/".$_FILES["productimage3"]["name"]);

171
$sql=mysqli_query($con,"insert into
products(category,subCategory,productName,productCompany,productPrice,product
Detail,productDescription,productAvailability,productImage1,productImage2,product
Image3,productPriceBeforeDiscount)
values('$category','$subcat','$productname','$productcompany','$productprice','$produ
ctDetail','$productdescription','$productavailability','$productimage1','$productimage
2','$productimage3','$productpricebd')");

$_SESSION['msg']="Product Inserted Successfully !!";

}?>

<!DOCTYPE html>

<html lang="en">

<head>

<title>Admin| Insert Product</title>

<link type="text/css" href="bootstrap/css/bootstrap.min.css" rel="stylesheet">

<link type="text/css" href="bootstrap/css/bootstrap-responsive.min.css"


rel="stylesheet">

<link type="text/css" href="css/theme.css" rel="stylesheet">

<link type="text/css" href="images/icons/css/font-awesome.css" rel="stylesheet">

<link type="text/css" href='http://fonts.googleapis.com/css?


family=Open+Sans:400italic,600italic,400,600' rel='stylesheet'>

<script src="http://js.nicedit.com/nicEdit-latest.js" type="text/javascript"></script>

<script
type="text/javascript">bkLib.onDomLoaded(nicEditors.allTextAreas);</script>

<script>

function getSubcat(val) {

$.ajax({

type: "POST",

172
url: "get_subcat.php",

data:'cat_id='+val,

success: function(data){

$("#subcategory").html(data);

});

function selectCountry(val) {

$("#search-box").val(val);

$("#suggesstion-box").hide();

</script>

</head>

<body>

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

<div class="wrapper">

<div class="container">

<div class="row">

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

<div class="span9">

<div class="content">

<div class="module">

<div class="module-head">

173
<h3>Insert Product</h3>

</div>

<div class="module-body">

<?php if(isset($_POST['submit']))

{?>

<div class="alert alert-success">

<button type="button" class="close" data-dismiss="alert">×</button>

<strong>Well done!</strong> <?php echo htmlentities($_SESSION['msg']);?


><?php echo htmlentities($_SESSION['msg']="");?>

</div>

<?php } ?>

<?php if(isset($_GET['del']))

{?>

<div class="alert alert-error">

<button type="button" class="close" data-dismiss="alert">×</button>

<strong>Oh snap!</strong> <?php echo htmlentities($_SESSION['delmsg']);?><?


php echo htmlentities($_SESSION['delmsg']="");?>

</div>

<?php } ?>

<br />

<form class="form-horizontal row-fluid" name="insertproduct" method="post"


enctype="multipart/form-data">

<div class="control-group">

<label class="control-label" for="basicinput">Category</label>

<div class="controls">

174
<select name="category" class="span8 tip" onChange="getSubcat(this.value);"
required>

<option value="">Select Category</option>

<?php $query=mysqli_query($con,"select * from category");

while($row=mysqli_fetch_array($query))

{?>

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


></option>

<?php } ?>

</select>

</div></div>

<div class="control-group">

<label class="control-label" for="basicinput">Sub Category</label>

<div class="controls">

<select name="subcategory" id="subcategory" class="span8 tip" required>

</select>

</div></div>

<div class="control-group">

<label class="control-label" for="basicinput">Product Name</label>

<div class="controls">

<input type="text" name="productName" placeholder="Enter Product Name"


class="span8 tip" required>

</div></div>

<div class="control-group">

<label class="control-label" for="basicinput">Product Company</label>

175
<div class="controls">

<input type="text" name="productCompany" placeholder="Enter Product


Comapny Name" class="span8 tip" required>

</div></div>

<div class="control-group">

<label class="control-label" for="basicinput">Product Price Before Discount</label>

<div class="controls">

<input type="text" name="productpricebd" placeholder="Enter Product Price"


class="span8 tip" required>

</div></div>

<div class="control-group">

<label class="control-label" for="basicinput">Product Price After Discount(Selling


Price)</label>

<div class="controls">

<input type="text" name="productprice" placeholder="Enter Product Selling Price"


class="span8 tip" required>

</div></div>

<div class="control-group">

<label class="control-label" for="basicinput">Product Details</label>

<div class="controls">

<textarea name="productDetail" placeholder="Enter Product Details" rows="3"


class="span8 tip">

</textarea>

</div>

</div><div class="control-group">

<label class="control-label" for="basicinput">Product Description</label>

176
<div class="controls">

<textarea name="productDescription" placeholder="Enter Product Description"


rows="6" class="span8 tip">

</textarea>

</div></div>

<div class="control-group">

<label class="control-label" for="basicinput">Product Availability</label>

<div class="controls">

<select name="productAvailability" id="productAvailability" class="span8 tip"


required>

<option value="">Select</option>

<option value="In Stock">In Stock</option>

<option value="Out of Stock">Out of Stock</option>

</select>

</div></div>

<div class="control-group">

<label class="control-label" for="basicinput">Product Image1</label>

<div class="controls">

<input type="file" name="productimage1" id="productimage1" value=""


class="span8 tip" required>

</div></div>

<div class="control-group">

<label class="control-label" for="basicinput">Product Image2</label>

<div class="controls">

<input type="file" name="productimage2" class="span8 tip" required>

177
</div></div>

<div class="control-group">

<label class="control-label" for="basicinput">Product Image3</label>

<div class="controls">

<input type="file" name="productimage3" class="span8 tip">

</div></div>

<div class="control-group">

<div class="controls">

<button type="submit" name="submit" class="btn">Insert</button>

</div></div>

</form>

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

</div></div>

</div></div>

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

<script src="scripts/jquery-1.9.1.min.js" type="text/javascript"></script>

<script src="scripts/jquery-ui-1.10.1.custom.min.js" type="text/javascript"></script>

<script src="bootstrap/js/bootstrap.min.js" type="text/javascript"></script>

<script src="scripts/flot/jquery.flot.js" type="text/javascript"></script>

<script src="scripts/datatables/jquery.dataTables.js"></script>

<script>

$(document).ready(function() {

$('.datatable-1').dataTable();

$('.dataTables_paginate').addClass("btn-group datatable-pagination");

178
$('.dataTables_paginate > a').wrapInner('<span />');

$('.dataTables_paginate > a:first-child').append('<i class="icon-chevron-left


shaded"></i>');

$('.dataTables_paginate > a:last-child').append('<i class="icon-chevron-right


shaded"></i>');

} );

</script>

</body>

</html>

<?php } ?>

MANAGE PRODUCT

<?php

session_start();

179
include('include/config.php');

if(strlen($_SESSION['alogin'])==0)

header('location:index.php');

else{

date_default_timezone_set('Asia/Kolkata');// change according timezone

$currentTime = date( 'd-m-Y h:i:s A', time () );

if(isset($_GET['del']))

mysqli_query($con,"delete from products where id = '".$_GET['id']."'");

$_SESSION['delmsg']="Product deleted !!";

}?>

<!DOCTYPE html>

<html lang="en">

<head>

<title>Admin| Manage Products</title>

<link type="text/css" href="bootstrap/css/bootstrap.min.css" rel="stylesheet">

<link type="text/css" href="bootstrap/css/bootstrap-responsive.min.css"


rel="stylesheet">

<link type="text/css" href="css/theme.css" rel="stylesheet">

<link type="text/css" href="images/icons/css/font-awesome.css" rel="stylesheet">

<link type="text/css" href='http://fonts.googleapis.com/css?


family=Open+Sans:400italic,600italic,400,600' rel='stylesheet'>

</head>

180
<body>

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

<div class="wrapper">

<div class="container">

<div class="row">

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

<div class="span9">

<div class="content">

<div class="module">

<div class="module-head">

<h3>Manage Products</h3>

</div>

<div class="module-body table">

<?php if(isset($_GET['del']))

{?>

<div class="alert alert-error">

<button type="button" class="close" data-dismiss="alert">×</button>

<strong>Oh snap!</strong> <?php echo htmlentities($_SESSION['delmsg']);?><?


php echo htmlentities($_SESSION['delmsg']="");?>

</div>

<?php } ?>

<br />

<table cellpadding="0" cellspacing="0" border="0" class="datatable-1 table table-


bordered table-striped display" width="100%">

<thead>

181
<tr>

<th>#</th>

<th>Product Name</th>

<th>Category </th>

<th>Subcategory</th>

<th>Company Name</th>

<th>Product Creation Date</th>

<th>Action</th>

</tr>

</thead>

<tbody>

<?php $query=mysqli_query($con,"select
products.*,category.categoryName,subcategory.subcategory from products join
category on category.id=products.category join subcategory on
subcategory.id=products.subCategory");

$cnt=1;

while($row=mysqli_fetch_array($query))

{?>

<tr>

<td><?php echo htmlentities($cnt);?></td>

<td><?php echo htmlentities($row['productName']);?></td>

<td><?php echo htmlentities($row['categoryName']);?></td>

<td> <?php echo htmlentities($row['subcategory']);?></td>

<td><?php echo htmlentities($row['productCompany']);?></td>

<td><?php echo date('M d,Y' ,strtotime($row['postingDate']));?></td>

182
<td>

<a href="edit-products.php?id=<?php echo $row['id']?>" ><i class="icon-


edit"></i></a>

<a href="manage-products.php?id=<?php echo $row['id']?>&del=delete"


onClick="return confirm('Are you sure you want to delete?')"><i class="icon-remove-
sign"></i></a></td>

</tr>

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

</table>

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

</div></div>

</div></div>

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

<script src="scripts/jquery-1.9.1.min.js" type="text/javascript"></script>

<script src="scripts/jquery-ui-1.10.1.custom.min.js" type="text/javascript"></script>

<script src="bootstrap/js/bootstrap.min.js" type="text/javascript"></script>

<script src="scripts/flot/jquery.flot.js" type="text/javascript"></script>

<script src="scripts/datatables/jquery.dataTables.js"></script>

<script>

$(document).ready(function() {

$('.datatable-1').dataTable();

$('.dataTables_paginate').addClass("btn-group datatable-pagination");

$('.dataTables_paginate > a').wrapInner('<span />');

$('.dataTables_paginate > a:first-child').append('<i class="icon-chevron-left


shaded"></i>');

183
$('.dataTables_paginate > a:last-child').append('<i class="icon-chevron-right
shaded"></i>');

} );

</script>

</body>

</html>

<?php } ?>

USER LOGIN LOG

<?php

session_start();

include('include/config.php');

if(strlen($_SESSION['alogin'])==0)

184
header('location:index.php');

else{

?>

<!DOCTYPE html>

<html lang="en">

<head>

<title>Admin| Users log</title>

<link type="text/css" href="bootstrap/css/bootstrap.min.css" rel="stylesheet">

<link type="text/css" href="bootstrap/css/bootstrap-responsive.min.css"


rel="stylesheet">

<link type="text/css" href="css/theme.css" rel="stylesheet">

<link type="text/css" href="images/icons/css/font-awesome.css" rel="stylesheet">

<link type="text/css" href='http://fonts.googleapis.com/css?


family=Open+Sans:400italic,600italic,400,600' rel='stylesheet'>

</head>

<body>

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

<div class="wrapper">

<div class="container">

<div class="row">

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

<div class="span9">

<div class="content">

<div class="module">

185
<div class="module-head">

<h3> Users Log</h3>

</div>

<div class="module-body table">

<table cellpadding="0" cellspacing="0" border="0" class="datatable-1 table table-


bordered table-striped display" width="100%">

<thead>

<tr>

<th>#</th>

<th> User Email</th>

<th>User ID </th>

<th>Login Time</th>

<th>Logout Time </th>

<th>Status </th>

</tr>

</thead>

<tbody>

<?php $query=mysqli_query($con,"select * from userlog");

$cnt=1;

while($row=mysqli_fetch_array($query))

{?>

<tr>

<td><?php echo htmlentities($cnt);?></td>

<td><?php echo htmlentities($row['userEmail']);?></td>

<td><?php echo htmlentities($row['userid']);?></td>

186
<td> <?php echo htmlentities($row['loginTime']);?></td>

<td><?php echo htmlentities($row['logout']); ?></td>

<td><?php $st=$row['status'];

if($st==1)

echo "Successfull";

else

echo "Failed";

}?></td>

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

</table>

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

</div></div>

</div></div>

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

<script src="scripts/jquery-1.9.1.min.js" type="text/javascript"></script>

<script src="scripts/jquery-ui-1.10.1.custom.min.js" type="text/javascript"></script>

<script src="bootstrap/js/bootstrap.min.js" type="text/javascript"></script>

<script src="scripts/flot/jquery.flot.js" type="text/javascript"></script>

<script src="scripts/datatables/jquery.dataTables.js"></script>

<script>

$(document).ready(function() {

187
$('.datatable-1').dataTable();

$('.dataTables_paginate').addClass("btn-group datatable-pagination");

$('.dataTables_paginate > a').wrapInner('<span />');

$('.dataTables_paginate > a:first-child').append('<i class="icon-chevron-left


shaded"></i>');

$('.dataTables_paginate > a:last-child').append('<i class="icon-chevron-right


shaded"></i>');

} );

</script>

</body>

</html>

<?php } ?>

188
DATABASE

189
4.2 UML DIAGRAM

4.2.1 USE CASE DIAGRAM

190
4.2.2 ARCHITECTURE DIAGRAM

FLOW CHART

191
4.3 TEST CASES:

4.3.1 UNIT TESTING: -

192
Unit testing involves the design of test cases that validate that the internal
program logic is functioning properly, and that program inputs produce valid outputs.
All decision branches and internal code flow should be validated. It is the testing of
individual software units of the application .it is done after the completion of an
individual unit before integration. This is a structural testing, that relies on knowledge
of its construction and is invasive. Unit tests perform basic tests at component level
and test a specific business process, application, and/or system configuration. Unit
tests ensure that each unique path of a business process performs accurately to the
documented specifications and contains clearly defined inputs and expected results.
Unit testing is usually conducted as part of a combined code and unit test
phase of the software lifecycle, although it is not uncommon for coding and unit
testing to be conducted as two distinct phases.

TE TEST TEST STEPS INPUT EXPECTED ACTUAL RESULTS STAT


ST CASE DATA OUTPUT OUTPUT US
ID
1.Enter valid Admin ID: Navigated to Navigated Login Pass
username xavier home page to home successfully
2.Enter valid Password: page
password xavier123
3.Click on
login button
1. Enter valid Admin ID: To show an To show an Login Pass
id xavier error error attempt
Check the 2.Enter Password: “invalid “invalid failed
functionalit invalid xavier124 password” password”
1 y login page password
with 3.Click on
username login button
and 1. Enter Admin ID: To show an To show an Login Pass
password invalid id xavier 1 error error attempt
2.Enter valid Password: “invalid “invalid failed
password xavier123 username” username”
Username: 3.Click on
xavier login button
Password: 1. Enter Admin ID: To show an To show an Login Pass
xavier123 invalid id xavier 1 error error attempt
2.Enter Password: “invalid id or “invalid id failed
invalid xavier124 invalid or invalid
password password” password”
3.Click on
login button
1.Enter valid Username: Navigated to Navigated Login Pass
Check the name xavier admin page to admin successfully
functionalit 2.Enter valid Password: page
y sign up email xavier 123
page 3. Enter valid Email:

193
Username: Phone no. xaviermax07
xavier 4. Enter valid @gmail.com
Password: password Phone no:
xavier 123 5.Click on 1234567890
2 Email: sign up button
xaviermax0
7@gmail.co 1. Don’t Enter Username: To show an To show an Sign up Pass
m username error error attempt
Phone no: 2.Enter valid Password: “please enter “please stopped
1234567890 email xavier 123 username” enter
3. Enter valid Email: username”
Phone no. xaviermax07
4. Enter valid @gmail.com
password Phone no:
5.Click on 1234567890
sign up button
1. Enter valid Username: To show an To show an Sign up Pass
username xavier error error attempt
2.Don’t Enter Password: “please enter “please stopped
valid email xavier 123 valid mail id” enter valid
3. Enter valid Email: mail id”
Phone no.
4. Enter valid Phone no:
password 1234567890
5.Click on
sign up button
1.Enter name Name: Mail Sent. Mail Sent. Mail Pass
2.Enter mail Sharan Thank you Thank you successfully
id Mail id: Sent
3.Enter phone xyz@gmail.
no. com
4.Enter Phone
message no:12345678
5.Click on 90
submit button Message:
Check the hello
functionalit
3 y of contact 1. Don’t Enter Name: To show an To show an Mail doesn’t Pass
us to send name error error Sent
mail 2.Enter mail Mail id: “enter name” “enter
id xyz@gmail. name”
3.Enter phone com
no. Phone
4.Enter no:12345678
message 90
5. Enter Message:
message hello
6.Click on
submit button
1.Enter name Name: To show an To show an Mail doesn’t Pass

194
2.Enter mail Sharan error error Sent
id Mail id: “enter “enter
3.Enter phone xyz@gmail. message” message”
no. com
4. Don’t Phone
message no:12345678
6.Click on 90
submit button Message:

4.4 INTEGRATION TESTING: -


Software integration testing is the incremental integration testing of two or
more integrated software components on a single platform to produce failures caused
by interface defects.
The task of the integration test is to check that components or software
applications, e.g. components in a software system or – one step up – software
applications at the company level – interact without error.
Test Results: All the test cases mentioned above passed successfully. No defects
encountered.

Customer:
S.No Action Inputs Expected Actual Test Test
Output Output Result Comments
1. Launch localhost: Index page Index page Pass Launch
website successful

2. Click login Login page Login page Pass Navigate to


icon As customer Login page

3. Enter valid Enter The admin id The admin Pass Login


Username Admin ID: xavier and password id and successful
and Password: xavier that you’ve password Navigated to
Password 123 entered is that you’ve home page
and hit stored data. entered is
login Click Navigated to stored data.
button Login home page Navigated
to home
page

195
4. Enter valid Alert Alert Pass Invalid
Username Admin ID: xavier message. The message the Login
and invalid Password: xavier password password attempt
Password 2123 that you’ve that you’ve stopped
and hit entered is entered is
login Click incorrect. incorrect.
button Login
5. Select sign Enter name, It will go to It will go to Pass Navigate to
up in the phone no, login page login page login page
login page email id,
password click sign
up
6. Select pc It will It will Pass Navigate to
digital in Click display all display all pc digital
navigation pc digital types of pc types of pc page
bar games that games that
are available. are
available.
7. Select It will It will Pass Navigate to
PlayStation Click display display PlayStation
5 in PlayStation 5 in PlayStation 5 PlayStation 5 page.
consoles consoles drop down games 5 games
navigation tab in navigation bar
bar
8. Select cart It will It will Pass Navigate to
in Click display the display the the cart page
navigation Cart icon products that products
bar customer that
want to buy customer
want to buy
9. Select the Click add to cart Product Product Pass Navigate to
product icon on the product should be should be the cart page
and click added in the added in the
add to cart cart cart
10. Select Click check out in Check out Check out Pass Navigate to
check out the cart page should be should be the check
in cart page displayed displayed out page

196
CHAPTER-5

5.1 CONCLUSION.

Technology has made significant progress over the years to provide consumers a
better online shopping experience and will continue to do so for years to come.  With
the rapid growth of products and brands, people have speculated that online shopping
will overtake in-store shopping.  While this has been the case in some areas, there is
still demand for offline stores in market areas where the consumer feels more
comfortable seeing and touching the product being bought.  However, the availability
of online shopping has produced a more educated consumer that can shop around with
relative ease without having to spend a large amount of time.  In exchange, online
shopping has opened up doors to many small retailers that would never be in business
if they had to incur the high cost of owning a offline store.  At the end, it has been a
win-win situation for both consumer and sellers.

5.2 SCOPE FOR FUTURE ENHANCEMENT

Future plans for online phoenix gaming and accessories portal is to develop
search products for the customers so it will be much easier to the people to buy their
desired products quicky. and to add many products to the customer

197
6.1 REFERENCE:-

1. Online Shopping - An Overview


https://www.researchgate.net/publication/264556861_Online_Shopping_-
An_Overview
2. Online Shopping Behavior
https://dl.acm.org/doi/10.4018/IJSKD.2016100102
3. https://www.researchgate.net/publication/303691201_Online_Shopping
4. https://www.researchgate.net/publication/303696372_Online-Shopping
5. https://www.w3schools.com/html/default.asp
6. Cost-Effective Online Shopping
https://www.researchgate.net/publication/344679675_Cost-
Effective_Online_Shopping

198

You might also like