Beruflich Dokumente
Kultur Dokumente
Page No.
Chapter 1. Introduction
1) Introduction 7
2) System environment 7
3) Software requirement 8
4) Hardware requirements 8
1) Purpose 9
2) Project Scope 9
3) Existing System 9
4) Proposed System 9
5) System Description 10
Page 1
Chapter 4.Implementation issues
1) PHP 11
2) AJAX 13
3) Cascading style sheet(CSS) 16
System Description
Chapter 5. System Design
1) Introduction 21
2) Conceptual Design 22
3) ER-Diagram 23
4) Logical Design 23
5) Physical Design 24
6) Data Flow Diagram of “Online Tourism Guide”
24
Chapter 8. Conclusion
7) Features of “Online Tourism Guide” 114
8) Benefits Accrued from “Online Tourism Guide” 114
9) Limitations of “Online Tourism Guide” 115
Bibliography
Page 2
CHAPTER # 1
Introduction
Contents:
Introduction
Problem Definition
Aim
Objective
Goal
Need of System
Page 3
Introduction to the System:
The Online Tourism Guide is a java based website that helps the tourists in
exploring and planning to visit places according to city and kind of place. This
website plans the tour such that the user can save more time in exploring
maximum places rather than wasting time in reaching his destinations.
Initially, it takes the information about the city and kind of place, the
user want to visit. Then it will show the list of places of attractions of
that place from which the user can opt the places of his choice
Aim:
“Help tourist to search places and increase tourism”.
Objective:
This website is very useful to all the people who love to travel in planning
a time efficient trips where he or she can save time to visit new places
rather than getting lost in an unaware place.
Page 4
CHAPTER #2
Hardware and
Software
Requirements
Contents:
Introduction
System environment
Software requirement
Hardware requirements
Page 5
Introduction:
In this chapter we mentioned the software and hardware requirements, which
are necessary for successfully running this system. The major element in
building systems is selecting compatible hardware and software. The system
analyst has to determine what software package is best for the “Online
Tourism Guide System” and, where software is not an issue, the kind of
hardware and peripherals needed for the final conversion.
System Environment:
After analysis, some resources are required to convert the abstract system into
the real one. All the resources, which accomplish a robust
The hardware and software selection begins with requirement analysis,
followed by a request for proposal and vendor evaluation.
Software and real system, are identified. According to the provided functional
specification all the technologies and its capacities are identified. Basic
functions and procedures and methodologies are prepared to implement. Some
of the Basic requirements such as hardware and software are described as
follows: -
Hardware and Software Specification
Software Requirements:
Netbeans
MYSQL
Hardware Requirements:
2 GB RAM or more.
Page 6
CHAPTER # 3
System Analysis
Contents:
Purpose
Project Scope
Existing System
Proposed System
System Overview
Page 7
Purpose:
This website is very useful to all the people who love to travel in planning a time
efficient trips where he or she can save time to visit new places rather than getting
lost in an unaware place.
Project Scope:
The project has a wide scope, as it is not intended to a particular organization. This
project is going to develop generic software, which can be applied by any businesses
organization. More over it provides facility to its customer. Also the software is going
to provide a huge amount of summary data.
Proposed System:
For people who want the trip planned entirely, who don’t want to use the
filtering method of pen and paper or trace filtering tour guide helps them
completely. The tour guide is a website that helps vacation goers plan out
where to go and what to see based on their interests.
System Overview:
The key features required in the system are as follows:
Login: The ADMIN has all the rights in the software including updating
the status of his site. The fields in login are username and password. If
the username and password are correct then it is directed to admin home
page.
New user: This module is for the users who do not have their account.
Here user is no need to create an account to login. User can search places
by selecting city and kind of place.
Places: This module has information regarding the places such as its
name, image, description, rating , location , kindofplace etc.The ADMIN
has the authority to Add, Delete, Update etc. The USER can only view
the places.
Page 8
Search: This module helps the user to ease his search based on his city
and kindofplace.
CHAPTER # 4
Implementation issues
4.1 JSP
Definition of JSP:
JSPs are normal HTML pages with embedded Java code. To process a JSP file,
developers need a JSP engine, which is connected to a Web server. The JSP
page is then compiled into a servlet, which is handled by the servlet engine.
This phase is known as translation. The servlet engine then loads the servlet
class and executes it to create dynamic HTML, which is then sent to the
browser.
4.2 HTML
Page 9
HTML (Hypertext Markup Language) is the set of markup symbols or
codes inserted in a file intended for display on a World Wide
Web browser page. The markup tells the Web browser how to display a
Web page's words and images for the user. Each individual markup code is
referred to as an element (but many people also refer to it as a tag). Some
elements come in pairs that indicate when some display effect is to begin
and when it is to end.
CSS can control the placement of text and objects on your pages as well as the look of those
objects.
HTML information creates the objects (or gives objects meaning), but styles describe how the
objects should appear. The HTML gives your page structure, while the CSS creates the
Page 10
“presentation”. An external CSS is really just a text file with a .css extension. These files can
be created with Dreamweaver, a CSS editor, or even Notepad.
The best practice is to design your web page on paper first so you know where you will want
to use styles on your page. Then you can create the styles and apply them to your page.
Css Rules
A Style Sheet is made up of Rules. A Rule is one or more properties that will be applied to
one or more elements. Each rule will have a selector and a definition. A Style Sheet can be
collection of Styles; however, a style sheet could have just one style.
A style rule consists of a selector and the properties or attributes of that selector that are to be
affected. These properties or attributes are contained within curly brackets and called the
style definition. For example in the style rule: h2 {color: red; font-family: Arial ;}, h2 is
the selector and the rest (within the curly brackets) is the style definition. The standards of the
style rules are that each attribute is followed by a colon (:) followed by the value for that
attribute. Then each set (of attribute and value) is followed by a semicolon (;). Several style
attributes can be assigned at one time to a tag or selector or multiple tags. For example you
could specify the font family and color of all the heading tags at once (with a comma between
each one) and then give each one a separate size in a different rule.
Several tags being defined at once:
h1,h2,h3,h4 {
color: #ff3300;
font-family: Arial;
}
Then define the size of this one tag separately:
h1{
font-size: 160%;
}
To define a style using Dreamweaver, you can either redefine the predefined tags such as the
Heading 1 tag, Heading 2 tag, the paragraph tag, etc. or define a custom style that you create.
Page 11
The tag or the custom style is the selector. One custom style is called a class. Classes can be
used many times. Another custom style is an ID. An ID is similar to a class, but it can only
be used once. You can also create specific styles by combining selectors. For example you
could set up a sidebar for News and specify that only paragraph text within that section
should be a particular color or size.
.news p {
font-size: 80%;
color: blue;
}
CSS Styles
There are three kinds of Styles: Inline, Embedded (or Internal), and External (or Linked).
One or more types of styles can be used for each web page.
Inline styles are very similar to HTML styles in that they are placed in the <body> of your
document and good for only that one instance. The style definition must be marked by
<style= attributes:values;> tags. This type is not commonly used because they are specific
to each instance and would be time consuming to change and could not be used for other
pages in your site.
Embedded / Internal styles are placed in the <head> of your document with the tag
<style type=”text/css”> tags.
The selector and the definition will be enclosed by comment markers <!-- --> and end with
</style> and will be good for the whole page. Comment markers are good for documentation
or to hide information from older browsers.
An External (Linked) Style Sheet is a totally separate document from the HTML document
and can be linked to and utilized by many pages. Create the link in this manner:
<link rel="stylesheet" type="text/css"
href="full/path/to/stylesheet.css">
This is telling the browser that the link relates to a CSS style sheet, it is in text and the path to
the sheet follows the href tag.
Page 12
The external style sheet contains no HTML tags. HTML tags in a style sheet can cause it to
not function properly. It even has it’s own comment tag :
/* CSS Comment */
Using External Style Sheets takes advantage of one of the most powerful features of CSS
which is the ability to make changes to the style and have it immediately change all of your
web pages. For example if you have a particular color scheme that needs to be changed you
would just have to change the properties in the style sheet and all of the pages linked to that
sheet would be changed. Also if you create a style and reuse it several times you shrink the
size of your file. Therefore, the External style sheet is the type of style sheet used most
often.
Javascript
Page 13
the output of server-side code is displayed in the HTML, while JavaScript code
remains fully visible in the source of the webpage. It can also be referenced in a
separate .JS file, which may also be viewed in a browser.
CHAPTER # 5
System Design
Contents:
Use case diagram
Class Diagram
Sequence Diagram
Data flow diagram
Page 14
Use Case Diagram:
Use case diagram consists of use cases and actors and shows the interaction
between them. The key points are:
The main purpose is to show the interaction between the use cases and the
actor.
The use cases are the functions that are to be performed in the module.
Manage Places
Manage City
Manage
ADMIN Category
SYSTEM
Manage
Contacts
Page 15
Fig.5.1
View Places
Give Feedback
View Map
USER Fig.5.2
Send Query SYSTEM
Page 16
Class Diagram:
Fig.5.3
Page 17
Sequence Diagram For Administrator:-
Page 18
Login Application Database
Login
:Request
:Validate()
:executeQuery()
Administrator Response
Show Result
Success:hide() Failed:show()
Fig.5.4
Page 19
Fig.5.5
Activity Diagram
Page 20
visualization of Data Processing. It is common practice for a designer to draw a
context-level DFD first which shows the interaction between the system and
outside entities. This context-level DFD is then "exploded" to show more detail
of the system being modeled.
A DFD represents flow of data through a system. Data flow diagrams are
commonly used during problem analysis. It views a system as a function that
transforms the input into desired output. A DFD shows movement of data
through the different transformations or processes in the system.
Dataflow diagrams can be used to provide the end user with a physical idea of
where the data they input ultimately has an effect upon the structure of the
whole system from order to dispatch to restock how any system is developed
can be determined through a dataflow diagram. The appropriate register saved
in database and maintained by appropriate authorities.
Function
File/Database
Input/output
Flow
Level 0
Input Output
Admin/User
Page 21
System Database
Level1
Authenticate
User
Page 22
Entity: Entity is a “thing” in the real world with an independent existence. An
entity may be an object with a physical existence such as person, car or
employee. Entity symbol is as follows
Page 23
ProID LoginID
DOJ
ProNam
e
Passwor
d
Product Reque Member
ProCom st
p MNam
e
ProCat
Price
dob PhoneN
o
Place Order
User Name Passwor
d OrdNo
Check the
Login Login ID Order Detail
LoginID
Qty Proid
Req. New
Member
Name Addres
s
Registration
Passwor City
d
State
EMail
Country
Page 24
Page 25
CHAPTER # 6
User Screens and Report
Output screens
HOME PAGE
Page 26
ABOUT US PAGE
Page 27
FIND PLACES PAGE
Page 28
CUSTOMER HOME PAGE
Page 29
ADMIN HOME PAGE
Page 30
Manage Cakes Page
Page 31
Manage Chocolates Page
Page 32
Manage Electronics Page
Page 33
Manage Flowers Page
Page 34
Manage Fashion Page
Page 35
Manage Occassion
Page 36
Manage Home and Living Page
Page 37
Manage Toys and Gifts
Page 38
Feedback
Page 39
About Us
Page 40
Contact US
Page 41
Manage Booking
View Cakes
Page 42
Page 43
View Electronics Page
Page 44
View Flowers Page
Page 45
Fill Booking Information
Page 46
Page 47
CHAPTER # 7
Coding
Page 48
{
$lmsg.='<br/><a href=logout.php>logout</a>';
}
?>
<html>
<?php
?>
</head><body>
Page 49
LOGIN CODING
<html>
<?php
@session_start();
$lmsg="";
include_once('../dbconfig.php');
if(
isset($_REQUEST['signin']))
{
$u=$_REQUEST['uname'];
$p=$_REQUEST['upwd'];
if(isset($_REQUEST['rem']))
$r="yes";
else
$r="no";
$n=verifyuserff($u,$p,$r);
if($n==1)
{
$page=rolepage();
header("Location:$page");
}
else
{
header("Location:failure.php");
}
Page 50
}
?>
</head><body>
<html>
<head>
<?php
include "header.php"; ?>
</head>
<body>
<?php include "top.php"; ?>
<div>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<?php
/*
on authentic page, only valid users of website can visit
strangers(anonymous) are not allowed
*/
Page 52
@session_start();
include_once "dbconfigure.php";
$msg="";
if(verifyuser())
{
if(fetchrole()=='admin')
{
$un=fetchusername();
$msg="Welcome $un , <br /><a href='signout.php'>Signout</a>";
}
else
{
header("Location:loginerror.php");
}
}
else
{
header("Location:loginerror.php");
}
?>
<html >
<head>
</head>
<body>
<br/>
<br/>
<br/>
<?php
echo $msg;
Page 53
?>
<br/>
<br/>
<br/>
<br/>
</body>
</html>
</div>
<?php include "bottom.php"; ?>
Page 54
</body>
</html>
<html>
<head>
<?php include "header.php" ?>
</head>
<body>
<?php include "top.php"; ?>
Page 55
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<a href = admin_home.php><img src = goback.png></a>
<div>
<br/>
<br/>
<center><h2 align = center>Manage Cakes</h2></center>
<form method = post enctype='multipart/form-data'>
<table align = center>
<tr>
<td>
Enter Cake ID</td><td><input type = text name = id></td>
<tr>
<tr>
<td>Cake Image</td><td><input type = file name = "image" id = "image"></td>
</tr>
<tr>
<td>
Page 56
Flavour</td><td><input type = text name = category></td>
<tr>
<tr>
<td>Price</td><td><input type = text name = price></td>
</tr>
<tr>
<td>Description</td><td><input type = text name = description></td>
</tr>
<tr>
<td colspan = 2>
<input type = submit name = save value = Save>
<input type = submit name = modify value = Modify>
<input type = submit name = remove value = Remove>
<input type = submit name = search value = Search>
</td>
</tr>
</table>
</form>
<?php
include "dbconfigure.php";
if(isset($_POST['save']))
{
$id = $_POST['id'];
$name = $_POST['name'];
move_uploaded_file($_FILES['image']['tmp_name'],"upload_image/".
$_FILES['image']['name']);
$image = "upload_image/".$_FILES['image']['name'];
$category = $_POST['category'];
Page 57
$price = $_POST['price'];
$description = $_POST['description'];
if(isset($_POST['modify']))
{
$id = $_POST['id'];
$name = $_POST['name'];
move_uploaded_file($_FILES['image']['tmp_name'],"upload_image/".
$_FILES['image']['name']);
$image = "upload_image/".$_FILES['image']['name'];
$category = $_POST['category'];
$price = $_POST['price'];
$description = $_POST['description'];
if(isset($_POST['remove']))
Page 58
{
$id = $_POST['id'];
if(isset($_POST['search']))
{
echo "</tr>";
while($column=mysql_fetch_array($rs))
{
echo "<tr>";
echo "<td>$column[0]</td>";
echo "<td>$column[1]</td>";
echo '<td><img src="'.$column['image'].'" width="100"></td>';
echo "<td>$column[3]</td>";
echo "<td>$column[4]</td>";
Page 59
echo "<td>$column[5]</td>";
echo "</tr>";
}
echo "</table>";
}
?>
</div>
<!-- Bottom section -->
<?php include "bottom.php" ?>
</body>
</html>
LOGOUT CODING
<?php
@session_start();
$_SESSION['sun']="";
$_SESSION['sp']="";
@session_destroy();
setcookie('cun',"",time()-60*60*24*7);
setcookie('cp',"",time()-60*60*24*7);
header("Location:login.php");
?>
<html>
<head>
<?php include "header.php" ?>
</head>
Page 61
<body>
<?php include "top.php"; ?>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<a href = admin_home.php><img src = goback.png></a>
<div>
<br/>
<br/>
<center><h2 align = center>Manage Chocolate</h2></center>
<form method = post enctype='multipart/form-data'>
<table align = center>
<tr>
<td>
Enter Chocolate ID</td><td><input type = text name = id></td>
<tr>
<tr>
<td>Chocolate Image</td><td><input type = file name = "image" id = "image"></td>
</tr>
Page 62
<tr>
<td>
Category</td><td><input type = text name = category></td>
<tr>
<tr>
<td>Price</td><td><input type = text name = price></td>
</tr>
<tr>
<td>Description</td><td><input type = text name = description></td>
</tr>
<tr>
<td colspan = 2>
<input type = submit name = save value = Save>
<input type = submit name = modify value = Modify>
<input type = submit name = remove value = Remove>
<input type = submit name = search value = Search>
</td>
</tr>
</table>
</form>
<?php
include "dbconfigure.php";
if(isset($_POST['save']))
{
$id = $_POST['id'];
$name = $_POST['name'];
move_uploaded_file($_FILES['image']['tmp_name'],"upload_image/".
$_FILES['image']['name']);
$image = "upload_image/".$_FILES['image']['name'];
Page 63
$category = $_POST['category'];
$price = $_POST['price'];
$description = $_POST['description'];
if(isset($_POST['modify']))
{
$id = $_POST['id'];
$name = $_POST['name'];
move_uploaded_file($_FILES['image']['tmp_name'],"upload_image/".
$_FILES['image']['name']);
$image = "upload_image/".$_FILES['image']['name'];
$category = $_POST['category'];
$price = $_POST['price'];
$description = $_POST['description'];
if(isset($_POST['search']))
{
echo "</tr>";
while($column=mysql_fetch_array($rs))
{
echo "<tr>";
echo "<td>$column[0]</td>";
echo "<td>$column[1]</td>";
echo '<td><img src="'.$column['image'].'" width="100"></td>';
Page 65
echo "<td>$column[3]</td>";
echo "<td>$column[4]</td>";
echo "<td>$column[5]</td>";
echo "</tr>";
}
echo "</table>";
}
?>
</div>
<!-- Bottom section -->
<?php include "bottom.php" ?>
</body>
</html>
Page 66
MANAGE BOOKING PAGE CODING
<html>
<head>
<?php include "header.php" ?>
</head>
<body>
<?php include "top.php" ?>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<?php
include "dbconfigure.php";
session_start();
$u = $_SESSION['sun'];
$query1 = "select * from siteuser where username='$u'";
$rs1 = my_select($query1);
$row1 = mysql_fetch_array($rs1);
$customername = $row1[0];
$email = $row1[6];
$contact = $row1[7];
$id = $_GET['id'];
Page 67
$category = $_GET['cat'];
$query = "select * from $category where id='$id'";
$rs = my_select($query);
$row = mysql_fetch_array($rs);
$id = $row[0];
$name = $row[1];
$price = $row[4];
if(isset($_POST['confirm']))
{
$username = $_POST['username'];
$giftname = $_POST['giftname'];
$quantity = $_POST['quantity'];
$address = $_POST['address'];
$contact = $_POST['contact'];
$email = $_POST['email'];
$bookingdate = $_POST['bookingdate'];
echo "<div style = 'position : absolute ; top : 500px ; left : 400px'>$n Record Saved
<br/>Booking Successfull</div>";
}
?>
<br/>
<br/>
<br/>
<a href = customer_home.php><img src = goback.png></a>
Page 68
<div>
<br/>
<br/>
<center><h2 align = center>Fill Booking Information</h2></center>
<form method = post enctype='multipart/form-data'>
<table align = center>
<tr>
<td>UserName</td> <td><input type = text name = username value = "<?php echo
$customername ?>" readonly></td>
</tr>
<tr>
<td>Gift Name</td> <td><input type = text name = giftname value = "<?php echo
$name ?>" readonly></td>
</tr>
<tr>
<td>Quantity </td><td><input type = text name = quantity></td>
</tr>
<tr>
<td>Delivery Address </td><td><input type = text name = address></td>
</tr>
<tr>
<td>Contact </td><td><input type = text name = contact></td>
</tr>
<tr>
<td>Email ID </td><td><input type = text name = email></td>
</tr>
Page 69
<tr>
<td>Booking Date </td><td><input type = text name = bookingdate value = "<?php
echo date("d-m-y"); ?>" readonly></td>
</tr>
<tr>
<td colspan = 2>
<input type = submit name = confirm value = "Confirm Order">
</td>
</tr>
</table>
</form>
</div>
<!-- Bottom section -->
<?php include "bottom.php" ?>
</body>
</html>
<?php
if(isset($_POST['save']))
{
$username = $_POST['username'];
$giftname = $_POST['giftname'];
$quantity = $_POST['quantity'];
$address = $_POST['address'];
$contact = $_POST['contact'];
$email = $_POST['email'];
$bookingdate = $_POST['bookingdate'];
Page 70
$query = "insert into booking
values('','$username','$giftname','$quantity','$address','$contact','$bookingdate')";
$n = my_iud($query);
echo "$n record saved";
}
<html>
<head>
<?php
include "header.php";
?>
</head>
<body background = "mpimages/bns.jpg">
<?php include "top.php" ?>
<br/>
<br/>
<a href = admin_home.php><img src = goback.png></a>
<div>
<html >
<head>
Page 71
</head>
<body>
<br/>
<br/>
<p>
<form method="post">
<table width="360" border="0" align = center>
<tr>
<td>
Enter your Name</td>
<td><input type="text" name="username" ></td>
</tr>
<tr>
<td>
Enter your password</td>
<td>
<input type="password" name="pwd" ></td>
</tr>
<tr>
<td>Enter your Date of birthday</td>
<td>
<input type = date name =dob>
</td>
</tr>
<tr>
<td>
Enter your gender</td>
<td><input type="radio" name="gender" value='male' checked>Male
Page 72
<input type="radio" name="gender" value='female'>Female
</td>
</tr>
<tr>
<td>Enter hint question</td>
<td>
<input type="text" name="hintq" ></td>
</tr>
<tr>
<td>
Enter hint answer</td>
<td><input type="text" name="hinta" ></td>
</tr>
<tr>
<td>
Enter your emailid</td>
<td><input type="text" name="emailid" ></td>
</tr>
<tr>
<td>
Enter your SMS no.</td>
<td><input type="text" name="smsno" ></td>
</tr>
<td>
Enter your Role</td>
<td>
<input type="text" name="role" >
</td></tr>
<tr>
<td>
<input type="submit" name="save" value="save"/></td>
<td>
<input type="submit" name="search" value="search"/></td>
Page 73
</tr>
<tr>
<td><input type="submit" name="modify" value="modify"/></td>
<td><input type="submit" name="remove" value="remove"/></td>
</tr>
</table>
</form>
<?php
include "dbconfigure.php";
if(isset($_POST['save']))
{
$username = $_POST['username'];
$pwd = $_POST['pwd'];
$dob = $_POST['dob'];
$gender = $_POST['gender'];
$hintq = $_POST['hintq'];
$hinta = $_POST['hinta'];
$emailid = $_POST['emailid'];
$smsno = $_POST['smsno'];
$role = $_POST['role'];
if(isset($_POST['modify']))
{
$username = $_POST['username'];
$pwd = $_POST['pwd'];
$dob = $_POST['dob'];
$gender = $_POST['gender'];
Page 74
$hintq = $_POST['hintq'];
$hinta = $_POST['hinta'];
$emailid = $_POST['emailid'];
$smsno = $_POST['smsno'];
$role = $_POST['role'];
if(isset($_POST['remove']))
{
$username = $_POST['username'];
$pwd = $_POST['pwd'];
$dob = $_POST['dob'];
$gender = $_POST['gender'];
$hintq = $_POST['hintq'];
$hinta = $_POST['hinta'];
$emailid = $_POST['emailid'];
$smsno = $_POST['smsno'];
$role = $_POST['role'];
if(isset($_POST['search']))
{
$username = $_POST['username'];
$pwd = $_POST['pwd'];
Page 75
$dob = $_POST['dob'];
$gender = $_POST['gender'];
$hintq = $_POST['hintq'];
$hinta = $_POST['hinta'];
$emailid = $_POST['emailid'];
$smsno = $_POST['smsno'];
$role = $_POST['role'];
</body>
</html>
</div>
<?php include "bottom.php "?>
</body>
</html>
Page 77
MANAGE OCCASSION FORM CODING
<html>
<head>
<?php include "header.php" ?>
</head>
<body>
<?php include "top.php"; ?>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
Page 78
<br/>
<br/>
<br/>
<br/>
<a href = admin_home.php><img src = goback.png></a>
<div>
<br/>
<br/>
<center><h2 align = center>Manage Occassion Items</h2></center>
<form method = post enctype='multipart/form-data'>
<table align = center>
<tr>
<td>
Enter Item ID</td><td><input type = text name = id></td>
<tr>
<tr>
<td>Item Image</td><td><input type = file name = "image" id = "image"></td>
</tr>
<tr>
<td>
Category
</td>
<td>
<select name = category>
<option value = "cakes">Cakes</option>
<option value = "chocolate">Chocolate</option>
<option value = "electronics">Electronics</option>
<option value = "fashion">Fashion</option>
Page 79
<option value = "flowers">Flowers</option>
<option value = "handbags">Hand Bags</option>
<option value = "homeandliving">Home And Living</option>
<option value = "occassion">Occassion</option>
<option value = "sweets">Sweets</option>
<option value = "toysandgifts">Toy And Gifts</option>
</select>
</td>
<tr>
<tr>
<td>Price</td><td><input type = text name = price></td>
</tr>
<tr>
<td>Description</td><td><input type = text name = description></td>
</tr>
<tr>
<td colspan = 2>
<input type = submit name = save value = Save>
<input type = submit name = modify value = Modify>
<input type = submit name = remove value = Remove>
<input type = submit name = search value = Search>
</td>
</tr>
</table>
</form>
<?php
include "dbconfigure.php";
if(isset($_POST['save']))
{
$id = $_POST['id'];
$name = $_POST['name'];
Page 80
move_uploaded_file($_FILES['image']['tmp_name'],"upload_image/".
$_FILES['image']['name']);
$image = "upload_image/".$_FILES['image']['name'];
$category = $_POST['category'];
$price = $_POST['price'];
$description = $_POST['description'];
if(isset($_POST['modify']))
{
$id = $_POST['id'];
$name = $_POST['name'];
move_uploaded_file($_FILES['image']['tmp_name'],"upload_image/".
$_FILES['image']['name']);
$image = "upload_image/".$_FILES['image']['name'];
$category = $_POST['category'];
$price = $_POST['price'];
$description = $_POST['description'];
if(isset($_POST['remove']))
{
$id = $_POST['id'];
if(isset($_POST['search']))
{
echo "</tr>";
while($column=mysql_fetch_array($rs))
{
Page 82
echo "<tr>";
echo "<td>$column[0]</td>";
echo "<td>$column[1]</td>";
echo '<td><img src="'.$column['image'].'" width="100"></td>';
echo "<td>$column[3]</td>";
echo "<td>$column[4]</td>";
echo "<td>$column[5]</td>";
echo "</tr>";
}
echo "</table>";
}
?>
</div>
<!-- Bottom section -->
<?php include "bottom.php" ?>
</body>
</html>
Page 83
MANAGE FLOWERS PAGE CODING
<html>
<head>
<?php include "header.php" ?>
</head>
<body>
<?php include "top.php"; ?>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<a href = admin_home.php><img src = goback.png></a>
<div>
<br/>
<br/>
<center><h2 align = center>Manage Flowers</h2></center>
<form method = post enctype='multipart/form-data'>
<table align = center>
<tr>
<td>
Enter ID</td><td><input type = text name = id></td>
Page 84
<tr>
<tr>
<td>Flower Image</td><td><input type = file name = "image" id = "image"></td>
</tr>
<tr>
<td>
Category
</td>
<td>
<select name = category>
<option value = "cakes">Cakes</option>
<option value = "chocolate">Chocolate</option>
<option value = "electronics">Electronics</option>
<option value = "fashion">Fashion</option>
<option value = "flowers">Flowers</option>
<option value = "handbags">Hand Bags</option>
<option value = "homeandliving">Home And Living</option>
<option value = "occassion">Occassion</option>
<option value = "sweets">Sweets</option>
<option value = "toysandgifts">Toy And Gifts</option>
</select>
</td>
<tr>
<tr>
<td>Price</td><td><input type = text name = price></td>
</tr>
<tr>
Page 85
<td>Description</td><td><input type = text name = description></td>
</tr>
<tr>
<td colspan = 2>
<input type = submit name = save value = Save>
<input type = submit name = modify value = Modify>
<input type = submit name = remove value = Remove>
<input type = submit name = search value = Search>
</td>
</tr>
</table>
</form>
<?php
include "dbconfigure.php";
if(isset($_POST['save']))
{
$id = $_POST['id'];
$name = $_POST['name'];
move_uploaded_file($_FILES['image']['tmp_name'],"upload_image/".
$_FILES['image']['name']);
$image = "upload_image/".$_FILES['image']['name'];
$category = $_POST['category'];
$price = $_POST['price'];
$description = $_POST['description'];
if(isset($_POST['modify']))
{
$id = $_POST['id'];
$name = $_POST['name'];
move_uploaded_file($_FILES['image']['tmp_name'],"upload_image/".
$_FILES['image']['name']);
$image = "upload_image/".$_FILES['image']['name'];
$category = $_POST['category'];
$price = $_POST['price'];
$description = $_POST['description'];
if(isset($_POST['remove']))
{
$id = $_POST['id'];
echo "</tr>";
while($column=mysql_fetch_array($rs))
{
echo "<tr>";
echo "<td>$column[0]</td>";
echo "<td>$column[1]</td>";
echo '<td><img src="'.$column['image'].'" width="100"></td>';
echo "<td>$column[3]</td>";
echo "<td>$column[4]</td>";
echo "<td>$column[5]</td>";
echo "</tr>";
}
echo "</table>";
}
?>
Page 88
</div>
<!-- Bottom section -->
<?php include "bottom.php" ?>
</body>
</html>
Page 89
MANAGE HANDBAGS PAGE CODING
<html>
<head>
<?php include "header.php" ?>
</head>
<body>
<?php include "top.php"; ?>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<a href = admin_home.php><img src = goback.png></a>
<div>
<br/>
<br/>
<center><h2 align = center>Manage Handbags</h2></center>
<form method = post enctype='multipart/form-data'>
<table align = center>
<tr>
<td>
Enter ID</td><td><input type = text name = id></td>
<tr>
Page 90
<td>Enter Name</td> <td><input type = text name = name></td>
</tr>
<tr>
<tr>
<td>Image</td><td><input type = file name = "image" id = "image"></td>
</tr>
<tr>
<td>
Category
</td>
<td>
<select name = category>
<option value = "cakes">Cakes</option>
<option value = "chocolate">Chocolate</option>
<option value = "electronics">Electronics</option>
<option value = "fashion">Fashion</option>
<option value = "flowers">Flowers</option>
<option value = "handbags">Hand Bags</option>
<option value = "homeandliving">Home And Living</option>
<option value = "occassion">Occassion</option>
<option value = "sweets">Sweets</option>
<option value = "toysandgifts">Toy And Gifts</option>
</select>
</td>
<tr>
<tr>
<td>Price</td><td><input type = text name = price></td>
</tr>
<tr>
<td>Description</td><td><input type = text name = description></td>
</tr>
Page 91
<tr>
<td colspan = 2>
<input type = submit name = save value = Save>
<input type = submit name = modify value = Modify>
<input type = submit name = remove value = Remove>
<input type = submit name = search value = Search>
</td>
</tr>
</table>
</form>
<?php
include "dbconfigure.php";
if(isset($_POST['save']))
{
$id = $_POST['id'];
$name = $_POST['name'];
move_uploaded_file($_FILES['image']['tmp_name'],"upload_image/".
$_FILES['image']['name']);
$image = "upload_image/".$_FILES['image']['name'];
$category = $_POST['category'];
$price = $_POST['price'];
$description = $_POST['description'];
if(isset($_POST['modify']))
{
$id = $_POST['id'];
$name = $_POST['name'];
move_uploaded_file($_FILES['image']['tmp_name'],"upload_image/".
$_FILES['image']['name']);
$image = "upload_image/".$_FILES['image']['name'];
$category = $_POST['category'];
$price = $_POST['price'];
$description = $_POST['description'];
if(isset($_POST['remove']))
{
$id = $_POST['id'];
if(isset($_POST['search']))
Page 93
{
echo "</tr>";
while($column=mysql_fetch_array($rs))
{
echo "<tr>";
echo "<td>$column[0]</td>";
echo "<td>$column[1]</td>";
echo '<td><img src="'.$column['image'].'" width="100"></td>';
echo "<td>$column[3]</td>";
echo "<td>$column[4]</td>";
echo "<td>$column[5]</td>";
echo "</tr>";
}
echo "</table>";
}
?>
Page 94
</div>
<!-- Bottom section -->
<?php include "bottom.php" ?>
</body>
</html>
<html >
<head>
</head>
<body>
<br/>
<br/>
<br/>
<?php
echo $msg;
?>
<ul>
</p></center>
</body>
</html>
</div>
<?php include "bottom.php"; ?>
</body>
</html>
Page 97
DATA BASE CONFIGURATION CODING
<?php
$dbserver="127.0.0.1"; //localhost
$dbuser="root";
$dbpwd="";
$dbname="mobile2";
function my_iud($query)
{
global $dbserver,$dbuser,$dbpwd,$dbname;
$cid=mysql_connect($dbserver,$dbuser,$dbpwd) or die("connection failed");
mysql_select_db($dbname,$cid);
mysql_query($query,$cid);
$n=mysql_affected_rows($cid);
mysql_close($cid);
return $n;
}
function my_select($query)
{
global $dbserver,$dbuser,$dbpwd,$dbname;
$cid=mysql_connect($dbserver,$dbuser,$dbpwd) or die("connection failed");
mysql_select_db($dbname,$cid);
$rs=mysql_query($query,$cid);
mysql_close($cid);
return $rs;
}
mysql_close($cid);
return $row[0];
}
function verifyuser()
{
$u="";
$p="";
if(isset($_COOKIE['cun']) && isset($_COOKIE['cpwd']))
{
$u=$_COOKIE['cun'];
$p=$_COOKIE['cpwd'];
}
else
{
if(isset($_SESSION['sun']) && isset($_SESSION['spwd']))
{
$u=$_SESSION['sun'];
$p=$_SESSION['spwd'];
}
}
$query="select count(*) from siteuser where username='$u' and pwd='$p'";
$n=my_one($query);
if($n==1)
{
return true;
}
else
Page 99
{
return false;
}
}
function fetchusername()
{
$u="";
$p="";
if(isset($_COOKIE['cun']) && isset($_COOKIE['cpwd']))
{
$u=$_COOKIE['cun'];
$p=$_COOKIE['cpwd'];
}
else
{
if(isset($_SESSION['sun']) && isset($_SESSION['spwd']))
{
$u=$_SESSION['sun'];
$p=$_SESSION['spwd'];
}
}
$query="select count(*) from siteuser where username='$u' and pwd='$p'";
$n=my_one($query);
if($n==1)
{
return $u;
}
else
{
return false;
}
}
Page 100
function fetchrole()
{
$u="";
$p="";
if(isset($_COOKIE['cun']) && isset($_COOKIE['cpwd']))
{
$u=$_COOKIE['cun'];
$p=$_COOKIE['cpwd'];
}
else
{
if(isset($_SESSION['sun']) && isset($_SESSION['spwd']))
{
$u=$_SESSION['sun'];
$p=$_SESSION['spwd'];
}
}
$query="select count(*) from siteuser where username='$u' and pwd='$p'";
$n=my_one($query);
if($n==1)
{
$query="select role from siteuser where username='$u' and pwd='$p'";
$role=my_one($query);
return $role;
}
else
{
return false;
}
}
?>
Page 101
VIEW ELECTRONICS GIFTS PAGE CODING
<html>
<head>
<?php include "header.php" ?>
</head>
<body>
<?php include "top.php"; ?>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<a href = customer_home.php><img src = goback.png></a>
<div>
<br/>
<br/>
<center><h2 align = center>Electronics</h2></center>
<form method = post enctype='multipart/form-data'>
<table align = center>
<tr>
<td>Search Via Price </td><td><input type = text name = price1> To <input type = text
name = price2></td>
</tr>
<tr>
<td colspan = 2>
<input type = submit name = search1 value = "Search ALL">
<input type = submit name = search2 value = "Search Via Name">
<input type = submit name = search3 value = "Search Via Price">
</td>
</tr>
</table>
</form>
<?php
include "dbconfigure.php";
if(isset($_POST['search1']))
{
echo "<tr>";
echo "<td>$column[0]</td>";
echo "<td>$column[1]</td>";
echo '<td><img src="'.$column['image'].'" width="100"></td>';
echo "<td>$column[3]</td>";
echo "<td>$column[4]</td>";
echo "<td>$column[5]</td>";
$category = "electronics";
echo '<td><a href="purchase_cart.php?id='.$column['id'].'&cat='.$category.'">
Order Now
</a></td>';
echo "</tr>";
}
echo "</table>";
}
if(isset($_POST['search2']))
{
$name = $_POST['name'];
$query = "select * from electronics where name='$name'";
$rs = my_select($query);
$n = mysql_num_rows($rs);
echo "<table align = center border = 1 width=100%>";
Page 104
echo "<tr>";
echo "<td>Gift ID</td>";
echo "<td>Gift Name</td>";
echo "<td>Gift Image</td>";
echo "<td>Category</td>";
echo "<td>Price</td>";
echo "<td>Description</td>";
echo "<th>Book Now</th>";
echo "</tr>";
while($column=mysql_fetch_array($rs))
{
echo "<tr>";
echo "<td>$column[0]</td>";
echo "<td>$column[1]</td>";
echo '<td><img src="'.$column['image'].'" width="100"></td>';
echo "<td>$column[3]</td>";
echo "<td>$column[4]</td>";
echo "<td>$column[5]</td>";
$category = "electronics";
echo '<td><a href="purchase_cart.php?id='.$column['id'].'&cat='.$category.'">
Order Now
</a></td>';
echo "</tr>";
}
echo "</table>";
}
if(isset($_POST['search3']))
Page 105
{
$price1 = $_POST['price1'];
$price2 = $_POST['price2'];
$query = "select * from electronics where price>='$price1' and price<='$price2'";
$rs = my_select($query);
$n = mysql_num_rows($rs);
echo "<table align = center border = 1 width=100%>";
echo "<tr>";
echo "<td>Gift ID</td>";
echo "<td>Gift Name</td>";
echo "<td>Gift Image</td>";
echo "<td>Category</td>";
echo "<td>Price</td>";
echo "<td>Description</td>";
echo "<th>Book Now</th>";
echo "</tr>";
while($column=mysql_fetch_array($rs))
{
echo "<tr>";
echo "<td>$column[0]</td>";
echo "<td>$column[1]</td>";
echo '<td><img src="'.$column['image'].'" width="100"></td>';
echo "<td>$column[3]</td>";
echo "<td>$column[4]</td>";
echo "<td>$column[5]</td>";
$category = "electronics";
echo '<td><a href="purchase_cart.php?id='.$column['id'].'&cat='.$category.'">
Order Now
</a></td>';
echo "</tr>";
Page 106
}
echo "</table>";
}
?>
</div>
<!-- Bottom section -->
<?php include "bottom.php" ?>
</body>
</html>
Page 107
VIEW FASHION GIFTS PAGE CODING
<html>
<head>
<?php include "header.php" ?>
</head>
<body>
<?php include "top.php"; ?>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<a href = customer_home.php><img src = goback.png></a>
<div>
<br/>
<br/>
<center><h2 align = center>Fashion</h2></center>
<form method = post enctype='multipart/form-data'>
<table align = center>
<tr>
<td colspan = 2>
<input type = submit name = search1 value = "Search ALL">
<input type = submit name = search2 value = "Search Via Name">
<input type = submit name = search3 value = "Search Via Price">
</td>
</tr>
</table>
</form>
<?php
include "dbconfigure.php";
if(isset($_POST['search1']))
{
echo "<tr>";
echo "<td>$column[0]</td>";
echo "<td>$column[1]</td>";
echo '<td><img src="'.$column['image'].'" width="100"></td>';
echo "<td>$column[3]</td>";
echo "<td>$column[4]</td>";
echo "<td>$column[5]</td>";
$category = "flowers";
echo '<td><a href="purchase_cart.php?id='.$column['id'].'&cat='.$category.'">
Order Now
</a></td>';
echo "</tr>";
}
echo "</table>";
}
if(isset($_POST['search2']))
{
$name = $_POST['name'];
$query = "select * from fashion where name='$name'";
$rs = my_select($query);
$n = mysql_num_rows($rs);
echo "<table align = center border = 1 width=100%>";
echo "<tr>";
Page 110
echo "<td>Gift ID</td>";
echo "<td>Gift Name</td>";
echo "<td>Gift Image</td>";
echo "<td>Category</td>";
echo "<td>Price</td>";
echo "<td>Description</td>";
echo "<th>Book Now</th>";
echo "</tr>";
while($column=mysql_fetch_array($rs))
{
echo "<tr>";
echo "<td>$column[0]</td>";
echo "<td>$column[1]</td>";
echo '<td><img src="'.$column['image'].'" width="100"></td>';
echo "<td>$column[3]</td>";
echo "<td>$column[4]</td>";
echo "<td>$column[5]</td>";
$category = "fashion";
echo '<td><a href="purchase_cart.php?id='.$column['id'].'&cat='.$category.'">
Order Now
</a></td>';
echo "</tr>";
}
echo "</table>";
}
if(isset($_POST['search3']))
{
Page 111
$price1 = $_POST['price1'];
$price2 = $_POST['price2'];
$query = "select * from fashion where price>='$price1' and price<='$price2'";
$rs = my_select($query);
$n = mysql_num_rows($rs);
echo "<table align = center border = 1 width=100%>";
echo "<tr>";
echo "<td>Gift ID</td>";
echo "<td>Gift Name</td>";
echo "<td>Gift Image</td>";
echo "<td>Category</td>";
echo "<td>Price</td>";
echo "<td>Description</td>";
echo "<th>Book Now</th>";
echo "</tr>";
while($column=mysql_fetch_array($rs))
{
echo "<tr>";
echo "<td>$column[0]</td>";
echo "<td>$column[1]</td>";
echo '<td><img src="'.$column['image'].'" width="100"></td>';
echo "<td>$column[3]</td>";
echo "<td>$column[4]</td>";
echo "<td>$column[5]</td>";
$category = "fashion";
echo '<td><a href="purchase_cart.php?id='.$column['id'].'&cat='.$category.'">
Order Now
</a></td>';
echo "</tr>";
}
Page 112
echo "</table>";
}
?>
</div>
<!-- Bottom section -->
<?php include "bottom.php" ?>
</body>
</html>
Page 113
CHAPTER # 8
Advantages & Limitations
Page 114
feel the project has some limitations, listed as below:
CHAPTER # 8
Page 115
Future Scope
FUTURE SCOPE
This web application involves almost all the features of the online shopping. The future
implementation will be online help for the customers and chatting with website administrator.
CONCLUSION
The project entitled “Online Gift Shopping” is developed using PHP as front end and
MYSQL database in back end to computerize the process of online buying and selling of gift
in a showroom. This project covers only the basic features required.
Page 116
Bibliography
BIBLIOGRAPHY
http://www.php.net/
www.developer.com
www.15seconds.com
FOR MY SQL
http://www.mysql.com/
FOR CSS
http://cssed.sourceforge.net/
FOR APACHE
http://www.apache.org/
Page 117
FOR OTHER USEFUL REFERENCES
http://www.eclipse.org/pdt/
http://www.w3schools.com/default.asp
http://en.wikipedia.org/
REFERENCE BOOKS
Page 118