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

Harsh It

Uploaded by

Nikhil Kumar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
26 views

Harsh It

Uploaded by

Nikhil Kumar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 47

KALI CHARAN NIGAM INSTITUTE OF TECHNOLOGY

NARAINI ROAD, BANDA-210001(U.P.)

Session: 2018-19

Industrial Training Report


On
“Food Chain Portal”
In PHP WITH WORDPRESS

Submitted in the partial fulfillment of the degree of Bachelor of Technology


In
Computer Science & Engineering

Submitted To: Submitted By:

Mr. Kushal Kumar Yadav Harshit Sen

( CSE Department ) RollNo.1513910014

1
B.tech(CSE 7th sem)

RCPL INDIA

Address-113 166 II floor, Nadri


bazar, next to RK Devi Hospital,
Swaroop Nagar, Kanpur, Uttar
Pradesh 208002

Session: 2018-19

An Industrial Training Report


On
“Food Chain Portal”
In PHP WITH WORDPRESS
Under The Guidance Of
Mr. Kuldeep Singh & Mr. Danish Jamal
(Technical Trainer)
Contact No:+918299345237
2
Submitted To: Submitted By:
RCPL INDIA Harshit Sen
Contact No:09350435664 Roll no.1513910013

3
Certificate

TABLE OF CONTENTS
4
Sr. no Topic Page no.
1. Introduction 5
1.1. Introduction of Institute 5-6
1.2 Introduction of Project 6-7
1.3 Objective 7
2. Feasibility Study 7
2.1 Economic Feasibility 8
2.2 Technical Feasibility 8
2.3 Behavioural Feasibility 8
3. Requirement Analysis 9
3.1 Hardware requirement 9
3.2 Software requirement 9-11
4. Designing 11
4.1 Data flow diagram 11
4.2 Sequence diagram 12-15
4.3 Module description 16
4.4 Screenshots 16-19
5. Coding 20-42
6. Testing 43
6.1 Unit testing 43
6.2 Integration testing 43
6.3 System testing 43
7. Implementation 44
8. Maintenance 44
9. Conclusion and Future Scope 45
10. References 45

1. Introduction
5
1.1 Introduction of Institute

WHAT IS RCPL?

RCPL is the largest training company in India with over 22 years of experience in the field of
education. RCPL has a dedicated team of 80 team members which provide the quality
trainings across the country. RCPL conducts trainings for students from best of the
Institutions of the country . Over 25,000 students get trained by us every year. We provide
Courses for Engineering and Non Engineering Stream like Computer Science, Information
Technology, Mechanical, Civil, M.Sc. I.T , B.Sc.IT etc. and Programs like Summer Training ,
Winter Training, Project Training, College Training to Suit students round the year
requirements. Android,AutoCAD 2D and 3D ,Embedded and Robotics, Java, .NET
Framework are few the Courses available with us.

HOW RCPL IS HELPFUL?

Like other educational and training industries, at RCPL you will be offered a variety of
programs but it is the instructor that makes the difference and our instructor make RCPL
stand out from others. We have a variety of skilled and trained trainers whose approach is
different which you can see anywhere. RCPL contributes a lot to the knowledge of its
trainees and we try our level hard to contribute the best to increase our trainee's ability so
that they stand out from others and whatever they contribute to the corporate world
automatically becomes productive. Not only the fresher but also the corporates who are
not able to deal with the rising technology and software are helped here. We try our level
best to deliver our services to every corner of the world by the help of customized
education. Our motto is to deliver the best services to you and that is why we have taken
the customized approach because we do not want you to compromise with your
education.

It is not necessary that you have to leave your job in order to make-up with us. You can
contact our experts and can get the best result. To serve you we are always at your service,
you can contact us as and when you get time and clear your queries.

WHAT TYPES OF SERVICES ARE OFFERED BY RCPL ?


6
RCPL provides the best available programs which helps in enhancing the technical skills
which seems to be beneficial for all the applicants.
Software Development : We provide the best and latest IT software training which helps all
the fresher and the corporates to understand well and give them the knowledge to go
hand in hand with the latest technologies. This does not only helps the companies but also
increases the self-level to deal with all the necessary software.
Instructor led campus : RCPL helps all the new instructors to get the best exposure to show
their talent in right way.
Online Live Training : We provide the high quality Online Live training offering in the
industry. With our Online Live training courses, we try to provide the exact same learning
experience as our traditional classroom based courses. In our Online Live courses, you
directly learn from and interact with a live expert instructor, the same as you would if you
attended the physical classroom course. Instructor is there to explain topics in greater
detail, answer your questions, and provide personalized study and training plans for you as
you progress through the course.
Workshops and Placement Service : At RCPL, workshops are held to increase the
understanding level because theoretical values are always not enough and workshops
helps in getting the practical knowledge which results in better understanding. As
everything leads to the placement, if the institute does not provide placement services
then it is ultimately bad for the applicants but we provide the best placement services and
for that we give our best to give you the best.

1.2 Introduction of the Project


Online Food Ordering system is a process of food delivery or taken from a local restaurant or
food cooperative through a web page or app.Much like ordering consumer goods online,many of
these allow customers to keep accounts with them in order to make frequent ordering convenient.
A customer will search for a favorite restaurant usually filtered via type of cuisine and choose
from available items. And choose delivery or pick-up. Payment can be amongst others either by
credit card,paypal or cash ,win the restaurant returning a percentage to the online food company.
food ordering system is a web-based application that stimulates the foodies (customers) to
put food orders through internet by locating their favorite restaurant or nearest one. online
Food Ordering System is a part of e-commerce. E-commerce or business through net means distributing,
buying, selling, marketing, and servicing of products or services over electronic systems such as the
Internet and other computer networks. Thus if we own a restaurant we need to upload menu online to
attract potential customers.The online food ordering system gives restaurants the ability to increase
sales and expand their business by giving customers the facility to order food online.

7
With an online restaurant menu ordering system, customers can place orders online 24 *7. Thus it is a
simple, fast and convenient food ordering system giving an edge over the competition at an affordable
price.Internet has seen a tremendous growth in terms of coverage and awareness.
So giving the business an online presence has become very crucial and important.
With [Online Ordering System], we can set up we restaurant menu online and the customers can easily
place order with a simple mouse click. Also with a food menu online we can easily track the orders,
maintain customer's database and improve the food delivery service. We can receive order through e-
mails/ fax or directly view on internet. The restaurants’ can even customize online restaurant menu and
upload images easily. Having restaurant menu on internet, potential customers can easily access it and
place order at their convenience

1.3 Objective
The proposed system is to make online Web Site for a famous Food Chain so that everyone can
get information on Menu [Items offered], Stores [Location of all the Outlets], Order Placement so
that he can order online, Hall Booking for small functions such as Birthday parties for kids and
placements [Provides user, the option for Working @ Outlet]

2. Feasibility Study

A feasibility study is conducted to select the best system that meets performance requirement. This entails
an identification description, an evaluation of candidate system and the selection of best system for the job.
The system required performance is defined by a statement of constraints, the identification of specific
system objective and a description of outputs.
All projects are Feasible given unlimited resources and infinite time. Unfortunately the development
of a computer-based system is more likely to be plagued by scarcity of resources and difficult to achieve
delivery dates. It is both necessary and prudent to evaluate the feasibility of a project at the earliest
possible time. In order to make sure that the project is feasible, following feasibility studies have been
conducted.

2.1 Economic Feasibility

8
Economic analysis is most frequently used for evaluation of the effectiveness of the system. More
commonly known as cost/benefit analysis the procedure is to determine the benefit and saving that are
expected from a system and compare them with costs, decisions is made to design and implement the
system. This part of feasibility study gives the top management the economic justification for the new
system.
This is an important input to the management the management, because very often the top management
does not like to get confounded by the various technicalities that bound to be associated with a project of
this kind In the system, the organization is most satisfied by economic feasibility. Because, if the
organization implements this system, it need not require any additional hardware resources as well as it will
be saving lot of time.

2.2 Technical Feasibility


Technical feasibility centres on the existing manual system of the test management process and to what
extent it can support the system. According to feasibility analysis procedure the technical feasibility of the
system is analyzed and the technical requirements such as software facilities, procedure, inputs are
identified. It is also one of the important phases of the system development activities. The system offers
greater levels of user friendliness combined with greater processing speed. Therefore, the cost of
maintenance can be reduced. Since, processing speed is very high and the work is reduced in the
maintenance point of view management convince that the project is operationally feasible.

2.3 Behavioural Feasibility


Estimate should be made of how strong the user is likely to move towards the development of
computerized People are inherently resistant to change and computer has been known to facilitate
changes. An system. These are various levels of users in order to ensure proper authentication
and authorization and security of sensitive data of the organization

3. Requirement Analysis
This section describes the software and hardware requirements of the project.

9
3.1. Hardware Requirement
It is recommended that the minimum configuration for the clients is as given below:

• At least 4GB of RAM


• 3.5GB Disk Space
• Processor-Intel(R) Core(TM) i3 CPU
• 64 bit operating system

• 3.2. Software Requirement


• Operating System : Windows

• Technology : php

• Web Technologies : Html, javascript, CSS

• Web Server : Apache

 Database : MySql

Platforms Supported

• Microsoft Windows 7 or later version.

• Any web browser

Perquisites
• PHP

• Design Skills

Details About Technology


 PHP

10
1. PHP: Hypertext Preprocessor (or simply PHP) is a server-side scripting language designed
for Web development, but also used as a general-purpose programming language.
2. It was originally created by Rasmus Lerdorf in 1994
3. PHP code may be embedded into HTML code, or it can be used in combination with
various web template systems, web content management systems, and web frameworks.

4. PHP code is usually processed by a PHP interpreter implemented as a module in the web
server or as a Common Gateway Interface (CGI) executable.
5. The standard PHP interpreter, powered by the Zend Engine, is free software released under the PHP
License. PHP has been widely ported and can be deployed on most web servers on almost
every operating system and platform, free of charge.

6. The PHP language evolved without a written formal specification or standard until 2014, with the
original implementation acting as the de facto standard which other implementations aimed to follow.
Since 2014 work has gone on to create a formal PHP specification.

 HTML

1. Hypertext Markup Language (HTML) is the standard markup language for creating web
pages and web applications. With Cascading Style Sheets (CSS) and JavaScript, it forms a triad
of cornerstone technologies for the World Wide Web.
2. Web browsers receive HTML documents from a web server or from local storage and render the
documents into multimedia web pages. HTML describes the structure of a web
page semantically and originally included cues for the appearance of the document.

3. HTML elements are the building blocks of HTML pages.

4. HTML can embed programs written in a scripting language such as JavaScript, which affects the
behavior and content of web pages. 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 since 1997

Database

 Connect to multiple servers in one window.

 Generate nice SQL-export.

11
 Synchronize tables between two databases.

 Manage user privileges

4. DESIGNING

4.1. DATA FLOW DIAGRAM


A Data Flow Diagram (DFD) is a graphical representation of the “flow” of data through an information
system. DFDs can also be used for the visualization of data processing (structured design).

Rules for constructing Data Flow Diagram

 Squares, circles and files must bear names.


 Decomposed data flow squares and circles can have same names.
 Draw all data flow around the outside of the diagram

4.2 SEQUENCE DIAGRAM

Sequence diagrams, which are part of the dynamic diagrams, are used to show the sequence of
actions and interactions that take place between objects . Their main components are:

 Objects: which are arranged horizontally across the top.


 Life-Line (dots vertically): which represents the object’s life during the interaction.
 Arrows: which represent the s
12
 Sequence of interactions between objects.
 Thin rectangle in life line: represents the time when object is performing an action.

4.3 ACTIVITY DIAGRAM


The Activity diagram models logic-any logic-from work flow to use cases to methods. It borrows most of its
notation from flowcharts, but has added the concept of concurrency to support many modern applications.

Activity diagrams are valuable because they

 Represent the logic required to implement system behaviours.


 Represent logic at any level the design needs, from system workflow to individual method
implementations.
 Are simple enough to learn quickly.
 Are relatively familiar to users since they are often used in business training and
procedures manuals.

a) Create User:
13
14
b) Login activity

15
Edit Profile Activity:

16
4.3. MODULES DESCRIPTION OF PROJECT
There are 6 modules in the system which can be sequentially listed as given below:-

 Login Module: Used for managing the login details.


 Users Module: Used for managing the users of the system.
 Change Password: Used to change the Current password to a new password
 Update Profile: Used to update the profile details of user
 Forget Password: Used to get the password when u forget it.
 Feedback: Used to give feedback

4.4 SCREENSHOTS

1. User page

17
2. Login page

3. Dashboard

18
4. Payment detail

5. Edit detail

19
6. Admin detail

20
7. CODING

7.1 Login-Register
<?php

//checking connection and connecting to a database

require_once('connection/config.php');

error_reporting(1);

//Connect to mysql server

$link = mysql_connect(DB_HOST, DB_USER, DB_PASSWORD);

if(!$link) {

die('Failed to connect to server: ' . mysql_error());

//Select database

$db = mysql_select_db(DB_DATABASE);

if(!$db) {

die("Unable to select database");

//retrieve questions from the questions table

$questions=mysql_query("SELECT * FROM questions")

or die("Something is wrong ... \n" . mysql_error());

?>

<?php

21
//setting-up a remember me cookie

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

//setting up a remember me cookie

if($_POST['remember']) {

$year = time() + 31536000;

setcookie('remember_me', $_POST['login'], $year);

else if(!$_POST['remember']) {

if(isset($_COOKIE['remember_me'])) {

$past = time() - 100;

setcookie(remember_me, gone, $past);

?>

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


"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />

<title><?php echo APP_NAME ?>:Login</title>

<link href="stylesheets/user_styles.css" rel="stylesheet" type="text/css" />

<script language="JavaScript" src="validation/user.js">

</script>

</head>
22
<body>

<div id="page">

<div id="menu"><ul>

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

<li><a href="foodzone.php">Food Zone</a></li>

<li><a href="specialdeals.php">Special Deals</a></li>

<li><a href="member-index.php">My Account</a></li>

<li><a href="contactus.php">Contact Us</a></li>

</ul>

</div>

<div id="header">

<div id="logo"> <a href="index.php" class="blockLink"></a></div>

<div id="company_name"><?php echo APP_NAME ?> Restaurant</div>

</div>

<div id="center">

<h1>Login/Register</h1>

<table align="center" width="100%">

<tr align="center">

<td style="text-align:center;">

<div style="border:#bd6f2f solid 1px;padding:4px 6px 2px 6px">

<form id="loginForm" name="loginForm" method="post" action="login-exec.php"


onsubmit="return loginValidate(this)">

<table width="290" border="0" align="center" cellpadding="2" cellspacing="0">

<tr>

23
<td colspan="2" style="text-align:center;"><font color="#FF0000">*
</font>Required fields</td>

</tr>

<tr>

<td width="112"><b>Email</b></td>

<td width="188"><font color="#FF0000">* </font><input name="login" type="text"


class="textfield" id="login" /></td>

</tr>

<tr>

<td><b>Password</b></td>

<td><font color="#FF0000">* </font><input name="password" type="password"


class="textfield" id="password" /></td>

</tr>

<tr>

<td><input name="remember" type="checkbox" class="" id="remember"


value="1" onselect="cookie()" <?php if(isset($_COOKIE['remember_me'])) {

echo 'checked="checked"';

else {

echo '';

?>/>Remember me</td>

<td><a href="JavaScript: resetPassword()">Forgot password?</a></td>

</tr>

<tr>

<td colspan="2"><input type="reset" value="Clear Fields"/>

24
<input type="submit" name="Submit" value="Login" /></td>

</tr>

<tr><td>&nbsp;</td></tr>

</table>

</form>

</div>

</td>

<hr>

<td style="text-align:center;">

<div style="border:#bd6f2f solid 1px;padding:4px 6px 2px 6px;">

<form id="loginForm" name="loginForm" method="post" action="register-exec.php"


onsubmit="return registerValidate(this)">

<table width="450" border="0" align="center" cellpadding="2" cellspacing="0">

<tr>

<td colspan="2" style="text-align:center;"><font color="#FF0000">*


</font>Required fields</td>

</tr>

<tr>

<th>First Name </th>

<td><font color="#FF0000">* </font><input name="fname" type="text"


class="textfield" id="fname" /></td>

</tr>

<tr>

<th>Last Name </th>

<td><font color="#FF0000">* </font><input name="lname" type="text"


class="textfield" id="lname" /></td>

25
</tr>

<tr>

<th width="124">Email</th>

<td width="168"><font color="#FF0000">* </font><input name="login" type="text"


class="textfield" id="login" /></td>

</tr>

<tr>

<th>Password</th>

<td><font color="#FF0000">* </font><input name="password" type="password"


class="textfield" id="password" /></td>

</tr>

<tr>

<th>Confirm Password </th>

<td><font color="#FF0000">* </font><input name="cpassword" type="password"


class="textfield" id="cpassword" /></td>

</tr>

<tr>

<th>Security Question </th>

<td><font color="#FF0000">* </font><select name="question" id="question">

<option value="select">- select question -

<?php

//loop through quantities table rows

while ($row=mysql_fetch_array($questions)){

echo "<option value=$row[question_id]>$row[question_text]";

?>
26
</select></td>

</tr>

<tr>

<th>Security Answer</th>

<td><font color="#FF0000">* </font><input name="answer" type="text"


class="textfield" id="answer" /></td>

</tr>

<tr>

<td colspan="2"><input type="reset" value="Clear Fields"/>

<input type="submit" name="Submit" value="Register" /></td>

</tr>

<tr><td>&nbsp;</td></tr>

</table>

</form>

</div>

</td>

</tr>

</table>

<hr>

</div>

<?php include 'footer.php'; ?>

</div>

</body>

</html>

27
7.2 Order booking

<?php require_once('connection/config.php'); ?>

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


"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />

<title><?php echo APP_NAME ?>:Registration Failed</title>

<link href="stylesheets/user_styles.css" rel="stylesheet" type="text/css" />

<script language="JavaScript" src="validation/user.js">

</script>

</head>

<body>

<div id="page">

<div id="menu"><ul>

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

<li><a href="foodzone.php">Food Zone</a></li>

<li><a href="specialdeals.php">Special Deals</a></li>

<li><a href="member-index.php">My Account</a></li>

<li><a href="contactus.php">Contact Us</a></li>

</ul>

</div>

28
<div id="header">

<div id="logo"> <a href="index.php" class="blockLink"></a></div>

<div id="company_name"><?php echo APP_NAME ?> Restaurant</div>

</div>

<div id="center">

<h1>Registration Failed</h1>

<div style="border:#bd6f2f solid 1px;padding:4px 6px 2px 6px">

<p>&nbsp;</p>

<div class="error">Reservation Failed!</div>

<p>You are seeing this page because partyhall has been booked already. <a
href="partyhalls.php">Click Here</a> to try again.</p>

</div>

</div>

<?php include 'footer.php'; ?>

</div>

</body>

</html>

7.3 cart detail


<?php

require_once('auth.php');

?>

<?php

//checking connection and connecting to a database

require_once('connection/config.php');
29
//Connect to mysql server

$link = mysql_connect(DB_HOST, DB_USER, DB_PASSWORD);

if(!$link) {

die('Failed to connect to server: ' . mysql_error());

//Select database

$db = mysql_select_db(DB_DATABASE);

if(!$db) {

die("Unable to select database");

//define default values for flag_0

$flag_0 = 0;

//get member_id from session

$member_id = $_SESSION['SESS_MEMBER_ID'];

//selecting particular records from the food_details and cart_details tables. Return an error if
there are no records in the tables

$result=mysql_query("SELECT
food_name,food_description,food_price,food_photo,cart_id,quantity_value,total,flag,categ
ory_name FROM food_details,cart_details,categories,quantities WHERE
cart_details.member_id='$member_id' AND cart_details.flag='$flag_0' AND
cart_details.food_id=food_details.food_id AND
food_details.food_category=categories.category_id AND
cart_details.quantity_id=quantities.quantity_id")

or die("A problem has occured ... \n" . "Our team is working on it at the moment ... \n" .
"Please check back after few hours.");
30
?>

<?php

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

//Function to sanitize values received from the form. Prevents SQL injection

function clean($str) {

$str = @trim($str);

if(get_magic_quotes_gpc()) {

$str = stripslashes($str);

return mysql_real_escape_string($str);

//get category id

$id = clean($_POST['category']);

//selecting all records from the food_details table based on category id. Return an error
if there are no records in the table

$result=mysql_query("SELECT * FROM food_details WHERE food_category='$id'")

or die("A problem has occured ... \n" . "Our team is working on it at the moment ... \n" .
"Please check back after few hours.");

?>

<?php

//retrieving quantities from the quantities table

$quantities=mysql_query("SELECT * FROM quantities")

or die("Something is wrong ... \n" . mysql_error());

31
?>

<?php

//retrieving cart ids from the cart_details table

//define a default value for flag_0

$flag_0 = 0;

$items=mysql_query("SELECT * FROM cart_details WHERE member_id='$member_id'


AND flag='$flag_0'")

or die("Something is wrong ... \n" . mysql_error());

?>

<?php

//retrive a currency from the currencies table

//define a default value for flag_1

$flag_1 = 1;

$currencies=mysql_query("SELECT * FROM currencies WHERE flag='$flag_1'")

or die("A problem has occured ... \n" . "Our team is working on it at the moment ... \n" .
"Please check back after few hours.");

?>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"


"http://www.w3.org/TR/html4/loose.dtd"><html>

<html>

<head>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

<title><?php echo APP_NAME ?>:Shopping Cart</title>

<script type="text/javascript" src="swf/swfobject.js"></script>

<link href="stylesheets/user_styles.css" rel="stylesheet" type="text/css">

<script language="JavaScript" src="validation/user.js">


32
</script>

</head>

<body>

<div id="page">

<div id="menu"><ul>

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

<li><a href="foodzone.php">Food Zone</a></li>

<li><a href="specialdeals.php">Special Deals</a></li>

<li><a href="member-index.php">My Account</a></li>

<li><a href="contactus.php">Contact Us</a></li>

</ul>

</div>

<div id="header">

<div id="logo"> <a href="index.php" class="blockLink"></a></div>

<div id="company_name"><?php echo APP_NAME ?> Restaurant</div>

</div>

<div id="center">

<h1>MY SHOPPING CART</h1>

<hr>

<h3><a href="foodzone.php">Continue Shopping!</a></h3>

<form name="quantityForm" id="quantityForm" method="post" action="update-


quantity.php" onsubmit="return updateQuantity(this)">

<table width="560" align="center">

<tr>
33
<td>Item ID</td>

<td><select name="item" id="item">

<option value="select">- select -

<?php

//loop through cart_details table rows

while ($row=mysql_fetch_array($items)){

echo "<option value=$row[cart_id]>$row[cart_id]";

?>

</select>

</td>

<td>Quantity</td>

<td><select name="quantity" id="quantity">

<option value="select">- select -

<?php

//loop through quantities table rows

while ($row=mysql_fetch_assoc($quantities)){

echo "<option value=$row[quantity_id]>$row[quantity_value]";

?>

</select>

</td>

<td><input type="submit" name="Submit" value="Change Quantity" /></td>

</tr>

34
</table>

</form>

<div style="border:#bd6f2f solid 1px;padding:4px 6px 2px 6px">

<table width="910" height="auto" style="text-align:center;">

<tr>

<th>Item ID</th>

<th>Food Photo</th>

<th>Food Name</th>

<th>Food Description</th>

<th>Food Category</th>

<th>Food Price</th>

<th>Quantity</th>

<th>Total Cost</th>

<th>Action(s)</th>

</tr>

<?php

//loop through all table rows

$symbol=mysql_fetch_assoc($currencies); //gets active currency

while ($row=mysql_fetch_array($result)){

echo "<tr>";

echo "<td>" . $row['cart_id']."</td>";

echo '<td><a href=images/'. $row['food_photo']. ' alt="click to view full image"


target="_blank"><img src=images/'. $row['food_photo']. ' width="80"
height="70"></a></td>';

35
echo "<td>" . $row['food_name']."</td>";

echo "<td>" . $row['food_description']."</td>";

echo "<td>" . $row['category_name']."</td>";

echo "<td>" . $symbol['currency_symbol']. "" . $row['food_price']."</td>";

echo "<td>" . $row['quantity_value']."</td>";

echo "<td>" . $symbol['currency_symbol']. "" . $row['total']."</td>";

/*

echo "<form>";

echo '<td><select name="quantity" id="quantity"


onchange="getQuantity(this.value)">

<option value="select">- select quantity -

<?php

while ($row=mysql_fetch_assoc($quantities)){

echo "<option value=$row[quantity_id]>$row[quantity_value]";

//$_SESSION[SESS_CART_ID] = $row[cart_id];

?>

</select></td>';

echo "</form>";

*/

/*

echo "<form>";

echo "<td><select name='quantity' id='quantity'


onclick='getQuantity(this.value)'>

<option value='1'>select

36
<option value='2'>1

<option value='3'>2

<option value='4'>3

</select></td>";

echo "</form>";

*/

echo '<td><a href="order-exec.php?id=' . $row['cart_id'] . '">Place


Order</a></td>';

echo "</tr>";

mysql_free_result($result);

mysql_close($link);

?> </table>

</div></div><?php include 'footer.php'; ?>

</div>

</body>

</html>

7.4 Member profile


<?php

require_once('auth.php');

?>

<?php

//checking connection and connecting to a database

require_once('connection/config.php');
37
//Connect to mysql server

$link = mysql_connect(DB_HOST, DB_USER, DB_PASSWORD);

if(!$link) {

die('Failed to connect to server: ' . mysql_error());

//Select database

$db = mysql_select_db(DB_DATABASE);

if(!$db) {

die("Unable to select database");

//get member id from session

$memberId=$_SESSION['SESS_MEMBER_ID'];

?>

<?php

//retrieving all rows from the cart_details table based on flag=0

$flag_0 = 0;

$items=mysql_query("SELECT * FROM cart_details WHERE member_id='$memberId' AND


flag='$flag_0'")

or die("Something is wrong ... \n" . mysql_error());

//get the number of rows

$num_items = mysql_num_rows($items);

?>

<?php

//retrieving all rows from the messages table

38
$messages=mysql_query("SELECT * FROM messages")

or die("Something is wrong ... \n" . mysql_error());

//get the number of rows

$num_messages = mysql_num_rows($messages);

?>

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


"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />

<title><?php echo APP_NAME ?>:My Profile</title>

<link href="stylesheets/user_styles.css" rel="stylesheet" type="text/css" />

<script language="JavaScript" src="validation/user.js">

</script>

</head>

<body>

<div id="page">

<div id="menu"><ul>

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

<li><a href="foodzone.php">Food Zone</a></li>

<li><a href="specialdeals.php">Special Deals</a></li>

<li><a href="member-index.php">My Account</a></li>

<li><a href="contactus.php">Contact Us</a></li>

</ul>

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

<div id="logo"> <a href="index.php" class="blockLink"></a></div>

<div id="company_name"><?php echo APP_NAME ?> Restaurant</div>

</div>

<div id="center">

<h1>My Profile</h1>

<div style="border:#bd6f2f solid 1px;padding:4px 6px 2px 6px">

<a href="member-index.php">Home</a> | <a href="cart.php">Cart[<?php echo


$num_items;?>]</a> | <a href="inbox.php">Inbox[<?php echo $num_messages;?>]</a> |
<a href="tables.php">Tables</a> | <a href="partyhalls.php">Party-Halls</a> | <a
href="ratings.php">Rate Us</a> | <a href="logout.php">Logout</a>

<p>&nbsp;</p>

<p>Here you can change your password and also add a billing or delivery address. The
delivery address will be used to bill your food orders as well as providing us with details on
where to deliver your food. For more information <a href="contactus.php">Click Here</a>
to contact us.</p>

<hr>

<table width="870">

<tr>

<form id="updateForm" name="updateForm" method="post" action="update-exec.php?


id=<?php echo $_SESSION['SESS_MEMBER_ID'];?>" onsubmit="return
updateValidate(this)">

<td>

<table width="350" align="center" border="0" cellpadding="2" cellspacing="0">

<CAPTION><h2>CHANGE YOUR PASSWORD</h2></CAPTION>

<tr>

<td colspan="2" style="text-align:center;"><font color="#FF0000">*


</font>Required fields</td>
40
</tr>

<tr>

<th width="124">Old Password</th>

<td width="168"><font color="#FF0000">* </font><input name="opassword"


type="password" class="textfield" id="opassword" /></td>

</tr>

<tr>

<th>New Password</th>

<td><font color="#FF0000">* </font><input name="npassword" type="password"


class="textfield" id="npassword" /></td>

</tr>

<tr>

<th>Confirm New Password </th>

<td><font color="#FF0000">* </font><input name="cpassword" type="password"


class="textfield" id="cpassword" /></td>

</tr>

<tr>

<td>&nbsp;</td>

<td><input type="submit" name="Submit" value="Change" /></td>

</tr>

</table>

</td>

</form>

<td>

<form id="billingForm" name="billingForm" method="post" action="billing-exec.php?id=<?


php echo $_SESSION['SESS_MEMBER_ID'];?>" onsubmit="return billingValidate(this)">

41
<table width="300" border="0" align="center" cellpadding="2" cellspacing="0">

<CAPTION><h2>ADD DELIVERY/BILLING ADDRESS</h2></CAPTION>

<tr>

<td colspan="2" style="text-align:center;"><font color="#FF0000">*


</font>Required fields</td>

</tr>

<tr>

<th>Street Address </th>

<td><font color="#FF0000">* </font><input name="sAddress" type="text"


class="textfield" id="sAddress" /></td>

</tr>

<tr>

<th>P.O. Box No </th>

<td><font color="#FF0000">* </font><input name="box" type="text" class="textfield"


id="box" /></td>

</tr>

<tr>

<th>City </th>

<td><font color="#FF0000">* </font><input name="city" type="text" class="textfield"


id="city" /></td>

</tr>

<tr>

<th width="124">Mobile No</th>

<td width="168"><font color="#FF0000">* </font><input name="mNumber"


type="text" class="textfield" id="mNumber" /></td>

</tr>

42
<tr>

<th>Landline No</th>

<td>&nbsp;&nbsp;&nbsp;<input name="lNumber" type="text" class="textfield"


id="lNumber" /></td>

</tr>

<tr>

<td>&nbsp;</td>

<td><input type="submit" name="Submit" value="Add" /></td>

</tr>

</table>

</td>

</form>

</tr>

</table>

<p>&nbsp;</p>

</div>

</div>

<?php include 'footer.php'; ?>

</div>

</body>

</html>

6.TESTING

43
Software testing is a critical element of software quality assurance and represent the ultimate
review of specification design, coding, purpose of product testing is to verify and validate
various work products via unit integrated unit, final product to ensure that they meet their
requirements.

6.1. UNIT TESTING

Unit testing is essentially for the verification of the code produced during the coding phase and
the goal is test the internal logic of the module/program. Into the Generic code project, the unit
testing is done during coding phase of data entry forms whether the functions are working
properly or not. In this phase all the drivers are tested they are rightly connected or not.
All the tested modules are combined into subsystems, which are then tested. The goal is to see if
the modules are properly integrated, and the emphasis being on the testing interfaces between the
modules. The generic code integration testing is done mainly on table creation module and
insertion module.

6.2. INTEGRATION TESTING

Testing can be done in two ways:


1. Bottom up approach
2. Top down approach

6.3. SYSTEM TESTING

Once the entire system has been built then it has to be tested against the ‘System Specification’
to check if it delivers the features required. It is still developer focused, although specialist
developers known as system testers are normally employed to do it. In essence System Testing is
not about checking the individual parts of the design, but checking the system as a whole. In
effect it is one giant component.

7. IMPLEMENTATION

44
1. All The fields such as Department, Employee, Interview, are validated and does not take
invalid
values.
2. Each form for Department, Designation, Leave cannot accept blank values fields.
3. Avoiding errors in data.
4. Controlling amount of input.
5. Integration of all modules/ forms in the system.
6. Preparation of the test cases.
7. Preparation of the possible test data with all the validation check.
8. Actual testing done manually.
9. Recording of all the reproduced errors.
10. Functionally of the entire module/ forms.
11. Validations for user input.
12. Checking of code standards to be maintained during coding.
13. Testing the module with all the possible test data.
14. Testing of the functionality involving all type of calculation etc.

8. Maintainence

Maintenance covers a wide range of activities including correcting, coding and designing errors,
updating documentation and test data and upgrading user support. Enhancement means adding,
modifying or re-developing the code to support changes in the specifications. It is necessary to
keep up with the changing user needs and the operational environment. The software is designed
with the view of easy updating to the software.

Future advancements can be done easily through the review of product. The software
architecture is strong enough to provide enhancement in functionality, performance and
reliability. Functions in the software are designed in such a way that they dynamically update on
addition of new and revised modules. To append new features in this software, the databases for
student details, examination details are sufficient enough for the task. Thus the software is
capable enough of being enhanced easily whenever requires by the user.

9. Conclusion & Future Scope

45
This project aimed toward developing a mobile learning application that assists students in their
academic life by presenting all the needed material to master php from scratch. This material
includes general description of the php, information about the prerequisites, its architecture,
widgets and layouts.

Due to time constrains, the application included only some content of android that is basic.
However, if the mobile application is successful, a more complete version can be implemented as
future work to include more departments

10. References
 www.w3schools.com

 www.google.com

 www.tutorialspoint.com

 www.assignmenthelp.net

 www.expertbuzz.com

46
47

You might also like