Вы находитесь на странице: 1из 68

INDEX

SR. NO. TOPIC PAGE NO.

1. Introduction
5

2. Literature Survey

3. System Analysis and Design

4. Implementation

5. Future Scope
3

6. References
INTRODUCTION
CHAPTER 1

1.1 INTRODUCTION :
This project which is named as “Online Cake Ordering System” is a Computerized online cake
ordering system which would be helpful .So if a person wishes to buy a cake, the person just has to go to
this app, select the cake, provide some important information and chose the payment method and you
are DONE!! The cake would be at their doorstep or anywhere they want .

1.2 PREVIOUS RELATED WORK :


 More paper work: Managing all the data about bill payment the owner needs to keep
a book of record which increases paper usage.

 Photo Manipulation: The problem with the current system is that the photos shown
in the menu are manipulated and are not exactly the one which are received.

 Time consuming: Visiting the shop, placing an order and making the payment makes
it time consuming. Everytime it is not possible for the people who have busy schedule to
visit the shop inorder to purchase the cake.

 Ambiguity of data: There is a lot of confusion in calculation and managing data in


case if some papers are misplaced.

 Lack of security: The system is not secure, there are more chances of losing data and
important documents from the shop.
1.3 PROBLEM STATEMENT
As industries are fast expanding, people are seeking for more ways to purchase products
with much ease and still maintain cost effectiveness. The vendors need to purchase the products
in order to sell to end users. The manual method of going to their local cake shop outlets to
purchase cake is becoming obsolete and more tasking. Cake can be ordered through the internet
and payment made without going to the restaurant or the food vendor. So there is need for a wide
range of publicity and enabling direct order, processing and delivering of cakes through online
system. For this system, there will be a system administrator who will have the rights to enter the
menu with current prevailing prices.

1.4 CONCLUSION

The proposed system would be a Web Application which maintains all the details of the
materials that is been supplied by the company. The proposed system aims at automating the
system and providing user-friendly interface. All the important information that needs to be
stored and maintained is recorded in the database. The record related to the products, customers
and payment would be saved and the client does not have to rely on any registers or to do manual
calculations. As per the advantage of the database, it helps efficient modification whenever
required and also storage of important information of the product, customers and payment.

The online cake ordering system will be computerized so that it has less paper work to do
and it will save both the money and the time.
LITERATURE SURVEY
CHAPTER 2
2.1 INTRODUCTION :

The organization is currently manual in nature. All the records are maintained in registers
i.e. Bills, Accounts, etc. Lot of time is spent in maintaining the records and updating the records.
As the system is manual it becomes difficult to show and maintain the details.

Maintaining details manually is very time consuming as well as complex in nature.


Human error also plays a role in inaccurate financial records and it is also very tiresome and
tedious causing mistakes. Additionally, records may only be available in paper format, which can
cause issues if they are lost, stolen, or damaged.

Here, the record of the available products is maintained in a register and on customers
demand this products are made available to them. All details are kept in various files such
customer details, products, order details, total amount, etc. It’s difficult to maintain the customer
details and payment receipt in registers. Presently they use the receipt system for order of
delivery.

2.2 LITERATURE OF DOMAIN USED


.
Module Description of Online Cake ordering System

 Admin
The admin will have the power to create new record of each type of users, delete the
existing records of each type of user or update the existing records of each type of users
in the system. All these records will be inserted in the system and will be kept in the
database. The database can be SQL Server, and Oracle etc.

 Registration
Any type of user who wants to be the part of the system will have to register. It is a very
simple process. They just have to provide their some personal information. The registered
user need not to worry about their personal information shared with the admin being
stolen. All the information will be kept private and confidential. These fields are:

 Name – The user just has to provide full name that would be used to address the person.
 Password – It is a mandatory field to fill up by the user’s own customized password
which will be use to login into the system to avoid the threat caused by the external
harmful entities. There will be some JavaScript in the field to check whether the user has
entered a powerful password or not.
 Email ID - Every registered user needs to enter their password for recovery or easy
communication purpose.
 Contact No – Instant communication is the necessity for better service. If the users
provide their personal numbers to contact, it would be easy to reach out the customers.
To validate whether anyone does not play with the system and fill the inappropriate
information, there will some validation checks via JavaScript.

 Login
After you are registered in the system, you have to login into the system in order to get
additional benefits you are getting as an unregistered user.You just have to provide your
username which was given to you at the time of registration and the password. You can
also user your email id and username.If the credentials are matched with the tables stored
into the database, you are given access to your account. Now, you can enjoy your
shopping.

 Customers
At the homepage, there will be a lot of cakes and some sections to choose from. Those
sections can be:

 Popular Cakes
 New Arrivals
 Miscellaneous
 Budget

The technologies for the proposed system are selected such that the system becomes
user friendly so that the owner can access data easily.
The frontend of my project will be based on HTML,CSS,PHP,JS and the backend
will be MySql.
2.3 COMPARISON WITH EXISTING SYSTEM

Before developing the new system the current system was thoroughly studied all the
users requirement were investigated and then the job of developing the new system was started.
The current method of working is very tedious and difficult to maintain for large record. A lot of
errors are made while handling the records by the staff, which results into loss of time and in
some cases money as well (payment issues).

 This system allows for greater efficiency in performing specific tasks both more
accurately and more rapidly than doing the same task using, for example, a pencil and
paper or a pencil and ledger book.

 This system also offers storage capacity efficiency. For example, a computerized system's
hard drive taking up a relatively small amount of space can store a large collection of
business documents. A paper-based system, in contrast, would take up at least one, and
usually more, file cabinets for storage of the same document collection.

 Time Saving: One important advantage offered by this system is that it saves lot of time.

 Error Handling: Manual "number crunching" presents the possibility of human error,
which can be costly to the company. Computerized system can reduce calculation errors
that can result in inaccurate inventory counts, billing for too large or small of an amount.

 Security: Using this system it becomes much easier for different individuals to access
data about the company products, securely.

2.4 FEATURES OF PROGRAMMING LANGUAGE


USED
PHP-
PHP is a general-purpose scripting language that is especially suited to server-side web
development, in which case PHP generally runs on a web server. Any PHP code in a requested
file is executed by the PHP runtime, usually to create dynamic web page content or dynamic
images used on websites or elsewhere. With PHP, you have the freedom of choosing an
operating system and a web server. Furthermore, you also have the choice of using procedural
programming or object oriented programming (OOP), or a mixture of them both.

Features

1. Extremely Flexible- The best part about PHP is the ability to make changes even after
starting the project and this saves valuable time. A developer does not have to write fresh codes
or command functions, as changes to the existing codes and functions can be done and used.

2. Efficient Performance- Depending on how the web developer codes, PHP has the potential
to turn in an efficient language. It is scalable when used for writing codes and can also be used
for creating a large number of applications. It is the programming language of choice when a
website has several web pages.

3. Cost Efficient- PHP is an open source web language, hence is completely free. There is no
expense involved in purchasing expensive licenses or software. It can work efficiently with
different databases, such as MySQL, Apache and PostgreSQL. The cost of developing a website
using PHP is minimal.

4. Easy and Simple to Learn- PHP syntax is logical and well-organized. Even command
functions are easy to understand, as they tell the developer what function they perform. As a
result, web developers find it very easy to create and optimize the application.

HTML-
HTML or Hyper-text Mark-up Language is a globally accepted programming language
for formatting web pages. In today's world, it is commonly used along with JavaScript and
Cascading Style Sheets (CSS) to give web pages the look and feel we desire. Through HTML,
the look and appearance of images, links, headings, text, page layout and just about every
element of a web page can be formatted. While there are other globally-recognized web
programming languages and tools like content management systems today, HTML continues to
be the predominant programming language for creating web pages. It is also the most optimal
for most small and growing businesses that do not really need advanced functionality on their
website.

Features

1. HTML is easy to use and understand- Almost anyone in the web development business
would know HTML – be it a freelancer or a large agency. If at any point in time you need to
hire the services of a different web design firm or professional for making changes or updates to
your website, it would be relatively easy to find cost-effective and affordable solution providers
who can make the changes you need to your website.

2. Most development tools support HTML- Whether it is FrontPage, DreamWeaver or any


other programming tool, there are more web development tools that allow you to create HTML
based websites, than any other web programming language.

3. HTML is free- A major advantage of HTML is that it is free. You do not need any software
for HTML, no plug-ins are needed and it means that you can save considerably on your website
development cost. Even with open source content management systems, all the plug-ins that you
may need are not always free.

4. HTML is most search engine friendly- Of all the web programming languages, HTML is
the most search engine friendly. Creating SEO compliant websites using HTML is significantly
easier than any other programming language. HTML causes the least SEO complications and
provides the greatest flexibility when trying to build an SEO compliant website. As long as you
have taken care to ensure your HTML code is clean and validated, an HTML website is easiest to
read and access for search engine crawlers. This reduces crawling time and improves page load
time, helping your website perform better in search results.
Cascading Style Sheets (CSS):-CSS is a style sheet language used for describing
the presentation of a document written in a markup language like HTML.[1] CSS is a cornerstone
technology of the World Wide Web, alongside HTML and JavaScript.[2]
CSS is designed to enable the separation of presentation and content, including layout, colors,
and fonts.[3] This separation can improve content accessibility, provide more flexibility and
control in the specification of presentation characteristics, enable multiple web pages to share
formatting by specifying the relevant CSS in a separate .css file, and reduce complexity and
repetition in the structural content.
Separation of formatting and content also makes it feasible to present the same markup page in
different styles for different rendering methods, such as on-screen, in print, by voice (via speech-
based browser or screen reader), and on Braille-based tactile devices. CSS also has rules for
alternate formatting if the content is accessed on a mobile device.[4]
The name cascading comes from the specified priority scheme to determine which style rule
applies if more than one rule matches a particular element. This cascading priority scheme is
predictable.
The CSS specifications are maintained by the World Wide Web Consortium (W3C). Internet
media type (MIME type) text/css is registered for use with CSS by RFC 2318 (March 1998).
The W3C operates a free CSS validation service for CSS documents.[5]
In addition to HTML, other markup languages support the use of CSS including XHTML, plain
XML, SVG, and XUL.
JAVASCRIPT:-
JavaScript often abbreviated as JS, is a high-level, interpreted programming
language that conforms to the ECMAScript specification. It is a programming language that is
characterized as dynamic, weakly typed, prototype-based and multi-paradigm.
Alongside HTML and CSS, JavaScript is one of the core technologies of the World Wide
Web. JavaScript enables interactive web pages and is an essential part of web applications. The
vast majority of websites use it, and major web browsers have a dedicated JavaScript engine to
execute it.
As a multi-paradigm language, JavaScript supports event-driven, functional,
and imperative (including object-oriented and prototype-based) programming styles. It
has APIs for working with text, arrays, dates, regular expressions, and the DOM, but the
language itself does not include any I/O, such as networking, storage, or graphics facilities. It
relies upon the host environment in which it is embedded to provide these features.
Initially only implemented client-side in web browsers, JavaScript engines are now embedded in
many other types of host software, including server-side in web servers and databases, and in
non-web programs such as word processors and PDF software, and in runtime environments that
make JavaScript available for writing mobile and desktop applications, including desktop
widgets.
The terms Vanilla JavaScript and Vanilla JS refer to JavaScript not extended by any frameworks
or additional libraries. Scripts written in Vanilla JS are plain JavaScript code.
Although there are similarities between JavaScript and Java, including language name, syntax,
and respective standard libraries, the two languages are distinct and differ greatly in design.
JavaScript was influenced by programming languages such as Self and Scheme.
SYSTEM ANALYSIS AND DESIGN
CHAPTER 3

3.1 INTRODUCTION

This method is used to collect information from the client and to know about the client’s

exact needs in depth. Analyst selects the people who are related with the system for the

interview. Conducting the interview with client made me talk face to face which cleared all the

doubts that the client and I had regarding the proposed system. It made possible for me to gather

information about her present system and study its drawbacks, so as to make sure that the new

system will fulfill the drawbacks.

I got the information about how exactly the employees of the clinic work, how she gives

appointment and handles the schedule. She provided me the information about the products and

the suppliers.
3.2 BLOCK DIAGRAM
COMPONENT DIAGRAM
➢ Component Diagram provides the realization of a set of interfaces and form the executable
parts of a software system. Examples of components can be an executable file, a COM+
component, or an Enterprise Java Bean (EJB) or a .NET component. In UML we represent a
component as a rectangle with tabs. Each Component has a name that identifies it.

➢ A Component is a standalone piece of software because it performs a complete function.

➢ Relationship among Components, Classes and Interfaces. Component realizes a set of


interfaces in which each interface specifies the function offered by a class. A class represents a
real world entity and contains the code for implementing behaviour that is specific to the entity
that the class represents. Thus, various classes contained in a component and their relationship
using a component diagram.
DEPLOYMENT DIAGRAM

➢ The Deployment diagram is drawn to visualize the hardware on which the software
components need to be deployed. A deployment diagram is drawn immediately after identifying
classes, interfaces and their relationships.

➢ The various computer systems or processing devices on which components are deployed are
called nodes. We may have all the components on one node or on different nodes. In UML a
node is represented as a 3-D rectangular box containing the components that execute within the
node. A node may be located anywhere in network. Distinction among nodes is achieved by
assigning each node a name and classifying the various nods into types depending on the type of
components they execute. Nodes are associated with each other by a connection, which
represents a communication channel. It depicts how the nodes are connected with each other.

➢ The dependency on node on components is depicted using dashed lines. This means that a
node uses the services of the components that are executing on another node
3.3 FLOW CHART

Data models are tools used in analysis to describe the data requirement and assumptions
in the system from a top-down perspective. They also set the stage for design of databases later
on in the SDLC.

There are three basic elements in ER model:

 Entities are the “things” about which we seek information.


 Attributes are the data we collect about the entities.
 Relationships provide the structure needed to draw information from multiple entities.

 Entity: It represents a collection of objects o things in the real world whose individual
members or instances have the following characteristics:
Each can be identified uniquely in some fashion.
Each plays a necessary role in the system we are building.
Each can be described by one or more data elements.

 Attributes: They express the properties of entities. Attributes having unique values are
called candidate keys (Primary key).

 Relationships: They describe the association between entities. They are characterized by
cardinality as follows:

One-to-One relationship means an instance of the first entity is associated with only one
instance of second entity.

One-to-Many relationship means that one instance of the first entity is related to many
instance of second entity, while an instance of second entity is associated with only
instance of the first entity

Many-to-Many means that an instance of the first entity is related to many instances of
the second entity and the same is true in the reverse direction also.
3.4 ENTITY RELATIONSHIP DIAGRAM (ERD)
3.5 ACTIVITY DIAGRAM

Activities are a representation of the various operations performed by a class. An activity


diagram depicts the flow of control from one activity to another. An activity diagram uses
activities to model objects, classes, interfaces, components and nodes. An activity represents a
set of actions such as call to a method of class, send or receive a signal, create or destroy an
object, and evaluate an expression.

The basic elements of activity diagram are –

 Action state: Represents the state of the system in terms of actions.

 Activity state: Represents an activity and therefore this state can further expand into
another activity state or action state.

 Transition: Represents the control flow that performs a particular operation

 Decision: Represents the if-else or branch condition that decides the path of control flow

 Initial State: A Filled circle followed by an arrow represents the initial action state.

 Final State: An arrow pointing to a filled circle nested inside another circle represents
the final action state.

 Synchronization: A synchronization bar helps illustrate parallel transition. It is also


called fork and joining.

 Swim lanes: Swim lanes group related activities into one column.
3.6 SEQUENCE DIAGRAM
Sequence Diagram represents an interaction among objects in the form of messages
ordered in a sequence by time. In a sequence diagram, you arrange objects across the x-axis. We
can place the object that starts an interaction to the extreme left. The objects that come later in
the message sequence are placed to the right of the interaction-initiating object. The messages
sent and received by the objects in an interaction are placed along the y-axis in an increasing
order of time.

An object can be created or destroyed when an operation is performed. You can use
sequence diagram to depict the creation and destruction of an object. In addition, sequence
diagram depict the change in the focus of control of an object in the form of a rectangular bar.
The length of the rectangular bar depicts the duration of time for which an object interacts with
another object.

UML sequence diagrams are used to represent or model the flow of messages, events and
actions between the objects or components of a system. Time is represented in the vertical
direction showing the sequence of interactions of the header elements, which are displayed
horizontally at the top of the diagram.

Sequence Diagrams are used primarily to design, document and validate the architecture,
interfaces and logic of the system by describing the sequence of actions that need to be
performed to complete a task or scenario. UML sequence diagrams are useful design tools
because they provide a dynamic view of the system behavior which can be difficult to extract
from static diagrams or specifications.

Although UML sequence diagrams are typically used to describe object-oriented software
systems, they are also extremely useful as system engineering tools to design system
architectures, in business process engineering as process flow diagrams, as message sequence
charts and call flows for telecom/wireless system design, and for protocol stack design and
analysis.

DESIGN SEQUENCE DIAGRAM

 DESIGN SEQUENCE FOR LOGIN


DESIGN SEQUENCE CUSTOMER ORDER DETAILS
3.7 USE CASE DIAGRAM
BASIC SCENARIO

 User logs in
 User changes password
 Select products
 Enter details
 Place Order
 Make payment
 Create customer order
 Check customer details
 Check customer order details
 Fulfill customer order
 Generate bill
 Delete Products
 Update products
 Add products
 User log out
 Feedback

USE CASE DIAGRAM

A use case diagram depicts the various operations that a system performs. It contains use
cases, actors, and their relationships. Use cases are the sequence of actions that form a single unit
of work for an actor. An actor represents a user who is external to the system and interacts with
the use case.

Elements of Use Case Diagram


 Actors

An actor portrays any entity (or entities) that perform certain roles in a given
system. The different roles the actor represents are the actual business roles of users in a
given system. An actor in a use case diagram interacts with a use case. For example, for
modelling a banking application, a customer entity represents an actor in the application.
Similarly, the person who provides service at the counter is also an actor. But it is up to
you to consider what actors make an impact on the functionality that you want to model.
If an entity does not affect a certain piece of functionality that you are modelling, it
makes no sense to represent it as an actor. An actor is shown as a stick figure in a use
case diagram depicted "outside" the system boundary.

 Use Cases

A use case in a use case diagram is a visual representation of distinct business


functionality in a system. The key term here is "distinct business functionality." To
choose a business process as a likely candidate for modelling as a use case, you need to
ensure that the business process is discrete in nature. As the first step in identifying use
cases, you should list the discrete business functions in your problem statement. Each of
these business functions can be classified as a potential use case. Remember that
identifying use cases is a discovery rather than a creation. As business functionality
becomes clearer, the underlying use cases become more easily evident. A use case is
shown as an ellipse in a use case diagram.

 System Boundary

A system boundary defines the scope of what a system will be. A system cannot
have infinite functionality. So, it follows that use cases also need to have definitive limits
defined. A system boundary of a use case diagram defines the limits of the system.

The system boundary is shown as a rectangle spanning all the use cases in the
system.

 Relationships: The following relationships can be established among use cases


 Extends: A use case may extend another. This relationship indicates that the behavior of
the extension use case may be inserted in the extended use case under some conditions.
The notation is a dashed arrow from the extension to the extended use case, with the label
“«extend»".

 Includes: A use case may include another. Include is a Directed Relationship between
two use cases, implying that the behavior of the included use case is inserted into the
behavior of the including use case. The first use case often depends on the outcome of the
included use case. This is useful for extracting truly common behavior from multiple use
cases into a single description. The notation is a dashed arrow from the including to the
included use case, with the label "«include»".

P a g e| 24

USE CASE DIAGRAM


3.8 DATA FLOW DIAGRAM
3.9 CLASS DIAGRAM
A class diagram consists of a group of classes and interfaces reflecting important entities
of the system, and the relationships between these classes and interfaces. Classes in a class
diagram are interconnected in a hierarchical fashion. Class Diagrams describe the static structure
of a system, or how it is structured rather than how it behaves. A class diagram is represented in
3 parts:

ELEMENTS OF CLASS DIAGRAM:

 Class: A class represents an entity of a given system that provides certain functionality of
a given entity. The properties of a class are called attributes. A class is represented by a
rectangle which is divided into compartments. These contains
 The upper part holds the name of the class
 The middle part contains the attributes of the class
 The bottom part gives the methods or operations the class can take or
undertake.

 Association: Association represents the static relationship shared among the objects of
two classes. Associations are normally represented as a line, with each end connected to a
class.

 Aggregation: Aggregation is a variant of the “has a” or association relationship;


aggregation is more specific than association. It is an association that represents a part
whole or part of relationship.

 Composition: Composition is a stronger variant of the “owns a” or association


relationship; composition is more specific than aggregation. It is represented with a solid
diamond shape.

 Generalization: The Generalization relationship indicates that one of the two related
classes (the subtype) is considered to be a specialized form of the other and super type is
considered as Generalization of subtype.

 Multiplicity: Multiplicity notations indicate the number of instances of one class linked
to one instance of the other class. They are placed near the end of an association.

o 0...1 - zero or one instance


o 1 - Exactly one instance
o 0...* or * - zero or more instances
o 1...* - one or many instances (at least one)

CLASS DIAGRAM
IMPLEMENTATION

CHAPTER 4
MODULE DESCRIPTION

LIST OF TABLES
registration:
Column Name Data Type Size Constraints
name nvarchar 50 Not null
email nvarchar 50 Not null
gender nvarchar 50 Not null
Mobile no. int 10 Not null
username nvarchar 50 Primary key
password nvarchar 50 Not null

login:

Column Name Data Type Size Constraints


username nvarchar 50 Primary key
password nvarchar 50 Not null

Customer
Column Name Data Type Size Constraints
cust_id nvarchar 10 Primary key
cust_name nvarchar 50 Not null
cust_add nvarchar 50 Not null
cust_phone int 10 Not null

Customer_order
Column Name Data Type Size Constraints

order_id int 10 Primary key


order_dt int 10 Not null
cust_del_dt int 10 Not null
receipt_no int 10 Not null
total_amount int 10 Not null

Product_order
Column Name Data Type Size Constraints

order_id int 10 Primary key


product_id int 10

quantity int 10 Not null


amount int 10 Not null

Product
Column Name Data Type Size Constraints

product_id int 10 Not null


product_nm nvarchar 50 Not null
product_price int 10 Not null
product_type nvarchar 50 Not null

4.2 MODULE DESIGN (SCREENSHOT)


CODE:-
<?php session_start();?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0


Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-
strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<?php
include("includes/head.inc.php");
?>
</head>

<body>
<!-- start header -->
<div id="header">
<div id="menu">
<?php

include("includes/menu.inc.php");
?>
</div>
</div>
<!-- end header -->

<!-- start page -->

<div id="page">
<!-- start content -->
<div id="content">
<div class="post">
<h1 class="title">Welcome to
<?php

if(isset($_SESSION['status']))
{
echo
$_SESSION['unm'];
}
else
{
echo 'Cake Shop';
}
?>
</h1>
<div class="entry">
<br>

<br>

<br><br>

</div>

</div>

</div>
<!-- end content -->

<!-- start sidebar -->


<div id="sidebar">
<?php

include("includes/search.inc.php");
?>
</div>
<!-- end sidebar -->
<div style="clear: both;">&nbsp;</div>
</div>
<!-- end page -->

<!-- start footer -->


<div id="footer">
<?php

include("includes/footer.inc.php");
?>
</div>
<!-- end footer -->
</body>
</html>

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

if(!empty($_POST))
{
$msg="";
if(empty($_POST['fnm']) || empty($_POST['unm']) ||
empty($_POST['gender']) || empty($_POST['pwd']) ||
empty($_POST['cpwd']) ||
empty($_POST['mail'])||empty($_POST['city']))
{
$msg.="<li>Please full fill all requirement";
}

if($_POST['pwd']!=$_POST['cpwd'])
{
$msg.="<li>Please Enter your Password Again.....";
}

if(!ereg("^[a-z0-9_]+[a-z0-9_.]*@[a-z0-9_-]+[a-z0-9_.-
]*\.[a-z]{2,5}$",$_POST['mail']))
{
$msg.="<li>Please Enter Your Valid Email
Address...";
}

if(strlen($_POST['pwd'])>10)
{
$msg.="<li>Please Enter Your Password in limited
Format....";
}

if(is_numeric($_POST['fnm']))
{
$msg.="<li>Name must be in String Format...";
}

if($msg!="")
{
header("location:register.php?error=".$msg);
}
else
{
$fnm=$_POST['fnm'];
$unm=$_POST['unm'];
$pwd=$_POST['pwd'];
$gender=$_POST['gender'];
$email=$_POST['mail'];
$contact=$_POST['contact'];
$city=$_POST['city'];
$query="insert into
user(u_fnm,u_unm,u_pwd,u_gender,u_email,u_contact,u_city)

values('$fnm','$unm','$pwd','$gender','$email','$contact','$cit
y')";

mysqli_query($conn,$query) or die("Can't Execute


Query...");
header("location:register.php?ok=1");
}
}
else
{
header("location:index.php");
}
?>

<?php
require('includes/config.php');
session_start();

$cat=$_GET['cat_nm'];
$q = "select * from subcat where parent_id = ".$_GET['cat'];
$res = mysqli_query($conn,$q) or die("Can't Execute
Query..");

$row1 = mysqli_fetch_assoc($res);

if($_GET['catnm']==$row1['subcat_nm'])
{

header("location:productlist.php?subcatid=".$row1['subcat_i
d']."&subcatnm=".$row1["subcat_nm"]);

}
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0


Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-
strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<?php
include("includes/head.inc.php");
?>
</head>

<body>
<!-- start header -->
<div id="header">
<div id="menu">
<?php

include("includes/menu.inc.php");
?>
</div>
</div>

<!-- end header -->

<!-- start page -->

<div id="page">
<!-- start content -->
<div id="content">
<div class="post">
<h1 class="title"><?php echo
$_GET['catnm'];?></h1>
<div class="entry">

<?php
Do
{

echo '<li><a
href="productlist.php?subcatid='.$row1['subcat_id'].'&subcatnm='
.$row1["subcat_nm"].'">'.$row1['subcat_nm'].'</a></li>';

//&subcatnm='.$row1["subcat_nm"].'
}while($row1 =
mysqli_fetch_assoc($res))
?>

</div>

</div>

</div>
<!-- end content -->
<!-- start sidebar -->
<div id="sidebar">
<?php

include("includes/search.inc.php");
?>
</div>
<!-- end sidebar -->
<div style="clear: both;">&nbsp;</div>
</div>
<!-- end page -->

<!-- start footer -->


<div id="footer">
<?php

include("includes/footer.inc.php");
?>
</div>
<!-- end footer -->
</body>
</html>
<?php session_start();
require('includes/config.php');
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0


Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-
strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<?php
include("includes/head.inc.php");
?>
</head>

<body>
<!-- start header -->
<div id="header">
<div id="menu">
<?php

include("includes/menu.inc.php");
?>
</div>
</div>

<!-- end header -->


<!-- start page -->

<div id="page">
<!-- start content -->
<div id="content">
<div class="post">
<h1
class="title">Viewcart</h1>
<div class="entry">

<pre><?php
// print_r($_SESSION);
?></pre>

<form
action="process_cart.php" method="POST">
<table width="100%"
border="0">
<tr >
<Td> <b>No
<td> <b>Product
<td> <b>Qty
<td> <b>Rate
<td> <b>Price
<td> <b>Delete
</tr>
<tr><td colspan="7"><hr
style="border:1px Solid #a1a1a1;"></tr>

<?php
$tot = 0;
$i = 1;

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

foreach($_SESSION['cart'] as $id=>$x)
{
echo '
<tr>
<Td> '.$i.'
<td>
'.$x['nm'].'
<td>
<input type="text" size="2" value="'.$x['qty'].'" name="'.$id.'">
<td>
'.$x['rate'].'
<td>
'.($x['qty']*$x['rate']).'
<td> <a
href="process_cart.php?id='.$id.'">Delete</a>
</tr>
';

$tot = $tot +
($x['qty']*$x['rate']);
$i++;
}
}

?>
<tr><td colspan="7"><hr
style="border:1px Solid #a1a1a1;"></tr>

<tr>
<td colspan="6"
align="right">
<h4>Total:</h4>

</td>
<td> <h4><?php echo $tot; ?>
</h4></td>
</tr>
<tr><td colspan="7"><hr
style="border:1px Solid #a1a1a1;"></tr>

<Br>
</table>

<br><br>
<center>
<input type="submit" value="
Re-Calculate " >
<a
href="checkout.php">CONFIRM & PROCEED<a/>
</center>
</form>
</div>
</div>

</div>
<!-- end content -->
<!-- start sidebar -->
<div id="sidebar">
<?php

include("includes/search.inc.php");
?>
</div>
<!-- end sidebar -->
<div style="clear: both;">&nbsp;</div>
</div>
<!-- end page -->

<!-- start footer -->


<div id="footer">
<?php

include("includes/footer.inc.php");
?>
</div>
<!-- end footer -->
</body>
</html>

ADMIN AREA:-
<?php
session_start();

if(!isset($_SESSION['user_email'])){

echo "<script>window.open('login.php?not_admin=You are


not an Admin!','_self')</script>";
}
else {

?>

<!DOCTYPE>

<html>
<head>
<title>This is Admin Panel</title>
<link rel="stylesheet" href="styles/style.css" media="all" />
</head>

<body>

<div class="main_wrapper">

<div id="header"></div>

<div id="right">
<h2 style="text-align:center;">Manage Content</h2>

<a href="index.php?insert_product">Insert New


Product</a>
<a href="index.php?view_products">View All
Products</a>
<a href="index.php?insert_cat">Insert New
Category</a>
<a href="index.php?view_cats">View All
Categories</a>
<a href="index.php?view_customers">View
Customers</a>
<a href="index.php?view_orders">View
Orders</a>
<a href="index.php?feedback">Feedbak</a>

<a href="logout.php">Admin Logout</a>

</div>

<div id="left">
<h2 style="color:red; text-align:center;"><?php echo
@$_GET['logged_in']; ?></h2>
<?php
if(isset($_GET['insert_product'])){

include("insert_product.php");

}
if(isset($_GET['view_products'])){

include("view_products.php");

}
if(isset($_GET['edit_pro'])){

include("edit_pro.php");

}
if(isset($_GET['insert_cat'])){

include("insert_cat.php");

if(isset($_GET['view_cats'])){

include("view_cats.php");

if(isset($_GET['edit_cat'])){

include("edit_cat.php");

}
if(isset($_GET['view_orders'])){

include("view_orders.php");

if(isset($_GET['view_customers'])){

include("view_customers.php");

}
if(isset($_GET['feedback'])){

include("feedback.php");

?>
</div>

</div>
</body>
</html>

<?php } ?>

<?php
session_start();

?>
<!DOCTYPE>
<html>
<head>
<title>Login Form</title>
<link rel="stylesheet" href="styles/login_style.css" media="all" />

</head>
<body>
<div class="login">
<h2 style="color:white; text-align:center;"><?php echo
@$_GET['not_admin']; ?></h2>
<h2 style="color:white; text-align:center;"><?php echo
@$_GET['logged_out']; ?></h2>

<h1>Admin Login</h1>
<form method="post" action="login.php">
<input type="text" name="email" placeholder="Eamil"
required="required" />
<input type="password" name="password"
placeholder="Password" required="required" />
<button type="submit" class="btn btn-primary btn-block btn-
large" name="login">Login</button>
</form>
</div>

</body>
</html>
<?php

include("includes/db.php");

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

$email =$_POST['email'];
$pass = $_POST['password'];

$sel_user = "select * from admins where user_email='$email'


AND user_pass='$pass'";

$run_user = mysqli_query($con, $sel_user);

$check_user = mysqli_num_rows($run_user);

if($check_user==1){

$_SESSION['user_email']=$email;

echo "<script>window.open('index.php?logged_in=You have


successfully Logged in!','_self')</script>";

}
else {

echo "<script>alert('Password or Email is wrong, try


again!')</script>";

}
}

?>

<table width="795" align="center" bgcolor="white">

<tr align="center">
<td colspan="6"><h2>View All Customers
Here</h2></td>
</tr>

<tr align="center" bgcolor="skyblue">


<th>S.N</th>
<th>Name</th>
<th>Email</th>
<th>Delete</th>
</tr>
<?php
include("includes/db.php");

$get_c = "select * from user";


$run_c = mysqli_query($con, $get_c);

$i = 0;

while ($row_c=mysqli_fetch_array($run_c)){

$c_id = $row_c['u_id'];
$c_name = $row_c['u_fnm'];
$c_email = $row_c['u_email'];
$i++;

?>
<tr align="center">
<td><?php echo $i;?></td>
<td><?php echo $c_name;?></td>
<td><?php echo $c_email;?></td>
<td><a href="delete_c.php?delete_c=<?php echo
$c_id;?>">Delete</a></td>
</tr>
<?php } ?>
</table>
4.3 CONCLUSION

The proposed system would be a Web Application which maintains all the details of the
materials that is been supplied by the company.The proposed system aims at automating the
system and providing user-friendly interface. All the important information that needs to be
stored and maintained is recorded in the database.The record related to the products, customers
and payment would be saved and the client does not have to rely on any registers or to do manual
calculations.As per the advantage of the database, it helps efficient modification whenever
required and also storage of important information of the product, customers and payment.

The online cake ordering system will be computerized so that it has less paper work to
do and it will save both the money and the time.
FUTURE SCOPE
5.1 FUTURE SCOPE

Feature Enhancements are those features that can be incorporated in the application in its
future versions that provides new features and better working of the present application.
Following are some of the few enhancements that can be incorporated in this web application in
future:

The Performance of the system should be improved.

 Customer can give their feedbacks.

 Modern Look and Feel.

 Some extra reports can be generated.


BIBLIOGRAPHY

Books Referred:
 “Beginning Android 4 Application Development”.

 Android Programming for Beginners

Websites Referred:

Вам также может понравиться