0% found this document useful (0 votes)
545 views160 pages

PG Complete

The document describes a project titled "PG for Me" that aims to make it easier for users to find paying accommodation nearby their workplaces. The project involves developing a website where users can register, search listings posted by owners, view property details, and contact owners. It will be developed using PHP, HTML, CSS, and MySQL. The document outlines the objectives, categories, languages to be used, program structure, data structure, future scope and system requirements for the project. It provides details on the admin, owner and user modules and functions.

Uploaded by

Prateek Raikar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
545 views160 pages

PG Complete

The document describes a project titled "PG for Me" that aims to make it easier for users to find paying accommodation nearby their workplaces. The project involves developing a website where users can register, search listings posted by owners, view property details, and contact owners. It will be developed using PHP, HTML, CSS, and MySQL. The document outlines the objectives, categories, languages to be used, program structure, data structure, future scope and system requirements for the project. It provides details on the admin, owner and user modules and functions.

Uploaded by

Prateek Raikar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 160

SYNOPSIS

Group Members Register number


Prateek Raikar 171605054

Prasad Shet 171605053

Sharadh Hegde 171605064

1.1 TITLE OF THE PROJECT:


“PG FOR ME”

1.2 OBJECTIVE OF THE PROJECT:


It has become difficult to search PG accommodation nearby the work place.
But now it has become easier to find an accommodation nearby the work place in
cheap rates. In this system, users can find a number of paying accommodation
nearby work place. In this system user can register to get login id and password.
The uploaded post can be removed or deleted. User can also see for the paying
accommodation and after getting the desirable place he/she can select the place
he/she is interested in. After selecting the desired place, user will get the personal
details of the owner, he/she can get in contact with the owner for more details like
Dimensions and go for further processing.

1.3Project category:
Web Development

1.4Languages to be used:
Front-End – PHP, HTML, CSS.

Back-End – MYSQL.

1.5 Structure of the Program


1.5.1 Analysis
When this paying accommodation portal system will be implemented users and PG
owners can easily access online accommodation system and searching for
accommodation will be very faster.

1
The system should accurately perform accommodation registration, user validation,
report generation and search.The system is designed for a user friendly environment so
that student and house owners can perform the various tasks easily and in an effective
way.

1.5.2Module Description
1.5.2.1Admin Module
1. Dashboard: In this section, admin can see all detail in brief like total state, total
city, total owner and total pg.
2. State: In this section, admin can manage state(add/update).
3. City: In this section, admin can manage city(add/update).
4. Reg Owner: In this section, admin can view and edit registered owner.
5. PG Details: In this section, admin can view pg detail which is listed by pg
owner.
6. Pages: In this section, admin can manage about us and contact us pages.

1.5.2.2 PG Owner Module


1. Dashboard: In this section, owner can see all detail in brief like total listed pg,
total booking, total new booking, total confirmed booking and total canceled
booking.
2. List Your PG: In this section, owner can list their pg.
3. Received Booking Request: In this section admin can view new booking and he
has right to confirmed booking.
4. Search: In this section, owner can search booking request by booking number.
5. Notification: In this owner can see new notification of booking.

1.5.2.3 User Module


1.Book the pg.

2.Update his/hers own profile.

3.Change Password.

4.Registered user can also recover his/her own password

1.6 Data structure


Admin:
• User id
• Password

2
• Add state
• Manage state
• Add city
• Manage city
• Reg owner
• Pg details
• Pages
Owner:
• User id
• Password
• List your pg
• Received booking request
User :
• View pg
• Book the pgroom
• User vcdx
1.7Future Scope
Sharing Room for two or more persons. Access of commercial properties. Lease of
House Uploading, Land, Flats.
recent photos.

3
2 SYSTEM REQUIREMENT SPECIFICATION
2.1 INTRODUCTION
SRS is a document that completely describes what the system should do
without describing how the software will do it. The basic goal of
requirement phase is to produce the limitation for this the user needs keep
changing, as the environment in which the system has function changes
with time. The SRS helps the clients to understand their own needs. SRS is
the prerequisite of a good software.
2.1.1PURPOSE
The Main purpose for preparing this document is to give general insight
towards system analysis and requirements of the existing system. This
document describes various requirements of the software. It is used to give
clear understanding of what all system needs. This document will also
make developer to understand easily. This document specify all the
functional requirements of the software needs to support and performance
requirements of the system, the deign constraints that exist and all the
external interface.

2.1.2 SCOPE
This document plays a major role on the Software Development Life
Cycle (SDLC). As it describes the complete requirements of the system. It
is meant for use by the developer and will be the basic during testing
phase. This Document bridges the communication gap between the
developer and the client. It also establishes the basic agreement between
the developer and the client on what software product will do.

2.1.3 DEFINATIONS, ACRONYMS AND ABBREVIATIONS:


PGFM : PG FOR ME
SRS: Software Requirement Specification
PHP :Hypertext Pre-processor
HTML :Hyper Text Markup Language
CSS : Cascading Style Sheet

2.1.4 REFERENCES:
www.w3school.com
SE textbook
Web development book

4
2.1.5 OVERVIEW:
Our project is designed to create a websitethat is developed for PG searching by
using PHP,MySQL server. This site provides an easy solution for customers to
search the best and fulfil their needs for PG.This proposed website can be used by
any users and it does not require anyeducational level,experience but it will be of
good use if user has the good knowledge of how to surf through internet.

2.2 OVERALL DESCRIPTION


This section describes the general factors that affect the product and its
requirement.PG FOR ME(PGFM)website enables owner to set up online advertisements
of rooms,customers can browse through the website,and a web developer
providesplatform between owner and userThe website will use the internet as the sole
methodfor online PG searching.
2.2.1 PRODUCT PERSPECTIVE:
This product will be suitable a person who don’t want to visit every rooms as
he/she might not get time for that or might not interested in visiting there and
dealing with lots of formalities.
2.2.2 PRODUCT FUNCTION:
With this Project the user can surf the website by logging in into the
website. Project will display the services which are available, user can take
the information about the PG.
2.2.3 USER CHARACTERISTICS
User should be familiar with the terms like login,register system and browser. Through
a web browser the customers can search for a rooms available and user can register or
login or continue as guest user where later he can register, after this process user can
view available PG rooms and click that particular room for more details.
2.2.4 GENERAL CONSTRAINS
RAM: 512MB
HardDisk: 60GB
Operating system: Windows XP and higher version.
2.2.5 ASSUMPTION AND DEPENDENCIES
It is assumed that the hardware designed will work correctly with the
third-party operating system and the developed software.A customer needs
a system with a browser and the internet.

3.SPECIFIC REQUIREMENTS
This section describes all the details, which software developers should know
while designing and developing the system.
3.1 EXTERNAL INTERFACE REQUIREMENTS
5
The external interface requirement section specifies all the interface of the
software to the people, other software and other system.
3.1.1 USER INTERFACES
The user interface has been specifically designed for customer from to find
affordable PG room.The home page offers a login options with New
Registration, Login, Guest User. User then has to select the city for searching
PG in that particular city. User can select any option and directs to a list of PG
rooms available.Then user can select any of the available room on the list and is
taken to the respective page of room details like room dimensions, address and
contact details of owner. Then user can click on review button that opens review
page where customer can write or read the reviews
3.1.2 HARDWARE INTERFACE
Following are the hardware required for the proposed system
➢ Processor:Intel, AMD
➢ Hard disk : 120GB
➢ RAM : 2GB

3.1.3 SOFTWARE INTERFACE


Following are the software required for the proposed
➢ Web Server :Xampp server
➢ Front End: HTML,CSS
➢ Back End : PHP ,MySQL
➢ OS :Windows XP or higher versions.

3.1.4 COMMUNICATION INTERFACE


User can connect with website using browser and internet once user login user
can easily search PG rooms.
3.2 FUNCTIONAL REQUIREMENTS
Functional requirements specify which output should be produced from
the given inputs. They describe the relationship between the input and output of
the system. for each functional requirement, a detailed description of the data
inputs and their source, the units of the range ofvalid input must be specified.
3.2.1 Admin Module:
3.2.1.1 Login:
➢ Input:
• Username
• Password
➢ Process: It takes the login detail of the admin.

6
➢ Output: Admin can login to the system with valid username and
password, It is used for authentication purpose.

3.2.1.2 Dashboard:
➢ Input:Adding the cite, adding the PG.
➢ Process: Admin can see all the detail in brief like listed city ,listed
owner listed PGs.
➢ Output: Listed cites ,listed PG.

3.2.1.3 Add state:


➢ Input : Adding state.
➢ Process: Admin can add state.
➢ Output: Number of desired state.

3.2.1.4 Manage state:


➢ Input : manage the state.
➢ Process: Admin can edit the state.
➢ Output: cite will be change
3.2.1.5 Add city:
➢ Input : Adding city.
➢ Process: Admin can add city.
➢ Output: Number of desired city.

3.2.1.6 Manage city:


➢ Input : manage the city.
➢ Process: Admin can edit the city.
➢ Output: city well be change.

3.2.1.4 Register owner:


➢ Input : owner well be register .
➢ Process: that register owner detail can view admin .
➢ Output: admin can view the owner details.

3.2.1.4 PG details:
➢ Input : PG details added by owners.
➢ Process: admin can view PG detail which is listed by PG owner.
➢ Output: Admin can view the PG detail.

7
3.2.1.5 Pages:
➢ Input: In this page admin add about and contact details.
➢ Process: the about us and contact detail well add and update.
➢ Output: Phone number,email of the admin will be shown to the
user and owner.

3.2.2OWNER
3.2.2.1 Login:
➢ Input:
• Username
• Password
➢ Process:It takes the login detail of the owner.
➢ Output:Owner can login to the system with valid username and
password

3.2.2.2:Dashboard:
➢ Input:
➢ Process: Owner can list their PG with the details such as
dimensions, cost ,facilities,meals.
➢ Output :Shows all PG details such as dimensions,
cost,facilities,meals provided by the PG owner.

3.2.2.3:List your PG:


➢ Input: owner can add detail about PG.
➢ Process: owner can list his PG detail and what and all facilities are
there. and he also update the PG details.
➢ Output :.owner well add PG details and update the PG datils.

3.2.2.4 Booking Requests:


➢ Input: owner manage the booking process.
➢ Process: owner can view the PG booking requests, confirm the
booking requests , and also cancel the booking request .
➢ Output : .owner well process the booking requests .

3.2.3 USER
3.2.3.1 View PG:
➢ Input: User will select the desired city.
➢ Process: User will search the PG or select the require PG.

8
➢ Output: User can take the information of
the PG and with the help of contact detail he
can contact the owner

3.2.3.2 Register and sign up:


➢ Input:User will clear his/her doubts by
asking queriesto the owner in the comment
box.
➢ Process: User can ask the questions about
information of the PG.
➢ Output: Desired information will be
provided by owner to user.

3.2.3.3 Booking process:


➢ Input: User will select the desired city.
➢ Process: User will search the PG or select the require PG.
3.3 Performance Requirements
It requires internet and more space of RAM to improve the speed of web site.
3.3.1 Static Requirements
Static requirements are those that do not impose constraints on the execution
characteristics of the system. These includes requirements like number of
terminals to be supported and this system supports single user at a time.
3.3.2 Dynamic Requirements
Dynamic requirements specify constraints on the execution behavior of the
system..Execution behavior of this project depends on the processor of the
system.
3.4 Design Constraints
3.4.1 Hardware Constraint
• 2GB RAM
• 500GB Hard Disk
• Dual core processor

3.4.2 Software Constraint


• Front end: HTML, CSS.
• Back end: PHP

3.4.3 Security

9
This project provides security of data and authorized user can access the data.
This project does not expose the userID and password. User profile will be
secured and unauthorized user cannot access the profile.
3.4.4 Fault Tolerance
This validation will apply for the inputted data. To active the fault tolerance in
the process. Project involves different types of testing and corresponding action
to handle the fault.Iftwo or more users book the same PG then the owner will
give preference to user who have book the PG first. The booking done by other
users will be cancelled and the owner will send the cancellation message to other
users.
3.4.5 standard compliance and reliability
The software is design in such a way that it meets the existing standards
.software has graphical user interface to ease of the user and the application
works online so on requirements of internet/ mobile network to operate. This
system is reliable it gives right result when the system id used.
3.5 System Attributes
The system attribute specifies over all attributes that the system should have.
EventManagements application is GUI based client server application .
➢ It is distributed application .
➢ Maintainability
The application will be written in such way that it can be easily modified.
➢ Availability
All the specific information will be available when the application is used.
➢ Scalability
The project can be updated by adding more cities which leads to availability
of more PGs. By this the number of customers will also be increased.
➢ Reliability
This project is trustworthy because the contact details of the owner is being
provided and the user can contact the owner

3.6 Other Requirements


Not applicable

10
SYSTEM DESIGN
1 Introduction:
System design is the process of defining the architecture, components, modules, interfaces
and data for a system to satisfy specified requirement. This phase is transition from the
user's perspective of the system to the developer's viewpoint System design. Sometimes
also called as top-level design aims to identify the module that should be in the system. The
specification of the modules and as they interact with each other to produce the desired
result. The design of the system is used later during implementation, testing and
maintenance. System design helps in develop ping a logical design of the system. At the end
of the system design all the major data structure files, formats, output formats and the major
modules in the system and their specification are decided.
2 Applicable Document
In this project, we use Software Requirement Specification as applicable document .It is
helpful in understanding or analyzing the problem of specifies the requirement.
3 Functional Decomposition
Functional decomposition refers broadly to the process of resolving a functional
relationship into its constituent parts in such a way that the original function can be
reconstructed from those parts by function composition. Our project can view as software,
which has three major modules, all the part of the system can be represented as the
hierarchy of the components. In this system consists of some parts, each parts consists
subparts and so on.

PG for me

Admin owner user

Dashboard Dashboard View PG details

Register /signup
State(add/manage) List your PG
v

City(add/manage) Booking request Booking PG

Register owner

11
PG details

4 Functional components:
Pages4.1
(about us/contact
Admin us)
module:
In the module admin can see all detail in brief like total state, total city, total owner and
total pg. admin can manage state(add/update). And he can manage
city(add/update).admin can view and edit registered owner. and also view PG detail
which is listed by PG owner.admin can manage about us and contact us page.

4.2 owner Module:


In this owner can see all detail in brief like total listed pg, total booking, total
new booking, total confirmed booking and total canceled booking. owner can
list their pg.
admin can view new booking and he has right to confirmed booking.
4.3 user Module:
In this user module user well view and Book the pg.

3.5 Description of the program:


3.5.1 Context Flow Diagram (CFD)
Context Flow Diagram is also called functional system module or context model, which
represent the entire system. Sometimes it called as level 0 data flow diagram, is drawn in
order to define and clarify the boundaries of the software system. It shows all the external
entities that interact with the system and the dataflow between these entities and the system.
The Context Flow Diagram at the project level is the root of the functional decomposition at
the conceptual level of detail. The entire software system is shown as a single process and
all the inputs and outputs given by incoming and outgoing arrows respectively
Login
Admin

login perform operation

Register PG for me Register


Owner User

Perform Operations Perform Operations

12
3.5.2 Data Flow Diagram (DFD):
Data Flow Diagram (DFD) is a graphical representation of the
flow of data through an information system, modelling its process
aspects. The use of DFD’s allows a system analyst to create a graphical
representation that capture, manipulate, store and distribute data between
a system and its environment and among system components. DFD’s
help the system designers and other initial analysis stages visualize a
current system or one that may be necessary to meet new requirements. It
is often used as preliminary step to create an overview of the system,
which can be later elaborated. Data Flow Diagrams should be developed
in a ‘Top-Down’ process. They show a functional perspective where
each transformation represents a single function or process.

3.5.3 Symbols used for Data Flow Diagram:


Symbol Name Description

Source or sink It is the net originator or


consumer of data

Process This allows transformation of


data from input to output

Data flow/labelled This shows flow of data from


arrow source to destination

Stored data/external This data shows data store


source

13
3.5.4 Top level Data Flow Diagram for PG for me:

Admin

Login

Authentication
Admin
table

Dashboard

Pages

State
City
About us
Register owner
PG details Coutact us
Add Manage Manage
Add

Owner table
pages table

state table city table


User
owner
registration
user registration
login

login

Authentication
Authentication

Dashboard Dashboard

List your PG
View PG Booking
Booking request search
14
edit
ADD
Cancel request
new booking
Booking table

Pg details
Confirm booking

6 Description of components:

6.1 Functional Requirements:


6.1.1 Admin module:
6.1.1.1 Login:
➢ Input: Username
Password
➢ Process: Username and password should be
unique.
All details must be specified.
➢ Output: If the username and password are
correct,
admin will login into the system

6.1.1.2 Add State:


➢ Input: state name insert .
➢ Process: Data is inserted. All details must be
specified.
➢ Output: State are added successfully
6.1.1.3 Manage State:
➢ Input: Information will be modified.
➢ Process: Information update will take place
➢ Output: State details will be displayed.
6.1.1.4 Add city:
➢ Input: city name insert.
➢ Process: Data is inserted. All details must be
specified.
➢ Output: city are added successfully
6.1.1.5 Manage city:
➢ Input: Information will be modified.
➢ Process: Information update will take place.
➢ Output: city details will be displayed
6.1.1.6 Register owner:

15
➢ Input: full name
Mobile number
Registration date
➢ Process: Information will be retrieved.
➢ Output: Register owner details will be
displayed.
6.1.1.7 PG details:
➢ Input: PG name
State name.
City name.
Registration date.
➢ Process: Information will be retrieved.
➢ Output: PG details will be displayed.
6.1.1.8 Pages:
➢ Input: about us
Contact us
➢ Process: Information will be retrieved.
➢ Output: about us and contact us will be
displayed

6.1.2 Owner module:

6.1.2.1 login :
➢ Input: Username
Password
➢ Process: Username and password should be
unique.
All details must be specified.
➢ Output: If the username and password are
correct,
admin will login into the system
6.1.2.2 Add PG:
➢ Input: PGname
Type of PG
State
City
Rent per month
Number of rooms
Address
Picture
Electricity
Parking
Refrigerator

16
AC
Balcony
Table/study lamp
Laundry
Security
meals
➢ Process: Information will be taken.
➢ Output: PG details will be stored.
6.1.2.3 Manage PG:
➢ Input: Information will be modified.
➢ Process: Information update will take place
➢ Output: PG details will be displayed.

6.1.2.4 New Booking:


➢ Input: Bookings done by user.
➢ Process: Information will be retrieved.
➢ Output: Information will be displayed.

6.1.2.4 Confirm Booking:


➢ Input: Owner accepts request sent by user.
➢ Process:. Information will be retrieved
➢ Output: Confirmation of the request

6.1.2.4 Cancel Booking:


➢ Input: Owner cancels request sent by user.
➢ Process:. Information will be retrieved
➢ Output: Cancellation of the request.
6.1.3 User module:

6.1.3.1 View PG:


➢ Input: User will select the desired city.
➢ Process: User will search the PG or select
the require PG.
➢ Output: User can take the information of
the PG and with the help of contact detail he
can contact the owner

6.1.3.2Register and sign up:

17
➢ Input: User will clear his/her doubts by
asking queries to the owner in the comment
box.
➢ Process: User can ask the questions about
information of the PG.
➢ Output: Desired information will be
provided by owner to user.
6.1.3.2 Booking process:
➢ Input: User will select the desired city.
➢ Process: User will search the PG or select the
require PG.

Database design
1 Introduction:
Database design gives an idea about the database structure of the software. It includes
detailed description of entity types, relationships and constraints. A diagrammatic
representation of relationship between any entity and its attributes is refers to as ER
model. The ER model concentrates on the structure of database and design of the
database. An entity may be an object with physical or conceptual existence. The
properties that used to describe the entity are called as attributes.
Entity’s that do not have key attributes of their own are called week entity types.
The relationship types that relates a weak entity to its owner is called as identifying
relation of weak entity type. A weak entity types always has a total participation
constraint with respect to its identifying relation.
2 Admin Table:

SL Field Name Data Field Constraint Description

18
NO Type Size
1 ID int 10 Primary key AdminID
2 AdminName varchar 50 Not null AdminName
3 UserName varchar 50 Not null UserName
4 MobileNumber bigint 10 Not null MobileNumber
5 Email varchar 120 Not null Email
6 Password varchar 120 Not null Password
7 AdminRegdate timestamp - Not null AdminRegdate

3 State Table:

SL Field Name Data Type Field Size Constraint Description


NO
1 ID int 50 Primary key ID
2 StateName varchar 120 Not null stateName
3 Stateregisterdate timestamp 10 Not null Stateregisterdate

4 city Table:

SL Field Name Data Type Field Size Constraint Description


NO
1 ID int 50 Primary key ID
2 StateID int 120 Not null stateID
3 City varchar 10 Not null city
4 Creationdate timestamp Not null creationdate

5 Owner Table:

SL Field Name Data Field Constraint Description


NO Type Size
1 ID int 10 Primary key ID
2 FullName varchar 150 Not null fullName
3 email varchar 150 Not null email
4 MobileNumber bigint 10 Not null MobileNumber
5 Email varchar 120 Not null Email
6 Password varchar 120 Not null Password
7 Regdate timestamp - Not null Regdate

6 User Table:

19
SL Field Name Data Field Constraint Description
NO Type Size
1 ID int 10 Foreign key ID
2 fullname varchar 120 Not null fullname
3 Email varchar 250 Primary key Receiptid
4 mobilenumber bigint 120 Not Null mobilenumber
5 Fathername varchar 150 Not null Fathername
6 dob date 120 Not null dob
7 comaddress varchar 120 Not null comaddress
8 EmergencyNumber bigint 120 Not null EmergencyNumber
9 Password varchar 120 Not null Password
10 regdate timestamp - Not null regdate
11 Lastupdateiondate timestamp - Not null Lastupdateiondate

7 Pages Table:

SL Field Name Data Type Field Constraint Description


NO Size
1 ID int 10 Primary key ID
2 Pagetype varchar 150 Not null Pagetype
3 Pagetitle mediumtext - Not null Pagetitle
4 PageDescription mediumtext - Not null PageDescription
5 UpdationDate timestamp - Not null UpdationDate
6 Fullfillment mediumtext - Not null Fullfillment
7 Futureservices mediumtext - Not null Futureservices

6 PG Table:

SL Field Name Data Field Constraint Description


NO Type Size
1 ID int 10 Foreign key ID
2 OwnerID varchar 120 Not null OwnerID
3 StateName varchar 250 Primary key StateName
4 CityName varchar 120 Not Null CityName
5 PGtype Varchar 40 Not null PGtype
6 Noofrooms Varchar 40 Not null Noofrooms
7 Address Varchar 40 Not null Address
8 Image varchar 40 Not null Image
9 Electricity Varchar 40 Not null Electricity
10 Parking Varchar 40 Not null Parking

20
11 Refregerator Varchar 40 Not null Refregerator
12 Furnished Varchar 40 Not null Furnished
15 AC Varchar 40 Not null AC
16 Balcony Varchar 40 Not null Balcony
17 StudyTable Varchar 40 Not null StudyTable
18 Laundry Varchar 40 Not null Laundry
19 Security Varchar 40 Not null Security
20 Mealsbreakfast Varchar 40 Not null Mealsbreakfast
21 mealsLunch Varchar 40 Not null mealsLunch
22 Mealsdinner Varchar 40 Not null Mealsdinner
23 RegDate Timestamp - - RegDate
24 Isactive Int 10 - Isactive
25 lastupdationdate timstamp - - lastupdationdate

7 Booking Table:

SL Field Name Data Field Constraint Description


NO Type Size
1 ID int 40 Foreign key ID
2 Userid int 40 Not null Userid
3 Pgid Int 40 Not null Pgid
4 bookingnumber int 40 Not Null bookingnumber
5 Checkingdate date - Not null Checkingdate
6 Usermsg varchar 120 Not null Usermsg
7 Booingdate timestamp - Not null Booingdate
8 Remark Varchar 120 Not null Remark
9 Status varchar 120 Not null Status
10 remdate timestamp - Not null remdate

7 E-R (Entity Relationship) diagram and database design:


Database is a collection of related data. This document describes the table that
is used to design software, its attributes, data types, constraints and relationships among
those tables. The relationship among the table is defined by E-R Diagram .A
diagrammatically representation of relationship between and entity and its attribute is
referred to as E-R diagram. An entity may be an object with physical or conceptual
existence. The properties that are used to describe the entity are called attributes. Entity
that does not have key attributes of their own is called identifying types. A weak entity
types always has a total participation constraints with represent to its identifying
relations.
Symbolic notations and their description used in drawing E-R Diagram as follows:

Symbols Conventions

21
Entity

Relation

Weak entity

Identifying relations

Attributes

Derived attributes

Key attributes

E1 R E2 Total participation E1 in R
1

1 1 Cardinality ratio 1:1 for E1:E2 in R


E1 R E2
1

1 N Cardinality ratio 1:N for E1:E2 in R


E1 R E2
1
DRAW ER DIAGRAM

22
Detailed design

23
1 Introduction
Detailed design the internal logic of each of the modules specifies in the
system design is decided .Detailed design focuses on the detailed explanation of
each module in the software. It illustrates the entire requirement for the software
in the sense, the input given by the user is specified the way in which each
module functions and describes about the output produced in each modules. It
explains the step-by-step working method of each module.

2 Application document:
• System requirement and specification document
• System design document
• Database design document

3 Structure of software package:


Functional components of software package are:
• Admin
• Owner
• User
PG For Me

Admin owner user

4 Modular decomposition of components:


4.1.1 Admin Module:

4.1.1.1 Design assumption:


Admin Id: Admin must enter admin id for Login.
Password: Admin must be enter password for Login

4.1..12 Identification of the modules:


Admin

4.1.1.3 Hierarchy of the module:


Home

24

Login
4.1.1.4 Data Structure:
Login Details.

4.1.1 Add State Module:

4.1.1.1 Design assumption:


Not applicable
4.1..12 Identification of the modules:
This module is used to add states.

4.1.1.3 Hierarchy of the module:


Admin

Add State

4.1.1.4 Data Structure:


State Module.

4.1.1 Manage State Module:

4.1.1.1 Design assumption:


Not applicable
4.1..12 Identification of the modules:
This module is used to manage states.

4.1.1.3 Hierarchy of the module:


Admin

Edit

25
4.1.1.4 Data Structure:
State module.

4.1.1 Add City Module:

4.1.1.1 Design assumption:


Not applicable
4.1..12 Identification of the modules:
This module is used to add cities.

4.1.1.3 Hierarchy of the module:


Admin

Add Cities

4.1.1.4 Data Structure:


City Module.

4.1.1 Manage City Module:

4.1.1.1 Design assumption:


Not applicable
4.1..12 Identification of the modules:
This module is used to manage cities.

4.1.1.3 Hierarchy of the module:


Admin

Edit

4.1.1.4 Data Structure:


City module.

4.2 Register Owner Module:


4.2.1 Design assumptions:

26
Here admin can view name, contact no, reg date of
Owner.
4.2.2 Identification of modules:
This module is used by admin to view Registered
owners.

4.2.3 Hierarchy of the module:

Admin

Reg Owner

4.1.4 Data Structure:


Registered Owner details.

Register Pg Module:

4.1.1.1 Design assumption:


Here admin can view pg name, state, details, Reg
date of any registered pg.
4.1..12 Identification of the modules:
This module is used to view Registered Pg.

4.1.1.3 Hierarchy of the module:


Admin

View Pg

4.1.1.4 Data Structure:


Registered Pg details.
Pages Module:
4.2.1 Design assumptions:
Here admin can provide details regarding About us and
contact Details.
4.2.2 Identification of modules:
This module is About us and Contact Details

4.2.3 Hierarchy of the module:


27
Admin

Pages

4.1.4 Data Structure:


About us details.

4.2 owner Module:


4.2.1 Design assumptions:
Here owner will login and adds the PG details.users
booking requests accept or rejection.
4.2.2 Identification of modules:
This module is used by owner add new pgs and
confirming or cancelling bookings

4.2.3 Hierarchy of the module:

Home

Owner

4.1.4 Data Structure:


Login details

4.2 Add Pg Module:

4.1.1.1 Design assumption:


Here owner will login and add pg with details by
using Add pg
4.1..12 Identification of the modules:
This module is used to add Pg.

4.1.1.3 Hierarchy of the module:


Owner
28

Add Pg
4.1.1.4 Data Structure:
Pg details.

4.2 Manage Pg Module:

4.1.1.1 Design assumption:


Here owner will login and can edit pg details by
using Manage pg
4.1..12 Identification of the modules:
This module is used to edit Pg details.

4.1.1.3 Hierarchy of the module:


Owner

ManagePg

4.1.1.4 Data Structure:


Pg details.

4.2 New Booking Module:


4.2.1 Design assumptions:
Not applicable
4.2.2 Identification of modules:
Here new Bookings are displayed to owner.

4.2.3 Hierarchy of the module:

Owner

New booking

29
4.1.4 Data Structure:
Booking details

4.2 Confirm Booking Module:


4.2.1 Design assumptions:
Not applicable
4.2.2 Identification of modules:
Here owner can confirm the booking done by user.

4.2.3 Hierarchy of the module:

New Booking

Confirm booking

4.1.4 Data Structure:


Booking confirmation details.

4.2 Cancel Booking Module:


4.2.1 Design assumptions:
Not applicable
4.2.2 Identification of modules:
Here owner can cancel the booking done by user.

4.2.3 Hierarchy of the module:


New Booking

Cancel booking

4.1.4 Data Structure:


Booking cancellation details.

4.3 User Module:


4.2.1 Design assumptions:
Here user will register and login and view the PG details.
Send
And send booking request

30
4.2.2 Identification of modules:
This module is used by user for Booking pgs

4.2.3 Hierarchy of the module:

Home

User

4.1.4 Data Structure:


Login details

4.3 View Pg Module:

4.1.1.1 Design assumption:


Not applicable
4.1..12 Identification of the modules:
This module is used to view Pg along its details.

4.1.1.3 Hierarchy of the module:


User login

View Pg

4.1.1.4 Data Structure:


Pg details.

2 Booking Module:
4.2.1 Design assumptions:
Not applicable
4.2.2 Identification of modules:
Here user can book pg

4.2.3 Hierarchy of the module:

User

31
Booking pg

4.1.4 Data Structure:


Booking details

5.1 Detailed design


Detailed design can be represented using either a flowchart or structure
of flowchart is the graphical representation of a solution to the given problem.

Symbols used for flowchart are as follows:

Symbols Convention Purpose

32
Indicates the start and end
Terminator of the process

It will indicates the input


Input / Output and output data

Represents the comparison


Decision question that determining
an alternate path to be
followed
Used to represent the data
Process manipulation, calculation.

Indicates the continuity of


next step in another page.
Connected

Indicates the modification


Prepositional looping to process such as
initializing routine as
settings switch.

Represents the flow of


Flow controls

Structured chart symbols:


Structure chart shows how program has been partitioned into manageable
modules hierarchy and organization of those modules and communication interface.

Symbols Name Description


It represents subordinate
Labeled Module and superior-ordinate
modules.
It represents subordinate
Module invocation module being invoked by
superior co-ordinate
module.
It indicates direction of
Flow of data flow of data

It indicates direction of
Flow of control flow of control.

33
5.5.1 Design module of Admin:

5.5.1.2 Inputs: Username and password

5.5.1.2 Procedural details: Structured chat showing hierarchy


of admin module.

• Structure chart

Admin

Login details Validation

Dashboard Error message

5.5.1.3 Implementation aspects:

• Algorithm
Step 1. Start
Step 2. Input username and password
Step 3. Check for valid user
Step 4. If yes, then go to admin home page
Else
Display error message
Step 5. Stop

34
• Flow chart:

Start

Enter login
details

False
Valid

True
Login

Perform
Operations

End

5.5.1.4 File I/O interface: Input is username and password and


output is
Requested page.

5.5.1.5 Output: Admin Home page.

5.5.1 Design module of Add State:

5.5.1.2 Inputs: State Name

35
5.5.1.2 Procedural details: Structured chat showing hierarchy
of add state module.

• Structure chart

Add state

State Name Validation

State Added Error message

5.5.1.3 Implementation aspects:

• Algorithm
Step 1. Start
Step 2. Input state name
Step 3. click on “add”
Step 4. if details are valid then
State name is added successfully
else
display the error message
Step 5. Stop

• Flow chart:

36
Start

State name

False
Valid

State added

Stop

5.5.3.4 File I/O interface: Input is select and adds the state
and Output is requested page

5.5.3.5 Output: state will be sdded successfully

5.5.3 Design module of Manage State

5.5.3.1 Inputs: State details

5.5.3.2 Procedural details: Structured chart showing hierarchy


of manage state module

37
• Structured chart

Manage state

Validation

State details

State details are Error message


updated

5.5.3.3 Implementation aspects:


• Algorithm

Step 1. Start
Step 2 state details will be displayed.

Step 3. click on “edit” the staff details.


Step 4. update the state details

Step 5. If details are valid then

state details will be updated

Else

Display error message

Step 6. Stop

38
Flowchart

Start

Manage State

Select and update


the state

false

Valid

true

Changes are
updated

End

5.5.3.4 File I/O interface: Input is select and update the state and
Output is requested page

5.5.3.5 Output: state will be updated successfully

5.5.4 Design module of Add City

5.5.4.1 Inputs: City Name

5.5.4.2 Procedural details: Structured chart showing hierarchy of


Add city module

39
• Structured chart

Add city

Validation

City Name

City is updated Error message

5.5.4.3 Implementation aspects:


• Algorithm

Step 1. Start
Step 2. Input city

Step 3. click on “add”

Step 4. if details are valid then

city is added successfully

else
display the error message
Step 5. Stop

40
• Flowchart
Start

Enter city name

False
Valid

true
City is added
successfully

End

5.5.4.4 File I/O interface: Input is city name and


Output is requested page

5.5.4.5 Output: City is added successfully

5.5.5 Design module of Manage City

5.5.5.1 Inputs: City Details


5.5.5.2 Procedural details: Structured chart showing hierarchy of manage
city module

41
• Structured chart

manage City

Validation

city details

City is updated Error message

5.5.5.3 Implementation aspects:


• Algorithm

Step 1. Start
Step 2 manage city will be displayed.

Step 3. click on “edit” the Manage city.


Step 4. update the vehicle category
Step 5. if details are valid then city will be
updated else

display error message

Step 6. Stop

42
• Flowchart

Start

Manage city

\
Select and update
the city

false

Valid

true

Changes are
updated

End

5.5.5.4 File I/O interface: Input is select and update the city
and Output is requested page

5.5.5.5 Output: City will be updated successfully

4.5.5 Design Module of Register owner


4.5.5.1 Input
Register owner details
4.5.5.2 Procedural details: Structured chat showing hierarchy of register owner
module.

43
Algorithm
Step 1. Start
Step 2. Select register owner
Step 3. Registered owner will be displayed
Step 4. Stop

Structured chart

Register owner

Owner details View register owner

Flow chart

Start

Select register
owner

Register owner
displayed

Stop

File I/O Interface


44
Input is select register Owner and Output is requested page
Output
Register Owner details are displayed successfully.

4.5.5 Design Module of PG details


4.5.5.1 Input
PG details
4.5.5.2 Procedural details: Structured chat showing hierarchy of PG details
module.

Algorithm
Step 1. Start
Step 2. Select PG details
Step 3. PG list with details will be displayed
Step 4. Stop

Structured chart

Registered PG

PG details View registered PG

45
Flow chart

Start

Select
registered PG

Register PG
displayed

Stop

File I/O Interface


Input is select register PG and Output is requested page
Output
Register PG details are displayed successfully.

4.5.5 Design Module of Pages


4.5.5.1 Input
About us and contact us
4.5.5.2 Procedural details: Structured chat showing hierarchy of Pages module.

Algorithm
Step 1. Start
Step 2. Select Pages
Step 3. About us and contact us will be displayed

46
Step 4. Stop

Structured chart

Pages

About us and View register owner


Contact us
Flow chart

Start

Select Pages

About us/Contact
us are displayed

Stop

File I/O Interface


Input is select Pages and Output is requested page
Output
About us/Contact us are displayed successfully.

47
5.5.1 Design module of Owner:

5.5.1.2 Inputs: Username and password

5.5.1.2 Procedural details: Structured chat showing hierarchy of


owner module.

• Structure chart

Owner

Login details Validation

Dashboard Error message

5.5.1.3 Implementation aspects:

• Algorithm
Step 1. Start
Step 2. Input username and password
Step 3. Check for valid user
Step 4. If yes, then go to Owner dashboard
Else
Display error message

48
Step 5. Stop

• Flow chart:

Start

Enter login
details

False
Valid

True
Login

Perform
Operations

End

5.5.1.4 File I/O interface: Input is username and password and output is
Requested page.

5.5.1.5 Output: Owner dashboard.

5.5.4 Design module of Add PG

5.5.4.1 Inputs: PG details

49
5.5.4.2 Procedural details: Structured chart showing hierarchy of
Add PG module

• Structured chart

Add PG

Validation

PG details

PG is added Error message

5.5.4.3 Implementation aspects:


• Algorithm

Step 1. Start
Step 2. Input PG

Step 3. click on “add PG”

Step 4. if details are valid then

PG is added successfully

else
display the error message
Step 5. Stop

50
• Flowchart
Start

Enter PG details

False
Valid

true
PG is added
successfully

End

5.5.4.4 File I/O interface: Input is PG details and


Output is requested page

5.5.4.5 Output: PG is added successfully

4.5.5 Design Module of New Bookings

51
4.5.5.1 Input
New Booking details
4.5.5.2 Procedural details: Structured chat showing hierarchy of new booking
module.

Algorithm
Step 1. Start
Step 2. Select New Bookings
Step 3. New Booking lists will be displayed
Step 4. Stop

Structured chart

New Bookings

Booking details View Booking list

Flow chart

Start

Select new
booking

New booked
list displayed

52
Stop

File I/O Interface


Input is New Booking and Output is requested page
Output
New booked details are displayed successfully.

4.5.5 Design Module of Confirm Booking


4.5.5.1 Input
Confirming Bookings
4.5.5.2 Procedural details: Structured chat showing hierarchy of Confirm booking
module.

Algorithm
Step 1. Start
Step 2. Select confirm Bookings
Step 3. New Booking lists will be displayed
Step 4. Stop

Structured chart

Confirm Bookings

Booking details Booking confirmation

53
Flow chart

Start

Select confirm
booking

Booking confirmed
displayed

Stop

File I/O Interface


Input is Confirm Booking and Output is requested page
Output
Booking confirmation is displayed successfully.

4.5.5 Design Module of Cancel Booking


4.5.5.1 Input
Cancelling Bookings
4.5.5.2 Procedural details: Structured chat showing hierarchy of Cancel booking
module.
Algorithm
Step 1. Start
Step 2. Select cancel Bookings
Step 3. Booking cancellation will be displayed

54
Step 4. Stop

Structured chart

Cancel Bookings

Booking details Booking cancellation

Flow chart

Start

Select cancel
booking

Booking cancel
displayed

Stop

File I/O Interface


Input is Cancel Booking and Output is requested page
Output
Booking cancel is displayed successfully.

55
5.5.1 Design module of User:

5.5.1.2 Inputs: Username and password

5.5.1.2 Procedural details: Structured chat showing hierarchy of user


module.

• Structure chart

User

Login details Validation

Dashboard Error message

5.5.1.3 Implementation aspects:

• Algorithm
Step 1. Start
Step 2. Input username and password
Step 3. Check for valid user
Step 4. If yes, then go to User dashboard
Else
Display error message
Step 5. Stop

56
• Flow chart:

Start

Enter login
details

False
Valid

True
Login

Perform
Operations

End

5.5.1.4 File I/O interface: Input is username and password and output is
Requested page.

5.5.1.5 Output: User dashboard.

4.5.5 Design Module of View PG


4.5.5.1 Input
View PG list
4.5.5.2 Procedural details: Structured chat showing hierarchy of view PG module.

Algorithm

57
Step 1. Start
Step 2. Select view PG
Step 3. List of PGs will be displayed
Step 4. Stop

Structured chart

View PG

PG details List of PGs

Flow chart

Start

Select View PG

List of PGs are


displayed

Stop

File I/O Interface


Input is select View PG and Output is requested page
Output
List if PG are displayed successfully.

58
4.5.5 Design Module of Booking PG
4.5.5.1 Input
Booking PG
4.5.5.2 Procedural details: Structured chat showing hierarchy of booking module.

Algorithm
Step 1. Start
Step 2. Select Booking
Step 3. Booking successful will be displayed
Step 4. Stop

Structured chart

Booking PG

PG details Booking successful

Flow chart

Start

Select booking

Booked successful
displayed

59
Stop

File I/O Interface


Input is Booking and Output is requested page
Output
Booked successful is displayed successfully.

6 CODING
Homepage:

<?php
session_start();
error_reporting(0);
include('includes/dbconnection.php');
?>
<!DOCTYPE html>
<html lang="zxx" class="no-js">
<head>
<title>Paying Guest Accomodation System</title>
<link
href="https://fonts.googleapis.com/css?family=Poppins:100,200,400,300,500,600,
700" rel="stylesheet">
<!--
CSS
============================================= -->
<link rel="stylesheet" href="css/linearicons.css">=
<link rel="stylesheet" href="css/font-awesome.min.css">
<link rel="stylesheet" href="css/nice-select.css">

60
<link rel="stylesheet" href="css/ion.rangeSlider.css" />
<link rel="stylesheet" href="css/ion.rangeSlider.skinFlat.css" />
<link rel="stylesheet" href="css/bootstrap.css">
<link rel="stylesheet" href="css/owl.carousel.css">
<link rel="stylesheet" href="css/main.css">
</head>
<body>
<!-- Start Header Area -->
<?php include_once('includes/header.php');?>
<!-- End Header Area -->
<!-- start banner Area -->
<section class="home-banner-area relative" id="home">
<div class="overlay overlay-bg"></div>
<div class="container">
<div class="row fullscreen align-items-end justify-content-center">
<div class="banner-content col-lg-12 col-md-12">
<h1>Paying Guest Accomodation System</h1>
<div class="search-field">
<form class="search-form" method="post" action="search-result.php">
<div class="row">
<div class="col-lg-12 d-flex align-items-center justify-content-center toggle-
wrap">
<div class="row">
<div class="col">
<h4 class="search-title">Search Properties PG</h4>
</div>
</div>
</div>
<div class="col-lg-3 col-md-6 col-xs-6">
<select name="location" class="form-control" required>
<option value="">Choose State</option>
<?php $query=mysqli_query($con,"select * from tblstate");
while($row=mysqli_fetch_array($query))
{
?>
61
<option value="<?php echo $row['StateName'];?>"><?php echo
$row['StateName'];?></option>
<?php } ?>
</select>
</div>
<div class="col-lg-3 col-md-6 col-xs-6">
<input type="text" name="pgname" class="app-select form-control" required>
</div>
<div class="col-lg-3 col-md-6 col-xs-6">
<button class="primary-btn">Search Properties<span class="lnr lnr-arrow-
right"></span></button>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
</section>
<!-- End banner Area --><!-- Start property Area -->
<section class="property-area section-gap relative" id="property">
<div class="container">
<div class="row d-flex justify-content-center">
<div class="col-md-10 header-text">
<h1>PG Accomodation in Various States or Cities</h1>
<p>
Who are in extremely love with eco friendly system.
</p>
</div>
</div>
<div class="row">
<?php
$ret=mysqli_query($con,"select * from tblpg order by rand() limit 6");
$cnt=1;
while ($row=mysqli_fetch_array($ret)) {
62
?>
<div class="col-lg-4">
<div class="single-property">
<div class="images">
<img class="img-fluid mx-auto d-block" src="owner/roomimages/<?php echo
$row['Image'];?>" width="400" height="180" alt="">
<span>For PG</span>
</div>
<div class="desc">
<div class="top d-flex justify-content-between">
<h4><a href="pg-details.php?pid=<?php echo $row['ID'];?>">PG Name: <?php
echo $row['PGTitle'];?></a></h4>
</div>
<div class="middle">
<div class="d-flex justify-content-start">
<p>AC: <span class="gr"><?php echo $row['AC'];?></span></p>
<p>Balcony: <span class="rd"><?php echo $row['Balcony'];?></span></p>
<p>Laundry: <span class="rd"><?php echo $row['Furnished'];?></span></p>
</div>
<div class="d-flex justify-content-start">
<p>Parking: <span class="gr"><?php echo $row['Parking'];?></span></p>
<p>Price: <span class="rd"><?php echo $row['RPmonth'];?> P/M</span></p>
<p>Type: <span class="rd"><?php echo $row['Type'];?></span></p>
</div>
</div>
<div class="bottom d-flex justify-content-start">
<p><span class="lnr lnr-heart"></span> <?php echo $row['StateName'];?></p>
<p><span class="lnr lnr-bubble"></span> <?php echo $row['CityName'];?></p>
</div>
</div>
</div>
</div>
<?php } ?>
</div>
</section>
63
<!-- Start About Area -->
<!-- End About Area -->
<!-- Start city Area -->
<!-- End city Area -->
<!-- Start testomial Area -->
<!-- End testomial Area -->
<!-- Start blog Area -->
<!-- End blog Area -->
<!-- start footer Area -->
<?php include_once('includes/footer.php');?>
<!-- End footer Area -->
<script src="js/vendor/jquery-2.2.4.min.js"></script>
<script
src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.11.0/umd/popper.min.js"
integrity="sha384-
b/U6ypiBEHpOf/4+1nzFpr53nxSS+GLCkfwBdFNTxtclqqenISfwAzpKaMNFNm
j4"
crossorigin="anonymous"></script>
<script type="text/javascript"
src="https://maps.googleapis.com/maps/api/js?key=AIzaSyBhOdIF3Y9382fqJYt5I
_sswSrEw5eihAA"></script>
<script src="js/vendor/bootstrap.min.js"></script>
<script src="js/jquery.ajaxchimp.min.js"></script>
<script src="js/jquery.nice-select.min.js"></script>
<script src="js/jquery.sticky.js"></script>
<script src="js/ion.rangeSlider.js"></script>
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
<script src="js/jquery.magnific-popup.min.js"></script>
<script src="js/owl.carousel.min.js"></script>
<script src="js/main.js"></script>
</body>
</html>

Admin login:
<?php
64
session_start();
error_reporting(0);
include('includes/dbconnection.php');
if(isset($_POST['login']))
{
$adminuser=$_POST['username'];
$password=md5($_POST['password']);
$query=mysqli_query($con,"select ID from tbladmin where
UserName='$adminuser' && Password='$password' ");
$ret=mysqli_fetch_array($query);
if($ret>0){
$_SESSION['pgasaid']=$ret['ID'];
header('location:dashboard.php');
}
else{
$msg="Invalid Details.";
}
}
?>
<!DOCTYPE html>
<head>
<title>Paying Guest Accomodation System | Login </title>
<script type="application/x-javascript"> addEventListener("load", function() {
setTimeout(hideURLbar, 0); }, false); function hideURLbar(){
window.scrollTo(0,1); } </script>
<!-- bootstrap-css -->
<link rel="stylesheet" href="css/bootstrap.min.css" >
<!-- //bootstrap-css -->
<!-- Custom CSS -->
<link href="css/style.css" rel='stylesheet' type='text/css' />
<link href="css/style-responsive.css" rel="stylesheet"/>
<!-- font CSS -->
<link
href='//fonts.googleapis.com/css?family=Roboto:400,100,100italic,300,300italic,4
00italic,500,500italic,700,700italic,900,900italic' rel='stylesheet' type='text/css'>
65
<!-- font-awesome icons -->
<link rel="stylesheet" href="css/font.css" type="text/css"/>
<link href="css/font-awesome.css" rel="stylesheet">
<!-- //font-awesome icons -->
<script src="js/jquery2.0.3.min.js"></script>
</head>
<body>
<div class="log-w3">
<div class="w3layouts-main">
<h2>Sign In Now</h2>
<form action="#" method="post" name="login">
<p style="font-size:16px; color:red" align="center"> <?php if($msg){
echo $msg;
} ?> </p>
<input type="text" class="ggg" name="username" placeholder="User Name"
required="true">
<input type="password" class="ggg" name="password"
placeholder="PASSWORD" required="true">
<a href="forgot-password.php">Forgot Password?</a>
<div class="clearfix"></div>
<input type="submit" value="Sign In" name="login">
</form>
</div>
</div>
<script src="js/bootstrap.js"></script>
<script src="js/jquery.dcjqaccordion.2.7.js"></script>
<script src="js/scripts.js"></script>
<script src="js/jquery.slimscroll.js"></script>
<script src="js/jquery.nicescroll.js"></script>
<!--[if lte IE 8]><script language="javascript" type="text/javascript" src="js/flot-
chart/excanvas.min.js"></script><![endif]-->
<script src="js/jquery.scrollTo.js"></script>
</body>
</html>

66
Add city:
<?php
session_start();
error_reporting(0);
include('includes/dbconnection.php');
if (strlen($_SESSION['pgasaid']==0)) {
header('location:logout.php');
} else{
if(isset($_POST['submit']))
{
$stateid=$_POST['statename'];
$city=$_POST['city'];
$query=mysqli_query($con, "insert into tblcity(StateID,City)
value('$stateid','$city')");
if ($query) {
$msg="City has been added.";
}
else
{
$msg="Something Went Wrong. Please try again";
}
}
?>
<!DOCTYPE html>
<head>
<title>Paying Guest Accomodation System|| Add City </title>
<script type="application/x-javascript"> addEventListener("load", function() {
setTimeout(hideURLbar, 0); }, false); function hideURLbar(){
window.scrollTo(0,1); } </script>
<!-- bootstrap-css -->
<link rel="stylesheet" href="css/bootstrap.min.css" >
<!-- //bootstrap-css -->
<!-- Custom CSS -->
<link href="css/style.css" rel='stylesheet' type='text/css' />
<link href="css/style-responsive.css" rel="stylesheet"/>
67
<!-- font CSS -->
<link
href='//fonts.googleapis.com/css?family=Roboto:400,100,100italic,300,300italic,4
00italic,500,500italic,700,700italic,900,900italic' rel='stylesheet' type='text/css'>
<!-- font-awesome icons -->
<link rel="stylesheet" href="css/font.css" type="text/css"/>
<link href="css/font-awesome.css" rel="stylesheet">
<!-- //font-awesome icons -->
<script src="js/jquery2.0.3.min.js"></script>
</head>
<body>
<section id="container">
<!--header start-->
<?php include_once('includes/header.php');?>
<!--header end-->
<!--sidebar start-->
<?php include_once('includes/sidebar.php');?>
<!--sidebar end-->
<!--main content start-->
<section id="main-content">
<section class="wrapper">
<div class="form-w3layouts">
<!-- page start-->
<div class="row">
<div class="col-lg-12">
<section class="panel">
<header class="panel-heading">
Add City
<span class="tools pull-right">
<a class="fa fa-chevron-down" href="javascript:;"></a>
<a class="fa fa-cog" href="javascript:;"></a>
<a class="fa fa-times" href="javascript:;"></a>
</span>
</header>
<div class="panel-body">
68
<div class="form">
<p style="font-size:16px; color:red" align="center"> <?php if($msg){
echo $msg;
} ?> </p>
<form class="cmxform form-horizontal " method="post" action="">
<div class="form-group ">
<label for="adminname" class="control-label col-lg-3">State</label>
<div class="col-lg-6">
<select name="statename" class="form-control wd-450" required="true" >
<option value="">Select Category</option>
<?php $query=mysqli_query($con,"select * from tblstate");
while($row=mysqli_fetch_array($query))
{
?>
<option value="<?php echo $row['ID'];?>"><?php echo
$row['StateName'];?></option>
<?php } ?>
</select>
</div>
</div>
<div class="form-group ">
<label for="adminname" class="control-label col-lg-3">City</label>
<div class="col-lg-6">
<input class=" form-control" id="city" name="city" type="text" required="true"
value="">
</div>
</div>
<div class="form-group">
<div class="col-lg-offset-3 col-lg-6">
<p style="text-align: center;"> <button class="btn btn-primary" type="submit"
name="submit">Add</button></p>
</div>
</div>
</form>
</div>
69
</div>
</section>
</div>
</div>
<!-- page end-->
</div>
</section>
<!-- footer -->
<?php include_once('includes/footer.php');?>
<!-- / footer -->
</section>
</section>
<script src="js/bootstrap.js"></script>
<script src="js/jquery.dcjqaccordion.2.7.js"></script>
<script src="js/scripts.js"></script>
<script src="js/jquery.slimscroll.js"></script>
<script src="js/jquery.nicescroll.js"></script>
<!--[if lte IE 8]><script language="javascript" type="text/javascript" src="js/flot-
chart/excanvas.min.js"></script><![endif]-->
<script src="js/jquery.scrollTo.js"></script>
</body>
</html>
<?php } ?>

Add state:
<?php
session_start();
error_reporting(0);
include('includes/dbconnection.php');
if (strlen($_SESSION['pgasaid']==0)) {
header('location:logout.php');
} else{
if(isset($_POST['submit']))
{
$statename=$_POST['statename'];
70
$query=mysqli_query($con, "insert into tblstate(StateName) value('$statename')");
if ($query) {
$msg="State has been added.";
}
else
{
$msg="Something Went Wrong. Please try again";
}

}
?>
<!DOCTYPE html>
<head>
<title>Paying Guest Accomodation System|| Add State </title>
<script type="application/x-javascript"> addEventListener("load", function() {
setTimeout(hideURLbar, 0); }, false); function hideURLbar(){
window.scrollTo(0,1); } </script>
<!-- bootstrap-css -->
<link rel="stylesheet" href="css/bootstrap.min.css" >
<!-- //bootstrap-css -->
<!-- Custom CSS -->
<link href="css/style.css" rel='stylesheet' type='text/css' />
<link href="css/style-responsive.css" rel="stylesheet"/>
<!-- font CSS -->
<link
href='//fonts.googleapis.com/css?family=Roboto:400,100,100italic,300,300italic,4
00italic,500,500italic,700,700italic,900,900italic' rel='stylesheet' type='text/css'>
<!-- font-awesome icons -->
<link rel="stylesheet" href="css/font.css" type="text/css"/>
<link href="css/font-awesome.css" rel="stylesheet">
<!-- //font-awesome icons -->
<script src="js/jquery2.0.3.min.js"></script>
</head>
71
<body>
<section id="container">
<!--header start-->
<?php include_once('includes/header.php');?>
<!--header end-->
<!--sidebar start-->
<?php include_once('includes/sidebar.php');?>
<!--sidebar end-->
<!--main content start-->
<section id="main-content">
<section class="wrapper">
<div class="form-w3layouts">
<!-- page start-->
<div class="row">
<div class="col-lg-12">
<section class="panel">
<header class="panel-heading">
Add State
<span class="tools pull-right">
<a class="fa fa-chevron-down" href="javascript:;"></a>
<a class="fa fa-cog" href="javascript:;"></a>
<a class="fa fa-times" href="javascript:;"></a>
</span>
</header>
<div class="panel-body">
<div class="form">
<p style="font-size:16px; color:red" align="center"> <?php if($msg){
echo $msg;
} ?> </p>
<form class="cmxform form-horizontal " method="post" action="">
<div class="form-group ">
<label for="adminname" class="control-label col-lg-3">State</label>
<div class="col-lg-6">
<input class=" form-control" id="statename" name="statename" type="text"
required="true" value="">
72
</div>
</div>
<div class="form-group">
<div class="col-lg-offset-3 col-lg-6">
<p style="text-align: center;"> <button class="btn btn-primary" type="submit"
name="submit">Add</button></p>
</div>
</div>
</form>
</div>
</div>
</section>
</div>
</div>
<!-- page end-->
</div>
</section>
<!-- footer -->
<?php include_once('includes/footer.php');?>
<!-- / footer -->
</section>
</section>
<script src="js/bootstrap.js"></script>
<script src="js/jquery.dcjqaccordion.2.7.js"></script>
<script src="js/scripts.js"></script>
<script src="js/jquery.slimscroll.js"></script>
<script src="js/jquery.nicescroll.js"></script>
<!--[if lte IE 8]><script language="javascript" type="text/javascript" src="js/flot-
chart/excanvas.min.js"></script><![endif]-->
<script src="js/jquery.scrollTo.js"></script>
</body>
</html>
<?php } ?>

Manage city:
73
<?php
session_start();
error_reporting(0);
include('includes/dbconnection.php');
if (strlen($_SESSION['pgasaid']==0)) {
header('location:logout.php');
} else{
?>
<!DOCTYPE html>
<head>
<title>Paying Guest Accomodation System|| Manage State </title>
<script type="application/x-javascript"> addEventListener("load", function() {
setTimeout(hideURLbar, 0); }, false); function hideURLbar(){
window.scrollTo(0,1); } </script>
<!-- bootstrap-css -->
<link rel="stylesheet" href="css/bootstrap.min.css" >
<!-- //bootstrap-css -->
<!-- Custom CSS -->
<link href="css/style.css" rel='stylesheet' type='text/css' />
<link href="css/style-responsive.css" rel="stylesheet"/>
<!-- font CSS -->
<link
href='//fonts.googleapis.com/css?family=Roboto:400,100,100italic,300,300italic,4
00italic,500,500italic,700,700italic,900,900italic' rel='stylesheet' type='text/css'>
<!-- font-awesome icons -->
<link rel="stylesheet" href="css/font.css" type="text/css"/>
<link href="css/font-awesome.css" rel="stylesheet">
<!-- //font-awesome icons -->
<script src="js/jquery2.0.3.min.js"></script>
</head>
<body>
<section id="container">
<!--header start-->
<?php include_once('includes/header.php');?>
<!--header end-->
74
<!--sidebar start-->
<?php include_once('includes/sidebar.php');?>
<!--sidebar end-->
<!--main content start-->
<section id="main-content">
<section class="wrapper">
<div class="table-agile-info">
<div class="panel panel-default">
<div class="panel-heading">
Manage City
</div>
<div>
<table class="table" ui-jq="footable" ui-options='{
"paging": {
"enabled": true
},
"filtering": {
"enabled": true
},
"sorting": {
"enabled": true
}}'>
<thead><tr>
<th data-breakpoints="xs">S.NO</th>
<th>City Name</th>
<th>Creation Date</th>
<th data-breakpoints="xs">Action</th>
</tr>
</thead>
<?php
$ret=mysqli_query($con,"select * from tblcity");
$cnt=1;
while ($row=mysqli_fetch_array($ret)) {
?>
<tbody>
75
<tr data-expanded="true">
<td><?php echo $cnt;?></td>
<td><?php echo $row['City'];?></td>
<td><?php echo $row['CreationDate'];?></td>
<td><a href="edit-city.php?editid=<?php echo $row['ID'];?>">Edit City</a>
</tr>
<?php
$cnt=$cnt+1;
}?>
</tbody>
</table>
</div>
</div>
</div>
</section>
<!-- footer -->
<?php include_once('includes/footer.php');?>
<!-- / footer -->
</section>
<!--main content end-->
</section>
<script src="js/bootstrap.js"></script>
<script src="js/jquery.dcjqaccordion.2.7.js"></script>
<script src="js/scripts.js"></script>
<script src="js/jquery.slimscroll.js"></script>
<script src="js/jquery.nicescroll.js"></script>
<!--[if lte IE 8]><script language="javascript" type="text/javascript" src="js/flot-
chart/excanvas.min.js"></script><![endif]-->
<script src="js/jquery.scrollTo.js"></script>
</body>
</html>
<?php } ?>
Manage state:
<?php
session_start();
76
error_reporting(0);
include('includes/dbconnection.php');
if (strlen($_SESSION['pgasaid']==0)) {
header('location:logout.php');
} else{
?>
<!DOCTYPE html>
<head>
<title>Paying Guest Accomodation System|| Manage State </title>
<script type="application/x-javascript"> addEventListener("load", function() {
setTimeout(hideURLbar, 0); }, false); function hideURLbar(){
window.scrollTo(0,1); } </script>
<!-- bootstrap-css -->
<link rel="stylesheet" href="css/bootstrap.min.css" >
<!-- //bootstrap-css -->
<!-- Custom CSS -->
<link href="css/style.css" rel='stylesheet' type='text/css' />
<link href="css/style-responsive.css" rel="stylesheet"/>
<!-- font CSS -->
<link
href='//fonts.googleapis.com/css?family=Roboto:400,100,100italic,300,300italic,4
00italic,500,500italic,700,700italic,900,900italic' rel='stylesheet' type='text/css'>
<!-- font-awesome icons -->
<link rel="stylesheet" href="css/font.css" type="text/css"/>
<link href="css/font-awesome.css" rel="stylesheet">
<!-- //font-awesome icons -->
<script src="js/jquery2.0.3.min.js"></script>
</head>
<body>
<section id="container">
<!--header start-->
<?php include_once('includes/header.php');?>
<!--header end-->
<!--sidebar start-->
<?php include_once('includes/sidebar.php');?>
77
<!--sidebar end-->
<!--main content start-->
<section id="main-content">
<section class="wrapper">
<div class="table-agile-info">
<div class="panel panel-default">
<div class="panel-heading">
Manage State
</div>
<div>
<table class="table" ui-jq="footable" ui-options='{
"paging": {
"enabled": true
},
"filtering": {
"enabled": true
},
"sorting": {
"enabled": true
}}'>
<thead>
<tr>
<th data-breakpoints="xs">S.NO</th>
<th>State Name</th>
<th>Creation Date</th>
<th data-breakpoints="xs">Action</th>
</tr>
</thead>
<?php
$ret=mysqli_query($con,"select * from tblstate");
$cnt=1;
while ($row=mysqli_fetch_array($ret)) {
?>
<tbody>
<tr data-expanded="true">
78
<td><?php echo $cnt;?></td>
<td><?php echo $row['StateName'];?></td>
<td><?php echo $row['RegState'];?></td>
<td><a href="edit-state.php?editid=<?php echo $row['ID'];?>">Edit State</a>
</tr>
<?php
$cnt=$cnt+1;
}?>
</tbody>
</table>
</div>
</div>
</div>
</section>
<!-- footer -->
<?php include_once('includes/footer.php');?>
<!-- / footer -->
</section>
<!--main content end-->
</section>
<script src="js/bootstrap.js"></script>
<script src="js/jquery.dcjqaccordion.2.7.js"></script>
<script src="js/scripts.js"></script>
<script src="js/jquery.slimscroll.js"></script>
<script src="js/jquery.nicescroll.js"></script>
<!--[if lte IE 8]><script language="javascript" type="text/javascript" src="js/flot-
chart/excanvas.min.js"></script><![endif]-->
<script src="js/jquery.scrollTo.js"></script>
</body>
</html>
<?php } ?>

Manage owner details:


<?php
session_start();
79
error_reporting(0);
include('includes/dbconnection.php');
if (strlen($_SESSION['pgasaid']==0)) {
header('location:logout.php');
} else{
?>
<!DOCTYPE html>
<head>
<title>Paying Guest Accomodation System|| Owner Details </title>
<script type="application/x-javascript"> addEventListener("load", function() {
setTimeout(hideURLbar, 0); }, false); function hideURLbar(){
window.scrollTo(0,1); } </script>
<!-- bootstrap-css -->
<link rel="stylesheet" href="css/bootstrap.min.css" >
<!-- //bootstrap-css -->
<!-- Custom CSS -->
<link href="css/style.css" rel='stylesheet' type='text/css' />
<link href="css/style-responsive.css" rel="stylesheet"/>
<!-- font CSS -->
<link
href='//fonts.googleapis.com/css?family=Roboto:400,100,100italic,300,300italic,4
00italic,500,500italic,700,700italic,900,900italic' rel='stylesheet' type='text/css'>
<!-- font-awesome icons -->
<link rel="stylesheet" href="css/font.css" type="text/css"/>
<link href="css/font-awesome.css" rel="stylesheet">
<!-- //font-awesome icons -->
<script src="js/jquery2.0.3.min.js"></script>
</head>
<body>
<section id="container">
<!--header start-->
<?php include_once('includes/header.php');?>
<!--header end-->
<!--sidebar start-->
<?php include_once('includes/sidebar.php');?>
80
<!--sidebar end-->
<!--main content start-->
<section id="main-content">
<section class="wrapper">
<div class="table-agile-info">
<div class="panel panel-default">
<div class="panel-heading">
Paying Guest Owner Details
</div>
<div>
<table class="table" ui-jq="footable" ui-options='{
"paging": {
"enabled": true
},
"filtering": {
"enabled": true
},
"sorting": {
"enabled": true
}}'>
<thead>
<tr>
<th data-breakpoints="xs">S.NO</th>
<th>Full Name</th>
<th>Mobile Number</th>
<th>Registration Date</th>
<th data-breakpoints="xs">Action</th>
</tr>
</thead>
<?php
$ret=mysqli_query($con,"select * from tblowner");
$cnt=1;
while ($row=mysqli_fetch_array($ret)) {
?>
<tbody>
81
<tr data-expanded="true">
<td><?php echo $cnt;?></td>
<td><?php echo $row['FullName'];?></td>
<td><?php echo $row['MobileNumber'];?></td>
<td><?php echo $row['RegDate'];?></td>
<td><a href="edit-ownerdetails.php?editid=<?php echo $row['ID'];?>"><i
class="fa fa-edit"></i></a>
</tr>
<?php
$cnt=$cnt+1;
}?>
</tbody>
</table>
</div>
</div>
</div>
</section>
<!-- footer -->
<?php include_once('includes/footer.php');?>
<!-- / footer -->
</section>
<!--main content end-->
</section>
<script src="js/bootstrap.js"></script>
<script src="js/jquery.dcjqaccordion.2.7.js"></script>
<script src="js/scripts.js"></script>
<script src="js/jquery.slimscroll.js"></script>
<script src="js/jquery.nicescroll.js"></script>
<!--[if lte IE 8]><script language="javascript" type="text/javascript" src="js/flot-
chart/excanvas.min.js"></script><![endif]-->
<script src="js/jquery.scrollTo.js"></script>
</body>
</html>
<?php } ?>

82
Manage pg details:
<?php
session_start();
error_reporting(0);
include('includes/dbconnection.php');
if (strlen($_SESSION['pgasaid']==0)) {
header('location:logout.php');
} else{
?>
<!DOCTYPE html>
<head>
<title>Paying Guest Accomodation System|| View PG </title>
<script type="application/x-javascript"> addEventListener("load", function() {
setTimeout(hideURLbar, 0); }, false); function hideURLbar(){
window.scrollTo(0,1); } </script>
<!-- bootstrap-css -->
<link rel="stylesheet" href="css/bootstrap.min.css" >
<!-- //bootstrap-css -->
<!-- Custom CSS -->
<link href="css/style.css" rel='stylesheet' type='text/css' />
<link href="css/style-responsive.css" rel="stylesheet"/>
<!-- font CSS -->
<link
href='//fonts.googleapis.com/css?family=Roboto:400,100,100italic,300,300italic,4
00italic,500,500italic,700,700italic,900,900italic' rel='stylesheet' type='text/css'>
<!-- font-awesome icons -->
<link rel="stylesheet" href="css/font.css" type="text/css"/>
<link href="css/font-awesome.css" rel="stylesheet">
<!-- //font-awesome icons -->
<script src="js/jquery2.0.3.min.js"></script>
</head>
<body>
<section id="container">
<!--header start-->
<?php include_once('includes/header.php');?>
83
<!--header end-->
<!--sidebar start-->
<?php include_once('includes/sidebar.php');?>
<!--sidebar end-->
<!--main content start-->
<section id="main-content">
<section class="wrapper">
<div class="table-agile-info">
<div class="panel panel-default">
<div class="panel-heading">
Paying Guest Details
</div>
<div>
<table class="table" ui-jq="footable" ui-options='{
"paging": {
"enabled": true
},
"filtering": {
"enabled": true
},
"sorting": {
"enabled": true
}}'>
<thead>
<tr>
<th data-breakpoints="xs">S.NO</th>
<th>PG Name</th>
<th>State Name</th>
<th>City Name</th>
<th>Registration Date</th>
<th data-breakpoints="xs">Action</th>
</tr>
</thead>
<?php
$ret=mysqli_query($con,"select * from tblpg");
84
$cnt=1;
while ($row=mysqli_fetch_array($ret)) {
?>
<tbody>
<tr data-expanded="true">
<td><?php echo $cnt;?></td>
<td><?php echo $row['PGTitle'];?></td>
<td><?php echo $row['StateName'];?></td>
<td><?php echo $row['CityName'];?></td>
<td><?php echo $row['RegDate'];?></td>
<td><a href="view-pgdetails.php?editid=<?php echo $row['ID'];?>">View
Details</a>
</tr>
<?php
$cnt=$cnt+1;
}?>
</tbody>
</table>
</div>
</div>
</div>
</section>
<!-- footer -->
<?php include_once('includes/footer.php');?>
<!-- / footer -->
</section>
<!--main content end-->
</section>
<script src="js/bootstrap.js"></script>
<script src="js/jquery.dcjqaccordion.2.7.js"></script>
<script src="js/scripts.js"></script>
<script src="js/jquery.slimscroll.js"></script>
<script src="js/jquery.nicescroll.js"></script>
<!--[if lte IE 8]><script language="javascript" type="text/javascript" src="js/flot-
chart/excanvas.min.js"></script><![endif]-->
85
<script src="js/jquery.scrollTo.js"></script>
</body>
</html>
<?php } ?>

View-pgdetails:
<?php
session_start();
error_reporting(0);
include('includes/dbconnection.php');
if (strlen($_SESSION['pgasaid']==0)) {
header('location:logout.php');
}
?>
<!DOCTYPE html>
<head>
<title>PG Accomodation System | PG Form </title>
<script type="application/x-javascript"> addEventListener("load", function() {
setTimeout(hideURLbar, 0); }, false); function hideURLbar(){
window.scrollTo(0,1); } </script>
<!-- bootstrap-css -->
<link rel="stylesheet" href="css/bootstrap.min.css" >
<!-- //bootstrap-css -->
<!-- Custom CSS -->
<link href="css/style.css" rel='stylesheet' type='text/css' />
<link href="css/style-responsive.css" rel="stylesheet"/>
<!-- font CSS -->
<link
href='//fonts.googleapis.com/css?family=Roboto:400,100,100italic,300,300italic,4
00italic,500,500italic,700,700italic,900,900italic' rel='stylesheet' type='text/css'>
<!-- font-awesome icons -->
<link rel="stylesheet" href="css/font.css" type="text/css"/>
<link href="css/font-awesome.css" rel="stylesheet">
<!-- //font-awesome icons -->
<script src="js/jquery2.0.3.min.js"></script>
86
</head>
<body>
<section id="container">
<!--header start-->
<?php include_once('includes/header.php');?>
<!--header end-->
<!--sidebar start-->
<?php include_once('includes/sidebar.php');?>
<!--sidebar end-->
<!--main content start-->
<section id="main-content">
<section class="wrapper">
<div class="form-w3layouts">
<div class="row">
<div class="col-lg-12">
<section class="panel">
<header class="panel-heading">
View Owner PG
</header>
<div class="panel-body">
<p style="font-size:16px; color:red" align="left"> <?php if($msg){
echo $msg;
} ?> </p>
<?php
$cid=$_GET['editid'];
$ret=mysqli_query($con,"select * from tblpg join tblowner on tblowner.ID =
tblpg.OwnerID where tblpg.ID='$cid'");
$cnt=1;
while ($row=mysqli_fetch_array($ret)) {
?>
<table border="1" class="table table-bordered mg-b-0">
<tr>
<th>PG Owner</th>
<td><?php echo $row['FullName'];?></td>
</tr>
87
<tr>
<th>PG Owner Email</th>
<td><?php echo $row['Email'];?></td>
</tr>
<tr>
<th>PG Owner Mobile Number</th>
<td><?php echo $row['MobileNumber'];?></td>
</tr>
<tr>
<th>PG Name</th>
<td><?php echo $row['PGTitle'];?></td>
</tr>
<tr>
<th>State</th>
<td><?php echo $row['StateName'];?></td>
</tr>
<tr>
<th>City</th>
<td><?php echo $row['CityName'];?></td>
</tr>
<tr>
<th>Rent Per Month</th>
<td><?php echo $row['RPmonth'];?></td>
</tr>
<tr>
<th>Number of Rooms</th>
<td><?php echo $row['norooms'];?></td>
</tr>
<tr>
<th>Address</th>
<td><?php echo $row['Address'];?></td>
</tr>
<tr>
<th>Room Images</th>

88
<td><img src="../owner/roomimages/<?php echo $row['Image'];?>" width="200"
height="150" value="<?php echo $row['Image'];?>"></td>
</tr>
<table border="1" class="table table-bordered mg-b-0">
<label class="col-sm-3 control-label col-lg-3" for="inputSuccess" style="color:
red">Facilities</label>
<tr>
<th>Electricity</th>
<td><?php echo $row['Electricity'];?></td>
</tr>
<tr>
<th>Parking</th>
<td><?php echo $row['Parking'];?></td>
</tr>
<tr>
<th>Refregerator</th>
<td><?php echo $row['Refregerator'];?></td>
</tr>
<tr>
<th>Full Furnished</th>
<td><?php echo $row['furnished'];?></td>
</tr>
<tr>
<th>AC</th>
<td><?php echo $row['AC'];?></td>
</tr>
<tr>
<th>Balcony</th>
<td><?php echo $row['Balcony'];?></td>
</tr>
<tr>
<th>Table/Study Lamp</th>
<td><?php echo $row['StudyTable'];?></td>
</tr>
<tr>
89
<th>Laundry</th>
<td><?php echo $row['Laundry'];?></td>
</tr>
<tr>
<th>Security</th>
<td><?php echo $row['Security'];?></td>
</tr>
</table>
<table border="1" class="table table-bordered mg-b-0">
<label class="col-sm-3 control-label col-lg-3" for="inputSuccess" style="color:
red">Meals which offer by PG</label>
<tr>
<th>Breakfast</th>
<td><?php echo $row['MealsBreakfast'];?></td>
</tr>
<tr>
<th>Lunch</th>
<td><?php echo $row['MealLunch'];?></td>
</tr>
<tr>
<th>Dinner</th>
<td><?php echo $row['MealDinner'];?></td>
</tr>
</table>
</table>
</div>
<?php } ?>
</section>
<!-- page end-->
</div>
</section>
<!-- footer -->
<?php include_once('includes/footer.php');?>
<!-- / footer -->
</section>
90
<!--main content end-->
</section>
<script src="js/bootstrap.js"></script>
<script src="js/jquery.dcjqaccordion.2.7.js"></script>
<script src="js/scripts.js"></script>
<script src="js/jquery.slimscroll.js"></script>
<script src="js/jquery.nicescroll.js"></script>
<!--[if lte IE 8]><script language="javascript" type="text/javascript" src="js/flot-
chart/excanvas.min.js"></script><![endif]-->
<script src="js/jquery.scrollTo.js"></script>
</body>
</html>

Edit-city:
<?php
session_start();
error_reporting(0);
include('includes/dbconnection.php');
if (strlen($_SESSION['pgasaid']==0)) {
header('location:logout.php');
} else{
if(isset($_POST['submit']))
{
$stateid=$_POST['statename'];
$eid=$_GET['editid'];
$city=$_POST['city'];
$query=mysqli_query($con, "update tblcity set StateID='$stateid',City='$city'
where ID='$eid'");
if ($query) {
$msg="City has been Updated.";
}
else
{
$msg="Something Went Wrong. Please try again";
}
91
}
?>
<!DOCTYPE html>
<head>
<title>Paying Guest Accomodation System|| Update City </title>
<script type="application/x-javascript"> addEventListener("load", function() {
setTimeout(hideURLbar, 0); }, false); function hideURLbar(){
window.scrollTo(0,1); } </script>
<!-- bootstrap-css -->
<link rel="stylesheet" href="css/bootstrap.min.css" >
<!-- //bootstrap-css -->
<!-- Custom CSS -->
<link href="css/style.css" rel='stylesheet' type='text/css' />
<link href="css/style-responsive.css" rel="stylesheet"/>
<!-- font CSS -->
<link
href='//fonts.googleapis.com/css?family=Roboto:400,100,100italic,300,300italic,4
00italic,500,500italic,700,700italic,900,900italic' rel='stylesheet' type='text/css'>
<!-- font-awesome icons -->
<link rel="stylesheet" href="css/font.css" type="text/css"/>
<link href="css/font-awesome.css" rel="stylesheet">
<!-- //font-awesome icons -->
<script src="js/jquery2.0.3.min.js"></script>
</head>
<body>
<section id="container">
<!--header start-->
<?php include_once('includes/header.php');?>
<!--header end-->
<!--sidebar start-->
<?php include_once('includes/sidebar.php');?>
<!--sidebar end-->
<!--main content start-->
<section id="main-content">
<section class="wrapper">
92
<div class="form-w3layouts">
<!-- page start-->
<div class="row">
<div class="col-lg-12">
<section class="panel">
<header class="panel-heading">
Update City
<span class="tools pull-right">
<a class="fa fa-chevron-down" href="javascript:;"></a>
<a class="fa fa-cog" href="javascript:;"></a>
<a class="fa fa-times" href="javascript:;"></a>
</span>
</header>
<div class="panel-body">
<div class="form">
<p style="font-size:16px; color:red" align="center"> <?php if($msg){
echo $msg;
} ?> </p>
<form class="cmxform form-horizontal " method="post" action="">
<?php
$cid=$_GET['editid'];
$ret=mysqli_query($con,"select tblcity.ID as ctyid,tblcity.City as
cityname,tblstate.StateName as stname,tblstate.ID as stid from tblcity join tblstate
on tblstate.id=tblcity.StateID where tblcity.ID='$cid'");
$cnt=1;
while ($row=mysqli_fetch_array($ret)) {
?>
<div class="form-group ">
<label for="adminname" class="control-label col-lg-3">State</label>
<div class="col-lg-6">
<select name="statename" class="form-control wd-450" required="true" >
<option value="<?php echo $row['stid'];?>"><?php echo
$row['stname'];?></option>
<?php $query=mysqli_query($con,"select * from tblstate");
while($rw=mysqli_fetch_array($query))
93
{
?>
<option value="<?php echo $rw['ID'];?>"><?php echo
$rw['StateName'];?></option>
<?php } ?>
</select>
</div>
</div>
<div class="form-group ">
<label for="adminname" class="control-label col-lg-3">City</label>
<div class="col-lg-6">
<input class=" form-control" id="city" name="city" type="text" required="true"
value="<?php echo $row['cityname'];?>">
</div>
</div>
<div class="form-group">
<div class="col-lg-offset-3 col-lg-6">
<p style="text-align: center;"> <button class="btn btn-primary" type="submit"
name="submit">Update</button></p>
</div>
</div>
</form>
<?php } ?>
</div>
</div>
</section>
</div>
</div>
<!-- page end-->
</div>
</section>
<!-- footer -->
<?php include_once('includes/footer.php');?>
<!-- / footer -->
</section>
94
</section>
<script src="js/bootstrap.js"></script>
<script src="js/jquery.dcjqaccordion.2.7.js"></script>
<script src="js/scripts.js"></script>
<script src="js/jquery.slimscroll.js"></script>
<script src="js/jquery.nicescroll.js"></script>
<!--[if lte IE 8]><script language="javascript" type="text/javascript" src="js/flot-
chart/excanvas.min.js"></script><![endif]-->
<script src="js/jquery.scrollTo.js"></script>
</body>
</html>
<?php } ?>

Edit-owner details:
<?php
session_start();
error_reporting(0);
include('includes/dbconnection.php');
if (strlen($_SESSION['pgasaid']==0)) {
header('location:logout.php');
} else{
if(isset($_POST['submit']))
{
$eid=$_GET['editid'];
$fullname=$_POST['fullname'];
$mobno=$_POST['contactnumber'];
$email=$_POST['email'];
$query=mysqli_query($con, "update tblowner set FullName ='$fullname',
Email='$email', MobileNumber='$mobno' where ID='$eid'");
if ($query) {
$msg="Owner profile has been updated.";
}
else
{
$msg="Something Went Wrong. Please try again";
95
}
}
?>
<!DOCTYPE html>
<head>
<title>Paying Guest Accomodation System|| Update State </title>
<script type="application/x-javascript"> addEventListener("load", function() {
setTimeout(hideURLbar, 0); }, false); function hideURLbar(){
window.scrollTo(0,1); } </script>
<!-- bootstrap-css -->
<link rel="stylesheet" href="css/bootstrap.min.css" >
<!-- //bootstrap-css -->
<!-- Custom CSS -->
<link href="css/style.css" rel='stylesheet' type='text/css' />
<link href="css/style-responsive.css" rel="stylesheet"/>
<!-- font CSS -->
<link
href='//fonts.googleapis.com/css?family=Roboto:400,100,100italic,300,300italic,4
00italic,500,500italic,700,700italic,900,900italic' rel='stylesheet' type='text/css'>
<!-- font-awesome icons -->
<link rel="stylesheet" href="css/font.css" type="text/css"/>
<link href="css/font-awesome.css" rel="stylesheet">
<!-- //font-awesome icons -->
<script src="js/jquery2.0.3.min.js"></script>
</head>
<body>
<section id="container">
<!--header start-->
<?php include_once('includes/header.php');?>
<!--header end-->
<!--sidebar start-->
<?php include_once('includes/sidebar.php');?>
<!--sidebar end-->
<!--main content start-->
<section id="main-content">
96
<section class="wrapper">
<div class="form-w3layouts">
<!-- page start-->
<div class="row">
<div class="col-lg-12">
<section class="panel">
<header class="panel-heading">
Update Owner Details
<span class="tools pull-right">
<a class="fa fa-chevron-down" href="javascript:;"></a>
<a class="fa fa-cog" href="javascript:;"></a>
<a class="fa fa-times" href="javascript:;"></a>
</span>
</header>
<div class="panel-body">
<div class="form">
<p style="font-size:16px; color:red" align="center"> <?php if($msg){
echo $msg;
} ?> </p>
<?php
$cid=$_GET['editid'];
$ret=mysqli_query($con,"select * from tblowner where ID='$cid'");
$cnt=1;
while ($row=mysqli_fetch_array($ret)) {
?>
<form class="cmxform form-horizontal " method="post" action="">
<div class="form-group ">
<label for="adminname" class="control-label col-lg-3">Full Name</label>
<div class="col-lg-6">
<input class=" form-control" id="fullname" name="fullname" type="text"
value="<?php echo $row['FullName'];?>" required="true">
</div>
</div>
<div class="form-group ">
<label for="email" class="control-label col-lg-3">Email</label>
97
<div class="col-lg-6">
<input class="form-control " id="email" name="email" type="email"
value="<?php echo $row['Email'];?>" required="true">
</div>
</div>
<div class="form-group ">
<label for="username" class="control-label col-lg-3">Mobile Number</label>
<div class="col-lg-6">
<input class="form-control " id="contactnumber" name="contactnumber"
type="text" value="<?php echo $row['MobileNumber'];?>" required="true">
</div>
</div>
<div class="form-group ">
<label for="username" class="control-label col-lg-3">Registration Date</label>
<div class="col-lg-6">
<input class="form-control " id="regDate" name="regdate" type="text"
value="<?php echo $row['RegDate'];?>" readonly="true">
</div>
</div>
<?php } ?>
<div class="form-group">
<div class="col-lg-offset-3 col-lg-6">
<p style="text-align: center;"> <button class="btn btn-primary" type="submit"
name="submit">Update</button></p>
</div>
</div>
</form>
</div>
</div>
</section>
</div>
</div>
<!-- page end-->
</div>
</section>
98
<!-- footer -->
<?php include_once('includes/footer.php');?>
<!-- / footer -->
</section>
</section>
<script src="js/bootstrap.js"></script>
<script src="js/jquery.dcjqaccordion.2.7.js"></script>
<script src="js/scripts.js"></script>
<script src="js/jquery.slimscroll.js"></script>
<script src="js/jquery.nicescroll.js"></script>
<!--[if lte IE 8]><script language="javascript" type="text/javascript" src="js/flot-
chart/excanvas.min.js"></script><![endif]-->
<script src="js/jquery.scrollTo.js"></script>
</body>
</html>
<?php } ?>

Edit-state:
<?php
session_start();
error_reporting(0);
include('includes/dbconnection.php');
if (strlen($_SESSION['pgasaid']==0)) {
header('location:logout.php');
} else{
if(isset($_POST['submit']))
{
$statename=$_POST['statename'];
$eid=$_GET['editid'];
$query=mysqli_query($con, "update tblstate set StateName ='$statename' where
ID=$eid");
if ($query) {
$msg="State has been updated.";
}
else
99
{
$msg="Something Went Wrong. Please try again";
}
}
?>
<!DOCTYPE html>
<head>
<title>Paying Guest Accomodation System|| Update State </title>
<script type="application/x-javascript"> addEventListener("load", function() {
setTimeout(hideURLbar, 0); }, false); function hideURLbar(){
window.scrollTo(0,1); } </script>
<!-- bootstrap-css -->
<link rel="stylesheet" href="css/bootstrap.min.css" >
<!-- //bootstrap-css -->
<!-- Custom CSS -->
<link href="css/style.css" rel='stylesheet' type='text/css' />
<link href="css/style-responsive.css" rel="stylesheet"/>
<!-- font CSS -->
<link
href='//fonts.googleapis.com/css?family=Roboto:400,100,100italic,300,300italic,4
00italic,500,500italic,700,700italic,900,900italic' rel='stylesheet' type='text/css'>
<!-- font-awesome icons -->
<link rel="stylesheet" href="css/font.css" type="text/css"/>
<link href="css/font-awesome.css" rel="stylesheet">
<!-- //font-awesome icons -->
<script src="js/jquery2.0.3.min.js"></script>
</head>
<body>
<section id="container">
<!--header start-->
<?php include_once('includes/header.php');?>
<!--header end-->
<!--sidebar start-->
<?php include_once('includes/sidebar.php');?>
<!--sidebar end-->
100
<!--main content start-->
<section id="main-content">
<section class="wrapper">
<div class="form-w3layouts">
<!-- page start-->
<div class="row">
<div class="col-lg-12">
<section class="panel">
<header class="panel-heading">
Update State
<span class="tools pull-right">
<a class="fa fa-chevron-down" href="javascript:;"></a>
<a class="fa fa-cog" href="javascript:;"></a>
<a class="fa fa-times" href="javascript:;"></a>
</span>
</header>
<div class="panel-body">
<div class="form">
<p style="font-size:16px; color:red" align="center"> <?php if($msg){
echo $msg;
} ?> </p>
<form class="cmxform form-horizontal " method="post" action="">
<?php
$cid=$_GET['editid'];
$ret=mysqli_query($con,"select * from tblstate where ID='$cid'");
$cnt=1;
while ($row=mysqli_fetch_array($ret)) {

?>
<div class="form-group ">
<label for="adminname" class="control-label col-lg-3">State</label>
<div class="col-lg-6">
<input class=" form-control" id="statename" name="statename" type="text"
required="true" value="<?php echo $row['StateName'];?>">
</div>
101
</div>
<?php } ?>
<div class="form-group">
<div class="col-lg-offset-3 col-lg-6">
<p style="text-align: center;"> <button class="btn btn-primary" type="submit"
name="submit">Update</button></p>
</div>
</div>
</form>
</div>
</div>
</section>
</div>
</div>
<!-- page end-->
</div>
</section>
<!-- footer -->
<?php include_once('includes/footer.php');?>
<!-- / footer -->
</section>
</section>
<script src="js/bootstrap.js"></script>
<script src="js/jquery.dcjqaccordion.2.7.js"></script>
<script src="js/scripts.js"></script>
<script src="js/jquery.slimscroll.js"></script>
<script src="js/jquery.nicescroll.js"></script>
<!--[if lte IE 8]><script language="javascript" type="text/javascript" src="js/flot-
chart/excanvas.min.js"></script><![endif]-->
<script src="js/jquery.scrollTo.js"></script>
</body>
</html>
<?php } ?>
Owner login:
<?php
102
session_start();
error_reporting(0);
include('includes/dbconnection.php');
if(isset($_POST['login']))
{
$owemail=$_POST['email'];
$password=md5($_POST['password']);
$query=mysqli_query($con,"select ID from tblowner where Email='$owemail'
&& Password='$password' ");
$ret=mysqli_fetch_array($query);
if($ret>0){
$_SESSION['pgasoid']=$ret['ID'];
header('location:dashboard.php');
}
else{
$msg="Invalid Details.";
}
}
?>
<!DOCTYPE html>
<head>
<title>Paying Guest Accomodation System | Owner Login </title>

<script type="application/x-javascript"> addEventListener("load", function() {


setTimeout(hideURLbar, 0); }, false); function hideURLbar(){
window.scrollTo(0,1); } </script>
<!-- bootstrap-css -->
<link rel="stylesheet" href="css/bootstrap.min.css" >
<!-- //bootstrap-css -->
<!-- Custom CSS -->
<link href="css/style.css" rel='stylesheet' type='text/css' />
<link href="css/style-responsive.css" rel="stylesheet"/>
<!-- font CSS -->

103
<link
href='//fonts.googleapis.com/css?family=Roboto:400,100,100italic,300,300italic,4
00italic,500,500italic,700,700italic,900,900italic' rel='stylesheet' type='text/css'>
<!-- font-awesome icons -->
<link rel="stylesheet" href="css/font.css" type="text/css"/>
<link href="css/font-awesome.css" rel="stylesheet">
<!-- //font-awesome icons -->
<script src="js/jquery2.0.3.min.js"></script>
</head>
<body>
<div class="log-w3">
<div class="w3layouts-main">
<h2>Sign In Now</h2>
<form action="#" method="post" name="login">
<p style="font-size:16px; color:red" align="center"> <?php if($msg){
echo $msg;
} ?> </p>
<input type="email" class="ggg" name="email" placeholder="E-MAIL"
required="true">
<input type="password" class="ggg" name="password"
placeholder="PASSWORD" required="true">
<a href="forgot-password.php">Forgot Password?</a>
<div class="clearfix"></div>
<input type="submit" value="Sign In" name="login">
</form>
<p>Don't Have an Account ?<a href="owner-registration.php">Create an
account</a></p>
</div>
</div>
<script src="js/bootstrap.js"></script>
<script src="js/jquery.dcjqaccordion.2.7.js"></script>
<script src="js/scripts.js"></script>
<script src="js/jquery.slimscroll.js"></script>
<script src="js/jquery.nicescroll.js"></script>

104
<!--[if lte IE 8]><script language="javascript" type="text/javascript" src="js/flot-
chart/excanvas.min.js"></script><![endif]-->
<script src="js/jquery.scrollTo.js"></script>
</body>
</html>

Add pgdetails:
<?php
session_start();
error_reporting(0);
include('includes/dbconnection.php');
if (strlen($_SESSION['pgasoid']==0)) {
header('location:logout.php');
}
else{
if(isset($_POST['submit']))
{
$ownerid=$_SESSION['pgasoid'];
$statename=$_POST['state'];
$cityname=$_POST['city'];
$pgname=$_POST['pgname'];
$typepg=$_POST['typepg'];
$rpmonth=$_POST['rpmonth'];
$norooms=$_POST['norooms'];
$address=$_POST['address'];
$roomimages=$_POST['roomimages'];
$electricity=$_POST['electricity'];
$parking=$_POST['parking'];
$ref=$_POST['refregerator'];
$furnished=$_POST['furnished'];
$ac=$_POST['ac'];
$balcony=$_POST['balcony'];
$table=$_POST['table'];
$laundry=$_POST['laundry'];
$security=$_POST['security'];
105
$breakfast=$_POST['breakfast'];
$lunch=$_POST['lunch'];
$dinner=$_POST['dinner'];
$pgpic=$_FILES["roomimages"]["name"];
$extension = substr($pgpic,strlen($pgpic)-4,strlen($pgpic));
// allowed extensions
$allowed_extensions = array(".jpg","jpeg",".png",".gif");
// Validation for allowed extensions .in_array() function searches an array for a
specific value.
if(!in_array($extension,$allowed_extensions))
{
echo "<script>alert('Invalid format. Only jpg / jpeg/ png /gif format
allowed');</script>";
}
else
{
//r
$roompic=md5($pgpic).$extension;
move_uploaded_file($_FILES["roomimages"]["tmp_name"],"roomimages/".$rom
pic);
$query=mysqli_query($con, "insert into tblpg(OwnerID,StateName, CityName,
PGTitle, Type,
RPmonth,norooms,Address,Electricity,Parking,Refregerator,Furnished,AC,Balcon
y,StudyTable,Laundry,Security,MealsBreakfast,MealLunch,MealDinner,Image)
value('$ownerid','$statename','$cityname','$pgname','$typepg','$rpmonth','$noroom
s','$address','$electricity','$parking','$ref','$furnished','$ac','$balcony','$table','$laun
dry','$security','$breakfast','$lunch','$dinner','$roompic')");
if ($query) {
$msg="PG details has been submitted.";
}
else
{
$msg="Something Went Wrong. Please try again";
}

106
}
}
?>
<!DOCTYPE html>
<head>
<title>PG Accomodation System | PG Form </title>
<script type="application/x-javascript"> addEventListener("load", function() {
setTimeout(hideURLbar, 0); }, false); function hideURLbar(){
window.scrollTo(0,1); } </script>
<!-- bootstrap-css -->
<link rel="stylesheet" href="css/bootstrap.min.css" >
<!-- //bootstrap-css -->
<!-- Custom CSS -->
<link href="css/style.css" rel='stylesheet' type='text/css' />
<link href="css/style-responsive.css" rel="stylesheet"/>
<!-- font CSS -->
<link
href='//fonts.googleapis.com/css?family=Roboto:400,100,100italic,300,300italic,4
00italic,500,500italic,700,700italic,900,900italic' rel='stylesheet' type='text/css'>
<!-- font-awesome icons -->
<link rel="stylesheet" href="css/font.css" type="text/css"/>
<link href="css/font-awesome.css" rel="stylesheet">
<!-- //font-awesome icons -->
<script src="js/jquery2.0.3.min.js"></script>
<script>
function getCity(val) {
$.ajax({
type:"POST",
url:"get-city.php",
data:'sateid='+val,
success:function(data){
$("#city").html(data);
}});
}
</script>
107
</head>
<body>
<section id="container">
<!--header start-->
<?php include_once('includes/header.php');?>
<!--header end-->
<!--sidebar start-->
<?php include_once('includes/sidebar.php');?>
<!--sidebar end-->
<!--main content start-->
<section id="main-content">
<section class="wrapper">
<div class="form-w3layouts">
<div class="row">
<div class="col-lg-12">
<section class="panel">
<header class="panel-heading">
List Your PG
</header>
<div class="panel-body">
<p style="font-size:16px; color:red" align="left"> <?php if($msg){
echo $msg;
} ?> </p>
<form class="form-horizontal bucket-form" method="post"
enctype="multipart/form-data">
<div class="form-group">
<label class="col-sm-3 control-label">PG Name</label>
<div class="col-sm-6">
<input type="text" name="pgname" class="form-control" required="true">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">Type of PG:</label>
<div class="col-sm-6">
<input type="radio" name="typepg" id="typepg" value="Boys" checked="true">
108
Boys
<input type="radio" name="typepg" id="typepg" value="Girls">
Girls
<input type="radio" name="typepg" id="typepg" value="Both">
Both
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label col-lg-3" for="inputSuccess">Choose
State</label>
<div class="col-lg-6">
<select class="form-control m-bot15" name="state" id="state"
onChange="getCity(this.value);">
<option value="">Choose State</option>
<?php $query=mysqli_query($con,"select * from tblstate");
while($row=mysqli_fetch_array($query))
{
?>
<option value="<?php echo $row['StateName'];?>"><?php echo
$row['StateName'];?></option>
<?php } ?>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label col-lg-3" for="inputSuccess">Choose
City</label>
<div class="col-lg-6">
<select class="form-control m-bot15" name="city" id="city" required="true">
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">Rent Per Month</label>
<div class="col-sm-6">
109
<input class="form-control" id="rpmonth" name="rpmonth" type="text"
required="true" value="">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">Number of Rooms</label>
<div class="col-sm-6">
<input type="text" class="form-control" name="norooms" id="norooms"
required="true" value="">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">Address</label>
<div class="col-sm-6">
<textarea type="text" class="form-control" name="address" id="address" value=""
required="true"></textarea>
</div>
</div>
<div class="form-group">
<label class=" col-sm-3 control-label">Pictures</label>
<div class="col-lg-6">
<input type="file" class="form-control" name="roomimages" id="roomimages"
value="">
</div>
</div>
<hr />
<div class="form-group has-success">
<label class="col-sm-3 control-label col-lg-3" for="inputSuccess" style="text-
align: center; color: red">Facilities</label>

</div>
<div class="form-group">
<label class="col-sm-3 control-label col-lg-3"
for="inputSuccess">Electricity</label>
<div class="col-lg-6">
110
<label class="checkbox-inline">
<input type="radio" id="electricity" name="electricity" value="Yes"
required="true"> Yes
</label>
<label class="checkbox-inline">
<input type="radio" id="electricity" name="electricity" value="No"> No
</label>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label col-lg-3"
for="inputSuccess">Parking</label>
<div class="col-lg-6">
<label class="checkbox-inline">
<input type="radio" id="parking" name="parking" value="Yes" required="true">
Yes
</label>
<label class="checkbox-inline">
<input type="radio" id="parking" name="parking" value="No" required="true">
No
</label>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label col-lg-3"
for="inputSuccess">Refregerator</label>
<div class="col-lg-6">
<label class="checkbox-inline">
<input type="radio" id="refregerator" name="refregerator" value="Yes"
required="true"> Yes
</label>
<label class="checkbox-inline">
<input type="radio" id="refregerator" name="refregerator" value="No"> No
</label>
</div>
111
</div>
<div class="form-group">
<label class="col-sm-3 control-label col-lg-3" for="inputSuccess">Full
Furnished</label>
<div class="col-lg-6">
<label class="checkbox-inline">
<input type="radio" id="furnished" name="furnished" value="Yes"
required="true"> Yes
</label>
<label class="checkbox-inline">
<input type="radio" id="furnished" name="furnished" value="No"> No
</label>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label col-lg-3" for="inputSuccess">AC</label>
<div class="col-lg-6">
<label class="checkbox-inline">
<input type="radio" id="ac" name="ac" value="Yes" required="true"> Yes
</label>
<label class="checkbox-inline">
<input type="radio" id="ac" name="ac" value="No"> No
</label>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label col-lg-3"
for="inputSuccess">Balcony</label>
<div class="col-lg-6">
<label class="checkbox-inline">
<input type="radio" id="balcony" name="balcony" value="Yes" required="true">
Yes
</label>
<label class="checkbox-inline">
<input type="radio" id="balcony" name="balcony" value="No"> No
112
</label>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label col-lg-3" for="inputSuccess">Table/Study
Lamp</label>
<div class="col-lg-6">
<label class="checkbox-inline">
<input type="radio" id="table" name="table" value="Yes" required="true"> Yes
</label>
<label class="checkbox-inline">
<input type="radio" id="table" name="table" value="No"> No
</label>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label col-lg-3"
for="inputSuccess">Laundry</label>
<div class="col-lg-6">
<label class="checkbox-inline">
<input type="radio" id="laundry" name="laundry" value="Yes" required="true">
Yes
</label>
<label class="checkbox-inline">
<input type="radio" id="laundry" name="laundry" value="No"> No
</label>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label col-lg-3"
for="inputSuccess">Security</label>
<div class="col-lg-6">
<label class="checkbox-inline">
<input type="radio" id="security" name="security" value="Yes" required="true">
Yes
113
</label>
<label class="checkbox-inline">
<input type="radio" id="security" name="security" value="No"> No
</label>
</div>
</div>
<hr />
<div class="form-group has-success">
<label class="col-sm-3 control-label col-lg-3" for="inputSuccess" style="text-
align: center; color: red">Meals</label>
</div>
<div class="form-group">
<label class="col-sm-3 control-label col-lg-3" for="inputSuccess">Choose meals
which you offer with PG</label>
<div class="col-lg-6">
<label class="checkbox-inline">
<input type="checkbox" id="breakfast" name="breakfast" value="Yes"> Breakfast
</label>
<label class="checkbox-inline">
<input type="checkbox" id="lunch" name="lunch" value="Yes"> Lunch
</label>
<label class="checkbox-inline">
<input type="checkbox" id="dinner" name="dinner" value="Yes"> Dinner
</label>
</div>
</div>
<hr />
<div class="form-group">
<div class="col-lg-offset-3 col-lg-6">
<button class="btn btn-primary" type="submit" name="submit">Submit</button>
</div>
</div>
</form>
</div>
</section>
114
<!-- page end-->
</div>
</section>
<!-- footer -->
<?php include_once('includes/footer.php');?>
<!-- / footer -->
</section>
<!--main content end-->
</section>
<script src="js/bootstrap.js"></script>
<script src="js/jquery.dcjqaccordion.2.7.js"></script>
<script src="js/scripts.js"></script>
<script src="js/jquery.slimscroll.js"></script>
<script src="js/jquery.nicescroll.js"></script>
<!--[if lte IE 8]><script language="javascript" type="text/javascript" src="js/flot-
chart/excanvas.min.js"></script><![endif]-->
<script src="js/jquery.scrollTo.js"></script>
</body>
</html>
<?php } ?>

Cancelled-pgbooking:
<?php
session_start();
error_reporting(0);
include('includes/dbconnection.php');
if (strlen($_SESSION['pgasoid']==0)) {
header('location:logout.php');
} else{
?>
<!DOCTYPE html>
<head>
<title>Paying Guest Accomodation System|| Booking Requests</title>

115
<script type="application/x-javascript"> addEventListener("load", function() {
setTimeout(hideURLbar, 0); }, false); function hideURLbar(){
window.scrollTo(0,1); } </script>
<!-- bootstrap-css -->
<link rel="stylesheet" href="css/bootstrap.min.css" >
<!-- //bootstrap-css -->
<!-- Custom CSS -->
<link href="css/style.css" rel='stylesheet' type='text/css' />
<link href="css/style-responsive.css" rel="stylesheet"/>
<!-- font CSS -->
<link
href='//fonts.googleapis.com/css?family=Roboto:400,100,100italic,300,300italic,4
00italic,500,500italic,700,700italic,900,900italic' rel='stylesheet' type='text/css'>
<!-- font-awesome icons -->
<link rel="stylesheet" href="css/font.css" type="text/css"/>
<link href="css/font-awesome.css" rel="stylesheet">
<!-- //font-awesome icons -->
<script src="js/jquery2.0.3.min.js"></script>
</head>
<body>
<section id="container">
<!--header start-->
<?php include_once('includes/header.php');?>
<!--header end-->
<!--sidebar start-->
<?php include_once('includes/sidebar.php');?>
<!--sidebar end-->
<!--main content start-->
<section id="main-content">
<section class="wrapper">
<div class="table-agile-info">
<div class="panel panel-default">
<div class="panel-heading">
Confirmed Request for Paying Guest
</div>
116
<div>
<table class="table" ui-jq="footable" ui-options='{
"paging": {
"enabled": true
},
"filtering": {
"enabled": true
},
"sorting": {
"enabled": true
}}'>
<thead>
<tr>
<th data-breakpoints="xs">S.NO</th>
<th>User Name</th>
<th>Booking Number</th>
<th>PG Name</th>
<th>Checkin Date</th>
<th>Booking Date</th>
<th data-breakpoints="xs">Action</th>

</tr>
</thead>
<?php
$oid=$_SESSION['pgasoid'];
$ret=mysqli_query($con,"select
tblbookpg.ID,tblbookpg.BookingNumber,tblbookpg.CheckinDate,tblbookpg.Booki
ngDate,tblpg.PGTitle,tbluser.FullName from tblbookpg join tblpg on
tblpg.ID=tblbookpg.Pgid join tbluser on tbluser.ID=tblbookpg.Userid where
tblpg.OwnerID='$oid' && tblbookpg.Status='Cancelled'");
$cnt=1;
while ($row=mysqli_fetch_array($ret)) {
?>
<tbody>
117
<tr data-expanded="true">
<td><?php echo $cnt;?></td>
<td><?php echo $row['FullName'];?></td>
<td><?php echo $row['BookingNumber'];?></td>
<td><?php echo $row['PGTitle'];?></td>
<td><?php echo $row['CheckinDate'];?></td>
<td><?php echo $row['BookingDate'];?></td>
<td><a href="view-requestdetails.php?viewid=<?php echo $row['ID'];?>">View
Details</a>
</tr>
<?php
$cnt=$cnt+1;
}?>
</tbody>
</table>
</div>
</div>
</div>
</section>
<!-- footer -->
<?php include_once('includes/footer.php');?>
<!-- / footer -->
</section>
<!--main content end-->
</section>
<script src="js/bootstrap.js"></script>
<script src="js/jquery.dcjqaccordion.2.7.js"></script>
<script src="js/scripts.js"></script>
<script src="js/jquery.slimscroll.js"></script>
<script src="js/jquery.nicescroll.js"></script>
<!--[if lte IE 8]><script language="javascript" type="text/javascript" src="js/flot-
chart/excanvas.min.js"></script><![endif]-->
<script src="js/jquery.scrollTo.js"></script>
</body>
</html>
118
<?php } ?>

Confirmed pgbooking:
<?php
session_start();
error_reporting(0);
include('includes/dbconnection.php');
if (strlen($_SESSION['pgasoid']==0)) {
header('location:logout.php');
} else{
?>
<!DOCTYPE html>
<head>
<title>Paying Guest Accomodation System|| Booking Requests</title>
<script type="application/x-javascript"> addEventListener("load", function() {
setTimeout(hideURLbar, 0); }, false); function hideURLbar(){
window.scrollTo(0,1); } </script>
<!-- bootstrap-css -->
<link rel="stylesheet" href="css/bootstrap.min.css" >
<!-- //bootstrap-css -->
<!-- Custom CSS -->
<link href="css/style.css" rel='stylesheet' type='text/css' />
<link href="css/style-responsive.css" rel="stylesheet"/>
<!-- font CSS -->
<link
href='//fonts.googleapis.com/css?family=Roboto:400,100,100italic,300,300italic,4
00italic,500,500italic,700,700italic,900,900italic' rel='stylesheet' type='text/css'>
<!-- font-awesome icons -->
<link rel="stylesheet" href="css/font.css" type="text/css"/>
<link href="css/font-awesome.css" rel="stylesheet">
<!-- //font-awesome icons -->
<script src="js/jquery2.0.3.min.js"></script>
</head>
<body>
<section id="container">
119
<!--header start-->
<?php include_once('includes/header.php');?>
<!--header end-->
<!--sidebar start-->
<?php include_once('includes/sidebar.php');?>
<!--sidebar end-->
<!--main content start-->
<section id="main-content">
<section class="wrapper">
<div class="table-agile-info">
<div class="panel panel-default">
<div class="panel-heading">
Confirmed Request for Paying Guest
</div>
<div>
<table class="table" ui-jq="footable" ui-options='{
"paging": {
"enabled": true
},
"filtering": {
"enabled": true
},
"sorting": {
"enabled": true
}}'>
<thead>
<tr>
<th data-breakpoints="xs">S.NO</th>
<th>User Name</th>
<th>Booking Number</th>
<th>PG Name</th>
<th>Checkin Date</th>
<th>Booking Date</th>
<th data-breakpoints="xs">Action</th>

120
</tr>
</thead>
<?php
$oid=$_SESSION['pgasoid'];
$ret=mysqli_query($con,"select
tblbookpg.ID,tblbookpg.BookingNumber,tblbookpg.CheckinDate,tblbookpg.Booki
ngDate,tblpg.PGTitle,tbluser.FullName from tblbookpg join tblpg on
tblpg.ID=tblbookpg.Pgid join tbluser on tbluser.ID=tblbookpg.Userid where
tblpg.OwnerID='$oid' && tblbookpg.Status='Confirmed'");
$cnt=1;
while ($row=mysqli_fetch_array($ret)) {
?>
<tbody>
<tr data-expanded="true">
<td><?php echo $cnt;?></td>
<td><?php echo $row['FullName'];?></td>
<td><?php echo $row['BookingNumber'];?></td>
<td><?php echo $row['PGTitle'];?></td>
<td><?php echo $row['CheckinDate'];?></td>
<td><?php echo $row['BookingDate'];?></td>
<td><a href="view-requestdetails.php?viewid=<?php echo $row['ID'];?>">View
Details</a>
</tr>
<?php
$cnt=$cnt+1;
}?>
</tbody>
</table>
</div>
</div>
</div>
</section>
<!-- footer -->
<?php include_once('includes/footer.php');?>
121
<!-- / footer -->
</section>
<!--main content end-->
</section>
<script src="js/bootstrap.js"></script>
<script src="js/jquery.dcjqaccordion.2.7.js"></script>
<script src="js/scripts.js"></script>
<script src="js/jquery.slimscroll.js"></script>
<script src="js/jquery.nicescroll.js"></script>
<!--[if lte IE 8]><script language="javascript" type="text/javascript" src="js/flot-
chart/excanvas.min.js"></script><![endif]-->
<script src="js/jquery.scrollTo.js"></script>
</body>
</html>
<?php } ?>

Manage-pgdetail:
<?php
session_start();
error_reporting(0);
include('includes/dbconnection.php');
if (strlen($_SESSION['pgasoid']==0)) {
header('location:logout.php');
} else{
?>
<!DOCTYPE html>
<head>
<title>Paying Guest Accomodation System|| Manage State </title>
<script type="application/x-javascript"> addEventListener("load", function() {
setTimeout(hideURLbar, 0); }, false); function hideURLbar(){
window.scrollTo(0,1); } </script>
<!-- bootstrap-css -->
<link rel="stylesheet" href="css/bootstrap.min.css" >
<!-- //bootstrap-css -->
<!-- Custom CSS -->
122
<link href="css/style.css" rel='stylesheet' type='text/css' />
<link href="css/style-responsive.css" rel="stylesheet"/>
<!-- font CSS -->
<link
href='//fonts.googleapis.com/css?family=Roboto:400,100,100italic,300,300italic,4
00italic,500,500italic,700,700italic,900,900italic' rel='stylesheet' type='text/css'>
<!-- font-awesome icons -->
<link rel="stylesheet" href="css/font.css" type="text/css"/>
<link href="css/font-awesome.css" rel="stylesheet">
<!-- //font-awesome icons -->
<script src="js/jquery2.0.3.min.js"></script>
</head>
<body>
<section id="container">
<!--header start-->
<?php include_once('includes/header.php');?>
<!--header end-->
<!--sidebar start-->
<?php include_once('includes/sidebar.php');?>
<!--sidebar end-->
<!--main content start-->
<section id="main-content">
<section class="wrapper">
<div class="table-agile-info">
<div class="panel panel-default">
<div class="panel-heading">
Paying Guest Details
</div>
<div>
<table class="table" ui-jq="footable" ui-options='{
"paging": {
"enabled": true
},
"filtering": {
"enabled": true
123
},
"sorting": {
"enabled": true
}}'>
<thead>
<tr>
<th data-breakpoints="xs">S.NO</th>
<th>PG Name</th>
<th>State Name</th>
<th>City Name</th>
<th>Registration Date</th>
<th data-breakpoints="xs">Action</th>
</tr>
</thead>
<?php
$oid=$_SESSION['pgasoid'];
$ret=mysqli_query($con,"select * from tblpg where OwnerID='$oid'");
$cnt=1;
while ($row=mysqli_fetch_array($ret)) {
?>
<tbody>
<tr data-expanded="true">
<td><?php echo $cnt;?></td>
<td><?php echo $row['PGTitle'];?></td>
<td><?php echo $row['StateName'];?></td>
<td><?php echo $row['CityName'];?></td>
<td><?php echo $row['RegDate'];?></td>
<td><a href="edit-pgdetails.php?editid=<?php echo $row['ID'];?>">Edit
Details</a>
</tr>
<?php
$cnt=$cnt+1;
}?>
</tbody>
</table>
124
</div>
</div>
</div>
</section>
<!-- footer -->
<?php include_once('includes/footer.php');?>
<!-- / footer -->
</section>
<!--main content end--></section>
<script src="js/bootstrap.js"></script>
<script src="js/jquery.dcjqaccordion.2.7.js"></script>
<script src="js/scripts.js"></script>
<script src="js/jquery.slimscroll.js"></script>
<script src="js/jquery.nicescroll.js"></script>
<!--[if lte IE 8]><script language="javascript" type="text/javascript" src="js/flot-
chart/excanvas.min.js"></script><![endif]-->
<script src="js/jquery.scrollTo.js"></script>
</body>
</html>
<?php } ?>

125
7 User Interface

Admin Login Page

Dashboard

126
Admin Profile

Change Password

127
Add State

Manage State

128
Update State

Add City

129
Manage City

130
Update City

Pg Owner Detail

PG Detail

131
View PG Detail

About us

132
Contact Detail

Forget Password

133
Reset Password

Owner Login

134
Owner Registered

Owner Dashboard

135
Owner Profile

Change Password

136
137
Add PG

138
Manage PG

Forget Password

139
Update PG

140
Update Image

Booking Request

141
New Request

142
Confirmed Request

Search

143
Notification

Recover Password

144
145
About Us

146
Contact Us

147
User Sign Up

148
Sign in

149
Book PG

150
User Profile

151
Booking

152
Change Password

153
Forget Password

154
7. SYSTEM TESTING

▪ Software Testing Techniques: Software testing is a critical element of software quality


assurance and represents the ultimate review of specification, designing and coding.

▪ Testing Objectives :
✓ Testing is process of executing a program with the intent of finding an error.
✓ A good test case design is one that has a probability of finding an as yet undiscovered
error.
✓ A successful test is one that uncovers an as yet undiscovered error.
✓ These above objectives imply a dramatic change in view port.
✓ Testing cannot show the absence of defects, it can only show that software errors are
present.

There are three types of testing strategies 1. Unit test 2. Integration test 3. Performance test 4.
System testing
1) Unit Testing:
Unit testing focuses verification efforts on the smallest unit of software design module.
The unit test is always white box oriented. The tests that occur as part of unit testing are
testing the module interface, examining the local data structures, testing the boundary
conditions, execution all the independent paths and testing error handling paths.
2) Integration Testing:
Integration testing is a systematic technique or construction the program structure while
at the same time conducting tests to uncover errors associated with interfacing. Scope of
testing summarizes the specific functional, performance, and internal design
characteristics that are to be tested. It employs top-down testing and bottom-up testing
methods for this case.
3) Performance Testing:
Timing for both read and update transactions should be gathered to determine whether
system functions are being performed in an acceptable timeframe.
4) System Testing:
After the system is put together, system testing is performed. Here the system is tested
against the system requirement to check whether the entire requirements are met and
whether the system performs as specified by the requirement

▪ Test cases:

155
The case is input that geniuses of the program and successful execution of
the test cases recall there are no errors in the program they are under
testing In our project following test cases are generated

Test case ID: 01

Title: Admin login


Purpose: To identify the admin
Test Data: Valid username and password, invalid username and password, empty field.
Steps:
1. Enter the username and password
2. Expected Output: login successful.
3. Invalid Output: It shows error message “Invalid details”.
4. Empty Field If username and password empty, it shows error message “please fill out this
field”.

Test Case ID: 02

Title:
Purpose: To add the new state and city.
Test data: All details must be specified (State name, City name), empty field.
Steps:
1. Enter all the details.
2. Expected Output: State added successfully
3. Empty field If any of these fields are empty, it will show error message “please fill out of
this field”

Test Case ID: 03

Tittle: Owner Login.


Purpose: To identify the Owner.
Test Data: Valid username and password, invalid username and password, empty field.

156
Steps:
1. Enter the username and password.
2. Expected Output: login successful.
3. Invalid Output: It shows error message “Invalid details”.
4. Empty Field If username and password empty, It shows error message “please fill out this
field”.

Test Case ID: 04

Title: Add Pg rooms.


Purpose: To create Pg room.
Test data: All details must be specified (Pg Name,category,Address,Facilities), empty field.
Steps:
1. Enter the all the details to create receipt.
2. Expected Output: receipt is created successfully.
3. Empty field If any of these fields are empty, it will show error message “please fill out of
this field

Test Case ID: 05

Title: Manage PG rooms.


Purpose: To update or edit the PG rooms.
Test Data: Valid PG information, Invalid PG information, empty field.
Steps:
1. Enter the Edit Details.
2. Expected Output: If successfully updated is shows “PG details has been updated”.
3. Empty Field If any field is empty, it shows error message “please fill out this field”.

Test Case ID: 06

157
Title: Booking Request.
Purpose: Check new Booking Request by Owner to confirm or cancel.
Test Data: valid Customer information, invalid customer information, empty field.
Steps:
Enter the New Bookings to view and confirm or cancel request.
Expected Output: If booking is confirmed or cancelled, it shows “Remark has been updated”.
Empty Field If no booking is done, it shows blank field.

Test Case ID: 07

Title: Confirm Booking


Purpose: To view confirmed booking lists.
Test Data: valid User Name, Booking number, PG name, Check-In Date, Booking date, Action
empty field.
Steps:
Enter the Confirm Booking.
Expected Output: If PG booking is confirmed, it shows Confirmed Request for Paying Guest.
Empty Field If no PG confirmed, it shows bank list.

Test Case ID: 07

Title: Cancelled Booking


158
Purpose: To view cancelled booking list
Test data: valid User Name, Booking number, PG name, Check-In Date, Booking date, Action
empty field.
Steps:
Enter Cancelled booking.
Expected Output: If PG booking is cancelled, it shows Cancelled Request for Paying Guest..
Empty Field If no PG cancelled, it shows bank list.

Test Case ID: 08


Title: Search
Purpose: To search PG by Booking Number.
Test Data: valid Booking Number, empty field.
Steps:
Enter the Booking Number in search bar.
Expected Output: If it is valid Booking Number, it will display “Result against ‘Booking
Number’ keyword
Invalid output: It it is invalid Booking Number, it shows “No record found against this search”.
Empty Field If search bar is empty, It shows error message “please fill out this field”.

159
CONCLUSION

This website provides a web portal that is a paying guest accommodation system which will
benefit the students as well as the parents.

It makes entire process online where student and parents can search room online just by few
clicks. It also has a facility for admin login where admin can login and can see status of flats and
room issued as well change there status or give some suggestions. It has a facility of services
form where anyone can search for their accommodation and also a suggestion page is there
where necessary suggestion to the portal can be made and a mesmerizing collection of pictures
so that the overview of the campus can be collected.

Overall this website will help the students as well Parents and will make management of the
accommodation very easy very easy.

THANK YOU

160

You might also like