0% found this document useful (0 votes)
12 views

cake zone

php,mysql project cake zone with full source code
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views

cake zone

php,mysql project cake zone with full source code
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 132

A

Project Report On
Cake Zone
Submitted in the Partial fulfillment of the requirement for awarding the degree of

Bachelor of Computer Application (BCA)


Sem V, Year 2016-17
By
Doliy Raiyani[125]
Bansi Sakariya[73]

Under the Guidance of


Prof.Jitendra Kabariya

DEPARTMENT OF COMPUTER SCIENCE


LATE P.S. HIRAPARA MAHILA BCA COLLEGE JETPUR

Affiliated to
SAURASHTRA UNIVERSITY – RAJKOT
Preface

This report contains all the outputs of a project undertaken to develop a working
model of Cake Zone and to study the existing working system. As part of this study, we
analyzed the requirements of the working model and tried to improve it using the
technological functionality that the current computer science provides.
This volume contains the documentation summary of the working system, the
background study and analysis, the technical requirements and the working
specification of the developed system.
We recommend the user to take the advantage of the study presented here and
implement the system with their required improvisation. We hope this study will reduce
the burden of the reanalysis of the development phase.

II
Acknowledgment
“It is not possible to prepare a project report without the assistance &
encouragement of other people. This one is certainly no exception.”

On the very outset of this report, I would like to extend my sincere & heartfelt
obligation towards all the personages who have helped me in this endeavor. Without
their active guidance, help, cooperation & encouragement, I would not have made
headway in the project. I am ineffably indebted to our HOD Dr. Jaydeep Ramani for
conscientious guidance and encouragement to accomplish this assignment.

I am extremely thankful and pay my gratitude to my project guide


prof. Jitendra Kabariya
or his valuable guidance and support on completion of this project in its
presently.

I extend my gratitude to Department Of Computer Science, Late P.S. Hirapara


Mahila Bca College -Jetpur for giving me this opportunity.

Thanking You,

Doliy Raiyani[125]
Bansi sakariya[73]

III
INDEX
SR No Title Page No
1 Project Profile
1.1 Definition 1
1.2 Scope 1
1.3 Objective 1
2 system Analysis and Specification
2.1 Introduction 2
2.2 Feasibility Study 2
2.3 Problem Analysis 4
2.4 Need of New System 4
3 System Requirement Specification
3.1 Proposed System and 5
Advantages
4 System Design
4.1 Data Flow Diagram 6
4.2 E-R Diagram 7
4.3 Data Dictionary 10
5 Screen Shots 12
6 Coding 41
7 Testing (Manual, Test Cases and Test Data)
7.1 Manual Testing 122
7.2 Test Cases 123
8 Enhancements
8.1 Advantages 127
8.2 Limitation 127
8.3 Future Scope 127
9 References 128

IV
1-Project Profile

(1.1)Defination:-

The Project Cake Zone

(1.2)scope:-

[1]. This system works on mozila firefox and the version of any ssystem.it will be
developed for the good management of system and their customer.

[2]. User can cake zone any time.

(1.3)Objective:-

Our site goal to many people use for our site.


In this system is worked properly.
Our main aim is to manage the product.
We had developed a fully computerized system

BCA Dept., SPKM-Jetpur 1 A Project on: Cake Zone


2-System analysis and specification

(2.1)Preliminary Investigation:-

Preliminary Investigation:-

- This System which any person can Purchse without Physically Presense

- All The Related information of The product can be provided by this WebSite.

- This System is Develop for Purchasing product online.

- People can get all The information of product at home.

- It is used for Birthday, Friendship, Anniversay, valentine,


wedding, cupcake.

- It is less time consuming process.

 There is some advantage of our site.

1] This System is worked properly.


2] We had developed a Fully computerized System.

(2.2) Feasibility Study:-


Feasibility Study:-
Feasibilty study gives the idea about our software that it is feasible to devlop project
within such type of tools.it gives ratio to our project,how much area we can consuct.it is one
type of measurable for measured our project.

This is second stage after Priliminary Investigation ,


Feasibility Study divided in three types.

1. Technical Feasibility
2. Economical Feasibility
3. Operational Feasibility

BCA Dept., SPKM-Jetpur 2 A Project on: Cake Zone


1. Technical Feasibility:-

Our web site is Devloped with the help of current equipment and existing
Software & hardware technology.

Software Requirement:-

Category Sub-Category
Uwemp server Uwemp 3.0.2
Software php- 5.4.31

MYSQL mysql-5.6.20
Browser Mozila Firefox

Hardware Requirement:-

Category Sub-category
Processor Core 2 Due
Mother Bord G 31
RAM DDR2(2GB)
Hard Disk Sea gate 250
Key board Logitech
Mouse Logitech
Monitor LG 17` CRT

BCA Dept., SPKM-Jetpur 3 A Project on: Cake Zone


2.Economical Feasibility:-

In our System we use sufficient resource we are not using


any external resource we are not using any external resource .
So , we need is very minimum.

3.Operation Feasibility:-

- Our web site provide many operations which is use for


further development and implementation as a new.
- User can use this application in any browser.
(2.3) Problem Analysis:

 Error:Dose not edit the product of image.


Solution:coding mistak.

 Error:Not display to Add to cart in a quantity.


Solution:Query mistak.

 Error:Does not fetch the question in forgetpassword2.


Solution:fetch query mistak.

 Error:Not pass the data of Bill1.


Solution:insert query mistak.

(2.4) Need of New System:

 Our site very useful in people.


 In this system is worked properly.
 Our main aim is to manage the advertising.
 We had developed a fully computerized system.

BCA Dept., SPKM-Jetpur 4 A Project on: Cake Zone


3-System Requirement and specifications
(3.1)User:

Login
Registration
Feedback
Forget password
About us
Contact us
Category

 Login:
o User can login.

 Registration:
o User can registration.

 Feedback:
o User can give the feedback.

 Forget password:
o User can forget password in our site.

 About us:
o User can show the about in our site.

 Contact us:
o User can contact for the Developers.

 Category :
o User can show which product avalible in our site.
Admin:

Admin can be login.


Admin can verify the user upload product.
Admin can manage the category and sub-category.
Admin can manage the user registration and feedback.

BCA Dept., SPKM-Jetpur 5 A Project on: Cake Zone


4.System Design
(4.1)Data Flow Diagram

The symbol that are used the data flow diagram carry following meaning.

Symbol Name Use

It symbolizes
Rectangle The sources
It
Circle Symbolizes
The use data process
Unmarked It symbolizes
line Connectivity
Without a
It symbolized
Markied Connectivity
Line Without a
Round It symbolized
Rectangle Connectivity
Without a
Start/End

BCA Dept., SPKM-Jetpur 6 A Project on: Cake Zone


(4.1) 0-level

login cake zone login


user Insert,update,delete,vie
admin
Product purchase wfeedback,viewuser,man
agecategory,product

BCA Dept., SPKM-Jetpur 7 A Project on: Cake Zone


(4.2)1-level

Admin Registration User

Create
Manager Account Create
User Account
insert

Login Fetch
Login Login

View Fetch
Add View
Category
Category Category

View Add Fetch View


Product Product
Product

View View Send Add


Feedback
Feedback Feedback

View Insert
View Add
User Add to Cart
Purchase
Purchase

BCA Dept., SPKM-Jetpur 8 A Project on: Cake Zone


(4.2) E-R Diagram:-

U_Lastname
U_FirstName U_Emaild

U_Password U_ContactNo

U_Address
U_UserName

U_id Register U_Question

U_Answer
U_emailid
P_name P_id
U_UserName comment
Category
Feedback Has
U_id

F_id Has P_discription


P_id
B1_address P_quantity
B1_name B1_city Has Product
P_price
U_id Bill-1 Has
B1_contact C_id P_image P_name
B1_id
B1_total Add to cart P_quantity
Has Has
P_quantity
A_id P_id
P_id Bill-2 U_id

B2_id B1_id

BCA Dept., SPKM-Jetpur 9 A Project on: Cake Zone


(4.3) Data Dictionary

Registration
Column Name Data Type Remark
u_ id int(10) Primary key
u_ user Name Varchar (50) -
u_ pass word Varchar (25) -
u_ first Name Varchar(25) -
u_ last Name Varchar(25) -
u_ emailid Varchar(12) -
u_ contact no Varchar(35) -
u_ address Varchar(14) -
u_ type text -
u_ question Varchar(30) -
u_ answer varchar(30) -

Category
Column Name Data Type Remarks
c_ id Int(5) Primary key
c_ name Varchar(20) -

Product
Column Name Data Type Remarks
p_ id Int(10) Primary key
c_ id Int(10) Foreign key
p_ image Varchar(100) -
p_ name Varchar(10) -
p_ price Int(10) -
p_ quantity Int(10) -
P_ discription Varchar(30) -

Addtocart
Column Name Data Type Remarks
a_id Int(10) Primarykey
u_id Int(10) Foreignkey
p_id Int(10) Foreignkey
p_quantity Int(10) -

BCA Dept., SPKM-Jetpur 10 A Project on: Cake Zone


Bill1
Column Name Data Type Remark
b1_id Int(10) Primary key
u_ id Int(10) Foreign key
b1_name Varchar(30) -
b1_ address Varchar(30) -
b1_ email id Varchar(30) -
b1_ contact no Varchar(30) -
b1_total Int(10) -
b1_status Int(10) -

Bill2
Column Name Data Type Remark
b1_id Int(10) Foreign key
b2_ id Int(10) Primary key
p_ id Int(10) Foreign key
p_ quantity Int(10) -

Feedback
Column Name Data Type Allow Nulls
f_ id int(12) Primary key
r_ id int(10) Foreign key
r_ user Name Varchar (50) -
r_ emailid Varchar(12) -
comment Varchar(50) -

BCA Dept., SPKM-Jetpur 11 A Project on: Cake Zone


5.Screen Shot

Home

BCA Dept., SPKM-Jetpur 12 A Project on: Cake Zone


Registration

BCA Dept., SPKM-Jetpur 13 A Project on: Cake Zone


Login

BCA Dept., SPKM-Jetpur 14 A Project on: Cake Zone


Forget password

BCA Dept., SPKM-Jetpur 15 A Project on: Cake Zone


Forget password1

BCA Dept., SPKM-Jetpur 16 A Project on: Cake Zone


Forget password2

BCA Dept., SPKM-Jetpur 17 A Project on: Cake Zone


Chang password

BCA Dept., SPKM-Jetpur 18 A Project on: Cake Zone


About Us

BCA Dept., SPKM-Jetpur 19 A Project on: Cake Zone


Contact Us

BCA Dept., SPKM-Jetpur 20 A Project on: Cake Zone


Category

BCA Dept., SPKM-Jetpur 21 A Project on: Cake Zone


Items Detail

BCA Dept., SPKM-Jetpur 22 A Project on: Cake Zone


Shopping cart

BCA Dept., SPKM-Jetpur 23 A Project on: Cake Zone


Shopping detail

BCA Dept., SPKM-Jetpur 24 A Project on: Cake Zone


Message

BCA Dept., SPKM-Jetpur 25 A Project on: Cake Zone


Feedback

BCA Dept., SPKM-Jetpur 26 A Project on: Cake Zone


Admin
Login

BCA Dept., SPKM-Jetpur 27 A Project on: Cake Zone


View Product

BCA Dept., SPKM-Jetpur 28 A Project on: Cake Zone


Add Product

BCA Dept., SPKM-Jetpur 29 A Project on: Cake Zone


Update Product

BCA Dept., SPKM-Jetpur 30 A Project on: Cake Zone


View Category

BCA Dept., SPKM-Jetpur 31 A Project on: Cake Zone


Add Category

BCA Dept., SPKM-Jetpur 32 A Project on: Cake Zone


Update Category

BCA Dept., SPKM-Jetpur 33 A Project on: Cake Zone


View Feedback

BCA Dept., SPKM-Jetpur 34 A Project on: Cake Zone


View Register

BCA Dept., SPKM-Jetpur 35 A Project on: Cake Zone


View Purchase

BCA Dept., SPKM-Jetpur 36 A Project on: Cake Zone


View

BCA Dept., SPKM-Jetpur 37 A Project on: Cake Zone


ManageAdmin

BCA Dept., SPKM-Jetpur 38 A Project on: Cake Zone


AddAdmin

BCA Dept., SPKM-Jetpur 39 A Project on: Cake Zone


UpdateAdmin

BCA Dept., SPKM-Jetpur 40 A Project on: Cake Zone


1. User

Index.php
<?php
require_once("connection.php");
?>
<?php
{
include("connection.php");
if(isset($_REQUEST['page']))
{
$page=$_REQUEST['page'];
}
}
?>
<html>
<script language="javascript">
function f1()
{
return confirm("ure you sure want to delete.......");
}
function f2()
{

return confirm("ure you sure want to edit.......");


}
</script>
<head>
<link href="style/style.css" type="text/css" rel="stylesheet"/>
</head>
<body>
<div id="wrapper">
<div id="header">
<div id="login" class="float-right">
<?php
session_start();
if(isset($_SESSION['user']))

BCA Dept., SPKM-Jetpur 41 A Project on: Cake Zone


{

echo"<i><a href='index.php?page=logout'><img src='image/logout.png' height='20px'/></a></i>";


echo"<br>";
echo"<font color='red' />Welcome...".$_SESSION['user']."<br>";

$que="select * from `addtocart` where u_Id=".$_SESSION['u_Id'];


$res=mysql_query($que,$con);
$row=mysql_num_rows($res);
echo"<a href='index.php?page=addtocart'><font color='red' size='20px'>$row</font>&nbsp;<img
src='image/69.jpeg' height='40px' width='40px'></a>";
echo"<i><a href='index.php?page=changepassword'>Change Password</a></i><br>";

}
else
{
echo"<i><a href='index.php?page=login'><img src='image/login1.png' height='25px'/></a></i>";
echo"<br>";
}

?>
</div>
<div class="float_left_img">
<img src="image/lo.jpg" height="130" width="130">
</div>
<div id="title">Cake Zone </div>
<div class="float-clear"></div>
</div>
<div id="menu">

<?php
if(isset($_SESSION['user']))
{
?>
<a href='index.php?page=home'>Home</a>
<a href='index.php?page=aboutus'>About Us</a>
<a href='index.php?page=gallary'>Category</a>
<a href='index.php?page=contant'>Contant</a>
<a href='index.php?page=feedback'>Feedback</a>
<?php
}
else

BCA Dept., SPKM-Jetpur 42 A Project on: Cake Zone


{
echo"<a href='index.php?page=home'>Home</a>";
}
?>

</div>
<div id="content">
<?php

if(isset($_REQUEST["page"]))
{
include ("include/".$_REQUEST['page'].".php");
}
else
{
include "include/home.php";
}
?>
</div>
<div id="footer">
<h4>Developed by:Bansi sakariya & Doliy raiyani</h4>
</div>
</div>
</body>
</html>

Style.css
*
{
margin:0px;
padding:0px;
}
body
{
background:#goEEgo;
}
.float-right
{
float:right;

}
.float-right1
{
float:right;

BCA Dept., SPKM-Jetpur 43 A Project on: Cake Zone


}
.float-center title
{
float:center;

}
.float-clear
{
float:clear;
}
.label
{
width:108px;
height:20px;
color:black;
margin:2px;
}
.label1
{
width:80px;
height:20px;
color:black;
margin:2px;
}
table
{

margin:0px 10px;
padding:0px 0px 10px 10px;
}
.validation
{
color:red;
}
.textbox
{
width:178px;
height:25px;
color:black;
margin:2px;
}
.button
{
width:108px;
height:28px;
color:black;

BCA Dept., SPKM-Jetpur 44 A Project on: Cake Zone


margin:4px;
font-size:18px;
background-color:grey;
font-family:italic;
border-radius:10px;
}
#wrapper
{
margin:auto;
width:1000px;
}
#header
{
background-image:url('../image/back.jpg');
color:white;
background:#000000;
height:0auto;
margin:20px 10px 0px 10px;
padding:2px 0px 55px 5px;
font-size:40px;
border:solid 4px ;
border-radius:20px;
font-family:Vivaldi;

}
#title1
{
color:red;
}
.title
{
background-color:grey;
color:white;
}
#login
{
font-size:40px;
color:black;
margin:14px;
}

.float_left_img
{

float:left;
height:10px;
width:100px;

BCA Dept., SPKM-Jetpur 45 A Project on: Cake Zone


}
#title
{
color:white;
font-family:Vivaldi;
font-size:60px;
padding:0px 90px 10px 220px;

}
#menu
{

margin:0px 9px;
text-decoration:none;
border:solid 4px black;
background-color:silver;
border-radius:20px;
border-radius:20px;

}
#menu a
{
padding:10px;
font-size:26px;

}
#menu a:hover
{
color:red;
background-color:black;
border-radius:25px;
}
#content
{
background-image:url('../image/ccc.jpg');
margin:1px;
color:black;
text-align:center;
height:0auto;
width:0auto;
font-size:20px;
font-family:Cooper;
font-style:italic;
padding:20px 0px 50px 10px;
margin:0px 10px 0px 10px;
border-radius:20px;
border:solid 4px black;

BCA Dept., SPKM-Jetpur 46 A Project on: Cake Zone


}
#footer
{
background-image:url('../image/back1.jpg');
color:white;
background:#000000;
height:30px;
font-style:italic;
text-align:right;
padding:1px 10px 3px 5px;
font-size:30px;
margin:0px 10px 0px 10px;
border-radius:20px;
font-family:V ;
border:solid 4px;

.float_left
{
float:left;
}

Connection.php
<?php
$con=mysql_connect("localhost","root","root");
$db=mysql_select_db("cake zone",$con);
session_start();
?>

Include

Aboutus.php
<?php
if(isset($_SESSION["u_Id"]))
{
?>
<html>
<head>
<link href="style/style.css" type="text/css" rel="stylesheet"/>
</head>
<form>

BCA Dept., SPKM-Jetpur 47 A Project on: Cake Zone


<center>
<div>
<div class="about">
<table align="center">
<h1 align="center">Aboutus</h1>
</table>
<table align="center">
<tr>
<td id='pad'>
<img src="image/m.jpg" height="200" width="200"></td>
<td> <h4> To Cake On Demand <br><br>
This Site You To Purchase The Product<br><br>
This See Provides Facility Like......<br><br>
If Your Looking Purchase All Flavour Any Type Of Cake Then You Can
Find And Purchase if.For This You Have an Account So,Please Register if
a Not Member Of This Site.
</h4>
</br>
</td>
</tr>
</table>
</div>
</div>
</center>
</form>
</html>
<?php
}
else
{
header("location:login.php");
}
?>

Addtocart.php
<?php
if(isset($_SESSION["u_Id"]))
{
?>
<?php
require_once("connection.php");
$que="SELECT * FROM addtocart where u_Id=".$_SESSION['u_Id']." ";
$res=mysql_query($que,$con);
?>
<form>
<center>

BCA Dept., SPKM-Jetpur 48 A Project on: Cake Zone


<table align="center" border="9">
<tr>
<th colspan=6 class="title"><h1>Shopping Cart</th>
</tr>
<tr>
<td><b>Image</b></td>
<td><b>Name</b></td>
<td><b>Quantity</b></td>
<td><b>Price</b></td>
<td><b>Total</b></td>
<td><b>Action</b></td>
</tr>
<?php
$p_id=24;
$total=0;
while($row=mysql_fetch_array($res))
{
$que1="SELECT * FROM product where p_id=".$row['p_id'];
$res1=mysql_query($que1,$con);
while($row1=mysql_fetch_array($res1))
{
echo"<tr>";
echo"<td><img src='upload/".$row1['p_image']."'height='100px'
width='100px'></td>";
echo"<td>".$row1['p_name']."</td>";
echo"<td>".$row['p_quantity']."</td>";
echo"<td>".$row1['p_price']."</td>";
$total=$row['p_quantity']*$row1['p_price'];
echo"<td>".$total."</td>";
echo" <td><a href=action/delete_cart.php?p_id=".$row['p_id']."><image
src='image/delete1.gif' height='20px'/></a>";
echo "</td>";
echo "</tr>";
$total1=$total+$total1;
}
$p_id++;
}
echo "<to align='right' colspan='5'><font color='#A11319' size='5pt'>Total
&nbsp;&nbsp;&nbsp;</font></td>
<td><font color='green' size='5pt'>$total1</font></td>";
echo "<tr>
<td colspan='6' align='center'>
<a href='index.php?page=gallary'>
<font color='blue' size='5pt'><< Continue Shopping</font>
</a>

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

BCA Dept., SPKM-Jetpur 49 A Project on: Cake Zone


<a
href=index.php?page=purchase&u_Id=".$_SESSION['u_Id']."&total1=$total1>
<font color='blue' size='5pt'>Purchase >></font>
</a>
</td>
</tr>";
?>
</table>
</form>
<?php
}
else
{
include("include/login.php");
}
?>

Allitem.php
<div>
<center>

<?php
echo "<form>";
require_once("connection.php");
if(isset($_REQUEST['b1_id']))
{
$que="select * from bill1 where b1_id=".$_REQUEST['b1_id']." && b1_status=0";
$res=mysql_query($que,$con);
$row=mysql_fetch_array($res);
$row=mysql_fetch_array($res);
$row=mysql_fetch_array($res);
$id=$row[0];
$que1="select * from bill2 where b1_id=$id";
$res1=mysql_query($que1,$con);
$que3="select * from register where u_Id=".$_SESSION['u_Id'];
$res3=mysql_query($que3,$con);
$row3=mysql_fetch_array($res3);
$name=$row3[2];
echo "<table border='2' align='center'>";
echo "<tr>";
echo "<th colspan='5'><font size='7px'>Product</font></th></tr>";
echo "<tr><td>Name</td>";
echo "<td>Image</td>";
echo "<td>Price</td>";
echo "<td>Quantity</td>";

BCA Dept., SPKM-Jetpur 50 A Project on: Cake Zone


echo "<td>Total</td></tr>";

$total1=0;
while($row1=mysql_fetch_array($res1))
{
$id1=$row1[2];
$que2="select * from product where p_id=$id1";
$res2=mysql_query($que2,$con);
while($row2=mysql_fetch_array($res2))
{
echo"<tr>";
echo"<td>".$row2['p_name']."</td>";
echo "<td><img src='upload/".$row['p_image']."'height=70px
width=70px></td>";

echo"<td>".$row2['p_price']."</td>";
echo"<td>".$row1['p_quantity']."</td>";
$total=$row1['p_quantity']*$row2['p_price'];
echo"<td>".$total."</td></tr>";
$total1=$total+$total1;
}
}
echo"<td align='right'clospan='4'><font1>Total=</td>
<td><font1>$total1</td>";
}

echo "</table>";
echo "</form>";
?>
</div>

Category.php
<?php
if(isset($_SESSION["u_Id"]))
{
?>
<?php
$con=mysql_connect("localhost","root","root");
$db=mysql_select_db("cake zone",$con);
$query="select * from category";
$result=mysql_query($query);
if($result)
{
echo"<center>";
echo "<table border=1>";
echo "<tr><th colspan=4 class='title'><h2>ViewCategory</h2></th></tr>";

BCA Dept., SPKM-Jetpur 51 A Project on: Cake Zone


echo"<tr><th colspan=4 align=right><a href='index.php?page=a_addcategory'><img
src='image/add.png'height='20px'/></a>";
echo"<tr><th>Name</th>
<th colspan=3>Action</th></tr>";
echo "<tr>";
while($row=mysql_fetch_array($result))
{
echo "<td>".$row[1]."</td>";
echo "<td>".$row[2]."</td>";
echo "<td ><a href=index.php?page=a_addcategory&c_id=".$row['c_id']."><img
src='image/edit.png'height='20px' onclick='return f2()'/></a>"."</td>";
echo "<td ><a href=action/category_delete.php?c_id=".$row['c_id']."><img
src='image/delete1.gif'height='20px' onclick='return f1()'/></a>"."</td>";
echo "</tr>";
}
echo "</table> </center>";
}
else
{
echo mysql_query();
}
?>
<?php
}
else
{
include("include/login.php");
}
?>

Changepassword.php
<html>
<head>
<link href="style/style.css" type="text/css" rel="stylesheet"/>
<script language="JavaScript" src="js/validations.js" type="text/javascript"
xml:space="preserve"></script>
</head>
<body onload='Change Password.nam.focus()'>
<form name="frm" action="action/checkpassword.php"method="POST">
<div align="center">
<div id="title1">
</div>
<table border="2">
<tr>
<th colspan="3" class="title">

BCA Dept., SPKM-Jetpur 52 A Project on: Cake Zone


<font>
<h2>Change Password
</font></h2>
</th>
</tr>
<?php
if(isset($_REQUEST['msg']))
{
if($_REQUEST['msg']==1)
{
echo"old password is wrong";
}
if($_REQUEST['msg']==0)
{
echo"increct password";
}
if($_REQUEST['msg']==2)
{
echo"please new password & confrim password same";
}
}
?>

<tr>
<td class="lable">Old password</td>
<td><div id='frm_txtOldpwd_errorloc' class='validation'></div>
<input type="password" class="textbox"name="txtOldpwd" placeholder="OldPassword">
</td>
</tr>
<tr>
<td class="lable">New password</td>
<td><div id='frm_txtNewpwd_errorloc' class='validation'></div>
<input type="password" class="textbox"name="txtNewpwd" placeholder="NewPassword">
</td>
</tr>
<tr>
<td class="lable">Confrim password</td>
<td><div id='frm_txtCpwd_errorloc' class='validation'></div>
<input type="password" class="textbox"name="txtCpwd" placeholder="ConfrimPassword">
</td>
</tr>
<tr>
<td colspan=2 align="center">
<input type="submit" value="Change" name="btnChange" class="button">
<input type="reset" value="Reset" name="btnReset" class="button">
</td>
</tr>

BCA Dept., SPKM-Jetpur 53 A Project on: Cake Zone


</table>
</body>
</div>
</form>
</html>

<script language="JavaScript" type="text/javascript" xml:space="preserve">


//<![CDATA[
var frmvalidator = new Validator("frm");
frmvalidator.EnableOnPageErrorDisplay();
frmvalidator.EnableMsgsTogether();

frmvalidator.addValidation("txtOldpwd","req","Please Enter OldPassword.");


frmvalidator.addValidation("txtOldpwd","minlen=3","Password Must be in Minimum 3
Characters...");

frmvalidator.addValidation("txtNewpwd","req","Please Enter NewPassword.");


frmvalidator.addValidation("txtNewpwd","minlen=3","Password Must be in Minimum 3
Characters...");

frmvalidator.addValidation("txtCpwd","req","Please Enter ConfrimPassword.");


frmvalidator.addValidation("txtCpwd","minlen=3","Password Must be in Minimum 3
Characters...");

//]]></script>

Contantus.php
<?php
if(isset($_SESSION["u_Id"]))
{
?>
<center>
<table>
<b>
<p>Bansi Sakariya.<img src="image/100.png" height="50" width="50"></td></b></br>
[email protected]
<p>7894561120<img src="image/baby.jpg" height="50" width="70"></p>
<p>Doliy Raiyani.<img src="image/100.png" height="50" width="50"></td></b>
</br>
[email protected]
<p>1234567890<img src="image/baby.jpg" height="50" width="70"></p>
</table>
</center>
<?php
}
else

BCA Dept., SPKM-Jetpur 54 A Project on: Cake Zone


{
include("include/login.php");
}
?>

Feedback.php
<?php
if(isset($_SESSION["u_Id"]))
{
?>
<div align="center">
<html>
<head>
<link href="css/style.css" type="text/css" rel="stylesheet" />
<script language="JavaScript" src="js/validations.js" type="text/javascript"
xml:space="preserve"></script>
<title border="6">Registration</title>
</head>
<body onload='frm.nam.focus()'>
<form name="frm" action="action/feedback_insert.php" method="POST">
<table border="6">
<tr>
<th colspan=2 class="title"><font><h2>Feedback</font></h2>
<form name="feedback" action="action/feedback_insert.php" method="POST">
</tr>
<tr>
<td class="lable">Enter Name</td>
<td><div id='frm_u_username_errorloc' class='validation'></div>
<input type="text" name="u_username" placeholder="Enter Name" class="textbox"></td>
</tr>
<tr>
<td class="lable">EmailId</td>
<td> <div id='frm_u_emailid_errorloc' class='validation'></div>
<input type="text" name="u_emailid" placeholder="EmailId" class="textbox"></td>
</tr>
<tr>
<td class="lable">Comment</td>
<td><div id='frm_comment_errorloc' class='validation'></div>
<input type="text" name="comment" placeholder="Comment" class="textbox"></td>
</tr>
<tr>
<td colspan="2" align="center"><br>
<input type="submit" value="submit" name="btnsubmit" class="button">
<input type="reset" value="clear" name="btnreset" class="button">
</tr>

BCA Dept., SPKM-Jetpur 55 A Project on: Cake Zone


</table>
</form>
</body>
</html>
</div>

<script language="JavaScript" type="text/javascript" xml:space="preserve">


//<![CDATA[
var frmvalidator = new Validator("frm");
frmvalidator.EnableOnPageErrorDisplay();
frmvalidator.EnableMsgsTogether();

frmvalidator.addValidation("u_username","req","Please Enter Name...");


frmvalidator.addValidation("u_username","alpha_s","Customer Name can only contain
Alphabets...");

frmvalidator.addValidation("u_emailid","req","Please Enter Email Address...");


frmvalidator.addValidation("u_emailid","email","Please Enter Valid Email Address...");

frmvalidator.addValidation("comment","req","Please Enter comment...");


frmvalidator.addValidation("comment","alpha_s","Customer Name can only contain
Alphabets...");

//]]></script>
<?php
}
else
{
include("include/login.php");
}
?>

Forget_ans.php

<?php
include("connection.php");
echo $u_Id=$_REQUEST['u_Id'];
if(isset($u_Id))
{
$query="select * from register where u_Id='$u_Id'";
$result=mysql_query($query,$con);
if($result)
{
if($row=mysql_fetch_array($result))
{
$u_Question=$row['u_Question'];

BCA Dept., SPKM-Jetpur 56 A Project on: Cake Zone


}
}
else
{
echo mysql_error();
}
}

?>
<html>
<head>
<link rel="stylesheet" href="style/style.css" type="text/css" />
<script language="JavaScript" src="js/validations.js" type="text/javascript"
xml:space="preserve"></script>
</head>
<body onload='Forget password.nam.focus()'>
<form name="frm" action="action/forget2.php" method="POST">
<center>
<table border="8" align="center" class="table">
<tr>
<th colspan="2">Forget password...???</th>
</tr>

<tr>
<td>Security Question:</td>
<td><input type="text" value="<?php echo $u_Question;?>">
</td>
</tr>
<?php
echo"<input type='hidden' name='u_Id' value='$u_Id'>";
?>
<tr>
<td>Answer</td>
<td><div id='frm_u_Answer_errorloc' class='validation'></div>
<input type="password" name="u_Answer" class="textbox"/></td>
</tr>
<tr>
<td colspan="2" align="center">
<input type="submit" name="Next" value="Next"/>
<input type="reset" name="cancel" value="Cancel"/>
</td>
</tr>
</table>
</center>
</form>
</body>
</html>

BCA Dept., SPKM-Jetpur 57 A Project on: Cake Zone


<script language="JavaScript" type="text/javascript" xml:space="preserve">
//<![CDATA[
var frmvalidator = new Validator("frm");
frmvalidator.EnableOnPageErrorDisplay();
frmvalidator.EnableMsgsTogether();

frmvalidator.addValidation("u_Answer","req","Please Enter UserName...");


frmvalidator.addValidation("u_Answer","alpha_s","Customer Name can only contain
Alphabets...");

//]]></script>

Forget_pass.php
<html>
<head>
<link rel="stylesheet" href="style/style.css" type="text/css" />
<script language="JavaScript" src="js/validations.js" type="text/javascript"
xml:space="preserve"></script>
</head>
<body onload='Forget password.nam.focus()'>
<form name="frm" action="action/forget3.php" method="POST">
<center>
<table border="8" class="table">
<tr>
<th colspan="2">Forget Password...???</th>
</tr>
<?php
if(isset($_REQUEST['msg']))
{
if($_REQUEST['msg']==1)
{
echo"<center><h1><i>Incorrect password..</center>";
}
if($_REQUEST['msg']==0)
{
echo"Confirm password successfully...";
}
if($_REQUEST['msg']==2)
{
echo"<center><h1><i>New and Confirm password not same..</center>";
}
}
?>
<?php
$u_Id=$_REQUEST['u_Id'];
if(isset($u_Id))

BCA Dept., SPKM-Jetpur 58 A Project on: Cake Zone


{
echo"<input type='hidden' name='u_Id' value='$u_Id'>";
}
?>
<tr>
<td>New Password </td>
<td><div id='frm_newpass_errorloc' class='validation'></div>
<input type="password" name="newpass" class="textbox"/></td>
</tr>
<tr>
<td>Confirm password </td>
<td><div id='frm_conpass_errorloc' class='validation'></div>
<input type="password" name="conpass" class="textbox"/></td>
</tr>
<tr>
<td colspan="2" align="center">
<input type="submit" name="submit" value="Submit"/>
<input type="reset" name="cancel" value="Cancel"/>
</td>
</tr>
</table>
</center>
</form>
</body>
</html>

<script language="JavaScript" type="text/javascript" xml:space="preserve">


//<![CDATA[
var frmvalidator = new Validator("frm");
frmvalidator.EnableOnPageErrorDisplay();
frmvalidator.EnableMsgsTogether();

frmvalidator.addValidation("newpass","req","Please Enter Password.");


frmvalidator.addValidation("newpass","minlen=3","Password Must be in Minimum 3
Characters...");

frmvalidator.addValidation("conpass","req","Please Enter Password.");


frmvalidator.addValidation("conpass","minlen=3","Password Must be in Minimum 3
Characters...");
//]]></script>

Forget_user.php

<html>
<head>
<link rel="stylesheet" href="style/style.css" type="text/css" />

BCA Dept., SPKM-Jetpur 59 A Project on: Cake Zone


<script language="JavaScript" src="js/validations.js" type="text/javascript"
xml:space="preserve"></script>
</head>
<body onload='Forget password.nam.focus()'>
<form name="frm" action="action/forget1.php" method="POST">
<center>
<table border="6" class="table">
<tr>
<th colspan="3">Forget password</th>
</tr>
<tr>
<td>Username??</td>
<td><td><div id='frm_u_UserName_errorloc' class='validation'></div>
<input type="text" name="u_UserName" class="text" placeholder="Enter
User Name"></td>
</tr>
<tr>
<td colspan="3" align="center">
<input type="submit" name="next" value="Next"/>
<input type="reset" name="cancel" value="Cancel"/>
</td>
</tr>
</table>
</center>
</form>
</body>
</html>

<script language="JavaScript" type="text/javascript" xml:space="preserve">


//<![CDATA[
var frmvalidator = new Validator("frm");
frmvalidator.EnableOnPageErrorDisplay();
frmvalidator.EnableMsgsTogether();

frmvalidator.addValidation("u_UserName","req","Please Enter UserName...");


frmvalidator.addValidation("u_UserName","alpha_s","Customer Name can only contain
Alphabets...");

//]]></script>

Gallery.php

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

BCA Dept., SPKM-Jetpur 60 A Project on: Cake Zone


?>
<?php
$con=mysql_connect("localhost","root","root");
$db=mysql_select_db("cake zone",$con);
$que="select * from category";
$res=mysql_query($que,$con);

echo "<div class='float_left'>";

echo "<form><table border=3 align='center' class='table'>";


echo "<th class='title'><h1>Category</th>";

echo "<tr><td><a href='index.php?page=gallary&c_id=c_id'><h2>View


All</a><br></td></tr>";
while($row=mysql_fetch_array($res))
{
echo"<tr><td><h3><a
href='index.php?page=gallary&c_id=".$row['c_id']."'>".ucWords($row['c_name'])."</a><br></td></tr>";
}
echo "<input type='hidden' value='items' name='page' id='page'>";

echo "</table></form></div>";

echo "<div class='float_right'>";


if(isset($_REQUEST['c_id']))
{
$que="select * from product where c_id=".$_REQUEST['c_id'];
$res=mysql_query($que,$con);
echo"<center>";
echo "<table border='3' align='center' class='table'>";
echo "<tr>";
while($row=mysql_fetch_array($res))
{
echo "<td>";
echo"<table>";
echo "<tr>";
echo "<td><a href='index.php?page=zoomitems&p_id=$row[p_id]'><img
src='upload/".$row['p_image']."' height='80px' width='80px'></a></td>";
echo "</tr>";
echo "<tr>";
echo"<td align='center'>Name:<font
size='5px'>".ucWords($row['p_name'])."</font></td>";
echo "</tr>";
echo "<tr>";
echo "<td align='center'>Price:".$row['p_price']."</font></td>";
echo "</tr>";
echo "<tr>";

BCA Dept., SPKM-Jetpur 61 A Project on: Cake Zone


echo "<td align='center'><h4><a
href=index.php?page=itemsdetail&p_id=".$row['p_id']."><img src='image/add5.jpg' height='40px'
width='40px'></a></h4></td>";
echo "</tr>";
echo "</table>";
echo "</td>";

$i++;
if($i%4==0)
{
echo "</tr>";
echo "<tr>";
}
}
echo "</tr>";
echo "</table>";
echo "</div>";
}
else
{
echo "<div class='float_right'>";
$que="select * from product";
$res=mysql_query($que,$con);
echo"<center>";
echo "<table border='3'>";
echo "<tr>";
while($row=mysql_fetch_array($res))
{
echo "<td>";
echo"<table>";
echo "<tr>";
echo "<td><a href='index.php?page=zoomitems&p_id=$row[p_id]'><img
src='upload/".$row['p_image']."' height='80px' width='80px'></a></td>";
echo "</tr>";
echo "<tr>";
echo"<td align='center'>".ucWords($row['p_name'])."</td>";
echo "</tr>";
echo "<tr>";
echo "<td align='center'>Price :<img src='image/s.jpeg' height=14
width=15>".$row['p_price']."</td>";
echo "</tr>";
echo "<tr>";
echo "<td align='center'><h4><a
href=index.php?page=itemsdetail&p_id=".$row['p_id']."><img src='image/add5.jpg' height='40px'
width='40px'></a></h4></td>";
echo "</tr>";
echo "</table>";

BCA Dept., SPKM-Jetpur 62 A Project on: Cake Zone


echo "</td>";
$i++;
if($i%4==0)
{
echo "</tr>";
echo "<tr>";
}
}
echo "</tr>";
echo "</table>";
echo "</div>";
echo"</div>";
}

?>
<?php
}
else
{
include("include/login.php");
}
?>

Home.php
<div>
<h1>Welcome To my site</h1>
<marquee behavior="alternate" "slidescroll" direction="right">
<img src="image/f.jpg" height="150" width="150"></td>
<img src="image/gjhhk.jpg" height="150" width="150"></td>
<img src="image/h.jpg" height="150" width="150"></td>
<img src="image/z.jpg" height="150" width="150"></td>
</marquee>
</div>

Insertcart.php
<?php
if(isset($_SESSION["u_Id"]))
{
?>
<?php
require_once("connection.php");
$p_quantity=$_REQUEST['p_quantity'];
echo "Q is".$p_quantity."<br>";
if(isset($_SESSION['u_Id']))

BCA Dept., SPKM-Jetpur 63 A Project on: Cake Zone


{
$que="select * from addtocart where p_id=".$_REQUEST['p_id'];
$res=mysql_query($que,$con);
$row=mysql_fetch_array($res);

$que1="select * from product where p_id=".$_REQUEST['p_id'];


$res1=mysql_query($que1,$con);
$row1=mysql_fetch_array($res1);

echo $id=$_REQUEST['p_id'];
if($row1['p_quantity']>=$p_quantity)
{
if($row1['p_quantity']>$row['p_quantity'])
{
if($row['p_id']==$id)
{
echo "<br>Que is ".$que=$row['p_quantity'];
echo "<br>Quantity is ".$quan=$_REQUEST['p_quantity'];
echo "<br>Plus is ".$plus=$quan+$que;
echo $query="UPDATE addtocart SET p_quantity= ".$plus." WHERE
p_id= ".$_REQUEST['p_id'];
if(mysql_query($query,$con))
{
header("Location:index.php?page=addtocart");
echo "recod inserted....";
}
else
{
die ("<br>invalid query".mysql_error());
}
}
elseif($row1['p_quantity']>=$p_quantity)
{
echo "greater quantity";
$uu=$_SESSION['u_Id'];
$ii=$_POST['p_id'];
$que1="INSERT INTO `addtocart`(`u_Id`,`p_id`,`p_quantity`) Values
('$uu','$ii','$p_quantity')";
echo $que1;
if(mysql_query($que1,$con))
{
header("Location:index.php?page=addtocart");
echo "recod inserted....";
}
else
{
echo mysql_error();

BCA Dept., SPKM-Jetpur 64 A Project on: Cake Zone


}
}
}
else
{
echo "Galat Code Baby ";

header("Location:index.php?page=itemsdetail&p_id=$_REQUEST[p_id]&msg=stock not available");


}
}
else
{
header("Location:index.php?page=itemsdetail&p_id=$_REQUEST[p_id]&msg=stock
not available");
}
}
else
{
echo "Bye Bye ";
header("Location:index.php?page=login");
}
?>
<?php
}
else
{
echo "<center><img src='images/other/7.gif' height=300px><br><font id=rewrite> But You
can't Rewrite Url...</font></center>";
}
?>

Itemsdetail.php
<?php
if(isset($_SESSION["u_Id"]))
{
?>
<?php
require_once("connection.php");
if(isset($_REQUEST['p_id']))
{
$que="SELECT * FROM product WHERE p_id=".$_REQUEST['p_id'];
$res=mysql_query($que,$con);
echo"<h1 align='center'>Items Detail</h1>";
while($row= mysql_fetch_array($res))

BCA Dept., SPKM-Jetpur 65 A Project on: Cake Zone


{
echo "<center>";
echo"<form name='itemsdetail' action='index.php?page=insertcart' method='POST'
onsubmit='return check_valid();'>";
echo"<table align='center'>";
echo"<tr>";
echo"<td rowspan='9'>";
echo"<img src='upload/".$row['p_image']."' height=200 width=200/>";
echo "</td>";
echo"</tr>";
$p_quantity=$row['p_quantity'];
if(isset($_REQUEST['msg']))
{
echo "<tr>";
echo "<td><font color='red' size='5pt'>$_REQUEST[msg]</font></td>";
echo "</tr>";
}
echo"<tr>";
echo"<td>Name:".ucWords($row['p_name'])."</td>";
echo"</tr><tr>";
echo"<td class='pad' id='detail_font'>Price:&nbsp;".$row['p_price']."<br></td>";
echo "</tr><tr>";
echo"<td class='pad'
id='detail_font'>Discription:&nbsp;".$row['p_discription']."<br></td>";
echo"</tr>";
$q=0;
if($p_quantity==0)
{
$q=1;
$msg="Items soldout";
echo "<tr>";
echo "<td><font color='red' size='5pt'>$msg</font></td>";
echo "</tr>";
}
else
{
echo"<tr>";
echo"<td><b>Quantity:</b><input type='text' name='p_quantity' id='quantity'
class='textbox'></td>";
echo"</tr><tr>";
echo"<td><input type='submit' value='Add To Cart' style='width:120px'
class='button'>";
echo"</tr>";
}

BCA Dept., SPKM-Jetpur 66 A Project on: Cake Zone


echo"</table>";
echo"</center>";
}
echo"<input type='hidden' name=p_id value=".$_REQUEST['p_id'].">";
echo"</form>";
}
?>
<?php
}
else
{
include("include/login.php");
}
?>

Login.php

<div align="center">
<html>
<title> Cake Zone</title>
<head>
<link href="style/style.css" type="text/css" rel="stylesheet"/>
<script language="JavaScript" src="js/validations.js" type="text/javascript"
xml:space="preserve"></script>
<title>cake zone</title>
</head>
<body onload='login.nam.focus()'>
<form name="frm" action="action/checklogin.php" method="POST">
<table border="2" align="center">
<tr>
<th colspan="2" class="title"> <h2>Login</h2></th>
</tr>
<div id="title1">
<?php
if(isset ($_REQUEST['msg']))
{
if($_REQUEST['msg']==0)
{
echo"incorrect username& password";

}
if($_REQUEST['msg']==1)

BCA Dept., SPKM-Jetpur 67 A Project on: Cake Zone


{
echo "login sucessfully";
}
}
?>
</div>
<tr>
<td class="label">User Name:</td>
<td><div id='frm_u_UserName_errorloc' class='validation'></div>
<input type="text" name="u_UserName" placeholder="UserName" class="textbox"> </td>
</tr>
<br>
<tr>
<td class="label">Password:</td>
<td><div id='frm_u_Password_errorloc' class='validation'></div>
<input type="Password" name="u_Password"placeholder="PassWord" class="textbox"> </td>
</tr>
<br>
<tr>
<td colspan="2" align="center"><input type="submit" value="login" class="button">
<input type="reset" value="Cancle" class="button"></td>
</tr>
<tr>
<td colspan="20" align="center">
<a href="index.php?page=regitration" title="New Account">Create A New Account</a></br>
<a href="index.php?page=forget_user" title="Forgetpassword">Forget password????</a></td>
</tr>
</table>
</body>
</form>
</html>
</div>

<script language="JavaScript" type="text/javascript" xml:space="preserve">


//<![CDATA[
var frmvalidator = new Validator("frm");
frmvalidator.EnableOnPageErrorDisplay();
frmvalidator.EnableMsgsTogether();

frmvalidator.addValidation("u_UserName","req","Please Enter UserName...");


frmvalidator.addValidation("u_UserName","alpha_s","Customer Name can only contain
Alphabets...");

frmvalidator.addValidation("u_Password","req","Please Enter Password.");

BCA Dept., SPKM-Jetpur 68 A Project on: Cake Zone


frmvalidator.addValidation("u_Password","minlen=3","Password Must be in Minimum 3
Characters...");
//]]></script>

Logout.PHP
<?php
session_destroy();
header ("location:index.php?page=home");
?>

Message.php
<?php
if(isset($_SESSION["u_Id"]))
{
?>
<?php
echo"<tr>";
echo"<img src='image/baby.jpg'width='150'height='150'>";
echo"<td>";
echo"Your item is purchase sucessfully case on delivery!!!!!.......";
echo"</td>";
echo"</tr>";
echo"<tr>";
echo"<img src='image/th2.gif'width='150'height='150'>";
echo"<img src='image/th3.jpg'width='150'height='150'>";
echo"<td>";
echo"</tr>";
?>
<?php
}
else
{
include("include/login.php");
}
?>

Purchase.php
<?php
if(isset($_SESSION["u_Id"]))

BCA Dept., SPKM-Jetpur 69 A Project on: Cake Zone


{
?>
<html>
<head>
<link rel="stylesheet" href="style/style.css" type="text/css" />
<script language="JavaScript" src="js/validations.js" type="text/javascript"
xml:space="preserve"></script>
</head>
<body onload='regitration.nam.focus()'>
<form name="frm" action="action/insertbill.php" method="POST">
<center>
<table border="3" >
<tr>
<th colspan="2" align="center"class="title">
<h3>Shopping Detail</h3>
</th>
</tr>
<tr>
<td><b>Name:</b></td>
<td><div id='frm_b1_name_errorloc' class='validation'></div>
<input type="text" name="b1_name" class="textbox"placeholder="Name">
</td>
</tr>
<tr>
<td><b>Address:</b></td>
<td><div id='frm_b1_address_errorloc' class='validation'></div>
<input type="text" name="b1_address" class="textbox"placeholder="Address">
</td>
</tr>
<tr>
<td><b>City:</b></td>
<td><div id='frm_b1_city_errorloc' class='validation'></div>
<input type="text" name="b1_city" class="textbox"placeholder="City">
</td>
</tr>
<tr>
<td><b>Contact No:</b></td>
<td><div id='frm_b1_contact_errorloc' class='validation'></div>
<input type="text" name="b1_contact" class="textbox"placeholder="Contact
NO">
</td>
</tr>
<tr>
<td colspan="2" align="center">

BCA Dept., SPKM-Jetpur 70 A Project on: Cake Zone


<input type="Submit" value="OK" name="btnsubmit" class="button">
<input type="Reset" value="Reset" name="btnreset" class="button">
</td>
</tr>
<?php
$con=mysql_connect("localhost","root","root");
$db=mysql_select_db("cake zone",$con);
session_start();
echo "<input type='hidden' name=b1_total value=".$_REQUEST['total1'].">";
?>
</center>
</table>
</form>
</body>
</html>

<script language="JavaScript" type="text/javascript" xml:space="preserve">


//<![CDATA[
var frmvalidator = new Validator("frm");
frmvalidator.EnableOnPageErrorDisplay();
frmvalidator.EnableMsgsTogether();

frmvalidator.addValidation("b1_name","req","Please Enter Name...");


frmvalidator.addValidation("b1_name","alpha_s","Name can only contain Alphabets...");

frmvalidator.addValidation("b1_address","req","Please Enter Address...");

frmvalidator.addValidation("b1_city","req","Please Enter city...");

frmvalidator.addValidation("b1_contact","req","Please Enter ContactNo...");


frmvalidator.addValidation("b1_contact","num_only_no_symbol","Allow Only Digits...");
frmvalidator.addValidation("b1_contact","minlen=10","Allow Only 10 Digits...");

//]]></script>
<?php
}
else
{
include("include/login.php");
}
?>

purchase_detail.php

BCA Dept., SPKM-Jetpur 71 A Project on: Cake Zone


<?php
if(isset($_SESSION["u_Id"]))
{
?>
<html>
<head>
<link rel="stylesheet" href="style/style.css" type="text/css" />
<script language="JavaScript" src="js/validations.js" type="text/javascript"
xml:space="preserve"></script>
</head>
<body onload='regitration.nam.focus()'>
<form name="frm" action="action/insertbill.php" method="POST">
<center>
<table border="3" >
<tr>
<th colspan="2" align="center"class="title">
<h3>Shopping Detail</h3>
</th>
</tr>
<tr>
<td><b>Name:</b></td>
<td><div id='frm_b1_name_errorloc' class='validation'></div>
<input type="text" name="b1_name"
class="textbox"placeholder="Name"></td>
</tr>
<tr>
<td><b>Address:</b></td>
<td><div id='frm_b1_address_errorloc' class='validation'></div>
<input type="text" name="b1_address"
class="textbox"placeholder="Address"></td>
</tr>
<tr>
<td><b>City:</b></td>
<td><div id='frm_b1_city_errorloc' class='validation'></div>
<input type="text" name="b1_city"
class="textbox"placeholder="City"></td>
</tr>
<tr>
<td><b>Contact No:</b></td>
<td><div id='frm_b1_contact_errorloc' class='validation'></div>
<input type="text" name="b1_contact"
class="textbox"placeholder="Contact NO"></td>
</tr>

BCA Dept., SPKM-Jetpur 72 A Project on: Cake Zone


<tr>
<td colspan="2" align="center">
<input type="Submit" value="OK" name="btnsubmit" class="button">
<input type="Reset" value="Reset" name="btnreset"
class="button"></td>
</tr>
<?php
$con=mysql_connect("localhost","root","root");
$db=mysql_select_db("cake zone",$con);
session_start();
echo "<input type='hidden' name=b1_total value=".$_REQUEST['total1'].">";
?>
</center>
</table>
</form>
</body>
</html>

<script language="JavaScript" type="text/javascript" xml:space="preserve">


//<![CDATA[
var frmvalidator = new Validator("frm");
frmvalidator.EnableOnPageErrorDisplay();
frmvalidator.EnableMsgsTogether();

frmvalidator.addValidation("b1_name","req","Please Enter Name...");


frmvalidator.addValidation("b1_name","alpha_s","Name can only contain Alphabets...");

frmvalidator.addValidation("b1_address","req","Please Enter Address...");

frmvalidator.addValidation("b1_city","req","Please Enter city...");

frmvalidator.addValidation("b1_contact","req","Please Enter ContactNo...");


frmvalidator.addValidation("b1_contact","num_only_no_symbol","Allow Only Digits...");
frmvalidator.addValidation("b1_contact","minlen=10","Allow Only 10 Digits...");

//]]></script>
<?php
}
else
{
include("include/login.php");
}
?>

BCA Dept., SPKM-Jetpur 73 A Project on: Cake Zone


purchase_detail.php
<?php
if(isset($_SESSION["u_Id"]))
{
?>
<?php
$con=mysql_connect("localhost","root","root");
$db=mysql_select_db("cake zone",$con);
?>
<form action="action/i_purchase.php" method="POST" enctype="multipart/form/data"
onsubmit="returncheck_valid()">
<div>
<center>
<table align="center" placeholder="Name" border="2">
<tr>
<th align="center" colspan="2"class='title' ><h2>Purchase</h2></th>
</tr>
<tr>
<td class="label">Name</td>
<td><input type="text" name="up_name" class="textbox" placeholder="Name"></td>
</tr>
<tr>
<td class="label">City</td>
<td><input type="text" name="up_city" class="textbox" placeholder="City"></td>
</tr>
<tr>
<td class="label">Address</td>
<td><input type="text" name="up_address" class="textbox"
placeholder="Address"></td>
</tr>
<tr>
<td class="label">Contactno</td>
<td><input type="text" name="up_contactno" class="textbox"
placeholder="Contactno"></td>
</tr>
<tr>
<td colspan="2" align="center">
<input type="submit" value="Submit"class="title">
<input type="reset" class="title"value="Clear">
<a href="index.php?page=addtocart"><input type="button"class="title"
value="Back"></a></td>
<?php
require_once("connection.php");

BCA Dept., SPKM-Jetpur 74 A Project on: Cake Zone


echo "<input type='hidden' name=total1 value=".$_REQUEST['total1'].">";
?>
</td>
</tr>
</table>
</center>
</div>
</form>
<?php
}
else
{
header("location:index.php?page=purchase_detail");
}
?>

Registration.PHP

<div align="center">
<html>
<head>
<link href="css/style.css" type="text/css" rel="stylesheet" />
<script language="JavaScript" src="js/validations.js" type="text/javascript"
xml:space="preserve"></script>
<title border="6">Registration</title>
</head>
<body onload='regitration.nam.focus()'>
<form name="frm" action="action/register_insert.php" method="POST">
<table border="6">
<tr><td colspan='6' class="title"><h2><center>Registration</h2></td></tr>
<form name="regitration" action="action/register_insert.php" method="POST">
<tr>
<td class="lable">User Name</td>
<td><div id='frm_u_UserName_errorloc' class='validation'></div>
<input type="text" name="u_UserName" class="textbox" placeholder="Enter User
Name"></td>
</tr>
<tr>
<td class="lable">Password</td>
<td><div id='frm_u_Password_errorloc' class='validation'></div>
<input type="password" name="u_Password"class="textbox" placeholder="Enter
Password"></td>
</tr>

BCA Dept., SPKM-Jetpur 75 A Project on: Cake Zone


<tr>
<td class="lable">First Name</td>
<td><div id='frm_u_FirstName_errorloc' class='validation'></div>
<input type="text" name="u_FirstName" class="textbox" placeholder="Enter First
Name"></td>
</tr>

<tr>
<td class="lable">Last Name</td>
<td><div id='frm_u_LastName_errorloc' class='validation'></div>
<input type="text" name="u_LastName" class="textbox" placeholder="Enter Last
Name"></td>
</tr>
<tr>
<td class="lable">Email-ID</td>
<td> <div id='frm_u_EmailId_errorloc' class='validation'></div>
<input type="text" name="u_EmailId" class="textbox" placeholder="Enter Email-
ID"></td>
</tr>
<tr>
<td class="lable">Contact No</td>
<td><div id='frm_u_ContactNo_errorloc' class='validation'></div>
<input type="text" name="u_ContactNo" class="textbox" placeholder="Enter Contact
No"></td>
</tr>

<tr>
<td class="lable">Address</td>
<td><div id='frm_u_Address_errorloc' class='validation'></div>
<textarea name="u_Address" class="textbox" placeholder="Enter
Address"></textarea></td>
</tr>
<tr>
<td class="lable">Question</td>
<td> <div id='frm_u_Question_errorloc' class='validation'></div>
<select name="u_Question" class="textbox" placeholder="Enter Question">
<option>Favourite movie?</option>
<option>Favourite food?</option>
<option>Favourite game?</option>
<option>Your mother?</option>
</select>
</td>
</tr>
<tr>

BCA Dept., SPKM-Jetpur 76 A Project on: Cake Zone


<td class="lable">Answer</td>
<td><div id='frm_u_Answer_errorloc' class='validation'></div>
<input type="text" name="u_Answer" class="textbox" placeholder="Enter
Answer"></td>
</tr>
<tr>
<td colspan=2 align="center">
<input type="submit" value="submit" name="btnsubmit" class="button">
<input type="reset" value="clear" name="btnclear" class="button"></td>
</tr>
</table>
</form>
</body>
</html>
</div>

<script language="JavaScript" type="text/javascript" xml:space="preserve">


//<![CDATA[
var frmvalidator = new Validator("frm");
frmvalidator.EnableOnPageErrorDisplay();
frmvalidator.EnableMsgsTogether();

frmvalidator.addValidation("u_UserName","req","Please Enter UserName...");


frmvalidator.addValidation("u_UserName","alpha_s","Customer Name can only contain
Alphabets...");

frmvalidator.addValidation("u_Password","req","Please Enter Password....");


frmvalidator.addValidation("u_Password","minlen=3","Password Must be in Minimum 3
Characters...");

frmvalidator.addValidation("u_FirstName","req","Please Enter FirstName...");


frmvalidator.addValidation("u_FirstName","alpha_s","Customer Name can only contain
Alphabets...");

frmvalidator.addValidation("u_LastName","req","Please Enter LastName...");


frmvalidator.addValidation("u_LastName","alpha_s","Customer Name can only contain
Alphabets...");

frmvalidator.addValidation("u_EmailId","req","Please Enter Email Address...");


frmvalidator.addValidation("u_EmailId","email","Please Enter Valid Email Address...");

frmvalidator.addValidation("u_ContactNo","req","Please Enter ContactNo...");


frmvalidator.addValidation("u_ContactNo","num_only_no_symbol","Allow Only Digits...");
frmvalidator.addValidation("u_ContactNo","minlen=10","Allow Only 10 Digits...");

BCA Dept., SPKM-Jetpur 77 A Project on: Cake Zone


frmvalidator.addValidation("u_Address","req","Please Enter Address...");

frmvalidator.addValidation("u_Question","req","Please Enter question...");


frmvalidator.addValidation("u_Question","question","Please Enter question...");

frmvalidator.addValidation("u_Answer","req","Please Enter Answer...");


frmvalidator.addValidation("u_Answer","answer","Please Enter Answer...");

//]]></script>

Zoomitems.PHP

<?php
if(isset($_SESSION["u_Id"]))
{
?>
<center>
<?php
require_once("connection.php");
$que="SELECT * FROM product where p_id=$_REQUEST[p_id]";
$res=mysql_query($que,$con);
echo "<table >";
echo "<tr>";
while($raw=mysql_fetch_array($res))
{
echo "<td>";
echo"<table>";
echo "<tr>";
echo "<td><a href=index.php?page=gallary><img
src='upload/".$raw['p_image']."'height=290'></a></td>";
echo "</tr>";
echo "</table>";
echo "</td>";
$k++;
if($k%1==0)
{
echo "</tr>";
echo "<tr>";
}

BCA Dept., SPKM-Jetpur 78 A Project on: Cake Zone


echo "</tr>";
echo "</table>";
?>
</center>
<?php
}
else
{
echo "<center><img src='images/007.jpg' height=300px><br><font id=rewrite> But You can't
Rewrite Url...</font></center>";
}
?>

Action
Checklogin.php
<?php
include("../connection.php");
if(isset($_REQUEST['u_UserName']) && isset($_REQUEST['u_Password']))
{
$username=$_REQUEST['u_UserName'];
$password=$_REQUEST['u_Password'];
$query="select * from register where u_UserName='$username' and u_Password='$password'
and u_type=0";
$result=mysql_query($query);
if($result)
{
$row=mysql_fetch_array($result);
session_start();
echo "Successfully Login";
echo $_SESSION['u_Id']=$row['u_Id'];
echo $_SESSION['user']=$row['u_UserName'];
header("location:../index.php?page=home");

}
else
{

echo mysql_error();
header("location:../index.php?page=login&msg=0");
}
}
else

BCA Dept., SPKM-Jetpur 79 A Project on: Cake Zone


{
header("location:../index.php?page=login");
}

?>

Checkpassword.php
<?php
include("../connection.php");
$pass1=$_REQUEST['txtOldpwd'];
echo $pass1;
$pass2=$_REQUEST['txtNewpwd'];
echo $pass2;
$pass3=$_REQUEST['txtCpwd'];
echo $pass3;
if(isset($pass1)&&($pass2)&&($pass3))
{
$u_Id=$_SESSION['u_Id'];
$que="select * from register";
$res=mysql_query($que,$con);
while($row=mysql_fetch_array($res))
{
$pass=$row['u_Password'];
if($pass2==$pass3)
{
if($pass1==$pass)
{
$que1="update register set u_Password='$pass2'where u_Id='$u_Id'";
echo "<br>".$que1;
$res=mysql_query($que1,$con);
header("location:../index.php?page=home&msg=0");
}
else
{
echo"incorect u_password.";
header("location:../index.php?page=Changepassword&msg=1 incorect
u_Password.");
}
}
else
{
echo"Enter same New Password&Comfirm Password.";

BCA Dept., SPKM-Jetpur 80 A Project on: Cake Zone


header("location:../index.php?page=Changepassword&msg=2 Enter same New
Password&Comfirm Password.");
}
}
}
else
{
echo"Not Responding....";
}

?>

d_purchase.php
<?php
include("../Connection.php");

$que="delete from purchase where up_id=".$_REQUEST['up_id'];


$result=mysql_query($que,$con);
if($result)
{
header("location:../index.php?page=view_purchase");
}
else
{
echo mysql_error();
}
?>

delete_addtocart.php
<?php
include("../connection.php");
$query="DELETE FROM `addtocart` WHERE a_id='$_REQUEST[a_id]'";
echo $query;
if(mysql_query($query,$con))
{
header("location:../index.php?page=viewcart");
}
else
{
echo mysql_error();
}

BCA Dept., SPKM-Jetpur 81 A Project on: Cake Zone


?>

delete_cart.php
<?php
$con=mysql_connect("localhost","root","root");
$db=mysql_select_db("cake zone",$con);
$query="delete from `addtocart` where `p_id`=".$_REQUEST['p_id'];
echo"$query";
if(mysql_query($query,$con))
{
header("location:../index.php?page=addtocart");

}
else
{
echo mysql_error();
}
?>

feedback_delete.php
<?php
include("../connection.php");
$que="delete from feedback where f_id=".$_REQUEST['f_id'];
$result=mysql_query($que,$con);
if($result)
{
header("location:../index.php?page=viewfeedback");
}
else
{
echo mysql_error();
}
?>

feedback_insert.php
<?php
include("../connection.php");

BCA Dept., SPKM-Jetpur 82 A Project on: Cake Zone


if(isset($_SESSION['u_UserName']))
{
$nm=$_SESSION['u_UserName'];
$u_id=$_SESSION['u_Id'];
}
$comment=$_POST['comment'];
$username=$_POST['u_username'];
$emailid=$_POST['u_emailid'];
echo $query="INSERT INTO `feedback`(`f_id`, `u_Id`, `u_username`, `u_emailid`,`comment`)
VALUES (NULL,'".$_SESSION['u_Id']."', '$username','$emailid','$comment')";
$result=mysql_query($query);
if($result)
{
header("location:../index.php?page=login");
}
else
{
echo mysql_error();
}
?>

forget1.php
<?php

include("../connection.php");
echo $u_UserName=$_REQUEST['u_UserName'];
if(isset($u_UserName))
{
echo $query="select * from register where u_UserName='$u_UserName'";
echo $result=mysql_query($query,$con);
if($row=mysql_fetch_array($result))
{
$u_Id=$row[0];
header("location:../index.php?page=Forget_ans&u_Id=$u_Id");
}
else
{
echo "not found";
header("location:../index.php?page=Forget_user&msg=1");
}
}
?>

BCA Dept., SPKM-Jetpur 83 A Project on: Cake Zone


forget2.php
<?php
include("../connection.php");
echo $u_Id=$_REQUEST['u_Id'];
echo $u_Answer=$_REQUEST['u_Answer'];
if(isset($u_Answer))
{
$query="select * from register where u_Id='$u_Id'";
echo $query;
$result=mysql_query($query,$con);
if($row=mysql_fetch_array($result))
{
echo $Answer=$row['u_Answer'];
if($u_Answer==$Answer)
{
echo "Correct Answer";
header("location:../index.php?page=Forget_pass&u_Id=$u_Id");
}
else
{
header("location:../index.php?page=Forget_ans&u_Id=$u_Id &msg=1");
}
}
else
{
header("location:../index.php?page=forget_ans&u_Id=$u_Id");
}
}
?>

forget3.php
<?php
$con=mysql_connect("localhost","root","root");
$db=mysql_select_db("cake zone",$con);
$u_Id=$_REQUEST['u_Id'];
$newpass=$_REQUEST['newpass'];
$conpass=$_REQUEST['conpass'];
if(isset($newpass)&&($conpass))
{
if(($newpass)==($conpass))

BCA Dept., SPKM-Jetpur 84 A Project on: Cake Zone


{
$query="update register set u_Password='$conpass' where u_Id='$u_Id'";
if(mysql_query($query,$con))
{
header("location:../index.php?page=login");
}
else
{
header("location:../index.php?page=Forget_pass&u_Id=$u_Id");
}
}
else
{
header("location:../index.php?page=Forget_ans&u_Id=$u_Id");
}
}
?>

i_purchase.php
<?php
include("../connection.php");
$query="insert into purchase(up_name,up_city,up_address,up_contactno)values
('$_REQUEST[up_name]','$_REQUEST[up_city]','$_REQUEST[up_address]','$_REQUEST[up_contactno]')";
$result=mysql_query($query);
if($result)
{
header("location:../index.php?page=Message");
}
else
{
echo mysql_error();
}
?>

insert_cart.php
<?php
include("connection.php");
$quantity=$_REQUEST['p_quantity'];
if(isset($_SESSION['u_Id']))
{
$query="select * from product where p_id=".$_REQUEST['p_id'];

BCA Dept., SPKM-Jetpur 85 A Project on: Cake Zone


$result=mysql_query($query,$con);
$row=mysql_fetch_array($result);
$query1="select * from addtocart where p_id=".$_REQUEST['p_id'];
echo"$query1";
$result1=mysql_query($query1,$con);
$row1=mysql_fetch_array($result1);
$ss=$_REQUEST['p_id'];
if(($row['p_quantity']>$quantity))
{
if($row['p_id']==$ss)
{
$aa=$row1['$p_quantity'];
echo"$aa";
$bb=$_REQUEST['p_quantity'];
$ans=$aa+$bb;
echo"$ans";
$query2="update addtocart set quantity='".$ans."'";
where p_id =".$_REQUEST['p_id']";
echo"$query2";
if(mysql_query($query2,$con))
{
header("location:index.php?page=addtocart");
}
else
{
echo mysql_error();

}
else
{
echo $uu=$_SESSION['u_Id'];
echo $gg=$_REQUEST['p_id'];
$query2="insert into
addtocart('a_id','u_Id','p_id','p_quantity')value(null,'$uu','$gg','$p_quantity')";
echo"$query2";
if(mysql_query($query2,$con))
{
header("location:index.php?page=addtocart");

}
else
{

BCA Dept., SPKM-Jetpur 86 A Project on: Cake Zone


echo mysql_error();
}
}
}
else
{
header("location:index.php?page=productdetail&p_id=$_REQUEST['p_id']&msg=stock not
available");
echo"$_REQUEST['p_id']";
}
}
else
{
header("location:index.php?page=login");
}
?>

Insertbill.php
<?php
$con=mysql_connect("localhost","root","root");
$db=mysql_select_db("cake zone",$con);
session_start();
echo $db;
$query="insert into
`bill1`(`b1_id`,`u_Id`,`b1_name`,`b1_address`,`b1_city`,`b1_contact`,`b1_total`,`b1_status`)values
(null,'$_SESSION[u_Id]','$_REQUEST[b1_name]','$_REQUEST[b1_address]','$_REQUEST[b1_city]',
'$_REQUEST[b1_contact]','$_REQUEST[b1_total]','notsolled')";
if(mysql_query($query))
{
echo"inserted";
}
else
{
echo"not inserted";
}
$query1="select * from `bill1` ORDER BY b1_id";
$result=mysql_query($query1);
while($row=mysql_fetch_array($result))
{
$b1_id=$row['b1_id'];
}
$query2="select * from addtocart where u_Id='$_SESSION[u_Id]'";
$result=mysql_query($query2);

BCA Dept., SPKM-Jetpur 87 A Project on: Cake Zone


while($row=mysql_fetch_array($result))
{
$p_id=$row['p_id'];
$query="update product set p_quantity=p_quantity-$row[p_quantity]
WHERE p_id='$p_id'";
mysql_query($query,$con);

echo $query="insert into bill2 (b2_id,b1_id,p_id,p_quantity) values


(NULL,'$b1_id','$p_id','$row[p_quantity]')";
$result1=mysql_query($query,$con);
$row=mysql_fetch_array($result1);
}
if($result1)
{
echo"inserted";
echo $query="delete from addtocart where u_Id='$_SESSION[u_Id]'";
if(mysql_query($query))
{
header("location:../index.php?page=Message");
}
}
?>

register_delete.php
<?php
include("../connection.php");
$que="delete from register where u_Id=".$_REQUEST['u_Id'];
$result=mysql_query($que,$con);
if($result)
{
header("location:../index.php?page=viewregister");
}
else
{
echo mysql_error();
}
?>

register_insert.php

<?php

BCA Dept., SPKM-Jetpur 88 A Project on: Cake Zone


include("../connection.php");

$UserName=$_REQUEST['u_UserName'];
$Password=$_REQUEST['u_Password'];
$FirstName=$_REQUEST['u_FirstName'];
$LastName=$_REQUEST['u_LastName'];
$EmailId=$_REQUEST['u_EmailId'];
$ContactNo=$_REQUEST['u_ContactNo'];
$Address=$_REQUEST['u_Address'];
$Question=$_REQUEST['u_Question'];
$Answer=$_REQUEST['u_Answer'];

$query="insert into register(u_UserName,u_Password,u_FirstName,


u_LastName,u_EmailId,u_ContactNo,u_Address,u_Question,u_Answer)values
('$UserName','$Password','$FirstName','$LastName','$EmailId','$ContactNo',
'$Address','$Question','$Answer')";

$result=mysql_query($query);
if($result)
{
header("location:../index.php?page=login");
}
else
{
echo mysql_error();
}
?>

Admin

Index.php
<?php
$con=mysql_connect("localhost","root","root");
$db=mysql_select_db("cake zone",$con);

?>
<?php
{
include("connection.php");
if(isset($_REQUEST['page']))
{
$page=$_REQUEST['page'];

BCA Dept., SPKM-Jetpur 89 A Project on: Cake Zone


}
}
?>
<html>
<script language="javascript">
function f1()
{
return confirm("ure you sure want to delete.......");
}
function f2()
{
return confirm("ure you sure want to edit.......");
}
</script>
<head>
<link href="style/style.css" type="text/css" rel="stylesheet"/>
</head>
<body>
<div id="wrapper">
<div id="header">
<div id="login" class="float-right">
<?php
Session_start();
if(isset($_SESSION['admin']))
{
echo "<a href=index.php?page=logout><img src='../image/logout.png' height='20px'/></a>";
echo"<br>Welcome.....".$_SESSION['admin'];
}
?>
</div>
<div class="float_left_img">
<img src="../image/logo-cake/pp.jpg" height="130" width="130">
</div>
<div id="title">Cake Zone </div>
<div class="float-clear"></div>
</div>

<div id="menu">
<?php
if(isset($_SESSION['admin']))
{
?>
<a href="index.php?page=home">Home</a>&nbsp;&nbsp;

BCA Dept., SPKM-Jetpur 90 A Project on: Cake Zone


<a href="index.php?page=product">ViewProduct</a>&nbsp;&nbsp;
<a href="index.php?page=category">Viewcategory</a>&nbsp;&nbsp
<a href="index.php?page=viewfeedback">Viewfeedback</a>&nbsp;&nbsp;
<a href="index.php?page=viewregister">Viewregister</a>&nbsp;
<a href="index.php?page=view_purchase">ViewPurchase</a>&nbsp;
<a href="index.php?page=admin">ManageAdmin</a>&nbsp;
<?php
}
?>
</div>
<div id="content">
<?php
if(isset($_REQUEST["page"]))
{
include ("include/".$_REQUEST['page'].".php");
}
else
{
include"/include/login.php";
}
?>
</div>
<div id="footer">
<h4>Developed by:Bansi sakariya & Doliy raiyani</h4>
</div>
</div>
</body>
</html>

Connection.php
<?php
$con=mysql_connect("localhost","root","root");
$db=mysql_select_db("cake zone",$con);
session_start();
?>

Style.css
*
{

BCA Dept., SPKM-Jetpur 91 A Project on: Cake Zone


margin:0px;
padding:0px;
}
body
{
background:#goEEgo;
}
.float-right
{
float:right;

}
.float-right1
{
float:right;

}
.float-center title
{
float:center;

}
.float-clear
{
float:clear;
}
.label
{
width:108px;
height:20px;
color:black;
margin:2px;
}
.label1
{
width:80px;
height:20px;
color:black;
margin:2px;
}
table
{

margin:0px 10px;

BCA Dept., SPKM-Jetpur 92 A Project on: Cake Zone


padding:0px 0px 10px 10px;
}
.validation
{
color:red;
}
.textbox
{
width:178px;
height:25px;
color:black;
margin:2px;
}
.button
{
width:108px;
height:28px;
color:black;
margin:4px;
font-size:18px;
background-color:grey;
font-family:italic;
border-radius:10px;
}
#wrapper
{
margin:auto;
width:1000px;
}
#header
{

color:white;
background:#000000;
height:0auto;
margin:20px 10px 0px 10px;
padding:2px 0px 55px 5px;
font-size:40px;
border:solid 4px ;
border-radius:20px;
font-family:Vivaldi;

}
#title1

BCA Dept., SPKM-Jetpur 93 A Project on: Cake Zone


{
color:red;
}
.title
{
background-color:grey;
color:white;
}
#login
{
font-size:40px;
color:red;
margin:14px;
}

.float_left_img
{

float:left;
height:10px;
width:100px;
}
#title
{
color:white;
font-family:Vivaldi;
font-size:60px;
padding:0px 90px 10px 220px;

}
#menu
{
padding:5px;
margin:0px 9px;
text-decoration:none;
border:solid 4px black;
background-color:silver;
border-radius:20px;
border-radius:20px;

}
#menu a
{
padding:5px;

BCA Dept., SPKM-Jetpur 94 A Project on: Cake Zone


font-size:23px;

}
#menu a:hover
{
color:red;
background-color:black;
border-radius:25px;
}
content
{

background-image:url('../image/th.jpg');
margin:1px;
color:black;
text-align:center;
height:0auto;
width:0auto;
font-size:20px;
font-family:Cooper;
font-style:italic;
padding:20px 0px 50px 10px;
margin:0px 10px 0px 10px;
border-radius:20px;
border:solid 4px black;
}
#footer
{
background-image:url('../image/back1.jpg');
color:white;
background:#000000;
height:30px;
font-style:italic;
text-align:right;
padding:1px 10px 3px 5px;
font-size:30px;
margin:0px 10px 0px 10px;
border-radius:20px;
font-family:V ;
border:solid 4px;

.float_left

BCA Dept., SPKM-Jetpur 95 A Project on: Cake Zone


{
float:left;
}
Include
a_addcategory.php
<?php
if(isset($_SESSION["u_Id"]))
{
?>
<?php
$con=mysql_connect("localhost","root","root");
$db=mysql_select_db("cake zone",$con);
$editmode=false;
if(isset($_REQUEST['c_id']))
{

$query="select * from category where c_id=$_REQUEST[c_id]";


$result=mysql_query($query);
if($result)
{
$row=mysql_fetch_array($result);
$editmode=true;
}
else
{
echo mysql_error();
}
}
else
{
echo mysql_error();
}
?>
<html>
<body>
<center>
<form action="action/addcategory.php" method="POST">
<table border="10" align="center" class="table" class="boder">
<?php
if(isset($_REQUEST['c_id']))
{
echo"<input type='hidden' name='c_id' value=$_REQUEST[c_id]";

BCA Dept., SPKM-Jetpur 96 A Project on: Cake Zone


}
?>
<tr>
<th colspan="2"class="title"><h2>category</h2></th>
</tr>
<tr>
<td class="lable">Name</td>
<td><input type="text" name="c_name" value='<?php if($editmode==true){echo
$row['c_name'];}?>'></td>
</tr>
<tr>
<td colspan="2" align="center">
<?php
if(isset($_REQUEST['c_id']))
{
echo"<input type='submit'name='btnchange' value='Edit' >";
}
else
{
echo"<input type='submit' name='btnchange' value='Add' >";
}
?>

</td>
</tr>
</center>
</table>
</form>
</body>
</html>
<?php
}
else
{
include("include/login.php");
}
?>

ad_addadmin.php
<?php
if(isset($_SESSION["u_Id"]))
{
?>

BCA Dept., SPKM-Jetpur 97 A Project on: Cake Zone


<?php
$con=mysql_connect("localhost","root","root");
$db=mysql_select_db("cake zone",$con);
$editmode=false;
if(isset($_REQUEST['u_Id']))
{

$query="select * from register where u_Id=$_REQUEST[u_Id]";


$result=mysql_query($query,$con);
if($result)
{
$row=mysql_fetch_array($result);
$editmode=true;
}
else
{
echo mysql_error();
}
}
else
{
echo mysql_error();
}
?>
<html>
<body>
<center>
<form action="action/addadmin.php" method="POST">
<table border="2" >
<?php
if(isset($_REQUEST['u_Id']))
{
echo"<input type='hidden' name='u_Id' value=$_REQUEST[u_Id]";
}
?>
<tr>
<th colspan="3"class='title'>
<font>Admin</font></th>
</tr>
<tr>
<td class="lable"> Name</td>
<td> <input type="text" name="u_UserName" class="textbox" placeholder="Enter User
Name"value="<?php if($editmode==true){echo $row['u_UserName'];} ?>">
</td>

BCA Dept., SPKM-Jetpur 98 A Project on: Cake Zone


</tr>
<tr>
<td class="lable">Email-ID</td>
<td> <input type="text" name="u_EmailId" class="textbox" placeholder="Enter Email-ID"
value="<?php if($editmode==true){echo $row['u_EmailId'];} ?>">
</td>
</tr>
<tr>
<td colspan=2 align="center">
<?php
if(isset($_REQUEST['u_Id']))
{
echo "<input type='submit' name='btnchange' value='Edit' class='button' >";
}
else
{
echo "<input type='submit' name='btnchange' value='Add' class='button' >";
}
?>
</td>
</tr>
</table>
</form>
</center>
</body>
</html>
<?php
}
else
{
include("include/login.php");
}
?>

Add_product.php

<?php
if(isset($_SESSION["u_Id"]))
{
?>
<?php
$con=mysql_connect("localhost","root","root");

BCA Dept., SPKM-Jetpur 99 A Project on: Cake Zone


$db=mysql_select_db("cake zone",$con);
$editmode=false;
if(isset($_REQUEST['p_id']))
{
$query="select * from product where p_id='$_REQUEST[p_id]'";
$result=mysql_query($query,$con);
if($result)
{
$row=mysql_fetch_array($result);
$editmode=true;
}
else
{
echo mysql_error();
}
$editmode=true;
}

?>
<html>
<head>
<link rel="stylesheet" href="style/style.css" type="text/css" />
</head>
<form action="action/addproduct.php" method="POST" enctype="multipart/form-data">
<?php
if($editmode==true)
{
echo"<input type='hidden' name='p_id' value='$_REQUEST[p_id]'>";
}
?>
<center>
<table border="1" align="center" >
<tr>
<th align="center" colspan="10"class="title"><h1>Add Product</h1></th>
</tr>
<?php
if(!isset($_REQUEST['p_id']))
{
$query="SELECT * FROM `category`";
$result=mysql_query($query);
if($result)
{
echo"<tr><td colspan='2' align='center'>Category:";
echo"<select class='combo' name='c_id'>";

BCA Dept., SPKM-Jetpur 100 A Project on: Cake Zone


while($row=mysql_fetch_array($result))
{
echo"<option selected value=".$row['c_id'].">".$row['c_name']."</option>";
}
echo"</td></tr></select>";
}
}
?>
<tr>
<td><h3>Image:</h3></td>
<td><input type="file" name="file" required>
<?php
if($editmode==true)
{
echo"<img src='upload/".$row['p_image']."'height='50px' width='50px'";
echo"<input type='hidden'name='file'value=$raw[p_image]>";
if(isset($_REQUEST["exits"]))
{
echo"already exits";
}
}
?>
</td>
</tr>
<tr>
<td><h3>Name:</h3></td>
<td><input type="text" name="p_name" placeholder="Name"value="<?php
if($editmode==true){echo $row['p_name'];} ?>">
</td>
</tr>
<tr>
<td><h3>Price:</h3></td>
<td><input type="text" name="p_price" placeholder="Price"value="<?php
if($editmode==true){echo $row['p_price'];} ?>"></td>
</tr>
<tr>
<td><h3>Quntity:</h3></td>
<td><input type="text" name="p_quantity" placeholder="Quntity"value="<?php
if($editmode==true){echo $row['p_quantity'];} ?>"></td>
</tr>
<tr>
<td><h3>Discription:</h3></td>
<td><input type="text" name="p_discription" placeholder="Discription"value="<?php
if($editmode==true){echo $row['p_discription'];} ?>"></td>

BCA Dept., SPKM-Jetpur 101 A Project on: Cake Zone


</tr>
<tr>
<td colspan="2" align="center">
<?php
if(isset($_REQUEST['p_id']))
{
echo "<input type='submit' name='btnchange' value='Update' class='button' >";
}
else
{
echo "<input type='submit' name='btnchange' value='Add' class='button' >";
}
?>
</td>
</tr>
</table>
</center>
</form>
</html>
<?php
}
else
{
include("include/login.php");
}
?>

Admin.php
<?php
if(isset($_SESSION["u_Id"]))
{
?>
<?php

$con=mysql_connect("localhost","root","root");
$db=mysql_select_db("cake zone",$con);
$que="select * from register";
$result=mysql_query($que,$con);

if($result)
{
echo"<center>";
echo"<table border='1' align='center' class='table'>";

BCA Dept., SPKM-Jetpur 102 A Project on: Cake Zone


echo"<tr><th colspan='15'class='title'><h3>View Admin</h3></th></tr>";
echo"<td colspan='8' align='right'><a href='index.php?page=ad_addadmin'><img
src='image/add.png'height='25px'/></a></td>";
echo"<tr>
<th>Username</th>
<th>EmailId</th>
<th colspan='8'>Action</th>
</tr>";
echo"<tr>";
while($row=mysql_fetch_array($result))
{

echo"<td>".$row['u_UserName']."</td>";
echo"<td>".$row['u_EmailId']."</td>";
echo"<td><a href=index.php?page=ad_addadmin&u_Id=".$row['u_Id']."><img
src='image/edit.png'height='20px' onclick='return f2()'/></a></td>";
echo"<td><a href=action/d_admin.php?u_Id=".$row['u_Id']."><image
src='image/delete1.gif' height='20px' onclick='return f1()'/></a></td>";
echo"</tr>";
}
echo"</table>";
echo"</center>";
}
else
{
mysql_error();
}
?>
<?php
}
else
{
include("include/login.php");
}
?>

Category.php

<?php
if(isset($_SESSION["u_Id"]))
{
?>
<?php
$con=mysql_connect("localhost","root","root");

BCA Dept., SPKM-Jetpur 103 A Project on: Cake Zone


$db=mysql_select_db("cake zone",$con);
$query="select * from category";
$result=mysql_query($query);
if($result)
{
echo"<center>";
echo "<table border=1>";
echo "<tr><th colspan=4 class='title'><h2>ViewCategory</h2></th></tr>";
echo"<tr><th colspan=4 align=right><a href='index.php?page=a_addcategory'><img
src='image/add.png'height='20px'/></a>";
echo"<tr><th>Name</th>
<th colspan=3>Action</th></tr>";
echo "<tr>";
while($row=mysql_fetch_array($result))
{
echo "<td>".$row[1]."</td>";
echo "<td>".$row[2]."</td>";
echo "<td ><a href=index.php?page=a_addcategory&c_id=".$row['c_id']."><img
src='image/edit.png'height='20px' onclick='return f2()'/></a>"."</td>";
echo "<td ><a href=action/category_delete.php?c_id=".$row['c_id']."><img
src='image/delete1.gif'height='20px' onclick='return f1()'/></a>"."</td>";
echo "</tr>";
}
echo "</table> </center>";
}
else
{
echo mysql_query();
}
?>
<?php
}
else
{
include("include/login.php");
}
?>

Home.php
<div>
<h1>Welcome To my site</h1>
<marquee behavior="alternate" "slidescroll" direction="right">
<img src="image/f.jpg" height="150" width="150"></td>

BCA Dept., SPKM-Jetpur 104 A Project on: Cake Zone


<img src="image/gjhhk.jpg" height="150" width="150"></td>
<img src="image/h.jpg" height="150" width="150"></td>
<img src="image/z.jpg" height="150" width="150"></td>
</marquee>
</div>

Login.php
<div align="center">
<html>
<title> Cake Zone</title>
<head>
<link href="style/style.css" type="text/css" rel="stylesheet"/>
<script language="JavaScript" src="js/validations.js" type="text/javascript"
xml:space="preserve"></script>
<title>cake zone</title>
</head>
<body onload='login.nam.focus()'>
<form name="frm" action="action/checklogin.php" method="POST">
<table border="2" align="center">
<tr>
<th colspan="2" class="title"> <h2>Login</h2></th>
</tr>
<div id="title1">
<?php
if(isset ($_REQUEST['msg']))
{
if($_REQUEST['msg']==0)
{
echo"incorrect username& password";
}
if($_REQUEST['msg']==1)
{
echo "login sucessfully";
}
}
?>
</div>
<tr>
<td class="label">User Name:</td>
<td><div id='frm_u_UserName_errorloc' class='validation'></div>
<input type="text" name="u_UserName" placeholder="UserName" class="textbox"> </td>
</tr>
<br>

BCA Dept., SPKM-Jetpur 105 A Project on: Cake Zone


<tr>
<td class="label">Password:</td>
<td><div id='frm_u_Password_errorloc' class='validation'></div>
<input type="Password" name="u_Password"placeholder="PassWord" class="textbox"> </td>
</tr>
<br>
<br>
<tr>
<td colspan="2" align="center"><input type="submit" value="login" class="button">
<input type="reset" value="Cancle" class="button"></td>
</tr>
</table>
</body>
</form>
</html>
</div>

<script language="JavaScript" type="text/javascript" xml:space="preserve">


//<![CDATA[
var frmvalidator = new Validator("frm");
frmvalidator.EnableOnPageErrorDisplay();
frmvalidator.EnableMsgsTogether();

frmvalidator.addValidation("u_UserName","req","Please Enter UserName...");


frmvalidator.addValidation("u_UserName","alpha_s","Customer Name can only contain
Alphabets...");

frmvalidator.addValidation("u_Password","req","Please Enter Password.");


frmvalidator.addValidation("u_Password","minlen=3","Password Must be in Minimum 3
Characters...");
//]]></script>

Logout.php
<?php
session_destroy();
header ("location:index.php?page=login");
?>

Product.php

BCA Dept., SPKM-Jetpur 106 A Project on: Cake Zone


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

?>
<?php
include("connection.php");
?>
<center>
<form action="index.php?page=product">
<?php
$sql="select * from category";
$res=mysql_query($sql,$con);
echo"<tr>";
echo"<th class='label' > Category: </th>";
echo"<td><select class='lable' name='c_id'>";
echo"<option value=c_id>All</option>";
while($row=mysql_fetch_array($res))
{
if($row['c_id']==$_REQUEST['c_id'])
{
echo"<option selected value=".$row[c_id].">".$row['c_name']."</option>";
}
else
{
echo"<option value=".$row[c_id].">".$row['c_name']."</option>";
}

}
echo" <input type='submit' value='view'>";
echo"</select>";
echo"</td></tr>";

?>
<input type='hidden' value='product'name='page'></td>
<table align="center" width="30%" border="4">
<tr>
<th colspan="8" class="title"><h2>Cake</h2></th>
<tr><th align='right' colspan=8><a href='index.php?page=add_product'><img
src='image/add.PNG' height='20px'width='30px' align='right'></a></th></tr>
</tr>
<tr>
<td class="label">Image</td>
<td class="label">Name</td>

BCA Dept., SPKM-Jetpur 107 A Project on: Cake Zone


<td class="label">Price</td>

<td>Quantity</td>
<td>Discription</td>
<td colspan="6">Action</td>
</tr>
<?php
if(isset($_REQUEST["c_id"]))
{
$que="SELECT * from product where c_id=".$_REQUEST['c_id']." order by p_id desc";
}
else
{
$que="SELECT * from product where c_id=c_id order by p_id desc";
}
$result=mysql_query($que,$con);
while($raw=mysql_fetch_array($result))
{
echo "<tr><td><img src='upload/".$raw['p_image']."' height=50px width=50px></td>
<td>".$raw['p_name']."</td>
<td>".$raw['p_price']."</td>
<td>".$raw['p_quantity']."</td>
<td>".$raw['p_discription']."</td>
<td><a href=action/d_product.php?p_id=".$raw['p_id'].">
<img src='image/delete1.gif'height='30px' onclick='return checkdelete();'></a></td>
<td align='center'><a href=index.php?page=add_product&p_id=".$raw['p_id'].">
<img src='image/edit.png' height='30px' width='30px' onclick='return check();'></a>";
?>
<script type="text/javascript" language="javascript">
function check()
{
return confirm("Are you sure you want to Edit?");
}
function checkdelete()
{
return confirm("Are you sure you want to Delete?");
}
</script>
<?php
echo "</td></tr>";
}
mysql_close($con);
?>
</table>

BCA Dept., SPKM-Jetpur 108 A Project on: Cake Zone


</form>
<?php
}
else
{
include("include/login.php");
}
?>

View
<?php
if(isset($_SESSION["u_Id"]))
{
?>
<div>
<center><table border="0" align="center" class="table"></center>
<div>
<?php
echo "<form>";
require_once("connection.php");
if(isset($_REQUEST['b1_id']))
{
$que="select * from bill1 where b1_id=".$_REQUEST['b1_id']." && b1_status=0";
$res=mysql_query($que,$con);
$row=mysql_fetch_array($res);
$id=$row[0];
$que1="select * from bill2 where b1_id=$id";
$res1=mysql_query($que1,$con);
$que3="select * from register where u_id=".$_SESSION['u_Id'];
$res3=mysql_query($que3,$con);
$row3=mysql_fetch_array($res3);
$name=$row3[2];
echo "<center><table border='3' align='center'>";
echo "<tr><th align='center' colspan='5'class='title'><h2>Product</th></tr>";
echo "<tr><th>Name</th>
<th>Image</th>
<th>Price</th>
<th align='center'>Quantity</th>
<th>Total</th></tr>";
$total1=0;
while($row1=mysql_fetch_array($res1))
{
$id1=$row1[2];

BCA Dept., SPKM-Jetpur 109 A Project on: Cake Zone


$que2="select * from product where p_id=$id1";
$res2=mysql_query($que2,$con);
while($row2=mysql_fetch_array($res2))
{
echo "<tr>";
echo "<td>".$row2['p_name']."</td>";
echo "<td><img src='upload/".$row2['p_image']."' height='50px'
width='50px' /></td>";
echo "<td>".$row2['p_price']."</td>";
echo "<td>".$row1['p_quantity']."</td>";
$total=$row1['p_quantity']*$row2['p_price'];
echo"<td>".$total."</td></tr>";
$total1=$total+$total1;
}
}
echo "<td align='right' colspan='4'><font color='green' size='5pt'>Total :</font></td>
<td align='right' colspan='5'><font color='red' size='5pt'>$total1</font></td>";
}
echo "</table>";
echo "</center>";
echo "</form>";
?>
</div>
<?php
}
else
{
header("location:index.php?page=login");
}
?>

view_purchase.php
<?php
if(isset($_SESSION["u_Id"]))
{

?>
<?php
require_once("connection.php");
$que="select * from bill1";
$result=mysql_query($que);
if($result)

BCA Dept., SPKM-Jetpur 110 A Project on: Cake Zone


{
echo"<center>";
echo"<table border='2' align='center'>";
echo"<tr><th colspan='15'class='title'><h3>View Purchase</h3></th></tr>";
echo"<tr>

<th>Name</th>
<th>City</th>
<th>Address</th>
<th>ContactNo</th>
<th colspan='6'>Action</th>
</tr>";
echo"<tr>";
while($row=mysql_fetch_array($result))
{
echo"<td >".$row[b1_name]."</td>";
echo"<td >".$row[b1_city]."</td>";
echo"<td>".$row[b1_address]."</td>";
echo"<td >".$row[b1_contact]."</td>";
echo"<td><a href=index.php?page=view&b1_id=".$row['b1_id'].">View</a></td>";
echo"<td><a
href=index.php?page=viewshiping&b1_id=".$row['b1_id'].">Shiping</a></td>";
echo"</tr>";
}
echo"</table>";
echo"</center>";
}
else
{
mysql_error();
}
?>
<?php
}
else
{
include("include/login.php");
}
?>

Viewfeedback.php
<?php
if(isset($_SESSION["u_Id"]))

BCA Dept., SPKM-Jetpur 111 A Project on: Cake Zone


{
?>
<?php
include("connection.php");
$que="select * from feedback";
$result=mysql_query($que);

if($result)
{
echo"<center>";
echo"<table border='1' align='center'>";
echo"<tr><th colspan='15'class='title'><h3>View Feedback</h3></th></tr>";
echo"<tr>
<th>Username</th>
<th>Emailid</th>
<th>Comment</th>
<th colspan='8'>Action</th>
</tr>";
echo"<tr>";
while($row=mysql_fetch_array($result))
{
echo"<td>".$row['u_username']."</td>";
echo"<td>".$row[u_emailid]."</td>";
echo"<td>".$row[comment]."</td>";
echo"<td><a href=action/feedback_delete.php?f_id=".$row['f_id']." onclick='return
f1()'><image src='image/delete1.gif' height='20px'/></a></td>";
echo"</tr>";
}
echo"</table>";
echo"</center>";
}
else
{
mysql_error();
}
?>
<?php
}
else
{
include("include/login.php");
}
?>

BCA Dept., SPKM-Jetpur 112 A Project on: Cake Zone


Viewregister.php
<?php
if(isset($_SESSION["u_Id"]))
{

?>
<?php
include("connection.php");
$que="select * from register";
$result=mysql_query($que);
if($result)
{
echo"<center>";
echo"<table border='1' align='center'>";
echo"<tr>
<th>Firstname</th>
<th>Lastname</th>
<th>Email_ID</th>
<th>Contactno</th>
<th>Address</th>
<th>Question</th>
<th>Answer</th>
<th colspan='8'>Action</th>
</tr>";
echo"<tr>";
while($row=mysql_fetch_array($result))
{

echo"<td>".$row[u_FirstName]."</td>";
echo"<td>".$row[u_LastName]."</td>";
echo"<td>".$row[u_EmailId]."</td>";
echo"<td>".$row[u_ContactNo]."</td>";
echo"<td>".$row[u_Address]."</td>";
echo"<td>".$row[u_Question]."</td>";
echo"<td>".$row[u_Answer]."</td>";

echo"<td><a href=action/register_delete.php?u_Id=".$row['u_Id']." onclick='return


f1()'><image src='image/delete1.gif' height='20px'/></a></td>";
echo"</tr>";
}
echo"</table>";
echo"</center>";

BCA Dept., SPKM-Jetpur 113 A Project on: Cake Zone


}
else
{
mysql_error();
}
?>
<?php
}
else
{
include("include/login.php");
}
?>

Viewshiping.php
<?php
require_once("connection.php");
$sql="UPDATE bill1 SET b1_status=1 where b1_id=".$_REQUEST['b1_id'];
if(mysql_query($sql,$con))
{
header("location:index.php?page=view_purchase");
}

?>

Action
Addadmin.php
<?php
$con=mysql_connect("localhost","root","root");
$db=mysql_select_db("cake zone",$con);
if(isset($_REQUEST['u_Id']))
{
$query="update register set u_UserName='".$_REQUEST['u_UserName']."',
u_EmailId='".$_REQUEST['u_EmailId']."'where u_Id=".$_REQUEST['u_Id'];
$result=mysql_query($query);
if($result)
{
header("location:../index.php?page=admin");
}

BCA Dept., SPKM-Jetpur 114 A Project on: Cake Zone


else
{
echo mysql_error();
}
}
else
{
echo "insert";
$u_Id=$_REQUEST['u_Id'];
$u_UserName=$_REQUEST['u_UserName'];
$u_EmailId=$_REQUEST['u_EmailId'];
$query="insert into
register(u_Id,u_UserName,u_EmailId)values(null,'$u_UserName','$u_EmailId')";
$result=mysql_query($query);
if($result)
{
$_SESSION['u_Id']=$row['u_Id'];
echo $_SESSION['u_Id'];
header("location:../index.php?page=admin");
}
else
{
echo mysql_error();
}
}
?>

Addcategory.php
<?php
$con=mysql_connect("localhost","root","root");
$db=mysql_select_db("cake zone",$con);
if(isset($_REQUEST['c_id']))
{
echo "update";
$query="update category set c_name='".$_REQUEST['c_name']."'
where c_id=".$_REQUEST['c_id'];
$result=mysql_query($query);
if($result)
{
echo "grkfgjk";
header("location:../index.php?page=category");
}
else

BCA Dept., SPKM-Jetpur 115 A Project on: Cake Zone


{
echo mysql_error();
}
}
else
{
echo " insert";
$c_id=$_REQUEST['c_id'];
$c_name=$_REQUEST['c_name'];
$query="insert into category(c_id,c_name)values(null,'$c_name')";
$result=mysql_query($query);
if($result)
{
$_SESSION['c_id']=$row['c_id'];
echo $_SESSION['c_id'];
header("location:../index.php?page=category");
}
else
{
echo mysql_error();
}
}
?>

Addproduct.php

<?php
include("../connection.php");
if(isset($_REQUEST['p_id']))
{
if($_FILES["file"]["name"]=="")
{
$query="UPDATE `product` SET `p_name`='$_REQUEST[p_name]',
`p_image`='$_REQUEST[p_image]',`p_price`='$_REQUEST[p_price]',
`p_quantity`='$_REQUEST[p_quantity]',`p_discription`='$_REQUEST[p_discription]'
WHERE p_id='$_REQUEST[p_id]'";
if(mysql_query($query))
{
header("location:../index.php?page=product");
}
else
{

BCA Dept., SPKM-Jetpur 116 A Project on: Cake Zone


echo"not update";
}
}
else
{
if ((($_FILES["file"]["type"] == "image/gif")
|| ($_FILES["file"]["type"] == "image/jpeg")
|| ($_FILES["file"]["type"] == "image/pjpeg"))
&& ($_FILES["file"]["size"] < 20000))
{
if ($_FILES["file"]["error"] > 0)
{
echo "Return Code: " . $_FILES["file"]["error"] . "<br />";
}
else
{
echo "Upload: " . $_FILES["file"]["name"] . "<br />";
echo "Type: " . $_FILES["file"]["type"] . "<br />";
echo "Size: " . ($_FILES["file"]["size"] / 1024) . " Kb<br />";
echo "Temp file: " . $_FILES["file"]["tmp_name"] . "<br />";
if (file_exists("../upload/" . $_FILES["file"]["name"]))
{
echo $_FILES["file"]["name"] . " already exists. ";
}
else
{
move_uploaded_file($_FILES["file"]["tmp_name"],
"../upload/" . $_FILES["file"]["name"]);
echo "Stored in: " . "../upload/" . $_FILES["file"]["name"];
}
}
}
else
{
echo "Invalid file";
}

$query="UPDATE `product` SET


`p_name`='$_REQUEST[p_name]',`p_image`='".$_FILES["file"]["name"]."',
`p_price`='$_REQUEST[p_price]',`p_quantity`='$_REQUEST[p_quantity]',
`p_discription`='$_REQUEST[p_discription]' WHERE p_id='$_REQUEST[p_id]'";
if(mysql_query($query))
{
header("location:../index.php?page=product");

BCA Dept., SPKM-Jetpur 117 A Project on: Cake Zone


}
else
{
echo"not update";
}
}
}
else
{
if ((($_FILES["file"]["type"] == "image/gif")
|| ($_FILES["file"]["type"] == "image/jpeg")
|| ($_FILES["file"]["type"] == "image/pjpeg"))
&& ($_FILES["file"]["size"] < 20000))
{
if ($_FILES["file"]["error"] > 0)
{
echo "Return Code: " . $_FILES["file"]["error"] . "<br />";
}
else
{
echo "Upload: " . $_FILES["file"]["name"] . "<br />";
echo "Type: " . $_FILES["file"]["type"] . "<br />";
echo "Size: " . ($_FILES["file"]["size"] / 1024) . " Kb<br />";
echo "Temp file: " . $_FILES["file"]["tmp_name"] . "<br />";
if (file_exists("../upload/" . $_FILES["file"]["name"]))
{
echo $_FILES["file"]["name"] . " already exists. ";
}
else
{
move_uploaded_file($_FILES["file"]["tmp_name"],
"../upload/" . $_FILES["file"]["name"]);
echo "Stored in: " . "../upload/" . $_FILES["file"]["name"];
}
}
}
else
{
echo "Invalid file";
}

$query="INSERT INTO `product`(`p_id`, `c_id`, `p_name`, `p_image`, `p_price`,


`p_quantity`,`p_discription`) VALUES (NULL,'$_REQUEST[c_id]','$_REQUEST[p_name]',
'".$_FILES["file"]["name"]."','$_REQUEST[p_price]','$_REQUEST[p_quantity]','$_REQUEST[p_discription]')";

BCA Dept., SPKM-Jetpur 118 A Project on: Cake Zone


echo $query;
if(mysql_query($query))
{
header("location:../index.php?page=product");
}
else
{
echo"not insert";
}
}
?>

Category_delete.php
<?php
include("../connection.php");
$que="delete from category where c_id=".$_REQUEST['c_id'];
echo $que;
$result=mysql_query($que,$con);
if($result)
{
header("location:../index.php?page=category");
}
else
{
echo mysql_error();
}
?>

Checklogin.php
<?php
include("../connection.php");
if(isset($_REQUEST['u_UserName']) && isset($_REQUEST['u_Password']))
{
$username=$_REQUEST['u_UserName'];
$password=$_REQUEST['u_Password'];
$query="select * from register where u_UserName='$username' and u_Password='$password'
and u_type=1";
$result=mysql_query($query);
if($result)
{
$row=mysql_fetch_array($result);

BCA Dept., SPKM-Jetpur 119 A Project on: Cake Zone


session_start();
echo "Successfully Login";
echo $_SESSION['u_Id']=$row['u_Id'];
echo $_SESSION['admin']=$row['u_UserName'];
header("location:../index.php?page=home");

}
else
{

echo mysql_error();
header("location:../index.php?page=login&msg=0");
}
}
else
{
header("location:../index.php?page=login");
}

?>

d_product.php
<?php
$con=mysql_connect("localhost","root","root");
$db=mysql_select_db("cake zone");
$que="delete from product where p_id=".$_REQUEST['p_id'];
$result=mysql_query($que,$con);
if($result)
{
header("location:../index.php?page=product");
}
else
{
echo mysql_error();
}
?>

feedback_delete.php
<?php
include("../connection.php");
$que="delete from feedback where f_id=".$_REQUEST['f_id'];

BCA Dept., SPKM-Jetpur 120 A Project on: Cake Zone


$result=mysql_query($que,$con);
if($result)
{
header("location:../index.php?page=viewfeedback");
}
else
{
echo mysql_error();
}
?>

register_delete.php
<?php
include("../connection.php");
$que="delete from register where u_Id=".$_REQUEST['u_Id'];
$result=mysql_query($que,$con);
if($result)
{
header("location:../index.php?page=viewregister");
}
else
{
echo mysql_error();
}
?>

BCA Dept., SPKM-Jetpur 121 A Project on: Cake Zone


7.Testing
(7.1) Manual Testing
Testing Principal:-

-Following are the testing principal, which are used.


-All tested shoule be traceable to user reuirements.
-Tests should be being in small and progress toward
-Testing in the large.
-Exhaustive testing is not possibal.
-To be most effective testing should be consulted by
-An independent third party.

Testing Methods:-

White box testing or glass box texting or structural testing.


Black box testing or function testing.
Interface testing.

White Box Testing:-

This is concerned with the implementation of the program.in this type of testing different
programming structures and data structure used in the program are tested for proper operation.

This test concentrates on the examination of the coding. The system software engineers and
programmer join test cases and test data. The system designer creates test cases that have the like
hood of finding out possible errors.

Black Box Testing:-

This is concerned with the proper execution of the program specification . In this testing each
function or sub program used in the main program is first identified.

Interface Testing :-

This is concerned with both program spection and program implementation .this type
of testing is particularly important for object oriented system.

BCA Dept., SPKM-Jetpur 122 A Project on: Cake Zone


Test Case
(7.2)testcase

Register
FiledName Input for Input for Input for Input for
Num1 Num2 Num3 Num4
UserName Yes No No No
Password Yes Yes Yes Yes
FristName Yes No No No
LastName Yes No No No
Emailid Yes Yes Yes Yes
ContactNo Yes No No No
Address Yes Yes Yes Yes
Answer Yes Yes Yes Yes
Result Pass Fail Fail Fail

Login
FiledName Input for Input for Input for Input for
Num1 Num2 Num3 Num4
UserName Yes No No No
Password Yes Yes Yes Yes
Result Pass Fail Fail Fail

Forgetpassword
FiledName Input for Input for Input for Input for
Num1 Num2 Num3 Num4
UserName Yes No No No
Result Pass Fail Fail Fail

Forgetpassword1
FiledName Input for Input for Input for Input for
Num1 Num2 Num3 Num4
Answer Yes No No No
Result Pass Fail Fail Fail

BCA Dept., SPKM-Jetpur 123 A Project on: Cake Zone


Forgetpassword2
FiledName Input for Input for Input for Input for
Num1 Num2 Num3 Num4
New Password Yes Yes Yes Yes
Confirmpassword Yes Yes Yes Yes
Result Pass Pass Pass Pass

Changepassword
FiledName Input for Input for Input for Input for
Num1 Num2 Num3 Num4
Old password Yes Yes Yes Yes
New Password Yes Yes Yes Yes
Confirmpassword Yes Yes Yes Yes
Result Pass Pass Pass Pass

ItemsDetail
Filed Name Input for Input for Input for Input for
Num1 Num2 Num3 Num4
quantity Yes Yes Yes Yes
Result Pass Pass Pass Pass

Shopping detail
FiledName Input for Input for Input for Input for
Num1 Num2 Num3 Num4
Name Yes No No No
Address Yes Yes Yes Yes
City Yes Yes Yes Yes
ContactNo Yes No No No
Result Pass Fail Fail Fail

BCA Dept., SPKM-Jetpur 124 A Project on: Cake Zone


Feedback
FiledName Input for Input for Input for Input for
Num1 Num2 Num3 Num4
Name Yes No No No
Emailid Yes Yes Yes Yes
Comment Yes No No No
Result Pass Fail Fail Fail

Add Product
Filed Name Input for Input for Input for Input for
Num1 Num2 Num3 Num4
Name Yes No No No
Price Yes No No No
quantity Yes No No No
discription Yes No No No
Result Pass Fail Fail Fail

Update Product
Filed Name Input for Input for Input for Input for
Num1 Num2 Num3 Num4
Name Yes No No No
Price Yes No No No
quantity Yes No No No
discription Yes No No No
Result Pass Fail Fail Fail

Add Category
Filed Name Input for Input for Input for Input for
Num1 Num2 Num3 Num4
Name Yes No No No
Result Pass Fail Fail Fail

BCA Dept., SPKM-Jetpur 125 A Project on: Cake Zone


Update Category
Filed Name Input for Input for Input for Input for
Num1 Num2 Num3 Num4
Name Yes No No No
Result Pass Fail Fail Fail

AddAdmin
FiledName Input for Input for Input for Input for
Num1 Num2 Num3 Num4
Name Yes No No No
Emailid Yes Yes Yes Yes
Result Pass Fail Fail Fail

UpdateAdmin
FiledName Input for Input for Input for Input for
Num1 Num2 Num3 Num4
Name Yes No No No
Emailid Yes Yes Yes Yes
Result Pass Fail Fail Fail

BCA Dept., SPKM-Jetpur 126 A Project on: Cake Zone


8.Enhancements

(8.1) Advantages:-

Maintain whole system through one Admin.


Routin work is done more effecitively is less time.
No extra supported staff needed.
It is also less costly and more effective system.
The safety of data is increased to provide utilities.
Easy to maintain the stock of products.

(8.2)Limitation:-

Replacement facility is not available.


Online payment is not allowed.
Only cash on delivery

(8.3) Future Scope:-

We want to do following enhancements in projects.


Some of limitation is removed by using some advance technology infuture.
There are also adding features are provide to admin, so functionality of working will
becomes fast.
Reminder facility will be provide to user and admin.
Online help can be introduced into the system.

BCA Dept., SPKM-Jetpur 127 A Project on: Cake Zone


9.References

Web site

Http://www w3 school.com
Books

 php Black Book

BCA Dept., SPKM-Jetpur 128 A Project on: Cake Zone

You might also like