PG Complete
PG Complete
1.3Project category:
Web Development
1.4Languages to be used:
Front-End – PHP, HTML, CSS.
Back-End – MYSQL.
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.
3.Change 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.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.
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
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.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.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.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
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
Register /signup
State(add/manage) List your PG
v
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.
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.
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
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:
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.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.
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:
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:
4 city Table:
5 Owner Table:
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:
6 PG Table:
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:
Symbols Conventions
21
Entity
Relation
Weak entity
Identifying relations
Attributes
Derived attributes
Key attributes
E1 R E2 Total participation E1 in R
1
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
24
Login
4.1.1.4 Data Structure:
Login Details.
Add State
Edit
25
4.1.1.4 Data Structure:
State module.
Add Cities
Edit
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.
Admin
Reg Owner
Register Pg Module:
View Pg
Pages
Home
Owner
Add Pg
4.1.1.4 Data Structure:
Pg details.
ManagePg
Owner
New booking
29
4.1.4 Data Structure:
Booking details
New Booking
Confirm booking
Cancel booking
30
4.2.2 Identification of modules:
This module is used by user for Booking pgs
Home
User
View Pg
2 Booking Module:
4.2.1 Design assumptions:
Not applicable
4.2.2 Identification of modules:
Here user can book pg
User
31
Booking pg
32
Indicates the start and end
Terminator of the process
It indicates direction of
Flow of control flow of control.
33
5.5.1 Design module of Admin:
• Structure chart
Admin
• 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
35
5.5.1.2 Procedural details: Structured chat showing hierarchy
of add state module.
• Structure chart
Add state
• 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
37
• Structured chart
Manage state
Validation
State details
Step 1. Start
Step 2 state details will be displayed.
Else
Step 6. Stop
38
Flowchart
Start
Manage 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
39
• Structured chart
Add city
Validation
City Name
Step 1. Start
Step 2. Input city
else
display the error message
Step 5. Stop
40
• Flowchart
Start
False
Valid
true
City is added
successfully
End
41
• Structured chart
manage City
Validation
city details
Step 1. Start
Step 2 manage city will be displayed.
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
43
Algorithm
Step 1. Start
Step 2. Select register owner
Step 3. Registered owner will be displayed
Step 4. Stop
Structured chart
Register owner
Flow chart
Start
Select register
owner
Register owner
displayed
Stop
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
45
Flow chart
Start
Select
registered PG
Register PG
displayed
Stop
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
Start
Select Pages
About us/Contact
us are displayed
Stop
47
5.5.1 Design module of Owner:
• Structure chart
Owner
• 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.
49
5.5.4.2 Procedural details: Structured chart showing hierarchy of
Add PG module
• Structured chart
Add PG
Validation
PG details
Step 1. Start
Step 2. Input PG
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
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
Flow chart
Start
Select new
booking
New booked
list displayed
52
Stop
Algorithm
Step 1. Start
Step 2. Select confirm Bookings
Step 3. New Booking lists will be displayed
Step 4. Stop
Structured chart
Confirm Bookings
53
Flow chart
Start
Select confirm
booking
Booking confirmed
displayed
Stop
54
Step 4. Stop
Structured chart
Cancel Bookings
Flow chart
Start
Select cancel
booking
Booking cancel
displayed
Stop
55
5.5.1 Design module of User:
• Structure chart
User
• 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.
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
Flow chart
Start
Select View PG
Stop
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
Flow chart
Start
Select booking
Booked successful
displayed
59
Stop
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 } ?>
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>
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
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
▪ 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
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”
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”.
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.
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