Project PDF
Project PDF
Project PDF
1. INTRODUCTION
Newlight lodging is an online booking system that permits booking of lodge for
a customer. The online system allows customer to check availability of the rooms both delux
and non-delux (AC/NON-AC) with various prices. Customer can book the rooms and check
facilities available. This system will show booking status of various dates. Online booking of
the rooms make easier for a customer has he does not have to come and see if availability of
rooms are there or not.
In these system admin has full control on the system. He can see all the booking status and
availability of rooms and also update the price and service charges .admin can manage staffs
details on the admin panel.
2. ENVIRONMENT DESCRIPTION
2.1 HARDWARE AND SOFTWARE REQUIREMENTS
RAM 192 MB
Hard Disk 45 MB of available space required on system drive of available or
more.
Operating System Windows 7,8,8.1,10,Windows Server 2003 Service Pack1 or later.
Database MySql 4.5.1
Browser Google Chrome,Opera
What is PHP?
PHP can handle forms, i.e. gather data from files, save data to a file, thru email you
can send data, return data to the user.
You add, delete, modify elements within your database thru PHP.
Access cookies variables and set cookies.
Using PHP, you can restrict users to access some pages of your website.
It can encrypt data.
There are three main areas where PHP scripts are used.
LOWRY MEMORIAL COLLEGE Page 4
NEWLIGHT LODGING MANAGEMENT
Server-side scripting: This is the most traditional and main target field for PHP. You
need three things to make this work: the PHP parser (CGI or server module), a web server
and a web browser. You need to run the web server, with a connected PHP installation. You
can access the PHP program output with a web browser, viewing the PHP page through the
server. All these can run on your home machine if you are just experimenting with PHP
programming. See the installation instructions section for more information.
Command line scripting: You can make a PHP script to run it without any server or
browser. You only need the PHP parser to use it this way. This type of usage is ideal for
scripts regularly executed using cron (on *nix or Linux) or Task Scheduler (on Windows).
These scripts can also be used for simple text processing tasks. See the section about
Command line usage of PHP for more information.
Writing desktop applications: PHP is probably not the very best language to create a
desktop application with a graphical user interface, but if you know PHP very well, and
would like to use some advanced PHP features in your client-side applications you can also
use PHP-GTK to write such programs. You also have the ability to write cross-platform
applications this way. PHP-GTK is an extension to PHP, not available in the main
distribution.
MYSQL
UNIX* (such as Sun* Solaris*, AIX, and DEC* UNIX), OS/2, FreeBSD*, and others.
MySQL also provides a facility that the clients can run on the same computer as the
server or on another computer (communication via a local network or the Internet).
o Allows roll-back: MySQL allows transactions to be rolled back, commit and crash
recovery.
o High Performance: MySQL is faster, more reliable and cheaper because of its unique
storage engine architecture.
o High Flexibility: MySQL supports a large number of embedded applications which
makes MySQL very flexible.
APACHE SERVER
Apache is developed and maintained by an open community of developers under
the auspices of the Apache Software foundation.
3.SYSTEM STUDY
Customer Record:
All the information of Customer are maintained by paper work,which is very
difficult and time consuming to maintain and search.
Staff record:
All the information of staff is maintained on paper which is not secure.
Booking records:
The information about bookingare maintained on paper which is very difficult
and time consuming to maintain and search.
Admin Module:
1) Booking details
2) Customer details
3) Employee details
4) Add employee
5) Add food menu
6) Add room details
7) View room details
8) View payments
User Module:
1) Customer registration
2) Booking
3) billing
4) About/Contacts
OBJECTIVES OF SYSTEM
Objectives mean the various usages of one’s system.By clarifying the system
objectives one can be much clearer about the processes he/she has to perform.The Objectives
of our proposed system are:
Keep records about customers, booking ,rooms and Employee.
Saves time and makes work easy for the admin.
It can reduce paper work.
The System can allow administrator to select the particular information and delete or
edit them from the database.
Maintains the whole information about the Newlight Lodging.
Users can view the Booking for reference and search for availability of the rooms.
4. SYSTEM PLANNING
OPERATIONAL FEASIBILITY
Operational feasibility is dependent on human resources available for the
project and involves projecting whether the system will be used if it is developed and
implemented.
Operational feasibility is a measure of how well a proposed system solves the problems,
and takes advantage of the opportunities identified during scope definition and how it
satisfies the requirements identified in the requirements analysis phase of system
development.
Operational feasibility reviews the willingness of the organization to support the proposed
system. This is probably the most difficult of the feasibilities to gauge. In order to determine
this feasibility, it is important to understand the management commitment to the proposed
project. If the request was initiated by management, it is likely that there is management
support and the system will be accepted and used. However, it is also important that the
employee base will be accepting of the change.
TECHNICAL FEASIBILITY
The analyst must find out whether current technical resources can be upgraded or added
to in a manner that fulfills the request under consideration. This is where the expertise of
system analysts is beneficial, since using their own experience and their contact with
vendors they will be able to answer the question of technical feasibility.
ECONOMIC FEASIBILITY
The concerned business must be able to see the value of the investment it is pondering
before committing to an entire system study. If short-term costs are not overshadowed by
long-term gains or produce no immediate reduction in operating costs, then the system is
not economically feasible, and the project should not proceed any further. If the expected
benefits equal or exceed costs, the system can be judged to be economically feasible.
Economic analysis is used for evaluating the effectiveness of the proposed system.
Prototype Model
Waterfall Model
Iterative Enhancement Model
Spiral Model
Dynamic System Development Model
PROTOTYPE MODEL
WATERFALL MODEL
implemented. At each iteration, design modifications are made and new functional
capabilities are added. The basic idea behind this method is to develop a system through
repeated cycles (iterative) and in smaller portions at a time (incremental).
The advantage of this model is that there is a working model of the system at a very early
stage of development which makes it easier to find functional or design flaws. Finding
issues at an early stage of development enables to take corrective measures in a limited
budget.
DATABASE
The data flow diagram (DFD) is one of the most important tools used by system
analysts. Data flow diagrams are made up of a number symbols, which represent system
components. Most data flow modelling methods use four kinds of symbols. These symbols are
used to represent four kinds of system components. Processes, data stores, data flows and
external entities. Circles in DFD resent processes. Data Flow represented by a thin line in the
DFD and each data store has a unique name and square or rectangle represents external entities.
Unlike detailed flowchart, Data Flow Diagrams do not supply detailed description of the
modules but graphically describes a system’s data and how the data interact with the system.
To construct a Data Flow Diagram, we use,
Arrow
Circles
Open End Box
Squares
An arrow identifies the data flow in motion. It is a pipeline through which information is flown
like the rectangle in the flowchart. A circle stands for process that converts data into
Information. An open-ended box represents a data store, data at rest or a temporary repository
of data. A square defines a source or destination of system data
Data Flow Diagrams (DFD) or a Bubble chart is a graphical tool for structured analysis. It was
De Marco (1978) and Gane and Sarson (1979) who introduced the DFD. DFD models a system
by using external entities from which data flow’s to a process, which transform the data and
creates, output – data – flows which go to other processes or external entities or files. Data in
files many also flow to processes as inputs.
Flow diagrams are used to produce a pictorial representation of the flow of data in the
application. It is very easy to understand, and gives a basic idea about the working of the
application software and has the purpose of clarifying system requirements and identifying
major
Transformations that will become programs in system design. So it is the starting point of the
design phase that functionally decomposes the requirements specifications down to the lowest
level of detail.
There are various symbols used in a DFD. Bubbles represent the processes. Named arrows
indicate the data flow. External entities are represented by rectangles and are outside the
system such as vendors or customers with whom the system interacts. They either supply or
consume data. Entities supplying data are know as sources and those that consume data are
called sinks. Data is stored in a data store by a process in the system. Each component in a
DFD is labelled with a descriptive name. Process names are further identified with a number.
Context level DFD is drawn first. Then the processes are decomposed into several elementary
levels and are represented in the order of importance.
1 “Arrow”
A data flow is a route, which enables packets of data to travel from one point to another. An
arrow identities data flow – data in motion. It is a pipeline through which information flows.
2“Process”
A process represents transformations where incoming data flows are changed into outgoing
data flows. A circle or a “bubble” represents a process that transforms incoming data flows
into outgoing data flow.
3“Data store”
A data store represents a repository of data that is to be stored for use by one or more
processes and may be simple as a buffer or queue or sophisticated as a relational database.
They should have clear names.
4“Source or Sink”
The DFD methodology is quite effective, especially when the required design is unclear and the
user and the analyst need a notational language for communication. The DFD is easy to
understand after a brief orientation.
LEVEL 0 DFD
NEWLIGHT
NEWLIGHT LODGING
ADMIN MANAGEMENT SYSTEM
NEWLIGHT
NEWLIGHT LODGING
USER MANAGEMENT SYSTEM
LEVEL 1 DFD
ADMIN
LOGIN
Is Valid?
NEWLIGHT
GENERATE REPORT
REPORT
LEVEL 2 DFD
CUSTOMER
NEWLIGHT
5.3 ER-DIAGRAM
PASSWORD STATE
ADDRESS
CUST_NAME
EMAIL
CUST_ID CUSTOMER
PHONE
COUNTRY E
CUST_NAME
BOOKING ID
ROOM TYPE
CHECK IN CATEGORY
NOOFCOTS
CONTACT
BOOKING ROOMS
ROOM TYPE
BOOKING TYPE ROOM NO
ADULTS
ROOM ROOM
CHILDREN CHARGES
ROOM_TYPE SERVICES
ROOM NO CHARGES
CHECK OUT
NO_OF_DAYS
BILLING
EMP_ID EMP_NAME
PRO_ID PRO_TITLE
DOB
EMPLOYEE
PRODUCTS
AGE
5.4 TABLES
ADMIN:
BOOKING:
CUSTOMER:
EMPLOYEE:
PRODUCTS:
ROOMS:
6. SOFTWARE TESTING
Testing is the process of evaluating a system or its component(s) with the intent
to find whether it satisfies the specified requirements or not.
TEST OBJECTIVE:
Finding defects which may get created by the programmer while developing the
software.
Software testing makes sure that the testing is being done properly and hence the system is
ready for use. Good coverage means that the testing has been done to cover the various areas
like functionality of the application, compatibility of the application with the OS, hardware
and different types of browsers, performancetesting to test the performance of the application
and loadtesting to make sure that the system is reliable and should not crash or there should
not be any blocking issues. It also determines that the application can be deployed easily to
the machine and without any resistance. Hence the application is easy to install, learn and
use.
UNIT TESTING
Unit testing is a software development process in which the smallest testable
parts of an application, called units, are individually and independently scrutinized for proper
operation. Unit testing can be done manually but is often automated.
Unit testing involves only those characteristics that are vital to the performance of the unit
under test. This encourages developers to modify the sourcecode without immediate concerns
about how such changes might affect the functioning of other units or the program as a
whole. Once all of the units in a program have been found to be working in the most efficient
and error-free manner possible, larger components of the program can be evaluated by means
of integrationtesting.
SYSTEM TESTING
System Testing (ST) is a black box testing technique performed to evaluate the
complete system the system's compliance against specified requirements. In System testing,
the functionalities of the system are tested from an end-to-end perspective.
System Testing is usually carried out by a team that is independent of the development team
in order to measure the quality of the system unbiased. It includes both functional and Non-
Functional testing.
ACCEPTANCE TESTING
Acceptance Testing is a level of the software testing where a system is tested for
acceptability.
The purpose of this test is to evaluate the system’s compliance with the business requirements
and assess whether it is acceptable for delivery.
It is the formal testing with respect to user needs, requirements, and business processes
conducted to determine whether or not a system satisfies the acceptance criteria and to enable
the user, customers or other authorized entity to determine whether or not to accept the
system.
LOGIN PROCESS:
ADD CUSTOMER:
BOOKING:
ADD EMPLOYEE:
7. CODING
Index:
<head>
<title>home</title>
<link type="text/css" rel="stylesheet" href="mystyle.css"/>
</head>
<body>
<div id="menu">
<ul>
<li><a href="index.php">Home</a></li>
<li><a href="#">Accomodations</a>
<ul>
<li><a href="rooms.php">Rooms</a></li>
<li><a href="billing.php">Billing</a></li>
<li><a href="#">Contact us</a></li>
<li><a href="admin_area/login.php">Admin</a></li>
</ul>
</div>
</body>
</html>
Login
<?php
session_start();
?>
<!DOCTYPE>
<html>
<head>
<title>Login Form</title>
<link rel="stylesheet" href="styles/login_style.css" media="all" />
</head>
<body>
<div class="login">
<h2 style="color:white; text-align:center;"><?php echo @$_GET['not_admin']; ?></h2>
<h1>User Login</h1>
include("includes/db.php");
if(isset($_POST['login'])){
$email = mysql_real_escape_string($_POST['email']);
$password = mysql_real_escape_string($_POST['password']);
$check_user = mysqli_num_rows($run_user);
if($check_user==1){
$_SESSION['user_email']=$email;
}
else {
}
}
ROOMS:
<?php
include("index.php");
?>
<div id="content">
<form action="rooms.php" method="post">
<th>No of Cots:</th>
<th>Room Charges(per day)</th>
<th>Room Services (per day)</th>
</tr>
<?php
//connection code
mysql_connect("localhost","root","");
mysql_select_db("newlight");
//Select data from the table
$query1= "select * from rooms";
$run = mysql_query($query1);
while($row=mysql_fetch_array($run)){
$id = $row['id'];
$room_no = $row['room_no'];
$category = $row['category'];
$room_type = $row['room_type'];
$no_of_cots = $row['no_of_cots'];
$room_charges = $row['room_charges'];
$room_services = $row['room_services'];
?>
<tr align="center">
<td><?php echo $id ?></td>
<td><?php echo $room_no ?></td>
<td><?php echo $category ?></td>
<td><?php echo $room_type ?></td>
<td><?php echo $no_of_cots ?></td>
ROOM SERVICES
<!DOCTYPE>
<?php
include("index.php");
include("includes/db.php")
?>
<html>
<head>
<title>New Light Restaurant</title>
<body>
<div id="form">
<form method="get" action="results.php"
enctype="multipart/form-data">
<input type="text" name="user_query"
placeholder="Search a product"/ >
<input type="submit" name="search" value="Search"
/>
</form>
</div>
</div>
<!--Navigation Bar ends-->
<div id="products_box">
<?php
$get_pro = "select * from products";
while($row_pro=mysqli_fetch_array($run_pro)){
$product_id = $row_pro['pro_id'];
$product_title = $row_pro['pro_title'];
$product_price = $row_pro['pro_price'];
$product_image = $row_pro['pro_image'];
echo "
<div id='single_product'>
<h3>$product_title</h3>
<img src='admin_area/product_images/$product_image'
width='180' height='180' />
<p><b> $ $product_price </b></p>
</div>";
}
?>
</div>
</div>
</div>
<!--Content wrapper ends-->
</div>
<!--Main Container ends here-->
</body>
</html>
AVAILABILITY
<?php
include("index.php");
?>
<div id="content">
<form action="availability.php" method="post">
</tr>
<tr>
<th>Serial No:</th>
<th>Room No:</th>
<th>Category:</th>
<th>Room Type:</th>
<th>No of Cots:</th>
<th>Room Charges(per day)</th>
<th>Room Services (per day)</th>
<th>Book Now</th>
</tr>
<?php
//connection code
mysql_connect("localhost","root","");
mysql_select_db("newlight");
//Select data from the table
$query1= "select * from rooms where not exists (select * from booking where
booking.room_no=rooms.room_no)";
$run = mysql_query($query1);
while($row=mysql_fetch_array($run)){
$id = $row['id'];
$room_no = $row['room_no'];
$category = $row['category'];
$room_type = $row['room_type'];
$no_of_cots = $row['no_of_cots'];
$room_charges = $row['room_charges'];
$room_services = $row['room_services'];
?>
<tr align="center">
<td><?php echo $id ?></td>
<td><?php echo $room_no ?></td>
<td><?php echo $category ?></td>
<td><?php echo $room_type ?></td>
<td><?php echo $no_of_cots ?></td>
<td><?php echo $room_charges ?></td>
<td><?php echo $room_services ?></td>
<td><a href="login.php">Book Now</td>
</tr>
<?php } ?>
</table>
</div>
CUSTOMERS
<html>
<head>
<title>Customer Registration</title>
<link type="text/css" rel="stylesheet" href="mystyle.css"/>
</head>
<body>
<?php
include("index.php");
?>
<div id="area">
<form action="customer.php" method="post">
<tr>
<td align="right" bgcolor="white">Customer Name:</td>
<td><input type="text" name="name"></td>
</tr>
<tr>
<td align="right" bgcolor="white">E-mail:</td>
<td><input type="text" name="email"></td>
</tr>
<tr>
<td align="right" bgcolor="white">Password:</td>
<td><input type="text" name="password"></td>
</tr>
<tr>
<td align="right" bgcolor="white">Phone No.:</td>
<td><input type="text" name="phone_no"></td>
</tr>
<tr>
<td align="right" bgcolor="white">Address:</td>
<td><input type="text" name="address"></td>
</tr>
<tr>
<td align="right" bgcolor="white">State:</td>
<td><input type="text" name="state"></td>
</tr>
<tr>
<td align="right" bgcolor="white">Country:</td>
<td><input type="text" name="country"></td>
</tr>
<tr>
<td colspan="5" font="20px" align="center"><input type="submit" name="submit"
value="Register Now"></td>
</tr>
</table>
</form>
</div>
</body>
</html>
<?php
//connect to the database
mysql_connect("localhost","root","");
mysql_select_db("newlight");
if(isset($_POST['submit'])){
$name = $_POST['name'];
$email = $_POST['email'];
$password = $_POST['password'];
$phone_no = $_POST['phone_no'];
$address = $_POST['address'];
$state = $_POST['state'];
$country = $_POST['country'];
if(mysql_query($query)){
echo "<h1>Data Registered</h1>";
}
}
?>
BOOKING
<html>
<head>
<title>Booking</title>
<link type="text/css" rel="stylesheet" href="mystyle.css"/>
</head>
<body>
<?php
include("index.php");
?>
<div id="area">
<form action="book.php" method="post">
<table width="600" border="10" align="center">
<tr>
<td align="center" colspan="8" bgcolor="light blue"><h1>BOOKING</h1></td>
</tr>
<tr>
<td align="right" bgcolor="white">Customer Name:</td>
<td><input type="text" name="name"></td>
</tr>
<tr>
<td align="right" bgcolor="white">Contact:</td>
<td><input type="text" name="contact"></td>
</tr>
<tr>
<td align="right" bgcolor="white">Booking type:</td>
<td><input type="text" name="booking_type"></td>
</tr>
<tr>
<td align="right" bgcolor="white">Room Type:</td>
<td><input type="text" name="room_type"></td>
</tr>
<tr>
<td align="right" bgcolor="white">No_Of_Days:</td>
<td><input type="number" name="no_of_days"></td>
</tr>
<tr>
<td align="right" bgcolor="white">Check In:</td>
<td><input type="date" name="check_in"></td>
</tr>
<tr>
<td align="right" bgcolor="white">Check Out:</td>
<td><input type="date" name="check_out"></td>
</tr>
<tr>
<td align="right" bgcolor="white">Room No:</td>
<td><input type="number" name="room_no"></td>
</tr>
<tr>
<td align="right" bgcolor="white">Adults:</td>
<td><input type="number" name="adults"></td>
</tr>
<tr>
<td align="right" bgcolor="white">Children:</td>
<td><input type="number" name="children"></td>
</tr>
<tr>
<td colspan="5" font="20px" align="center"><input type="submit" name="submit"
value="Submit Now"></td>
</tr>
</table>
</form>
</div>
</body>
</html>
<?php
//connect to the database
mysql_connect("localhost","root","");
mysql_select_db("newlight");
if(isset($_POST['submit'])){
$name = $_POST['name'];
$contact = $_POST['contact'];
$booking_type = $_POST['booking_type'];
$room_type = $_POST['room_type'];
$no_of_days = $_POST['no_of_days'];
$check_in = $_POST['check_in'];
$check_out = $_POST['check_out'];
$room_no = $_POST['room_no'];
$adults = $_POST['adults'];
$children = $_POST['children'];
if(mysql_query($query)){
echo "<h1>ROOM BOOKED</h1>";
}
}
?>
GALLERY
<!--
###########################################################################
############################ -->
<?php
include("index.php");
?>
<div id="homecontent">
<div class="wrapper">
<br></br>
<div id="">
function carousel() {
var i;
var x = document.getElementsByClassName("mySlides");
for (i = 0; i < x.length; i++) {
x[i].style.display = "none";
}
slideIndex++;
if (slideIndex > x.length) {slideIndex = 1}
x[slideIndex-1].style.display = "block";
BILLING
<?php
include("index.php");
?>
<div id="content">
<form action="availability.php" method="post">
<th>Customer Name:</th>
<th>Room Number:</th>
<th>No of Days</th>
<th>Check In</th>
<th>Check Out</th>
<th>Room Charges(per day)</th>
$run = mysql_query($query1);
while($row=mysql_fetch_array($run)){
$cust_name = $row['cust_name'];
$room_no = $row['room_no'];
$no_of_days = $row['no_of_days'];
$check_in = $row['check_in'];
$check_out = $row['check_out'];
$room_charges = $row['room_charges'];
$room_services = $row['room_services'];
$run = mysql_query($query2);
$room_charges = $row['room_charges'];
$room_services = $row['room_services'];
?>
<tr align="center">
<td><?php echo $cust_name ?></td>
<td><?php echo $room_no ?></td>
<td><?php echo $no_of_days ?></td>
<td><?php echo $check_in ?></td>
<td><?php echo $check_out ?></td>
<td><?php echo $room_charges ?></td>
<td><?php echo $room_services ?></td>
<td><?php echo $total?></td>
</tr>
<?php } ?>
</table>
</div>
ADMIN
LOGIN
<?php
session_start();
?>
<!DOCTYPE>
<html>
<head>
<title>Login Form</title>
<link rel="stylesheet" href="styles/login_style.css" media="all" />
</head>
<body>
<div class="login">
<h1>Admin Login</h1>
<form method="post" action="login.php">
<input type="text" name="email" placeholder="Email" required="required" />
<input type="password" name="password" placeholder="Password" required="required" />
<button type="submit" class="btn btn-primary btn-block btn-large"
name="login">Login</button>
</form>
</div>
</body>
</html>
<?php
include("includes/db.php");
if(isset($_POST['login'])){
$email = mysql_real_escape_string($_POST['email']);
$pass = mysql_real_escape_string($_POST['password']);
$check_user = mysqli_num_rows($run_user);
if($check_user==1){
$_SESSION['user_email']=$email;
}
else {
?>
LOGOUT
<?php
session_start();
session_destroy();
CUSTOMER DETAILS
<html>
<head>
<title>Customer Details</title>
<link type="text/css" rel="stylesheet" href="customer.css"/>
</head>
<body>
<div id="menu">
<ul>
<li><a href="#">Home</a></li>
<li><a href="#">Booking Details</a>
<ul>
<li><a href="customerdetails.php">Customer Details</a></li>
<li><a href="booking.php">View Booking</a></li>
</ul>
</li>
<li><a href="#">Employee Details</a>
<ul>
<li><a href="addemployee.php">Add
Employee</a></li>
<li><a
href="viewemployee.php">Employee Details</a></li>
</ul>
</li>
<li><a href="#">View Payment</a></li>
<li><a href="logout.php">Admin Logout</a></li>
</ul>
</div>
<div id="content">
<?php
//connection code
mysql_connect("localhost","root","");
mysql_select_db("newlight");
//Select data from the table
$query1= "select * from customer";
$run = mysql_query($query1);
while($row=mysql_fetch_array($run)){
$id = $row['cust_id'];
$name = $row['cust_name'];
$email = $row['email'];
$phone_no = $row['phone_no'];
$address = $row['address'];
$state = $row['state'];
$country = $row['country'];
?>
<tr align="center">
<td><?php echo $id ?></td>
<td><?php echo $name ?></td>
<td><?php echo $email ?></td>
<td><?php echo $phone_no ?></td>
<td><?php echo $address ?></td>
<td><?php echo $state ?></td>
<td><?php echo $country ?></td>
<td><a href="delete3.php?del=<?php echo $id; ?>">Delete</td>
<td>Edit</td>
</tr>
<?php } ?>
</table>
</div>
</body>
</html>
VIEW BOOKING
<html>
<head>
<title>Booking Details</title>
<link type="text/css" rel="stylesheet" href="booking.css"/>
</head>
<body>
<div id="menu">
<ul>
<li><a href="#">Home</a></li>
<li><a href="#">Booking Details</a>
<ul>
<li><a href="customerdetails.php">Customer Details</a></li>
<li><a href="booking.php">View Booking</a></li>
</ul>
</li>
<li><a href="#">Employee Details</a>
<ul>
<li><a href="addemployee.php">Add
Employee</a></li>
<li><a
href="viewemployee.php">Employee Details</a></li>
</ul>
</li>
<li><a href="#">View Payment</a></li>
<li><a href="logout.php">Admin Logout</a></li>
</ul>
</div>
<div id="content">
<tr>
<td align="center" colspan="12" bgcolor="light blue"><h1>Booking
Details</h1></td>
</tr>
<tr>
<th>Serial No:</th>
<th>Customer Name:</th>
<th>Contact:</th>
<th>Booking Type:</th>
<th>Room Type</th>
<th>Check In</th>
<th>Check Out</th>
<th>Room No</th>
<th>Adults</th>
<th>Children</th>
<th>Delete</th>
<th>Edit</th>
</tr>
<?php
//connection code
mysql_connect("localhost","root","");
mysql_select_db("newlight");
//Select data from the table
$run = mysql_query($query1);
while($row=mysql_fetch_array($run)){
$id = $row['booking_id'];
$name = $row['cust_name'];
$contact = $row['contact'];
$booking_type = $row['booking_type'];
$room_type = $row['room_type'];
$check_in = $row['check_in'];
$check_out = $row['check_out'];
$room_no = $row['room_no'];
$adults = $row['adults'];
$children = $row['children'];
?>
<tr align="center">
<td><?php echo $id ?></td>
<td><?php echo $name ?></td>
<td><?php echo $contact ?></td>
<td><?php echo $booking_type ?></td>
<td><?php echo $room_type ?></td>
<td><?php echo $check_in ?></td>
<td><?php echo $check_out ?></td>
<td><?php echo $room_no ?></td>
<td><?php echo $adults ?></td>
<td><?php echo $children ?></td>
<td><a href="delete2.php?del=<?php echo $id; ?>">Delete</td>
<td>Edit</td>
</tr>
<?php } ?>
</table>
</div>
</body>
</html>
ADD EMPLOYEE
<html>
<head>
<title>Add Employee</title>
<link type="text/css" rel="stylesheet" href="employee.css"/>
</head>
<body>
<div id="menu">
<ul>
<li><a href="#">Home</a></li>
<li><a href="#">Booking Details</a>
<ul>
<li><a href="customerdetails.php">Customer Details</a></li>
<li><a href="booking.php">View Booking</a></li>
</ul>
</li>
<li><a href="#">Employee Details</a>
<ul>
<li><a href="addemployee.php">Add
Employee</a></li>
<li><a
href="viewemployee.php">Employee Details</a></li>
</ul>
</li>
<li><a href="#">View Payment</a></li>
<li><a href="logout.php">Admin Logout</a></li>
</ul>
</div>
<div id="area">
<form action="addemployee.php" method="post">
<table width="600" border="10" align="center">
<tr>
<td align="center" colspan="8" bgcolor="orange"><h1>Add Employee</h1></td>
</tr>
<tr>
<td align="right" bgcolor="white">Employee Name:</td>
<td><input type="text" name="name"></td>
</tr>
<tr>
<td align="right" bgcolor="white">Date_of_birth:</td>
<td><input type="text" name="dob"></td>
</tr>
<tr>
<td align="right" bgcolor="white">Age:</td>
<td><input type="text" name="age"></td>
</tr>
<tr>
<td align="right" bgcolor="white">Phone No.:</td>
<td><input type="text" name="phone_no"></td>
</tr>
<tr>
<td align="right" bgcolor="white">E-mail:</td>
<td><input type="text" name="email"></td>
</tr>
<tr>
<td align="right" bgcolor="white">Address:</td>
<td><input type="text" name="address"></td>
</tr>
<tr>
<td colspan="5" font="20px" align="center"><input type="submit" name="submit"
value="Add Now"></td>
</tr>
</table>
</form>
</div>
</body>
</html>
<?php
//connect to the database
mysql_connect("localhost","root","");
mysql_select_db("newlight");
if(isset($_POST['submit'])){
$name = $_POST['name'];
$dob = $_POST['dob'];
$age = $_POST['age'];
$phone_no = $_POST['phone_no'];
$email = $_POST['email'];
$address = $_POST['address'];
if(mysql_query($query)){
echo "<h1>Employee Added</h1>";
}
?>
EMPLOYEE DETAILS
<html>
<head>
<title>Booking Details</title>
<link type="text/css" rel="stylesheet" href="emp.css"/>
</head>
<body>
<div id="menu">
<ul>
<li><a href="#">Home</a></li>
<li><a href="#">Booking Details</a>
<ul>
<li><a href="customerdetails.php">Customer Details</a></li>
<li><a href="booking.php">View Booking</a></li>
</ul>
</li>
<li><a href="#">Employee Details</a>
<ul>
<li><a href="addemployee.php">Add
Employee</a></li>
<li><a
href="viewemployee.php">Employee Details</a></li>
</ul>
</li>
<li><a href="#">View Payment</a></li>
<li><a href="logout.php">Admin Logout</a></li>
</ul>
</div>
<div id="content">
<form action="viewemployee.php" method="post">
<tr>
<td align="center" colspan="9" bgcolor="light blue"><h1>Employee
Details</h1></td>
</tr>
<tr>
<th>Serial No:</th>
<th>Employee Name</th>
<th>Date Of Birth</th>
<th>Age</th>
<th>Phone No</th>
<th>E-mail</th>
<th>Address</th>
<th>Delete</th>
<th>Edit</th>
</tr>
<?php
//connection code
mysql_connect("localhost","root","");
mysql_select_db("newlight");
//Select data from the table
$query1= "select * from employee";
$run = mysql_query($query1);
while($row=mysql_fetch_array($run)){
$id = $row['emp_id'];
$name = $row['emp_name'];
$date_of_birth = $row['date_of_birth'];
$age = $row['age'];
$phone_no = $row['phone_no'];
$email = $row['email'];
$address = $row['address'];
?>
<tr align="center">
<td><?php echo $id ?></td>
<td><?php echo $name ?></td>
<td><?php echo $date_of_birth ?></td>
<td><?php echo $age ?></td>
<td><?php echo $phone_no ?></td>
<td><?php echo $email ?></td>
<td><?php echo $address ?></td>
<td><a href="delete1.php?del=<?php echo $id; ?>">Delete</td>
<td>Edit</td>
</tr>
<?php } ?>
</table>
</div>
</body>
</html>
ROOMS
<?php
include("index.php");
?>
<link type="text/css" rel="stylesheet" href="delux.css"/>
<div id="area">
<form action="rooms.php" method="post">
<table width="600" border="10" align="center">
<tr>
<td align="center" colspan="8" bgcolor="light blue"><h1> Insert Delux Rooms
Details</h1></td>
</tr>
<tr>
<td align="right" bgcolor="white">Room No.:</td>
<td><input type="text" name="room_no"></td>
</tr>
<tr>
<td align="right" bgcolor="white">Category.:</td>
<td><input type="text" name="category"></td>
</tr>
<tr>
<td align="right" bgcolor="white">Room Type:</td>
<td><input type="text" name="room_type"></td>
</tr>
<tr>
<tr>
<td align="right" bgcolor="white">Room Charges(per day):</td>
<td><input type="text" name="room_charges"></td>
</tr>
<tr>
<td align="right" bgcolor="white">Room Service(per day):</td>
<td><input type="text" name="room_services"></td>
</tr>
<tr>
<td colspan="5" font="20px" align="center"><input type="submit" name="submit"
value="Add Now"></td>
</tr>
</table>
</form>
</div>
<?php
//connect to the database
mysql_connect("localhost","root","");
mysql_select_db("newlight");
if(isset($_POST['submit'])){
$room_no = $_POST['room_no'];
$category = $_POST['category'];
$room_type = $_POST['room_type'];
$no_of_cots = $_POST['no_of_cots'];
$room_charges = $_POST['room_charges'];
$room_services= $_POST['room_services'];
if(mysql_query($query)){
echo "<h1>Rooms Added</h1>";
}
}
?>
ROOMS DETAILS
<?php
include("index.php");
?>
<div id="content">
<form action="deluxroom.php" method="post">
<?php
//connection code
mysql_connect("localhost","root","");
mysql_select_db("newlight");
//Select data from the table
$query1= "select * from rooms";
$run = mysql_query($query1);
while($row=mysql_fetch_array($run)){
$id = $row['id'];
$room_no = $row['room_no'];
$category = $row['category'];
$room_type = $row['room_type'];
$no_of_cots = $row['no_of_cots'];
$room_charges = $row['room_charges'];
$room_services = $row['room_services'];
?>
<tr align="center">
<td><?php echo $id ?></td>
<td><?php echo $room_no ?></td>
<td><?php echo $category ?></td>
<td><?php echo $room_type ?></td>
<td><?php echo $no_of_cots ?></td>
<td><?php echo $room_charges ?></td>
<td><?php echo $room_services ?></td>
<td><a href="delete3.php?del=<?php echo $id; ?>">Delete</td>
<td>Edit</td>
</tr>
<?php } ?>
</table>
</div>
INSERT FOOD
<!DOCTYPE>
<?php
include("index.php");
?>
<?php
include("includes/db.php");
?>
<html>
<head>
<title>Inserting Product</title>
<script src="//tinymce.cachefly.net/4.1/tinymce.min.js"></script>
<script>
tinymce.init({selector:'textarea'});
</script>
</head>
<link type="text/css" rel="stylesheet" href="insert_product.css"/>
<div id="content">
<body bgcolor="skyblue">
<tr align="center">
<td colspan="7"><h2>Insert Food Items Here</h2></td>
</tr>
<tr>
<td align="right"><b>Food Title:</b></td>
<td><input type="text" name="product_title" size="60"
required/></td>
</tr>
<tr>
<td align="right"><b>Food Image:</b></td>
<td><input type="file" name="product_image" /></td>
</tr>
<tr>
<td align="right"><b>Food Price:</b></td>
<td><input type="text" name="product_price" required/></td>
</tr>
<tr align="center">
<td colspan="7"><input type="submit" name="insert_post"
value="Insert Food Now"/></td>
</tr>
</table>
</form>
</div>
</body>
</html>
<?php
if(isset($_POST['insert_post'])){
$product_price = $_POST['product_price'];
move_uploaded_file($product_image_tmp,"product_images/$product_image");
if($insert_pro){
}
}
?>
VIEW FOOD
<?php
include("index.php");
?>
<link type="text/css" rel="stylesheet" href="view_products.css"/>
<div id="content">
<form action="view_products.php" method="post">
<tr align="center">
<td colspan="6"><h2>View All Food Items Here</h2></td>
</tr>
$i = 0;
while ($row_pro=mysqli_fetch_array($run_pro)){
$pro_id = $row_pro['pro_id'];
$pro_title = $row_pro['pro_title'];
$pro_image = $row_pro['pro_image'];
$pro_price = $row_pro['pro_price'];
$i++;
?>
<tr align="center">
<td><?php echo $i;?></td>
<td><?php echo $pro_title;?></td>
<td><img src="product_images/<?php echo $pro_image;?>" width="60"
height="60"/></td>
<td><?php echo $pro_price;?></td>
<td><a href="edit_prod.php?edit_prod=<?php echo $pro_id;
?>">Edit</a></td>
<td><a href="delete_pro.php?delete_pro=<?php echo
$pro_id;?>">Delete</a></td>
</tr>
<?php } ?>
</table>
</form>
</div>
DELETE
<?php
include("includes/db.php");
if(isset($_GET['delete_pro'])){
$delete_id = $_GET['delete_pro'];
if($run_delete){
}
?>
<?php
//connect to the database
mysql_connect("localhost","root","");
mysql_select_db("newlight");
$id = $_GET['del'];
//Delete the data from the table
$query = "delete from employee where emp_id = '$id'";
if(mysql_query($query)){
$id = $_GET['del'];
//Delete the data from the table
if(mysql_query($query)){
$id = $_GET['del'];
//Delete the data from the table
$query = "delete from customer where cust_id = '$id'";
if(mysql_query($query)){
Update
<html>
<head>
<title>Customer Registration</title>
<link type="text/css" rel="stylesheet" href="mystyle.css"/>
</head>
<body>
<?php
include("index.php");
?>
<div id="area">
<form action="edit.php" method="post">
<table width="600" border="10" align="center">
<tr>
<td align="center" colspan="8" bgcolor="light blue"><h1>Customer
Registration</h1></td>
</tr>
<tr>
<td align="right" bgcolor="white">Customer Id:</td>
<td><input type="number" name="cust_id"></td>
</tr>
<tr>
<td align="right" bgcolor="white">Customer Name:</td>
<td><input type="text" name="name"></td>
</tr>
<tr>
<td align="right" bgcolor="white">E-mail:</td>
<td><input type="text" name="email"></td>
</tr>
<tr>
<td align="right" bgcolor="white">Password:</td>
<td><input type="text" name="password"></td>
</tr>
<tr>
<td align="right" bgcolor="white">Phone No.:</td>
<td><input type="text" name="phone_no"></td>
</tr>
<tr>
<td align="right" bgcolor="white">Address:</td>
<td><input type="text" name="address"></td>
</tr>
<tr>
<td align="right" bgcolor="white">State:</td>
<td><input type="text" name="state"></td>
</tr>
<tr>
<td align="right" bgcolor="white">Country:</td>
<td><input type="text" name="country"></td>
</tr>
<tr>
<td colspan="5" font="20px" align="center"><input type="submit"
name="submit" value="Update"></td>
</tr>
</table>
</form>
</div>
</body>
</html>
<?php
[if(isset($_POST['submit'])){
$id = $_POST['cust_id'];
$name = $_POST['name'];
$email = $_POST['email'];
$password = $_POST['password'];
$phone_no = $_POST['phone_no'];
$address = $_POST['address'];
$state = $_POST['state'];
$country = $_POST['country'];
if(mysql_query($query)){
echo "<h1>Data Registered</h1>";
}
}
?>
<html>
<head>
<title>BOOKING</title>
<link type="text/css" rel="stylesheet" href="mystyle.css"/>
</head>
<body>
<?php
include("index.php");
?>
<div id="area">
<form action="edit1.php" method="post">
<table width="600" border="10" align="center">
<tr>
<td align="center" colspan="8" bgcolor="light blue"><h1>BOOKING</h1></td>
</tr>
<tr>
<td align="right" bgcolor="white">Booking Id:</td>
<td><input type="number" name="booking_id"></td>
</tr>
<tr>
<td align="right" bgcolor="white">Customer Name:</td>
<td><input type="text" name="cust_name"></td>
</tr>
<tr>
<tr>
<td align="right" bgcolor="white">Booking type:</td>
<td><input type="text" name="booking_type"></td>
</tr>
<tr>
<td align="right" bgcolor="white">Room Type:</td>
<td><input type="text" name="room_type"></td>
</tr>
<tr>
<td align="right" bgcolor="white">No_Of_Days:</td>
<td><input type="number" name="no_of_days"></td>
</tr>
<tr>
<td align="right" bgcolor="white">Check In:</td>
<td><input type="date" name="check_in"></td>
</tr>
<tr>
<td align="right" bgcolor="white">Check Out:</td>
<td><input type="date" name="check_out"></td>
</tr>
<tr>
<tr>
<td align="right" bgcolor="white">Adults:</td>
<td><input type="number" name="adults"></td>
</tr>
<tr>
<td align="right" bgcolor="white">Children:</td>
<td><input type="number" name="children"></td>
</tr>
<tr>
<td colspan="5" font="20px" align="center"><input type="submit"
name="submit" value="Update"></td>
</tr>
</table>
</form>
</div>
</body>
</html>
<?php
if(isset($_POST['submit'])){
$id = $_POST['booking_id'];
$name = $_POST['cust_name'];
$contact = $_POST['contact'];
$booking_type = $_POST['booking_type'];
$room_type = $_POST['room_type'];
$no_of_days = $_POST['no_of_days'];
$check_in = $_POST['check_in'];
$check_out = $_POST['check_out'];
$room_no = $_POST['room_no'];
$adults = $_POST['adults'];
$children = $_POST['children'];
if(mysql_query($query)){
echo "<h1>Data Registered</h1>";
}
}
?>
<html>
<head>
<title>EMPLOYEE</title>
<link type="text/css" rel="stylesheet" href="mystyle.css"/>
</head>
<body>
<?php
include("index.php");
?>
<div id="area">
<form action="edit2.php" method="post">
<table width="600" border="10" align="center">
<tr>
<td align="center" colspan="8" bgcolor="light blue"><h1>Add
Employee</h1></td>
</tr>
<tr>
<td align="right" bgcolor="white">Employee Id:</td>
<td><input type="number" name="emp_id"></td>
</tr>
<tr>
<td align="right" bgcolor="white">Employee Name:</td>
<td><input type="text" name="name"></td>
</tr>
<tr>
<td align="right" bgcolor="white">Date_of_birth:</td>
<tr>
<td align="right" bgcolor="white">Age:</td>
<td><input type="text" name="age"></td>
</tr>
<tr>
<td align="right" bgcolor="white">Phone No.:</td>
<td><input type="text" name="phone_no"></td>
</tr>
<tr>
<td align="right" bgcolor="white">E-mail:</td>
<td><input type="text" name="email"></td>
</tr>
<tr>
<td align="right" bgcolor="white">Address:</td>
<td><input type="text" name="address"></td>
</tr>
<tr>
<td colspan="5" font="20px" align="center"><input type="submit"
name="submit" value="Update"></td>
</tr>
</table>
</form>
</div>
</body>
</html>
<?php
if(isset($_POST['submit'])){
$id = $_POST['emp_id'];
$name = $_POST['name'];
$dob = $_POST['dob'];
$age = $_POST['age'];
$phone_no = $_POST['phone_no'];
$email = $_POST['email'];
$address = $_POST['address'];
if(mysql_query($query)){
echo "<h1>Data Registered</h1>";
}
}
?>
<html>
<head>
<title>ROOMS</title>
<link type="text/css" rel="stylesheet" href="mystyle.css"/>
</head>
<body>
<?php
include("index.php");
?>
<div id="area">
<form action="edit3.php" method="post">
<table width="600" border="10" align="center">
<tr>
<td align="center" colspan="8" bgcolor="light blue"><h1>Add
Rooms</h1></td>
</tr>
<tr>
<td align="right" bgcolor="white"> Id:</td>
<td><input type="number" name="id"></td>
</tr>
<tr>
<td align="right" bgcolor="white">Room No.:</td>
<td><input type="text" name="room_no"></td>
</tr>
<tr>
<td align="right" bgcolor="white">Category.:</td>
<td><input type="text" name="category"></td>
</tr>
<tr>
<td align="right" bgcolor="white">Room Type:</td>
<td><input type="text" name="room_type"></td>
</tr>
<tr>
<td align="right" bgcolor="white">No.Of Cots:</td>
<td><input type="text" name="no_of_cots"></td>
</tr>
<tr>
<td align="right" bgcolor="white">Room Charges(per day):</td>
<td><input type="text" name="room_charges"></td>
</tr>
<tr>
<td align="right" bgcolor="white">Room Service(per day):</td>
<td><input type="text" name="room_services"></td>
</tr>
<tr>
<td colspan="5" font="20px" align="center"><input type="submit"
name="submit" value="Update"></td>
</tr>
</table>
</form>
</div>
</body>
</html>
<?php
//connect to the database
mysql_connect("localhost","root","");
mysql_select_db("newlight");
if(isset($_POST['submit'])){
$id = $_POST['id'];
$room_no = $_POST['room_no'];
$category = $_POST['category'];
$room_type = $_POST['room_type'];
$no_of_cots = $_POST['no_of_cots'];
$room_charges = $_POST['room_charges'];
$room_services = $_POST['room_services'];
if(mysql_query($query)){
echo "<h1>Data Registered</h1>";
}
}
?>
8. SCREENSHOTS
USER
Limitations:
Each and every system has some limitations that can restrict them to work in a Particular
environment.Though our system is provided high amount of accuracy and quick data
generation,there is still some limitations that led us to in greater deficiency on that
system.Some of the limitations that is observed during the process is:
Enhancements:
In future our system can include good backup and restore facility.
In future our system can include functions to block books online.
In future you can add new modules like purchasing of old books.
10. BIBLIOGRAPHY
1bestcsharp.blogspot.in
https://www.tutorialspoint.com
https://stackoverflow.com
https://www.w3schools.com
http://php.net
http://www.guru99.com
http://www.javatpoint.com
https://www.thesoftwareguy.in