cake zone
cake zone
Project Report On
Cake Zone
Submitted in the Partial fulfillment of the requirement for awarding the degree of
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.
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:-
(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.
(1.3)Objective:-
(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.
1. Technical Feasibility
2. Economical Feasibility
3. Operational 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
3.Operation Feasibility:-
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:
The symbol that are used the data flow diagram carry following meaning.
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
Create
Manager Account Create
User Account
insert
Login Fetch
Login Login
View Fetch
Add View
Category
Category Category
View Insert
View Add
User Add to Cart
Purchase
Purchase
U_Lastname
U_FirstName U_Emaild
U_Password U_ContactNo
U_Address
U_UserName
U_Answer
U_emailid
P_name P_id
U_UserName comment
Category
Feedback Has
U_id
B2_id B1_id
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) -
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) -
Home
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()
{
}
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
</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;
}
.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;
}
#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;
}
#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;
.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>
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>
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>";
$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>";
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">
<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>
//]]></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
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>
//]]></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'];
?>
<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>
//]]></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))
Forget_user.php
<html>
<head>
<link rel="stylesheet" href="style/style.css" type="text/css" />
//]]></script>
Gallery.php
<?php
if(isset($_SESSION["u_Id"]))
{
echo "</table></form></div>";
$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>";
?>
<?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']))
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();
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))
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)
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"]))
//]]></script>
<?php
}
else
{
include("include/login.php");
}
?>
purchase_detail.php
//]]></script>
<?php
}
else
{
include("include/login.php");
}
?>
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>
<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>
//]]></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>";
}
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
?>
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.";
?>
d_purchase.php
<?php
include("../Connection.php");
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();
}
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");
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");
}
}
?>
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))
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'];
}
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
{
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);
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
$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'];
$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'];
<div id="menu">
<?php
if(isset($_SESSION['admin']))
{
?>
<a href="index.php?page=home">Home</a>
Connection.php
<?php
$con=mysql_connect("localhost","root","root");
$db=mysql_select_db("cake zone",$con);
session_start();
?>
Style.css
*
{
}
.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;
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
.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;
}
#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
</td>
</tr>
</center>
</table>
</form>
</body>
</html>
<?php
}
else
{
include("include/login.php");
}
?>
ad_addadmin.php
<?php
if(isset($_SESSION["u_Id"]))
{
?>
Add_product.php
<?php
if(isset($_SESSION["u_Id"]))
{
?>
<?php
$con=mysql_connect("localhost","root","root");
?>
<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'>";
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'>";
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");
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>
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>
Logout.php
<?php
session_destroy();
header ("location:index.php?page=login");
?>
Product.php
?>
<?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>
<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>
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];
view_purchase.php
<?php
if(isset($_SESSION["u_Id"]))
{
?>
<?php
require_once("connection.php");
$que="select * from bill1";
$result=mysql_query($que);
if($result)
<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"]))
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");
}
?>
?>
<?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>";
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");
}
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
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
{
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);
}
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'];
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();
}
?>
Testing Methods:-
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.
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.
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
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
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
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
(8.1) Advantages:-
(8.2)Limitation:-
Web site
Http://www w3 school.com
Books