Professional Documents
Culture Documents
Fi Restaurant
Fi Restaurant
1
Abstract:
To order many dishes and make them and surprise your loved one. There
are many dishes in it , and the any user can access the food and can order
them and eat them soon. Every item is made by popular chef around the
world.
These dishes can be added by the admin. He can only add any new dishes
to the food and the users can view and order them. There is no priority or
premium so everyone can view anything on the dish list.
The things that are needed for the foods are also not a costly one , you can
buy them in very low cost and they can be bought in this restaurant .
The Foods can be ordered easily and this application is user friendly, so
not to worry of any issues in this. Can access anywhere anytime and order
foods when you are in the restaurant.
2
CHAPTER 1
INTRODUCTION
3
1.3 PROBLEM DEFINITION
4
CHAPTER 2
REQUIREMENT SPECIFICATIONS
RAM :512 MB
HARD DISK :25GB
MOTHER BOARD :INTEL V2130 CHIPSET
KEYBOARD :104 KEYS
MOUSE :OPTICAL SCROLLING
NETWORK :LAN
5
CHAPTER 3
The following are the list of modules in this project and it is stated as
follow
ADMIN MODULE
Food management
Chef management
Bill Management
USER MODULE
Login maintenance
Registration
Order Foods
View Orders
6
3.1.1 LOGIN
Login Module plays a major role. There are two type of users.
Admin, User. Each users can login into the food. For user requires
registration for login. Admin is the only user can view all the dish.
3.1.2 ADMIN
Admin can upload a food that can contain either an project details
like user story, solving techniques or customer feedback about the project.
There is no constraint in restaurant format. It can either be anything.
7
3.1.3 QUALITY CONTROL
8
3.1.5 VIEW
IMPLEMENTATION
9
3.1.6 HTML
10
HTML can embed programs written in a scripting language such as
JavaScript which affects the behavior and content of web pages. Inclusion
of CSS defines the look and layout of content. The World Wide Web
Consortium (W3C), maintainer of both the HTML and the CSS standards,
has encouraged the use of CSS over explicit presentational HTML.
3.1.7 CSS
11
Separation of formatting and content makes it possible 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. It can also display the web
page differently depending on the screen size or viewing device.
3.1.8 JavaScript
12
It has an API for working with text, arrays, dates, regular
expressions, and basic manipulation of the DOM, but the language itself
does not include any I/O, such as networking, storage, or graphics
facilities, relying for these upon the host environment in which it is
embedded.
3.1.9 JQUERY
13
This enables developers to create abstractions for low-level interaction
and animation, advanced effects and high-level, themeable widgets. The
modular approach to the jQuery library allows the creation of
powerful dynamic web pages and Web foods. The set of jQuery core
features—DOM element selections, traversal and manipulation—enabled
by its selector engine (named "Sizzle" from v1.3), created a new
"programming style", fusing algorithms and DOM data structures. This
style influenced the architecture of other JavaScript frameworks like YUI
v3 and Dojo, later stimulating the creation of the standard Selectors API.
Microsoft and Nokia bundle jQuery on their platforms. Microsoft includes
it with Visual Studio for use within Microsoft's ASP.NET
AJAX and ASP.NET MVC frameworks while Nokia has integrated it into
the Web Run-Time widget development platform.
14
The event assignment and the event callback function definition are
done in a single step in a single location in the code. jQuery also aims to
incorporate other highly used JavaScript functionality (e.g. fade ins and
fade outs).
15
3.1.10 BOOTSTRAP
16
mobile phones, portrait and landscape, tablets and PCs with low and high
resolution. Each variation adjusts the width of the columns.
17
3.1.11 PHP
18
3.1.12 SQL
19
SQL Command
20
DATA FLOW DIAGRAM
START
LOGIN
USER ADMIN
LOGOUT
END
21
TABLE STRUCTURE
Admin
Users
Orders
22
Foods
23
3.2.1 OUTPUT SCREENS
ADMIN
24
25
USER
26
27
28
29
30
4.3 CODING
<?php
$conn=mysqli_connect("localhost","root","","restaurant");
?>
<?php
session_start();
include 'conn.php';
if(isset($_POST['login'])){
$username=$_POST['username'];
$password=$_POST['password'];
$result=mysqli_query($conn,$sql);
$result2=mysqli_query($conn,$sql2);
31
if(mysqli_num_rows($result)>0){
header("location:adminhome.php");
elseif(mysqli_num_rows($result2)>0){
$_SESSION["username"]=$username;
header("location:home.php");
else{
header("location:index.php?id=1");
if(isset($_POST['signup'])){
$username=$_POST['username'];
$password=$_POST['password'];
$result=mysqli_query($conn,$sql);
if(mysqli_num_rows($result)>0){
32
header("location:index.php?id=try");
else{
$result2=mysqli_query($conn,$sql2);
header("location:index.php");
if(isset($_GET['id'])){
$id=$_GET['id'];
if($id=='ready'){
$id2=$_GET['id2'];
$res=mysqli_query($conn,$sql);
if($res){
header("location:adminhome.php?id=orders");
33
}
if(isset($_POST['afoods'])){
$name=$_POST['name'];
$chef=$_POST['chef'];
$type=$_POST['type'];
$taste=$_POST['taste'];
$cost=$_POST['cost'];
$file=$_FILES['pic'];
$fileName=$_FILES['pic']['name'];
$fileTmpName=$_FILES['pic']['tmp_name'];
$fileSize=$_FILES['pic']['size'];
$fileError=$_FILES['pic']['error'];
$fileType=$_FILES['pic']['type'];
$fileExt=explode('.',$fileName);
$fileActualExt=strtolower(end($fileExt));
$allowed=array('jpg');
34
$sql="SELECT * FROM foods WHERE name='".$name."'";
$result=mysqli_query($conn,$sql);
if(mysqli_num_rows($result)>0){
header("location:adminhome.php?id3=alreadyadded");
else{
if(in_array($fileActualExt,$allowed)){
$fileDest=$name.'.'.$fileActualExt;
move_uploaded_file($fileTmpName,$fileDest);
$res2=mysqli_query($conn,$sql2);
header("location:adminhome.php?id=added");
?>
35
REFERENCES
1. Deitel and Deitel and Nieto, “Internet and World Wide Web – How to Program”,
Published by Prentice Hall,5th Edition, 2011.
3. https://www.w3schools.com/php
4. https://www.javatpoint.com/php-tutorial
36