84
DEPARTMENT OF COMPUTER APPLICATIONS CERTIFICATE This is to certify that NIVEDITA R K- Register No. 16VFSB7042has satisfactorily completed the Sixth Semester BCA Project titled “HOTEL MANAGEMENT SYSTEM”. This Report issubmitted in partial fulfillment of the requirements for the award of the Degree in Bachelors of Computer Applications, awarded by Bangalore University, during the Academic Year 2018-2019. Project Guide Head of the DepartmentMrs. GNANESWARI G Dr. NAGARAJU KILARI Signature of the External Examiners: 1. ___________________ 2. ___________________

DEPARTMENT OF COMPUTER APPLICATIONS

Embed Size (px)

Citation preview

DEPARTMENT OF COMPUTER APPLICATIONS

CERTIFICATE

This is to certify that NIVEDITA R K- Register No.

16VFSB7042has satisfactorily completed the Sixth Semester BCA

Project titled “HOTEL MANAGEMENT SYSTEM”. This Report

issubmitted in partial fulfillment of the requirements for the

award of the Degree in Bachelors of Computer Applications,

awarded by Bangalore University, during the Academic Year

2018-2019.

Project Guide Head of the DepartmentMrs.

GNANESWARI G Dr. NAGARAJU KILARI

Signature of the External Examiners:

1. ___________________

2. ___________________

A PROJECT REPORT ON

HOTEL MANAGEMENT

SYSTEM

Submitted in partial fulfillment of requirement

for the award of the degree

in

Bachelor of Computer Applications

Of

BANGALORE UNIVERSITY

Submitted By

NIVEDITA R K

REG. NO. 16VFSB7042

Under the Guidance of

Mrs. Gnaneswari G

Asst. Professor

Marathalli Campus, Marathalli outer ring road, Bangalore-

560103.

Website: www.newhorizonindia.edu

ACKNOWLEDGEMENT

With immense pleasure, we take this opportunity to

express our gratitude to the beloved Principal

Dr.R.Bodhisatvan for providing valuable guidance and

support during the course.

We would like to thanks Dr. NagarajuKilari, Head of the

Department – BCA for his unending support and

encouragement during the development of this project.

We would like to acknowledge the interest and the

support extended by our project guide Mrs. Gnaneswari

G Asst. Professor, Department of BCA, to make this

project implementation successful.

Finally, we wish to thank every individual who helped us

directly or indirectly in making the project a grand

success.

NIVEDITA

REG.NO.16VFS7042

TABLE OF CONTENTS

SL.NO CONTENTS PAGE NO.

01. INTRODUCTION

1.1 Abstract Page 3

1.2 Problem Statement Page 3

1. Existing System Page 4

2. Description Page 4

3. Proposed Systems Page 4

4. Limitations of Existing System Page 5

02. SOFTWARE REQUIREMENT (SRS)

1. Definition Page 9

2. Purpose of SRS Page 9

3. Introduction to PhP Page 1

4. Introduction to SQL server Page 2

5. Hardware Requirements Page 9

6. Software Requirements Page 9

03. DIAGRAM

1. Data Flow Diagram Page 10

2. E-R Diagram Page 12

04. TABLE STRUCTURE

1. Table Scheme Page 15

2. Table Relationship Page 16

05. SCREEN LAYOUT Page 72

06. CODING Page 17

07. TESTING

1. Introduction to Testing Page 67

2. Types of Testing Page 68

08. COCNCLUSION Page 72

09. BIBLIOGRAPHY Page 79

HOTEL MANAGEMENT SYSTEM

[Type text] Page 1

CHAPTER 1

INTRODUCTION

1.1 Introduction To PHP

PHP is an acronym for “PHP : Hypertext Preprocessor”. It is a

widely- used , open source scripting language .PHP scripts are

executed on the server, it is free to download and use .

PHP files can contain text HTML ,CSS , Java Script, and PHP

code .

PHP code are executed on the server and the result is returned

to the browser as plain HTML. The PHP files have extention

“.php”

PHP can generate Dynamic page content. They can create, open,

read, write, delete and close files on the server .It can collect

form data. PHP can add, delete , modify data in your databases.

It is used to control user-access and can encrypt data.

PHP runs on various platforms like Windows , Linux ,Unix,

Mac OS X etc, it is compatible with almost all server like

XAMP ,Apache , ISS etc . It supports a wide range of databases.

1.2 Introduction To MySQL

MySQL is an open –source relational database management

HOTEL MANAGEMENT SYSTEM

[Type text] Page 2

system (RDBMS).Its name is a combination of “My” , the name

of co-founder Michael Widenius‟s daughter, and “SQL”, the

abbreviation for Structured Query Language. The MySQL

development project has made its source code available under

the terms of GNU General Public License, as well as under a

variety of proprietary agreements. MySQL was owned and

sponsored by a single forprofit firm, the Swedish company

MySQL AB, now owned by Oracle Corporation .For proprietary

use, several paid editors are available , and offer additional

functionality.

MySQL is a central component of the LAMP open-source web

application software stack (and other “AMP” stacks). LAMP is

an acronym for “Linux, Apache,MySQL,Perl/PHP/Python”.

Applications that use the MySQL databaseinclude : TYPO3,

MODx, Joomla, WordPress, PhpBB, MyBB, and Drupal.

MySQL is also used in many high-profile , large-scale websites

including Google Facebook ,Twitter,Youtube.

1.3 Objective

The Central objective of the Hotel Management System project

is to provide the information about the hotel as well as online

facilities for booking rooms. In the existing system,person has to

HOTEL MANAGEMENT SYSTEM

[Type text] Page 3

go to the hotel for booking ,enquiry etc. or another option is

telephone booking ,but user can‟t get detailed information about

the hotel and the developed web based system automates it,

making it easier for a person to sit at home and book rooms in a

hotel. As well as this, software system allows administrator to

maintain a database for adding a new employee detail, like shifts

of the employee, salary calculation.The administrator also has

the ability to view and modify the database content from

anywhere at any time.

The software includes following features:-

Login

Room Management

Room Reservation

Staff Management

Add Employee

Logout

1.4 Problem Statement

The system to be developed is intended to support day to day

operations of hotel management system by improving various

processes such as making reservation, assuring bills , providing

services to the customers etc. Accurate and precise description

in these forms are required in order to avoid collision , rectify

mistake and also for future references.

HOTEL MANAGEMENT SYSTEM

[Type text] Page 4

Although the hotel is of an international class and quality,

it‟s not realizing its maximum potential due to delay of activities by

the current redundant manual system. Due to huge losses suffered by

the hotel from the frequent errors in the current system, the hotel

management opted for a computerized system, which would:

1.Be friendlier to customers and the staff

2.Improve customer care and service at the hotel.

3.Increase the hotel performance.

4.Reduce the operational costs of the hotel

Existing system

SYSTEM DESCRIPTIONT he current manual system uses

paperwork and direct human language communication by mouthto

manage the hotel. This delays information transmission in the

hotel.Booking is done through phone calls or through visit to the hotel

booking office. The guest‟s

personal details such as Name, Age, Nationality, and Duration of stay,

are input during bookingin. The booking office orders for preparation

of the guest‟s room before his/ her check in date.

The documents are transferred manually to the filling department for

compilation of the guest‟s file. On the reporting date the file is

transferred to the reception. On checking in the guest isgiven the key

to his allocated room, he also specify if he needs room service.

HOTEL MANAGEMENT SYSTEM

[Type text] Page 5

The receptionist hands over the guest‟s file to the accountant on the

next table. Here the guest pays accommodation and meals fee. The

guest‟s file is updated on daily basis of his expenditure

costs. The accounts department generates the bills on daily basis and

delivered to the guests intheir rooms at dusk by the service maids. The

guest pays at the accounts desk, where the receiptsare generated.For a

one meal customer the bill is generated immediately after ordering

and he pays at theaccountant desk before leaving.During checking out

of guests, their expenditure outlines are generated a day before check

outdate. The guests receive their outlines at the accounts desk as they

check out, where they pay forbills balances if any.

THE PROPOSED SYSTEM.

OBJECTIVES OF THE PROPOSED SYSTEM

To enable online booking via the internet.To enable automated data

entry methods.Ensure efficient and reliable communication within the

hotel.Avoid data entry errors by use of input masks.Enable easy

authorized modification of data.Enforce security measures to avoid

unauthorized access to guest records.Enable fast and easy retrieval of

guest records and data for fast reference activities.

LIMITATIONS OF EXISTING SYSTEM

PROBLEMS IN THE MANUAL SYSTEM.

HOTEL MANAGEMENT SYSTEM

[Type text] Page 6

Difficulty in location of guest files:

due to the large number of guest‟s files, location of guest files during

checking in, updating of daily expenditures, receipt generation and

checking out is extremely difficult for the hotel employees.

Large storage space:

the physical files occupy too much space of about two rooms full of

storage cabinets. This occupies the hotel‟s space that could have

otherwise been used for income

generation by the hotel

Human and computational errors:

many errors enabled by the system due to tedious computations

required during data processing cost the hotel management heavily.5.

Poorly generated records:

poorly generated records encourage omission of some important data

by the employees. Such data as the guests‟ luggage is omitted. This

leads to security problems at the hotel such as armed robberies.6.

Complains from guests:

HOTEL MANAGEMENT SYSTEM

[Type text] Page 7

due to poor management of documents encouraged by the manual

system, several cases were reported where guests complained of

overcharging, charging of services not used by the guests.7.

Poor communication:

due to poor communication between the departments, guests are

often served with services they didn‟t order.

Difficulty in data analysis:

The accountants usually found it difficult to analyze the

guests‟ data during generation of expenditure bills due to missing of

some records.

DISADVANTAGES OF THE MANUAL SYSTEM.

1. Guest files can easily get lost or mix up with other guest file

documents.

2. Files occupy a large storage space

3. Unnecessary duplication of data.

4. Files are prone to theft unauthorized modification due to low data

security levels and standards.

5. Due to easy access to guest data by unauthorized users, guest data

is extremely unconfident.

6. Retrieval of guest records is extremely difficult

7. Data entry procedure is prone to errors

HOTEL MANAGEMENT SYSTEM

[Type text] Page 8

1.5 Scope Of Project

The mission of this project is to facilitate easy management and

administration of hotel with capabilities to do Booking of

rooms, Cancellation of rooms, creationof a new

user,Employee details,Shifts of employee, Total billing etc.

using the computerized hotel management software. One can

keep detailed records of information or records on unlimited

amount of customers. The system lets the user know which all

rooms are available for occupancy at any point of time. This

makes the booking considerably faster, and thus helps in better

management and reduce a lot of paper work as well as

manpower.

.

HOTEL MANAGEMENT SYSTEM

[Type text] Page 9

CHAPTER 2

SYSTEM SPECIFICATION

PURPOSE OF SRS

A software requirements specification (SRS) is a description of a

software system to be developed. It is modeled after business

requirements specification (CONOPS), also known as a stakeholder

requirements specification (StRS).[citation needed] The software

requirements specification lays out functional and non-functional

requirements, and it may include a set of use cases that describe user

interactions that the software must provide to the user for perfect

interaction.

Software requirements specification establishes the basis for an

agreement between customers and contractors or suppliers on how the

software product should function (in a market-driven project, these

roles may be played by the marketing and development divisions).

Software requirements specification is a rigorous assessment of

requirements before the more specific system design stages, and its

goal is to reduce later redesign. It should also provide a realistic basis

for estimating product costs, risks, and schedules.Used appropriately,

software requirements specifications can help prevent software

project failure.

HOTEL MANAGEMENT SYSTEM

[Type text] Page 10

The software requirements specification document lists sufficient and

necessary requirements for the project development.To derive the

requirements, the developer needs to have clear and thorough

understanding of the products under development. This is achieved

through detailed and continuous communications with the project

team and customer throughout the software development process.

The SRS may be one of a contract deliverable data item descriptions

or have other forms of organizationally-mandated content.

1 SOFTWARE REQUIREMENTS :

FRONT END PHP , HTML ,CSS

BACK END MYSQL

2HARDWARE REQUIREMENTS :

PROCESSOR Core 2 duo processor or any

VERSION Windows 8 or any

HOTEL MANAGEMENT SYSTEM

[Type text] Page 11

RAM Minimum 2GB

PROCESSOR SPEED 500Mhz and above

STORAGE SPACE Minimum 1GB

CHAPTER 3

DESIGN

3.1 USECASE DIAGRAM WITH EXPLANATION :

1.2

.

1

MANAGER

ROOM

RESERVATIONS

ROOM

MANAGEMENT

LOGIN

CUSTOMER

HOTEL MANAGEMENT SYSTEM

[Type text] Page 12

S

o

f

t

w

a

r

e

R

e

q

u

i

1. Manager :

In chargeof managing all the records in the system

a. Room Management

b. Room Reservation

c. Staff Management

d. Add Employee

2. Customer:

Can Book Rooms.

Check Room availability.

HOTEL MANAGEMENT SYSTEM

[Type text] Page 13

3.1 ER DIAGRAM WITH EXPLANATION:

2. 1.

2.1

LOGIN ADMIN

PASSWORD

EMAIL USERNAME

NAME

ID

HAS

MANAGE

CUSTOMER ID TYPE

CONTACT CUSTOMER-ID

EMPLOYEE SHIFT ID

JOINING DATE

SALARY

CONTACT EMP ID

EMP NAME

HOTEL MANAGEMENT SYSTEM

[Type text] Page 14

3.r

The Entity-Relationship (ER) model was originally proposed by

Peter in 1976 [Chen76] as a way to unify the network and

relational database views. Simply stated the ER model is a

conceptual data model that views the real world as entities and

relationships. A basic component of the model is the Entity-

Relationship diagram which is used to visually represent data

objects. Since Chen wrote his paper the model has been extended

and today it is commonly used for database design for the

database designer, the utility of the ER model is:

• It maps well to the relational model. The constructs used in the ER

model can easily be transformed into relational tables.

• It is simple and easy to understand with a minimum of training. Therefore, the model can be used by the database designer to

communicate the design to the end user. • In addition, the model can be used as a design plan by the database

developer to implement a data model in a specific database

management software.

ER Notation

There is no standard for representing data objects in ER

diagrams. Each modeling methodology uses its own notation. The original notation used by Chen is widely used in academics texts and

journals but rarely seen in either CASE tools or publications by non-

academics. Today, there are a number of notations used, among the more common are Bachman, crow's foot, and IDEFIX.

All notational styles represent entities as rectangular boxes

and relationships as lines connecting boxes. Each style uses a

special set of symbols to represent the cardinality of a connection.

The notation used in this document is from Martin. The symbols

used for the basic ER constructs are:

Entities are represented by labeled rectangles. The label is the

name of the entity. Entity names should be singular nouns.

HOTEL MANAGEMENT SYSTEM

[Type text] Page 15

Relationships are represented by a solid line connecting two entities. The name of the relationship is written above the

line. Relationship names should be verbs.

Attributes, when included, are listed inside the entity rectangle. Attributes which are identifiers are underlined. Attribute names

should be singular nouns.

HOTEL MANAGEMENT SYSTEM

[Type text] Page 16

SCHEMA DIAGRAM WITH EXPLANATION

USER

BOOKING

CUSTOMER

EMP_HISTORY

ROOM

ID

NAME USERNAME EMAIL PASSWORD

BOOKING_ID CUSTOMER_ID ROOM_ID BOOKING_DATE CHECK_IN

CHECK_OUT TOTAL PRICE REMAINING PRICE PAYMENT STATUS

CUSTOMER_ID CUSTOMER NAME CONTACT NO ID_CARD_TYPE

ID_CARD_NO

ADDRESS

ID EMP_ID SHIFT_ID FROM DATE TO DATE

ROOM_ID ROOM_TYPE_ID ROOM NO STATUS CHECK IN STATUS

CHECK OUT STATUS DELETE STATUS

HOTEL MANAGEMENT SYSTEM

[Type text] Page 17

STAFF

4.

A database schema is the skeleton structure that represents the logical

view of the entire database. It defines how the data is organized and

how the relations among them are associated. It formulates all the constraints that are to be applied on the data.

A database schema defines its entities and the relationship among

them. It contains a descriptive detail of the database, which can be depicted by means of schema diagrams. It‟s the database designers

who design the schema to help programmers understand the database

and make it useful.

EMP_ID EMP NAME STAFF_TYPE_ID SHIFT_ID ID_CARD_TYPE

ID_CARD_NO ADDRESS CONTACT NO SALARY JOINING DATE

HOTEL MANAGEMENT SYSTEM

[Type text] Page 18

5.

CHAPTER-4

IMPLEMENTATION

4.1 SAMPLE CODE:

LOGIN SCREEN:

This is sample code of login screen form,which will first start

when the user will start the application.

Class: LoginForm

Description: For login into database. The user has to enter the

valid user name and password. If any invalid user name and

password is entered in the field then a message stating „forgot

password‟ will popup.

<html>

<head>

<link href="css/bootstrap.min.css" rel="stylesheet">

<link rel="stylesheet" href="css/login.css"/>

</head>

<body>

<div class="container">

<div class="card card-container">

HOTEL MANAGEMENT SYSTEM

[Type text] Page 19

<img id="profile-img" class="profile-img-card"

src="//ssl.gstatic.com/accounts/ui/avatar_2x.png"/>

<p id="profile-name" class="profile-name-card">Login For

Hotel Management</p>

<br>

<div class="result">

<?php

if (isset($_GET['empty'])){

echo '<div class="alert alert-danger">Enter Username or

Password</div>';

}elseif (isset($_GET['loginE'])){

echo '<div class="alert alert-danger">Username or Password

Don\'t Match</div>';

} ?>

</div>

<form class="form-signin" data-toggle="validator"

action="ajax.php" method="post">

<div class="row">

<div class="form-group col-lg-12">

<label></label>

<input type="text" name="email" class="form-control"

placeholder="Username/Email Address" required

data-error="Enter Username or Email">

<div class="help-block with-errors"></div>

</div>

HOTEL MANAGEMENT SYSTEM

[Type text] Page 20

<div class="form-group col-lg-12">

<label></label>

<input type="password" name="password" class="form-

control" placeholder="Password" required

data-error="Enter Password">

<div class="help-block with-errors"></div>

</div>

</div>

<button class="btnbtn-lgbtn-primary btn-block btn-signin"

type="submit" name="login">Login</button>

</form><!-- /form -->

<a href="#" class="forgot-password">

Forgot the password?

</a>

</div><!-- /card-container -->

</div><!-- /container -->

<scriptsrc="js/jquery-1.11.1.min.js"></script>

<scriptsrc="js/bootstrap.min.js"></script>

<scriptsrc="js/validator.min.js"></script>

</body>

</html>

HOTEL MANAGEMENT SYSTEM

[Type text] Page 21

Room management:

Class: Room_Mang Description:This is a sample code for the room management,

here we can check the availability of rooms, rooms types ,check

in ,check out of the customer. We can also add rooms and do the necessary actions.

<div class="col-sm-9 col-sm-offset-3 col-lg-10 col-lg-offset-2 main">

<div class="row">

<ol class="breadcrumb">

<li><a href="#">

<em class="fafa-home"></em>

</a></li>

<li class="active">Room Management</li>

</ol>

</div><!--/.row-->

<br>

<div class="row">

<div class="col-lg-12">

<div id="success"></div>

</div>

</div>

<div class="row">

HOTEL MANAGEMENT SYSTEM

[Type text] Page 22

<div class="col-lg-12">

<div class="panel panel-default">

<div class="panel-heading">Room Management

<button class="btnbtn-info pull-right" data-toggle="modal" data-

target="#addRoom">Add Room</button>

</div>

<div class="panel-body">

<?php

if (isset($_GET['error'])) {

echo "<div class='alert alert-danger'>

<span class='glyphiconglyphicon-info-sign'></span>&nbsp; Error on

Delete !

</div>";

}

if (isset($_GET['success'])) {

echo "<div class='alert alert-success'>

<span class='glyphiconglyphicon-info-sign'></span>&nbsp;

Successfully Delete !

</div>";

}

?>

<table class="table table-striped table-bordered table-responsive"

cellspacing="0" width="100%"

id="rooms">

HOTEL MANAGEMENT SYSTEM

[Type text] Page 23

<thead>

<tr>

<th>Room No</th>

<th>Room Type</th>

<th>Booking Status</th>

<th>Check In</th>

<th>Check Out</th>

<th>Action</th>

</tr>

</thead>

<tbody>

<?php

$room_query = "SELECT * FROM room NATURAL

JOIN room_type WHERE deleteStatus = 0";

$rooms_result = mysqli_query($connection,

$room_query);

if (mysqli_num_rows($rooms_result) > 0) {

while ($rooms = mysqli_fetch_assoc($rooms_result)) { ?>

<tr>

<td><?php echo $rooms['room_no'] ?></td>

<td><?php echo $rooms['room_type'] ?></td>

<td>

<?php

HOTEL MANAGEMENT SYSTEM

[Type text] Page 24

if ($rooms['status'] == 0) {

echo '<a href="index.php?reservation&room_id=' . $rooms['room_id']

. '&room_type_id=' . $rooms['room_type_id'] . '" class="btnbtn-

success">Book Room</a>';

} else {

echo '<a href="#" class="btnbtn-danger">Booked</a>';

}

?>

<td>

<?php

if ($rooms['status'] == 1 && $rooms['check_in_status'] == 0) {

echo '<button class="btnbtn-success" id="checkInRoom" data-id="' .

$rooms['room_id'] . '" data-toggle="modal" data-

target="#checkIn">Check In</button>';

} elseif ($rooms['status'] == 0) {

echo '-';

} else {

</div>

<input type="hidden" id="getBookingId_n" value="">

<button type="submit" class="btnbtn-primary pull-right">Payment &

Checkout</button>

</form>

</div>

</div>

HOTEL MANAGEMENT SYSTEM

[Type text] Page 25

</div>

</div>

</div>

</div>

<div class="row">

<div class="col-sm-12">

<p class="back-link">Developed by SR Hotel Management

System</p>

</div>

</div>

</div><!--/.main-->

Reservation:

Class: Reservation Description: This is the sample code of the reservation, here we

can book the room and enter the details of the customer and if

changes are needed then the customer can replan his/her booking status.

<?php

if (isset($_GET['room_id'])){

$get_room_id = $_GET['room_id'];

$get_room_sql = "SELECT * FROM room NATURAL JOIN

room_type WHERE room_id = '$get_room_id'";

HOTEL MANAGEMENT SYSTEM

[Type text] Page 26

$get_room_result = mysqli_query($connection,$get_room_sql);

$get_room = mysqli_fetch_assoc($get_room_result);

$get_room_type_id = $get_room['room_type_id'];

$get_room_type = $get_room['room_type'];

$get_room_no = $get_room['room_no'];

$get_room_price = $get_room['price'];

}

?>

<div class="col-sm-9 col-sm-offset-3 col-lg-10 col-lg-offset-2 main">

<div class="row">

<ol class="breadcrumb">

<li><a href="#">

<em class="fafa-home"></em>

</a></li>

<li class="active">Reservation</li>

</ol>

</div><!--/.row-->

<div class="col-lg-12">

<?php

if (isset($_GET['room_id'])){?>

HOTEL MANAGEMENT SYSTEM

[Type text] Page 27

<div class="panel panel-default">

<div class="panel-heading">Room Information:

<a class="btnbtn-info pull-right"

href="index.php?room_mang">Replan Booking</a>

</div>

<div class="panel-body">

<div class="form-group col-lg-6">

<label>Room Type</label>

<select class="form-control" id="room_type" data-error="Select

Room Type" required>

<option selected disabled>Select Room Type</option>

<option selected value="<?php echo $get_room_type_id; ?>"><?php

echo $get_room_type; ?></option>

</select>

<div class="help-block with-errors"></div>

</div>

<div class="form-group col-lg-6">

<label>Room No</label>

<select class="form-control" id="room_no"

onchange="fetch_price(this.value)" required data-error="Select Room

No">

<option selected disabled>Select Room No</option>

HOTEL MANAGEMENT SYSTEM

[Type text] Page 28

<option selected value="<?php echo $get_room_id; ?>"><?php echo

$get_room_no; ?></option>

</select>

<div class="help-block with-errors"></div>

</div>

<div class="form-group col-lg-6">

<label>Check In Date</label>

<input type="text" class="form-control" placeholder="mm/dd/yyyy"

id="check_in_date" data-error="Select Check In Date" required>

<div class="help-block with-errors"></div>

</div>

<div class="form-group col-lg-6">

<label>Check Out Date</label>

<input type="text" class="form-control" placeholder="mm/dd/yyyy"

id="check_out_date" data-error="Select Check Out Date" required>

<div class="help-block with-errors"></div>

</div>

<div class="col-lg-12">

<h4 style="font-weight: bold">Total Days : <span

id="staying_day">0</span> Days</h4>

HOTEL MANAGEMENT SYSTEM

[Type text] Page 29

<h4 style="font-weight: bold">Price: <span id="price"><?php echo

$get_room_price; ?></span> /-</h4>

<h4 style="font-weight: bold">Total Amount : <span

id="total_price">0</span> /-</h4>

</div>

</div>

</div>

<?php } else{?>

<div class="panel panel-default">

<div class="panel-heading">Room Information:

<a class="btnbtn-info pull-right"

href="index.php?reservation">Replan Booking</a>

</div>

<div class="panel-body">

<div class="form-group col-lg-6">

<label>Room Type</label>

<select class="form-control" id="room_type"

onchange="fetch_room(this.value);" required data-error="Select

Room Type">

<option selected disabled>Select Room Type</option>

<?php

$query = "SELECT * FROM room_type";

$result = mysqli_query($connection,$query);

if (mysqli_num_rows($result) > 0){

HOTEL MANAGEMENT SYSTEM

[Type text] Page 30

while ($room_type = mysqli_fetch_assoc($result)){

echo '<option

value="'.$room_type['room_type_id'].'">'.$room_type['room_type'].'<

/option>';

<th>Detail</th>

<tr>

<td>Payment Status</td>

<td id="getPaymentStaus"></td>

</tr>

</tbody>

</table>

</div>

</div>

</div>

<div class="modal-footer">

<a class="btnbtn-success" href="index.php?reservation">Okay</a>

</div>

</div>

</div>

</div>

HOTEL MANAGEMENT SYSTEM

[Type text] Page 31

Staff management:

Class: Staff_mang Description: This is a sample code for staff management, here

we can get the employee details who works for the hotel .If the

employee needs a change in shift then employee can modify.

<div class="col-sm-9 col-sm-offset-3 col-lg-10 col-lg-offset-2 main">

<div class="row">

<ol class="breadcrumb">

<li><a href="#">

<em class="fafa-home"></em>

</a></li>

<li class="active">Staff Management</li>

</ol>

</div><!--/.row-->

<div class="row">

<div class="col-lg-12">

<h1 class="page-header">Staff Management</h1>

</div>

</div><!--/.row-->

<div class="row">

<div class="col-lg-12">

HOTEL MANAGEMENT SYSTEM

[Type text] Page 32

<div class="panel panel-default">

<div class="panel-heading">Employee Details:

<a href="index.php?add_emp" class="btnbtn-info pull-right">Add

Employee</a>

</div>

<div class="panel-body">

<?php

if (isset($_GET['error'])) {

echo "<div class='alert alert-danger'>

<span class='glyphiconglyphicon-info-sign'></span>&nbsp; Error on

Shift Change !

</div>";

}

if (isset($_GET['success'])) {

echo "<div class='alert alert-success'>

<span class='glyphiconglyphicon-info-sign'></span>&nbsp; Shift

Successfully Changed!

</div>";

}

?>

<table class="table table-striped table-bordered table-responsive"

cellspacing="0" width="100%"

id="rooms">

<thead>

HOTEL MANAGEMENT SYSTEM

[Type text] Page 33

<tr>

<th>Sr. No</th>

<th>Employee Name</th>

<th>Staff</th>

<th>Shift</th>

<th>Joining Date</th>

<th>Salary</th>

<th>Change Shift</th>

<th>Action</th>

</tr>

</thead>

<tbody>

<?php

//$staff_query = "SELECT * FROM staff

JOINstaff_type JOIN shift ON staff.staff_type_id

=staff_type.staff_type_id ON shift.";

$staff_query = "SELECT * FROM staff NATURAL

JOIN staff_type NATURAL JOIN shift";

$staff_result = mysqli_query($connection,

$staff_query);

if (mysqli_num_rows($staff_result) > 0) {

while ($staff = mysqli_fetch_assoc($staff_result)) { ?>

<tr>

HOTEL MANAGEMENT SYSTEM

[Type text] Page 34

<td><?php echo $staff['emp_id']; ?></td>

<td><?php echo $staff['emp_name']; ?></td>

<td><?php echo $staff['staff_type']; ?></td>

<td><?php echo $staff['shift'] . ' - ' . $staff['shift_timing']; ?></td>

<td><?php echo date('M j, Y', strtotime($staff['joining_date']));

?></td>

<td><?php echo $staff['salary']; ?></td>

<td>

<button class="btnbtn-primary" data-toggle="modal" data-

target="#changeShift"

data-id="<?php echo $staff['emp_id']; ?>" id="change_shift">Change

Shift</button>

</td>

<td>

<button data-toggle="modal"

data-target="#empDetail<?php echo $staff['emp_id']; ?>"

data-id="<?php echo $staff['emp_id']; ?>" id="editEmp"

class="btnbtn-info"><i class="fafa-pencil"></i></button>

<a href='functionmis.php?empid=<?php echo $staff['emp_id']; ?>'

class="btnbtn-danger" onclick="return confirm('Are you Sure?')"><i

class="fafa-trash"></i></a>

<a href='index.php?emp_history&empid=<?php echo

$staff['emp_id']; ?>'

HOTEL MANAGEMENT SYSTEM

[Type text] Page 35

class="btnbtn-success" title="Employee Histery"><i class="fafa-

eye"></i></a>

</td>

</tr>

<?php

}

}

?>

<!-- Employee Detail-->

<input type="hidden" value="<?php echo $staffGlobal['emp_id']; ?>"

id="emp_id" name="emp_id">

<div class="form-group col-lg-6">

<label>First Name</label>

<input type="text" value="<?php echo $fullname[0]; ?>"

class="form-control" placeholder="First Name" id="first_name"

name="first_name" required>

</div>

<div class="form-group col-lg-6">

<label>Last Name</label>

<input type="text" value="<?php echo $fullname[1]; ?>"

HOTEL MANAGEMENT SYSTEM

[Type text] Page 36

class="form-control" placeholder="Last Name" id="last_name"

name="last_name" required>

</div>

<div class="form-group col-lg-6">

<label>ID Card Type</label>

<select class="form-control" id="id_card_id" name="id_card_type"

required>

<opti+n selected disabled>Select ID Card Type</option>

<?php

$query = "SELECT * FROM

id_card_type";

$result =

mysqli_query($connection, $query);

if (mysqli_n

}

$query = "SELECT * FROM shift";

$result = mysqli_query($connection,

$query);

if (mysqli_num_rows($result) > 0) {

HOTEL MANAGEMENT SYSTEM

[Type text] Page 37

while ($shift = mysqli_fetch_assoc($result)) {

// echo '<option value="' .

$shift['shift_id'] . '">' . $shift['shift'] . ' - ' . $shift['shift_timing'] .

'</option>';

echo '<option value="' . $shift['shift_id'] . '" ' . (($shift['shift_id'] ==

$staffGlobal['shift_id']) ? 'selected="selected"' : "") . '>' .

$shift['shift_timing'] . '</option>';

}

}

?>

</select>

</div>

</div>

<input type="hidden" name="emp_id" value="" id="getEmpId">

<button type="submit" class="btnbtn-lgbtn-primary"

name="change_shift">Submit</button>

</form>

</div>

</div>

</div>

</div>

</div>

</div>

HOTEL MANAGEMENT SYSTEM

[Type text] Page 38

</div>

</div>

<?php

}

}

Logout:

Class: Logout

Description: This is the sample code for the logout, here the

manager can logout after the work is done.

<?php

/**

* Created by PhpStorm.

* User: shalini

* Date: 12-11-2018

* Time: 03:07 PM

*/

session_start();

unset($_SESSION['user_id']);

unset($_SESSION['username']);

session_abort();

header('Location:login.php');

HOTEL MANAGEMENT SYSTEM

[Type text] Page 39

complaint code

<div class="col-sm-9 col-sm-offset-3 col-lg-10 col-lg-

offset-2 main">

<div class="row">

<ol class="breadcrumb">

<li><a href="#">

<em class="fa fa-home"></em>

</a></li>

<li class="active">Complaint</li>

</ol>

</div><!--/.row-->

<div class="row">

<div class="col-lg-12">

<h1 class="page-header">Complaint</h1>

</div>

</div><!--/.row-->

<div class="row">

<div class="col-lg-12">

<div class="panel panel-default">

<div class="panel-heading">Make Complaint</div>

HOTEL MANAGEMENT SYSTEM

[Type text] Page 40

<div class="panel-body">

<?php

if (isset($_GET['error'])) {

echo "<div class='alert alert-danger'>

<span class='glyphicon glyphicon-info-

sign'></span>&nbsp; Error on Complaint !

</div>";

}

if (isset($_GET['success'])) {

echo "<div class='alert alert-success'>

<span class='glyphicon glyphicon-info-

sign'></span>&nbsp; Complaint Successfully Added

!

</div>";

}

?>

<form role="form" data-toggle="validator"

method="post" action="ajax.php">

<div class="row">

<div class="form-group col-lg-6">

<label>Complainant Name</label>

<input type="text" class="form-control"

HOTEL MANAGEMENT SYSTEM

[Type text] Page 41

placeholder="Complainant Name"

name="complainant_name" required>

<div class="help-block with-errors"></div>

</div>

<div class="form-group col-lg-6">

<label>Type Of Complaint</label>

<input type="text" class="form-control"

placeholder="Complaint Type"

name="complaint_type" required>

<div class="help-block with-errors"></div>

</div>

<div class="form-group col-lg-12">

<label>Complaint Description</label>

<textarea class="form-control" name="complaint"

placeholder="Complaint" required></textarea>

</div>

</div>

<button type="submit" class="btn btn-lg btn-

HOTEL MANAGEMENT SYSTEM

[Type text] Page 42

primary"

name="createComplaint">Submit</button>

<button type="reset" class="btn btn-lg btn-

danger">Reset</button>

</form>

</div>

</div>

</div>

</div>

<div class="row">

<div class="col-lg-12">

<div class="panel panel-default">

<div class="panel-heading">Complaint

Management</div>

<div class="panel-body">

<?php

if (isset($_GET['resolveError'])) {

echo "<div class='alert alert-danger'>

<span class='glyphicon glyphicon-info-

sign'></span>&nbsp; Error on Resolve !

</div>";

HOTEL MANAGEMENT SYSTEM

[Type text] Page 43

}

if (isset($_GET['resolveSuccess'])) {

echo "<div class='alert alert-success'>

<span class='glyphicon glyphicon-info-

sign'></span>&nbsp; Complaint Successfully Resolve

!

</div>";

}

?>

<table class="table table-striped table-bordered

table-responsive" cellspacing="0" width="100%"

id="rooms">

<thead>

<tr>

<th>Sr. No</th>

<th>Complainant Name</th>

<th>Type Of Complaint</th>

<th>Complaint</th>

<th>Created Date</th>

<th>Resolve</th>

<th>Budget</th>

</tr>

HOTEL MANAGEMENT SYSTEM

[Type text] Page 44

</thead>

<tbody>

<?php

$complaint_query = "SELECT *

FROM complaint";

$complaint_result =

mysqli_query($connection, $complaint_query);

if

(mysqli_num_rows($complaint_result) > 0) {

$num = 0;

while ($complaint =

mysqli_fetch_assoc($complaint_result)) {

$num++

?>

<tr>

<td><?php echo $num ?></td>

<td><?php echo $complaint['complainant_name']

?></td>

<td><?php echo $complaint['complaint_type']

?></td>

<td><?php echo $complaint['complaint'] ?></td>

<td><?php echo date('M j,

HOTEL MANAGEMENT SYSTEM

[Type text] Page 45

Y',strtotime($complaint['created_at'])) ?></td>

<td>

<?php if(!$complaint['resolve_status']){

echo '<button class="btn

btn-success" data-toggle="modal" data-

target="#complaintModal" data-id="' .

$complaint['id'] . '" id="complaint">Resolve</a>';

} else{

echo date('M j,

Y',strtotime($complaint['resolve_date']));

}

?>

</td>

<th><?php echo $complaint['budget'] ?></th>

</tr>

<?php }

} else {

echo "No Rooms";

}

?>

HOTEL MANAGEMENT SYSTEM

[Type text] Page 46

</tbody>

</table>

</div>

</div>

</div>

</div>

<!-- Add Room Modal -->

<div id="complaintModal" class="modal fade"

role="dialog">

<div class="modal-dialog">

<!-- Modal content-->

<div class="modal-content">

<div class="modal-header">

<button type="button" class="close" data-

dismiss="modal">&times;</button>

<h4 class="modal-title">Complaint Resolve</h4>

</div>

<div class="modal-body">

HOTEL MANAGEMENT SYSTEM

[Type text] Page 47

<div class="row">

<div class="col-lg-12">

<form data-toggle="validator" role="form"

method="post" action="ajax.php">

<div class="form-group">

<label>Budget</label>

<input class="form-control" placeholder="Budget"

name="budget" data-error="Enter Budget"

required>

<div class="help-block with-errors"></div>

</div>

<input type="hidden" id="complaint_id"

name="complaint_id" value="">

<button class="btn btn-success pull-right"

name="resolve_complaint">Resolve

Complaint</button>

</form>

</div>

</div>

</div>

</div>

HOTEL MANAGEMENT SYSTEM

[Type text] Page 48

</div>

</div>

<div class="row">

<div class="col-sm-12">

<p class="back-link">MIS Developed by

nivedita</p>

</div>

</div>

</div><!--/.main-->

Employee history

ac<div class="col-sm-9 col-sm-offset-3 col-lg-10 col-lg-

offset-2 main">

<div class="row">

<ol class="breadcrumb">

<li><a href="#">

<em class="fa fa-home"></em>

</a></li>

<li class="active">Employee History</li>

</ol>

</div><!--/.row-->

HOTEL MANAGEMENT SYSTEM

[Type text] Page 49

<div class="row">

<div class="col-lg-12">

<h1 class="page-header">Employee History</h1>

</div>

</div><!--/.row-->

<div class="row">

<div class="col-lg-12">

<div class="panel panel-default">

<div class="panel-heading">Employee History</div>

<div class="panel-body">

<?php

if(isset($_GET['empid'])){

$emp_id = $_GET['empid'];

}else{

header('Location:404.php');a

}

$emp = "SELECT * FROM staff WHERE

emp_id='$emp_id'";

$emp_result =

mysqli_query($connection,$emp);

HOTEL MANAGEMENT SYSTEM

[Type text] Page 50

$employee =

mysqli_fetch_assoc($emp_result);

?>

<p><b>Employee Name: </b><?php echo

$employee['emp_name']; ?></p>

<p><b>Employee Salary: </b><?php echo

$employee['salary'].'/-'; ?></p>

<table class="table table-striped table-bordered table-

responsive" cellspacing="0" width="100%"

id="rooms">

<thead>

<tr>

<th>Sr. No</th>

<th>Shift</th>

<th>From Date</th>

<th>To Date</th>

</tr>

</thead>

<tbody>

<?php

//$staff_query = "SELECT * FROM staff

HOTEL MANAGEMENT SYSTEM

[Type text] Page 51

JOIN staff_type JOIN shift ON staff.staff_type_id

=staff_type.staff_type_id ON shift.";

$staff_query = "SELECT * FROM

emp_history NATURAL JOIN shift WHERE emp_id =

'$emp_id' ORDER BY created_at DESC";

$staff_result = mysqli_query($connection,

$staff_query);

if (mysqli_num_rows($staff_result) > 0) {

$num = 0;

while ($staff =

mysqli_fetch_assoc($staff_result)) {

$num++;

?>

<tr>

<td><?php echo $num; ?></td>

<td><?php echo $staff['shift'].' - '.$staff['shift_timing'];

?></td>

<td><?php echo date('M j, Y',

strtotime($staff['from_date'])); ?></td>

<td>

<?php

HOTEL MANAGEMENT SYSTEM

[Type text] Page 52

if ($staff['to_date'] == NULL){

echo "<div class='color-

blue'>Currently Working</div>";

}else{

echo date('M j, Y',

strtotime($staff['to_date']));

}?>

</td>

</tr>

<?php

}

}

?>

</tbody>

</table>

</div>

HOTEL MANAGEMENT SYSTEM

[Type text] Page 53

</div>

</div>

</div>

<div class="row">

<div class="col-sm-12">

<p class="back-link">MIS Developed by

nivedita</a></p>

</div>

</div>

</div><!--/.main-->

<?php

//$staff_query = "SELECT * FROM staff JOIN

staff_type JOIN shift ON staff.staff_type_id

=staff_type.staff_type_id ON shift.";

$staff_query = "SELECT * FROM staff NATURAL

JOIN staff_type NATURAL JOIN shift";

$staff_result = mysqli_query($connection, $staff_query);

if (mysqli_num_rows($staff_result) > 0) {

HOTEL MANAGEMENT SYSTEM

[Type text] Page 54

while ($staffGlobal =

mysqli_fetch_assoc($staff_result)) {

$fullname = explode(" ",

$staffGlobal['emp_name']);

?>

<!-- Employee Detail-->

<div id="empDetail<?php echo $staffGlobal['emp_id'];

?>" class="modal fade" role="dialog">

<div class="modal-dialog">

<!-- Modal content-->

<div class="modal-content">

<div class="modal-header">

<button type="button" class="close" data-

dismiss="modal">&times;</button>

<h4 class="modal-title">Employee Detail</h4>

</div>

<div class="modal-body">

<div class="row">

<div class="col-lg-12">

HOTEL MANAGEMENT SYSTEM

[Type text] Page 55

<div class="panel panel-default">

<div class="panel-heading">Employee Detail:</div>

<div class="panel-body">

<form data-toggle="validator" role="form"

action="functionmis.php"

method="post">

<div class="row">

<div class="form-group col-lg-6">

<label>Staff</label>

<select class="form-control" id="staff_type"

name="staff_type_id"

required>

<option selected disabled>Select Staff Type</option>

<?php

$query = "SELECT *

FROM staff_type";

$result =

mysqli_query($connection, $query);

if

(mysqli_num_rows($result) > 0) {

while ($staff =

mysqli_fetch_assoc($result)) {

HOTEL MANAGEMENT SYSTEM

[Type text] Page 56

// echo '<option

value=" ' . $staff['staff_type_id'] . ' " selected >' .

$staff['staff_type'] . '</option>';

echo '<option

value="' . $staff['staff_type_id'] . '" ' .

(($staff['staff_type_id'] == $staffGlobal['staff_type_id'])

? 'selected="selected"' : "") . '>' . $staff['staff_type'] .

'</option>';

}

}

?>

</select>

</div>

<div class="form-group col-lg-6">

<select style="visibility: hidden;" class="form-control"

id="shift" name="shift_id" required>

<option selected disabled>Select Staff Type</option>

<?php

$query = "SELECT *

FROM shift";

$result =

HOTEL MANAGEMENT SYSTEM

[Type text] Page 57

mysqli_query($connection, $query);

if

(mysqli_num_rows($result) > 0) {

while ($shift =

mysqli_fetch_assoc($result)) {

// echo '<option

value="' . $shift['shift_id'] . '">' . $shift['shift'] . ' - ' .

$shift['shift_timing'] . '</option>';

echo '<option

value="' . $shift['shift_id'] . '" ' . (($shift['shift_id'] ==

$staffGlobal['shift_id']) ? 'selected="selected"' : "") . '>' .

$shift['shift_timing'] . '</option>';

}

}

?>

</select>

</div>

<input type="hidden" value="<?php echo

$staffGlobal['emp_id']; ?>"

id="emp_id"

name="emp_id">

HOTEL MANAGEMENT SYSTEM

[Type text] Page 58

<div class="form-group col-lg-6">

<label>First Name</label>

<input type="text" value="<?php echo $fullname[0]; ?>"

class="form-

control" placeholder="First Name" id="first_name"

name="first_name"

required>

</div>

<div class="form-group col-lg-6">

<label>Last Name</label>

<input type="text" value="<?php echo $fullname[1]; ?>"

class="form-

control" placeholder="Last Name" id="last_name"

name="last_name"

required>

</div>

<div class="form-group col-lg-6">

<label>ID Card Type</label>

<select class="form-control" id="id_card_id"

name="id_card_type"

HOTEL MANAGEMENT SYSTEM

[Type text] Page 59

required>

<option selected disabled>Select ID Card Type</option>

<?php

$query = "SELECT *

FROM id_card_type";

$result =

mysqli_query($connection, $query);

if

(mysqli_num_rows($result) > 0) {

while

($id_card_type = mysqli_fetch_assoc($result)) {

// echo '<option

value="' . $id_card_type['id_card_type_id'] . '">' .

$id_card_type['id_card_type'] . '</option>';

echo '<option

value="' . $id_card_type['id_card_type_id'] . '" ' .

(($id_card_type['id_card_type_id'] ==

$staffGlobal['id_card_type']) ? 'selected="selected"' : "")

. '>' . $id_card_type['id_card_type'] . '</option>';

}

}

HOTEL MANAGEMENT SYSTEM

[Type text] Page 60

?>

</select>

</div>

<div class="form-group col-lg-6">

<label>ID Card No</label>

<input type="text" class="form-control"

placeholder="ID Card No"

id="id_card_no"

value="<?php echo

$staffGlobal['id_card_no']; ?>"

name="id_card_no"

required>

</div>

<div class="form-group col-lg-6">

<label>Contact Number</label>

<input type="number" class="form-control"

placeholder="Contact Number" id="contact_no"

value="<?php echo

$staffGlobal['contact_no']; ?>"

HOTEL MANAGEMENT SYSTEM

[Type text] Page 61

name="contact_no"

required>

</div>

<div class="form-group col-lg-6">

<label>Address</label>

<input type="text" class="form-control"

placeholder="address"

id="address"

value="<?php echo $staffGlobal['address']; ?>"

name="address">

</div>

<div class="form-group col-lg-6">

<label>Salary</label>

<input type="number" class="form-control"

placeholder="Salary"

id="salary"

value="<?php echo $staffGlobal['salary']; ?>"

name="salary"

required>

</div>

HOTEL MANAGEMENT SYSTEM

[Type text] Page 62

</div>

<button type="submit" class="btn btn-lg btn-primary"

name="submit">Submit

</button>

<button type="reset" class="btn btn-lg btn-

danger">Reset</button>

</form>

</div>

</div>

</div>

</div>

</div>

</div>

</div>

</div>

HOTEL MANAGEMENT SYSTEM

[Type text] Page 63

<!-- Employee Detail-->

<div id="changeShift" class="modal fade"

role="dialog">

<div class="modal-dialog">

<!-- Modal content-->

<div class="modal-content">

<div class="modal-header">

<button type="button" class="close" data-

dismiss="modal">&times;</button>

<h4 class="modal-title">Change Shift</h4>

</div>

<div class="modal-body">

<div class="row">

<div class="col-lg-12">

<div class="panel panel-default">

<div class="panel-body">

<form data-toggle="validator" role="form"

action="ajax.php" method="post">

<div class="row">

<div class="form-group col-lg-12">

HOTEL MANAGEMENT SYSTEM

[Type text] Page 64

<label>Shift</label>

<select class="form-control" id="shift" name="shift_id"

required>

<option selected disabled>Select Staff Type</option>

<?php

$query = "SELECT *

FROM shift";

$result =

mysqli_query($connection, $query);

if

(mysqli_num_rows($result) > 0) {

while ($shift =

mysqli_fetch_assoc($result)) {

// echo '<option

value="' . $shift['shift_id'] . '">' . $shift['shift'] . ' - ' .

$shift['shift_timing'] . '</option>';

echo '<option

value="' . $shift['shift_id'] . '" ' . (($shift['shift_id'] ==

$staffGlobal['shift_id']) ? 'selected="selected"' : "") . '>' .

$shift['shift_timing'] . '</option>';

}

}

HOTEL MANAGEMENT SYSTEM

[Type text] Page 65

?>

</select>

</div>

</div>

<input type="hidden" name="emp_id" value=""

id="getEmpId">

<button type="submit" class="btn btn-lg btn-primary"

name="change_shift">Submit</button>

</form>

</div>

</div>

</div>

</div>

</div>

</div>

</div>

</div>

<?php

HOTEL MANAGEMENT SYSTEM

[Type text] Page 66

}

}

TESTING

INTRODUCTION TO SOFTWARE TESTING

Software testing is an investigation conducted to provide

stakeholders with information about the quality of

the software product or service under test. Software testing can also provide an objective, independent view of the software to allow the

business to appreciate and understand the risks of software

implementation. Test techniques include the process of executing a program or application with the intent of finding software bugs (errors

or other defects), and verifying that the software product is fit for use.

Software testing involves the execution of a software component or system component to evaluate one or more properties of interest. In

general, these properties indicate the extent to which the component

or system under test:

meets the requirements that guided its design and development,

responds correctly to all kinds of inputs,

performs its functions within an acceptable time,

it is sufficiently usable,

can be installed and run in its intended environments, and

achieves the general result its stakeholders desire.

As the number of possible tests for even simple software components is practically infinite, all software testing uses some strategy to select

tests that are feasible for the available time and resources. As a result,

software testing typically (but not exclusively) attempts to execute a program or application with the intent of finding software bugs (errors

or other defects). The job of testing is an iterative process as when

one bug is fixed, it can illuminate other, deeper bugs, or can even create new ones.

HOTEL MANAGEMENT SYSTEM

[Type text] Page 67

Software testing can provide objective, independent information

about the quality of software and risk of its failure to users or sponsors.

Software testing can be conducted as soon as executable software

(even if partially complete) exists. The overall approach to software development often determines when and how testing is conducted.

For example, in a phased process, most testing occurs after system

requirements have been defined and then implemented in testable programs. In contrast, under an agile approach, requirements,

programming, and testing are often done concurrently.

Testing approach

Static vs. dynamic testing

There are many approaches available in software

testing. Reviews, walkthroughs, or inspections are referred to as static testing, whereas executing programmed code with a given set of test

cases is referred to as dynamic testing.

Static testing is often implicit, like proofreading, plus when programming tools/text editors check source code structure or

compilers (pre-compilers) check syntax and data flow as static

program analysis. Dynamic testing takes place when the program itself is run. Dynamic testing may begin before the program is 100%

complete in order to test particular sections of code and are applied to

discrete functions or modules. Typical techniques for these are either using stubs/drivers or execution from a debugger environment.

[15]

Static testing involves verification, whereas dynamic testing also

involves validation.

White-box testing

White-box testing (also known as clear box testing, glass box testing,

transparent box testing, and structural testing) verifies the internal structures or workings of a program, as opposed to the functionality

HOTEL MANAGEMENT SYSTEM

[Type text] Page 68

exposed to the end-user. In white-box testing, an internal perspective

of the system (the source code), as well as programming skills, are used to design test cases. The tester chooses inputs to exercise paths

through the code and determine the appropriate outputs.[18][19]

This is

analogous to testing nodes in a circuit, e.g., in-circuit testing (ICT).

While white-box testing can be applied at the unit, integration,

and system levels of the software testing process, it is usually done at

the unit level. It can test paths within a unit, paths between units during integration, and between subsystems during a system–level

test. Though this method of test design can uncover many errors or

problems, it might not detect unimplemented parts of the specification or missing requirements.

Black-box testing

Black-box testing (also known as functional testing) treats the

software as a "black box," examining functionality without any

knowledge of internal implementation, without seeing the source code. The testers are only aware of what the software is supposed to

do, not how it does it. Black-box testing methods include: equivalence

partitioning, boundary value analysis, all-pairs testing, state transition tables, decision tabletesting, fuzz testing, model-based testing, use

case testing, exploratory testing, and specification-based testing.

Specification-based testing aims to test the functionality of software according to the applicable requirements. This level of testing usually

requires thorough test cases to be provided to the tester, who then can

simply verify that for a given input, the output value (or behavior), either "is" or "is not" the same as the expected value specified in the

test case. Test cases are built around specifications and requirements,

i.e., what the application is supposed to do. It uses external descriptions of the software, including specifications, requirements,

and designs to derive test cases. These tests can be functional or non-

functional, though usually functional.

HOTEL MANAGEMENT SYSTEM

[Type text] Page 69

Specification-based testing may be necessary to assure correct

functionality, but it is insufficient to guard against complex or high-risk situations.

One advantage of the black box technique is that no programming

knowledge is required. Whatever biases the programmers may have had, the tester likely has a different set and may emphasize different

areas of functionality. On the other hand, black-box testing has been

said to be "like a walk in a dark labyrinth without a flashlight." Because they do not examine the source code, there are

situations when a tester writes many test cases to check something

that could have been tested by only one test case or leaves some parts of the program untested.

This method of test can be applied to all levels of software

testing: unit, integration, system and acceptance. It typically comprises most if not all testing at higher levels, but can also

dominate unit testing as well.

Component interface testing

Component interface testing is a variation of black-box testing, with

the focus on the data values beyond just the related actions of a subsystem component. The practice of component interface testing

can be used to check the handling of data passed between various

units, or subsystem components, beyond full integration testing between those units. The data being passed can be considered as

"message packets" and the range or data types can be checked, for data generated from one unit, and tested for validity before being

passed into another unit. One option for interface testing is to keep a

separate log file of data items being passed, often with a timestamp logged to allow analysis of thousands of cases of data passed between

units for days or weeks. Tests can include checking the handling of

some extreme data values while other interface variables are passed as normal values. Unusual data values in an interface can help explain

unexpected performance in the next unit.

HOTEL MANAGEMENT SYSTEM

[Type text] Page 70

Grey-box testing

Grey-box testing (American spelling: gray-box testing) involves having knowledge of internal data structures and algorithms for

purposes of designing tests while executing those tests at the user, or

black-box level. The tester will often have access to both "the source code and the executable binary." Grey-box testing may also

include reverse engineering(using dynamic code analysis) to

determine, for instance, boundary values or error messages. Manipulating input data and formatting output do not qualify as grey-

box, as the input and output are clearly outside of the "black box" that we are calling the system under test. This distinction is particularly

important when conducting integration testing between two modules

of code written by two different developers, where only the interfaces are exposed for the test.

By knowing the underlying concepts of how the software works, the

tester makes better-informed testing choices while testing the software from outside. Typically, a grey-box tester will be permitted

to set up an isolated testing environment with activities such as

seeding a database. The tester can observe the state of the product being tested after performing certain actions such as

executing SQL statements against the database and then executing

queries to ensure that the expected changes have been reflected. Grey-box testing implements intelligent test scenarios, based on limited

information. This will particularly apply to data type

handling, exception handling, and so on.

HOTEL MANAGEMENT SYSTEM

[Type text] Page 71

CHAPTER 5

5.1 CONCLUSION Hotel Management system now-a-days have the advantage of

modernization. Computers have made the work more easy, playing a important role in management.

Reports are made on daily basis for every customer check in or check

out. Which can easily be seen by the management .Hotel Management system also has primary purpose of providing facilities to the

customers.

5.2 FUTURE ENHANCEMENT

Hotel management System has lot of enhancement options. In future more features

May be added category-wise . It may try to analyze the user behavior

and preferences and accordingly suggest response on user query more suitably to fulfill their requirement .All concepts can be applied to

make hotel management system more efficient.

HOTEL MANAGEMENT SYSTEM

[Type text] Page 72

APPENDIX - A

LOGIN

HOTEL MANAGEMENT SYSTEM

[Type text] Page 73

RESERVATION

HOTEL MANAGEMENT SYSTEM

[Type text] Page 74

HOTEL MANAGEMENT SYSTEM

[Type text] Page 75

HOTEL MANAGEMENT SYSTEM

[Type text] Page 76

ROOM MANAGEMENT

STAFF MANAGEMENT

HOTEL MANAGEMENT SYSTEM

[Type text] Page 77

ADD EMPLOYEE

HOTEL MANAGEMENT SYSTEM

[Type text] Page 78

APPENDIX-B

REFERENCES

1. BEGINNING PHP 5- DAVE MERCER

2. PHP AND MYSQLWEB DEVELOPMENT - LUKE,

LAURA

3. MICROSOFT SQL SERVER -2000 - RANKIN , PAUL&

JENSON

4. FUNDAMENTAL OF DATABASE -RAMEZ

ELMASRI,SHAMKANT

6.F

U

N

D

A

M

E

N

T

A

L

S

O

F

D

A

T

A

HOTEL MANAGEMENT SYSTEM

[Type text] Page 79

B

A

S