PHP Project
PHP Project
INTRODUCTION TO COMPANY
HCL technologies is a leading IT and software development company that offers
various services like applications, development, software development, outsourcing
software.HCL technologies is ultimately young company 12 years ago in 1998.During
this period, HCL was built unique strength in IT applications, IT infrastructure,
management and business process outsourcing. While maintaining and expanding its
leadership in product engineering, HCL was create an ability to distribute a values
across customers IT landscape through it will distributed services and significant
domain strength.HCL has widest service portfolio among Indian IT service provider.
It is engaged in many business like customer applications, enterprise applications, IT
infrastructure management and VPO services.
In 2005, HCL started questioning the leviarity of scale
business model adopted by service provider. Today, HCL is a new way of doing
business is being recognized by IDC,FORTUNE,FORBES, economic business week
etc.
HCL entered new face of evaluation transforming it from a
volume driven service provider to value centric enterprise that enters technology into
competitive advantage for all its customers across the globe.
HCL began an exciting journey more than three decades ago with a dream to
give India its very own microcomputer. www.google.com
www.flashvortex.com
www.wikipedia.org
www.freewebsitetemplates.com
www.g star.com
HCL today has India's largest vertically integrated computer manufacturing facility
with over three decades of electronic manufacturing experience & HCL desktops is
the largest selling brand into the enterprise space. HCL Info systems has a 100%
subsidiary that addresses the physical security technology system integration market.
The subsidiary leverages technology to build a security framework called Safe State
that safe guards life, infrastructure & society.
S.U.S.C.E.T
Page 1 of 65
TRAVELLING
2. INTODUCTION TO PROJECT
The Online Tours and Travels website is useful for the customers who like to book the
hotel packages online without going to booking office and dealing face to face. It
provides the facility to the customers or the users to have complete information about
the Tours and Travels at one place.This website is very dynamic and very easy to
understand, the interface of the website is very easy and anybody can easily work in
our website, this website can provide all the description about the packages and tours
such as tour images, description and some important information about the tours.The
online tours and travels website is also very useful because the customer dont have to
visit to booking office, he can easily book his packages via this website and he can
also pay the payment with two popular way of payment that is and the credit card, so
he can book any hotel packages without any kind of harassment.
S.U.S.C.E.T
Page 2 of 65
TRAVELLING
i. REGISTERED USER:This type of user can see whole information about hotel, packages and tours.and they
can also book for any hotel, packages and tours at any time.
ii. UNREGISTERED USER :This type of user can only see the hotels, tours and packages.but they cant book if
they are not registered with us.
Page 3 of 65
TRAVELLING
In the existing system, Users have to download various sites in order to fulfill their
needs. The existing system is not so good because, the time and money of users get
wasted. Users have to go different sites to get e-books, notes and videos checking
their knowledge or to enhance their knowledge.
Time.
Intangible benefits are more difficult to estimate and justify. They are often
impossible to give a money value to.
These may include
S.U.S.C.E.T
Page 4 of 65
TRAVELLING
Efficiency.
enjoyment. Users will get various categories under this website. This project will also
help the Clients looking for the best fireworks with best quality and affordable rate .
They can get their bill once they are finished their shopping of crackers. According to
their interest they can select the many types of fireworks . The customers of this site
doesnot need to pay the shipping cost.
S.U.S.C.E.T
Page 5 of 65
TRAVELLING
4. SYSTEM REQUIREMENTS
4.1. Development Tools:
Processor
RAM
: 1 GB
HDD
: 80 GB
OS
Disked Drive
: 3.5 1.44 MB
Front end
: PHP
Back End
: MYSQL
Web browser
Internet Explorer 6.6, Mozilla Firefox 1.5 onwards
Microsoft Windows XP professional, Microsoft Windows 7 onwards
RAM :2GB
HDD : 160GB
Processor
: Intel Core 2 duo with 2.8 ghz or Higher
RAM
: 2GB
HDD
: 160GB
XAMPP
Dreamweaver
Apache
PHP
5. FEASIBILTY STUDY
S.U.S.C.E.T
Page 6 of 65
TRAVELLING
Before the analysis is done, the feasibility study needs to be done so as to check
whether the system is feasible to run on the machines or not. Each and every aspect
was judged and after this study, the project team had been assigned which includes
many groups each assigned with the team leader. Each team was assigned the problem
and basic flowcharts were made.
6. PROJECT PLAN
S.U.S.C.E.T
Page 7 of 65
TRAVELLING
7. SYSTEMREQUIREMENTSPECIFICATION
S.U.S.C.E.T
Page 8 of 65
TRAVELLING
Level 0:
Administration
Users
Registration
Registration
Level 1:S.U.S.C.E.T
Page 9 of 65
TRAVELLING
Add items
Admin
Control info
Travel guru
Travel
Get data
Users
S.U.S.C.E.T
Page 10 of 65
TRAVELLING
7.2.2. Visitor:
7.2.3. Up loader:
S.U.S.C.E.T
Page 11 of 65
TRAVELLING
7.2.4. Admin:
S.U.S.C.E.T
Page 12 of 65
TRAVELLING
8. DESIGN
After the analysis phase we have with us the details of the existing system and the
requirements of the user for the new system. Designing is the most important part of
the software development lifecycle. It requires careful planning and logical thinking
on the part of the software designer. Designing the software means how the various
parts of the software are going to meet the user requirement and goals. It should be
done with utmost care as a simple mistake or miscalculation at this stage can result in
errors which can be compounded manifold as the development process moves up the
development hierarchy. This compounded error can result in low performance, more
processing time, and more coding and extra load.
This phase diverts focus from the problem domain to the solution domain. It acts as a
bridge between the requirement phase and its solution. The design phase focuses on
the detailed implementation of the system recommended in the feasibility study.
Emphasis is on translating performance specifications into design specifications.
System Design attempts to accomplish the following:
S.U.S.C.E.T
Page 13 of 65
TRAVELLING
8.1. ADMIN:
8.1.1 Login page:
S.U.S.C.E.T
Page 14 of 65
TRAVELLING
S.U.S.C.E.T
Page 15 of 65
TRAVELLING
S.U.S.C.E.T
Page 16 of 65
TRAVELLING
S.U.S.C.E.T
Page 17 of 65
TRAVELLING
S.U.S.C.E.T
Page 18 of 65
TRAVELLING
S.U.S.C.E.T
Page 19 of 65
TRAVELLING
S.U.S.C.E.T
Page 20 of 65
TRAVELLING
S.U.S.C.E.T
Page 21 of 65
TRAVELLING
8.1.17 profile:
S.U.S.C.E.T
Page 22 of 65
TRAVELLING
8.1.19 Logout:
S.U.S.C.E.T
Page 23 of 65
TRAVELLING
8.2.1.1 Travel
S.U.S.C.E.T
Page 24 of 65
TRAVELLING
S.U.S.C.E.T
Page 25 of 65
TRAVELLING
S.U.S.C.E.T
Page 26 of 65
TRAVELLING
S.U.S.C.E.T
Page 27 of 65
TRAVELLING
9. CODING
9.1 admin.php
<html>
<head>
<title>Dark Login Form</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<?php
include('config.php');
if(isset($_POST['b1']))
{
mysql_connect("localhost","root","");
mysql_select_db("travel");
$a=$_POST['login'];
$b=$_POST['password'];
$q="select * from admin where usename='$a' and password='$b'";
$res=mysql_query($q);
$num=mysql_num_rows($res);
$fetch=mysql_fetch_assoc($res);
if($num>0)
{
$_SESSION['id']=$fetch['id'];
S.U.S.C.E.T
Page 28 of 65
TRAVELLING
$time=$_SESSION['time'];
header('location:home.php');
}
else
{
?>
<script>
alert("wrong username and password");
</script>
<?php
}
}
?>
<br><br>
<br><br><br><br><br><br><br><br><br><br><br><br><br>
S.U.S.C.E.T
Page 29 of 65
TRAVELLING
<p>
<label for="password"><font size="+1" face="Lobster 13"
color="#FFFFCC">Password: </font></label>
<input type="password" name="password" id="password"
placeholder="password">
</p>
<p class="login-submit">
<button type="submit" class="login-button" name="b1">Login</button>
</p>
</form>
</body>
</html>
<?php
S.U.S.C.E.T
Page 30 of 65
TRAVELLING
session_start();
if(isset($_SESSION['id']))
{
mysql_connect("localhost","root","");
mysql_select_db("travel");
$id=$_SESSION['id'];
$time=$_SESSION['time'];
$sql="select * from admin where id='$id'";
$res=mysql_query($sql);
$fetch=mysql_fetch_assoc($res);
$user=$fetch['usename'];
}
?>
9.2 profile.php
S.U.S.C.E.T
Page 31 of 65
TRAVELLING
<?php
include('header.php');
include('config.php');
mysql_connect("localhost","root","");
mysql_select_db("travel");
$a="select * from profile";
$b=mysql_query($a);
$d=mysql_fetch_assoc($b)
?>
<center><h1 style="position:absolute; top:330px; left:630px;"><font size="+5"
color="#CC9933" face="Lobster 13">My Profile</font></h1></center>
<div style="height:200px;width:200px;border:hidden;
position:absolute;left:550px;top:610px;">
<?php
echo "<font color='white' size='4px'>";
echo "Qualification:";
echo "<br>";
echo "<br>";
echo "Hobbies:";
echo "<br>";
echo "<br>";
S.U.S.C.E.T
Page 32 of 65
TRAVELLING
S.U.S.C.E.T
Page 33 of 65
TRAVELLING
echo ucfirst($d['username']);
echo "<br>";
echo "<br>";
echo "<br>";
echo ucfirst($d['qulification']);
echo "<br>";
echo "<br>";
echo ucfirst($d['hobby']);
echo "<br>";
echo "<br>";
echo ucfirst($d['view']);
echo "<br>";
echo "<br>";
echo ucfirst($d['help']);
echo "<br><br>";
?>
<a href="editprofile.php"><input type="submit" name="b" value="Edit"
style="background-color:brown; text-decoration:none; border-radius:20px"></a>
</div>
</div>
<?php
S.U.S.C.E.T
Page 34 of 65
TRAVELLING
include('header.php');
include('config.php');
mysql_connect("localhost","root","");
mysql_select_db("travel");
$a="select * from profile";
$b=mysql_query($a);
$d=mysql_fetch_array($b);
?>
<center><h1 class="acolor" style="position:absolute; top:330px; left:630px;"><font
size="+5" color="#CC9933" face="Lobster 13">MY Profile</font></h1></center>
<div style="height:200px;width:200px;border:hidden;
position:absolute;left:550px;top:610px;">
<?php
echo "<font color='white' size='4px'>";
echo "Qualification:";
echo "<br>";
echo "<br>";
echo "<br>";
echo "Hobbies:";
echo "<br>";
echo "<br>";
echo "<br>";
echo "<br>";
S.U.S.C.E.T
Page 35 of 65
TRAVELLING
S.U.S.C.E.T
Page 36 of 65
TRAVELLING
<?php
echo ucfirst($d['username']);
?>
<form method="post" action="updateprofile.php">
<table>
<tr>
<td><br><br><input type="text" name="q" value="
<?php
echo ucfirst($d['qulification']);
?>" />
</td></tr>
<tr>
<td><textarea name="h" rows="5" cols="20">
<?php
echo ucfirst($d['hobby']);
?>
</textarea>
</td></tr>
<tr>
<td>
<textarea name="v" rows="5" cols="20">
<?php
echo ucfirst($d['view']);
S.U.S.C.E.T
Page 37 of 65
TRAVELLING
?>
</textarea>
</td>
</tr>
<tr>
<td><textarea name="ho" rows="5" cols="20">
<?php
echo ucfirst($d['help']);
?>
</textarea></td></tr>
<tr><td>
<a href="editprofile.php"><input type="submit" name="b" value="Update"
style="background-color:brown; text-decoration:none; border-radius:20px"></a>
</td></tr></table>
</form>
</div>
</div>
<?php
include('header.php');
?>
<center><h1 class="acolor">My Profile</h1></center>
S.U.S.C.E.T
Page 38 of 65
TRAVELLING
<?php
include('config.php');
if(isset($_POST['b']))
{
$q=$_POST['q'];
$h=$_POST['h'];
$v=$_POST['v'];
$ho=$_POST['ho'];
mysql_connect("localhost","root","");
mysql_select_db("travel");
$a="update profile set qulification='$q',hobby='$h',view='$v',help='$ho'";
$b=mysql_query($a);
if($b)
{
header('location:profile.php');
}
}
?>
9.3 addtour.php
<?php
S.U.S.C.E.T
Page 39 of 65
TRAVELLING
include('header.php');
include('config.php');
if(isset($_POST['sub']))
{
$a=$_POST['ti'];
$b=$_POST['tr'];
$c=$_POST['d'];
$imagename=$_FILES["image"]["name"];
$imagetype=$_FILES["image"]["type"];
$imagesize=$_FILES["image"]["size"];
$imagetmp=$_FILES["image"]["tmp_name"];
if($imagename=="")
{
echo "enter the imagename";
}
elseif(($imagetype!="image/jpeg") && ($imagetype!="image/gif") &&
($imagetype!="image/png"))
{
echo "only jpg, gif, png formet allowed<br>";
}
elseif(file_exists("upload_tour/".$imagename))
{
echo $imagename. " already exist";
S.U.S.C.E.T
Page 40 of 65
TRAVELLING
}
else
{
move_uploaded_file($imagetmp,"upload_tour/".$imagename);
echo "file upload succesfully";
mysql_connect("localhost","root","");
mysql_select_db("travel");
$sql="insert into addtur(t_id,tour_rout,description,img,user,time)
values('$a','$b','$c','$imagename','$user',NOW())";
$d=mysql_query($sql);
if($d)
{
?>
<script>
alert("Added successfully");
</script>
<?php
}
else
{
?>
<script>
alert(" Not Added");
S.U.S.C.E.T
Page 41 of 65
TRAVELLING
</script>
<?php
}
}
}
?>
<form action="<?php $_SERVER['PHP_SELF'];?>" method="post"
enctype="multipart/form-data">
<table style="margin-top:30px;margin-left:400px">
<tr><h1 style="margin-left:580px; padding-top:100px;"><font size="+5"
color="#CC9933" face="Lobster 13">ADD TOUR</font></h1></tr>
<tr>
<td><br /></td>
</tr>
<tr>
<td
class="b">
Tour id<br /><br /></td>
<td><input type="text" name="ti" value="" /><br /><br /></td>
</tr>
<tr>
<td
class="b">
Tour rout<br /><br /></td>
S.U.S.C.E.T
Page 42 of 65
TRAVELLING
S.U.S.C.E.T
Page 43 of 65
TRAVELLING
$a=$_GET['id'];
mysql_connect("localhost","root","");
mysql_select_db("travel");
$a="delete from addtur where t_id='$a'";
$b=mysql_query($a);
if($b)
{
echo "delete";
header('location:veiwtour.php');
}
else
{
?>
<script>
alert("no delete");
</script>
</script>
<?php
}
?>
<?php
include('header.php');
S.U.S.C.E.T
Page 44 of 65
TRAVELLING
$id=$_GET['id'];
mysql_connect("localhost","root","");
mysql_select_db("travel");
$sel="select * from addtur where t_id='$id'";
$query=mysql_query($sel);
while($e=mysql_fetch_array($query))
?>
<tr>
<td>
Tour id<br /><br /></td>
S.U.S.C.E.T
Page 45 of 65
TRAVELLING
<td><input type="text" name="ti" value="<?php echo $e[0]; ?>" /><br /><br /></td>
</tr>
<tr>
<td>
Tour path<br /><br /></td>
<td><input type="text" name="tp" value="<?php echo $e[1]; ?>" /><br /><br /></td>
</tr>
<tr>
<td>
Description<br /><br /></td>
<td><textarea name="d" rows="2" cols="14"> <?php echo $e[2]; ?
></textarea><br /><br /></td>
</tr>
<tr>
<td>
Tour image<br /><br /></td>
<td><input type="text" name="image1" value="<?php echo $e[3]; ?>" /><br /><br
/></td>
</tr>
<tr>
<td>
Image<br><br></td>
<td><input type="file" name="image" value=""><br><br></td>
</tr>
S.U.S.C.E.T
Page 46 of 65
TRAVELLING
<tr>
<td></td>
<td>
<input type="submit" name"u" value="Upload" class="button"/>
</td>
</tr>
</table>
</form>
<?php
}
?>
<?php
include('header.php');
include('config.php');
$id=$_POST['ti'];
$b=$_POST['tp'];
$c=$_POST['d'];
$d=$_POST['image1'];
$imagename=$_FILES["image"]["name"];
S.U.S.C.E.T
Page 47 of 65
TRAVELLING
$imagetype=$_FILES["image"]["type"];
$imagesize=$_FILES["image"]["size"];
$imagetemp=$_FILES["image"]["tmp_name"];
$imagename1='upload_tour/'.basename($imagename);
if($imagename=="")
{
mysql_connect("localhost","root","");
mysql_select_db("travel");
$sql1="update addtur set tour_rout='$b',description='$c',img='$d'
where t_id='$id'";
$db1=mysql_query($sql1);
if($db1)
{
?>
<script>
alert( "inserted");
</script>
<?php
header('location:veiwtour.php');
}
else
{
S.U.S.C.E.T
Page 48 of 65
TRAVELLING
echo "not".mysql_error();
}
}
else
{
move_uploaded_file($_FILES["image"]["tmp_name"],"upload_tour/" .
$_FILES["image"]["name"]);
?>
<script>
alert("file uploaded successfully");
</script>
<?php
mysql_connect("localhost","root","");
mysql_select_db("travel");
$sql1="update addtur set
tour_rout='$b',description='$c',img='$imagename' where t_id='$id'";
$db1=mysql_query($sql1);
if($db1)
{
?>
<script>
alert( "inserted");
S.U.S.C.E.T
Page 49 of 65
TRAVELLING
</script>
<?php
header('location:viewtour.php');
}
else
{
echo "not".mysql_error();
}
?>
Page 50 of 65
TRAVELLING
include('header.php');
include('config.php');
$id=$_POST['ti'];
$b=$_POST['tp'];
$c=$_POST['d'];
$d=$_POST['image1'];
$imagename=$_FILES["image"]["name"];
$imagetype=$_FILES["image"]["type"];
$imagesize=$_FILES["image"]["size"];
$imagetemp=$_FILES["image"]["tmp_name"];
$imagename1='upload_tour/'.basename($imagename);
if($imagename=="")
{
mysql_connect("localhost","root","");
mysql_select_db("travel");
$sql1="update addtur set tour_rout='$b',description='$c',img='$d'
where t_id='$id'";
$db1=mysql_query($sql1);
if($db1)
{
?>
<script>
S.U.S.C.E.T
Page 51 of 65
TRAVELLING
alert( "inserted");
</script>
<?php
header('location:veiwtour.php');
}
else
{
echo "not".mysql_error();
}
}
else
{
move_uploaded_file($_FILES["image"]["tmp_name"],"upload_tour/" .
$_FILES["image"]["name"]);
?>
<script>
alert("file uploaded successfully");
</script>
<?php
mysql_connect("localhost","root","");
mysql_select_db("travel");
S.U.S.C.E.T
Page 52 of 65
TRAVELLING
?>
<?php
include('header.php');
mysql_connect("localhost","root","");
S.U.S.C.E.T
Page 53 of 65
TRAVELLING
mysql_select_db("main_project");
$b="select * from signup where user='manager'";
$query=mysql_query($b);
$rslt=mysql_fetch_assoc($query);
?>
<center>
<form name="my" action="<?php $_SERVER['PHP_SELF']?>" method="post"
onSubmit="return f();">
<h1 style="padding-top:120px;"><font color="#FF9966" face="Lobster 13"
size="+5">Manager</font></h1>
<br /><br /><br /><br />
S.U.S.C.E.T
Page 54 of 65
TRAVELLING
Page 55 of 65
TRAVELLING
Page 56 of 65
TRAVELLING
?>
<?php
include('header.php');
mysql_connect("localhost","root","");
mysql_select_db("main_project");
$a="select * from signup";
$b=mysql_query($a);
$c=mysql_fetch_assoc($b);
if($c['status']==1)
{
$a="update signup set status=0";
$b=mysql_query($a);
header('location:user1.php');
}
else
{
Page 57 of 65
TRAVELLING
Code Testing
2.
Specification Testing
i.Code Testing:
Code testing was carried out to see the correctness of the logic involved and the
correctness of the modules.All the modules are checked separately.
Specification testing:
It examines the specification stating about what program should do and how it
performs under various conditions.
ii.Unit Testing:
S.U.S.C.E.T
Page 58 of 65
TRAVELLING
It is essentially for the verification of the code produced during the coding the phase
and goal is to test the internal logic of the modules.
Integration Testing:
During this phase, many unit tested modules are combined into subsystems, which are
then tested. The goal is to see if modules can be integrated properly.
iii.Functionality Testing:
The entire software is tested.The goal is to see if software solution meets its
requirements.
1.Stresss Testing:
Proxy server developed for the specified purpose is tested under
heavy load.
2.Acceptance Testing:
Acceptance is performed in the real environment with realistic
data of the client to demonstrate if the software developed is working satisfactory.
Test Case Module:
Login :
Filed
Actual
Action
Username
Null
Password
Null
Enter Password
Add hotel
S.U.S.C.E.T
Page 59 of 65
TRAVELLING
Field
Actual data
Action
Hotel name
Null
Hotel
Null
Add tour
Field
Actual data
Action
tour name
Null
tour
Null
Field
Actual data
Action
package name
Null
Package image
Null
Package
Null
Enter package
Add Package
Contact us:
Field
Data
Action
Name
Null
Null
Query
Null
Sign up:
S.U.S.C.E.T
Page 60 of 65
TRAVELLING
Filed
Data
Action
First name
Null
Last name
Null
Gender
Null
Select gender
Contact
Null
Date of birth
Null
City
Null
Null
Enter email
Password
Null
Enter password
Confirm password
Null
User
Null
Select user
11. IMPLEMENTATION
S.U.S.C.E.T
Page 61 of 65
TRAVELLING
11.1. Implementation :
Implementation is the stage in the project where the design is turned into the working
system and is giving confidence to the new system for the users i.e.will work
efficiently and effectively.it involves careful planning,Investigation of the current
system and constraints on implementation,desigfn of method to achieve the change
over,an evaluation,of change over methods.The more complex system is
implemented,the more involved will be the system analysis and design effort required
just for implementation.
Implementation is the final and important phase.The most critical stage is in achieving
a successful new system and in giving the users confidence that the new system will
workand be effective.the system can be done only after through testing is done and if
it is found to working according to the specification.
The major elements of implementation plan are test plan,training plan,equipment
installation plan,and a conversion plan.
There are three types of implementation:
1.
2.
3.
same computer.
Successful implementation may not guarantee improvement in the organization using
the new system,but improper installation will prevent it.
Implementation Tools:
1.
Training personnel
2.
Conversion Procedures
3.
Post-implementation review
i. Training Personnel
S.U.S.C.E.T
Page 62 of 65
TRAVELLING
Even well designed system can succeed or fail because of the way they are operated
and used.Therefore ,the quality of training received by the personnel involved with
the system in various
Capacities helps or hinders and may even prevent the successful implementation of
management information system.
ii. Conversion Methods
A conversion is the process of changing from the old system to the new one.It must be
properly planned and executed.System conversion should be accomplished in shortest
possible time.Long conversion periods create problems for all persons involved
including both analysts and users.
iii. Post Implementation Review
After the system is implemented and conversion is complete,a review should be
conducted to determine whether the system is meeting expectations and where
improvements are needed.
A Post implementation Review measures the systems performance against predefined
requirement.It determines how well the system to meet the performance
specifications.
S.U.S.C.E.T
Page 63 of 65
TRAVELLING
13. BIBLIOGRAPHY
http://stackoverflow.com/questions/1642304/php-objectvalidation
S.U.S.C.E.T
Page 64 of 65
TRAVELLING
http://codekarate.com/blog/jquery-form-validation-using-json-
object-and-php
www.phpbuilder.com/columns/weiner20050831.php3
http://www.tinybutstrong.com/forum.php?thr=2849
http://stackoverflow.com/questions/4010080/javascript-dropdown-menu-how-to-link-to-different-sites
S.U.S.C.E.T
Page 65 of 65