Hotel Management System Project Report

Download as pdf or txt
Download as pdf or txt
You are on page 1of 127

Hotel Management System

Balaj Ahmed Jan BCS173069


Talha Hassan BCS173065
Ramal Abbas BCS173167

Supervised By
Dr. Masroor Ahmed

Spring 2021
BS Computer Science

Department of Computer Science

Capital University of Science & Technology, Islamabad


Submission Form for Final-Year

PROJECT REPORT

NUMBER OF
Version V 3.0 MEMBERS 3

TITLE Hotel Management System

SUPERVISOR NAME Dr. Masroor Ahmed

MEMBER NAME REG. NO. EMAIL ADDRESS

MEMBERS’ SIGNATURES

Supervisor’s Signature

1
Capital University of Science and Technology, Islamabad Department of Computer Science
APPROVAL CERTIFICATE

This project, entitled as “Hotel Management System ” has been approved


for the award of

Bachelors of Science in Computer Sciences

Committee Signatures:

Supervisor: __________________________

Dr. Masroor Ahmed

Project Coordinator: __________________________

Mr. Ibrar Arshad

Head of Department: __________________________

Dr. Nayyer Masood

2
Capital University of Science and Technology, Islamabad Department of Computer Science
DECLARATION

We, hereby, declare that “No portion of the work referred to, in this project has been
submitted in support of an application for another degree or qualification of this or any
other university/institute or other institution of learning”. It is further declared that this
undergraduate project, neither as a whole nor as a part thereof has been copied out from
any sources, wherever references have been provided.

MEMBERS’ SIGNATURES

3
Capital University of Science and Technology, Islamabad Department of Computer Science
ACKNOWLEDGEMENTS

We are heartily thankful prayful to our supervisor Dr. Masroor Ahmed, teachers, lab
instructors of CUST, who tried to provide possible sincere support courage guidance and
gave their valuable time to us during this entire project.

4
Capital University of Science and Technology, Islamabad Department of Computer Science
Executive Summary

Our project automates the daily routine work taking place in tourism hotels like
reservation, income and expenditure reporting, customer billing and staff management.
Hotel industry is an essential part of tourism. The expansion of tourism is well
inevitable bringing out development of the hotel industry. Hotel industry is so closely
linked with the tourism industry that it is responsible for about approximately 50% of the
foreign exchange earning from tourism trade and enterprises. In recent years government
has taken several steps to boost travel & tourism which have benefited hotel industry in
Pakistan. Pearl Continental Hotel, Royal Hotel, Marriot Hotel, Ramada Hotel, Serena
Hotel covers a wider market in the hotel industry than the other luxury hotels in the race.
They have a better product profile than the rest: i.e. they have great management,
hospitality and facilities provided by them to their customers.

5
Capital University of Science and Technology, Islamabad Department of Computer Science
Table of Contents
Chapter 1…………………………………………………………………………………………………………………………………………………1

Introduction……………………………………………………………………………………………………………………………………………1
1.1. Project Introduction ...................................................................................................................... 1
1.2. Existing Examples / Solutions ........................................................................................................ 1
1.3. Business Scope .............................................................................................................................. 2
1.4. Useful Tools and Technologies ..................................................................................................... 2
1.5. Project Work Break Down............................................................................................................. 2
1.6. Project Time Line .......................................................................................................................... 4
Chapter 2 ...................................................................................................................................................... 5
Requirement Specification and Analysis ..................................................................................................... 5
Requirement Specification........................................................................................................................... 5
2.1. Functional Requirements .................................................................................................................. 5
2.2. Non-Functional Requirements .......................................................................................................... 6
2.3. Selected Functional Requirements .................................................................................................... 6
2.4. System Use Case Modeling ................................................................................................................ 7
2.5. System Sequence Diagrams ............................................................................................................. 23
2.6. Domain Model ................................................................................................................................. 27
Chapter 3 .................................................................................................................................................... 28
System Design ............................................................................................................................................ 28
3.1. Software Architecture...................................................................................................................... 28
3.2. Class Diagram................................................................................................................................... 29
3.3. Sequence Diagrams ......................................................................................................................... 30
3.4. Entity Relationship Diagram ............................................................................................................ 34
3.5. Database Schema………………………………………………………………………………………………………………………..35

3.6. User Interface Design………………………………………………………………………………………………………………….36

Chapter 4……………………………………………………………………………………….........................................................57

Software Development………………………………………………………………………………………………………………………..57

4.1. Coding Standards…………………………………………………………………………....................................................57

6
Capital University of Science and Technology, Islamabad Department of Computer Science
4.2. Developing Environment………………………………………………………………..................................................57

4.3. Software Description…………………………………………………………………………………………………………………….57

Chapter 5………………………………………………………………………………………………………………………………………….101

Software Testing……………………………………………………………………………………………………………………………….101

5.1. Testing Methodology…………………………………………………………………...................................................101

5.2. Testing Environment……………………………………………………………………………………………………………………101

5.3 Test Cases…………………………………………………………………………………………………………………………………….101

Chapter 6………………………………………………………………………………………………………………………………………….103

Software Deployment….……………………………………………………………………………………………………………………103

6.1. Installation/Deployment Process Description……………………………………………………………………………..103

Report Approval Certificate……………………………………………………………………………………………………………….112

References…………………………………………………………………………………………………………………………………………113

7
Capital University of Science and Technology, Islamabad Department of Computer Science
List of Figures

Figure 1.1: Work breakdown Structure……………………………………………………………………………………………………………….3


Figure 1.2: Gant Chart…………..…………………………………………………………………………………………………………………………….4
Figure 2.1: Use case Diagram (1)……..…………………….……………………………………………………………………………………………7
Figure 2.2: Use case Diagram (2)…..……………………………………………….………………………………………………………………….13
Figure 2.3: Use case Diagram (3)………….…………………………………………………………….………………………………………….….16
Figure 2.4: Use case Diagram (4)……………………….…………………………………………………………………………………………..….18
Figure 2.5: System Sequence Diagram (1)………………………….………………………………………………………………………………23
Figure 2.6: System Sequence Diagram (2)………………………………………………….………………………………………………………24
Figure 2.7: System Sequence Diagram (3)…………………………………………………………………….……………………………………25
Figure 2.8: System Sequence Diagram (4)…………………………………………………………………………….……………………………26
Figure 2.9: Domain Model………………………………………………………………………………………………………………………………...27
Figure 3.1: 2-tier Software Architecture Diagram………..…………………………………………………………………………………….28
Figure 3.2: UML Class Diagram………………………………………………………………………………………………………………………….29
Figure 3.3: Sequence Diagram (Receptionist)…………………………………………………………………………………………………….30
Figure 3.4: Sequence Diagram (General Manager)………………………………………………………………………………………….…31
Figure 3.5: Sequence Diagram (Staff Manager)…………………………………………………………………………………………….……32
Figure 3.6: Sequence Diagram (Owner)…………………………………………………………………………………………………………..…33
Figure 3.7: Entity Relationship Diagram…………………………………………………………………………………………………………….34
Figure 3.8: Database Schema…………………………………………………………………………………………………………………………….35
Figure 3.9: Owner Homepage…………………………………………………………………………………………………………………………...36
Figure 3.10: Room Rates Management……………………………………………………………………………………………………………..37
Figure 3.11: View Reports Page…………………………………………………………………………………………………………………………38
Figure 3.12: Employee Management…………………………………………………………………………………………………………………39
Figure 3.13: Staff Report…………………………………………………………………………………………………………………………...…..…40
Figure 3.14: Login Page for Owner………………………………………………………………………………………………………………….…41
Figure 3.15: Login Page for General Manager.…………………………………………………………………………………………………..42
Figure 3.16: General Manager Home Page………………………………………………………………………………………………………..43
Figure 3.17: Income Detail Management…………………………………………………………………………………………………………..44
Figure 3.18: Expenditure Detail Management……………………………………………………………………………………………………45
Figure 3.19: Staff Manager Home Page……………………………………………………………………………………………………………..46
Figure 3.20: Staff Duty Details Management…………………………………………………………………………………………………..…47
Figure 3.21: Login Page for Staff Manager…………………………………………………………………………………………………………48
Figure 3.22: Receptionist Home Page………………………………………………………………………………………………………………..49
Figure 3.23: Reservation Details Management…………………………………………………………………………………….……………50
Figure 3.24: Availability Status Management………………………………………………………………………………….…..……………51
Figure 3.25: Billing Details Form…………………………………………………………………………………………………………….…………52
Figure 3.26: Billing Receipt………………………………………………………………………………………………………………………….……53
Figure 3.27: Restaurant Service Details Management……………………………………………………………………………………… 54
Figure 3.28: Customer Checkout Details Management.…………………………………………………………………………………….55
Figure 3.29: Login Page for Receptionist………………………………………………………………………………………………………..…56
Figure 6.1: Installation/Deployment………………………………………………………………………………………………………………103
Figure 6.2: Installation/Deployment………………………………………………………………………………………………………………104
Figure 6.3: Installation/Deployment………………………………………………………………………………………………………………105
Figure 6.4: Installation/Deployment………………………………………………………………………………………………………………106
8
Capital University of Science and Technology, Islamabad Department of Computer Science
Figure 6.5: Installation/Deployment………………………………………………………………………………………………………………107
Figure 6.6: Installation/Deployment………………………………………………………………………………………………………........108
Figure 6.7: Installation/Deployment………………………………………………………………………………………………………………109
Figure 6.8: Installation/Deployment………………………………………………………………………………………………………………110
Figure 6.9: Installation/Deployment………………………………………………………………………………………………………………111

9
Capital University of Science and Technology, Islamabad Department of Computer Science
LIST OF TABLES
Table 2.1: Functional Requirements……………………………………………………………………………………………………………………5
Table 2.2: Non-Functional Requirements…………………………………………………………………………………………………………….6
Table 2.3: Selected Functional Requirements………………………………………………………………………………………………………6
Table 2.1: Use Case 1 Manage Reservation (Add, View)………...……………………………………….…………………………………..7
Table 2.2: Use Case 2 Manage Room Availability Status (Add Status, Check Status)………….…………………………………8
Table 2.3: Use Case 3 Add Payment…………………………………………………………………………….………………………………………9
Table 2.4: Use Case 4 Manage Service (Add Restaurant Service, View Restaurant Service Details)…………………….10
Table 2.5: Use Case 5 Manage Checkout (Add Checkout Details, View Checkout Details)…………….…………………….11
Table 2.1: Use Case 1 Manage Expenditures (Add Expenditures, View Expenditures)……………….……………………….13
Table 2.2: Use Case 2 Manage Income (Add Income, View Income).....................................................................14
Table 2.1: Use Case 1 Staff Duty Timings and Duty Hours Manipulation (Add, View)…………………………………………16
Table 2.1: Use Case 1 Manipulation of Room Rates (Update Room Rates)…………………………………………………………18
Table 2.2: Use Case 2 View Income and Expenditures Report…………………………………………………………………………….19
Table 2.3: Use Case 3 View Staff Report…………………………………………………………………………………………………………….20
Table 2.4: Use Case 4 Manipulation of Staff (Add, Update, Remove)…………………................................................21
Table 5.1: Test Case 1……………………………………………………………………………………………………………………………………..101
Table 5.2: Test Case 2……………………………………………………………………………………………………………………………………..102
Table 5.3: Test Case 3……………………………………………………………………………………………………………………………………..102

10
Capital University of Science and Technology, Islamabad Department of Computer Science
This page is kept blank

11
Capital University of Science and Technology, Islamabad Department of Computer Science
Chapter 1

Introduction

1.1. Project Introduction


1.1.1. Brief description of the project:
We are going to implement a user-friendly GUI Hotel operational application. The main goal of
this project is to keep and maintain track record of all earnings made by the hotel. It will also keep
and maintain track record of employees and customers.
1.1.2. Introduction of the beneficiary of the project:
We are going to build a hotel operational application which consist of actors namely Managers
and owner of the hotel.
Using this application we don’t have to manage all the record on register or paper
The owner of the hotel can check every activity from any where.
The application gives ease to do room bookings and helps to manage bills
The manager can manage staff records like their working ours and salary and rooms details that
weather the client checkin or checkout .

1.1.3. Modules of applications


The modules of our applications includes:
1. Owner
2. Genral manager
3. Staff manager
4. Receptionist

1.2. Existing Examples / Solutions

Currently many hotels in Islamabad namely Marriot Hotel, Ramada Hotel and Serena Hotel
uses the user-friendly GUI management application. Customers provide the details to
receptionist or room reservation agents for reserving room or to order any service like ordering
food. Receptionists and Reservation Agents keep and maintain track record of all customers
and the services which are ordered by customer. The hotel owners keep the track record of all
expenditures and earnings made by the hotel.

1
Capital University of Science and Technology, Islamabad Department of Computer Science
1.3. Business Scope

The project we are building is according to the market perspective. Moreover, it is also part of
our final year project to come across a brilliant idea that you can sale in the market to potential
customers. Our potential customer is Royal Hotel located in northern area namely Naran. There
we will deploy this application. If there, it would be successful, then we will can hopefully earn
profit by also building hotel operational applications for other hotels. Our project eventually
will run at administrator site and our target is that it must meet and fulfill our client
requirements. Our project is also linked with tourism industry, the application users will easily
be able to resolve their problems and will be easily able to perform their daily tasks by using
hotel operational applications and in this way the entire tourism industry will also be able to
run flawlessly.

1.4. Useful Tools and Technologies

The technologies that we intend to use are as follows:-


1. The languages which we are possibly going to use are HTML, PHP, SQL,JavaScript,.Net
because our project namely hotel operational application is a web-based application and
somehow mostly web-based applications use these mentioned languages in their
development.
2. The tools which we are somehow going to use will be Visual Studio,WordPress, XAMPP
Control Panel for running and starting PHP, MySql and Apache servers
3. We will going to use phpMyAdmin database because it doesnot require to write any hard
and fast commands which are very much difficult and complicated to write and remember.
4. Our project will support Windows Operating Application.

1.5. Project Work Break Down


With combine collaboration, we will going to do work in five different stages of
development. The first stage namely Requirements Gathering will be done on
15thSeptember 2020. From 15thSeptember 2020 till 7thNovember 2020, we will check and
analyze the gathered requirements, this will be the second stage namely Requirement
Analysis, it will somehow involve identification and diagraming of usecases. From
7thNovember 2020, we will move to third stage namely Design stage, it will involve
identifying objects and classes and diagraming those objects and classes and interaction
between them, we will try to sum up the Design stage before 12th January 2021. Before or

2
Capital University of Science and Technology, Islamabad Department of Computer Science
from 12th January 2021, we will try to move on and sum up the fourth stage namely
Implementation stage till 7thApril 2021, it will involve coding of concepts applied in the
third stage. From 7thApril 2021 we will move on fifth stage namely Testing, it will involve
finding and removing errors from the project we will be building, we will try to sum up
testing till 23rdJune 2021. The complete Gant chart of estimated project timeline work
break down is also provided in section 1.6 of this document. The work breakdown chart is
also given as follows.

Figure 1.1: Project Work breakdown

3
Capital University of Science and Technology, Islamabad Department of Computer Science
1.6. Project Time Line

Figure 1.2: Gant Chart of Project Timeline

4
Capital University of Science and Technology, Islamabad Department of Computer Science
Chapter 2

Requirement Specification and Analysis

Requirement Specification
This application is an extremely valuable for hotels. This system will done all manipulation
work which is done manually on registers or notebooks.

2.1. Functional Requirements

Table 2.1: Functional Requirements

S. No. Functional Requirement Type Status


1 Manage Reservations(Add, View, Administrative COMPLETED
Update,) Functions
2 Check and Manage Room Administrative COMPLETED
Availability(Add, View, Update) Functions
3 Issue Bills (Print E-Receipt to issue to Transactional COMPLETED
customer) Handling
4 Manage Customer Details(Add, View, Administrative COMPLETED
Update) Functions
5 Manage room details(Add, View, Administrative COMPLETED
Update) Functions
6 Manage Staff Details(Add, View, Administrative COMPLETED
Update, Remove) Functions
7 Set and manage room rates Business Rules COMPLETED
8 Manage Payments(Add, View, Business Rules COMPLETED
Update)
9 Retrieve Income and Expenditures Business Rules COMPLETED
Details
10 Manage Income Details Business Rules COMPLETED
11 Manage Expenditure Details Business Rules COMPLETED

5
Capital University of Science and Technology, Islamabad Department of Computer Science
2.2. Non-Functional Requirements

Table 2.2: Non-Functional Requirements

S. No. Non Functional Requirements Category


1 Username and Password must be Security
secured
2 Database must be secured Security

2.3. Selected Functional Requirements


List of selected functional requirements for current iteration.

Table 2.3: Selected Functional Requirements

S. No. Functional Requirement Type


1 Manage Reservations(Add, View, Administrative
Update,) Functions
2 Check and Manage Room Administrative
Availability(Add, View, Update) Functions
3 Issue Bills(Print E-Receipt to issue to Transactional
customer) Handling
4 Manage Customer Details(Add, View, Administrative
Update) Functions
5 Manage room details(Add View, Administrative
Update) Functions
6 Manage Staff Details(Add, View, Administrative
Update, Remove) Functions
7 Set and manage room rates Business Rules
8 Manage Payments(Add, View, Business Rules
Update)
9 Retrieve Income and Expenditures Business Rules
Details
10 Manage Income Details Business Rules
11 Manage Expenditure Details Business Rules

6
Capital University of Science and Technology, Islamabad Department of Computer Science
2.4. System Use Case Modeling
Receptionist:

Figure 2.1: Use case Diagram (1)

Table 2.1: Use Case 1

Use Case ID: UC1

Use Case Name: Manage Reservation(Add,View)

Created By: Balaj Ahmed Jan Last Updated By: Balaj Ahmed Jan

Date Created: 5th October, 2020 Last Revision Date: 10th November, 2020

Actors: Receptionist

Description: This usecase describes that how receptionist will add and view
reservation details. Receptionist will make reservation, he will be
then able to view and update those details.

Trigger: None

7
Capital University of Science and Technology, Islamabad Department of Computer Science
Preconditions: Receptionist must before have to login to use the system

Post conditions: Add reservation button will be used to make reservation, view
button will be used to view details of customers that in which
room following customer is staying.

Normal Flow: Receptio System


nist

1. Receptionist will login 1.Successful login

2. By using Add Reservation 2. Successfully add


option, he will add new reservation.
reservation after entering
customer details. 3.Successfully shows
reservation details
3. By using View
Reservation Details option,
he will be able to see the
customer details like
name, room in which
he/she has been staying.

Alternative Flows: None

Exceptions: None

Table 2.2: Use Case 2

Use Case ID: UC2

Use Case Name: Manage Room Availability Status(Add Status, Check Status)

Created By: Balaj Ahmed Jan Last Updated By: Balaj Ahmed Jan

Date Created: 5th October, 2020 Last Revision Date: 10th November, 2020

Actors: Receptionist

Description: This usecase describes that how receptionist will be able to update
and check room availability that whether any following room is
available or not.

Trigger: None

8
Capital University of Science and Technology, Islamabad Department of Computer Science
Preconditions: Receptionist must before have to login to use the system

Post conditions: Add Availability Status will be able to add availability status of
room. Check Room Availability option will be used to check that
whether any following room is available or not. Moreover, he will
send income report to General Manager.

Normal Flow: Receptio System


nist

1. Receptionist will login 1.Successful login

2. By using Add Status, he 2.Successfully add


will be able to add room availability status
availability status.
3.Successfully shows
3. By using Check Status, availability status
he will be able to view
room availability status.

Alternative Flows: None

Exceptions: None

Table 2.3: Use Case 3

Use Case ID: UC3

Use Case Name: Add Payment

Created By: Balaj Ahmed Jan Last Updated By: Balaj Ahmed Jan

Date Created: 5th October, 2020 Last Revision Date: 10th November, 2020

Actors: Receptionist

Description: This use case describes that how receptionist will be able to print
checkout bill receipt. Receptionist will enter billing details, he will
then print checkout bill receipt and then receipt will be given to
customer.

Trigger: None

9
Capital University of Science and Technology, Islamabad Department of Computer Science
Preconditions: Receptionist must before have to login to use the system

Post conditions: Checkout option will be used to print checkout receipt

Normal Flow: Receptio System


nist

1. Receptionist will login 1.Successful login

2. By using Checkout 2.Successfully print


option, he will be able receipt.
to print checkout
receipt.

Alternative Flows: None

Exceptions: None

Table 2.4: Use Case 4

Use Case ID: UC4

Use Case Name: Manage Service(Add Restaurant Service, View Restaurant Service Details)

Created By: Balaj Ahmed Jan Last Updated By: Balaj Ahmed Jan

Date Created: 5th October, 2020 Last Revision Date: 10th November, 2020

Actors: Receptionist

Description: This usecase describes that how receptionist will be able to add
and view restaurant service details. Receptionist will add,view,
update restaurant service details incase if customer restaurant
service of hotel.

Trigger: None

Preconditions: Receptionist must before have to login to use the system

Post conditions: Add Restaurant Service will be used to add restaurant service
details and View Restaurant Service option will be able to view
restaurant service details.

10
Capital University of Science and Technology, Islamabad Department of Computer Science
Normal Flow: Receptio System
nist

1. Receptionist will login 1.Successful login

2. By using Add 2.Successfully add


Restaurant Service restaurant service
option, he will be able details.
add restaurant service
details. 3. Successfully show
restaurant service
3. By using View details.
Restaurant Service
Details option, he will
be able view restaurant
service details.

Alternative Flows: None

Exceptions: None

Table 2.5: Use Case 5

Use Case ID: UC5

Use Case Name: Manage Checkout(Add Checkout Details, View Checkout Details)

Created By: Balaj Ahmed Jan Last Updated By: Balaj Ahmed Jan

Date Created: 5th October, 2020 Last Revision Date: 10th November, 2020

Actors: Receptionist

Description: This usecase describes that how receptionist will be able to add
and view checkout details. Receptionist will store and manage the
details of checked out customers.

Trigger: None

Preconditions: Receptionist must before have to login to use the system

11
Capital University of Science and Technology, Islamabad Department of Computer Science
Post conditions: Add checkout will be used to add checkout details and View
checkout details option will be able to view checkout details.

Normal Flow: Receptio System


nist

1. Receptionist will login 1.Successful login

2. By using Add checkout 2.Successfully add


details option, he will be checkout details.
able add checkout
details. 3. Successfully show
checkout details.
3. By using View checkout
Details option, he will
be able view checkout
details.

Alternative Flows: None

Exceptions: None

General Manager:

12
Capital University of Science and Technology, Islamabad Department of Computer Science
Figure 2.2: Use case Diagram (2)

Table 2.1: Use Case 1

Use Case ID: UC1

Use Case Name: Manage Expenditures (Add, View)

Created By: Ramal Abbas Last Updated By: Ramal Abbas

Date Created: 5th October, 2020 Last Revision Date: 10th November, 2020

Actors: General Manager

Description: This usecase describes that how General Manager will be able to
add, view hotel expenditures. When expenditure details are added,
they are stored in system, owner will then view expenditures
details and also the general manager.

Trigger: None

Preconditions: General Manager must before have to login to use the system

Post conditions: Add Expenditure Details option will be used to add expenditures
of the hotel. View Expenditures Details option will be used to

13
Capital University of Science and Technology, Islamabad Department of Computer Science
view hotel expenditures like electricity bill, gas bill, inventory bill
etc. General Manager will further send these details to owner.

Normal Flow: General System


Manager

1. GM will login 1. Successfully Login

2. By using View 2. Successfully shows


Expenditures Option, he expenditure details.
would be able to view
hotel expenditures. 3.Successfully add
expenditure details.
3. By using Add
Expenditures Option, he 4.Successfully displayed.
would be able to add hotel
expenditures.

4. Owner will then view


these details.

Alternative Flows: None

Exceptions: None

Table 2.2: Use Case 2

Use Case ID: UC2

Use Case Name: Manage Income (Add, View)

Created By: Ramal Abbas Last Updated By: Ramal Abbas

Date Created: 5th October, 2020 Last Revision Date: 10th November, 2020

Actors: General Manager

Description: This usecase describes that how General Manager will be able to
add, view hotel income, when income details are added, they are
stored in system, owner will then view income details and also the
general manager.

14
Capital University of Science and Technology, Islamabad Department of Computer Science
Trigger: None

Preconditions: General Manager must before have to login to use the system

Post conditions: View Income Details option will be used to view income made by
the hotel. Add Income Details option will be used to add income
made by the hotel. General Manager will further send these details
to owner.

Normal Flow: General System


Manager

1. GM will login 1. Successfully login

2. By using View Income 2. Successfully shows


Details option, he will be Income details
able to view the income
made by the hotel. 3. Successfully add Income
details
3. By using Add Income
Details option, he will be 4. Successfully displayed.
able to add the income
made by the hotel.

4. Owner will then view


these details.

Alternative Flows: None

Exceptions: None

Staff Manager:

15
Capital University of Science and Technology, Islamabad Department of Computer Science
Figure 2.3: Use case Diagram (3)

Table 2.1: Use Case 1

Use Case ID: UC1

Use Case Name: Staff Duty Timings and Duty Hours Manipulation(Add, View)

Created By: Talha Hassan Last Updated By: Talha Hassan

Date Created: 5th October, 2020 Last Revision Date: 10th November, 2020

Actors: Staff Manager

Description: This use case describes that how staff manager will manipulate
employee details like their entry and exit time, duty timings and
hours, and other details like employee name, cnic, phone no etc.
Staff Manager and owner will be then able to view the details.

Trigger: None

Preconditions: Staff Manager must before have to login to use the system

Post conditions: Add employee timing details options will be used to add employee
details like add entry time, exit time.View Employee Timings will
16
Capital University of Science and Technology, Islamabad Department of Computer Science
be used to see employee entry and exit timings and duty hours.
Staff Manager will send employee report to owner.

Normal Flow: Staff System


Manager

1. Staff Manager will login 1. Successfully login

2. Add Employee Details 2. Successfully add


option will be used to add employee entry, exit
employee entry time, exit timings and duty hours
time , duty hours etc. details

3. View employee timing 3. Successfully shows


details will be used to view employee entry, exit
entry and exit timings and timings and duty hours
duty hours of employees. details.

4. Owner will then view 4. Successfully displayed.


these details..

Alternative Flows: None

Exceptions: None

17
Capital University of Science and Technology, Islamabad Department of Computer Science
Owner:

Figure 2.4 : Use case Diagram (4)

Table 2.1: Use Case 1

Use Case ID: UC1

Use Case Name: Manipulation of Room Rates(Update Room Rates)

Created By: Talha Hassan Last Updated By: Talha Hassan

Date Created: 5th October, 2020 Last Revision Date: 10th November, 2020

Actors: Owner

Description: This usecase describes how hotel owner will be able to change
room rent. Owner will update the room rent. Receptionist will be
able to view the room rent and will make reservation according to
the updated rent.

Trigger: None

Preconditions: Owner must before have to login to use the system

Post conditions: Update Room Rent option will be used to change room rent.

Normal Flow: Owner System

1. Owner will login 1. Successfully login

2. Successfully updated
room rent.

18
Capital University of Science and Technology, Islamabad Department of Computer Science
2. To change room rent,
Update Room Rent option
will be used.

Alternative Flows: None

Exceptions: None

Table 2.2: Use Case 2

Use Case ID: UC2

Use Case Name: View Income and Expenditures Report

Created By: Talha Hassan Last Updated By: Talha Hassan

Date Created: 5th October, 2020 Last Revision Date: 10th November, 2020

Actors: Owner

Description: This usecase describes how hotel owner will be able to view hotel
income and expenditures. Owner will able to view the income and
expenditure details entered by general manager.

Trigger: None

Preconditions: Owner must before have to login to use the system

Post conditions: View Income option will be used to view income made by the
hotel. View Expenditures option will be used to view hotel
expenditures like electricity bill, gas bill etc.

Normal Flow: Owner System

1. Owner will login 1. Successfully login

2. To view income, 2. Successfully shows


View Income option income
will be used.
3. Successfully shows
3. To view expenditures
expenditures, View

19
Capital University of Science and Technology, Islamabad Department of Computer Science
Expenditures option
will be used.

Alternative Flows: None

Exceptions: None

Table 2.3: Use Case 3

Use Case ID: UC3

Use Case Name: View staff report

Created By: Talha Hassan Last Updated By: Talha Hassan

Date Created: 5th October, 2020 Last Revision Date: 10th November, 2020

Actors: Owner

Description: This usecase describes how hotel owner will be able to view staff
performance report. Owner will be able to view staff performance
report which is being managed by staff manager.

Trigger: None

Preconditions: Owner must before have to login to use the system

Post conditions: View Staff Performance Report will be used to view Staff
Performance report.

Normal Flow: Owner System

1. Owner will login 1.Successfully login

2. To view staff 2.Successfully show staff


performance, View Staff performance report
Performance Report
option will be used.

Alternative Flows: None

20
Capital University of Science and Technology, Islamabad Department of Computer Science
Exceptions: None

Table 2.4: Use Case 4

Use Case ID: UC4

Use Case Name: Manipulation of Staff(Add, Update, Remove)

Created By: Talha Hassan Last Updated By: Talha Hassan

Date Created: 5th October, 2020 Last Revision Date: 10th November, 2020

Actors: Owner

Description: This usecase describes how hotel owner will be able to manipulate
employee information incase if there is a need to add, update and
remove employees. Owner will able to manage details of
employee salary in this use case.

Trigger: None

Preconditions: Owner must before have to login to use the system

Post conditions: Add Employee option will be used to add newly joined
employees, Update Employee Details option will be used to
update employee details like phoneno, address etc. Remove
employee will be used to remove employee details.

Normal Flow: Owner System

1. Owner will login 1. Successfully login

2. Update Employee will 2. Successfully update


be used to change employee details
employee details.
3. Successfully shows
3. View Employee Details employee personal
will be used to view details.
employees personal and
performance data. 4. Successfully add new
employee details.
4. Add New Employee
option will be used to

21
Capital University of Science and Technology, Islamabad Department of Computer Science
add newly joined 5. Successfully remove
employee details. details.

5. Remove Employee
option will be used when
employee leaves hotel
job or is terminated.

Alternative Flows: None

Exceptions: None

22
Capital University of Science and Technology, Islamabad Department of Computer Science
2.5. System Sequence Diagrams

Figure 2.5: System Sequence Diagram (1)

23
Capital University of Science and Technology, Islamabad Department of Computer Science
Figure 2.6: System Sequence Diagram (2)

24
Capital University of Science and Technology, Islamabad Department of Computer Science
Figure 2.7: System Sequence Diagram (3)

25
Capital University of Science and Technology, Islamabad Department of Computer Science
Figure 2.8: System Sequence Diagram (4)

26
Capital University of Science and Technology, Islamabad Department of Computer Science
2.6. Domain Model

Figure 2.9: Domain Model

27
Capital University of Science and Technology, Islamabad Department of Computer Science
Chapter 3

System Design

3.1. Software Architecture

Figure 3.1: 2-tier Software Architecture Diagram

28
Capital University of Science and Technology, Islamabad Department of Computer Science
3.2. Class Diagram

Figure 3.2: Class Diagram

29
Capital University of Science and Technology, Islamabad Department of Computer Science
3.3. Sequence Diagrams

Figure 3.3: Sequence Diagram for Receptionist

30
Capital University of Science and Technology, Islamabad Department of Computer Science
Figure 3.4: Sequence Diagram for General Manager

31
Capital University of Science and Technology, Islamabad Department of Computer Science
Figure 3.5: Sequence Diagram for Staff Manager

32
Capital University of Science and Technology, Islamabad Department of Computer Science
Figure 3.6: Sequence Diagram for Owner

33
Capital University of Science and Technology, Islamabad Department of Computer Science
3.4. Entity Relationship Diagram

Figure 3.7: Entity Relationship Diagram

34
Capital University of Science and Technology, Islamabad Department of Computer Science
3.5 Database Schema

Figure 3.8: Database Schema

35
Capital University of Science and Technology, Islamabad Department of Computer Science
3.6 User Interface Design
Our user interface design(s) are likely as follows.

Owner

Figure 3.9: Owner Home Page

36
Capital University of Science and Technology, Islamabad Department of Computer Science
Figure 3.10: Room Rates Management

37
Capital University of Science and Technology, Islamabad Department of Computer Science
Figure 3.11: View Reports Page

38
Capital University of Science and Technology, Islamabad Department of Computer Science
Figure 3.12: Employee Management

39
Capital University of Science and Technology, Islamabad Department of Computer Science
Figure 3.13: Staff Report Page

40
Capital University of Science and Technology, Islamabad Department of Computer Science
Figure 3.14: Login Page for Owner

41
Capital University of Science and Technology, Islamabad Department of Computer Science
General Manager

Figure 3.15: Login Page for General Manager

42
Capital University of Science and Technology, Islamabad Department of Computer Science
Figure 3.16: General Manager Home Page

43
Capital University of Science and Technology, Islamabad Department of Computer Science
Figure 3.17: Income Detail Management

44
Capital University of Science and Technology, Islamabad Department of Computer Science
Figure 3.18: Expenditure Detail Management

45
Capital University of Science and Technology, Islamabad Department of Computer Science
Staff Manager

Figure 3.19: Staff Manager Home Page

46
Capital University of Science and Technology, Islamabad Department of Computer Science
Figure 3.20: Staff Duty Details Management

47
Capital University of Science and Technology, Islamabad Department of Computer Science
Figure 3.21: Login Page for Staff Manager

48
Capital University of Science and Technology, Islamabad Department of Computer Science
Receptionist

Figure 3.22: Receptionist Home Page

49
Capital University of Science and Technology, Islamabad Department of Computer Science
Figure 3.23: Reservation Details Management

50
Capital University of Science and Technology, Islamabad Department of Computer Science
Figure 3.24: Availability Status Management

51
Capital University of Science and Technology, Islamabad Department of Computer Science
Figure 3.25: Billing Details Form

52
Capital University of Science and Technology, Islamabad Department of Computer Science
Figure 3.26: Billing Receipt

53
Capital University of Science and Technology, Islamabad Department of Computer Science
Figure 3.27: Restaurant Service Details Management

54
Capital University of Science and Technology, Islamabad Department of Computer Science
Figure 3.28: Customer Checkout Details Management

55
Capital University of Science and Technology, Islamabad Department of Computer Science
Figure 3.29: Login Page for Receptionist

56
Capital University of Science and Technology, Islamabad Department of Computer Science
Chapter 4

Software Development
4.1. Coding Standards
As our project is web based enterprise application, user interfaces are designed in HTML, so our
code html tags like body, td, tr, input etc. For server side scripting, backend coding and for
database transactions, we used SQL and PHP.

4.2. Development Environment


Up till now we used Xammp control panel and phpmyadmin database in order to create our
database because XAMPP has the ability to serve web pages on the World Wide Web. A special
tool is provided to password-protect the most important parts of the package. XAMPP also
provides support for creating and manipulating databases in SQLite among others.. For coding
we used Visual Studio and Notepad++ because both are Open Source and Free Submit bug
reports and feature requests.Hand in bugfixes and patches. Do online support.

4.3. Software Description


This section contains our html codes integrated with PHP and SQL.

Owner
Home
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "
http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns=" http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta name="keywords" content="" />
<meta name="description" content="" />
<link href="style.css" rel="stylesheet" type="text/css" media="screen" />
<title>hotel operational system </title>

</head>
<body>
<div id="header">
<div id="logo">

<h1>ROYAL HOTEL</h1>

</div>
<div id="menu">
<ul>

57
Capital University of Science and Technology, Islamabad Department of Computer Science
<li class="first"><a href="home.html" accesskey="1" title="">HOME</a></li>
<li><a href="index1reservation.php" accesskey="2"
title="">RESERVATION</a></li>
<li><a href="index1availabilitystatus.php" accesskey="3"
title="">AVAILABILITY STATUS</a></li>

<li><a href="checkout.html" accesskey="3"


title="">CHECKOUT PAYMENT</a></li>
<li><a href="index1restaurant.php" accesskey="3"
title="">RESTAURANT SERVICE</a></li>

<li><a href="index1checkout.php" accesskey="4"


title="">CHECKOUT DETAILS</a></li>

<li><a href="receptionistlogin (1).html" accesskey="5" title="">LOGOUT</a></li>


</ul>

</div><hr />

<DIV id="page">

<DIV id="content">
<DIV class="post">
<H2 class="title"> Welcome to ROYAL Hotel </H2>
<DIV class="entry">
<P style="font-size:130%">
Royal Hotel Naran is one of the best Hotels located in the Heart of Naran. If
you want royal treatment amidst spectacular mountains, water cascades and rivers, put up at
the Royal Hotel, Naran. The lovely Royal Hotel, Naran is renowned for its personalized
amenities which it offers to its guests. The edifice of the Royal Hotel, Naran is quite imposing
and towers above the lodges in the vicinity.
Royal Hotel, Naran amidst impressive mountains and in close proximity to
the rushing Kunhar River and is truly mesmerizing. Royal Hotel offers 32 rooms comprising
Deluxe, Family Suite & Suite Rooms
</P>

</DIV>

</DIV>

</body>
</html>

58
Capital University of Science and Technology, Islamabad Department of Computer Science
Owner
Room Rates

59
Capital University of Science and Technology, Islamabad Department of Computer Science
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "
http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

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


<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta name="keywords" content="" />
<meta name="description" content="" />
<link href="style.css" rel="stylesheet" type="text/css" media="screen" />
<title>hotel operational system </title>

</head>
<body>
<div id="header">
<div id="logo">
<h1>ROYAL Hotel</h1>
</div>
<div id="menu">
<ul>
<li class="first"><a href="home.html" accesskey="1"
title="">Home</a></li>
<li><a href="setroomrates.html" accesskey="2"
title="">roomrates</a></li>
<li><a href="viewroomrates.html" accesskey="2"
title="">viewroomrates</a></li>
<li><a href="managestaff.html" accesskey="3"
title="">managestaff</a></li>

60
Capital University of Science and Technology, Islamabad Department of Computer Science
<li><a href="viewreports.html" accesskey="4" title="">View
reports</a></li>
<li><a href="ownerlogin.html" accesskey="5" title="">Logout</a></li>
</ul>

</div><hr />

<form name="form2" style="font-size:130%">


<br>
<table align="center">
<tr>
</tr>
<tr>
<td> Room Number:</td>
<td> <input type="text" name="roomno" /> </td>
</tr>

<tr>
<td> Select type:</td>
<td>
<input type="radio" name="type" value="ground" />ground floor
<input type="radio" name="type" value="first floor" />first floor
<input type="radio" name="type" value="second floor" />second
floor
<input type="radio" name="type" value="top floor" />top floor
</td>
</tr>

61
Capital University of Science and Technology, Islamabad Department of Computer Science
<tr>
<td>Bedroom Type:</td>
<td>
<input type="radio" name="room" value="delux" /> delux
<input type="radio" name="room" value="family" /> family
</td>
</tr>

<tr>
<td> ROOMRATES: </td>
<td> <input type="text" name="name" /> </td>
</tr>
<input type="hidden" name="choice" value="addroomsrates" />
<tr>
<td>
<input type="submit" value="submit" />
</td>
</tr>

62
Capital University of Science and Technology, Islamabad Department of Computer Science
</table>
</form>

</div>
</body>
</html>

Owner
View Room Rates
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "
http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns=" http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta name="keywords" content="" />
<meta name="description" content="" />
<link href="style.css" rel="stylesheet" type="text/css" media="screen" />
<title>hotel operational system </title>

</head>
<body>

63
Capital University of Science and Technology, Islamabad Department of Computer Science
<div id="header">
<div id="logo">
<h1>ROYAL Hotel</h1>
</div>
<div id="menu">
<ul>
<li class="first"><a href="home.html" accesskey="1"
title="">Home</a></li>
<li><a href="setroomrates.html" accesskey="2"
title="">roomrates</a></li>
<li><a href="viewroomrates.html" accesskey="2"
title="">viewroomrates</a></li>
<li><a href="managestaff.html" accesskey="3"
title="">managestaff</a></li>
<li><a href="viewreports.html" accesskey="4" title="">View
reports</a></li>
<li><a href="ownerlogin.html" accesskey="5" title="">Logout</a></li>
</ul>

</div><hr />

<form name="form3" style="font-size:130%">

<table align="center" style="width:100%" border="1px,solidblack" font-


size= 130%>

<tr style="font-size:130%">
<td>roomtype</td>
64
Capital University of Science and Technology, Islamabad Department of Computer Science
<td> groundfloor:</td>
<td> firstfloor </td>
<td>secondfloor</td>
<td>topfloor</td>
<td>room rates</td>
</tr>

<tr>
<td> delux:</td>

</tr>

<tr>
<td>family</td>

</tr>

</table>
</form>

</div>
</body>
</html>

65
Capital University of Science and Technology, Islamabad Department of Computer Science
Owner
Manage Staff
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "
http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

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


<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta name="keywords" content="" />
<meta name="description" content="" />
<link href="style.css" rel="stylesheet" type="text/css" media="screen" />
<title>hotel operational system </title>

</head>
<body>
<div id="header">
<div id="logo">
<h1>ROYAL Hotel</h1>
</div>
<div id="menu">
<ul>
<li class="first"><a href="home.html" accesskey="1"
title="">Home</a></li>
<li><a href="setroomrates.html" accesskey="2"
title="">roomrates</a></li>
<li><a href="viewroomrates.html" accesskey="2"
title="">viewroomrates</a></li>
<li><a href="managestaff.html" accesskey="3"
title="">managestaff</a></li>

66
Capital University of Science and Technology, Islamabad Department of Computer Science
<li><a href="viewreports.html" accesskey="4" title="">View
reports</a></li>
<li><a href="ownerlogin.html" accesskey="5" title="">Logout</a></li>

</ul>

</div><hr />

<form name="form4" style="font-size:130%">

<br>
<label for="fname">First name:</label><br>
<input type="text" id="fname" name="fname"><br>
<label for="lname">Last name:</label><br>
<input type="text" id="lname" name="lname"><br>
<label for="gender">GENDER</label><br>
<input type="radio" id="male" name="gender" value="male">
<label for="male">Male</label><br>
<input type="radio" id="female" name="gender" value="female">
<label for="female">Female</label><br>
<input type="radio" id="other" name="gender" value="other">
<label for="other">Other</label><br>
<label for="address">address:</label><br>
<input type="text" id="address" name="address"><br>
<label for="CNICNO">CNIC#(eg.12345-6789012-3)</label><br>
<input type="text" id="cnic" name="cnic"><br>
<label for="phoneno">phonenumber:</label><br>
67
Capital University of Science and Technology, Islamabad Department of Computer Science
<input type="text" id="phoneno" name="phoneno"><br>
<label for="qualification">qualification:</label><br>
<input type="file" id="myfile" name="myfile">
<input type="submit" value="Submit">

</form>

</div>
</body>
</html>

68
Capital University of Science and Technology, Islamabad Department of Computer Science
Owner
View Reports
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "
http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

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


<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta name="keywords" content="" />
<meta name="description" content="" />
<link href="style.css" rel="stylesheet" type="text/css" media="screen" />
<title>hotel operational system </title>

</head>
<body>
<div id="header">
<div id="logo">
<h1>ROYAL Hotel</h1>
</div>
<div id="menu">
<ul>
<li class="first"><a href="home.html" accesskey="1"
title="">Home</a></li>
<li><a href="setroomrates.html" accesskey="2"
title="">roomrates</a></li>
<li><a href="viewroomrates.html" accesskey="2"
title="">viewroomrates</a></li>

69
Capital University of Science and Technology, Islamabad Department of Computer Science
<li><a href="managestaff.html" accesskey="3"
title="">managestaff</a></li>
<li><a href="viewreports.html" accesskey="4" title="">View
reports</a></li>
<li><a href="ownerlogin.html" accesskey="5" title="">Logout</a></li>
</ul>

</div><hr />

<form name="form5" style="font-size:130%">


<br>
<label for="report">viewreports:</label><br>
<li><a href="staffreport" accesskey="2"
title="">staffreport</a></li><br>
<li><a href="incomereport" accesskey="2"
title="">incomereport</a></li><br>

</form>

</div>
</body>
</html>

70
Capital University of Science and Technology, Islamabad Department of Computer Science
GM
Login
<!DOCTYPE html>
<html>
<head>
<title></title>
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.4.1/css/all.css"
integrity="sha384-
5sAR7xN1Nv6T6+dT2mhtzEpVJvfS3NScPQTrOxhwjIuvcA67KV2R5Jz6kr4abQsz"
crossorigin="anonymous">
<link href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700"
rel="stylesheet">
<style>
html, body {
min-height: 100%;
}

body, div, form, input, select, p {


padding: 0;
margin: 0;
outline: none;
font-family: Roboto, Arial, sans-serif;
font-size: 16px;
color: #eee;

body {
background: url("royyal.jpeg") no-repeat center;
background-size: cover;
}

h1, h2 {
text-transform: uppercase;
font-weight: 400;
}

h2 {
margin: 0 0 0 8px;
}

.main-block {
display: flex;
flex-direction: column;
justify-content: center;
71
Capital University of Science and Technology, Islamabad Department of Computer Science
align-items: center;
height: 100%;
padding: 25px;
background: rgba(0, 0, 0, 0.5);
}

.left-part, form {
padding: 25px;
}

.left-part {
text-align: center;
}

.fa-graduation-cap {
font-size: 72px;
}

form {
background: rgba(0, 0, 0, 0.7);
}

.title {
display: flex;
align-items: center;
margin-bottom: 20px;

.info {
display: flex;
flex-direction: column;
}

input, select {
padding: 5px;
margin-bottom: 30px;
background: transparent;
border: none;
border-bottom: 1px solid #eee;
}

input::placeholder {
color: #eee;
}

72
Capital University of Science and Technology, Islamabad Department of Computer Science
option:focus {
border: none;
}

option {
background: black;
border: none;
}

.checkbox input {
margin: 0 10px 0 0;
vertical-align: middle;
}

.checkbox a {
color: #26a9e0;
}

.checkbox a:hover {
color: #85d6de;
}

.btn-item, button {
padding: 10px 5px;
margin-top: 20px;
border-radius: 5px;
border: none;
background: #26a9e0;
text-decoration: none;
font-size: 15px;
font-weight: 400;
color: #fff;
}

.btn-item {
display: inline-block;
margin: 20px 5px 0;
}

button {
width: 100%;
}

button:hover, .btn-item:hover {

73
Capital University of Science and Technology, Islamabad Department of Computer Science
background: #85d6de;
}

@media (min-width: 568px) {


html, body {
height: 100%;
}

.main-block {
flex-direction: row;
height: calc(100% - 50px);
}

.left-part, form {
flex: 1;
height: auto;
}
}
</style>
</head>
<body>
<div class="main-block">
<div class="left-part">
<i class=""></i>
<h1>Royal Hotel, Naran</h1>
<p></p>
<div class="btn-group">

</div>
</div>
<form "action=" /">
<div class="title">
<i class="fas fa-pencil-alt"></i>
<h2>LOGIN</h2>

</div>
<div class="title">

<h2>General Manager</h2>

</div>
<div class="info">
<input class="fname" type="text" name="name" placeholder="username-general
manager">
<input type="password" name="name" placeholder="password">

74
Capital University of Science and Technology, Islamabad Department of Computer Science
</div>
<div class="checkbox">

</div>
<button type="submit" href="/">LOGIN</button>
</form>
</div>
</body>
</html>

GM
Home
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "
http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns=" http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta name="keywords" content="" />
<meta name="description" content="" />
<link href="style.css" rel="stylesheet" type="text/css" media="screen" />
<title>hotel operational system </title>

</head>
<body>
<div id="header">
<div id="logo">

<h1>ROYAL HOTEL</h1>

</div>
75
Capital University of Science and Technology, Islamabad Department of Computer Science
<div id="menu">
<ul>
<li class="first"><a href="ahome.html" accesskey="1" title="">Home</a></li>
<li><a href="viewincome.html" accesskey="2" title="">View Income</a></li>
<li><a href="viewexpenditure.html" accesskey="3" title="">View
Expenditures</a></li>
<li><a href="addexpenditure.html" accesskey="4" title="">Add
Expenditures</a></li>
<li><a href="logout.jsp" accesskey="7" title="">Logout</a></li>
</ul>

</div><hr />
<!-- start page -->
<DIV id="page">
<!-- start content -->
<DIV id="content">
<DIV class="post">
<H2 class="title"> Welcome to ROYAL HOTEL </H2>
<DIV class="entry">
<P>
Royal Hotel Naran is one of the best Hotels located in the Heart of Naran. If
you want royal treatment amidst spectacular mountains, water cascades and rivers, put up at
the Royal Hotel, Naran. The lovely Royal Hotel, Naran is renowned for its personalized
amenities which it offers to its guests. The edifice of the Royal Hotel, Naran is quite imposing
and towers above the lodges in the vicinity.
Royal Hotel, Naran amidst impressive mountains and in close proximity to
the rushing Kunhar River and is truly mesmerizing. Royal Hotel offers 32 rooms comprising
Deluxe, Family Suite & Suite Rooms
</P>

</DIV>

</DIV>
</DIV>
<!-- end content -->
<!-- start sidebar -->
<img style="position:absolute;top:500px;left:5px;" " />

<!-- end sidebar -->


<div style="clear: both;">&nbsp;</div>
</DIV>
<!-- end page -->
</body>
</html>

76
Capital University of Science and Technology, Islamabad Department of Computer Science
GM
Server.php
<?php
session_start();
$db = mysqli_connect('localhost', 'root', '', 'hotelmanagementsystem');

$monthyear="";
$electricitybill="";
$gasbill="";
$earnings="";
$gmusername="";
$gmpassword="";
$update = false;
if (isset($_POST['save'])) {
$monthyear=$_POST['monthyear'];
$electricitybill=$_POST['electricitybill'];
$gasbill=$_POST['gasbill'];

mysqli_query($db, "INSERT INTO expenditures(monthyear,electricitybill,gasbill)+


VALUES ('$monthyear','$electricitybill', '$gasbill')");
$_SESSION['message'] = "Record saved!";
header('location: viewexpenditure.php');

}
if (isset($_POST['save'])) {
$monthyear=$_POST['monthyear'];
$earnings=$_POST['earnings'];

mysqli_query($db, "INSERT INTO income(monthyear,earnings)+


VALUES ('$monthyear','$earnings')");
$_SESSION['message'] = "Record saved!";
header('location: viewincome.php');

}
if (isset($_POST['save'])) {
$gmusername=$_POST['gmusername'];
$gmpassword=$_POST['gmpassword'];

mysqli_query($db, "INSERT INTO gmlogin(gmusername,gmpassword)+


VALUES ('$gmusername','$gmpassword')");
$_SESSION['message'] = "Record saved!";
header('location: gmlogin.php');

77
Capital University of Science and Technology, Islamabad Department of Computer Science
}

//change for today task


if (isset($_GET['del'])) {
$gmusername = $_GET['del'];

mysqli_query($db, "DELETE FROM gmlogin WHERE gmusername=$gmusername");


$_SESSION['message'] = "Record deleted!";
header('location: index.php');
}
//change for today task

if (isset($_POST['update'])) {
$id = $_POST['id'];
$name = $_POST['name'];
$student_dept = $_POST['dept'];

mysqli_query($db, "UPDATE student SET std_name ='$name',


std_department='$student_dept' WHERE std_id=$id");
$_SESSION['message'] = "Record updated!";
header('location: index.php');
}

?>

GM
View Income
<?php error_reporting(E_ERROR | E_PARSE);?>
<?php include('server.php'); ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "
http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

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


<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta name="keywords" content="" />
<meta name="description" content="" />
<link href="style.css" rel="stylesheet" type="text/css" media="screen" />
<title>hotel operational system </title>
<style>
table, th, td {
border: 1px solid white;
font-size:30px;
78
Capital University of Science and Technology, Islamabad Department of Computer Science
color:white;
align:center;
}
#menu a:hover {
text-decoration: none;
background: #619E00;
padding: 9px 20px;
}
</style>

</head>
<body>
<div id="header">
<div id="logo">
<h1 style="color:white">Royal Hotel</h1><br/>

</div>
<h2 style="color:black; text-align:center">Income Details</h2>

<?php $results = mysqli_query($db, "SELECT * FROM income");?>


<table style="width:100%" align="center">
<tr>
<th>Month/Year</th>
<th>Earnings</th>

</tr>
<?php while ($row = mysqli_fetch_array($results)) { ?>
<tr>
<td><?php echo $row['monthyear']; ?></td>
<td><?php echo $row['earnings']; ?></td>

</tr>
<?php } ?>
<tr>
<td></td>
<td></td>

</tr>
<tr>
<td></td>
<td></td>

79
Capital University of Science and Technology, Islamabad Department of Computer Science
</tr>

</table>
<div id="menu">
<ul>

<li><a href="" accesskey="7" title="">Send Income Report</a></li>


</ul>

</div>

</div>
<!-- end page -->
</body>
</html>

GM
Add Expenditures
<?php error_reporting(E_ERROR | E_PARSE);?>
<?php include('server.php'); ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "
http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html >
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta name="keywords" content="" />
<meta name="description" content="" />
<link href="style.css" rel="stylesheet" type="text/css" media="screen" />

<title>hotel operational system </title>

<style>

</style>
</head>
80
Capital University of Science and Technology, Islamabad Department of Computer Science
<body>
<?php if (isset($_SESSION['message'])): ?>
<div class="msg">
<?php
echo $_SESSION['message'];
unset($_SESSION['message']);
?>
</div>
<?php endif ?>
<div id="header">
<div id="logo">
<h1>ROYAL Hotel</h1>
</div>
<div id="menu">

</div><hr />

<form method="post" action="server.php" name="form4" style="font-size:130%">

<br>
<table align="center">
<tr>
<td for="fname">Enter Month and Year:</td><br>
<td><input type="text" id="myear" name="myear"></td></tr><br>
<tr><td for="lname">Enter Electricity Bill:</td><br>
<td><input type="text" id="eb" name="eb"></td></tr><br>
<tr><td for="lname">Enter Gas Bill:</td><br>
<td><input type="text" id="gb" name="gb"></td></tr><br>
<tr>
<td><input type="submit" value="Add Bill(s)"></td></tr>
</table>
</form>

</div>
</body>
</html>

Receptionist
Home
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "
http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns=" http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
81
Capital University of Science and Technology, Islamabad Department of Computer Science
<meta name="keywords" content="" />
<meta name="description" content="" />
<link href="style.css" rel="stylesheet" type="text/css" media="screen" />
<title>hotel operational system </title>

</head>
<body>
<div id="header">
<div id="logo">

<h1>ROYAL HOTEL</h1>

</div>
<div id="menu">
<ul>
<li class="first"><a href="staffhome.html" accesskey="1" title="">Home</a></li>
<li><a href="addstaff.html" accesskey="2" title="">Add_Staff</a></li>
<li><a href="managestaff.html" accesskey="3" title="">Staff Details</a></li>
<li><a href="viewreports.html" accesskey="4" title="">Send reports</a></li>
<li><a href="logout.html" accesskey="5" title="">Logout</a></li>
</ul>

</div><hr />

<DIV id="page">

<DIV id="content">
<DIV class="post">
<H2 class="title"> Welcome to ROYAL Hotel </H2>
<DIV class="entry">
<P>
Royal Hotel Naran is one of the best Hotels located in the Heart of Naran. If
you want royal treatment amidst spectacular mountains, water cascades and rivers, put up at
the Royal Hotel, Naran. The lovely Royal Hotel, Naran is renowned for its personalized
amenities which it offers to its guests. The edifice of the Royal Hotel, Naran is quite imposing
and towers above the lodges in the vicinity.
Royal Hotel, Naran amidst impressive mountains and in close proximity to
the rushing Kunhar River and is truly mesmerizing. Royal Hotel offers 32 rooms comprising
Deluxe, Family Suite & Suite Rooms
</P>

</DIV>

</DIV>
</DIV>

82
Capital University of Science and Technology, Islamabad Department of Computer Science
<!-- end content -->
<!-- start sidebar -->
<img style="position:absolute;top:500px;left:5px;" " />

<!-- end sidebar -->


<div style="clear: both;">&nbsp;</div>
</DIV>
<!-- end page -->
</body>
</html>

Staff Manager
Add Staff Timings
<?php error_reporting(E_ERROR | E_PARSE);?>
<?php include('staffserver.php'); ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "
http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html >
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta name="keywords" content="" />
<meta name="description" content="" />
<link href="style.css" rel="stylesheet" type="text/css" media="screen" />

<title>hotel operational system </title>

</head>
<body>
<?php if (isset($_SESSION['message'])): ?>
<div class="msg">
<?php
echo $_SESSION['message'];
unset($_SESSION['message']);
?>
</div>
<?php endif ?>
<div id="header">
<div id="logo">
<h1>ROYAL Hotel</h1>
</div>
<div id="menu">

83
Capital University of Science and Technology, Islamabad Department of Computer Science
</div><hr />

<form method="post" action="staffserver.php" name="form4" style="font-


size:130%">

<br>
<label for="date">Date:</label><br>
<input type="text" id="date" name="date"><br>
<label for="employeeid">Employee ID:</label><br>
<input type="text" id="employeeid" name="employeeid"><br>
<label for="employeename">Employee Name:</label><br>
<input type="text" id="employeename" name="employeename"><br>
<label for="gender">GENDER</label><br>
<input type="radio" id="male" name="gender" value="male">
<label for="male">Male</label><br>
<input type="radio" id="female" name="gender" value="female">
<label for="female">Female</label><br>
<input type="radio" id="other" name="gender" value="other">
<label for="other">Other</label><br>
<label for="employeeentrytime">Entry Time:</label><br>
<input type="text" id="employeeentrytime" name="employeeentrytime"><br>
<label for="employeeexittime">Exit Time:</label><br>
<input type="text" id="employeeexittime" name="employeeexittime"><br>
<label for="employeedutyhours">Performed Duty Hours:</label><br>
<input type="text" id="employeedutyhours" name="employeedutyhours"><br>
<label for="employeeposition">Position:</label><br>
<input type="text" id="employeeposition" name="employeeposition"><br>

<input type="submit" value="Submit">

</form>

</div>
</body>
</html>

Staff Manager
View Staff Duty Timing Details
<?php error_reporting(E_ERROR | E_PARSE);?>
<?php include('staffserver.php'); ?>
<!DOCTYPE html PUBLIC "-//W3C//Dth XHTML 1.0 Strict//EN" "
http://www.w3.org/TR/xhtml1/Dth/xhtml1-strict.dth">

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


84
Capital University of Science and Technology, Islamabad Department of Computer Science
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta name="keywords" content="" />
<meta name="description" content="" />
<link href="style.css" rel="stylesheet" type="text/css" media="screen" />
<title>hotel operational system </title>

<script type="text/javascript">
function validate() {

flag = false;

for (i = 0; i < document.form3.type.length; i++) {


if (document.form3.type[i].checked) {
flag = true;
}

if (!flag) {
alert("Please select type");
return false;
}

flag1 = false;

for (i = 0; i < document.form3.room.length; i++) {


if (document.form3.room[i].checked) {
flag1 = true;
}

if (!flag1) {
alert("Please select bed room type");
return false;
}

85
Capital University of Science and Technology, Islamabad Department of Computer Science
var selectedOption = form3.room.selectedIndex;
if (selectedOption == 0) {
flag2 = false;
alert("Please select a room");
return false;
}
}

</script>
<style>
table, th, th,td {
border: 1px solid white;
font-size:30px;
color:white;
align:center;
}
</style>
</head>
<body>
<div id="header">
<div id="logo">
<h1>ROYALHotel</h1>

</div>
<div id="menu">

</div><hr />

</div>

<?php $results = mysqli_query($db, "SELECT * FROM staffdutytiminghours");?>


<table style="width:100%" align="center">
<h2 style="text-align:center">Staff Timings</h2>
<tr>

<th> Date</th>

<th> Employee ID</th>

86
Capital University of Science and Technology, Islamabad Department of Computer Science
<th> Employee Name</th>

<th>Gender</th>

<th> Entry Time </th>

<th> Exit Time</th>


<th> Performed Duty Hours </th>
<th> Position </th>

</tr>
<?php while ($row = mysqli_fetch_array($results)) { ?>
<tr>
<td><?php echo $row['employeedate']; ?></td>
<td><?php echo $row['employeeid']; ?></td>
<td><?php echo $row['employeename']; ?></td>
<td><?php echo $row['employeegender']; ?></td>
<td><?php echo $row['employeeentrytime']; ?></td>
<td><?php echo $row['employeeexittime']; ?></td>
<td><?php echo $row['employeeperformeddutyhours']; ?></td>
<td><?php echo $row['employeeposition']; ?></td>

</tr>
<?php } ?>
<tr>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>

</tr>
<tr>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>

87
Capital University of Science and Technology, Islamabad Department of Computer Science
<td></td>
<td></td>

</tr>

</table>
</div>
<!-- end page -->
</body>
</html>

Staff Manager
Server.php
<?php
session_start();
$db = mysqli_connect('localhost', 'root', '', 'hotelmanagementsystem');

$employeedate="";
$employeeid="";
$employeename="";
$employeegender="";
$employeeentrytime="";
$employeeexitime="";
$employeeperformeddutyhours="";
$employeeposition="";

$update = false;
if (isset($_POST['save'])) {
$employeedate=$_POST['employeedate'];
$employeeid=$_POST['employeeid'];
$employeename=$_POST['employeename'];
$employeegender=$_POST['employeegender'];
88
Capital University of Science and Technology, Islamabad Department of Computer Science
$employeeentrytime=$_POST['employeeentrytime'];
$employeeexitime=$_POST['employeeexitime'];
$employeeperformeddutyhours=$_POST['employeeperformeddutyhours'];
$employeeposition=$_POST['employeeposition'];

mysqli_query($db, "INSERT INTO


staffdutytiminghours(employeedate,employeeid,employeename,employeegender,employeeentr
ytime,employeeexitime,employeeperformeddutyhours,employeeposition)+
VALUES ('$employeedate','$employeeid', '$employeename',
'$employeegender','$employeeentrytime',
'$employeeexitime','$employeeperformeddutyhours','$employeeposition')");
$_SESSION['message'] = "Record saved!";
header('location: viewroomdetails.php');

if (isset($_POST['save'])) {
$staffmanagerusername=$_POST['staffmanagerusername'];
$staffmanagerpassword=$_POST['staffmanagerpassword'];

mysqli_query($db, "INSERT INTO


staffmanagerlogin(staffmanagerusername,staffmanagerpassword)+
VALUES ('$staffmanagerusername','$staffmanagerpassword')");
$_SESSION['message'] = "Record saved!";
header('location: receptionistlogin.php');

//change for today task


if (isset($_GET['del'])) {
$id = $_GET['del'];
mysqli_query($db, "DELETE FROM student WHERE std_id=$id");
$_SESSION['message'] = "Record deleted!";
header('location: index.php');
}
//change for today task

if (isset($_POST['update'])) {
$id = $_POST['id'];
$name = $_POST['name'];
$student_dept = $_POST['dept'];

89
Capital University of Science and Technology, Islamabad Department of Computer Science
mysqli_query($db, "UPDATE student SET std_name ='$name',
std_department='$student_dept' WHERE std_id=$id");
$_SESSION['message'] = "Record updated!";
header('location: index.php');
}

?>

Receptionist
Add Reservation
<?php error_reporting(E_ERROR | E_PARSE);?>
<?php include('server.php'); ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "
http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

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


<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta name="keywords" content="" />
<meta name="description" content="" />
<link href="style.css" rel="stylesheet" type="text/css" media="screen" />
<title>hotel operational system </title>

</head>
<body>

<?php if (isset($_SESSION['message'])): ?>


<div class="msg">
<?php
echo $_SESSION['message'];
unset($_SESSION['message']);
?>
</div>
<?php endif ?>
<div id="header">
<div id="logo">
<h1>ROYAL Hotel</h1><br/>

</div>

<div id="menu">

90
Capital University of Science and Technology, Islamabad Department of Computer Science
</div><hr />

</div><hr />

<form method="post" action="server.php" name="form2" style="font-size:130%">


<br>

<table align="center">
<tr>
<td><h2>Add Resrvation and Customer Details</h2></td>
</tr>
<tr>
<td> Room Number:</td>
<td> <input type="text" name="roomno" /> </td>
</tr>

<tr>
<td> Select type:</td>
<td>
<input type="radio" name="type" value="ground" />ground floor
<input type="radio" name="type" value="first floor" />first floor
<input type="radio" name="type" value="second floor" />second floor
<input type="radio" name="type" value="top floor" />top floor
</td>
</tr>

<tr>
<td>Bedroom Type:</td>
<td>
<input type="radio" name="room" value="delux" /> delux
<input type="radio" name="room" value="family" /> family
</td>
</tr>

<tr>
<td> customer name: </td>
<td> <input type="text" name="name" /> </td>
</tr>
<tr>
<td> CNIC/PASSPORT </td>
<td> <input type="text" name="name" /> </td>
</tr>
<tr>

91
Capital University of Science and Technology, Islamabad Department of Computer Science
<td> address: </td>
<td> <input type="text" name="name" /> </td>
</tr>
<tr>
<td> phone no: </td>
<td> <input type="text" name="name" /> </td>
</tr>
<tr>
<td> no of customer: </td>
<td> <input type="text" name="name" /> </td>
</tr>
<tr>
<td> vehical no: </td>
<td> <input type="text" name="name" /> </td>
</tr>
<tr>
<td> Checkin Date/Time: </td>
<td> <input type="text" name="name" /> </td>
</tr>

<input type="hidden" name="choice" value="addrates" />


<tr>
<td>
<input type="submit" value="Add Reservation" />
</td>
</tr>

</table>
</form>

</div>
<!-- end page -->

92
Capital University of Science and Technology, Islamabad Department of Computer Science
</body>
</html>

Receptionist
View Reservation Details
<?php error_reporting(E_ERROR | E_PARSE);?>
<?php include('server.php'); ?>
<!DOCTYPE html PUBLIC "-//W3C//Dth XHTML 1.0 Strict//EN" "
http://www.w3.org/TR/xhtml1/Dth/xhtml1-strict.dth">

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


<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta name="keywords" content="" />
<meta name="description" content="" />
<link href="style.css" rel="stylesheet" type="text/css" media="screen" />
<title>hotel operational system </title>

<script type="text/javascript">
function validate() {

flag = false;

for (i = 0; i < document.form3.type.length; i++) {


if (document.form3.type[i].checked) {
flag = true;
}

if (!flag) {
alert("Please select type");
return false;
}

flag1 = false;

for (i = 0; i < document.form3.room.length; i++) {


if (document.form3.room[i].checked) {
flag1 = true;
}

93
Capital University of Science and Technology, Islamabad Department of Computer Science
}

if (!flag1) {
alert("Please select bed room type");
return false;
}

var selectedOption = form3.room.selectedIndex;


if (selectedOption == 0) {
flag2 = false;
alert("Please select a room");
return false;
}
}

</script>
<style>
table, th, th,td {
border: 1px solid white;
font-size:30px;
color:white;
align:center;
}
</style>
</head>
<body>
<div id="header">
<div id="logo">
<h1>ROYALHotel</h1>

</div>
<div id="menu">

</div><hr />

</div>

<?php $results = mysqli_query($db, "SELECT * FROM roomratesandcustomerdetails");?>


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

94
Capital University of Science and Technology, Islamabad Department of Computer Science
<h2 style="text-align:center">Reservation Details</h2>
<tr>

<th> Room Number</th>

<th> Room type</th>

<th> Beroom Type</th>

<th> Customer Name </th>

<th> CNIC/Passport </th>

<th> Address </th>


<th> Phone No. </th>
<th> No. Of Customers </th>
<th> Vehicle No. </th>
<th> Checkin Date/Time </th>
</tr>
<?php while ($row = mysqli_fetch_array($results)) { ?>
<tr>
<td><?php echo $row['roomnumber']; ?></td>
<td><?php echo $row['floornumber']; ?></td>
<td><?php echo $row['bedroomtype']; ?></td>
<td><?php echo $row['roomrates']; ?></td>
<td><?php echo $row['customername']; ?></td>
<td><?php echo $row['customercnicpassport']; ?></td>
<td><?php echo $row['customeraddress']; ?></td>
<td><?php echo $row['customerphonenumber']; ?></td>
<td><?php echo $row['numberofcustomers']; ?></td>
<td><?php echo $row['vehiclenumber']; ?></td>
<td><?php echo $row['checkindatetime']; ?></td>
</tr>
<?php } ?>
<tr>
<td></td>
<td></td>
<td></td>
<td></td>

95
Capital University of Science and Technology, Islamabad Department of Computer Science
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>

</table>
</div>
<!-- end page -->
</body>
</html>

Receptionist
Server.php
<?php
session_start();
$db = mysqli_connect('localhost', 'root', '', 'hotelmanagementsystem');

$roomnumber="";
$floornumber="";
$bedroomtype="";
$roomrates="";
96
Capital University of Science and Technology, Islamabad Department of Computer Science
$customername="";
$customercnicpassport="";
$customeraddress="";
$customerphonenumber="";
$numberofcustomers="";
$vehiclenumber="";
$checkindatetime="";

$roomnumber="";
$availabilitystatus="";

$foodname="";
$quantity="";
$price="";
$ordernumber="";
$service="";

$receptionistusername="";
$receptionistpassword="";

$roomrate="";
$restaurantbill="";
$total="";
$status="";
$datetime="";

$update = false;
if (isset($_POST['save'])) {
$roomnumber=$_POST['roomnumber'];
$floornumber=$_POST['floornumber'];
$bedroomtype=$_POST['bedroomtype'];
$roomrates=$_POST['roomrates'];
$customername=$_POST['customername'];
$customercnicpassport=$_POST['customercnicpassport'];
$customeraddress=$_POST['customeraddress'];
$customerphonenumber=$_POST['customerphonenumber'];
$numberofcustomers=$_POST['numberofcustomers'];
$vehiclenumber=$_POST['vehiclenumber'];
$checkindatetime=$_POST['checkindatetime'];

mysqli_query($db, "INSERT INTO


roomratesandcustomerdetails(roomnumber,floornumber,bedroomtype,roomrates,customernam

97
Capital University of Science and Technology, Islamabad Department of Computer Science
e,customercnicpassport,customeraddress,customerphonenumber,numberofcustomers,vehiclenu
mber,checkindatetime)+
VALUES ('$roomnumber','$floornumber', '$bedroomtype',
'$roomrates','$customername',
'$customercnicpassport','$customeraddress','$customerphonenumber',
'$numberofcustomers','$vehiclenumber','$checkindatetime')");
$_SESSION['message'] = "Record saved!";
header('location: viewroomdetails.php');

}
if (isset($_POST['save'])) {
$roomnumber=$_POST['roomnumber'];
$availabilitystatus=$_POST['availabilitystatus'];

mysqli_query($db, "INSERT INTO roomstatus(roomnumber,availabilitystatus)+


VALUES ('$roomnumber','$availabilitystatus')");
$_SESSION['message'] = "Record saved!";
header('location: viewincome.php');

if (isset($_POST['save'])) {
$roomnumber=$_POST['roomnumber'];
$foodname=$_POST['foodname'];
$quantity=$_POST['quantity'];
$price=$_POST['price'];
$ordernumber=$_POST['ordernumber'];
$service=$_POST['service'];

mysqli_query($db, "INSERT INTO


restaurant(roomnumber,foodname,quantity,price,ordernumber,service)+
VALUES ('$roomnumber','$foodname','$quantity','$price','$ordernumber','$service')");
$_SESSION['message'] = "Record saved!";
header('location: viewincome.php');

if (isset($_POST['save'])) {
$roomnumber=$_POST['roomnumber'];
$customername=$_POST['customername'];
$customercnicpassport=$_POST['customercnicpassport'];

98
Capital University of Science and Technology, Islamabad Department of Computer Science
$roomrate=$_POST['roomrate'];
$restaurantbill=$_POST['restaurantbill'];
$total=$_POST['total'];
$status=$_POST['status'];
$datetime=$_POST['datetime'];

mysqli_query($db, "INSERT INTO


checkoutdetails(roomnumber,customername,customercnicpassport,roomrate,restaurantbill,tota
l,status,datetime)+
VALUES
('$roomnumber','$customername','$customercnicpassport','$roomrate','$restaurantbill','$total','$
status','$datetime')");
$_SESSION['message'] = "Record saved!";
header('location: viewincome.php');

if (isset($_POST['save'])) {
$receptionistusername=$_POST['receptionistusername'];
$receptionistpassword=$_POST['receptionistpassword'];

mysqli_query($db, "INSERT INTO


receptionistlogin(receptionistlogin,receptionistpassword)+
VALUES ('$receptionistusername','$receptionistpassword')");
$_SESSION['message'] = "Record saved!";
header('location: receptionistlogin.php');

//change for today task


if (isset($_GET['del'])) {
$id = $_GET['del'];
mysqli_query($db, "DELETE FROM student WHERE std_id=$id");
$_SESSION['message'] = "Record deleted!";
header('location: index.php');
}
//change for today task

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

99
Capital University of Science and Technology, Islamabad Department of Computer Science
$id = $_POST['id'];
$name = $_POST['name'];
$student_dept = $_POST['dept'];

mysqli_query($db, "UPDATE student SET std_name ='$name',


std_department='$student_dept' WHERE std_id=$id");
$_SESSION['message'] = "Record updated!";
header('location: index.php');
}

?>

100
Capital University of Science and Technology, Islamabad Department of Computer Science
Chapter 5

Software Testing
5.1. Testing Methodology
We have planned to do unit testing of this system in which different individual modules are

tested.

5.2. Testing Environment


Our system is a web based database application, it seems to have different individual
modules, components, UIs that’s why we chosen unit testing, we performed this test because
we want to validate that each component of our software performs as expected.

5.3. Test Cases


Table 5.1: Test Case 1
Date: 28 April 2021
System: Hotel Management(Receptionist UI)
Objective: Print Customer Bill Receipt Test ID:1
Version:1 Test Type: Unit testing
Input:
Room Number=15
Customer Name=Ali
Customer CNIC/Passport=61101-18888888-9
Room Rent=8000

101
Capital University of Science and Technology, Islamabad Department of Computer Science
Restaurant Bill=8000
Total Bill=16000
Expected Result: Print Customer Bill Receipt
Actual Result: Successfully printed (passed)

Table 5.2: Test Case 2


Date: 28 April 2021
System: Hotel Management(General Manager UI)
Objective: Add Income details Test ID:2
Version:1 Test Type: Unit testing
Input:
Month/Year=June 2021
Earnings=PKR 200000
Expected Result: Successfully add income details and show in table below.
Actual Result: Successfully added and showed (passed)

Table 5.3: Test Case 3


Date: 28 April 2021
System: Hotel Management(Owner UI)
Objective: View Income Details Test ID:3
Version:1 Test Type: Unit testing
Input: Click on view income report

Expected Result: Successfully show income details.


Actual Result: Successfully showed (passed)

102
Capital University of Science and Technology, Islamabad Department of Computer Science
Chapter 6

Software Deployment

6.1 Installation / Deployment Process Description


We have deployed/hosted our web application using 000webhostapp hosting service

having domain name https://hoteloperationsystem123.000webhostapp.com/ , as shown in

screenshots below.

Figure 6.1: Installation/Deployment

103
Capital University of Science and Technology, Islamabad Department of Computer Science
Figure 6.2: Installation/Deployment

104
Capital University of Science and Technology, Islamabad Department of Computer Science
Figure 6.3: Installation/Deployment

105
Capital University of Science and Technology, Islamabad Department of Computer Science
Figure 6.4: Installation/Deployment

106
Capital University of Science and Technology, Islamabad Department of Computer Science
Figure 6.5: Installation/Deployment

107
Capital University of Science and Technology, Islamabad Department of Computer Science
Figure 6.6: Installation/Deployment

108
Capital University of Science and Technology, Islamabad Department of Computer Science
Figure 6.7: Installation/Deployment

109
Capital University of Science and Technology, Islamabad Department of Computer Science
Figure 6.8: Installation/Deployment

110
Capital University of Science and Technology, Islamabad Department of Computer Science
Figure 6.9: Installation/Deployment

111
Capital University of Science and Technology, Islamabad Department of Computer Science
REPORT APPROVAL CERTIFICATE
The report of the project, “Hotel Management System” has been approved based on the
following evaluation guideline.

Project Evaluation Guidelines


Artifacts Guidelines
Analysis and Design artifacts are syntactically correct (use-case model,
SSDs, domain model, class diagram, SDs, ERDs, Flow charts, Activity
Diagram, DFDs)
Consistency and traceability have been maintained among different artifacts
General Guidelines
Formatting (font style, indentation) is according to the FYP template and
consistent throughout the document
Captions are added to all the figures and tables. Figure captions must be
placed below each figure, and table captions must be provided above the
table
Each figure or table is followed by some text describing what it represents

____________________ ____________________ ____________________


Name & Signature Name & Signature Name & Signature
(Examiner 1) (Examiner 2) (Examiner3)

_________________
Name & Signature
(Supervisor)

112
Capital University of Science and Technology, Islamabad Department of Computer Science
References
Book
Crad Larman, Applying UML and Patterns. 3rd Edition

113
Capital University of Science and Technology, Islamabad Department of Computer Science
114
Capital University of Science and Technology, Islamabad Department of Computer Science

You might also like