Pre School
Pre School
1.1 INTRODUCTION
            Project title “pre school enrollment” (a project for keeping customers record and
also calculate customer bill slip and managers salary) The name of project is “Pre school
enrollment”. The objective of the project is to computerize the system of the hotel. “pre school
Endrollment” is the project not only keeps the record of various people like customers, manager
etc. but as well as it reduce the extensive paper work in the present system. It wills maker the
system more versatile and user friendly. It also calculates the proper billing slip of high level
and middle level customers. This project is based on description about the structure of PRE
SCHOOL ENROLLMENT
Research potential preschools in your area – public, private, religious, Montessori, co-ops,
university-affiliated programs, etc. Consider logistics, quality ratings, teaching philosophy, and
styles that best fit your child’s needs and personality. Schedule visits to narrow choices.
Check on the application process and requirements for each school. This may include forms,
documentation, interviews, orientation sessions, and deposits to secure spots. Some schools
have very little required for enrollment, while others may have extensive steps. Prepare
everything needed in advance of deadlines.
Complete all steps required for application for all schools applying to. This may include basic
contact/family information, any needed documentation of age/immunizations/health records,
any testing requirements, special needs assessments (if applicable), orientation/interviews, etc.
Follow each school’s specific instructions.
If accepted, you may need to pay a non-refundable deposit and complete any additional
paperwork by a specified date to secure your child’s spot in the incoming preschool class. This
                                                1
is especially important for very popular schools or those with waitlists. Sometimes, you remain
on waitlists after paying the deposit in case an opening becomes available later on.
Mark your calendar for any upcoming dates from the preschool— start dates, open houses,
‘meet the teacher’ sessions, and orientation days. You want ample time to take off work,
purchase any supplies, arrange transportation, or complete preparations as needed for a smooth
start to the school year. Maintain contact with the school over the summer months in case any
questions or issues arise.
1.2SYSTEM SPECIFICATION
       PHP is the web development language written by and for web developers. PHP stands
for PHP: Hypertext Pre-processor. The product was originally named Personal Home Page
                                               2
Tools, and many people still think that’s what the acronym stands for, but as it expanded in
scope, a new and more appropriate name was selected by community vote. PHP is currently
in its sixth major rewrite, called PHP6 or just plain PHP.
                                               3
                                          CHAPTER 2
       In the existing system, only provides the information about particular hotel and only
some of the hotels has possibility to reserve the rooms. The previous system was failure to
publish the room’s availability of multiple hotels. And, it is failure to provide defence to admin
+and user information.
DISADVANTAGES:
•   In the existing system, only provides the information about particular hotel and only some
    of the hotels has possibility to reserve the rooms.
•   The previous system was failure to publish the room’s availability of multiple hotels.
•   And, It is failure to provide defence to admin and user information.
       The hotel management system provides the quality service to the end user.
This project aims at creating on Hotel Management System which can be used by Admin and
Customers. The admin to advise/publish the availability of rooms in different hotels and
customers are checking the availability of room in required hotel. Customers should be able to
know the availability of the rooms on a particular date to reserve in hotel. They should be able
to reserve the available rooms according to their need in advance. To make their stay
comfortable. The admin hands the booking information of customers. The users can register
and log into the system. The administrator will know the details of reservation and daily income
       ADVANTAGES:
           •   To overcome the problems of Existing System, online hotel management system
               is proposed.
           •   It provides the good publishing services to end users. Means the admin can
               publish the availability of rooms in different hotels and this information
               visible at users/customer side. So, it providing the good publishing process.
           •   The central objective of hotel management is to provide online facility for
               booking rooms.
           •   This project provides high security to Admin and user information
           •   This software can manage and keep records of Note
                                                4
                      CHAPTER 3
3.1.1MODULES:
• ADMIN
       • LOGIN
       • USERNAME
       • DASHBOARD
       • SUBADMIN
       • TEACHER
       • CLASS
       • LOGOUT
                           5
    ➢ LOGIN:
             The main activities in the application are the user login page for user. The other
modules are followed by this login page. this module records only user and password of the
user.
➢ USER NAME:
                A computer system might have many accounts, each of which would have a
different username.
    ➢ PASSWORD:
        A password is a string of characters used to verify the identity of a user during the
authentication process. Passwords are typically used in tandem with a username; they are
designed to be known only to the user and allow that user to gain access to a device, application
or website. Passwords can vary in length and can contain letters, numbers and special
characters
➢ DASHBOARD
                                                6
   ➢ SUB ADMIN:
       Sub-admins are just next to the hierarchy of the admins when it
       comes to roles and permissions. If you want to assign them any
       additional roles, you can do that as well. You will also have to assign
       them publishers and advertisers; if no one is assigned, the system will
       automatically pick them up.
➢ TEACHERS
       Informally the role of teacher may be taken on by anyone (e.g. when showing a
   colleague how to perform a specific task). In some countries, teaching young people of
   school age may be carried out in an informal setting, such as within the family
   (homeschooling), rather than in a formal setting such as a school or college. Some other
   professions may involve a significant amount of teaching (e.g. youth worker, pastor).
➢ CLASS
It can be the group of students at the same level in an institution: the freshman class; or the
group of students which matriculates to or graduates from the institution at the same time: the
Class of 2005. The term can be used in a slightly more general context, such as "the
graduating class." Some schools have class reunions, where members of a certain graduating
class have the opportunity to meet again, and socialize with each other.
It can also refer to the classroom, in the building or venue where such a lesson is conducted.
In some countries' educational systems (such as Taiwan's), it can refer to a subdivision of the
students in an academic department, consisting of a cohort of students of the same academic
level. For example, a department's sophomores may be divided into three classes
                                                7
   ➢ LOGOUT
       The period between the login and the logout is the duration of the login session, which
is the period that a user can perform his/her actions. Logging out can be accomplished in two
ways: by using the log-out option provided by an application or by the system, or by shutting
down the computer or closing an application without explicitly logging out. Some websites
automatically log out a user if the login session has become inactive for long periods. There
are certain applications that provide auto logout and multi-application logouts.
       Logging out helps prevent other users from accessing the system without verifying their
credentials. It also helps protect the current user’s access or prevent unauthorized actions on
the current login session and is thus an important part of security. Logging out ensures that user
access and user credentials are safe after the login session
These days, several preschools use various curricula. Everybody has their distinct
methods. Talking over the curriculum with the principal and teaching staff is
brilliant. Determine if the curriculum is a corporate chain’s standard, cookie-cut
approach or whether it was created with passion and vision to help each kid build
his or her foundation.
Examine whether the school’s personnel can use the curriculum designer’s eye.
Verify if the curriculum emphasises rote learning or offers plenty of hands-on
activities like DIY projects and painting to let the kid freely express her creativity.
                                                8
                                          CHAPTER 4
➢ PHP STRENGTHS
                                               9
    Low cost
    Ease of learning and use
    Strong object oriented support
    Portability
    Flexibility of development approach
    Availability of source code
    Availability of support and documentation
➢ NEW IN PHP
➢ USES OF PHP
TOP FEATURES
      Open Source (Only one file encrypted)
      Nice layout from start.
      Unlimited level of categories.
      Unique Extra Fields that is also sort able.
      Large user community.
      Regions Module is included (using Ajax).
                                              10
➢ ADMIN AREA
➢ GENERAL FEATURES
                                           11
                                        CHAPTER 5
   ➢ MYSQL STRENGTHS
MYSQL has much strength, including the following
    High performance
    Low cost
    Ease of configuring and learning
    Portability
    Availability of source code
    Availability of support
➢ NEW IN MYSQL
                                               12
    Cursor support
       Some of these are dependent on the other, for example not all operating system run
on all hardware not all web servers support all programming language.
       The majority of PHP code can be written to be portable between operating system
and web servers there are some PHP functions that specifically relate to the file system
there are operating system dependent.
  •   WAMP SERVER
  •   LAMP SERVER
  •   MAMP SEVER
  •   XAMPP SERVER
                                              13
                     CHAPTER 6
6.1 FLOW CHART:
                   START
 Start
Login
Search
                                      store
                                  information
End Process
                             14
6.2 CLASS DIAGRAM:
ADMIN DETAILS
STUDENT DETAILS
                               • First Name
                               • Last Name
                               • Contact Number
                               • Email Address
                               • ID Card Type
                               • Select ID Card Number
                               • Residential Address
                     15
6.3 DATA FLOW DIAGRAM:
Staff Section
User name
Password TEACHER
                     -
                 SUBADMI         CLASS
                            16
6.4 SCREENSHORT
1. NEW ENROLLMENT
                    17
2. Admin Dashboard
                     18
3. Admin New Enrollments
                           19
6.5 Source code
1.MAIN PROGRAM
<?php
include_once 'db.php';
session_start();
if (isset($_POST['login'])) {
$email = $_POST['email'];
$password = $_POST['password'];
if (isset($_POST['add_room'])) {
$room_type_id = $_POST['room_type_id'];
                                             20
$room_no = $_POST['room_no'];
if ($room_no != '') {
$sql = "SELECT * FROM room WHERE room_no = '$room_no'";
if (mysqli_num_rows(mysqli_query($connection, $sql)) >= 1) {
$response['done'] = false;
$response['data'] = "Room No Already Exist";
} else {
$query           =   "INSERT     INTO     room      (room_type_id,room_no)   VALUES
('$room_type_id','$room_no')";
$result = mysqli_query($connection, $query);
if ($result) {
$response['done'] = true;
$response['data'] = 'Successfully Added Room';
} else {
$response['done'] = false;
$response['data'] = "DataBase Error";
}
}
} else {
$response['done'] = false;
$response['data'] = "Please Enter Room No";
}
echo json_encode($response);
}
if (isset($_POST['room'])) {
$room_id = $_POST['room_id'];
                                               21
$sql = "SELECT * FROM room WHERE room_id = '$room_id'";
$result = mysqli_query($connection, $sql);
if ($result) {
$room = mysqli_fetch_assoc($result);
$response['done'] = true;
$response['room_no'] = $room['room_no'];
$response['room_type_id'] = $room['room_type_id'];
} else {
$response['done'] = false;
$response['data'] = "DataBase Error";
}
echo json_encode($response);
}
if (isset($_POST['edit_room'])) {
$room_type_id = $_POST['room_type_id'];
$room_no = $_POST['room_no'];
$room_id = $_POST['room_id'];
if ($room_no != '') {
$query = "UPDATE room SET room_no = '$room_no',room_type_id = '$room_type_id' where
room_id = '$room_id'";
$result = mysqli_query($connection, $query);
if ($result) {
$response['done'] = true;
$response['data'] = 'Successfully Edit Room';
} else {
$response['done'] = false;
$response['data'] = "DataBase Error";
}
                                                22
} else {
$response['done'] = false;
$response['data'] = "Please Enter Room No";
}
echo json_encode($response);
}
if (isset($_GET['delete_room'])) {
$room_id = $_GET['delete_room'];
$sql = "UPDATE room set deleteStatus = '1' WHERE room_id = '$room_id' AND status IS NULL";
$result = mysqli_query($connection, $sql);
if ($result) {
header("Location:index.php?room_mang&success");
} else {
header("Location:index.php?room_mang&error");
}
}
if (isset($_POST['room_type'])) {
$room_type_id = $_POST['room_type_id'];
$sql = "SELECT * FROM room WHERE room_type_id = '$room_type_id' AND status IS NULL
AND deleteStatus = '0'";
$result = mysqli_query($connection, $sql);
if ($result) {
echo "<option selected disabled>Select Room Type</option>";
while ($room = mysqli_fetch_assoc($result)) {
echo "<option value='" . $room['room_id'] . "'>" . $room['room_no'] . "</option>";
}
                                              23
} else {
echo "<option>No Available</option>";
}
}
if (isset($_POST['room_price'])) {
$room_id = $_POST['room_id'];
$sql = "SELECT * FROM room NATURAL JOIN room_type WHERE room_id = '$room_id'";
$result = mysqli_query($connection, $sql);
if ($result) {
$room = mysqli_fetch_assoc($result);
echo $room['price'];
} else {
echo "0";
}
}
if (isset($_POST['booking'])) {
$room_id = $_POST['room_id'];
$check_in = $_POST['check_in'];
$check_out = $_POST['check_out'];
$total_price = $_POST['total_price'];
$name = $_POST['name'];
$contact_no = $_POST['contact_no'];
$email = $_POST['email'];
$id_card_id = $_POST['id_card_id'];
$id_card_no = $_POST['id_card_no'];
$address = $_POST['address'];
                                             24
$customer_sql                =                "INSERT             INTO                 customer
(customer_name,contact_no,email,id_card_type_id,id_card_no,address)                     VALUES
('$name','$contact_no','$email','$id_card_id','$id_card_no','$address')";
$customer_result = mysqli_query($connection, $customer_sql);
if ($customer_result) {
$customer_id = mysqli_insert_id($connection);
$booking_sql                 =                "INSERT             INTO                  booking
(customer_id,room_id,check_in,check_out,total_price,remaining_price)                    VALUES
('$customer_id','$room_id','$check_in','$check_out','$total_price','$total_price')";
$booking_result = mysqli_query($connection, $booking_sql);
if ($booking_result) {
$room_stats_sql = "UPDATE room SET status = '1' WHERE room_id = '$room_id'";
if (mysqli_query($connection, $room_stats_sql)) {
$response['done'] = true;
$response['data'] = 'Successfully Booking';
} else {
$response['done'] = false;
$response['data'] = "DataBase Error in status change";
}
} else {
$response['done'] = false;
$response['data'] = "DataBase Error booking";
}
} else {
$response['done'] = false;
$response['data'] = "DataBase Error add customer";
}
echo json_encode($response);
}
                                               25
if (isset($_POST['cutomerDetails'])) {
//$customer_result='';
$room_id = $_POST['room_id'];
if ($room_id != '') {
$sql = "SELECT * FROM room NATURAL JOIN room_type NATURAL JOIN booking NATURAL
JOIN customer WHERE room_id = '$room_id' AND payment_status = '0'";
$result = mysqli_query($connection, $sql);
if ($result) {
$customer_details = mysqli_fetch_assoc($result);
$id_type = $customer_details['id_card_type_id'];
$query = "select id_card_type from id_card_type where id_card_type_id = '$id_type'";
$result = mysqli_query($connection, $query);
$id_type_name = mysqli_fetch_assoc($result);
$response['done'] = true;
$response['customer_id'] = $customer_details['customer_id'];
$response['customer_name'] = $customer_details['customer_name'];
$response['contact_no'] = $customer_details['contact_no'];
$response['email'] = $customer_details['email'];
$response['id_card_no'] = $customer_details['id_card_no'];
$response['id_card_type_id'] = $id_type_name['id_card_type'];
$response['address'] = $customer_details['address'];
$response['remaining_price'] = $customer_details['remaining_price'];
} else {
$response['done'] = false;
$response['data'] = "DataBase Error";
}
echo json_encode($response);
}
}
                                             26
if (isset($_POST['booked_room'])) {
$room_id = $_POST['room_id'];
$sql = "SELECT * FROM room NATURAL JOIN room_type NATURAL JOIN booking NATURAL
JOIN customer WHERE room_id = '$room_id' AND payment_status = '0'";
$result = mysqli_query($connection, $sql);
if ($result) {
$room = mysqli_fetch_assoc($result);
$response['done'] = true;
$response['booking_id'] = $room['booking_id'];
$response['name'] = $room['customer_name'];
$response['room_no'] = $room['room_no'];
$response['room_type'] = $room['room_type'];
$response['check_in'] = date('M j, Y', strtotime($room['check_in']));
$response['check_out'] = date('M j, Y', strtotime($room['check_out']));
$response['total_price'] = $room['total_price'];
$response['remaining_price'] = $room['remaining_price'];
} else {
$response['done'] = false;
$response['data'] = "DataBase Error";
}
echo json_encode($response);
}
if (isset($_POST['check_in_room'])) {
$booking_id = $_POST['booking_id'];
$advance_payment = $_POST['advance_payment'];
if ($booking_id != '') {
$query = "select * from booking where booking_id = '$booking_id'";
$result = mysqli_query($connection, $query);
                                              27
$booking_details = mysqli_fetch_assoc($result);
$room_id = $booking_details['room_id'];
$remaining_price = $booking_details['total_price'] - $advance_payment;
if (isset($_POST['check_out_room'])) {
$booking_id = $_POST['booking_id'];
$remaining_amount = $_POST['remaining_amount'];
if ($booking_id != '') {
                                            28
$query = "select * from booking where booking_id = '$booking_id'";
$result = mysqli_query($connection, $query);
$booking_details = mysqli_fetch_assoc($result);
$room_id = $booking_details['room_id'];
$remaining_price = $booking_details['remaining_price'];
if ($remaining_price == $remaining_amount) {
$updateBooking = "UPDATE booking SET remaining_price = '0',payment_status = '1' where
booking_id = '$booking_id'";
$result = mysqli_query($connection, $updateBooking);
if ($result) {
$updateRoom = "UPDATE room SET status = NULL,check_in_status = '0',check_out_status =
'1' WHERE room_id = '$room_id'";
$updateResult = mysqli_query($connection, $updateRoom);
if ($updateResult) {
$response['done'] = true;
} else {
$response['done'] = false;
$response['data'] = "Problem in Update Room Check in status";
}
} else {
$response['done'] = false;
$response['data'] = "Problem in payment";
}
} else {
$response['done'] = false;
$response['data'] = "Please Enter Full Payment";
}
} else {
$response['done'] = false;
$response['data'] = "Error With Booking";
                                             29
}
echo json_encode($response);
}
if (isset($_POST['add_employee'])) {
$staff_type = $_POST['staff_type'];
$shift = $_POST['shift'];
$first_name = $_POST['first_name'];
$last_name = $_POST['last_name'];
$name = $first_name . ' ' . $last_name;
$contact_no = $_POST['contact_no'];
$id_card_id = $_POST['id_card_id'];
$id_card_no = $_POST['id_card_no'];
$address = $_POST['address'];
$salary = $_POST['salary'];
                                                 30
$response['data'] = 'Successfully Booking';
} else {
$response['done'] = false;
$response['data'] = "DataBase Error in status change";
}
}
echo json_encode($response);
}
if (isset($_POST['createComplaint'])) {
$complainant_name = $_POST['complainant_name'];
$complaint_type = $_POST['complaint_type'];
$complaint = $_POST['complaint'];
if (isset($_POST['resolve_complaint'])) {
$budget = $_POST['budget'];
$complaint_id = $_POST['complaint_id'];
$query = "UPDATE complaint set budget = '$budget',resolve_status = '1' WHERE
id='$complaint_id'";
$result = mysqli_query($connection, $query);
if ($result) {
                                              31
header("Location:index.php?complain&resolveSuccess");
} else {
header("Location:index.php?complain&resolveError");
}
}
if (isset($_POST['change_shift'])) {
$emp_id = $_POST['emp_id'];
$shift_id = $_POST['shift_id'];
$query = "UPDATE staff set shift_id = '$shift_id' WHERE emp_id='$emp_id'";
$result = mysqli_query($connection, $query);
$to_date = date("Y-m-d H:i:s");
$update = "UPDATE emp_history SET to_date = '$to_date' WHERE emp_id = '$emp_id' AND
to_date IS NULL";
$update_result = mysqli_query($connection,$update);
$insert = "INSERT INTO emp_history (emp_id,shift_id) VALUES ('$emp_id','$shift_id')";
$insert_result = mysqli_query($connection,$insert);
2.Login.css
/*
* Specific styles of signin component
                                             32
*/
/*
* General styles
*/
body,
html {
height: 100%;
background-repeat: no-repeat;
background-image: linear-gradient(rgb(104, 145, 162), rgb(228, 228, 228));
}
.card-container.card {
max-width: 295px;
padding: 40px 40px;
}
.btn {
font-weight: 700;
height: 36px;
-moz-user-select: none;
-webkit-user-select: none;
user-select: none;
cursor: default;
}
/*
* Card component
*/
.card {
background-color: #f7f7f7;
/* just in case there no content*/
padding: 20px 25px 30px;
                                            33
margin: 0 auto 25px;
margin-top: 50px;
/* shadows and rounded borders */
-moz-border-radius: 2px;
-webkit-border-radius: 2px;
border-radius: 2px;
-moz-box-shadow: 0px 2px 2px rgba(0, 0, 0, 0.3);
-webkit-box-shadow: 0px 2px 2px rgba(0, 0, 0, 0.3);
box-shadow: 0px 2px 2px rgba(0, 0, 0, 0.3);
}
.profile-img-card {
width: 96px;
height: 96px;
margin: 0 auto 10px;
display: block;
-moz-border-radius: 50%;
-webkit-border-radius: 50%;
border-radius: 50%;
}
/*
* Form styles
*/
.profile-name-card {
font-size: 16px;
font-weight: bold;
text-align: center;
margin: 10px 0 0;
min-height: 1em;
}
                                              34
.reauth-email {
display: block;
color: #404040;
line-height: 2;
margin-bottom: 10px;
font-size: 14px;
text-align: center;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
box-sizing: border-box;
}
.form-signin #inputEmail,
.form-signin #inputPassword {
direction: ltr;
height: 44px;
font-size: 16px;
}
.form-signin input[type="email"],
.form-signin input[type="password"],
.form-signin input[type="text"],
.form-signin button {
width: 100%;
display: block;
margin-bottom: 10px;
z-index: 1;
position: relative;
-moz-box-sizing: border-box;
                                       35
-webkit-box-sizing: border-box;
box-sizing: border-box;
}
.form-signin .form-control:focus {
border-color: rgb(104, 145, 162);
outline: 0;
-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075),
0 0 8px rgb(104, 145, 162);
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgb(104, 145, 162);
}
.btn.btn-signin {
/*background-color: #4d90fe; */
background-color: rgb(104, 145, 162);
/* background-color: linear-gradient(rgb(104, 145, 162), rgb(12, 97, 33));*/
padding: 0px;
font-weight: 700;
font-size: 14px;
height: 36px;
-moz-border-radius: 3px;
-webkit-border-radius: 3px;
border-radius: 3px;
border: none;
-o-transition: all 0.218s;
-moz-transition: all 0.218s;
-webkit-transition: all 0.218s;
transition: all 0.218s;
}
.btn.btn-signin:hover,
.btn.btn-signin:active,
                                              36
.btn.btn-signin:focus {
background-color: rgb(12, 97, 33);
}
.forgot-password {
color: rgb(104, 145, 162);
}
.forgot-password:hover,
.forgot-password:active,
.forgot-password:focus {
color: rgb(12, 97, 33);
}
3.Function.PHP
<?php
/**
* Created by PhpStorm.
* User: vishal
* Date: 10/21/17
* Time: 4:16 PM
*/
include_once 'db.php';
if (isset($_POST['login'])) {
$username = $_POST['username'];
$password = $_POST['password'];
echo $username;
                                     37
echo $password;
$query = "select * from login where username = '$username' and password='$password'";
$result = mysqli_query($connection, $query);
$userdetails = mysqli_fetch_assoc($result);
if($userdetails['username']=='manager')
{
header('Location: index.php?room_mang');
}
else{
header('Location: login.php');
}
}
if (isset($_POST['submit'])) {
$emp_id = $_POST['emp_id'];
$first_name = $_POST['first_name'];
$last_name = $_POST['last_name'];
$staff_type_id = $_POST['staff_type_id'];
$shift_id= $_POST['shift_id'];
$id_card_type = $_POST['id_card_type'];
$id_card_no = $_POST['id_card_no'];
$address = $_POST['address'];
$contact_no = $_POST['contact_no'];
$joining_date = strtotime($_POST['joining_date']);
$salary = $_POST['salary'];
$query="UPDATE staff
                                              38
SET emp_name='$first_name $last_name', staff_type_id='$staff_type_id', shift_id='$shift_id',
id_card_type=$id_card_type,
id_card_no='$id_card_no',address='$address',contact_no='$contact_no',joining_date='$join
ing_date',salary='$salary'
WHERE emp_id=$emp_id ";
//echo $query;
if (mysqli_query($connection, $query)) {
header('Location: index.php?staff_mang');
} else {
echo "Error updating record: " . mysqli_error($conn);
}
if (isset($_GET['empid'])!="")
{
$emp_id=$_GET['empid'];
$deleteQuery = "DELETE FROM staff WHERE emp_id=$emp_id";
if (mysqli_query($connection, $deleteQuery)) {
header('Location: index.php?staff_mang');
} else {
echo "Error updating record: " . mysqli_error($connection);
}
}
?>
                                             39
4.RESERVATION.PHP
<?php
if (isset($_GET['room_id'])){
$get_room_id = $_GET['room_id'];
$get_room_sql = "SELECT * FROM room NATURAL JOIN room_type WHERE room_id =
'$get_room_id'";
$get_room_result = mysqli_query($connection,$get_room_sql);
$get_room = mysqli_fetch_assoc($get_room_result);
$get_room_type_id = $get_room['room_type_id'];
$get_room_type = $get_room['room_type'];
$get_room_no = $get_room['room_no'];
$get_room_price = $get_room['price'];
}
?>
<div class="col-sm-9 col-sm-offset-3 col-lg-10 col-lg-offset-2 main">
<div class="row">
<ol class="breadcrumb">
<li><a href="#">
<em class="fa fa-home"></em>
</a></li>
<li class="active">Reservation</li>
</ol>
</div><!--/.row-->
                                              40
</div>
</div>/.row -->
<div class="row">
<div class="col-lg-12">
<form role="form" id="booking" data-toggle="validator">
<div class="response"></div>
<div class="col-lg-12">
<?php
if (isset($_GET['room_id'])){?>
                                             41
<option selected disabled>Select Room No</option>
<option selected value="<?php echo $get_room_id; ?>"><?php echo $get_room_no;
?></option>
</select>
<div class="help-block with-errors"></div>
</div>
<div class="col-lg-12">
<h4 style="font-weight: bold">Total Days : <span id="staying_day">0</span> Days</h4>
<h4 style="font-weight: bold">Price: <span id="price"><?php echo $get_room_price;
?></span> /-</h4>
<h4 style="font-weight: bold">Total Amount : <span id="total_price">0</span> /-</h4>
</div>
</div>
</div>
<?php } else{?>
<div class="panel panel-default">
<div class="panel-heading">Room Information:
                                              42
<a          class="btn     btn-secondary           pull-right"   style="border-radius:0%"
href="index.php?reservation">Replan Booking</a>
</div>
<div class="panel-body">
<div class="form-group col-lg-6">
<label>Room Type</label>
<select class="form-control" id="room_type" onchange="fetch_room(this.value);" required
data-error="Select Room Type">
<option selected disabled>Select Room Type</option>
<?php
$query = "SELECT * FROM room_type";
$result = mysqli_query($connection,$query);
if (mysqli_num_rows($result) > 0){
while ($room_type = mysqli_fetch_assoc($result)){
echo                                                                             '<option
value="'.$room_type['room_type_id'].'">'.$room_type['room_type'].'</option>';
}}
?>
</select>
<div class="help-block with-errors"></div>
</div>
</select>
<div class="help-block with-errors"></div>
</div>
                                              43
<label>Check In Date</label>
<input type="text" class="form-control" placeholder="mm/dd/yyyy" id="check_in_date"
data-error="Select Check In Date" required>
<div class="help-block with-errors"></div>
</div>
<div class="col-lg-12">
<h4 style="font-weight: bold">Total Days : <span id="staying_day">0</span> Days</h4>
<h4 style="font-weight: bold">Price: <span id="price">0</span> /-</h4>
<h4 style="font-weight: bold">Total Amount : <span id="total_price">0</span> /-</h4>
</div>
</div>
</div>
<?php }
?>
<div class="panel panel-default">
<div class="panel-heading">Customer Detail:</div>
<div class="panel-body">
<div class="form-group col-lg-6">
<label>First Name</label>
<input class="form-control" placeholder="First Name" id="first_name" data-error="Enter
First Name" required>
<div class="help-block with-errors"></div>
</div>
                                              44
<div class="form-group col-lg-6">
<label>Last Name</label>
<input class="form-control" placeholder="Last Name" id="last_name">
</div>
                                              45
?>
</select>
<div class="help-block with-errors"></div>
</div>
<div class="row">
<div class="col-sm-12">
<p class="back-link">Developed By Prem Chand Saini</p>
</div>
</div>
                                             46
</div> <!--/.main-->
                                             47
<td id="getRoomType"></td>
</tr>
<tr>
<td><b>Room No</b></td>
<td id="getRoomNo"></td>
</tr>
<tr>
<td><b>Check In</b></td>
<td id="getCheckIn"></td>
</tr>
<tr>
<td><b>Check Out</b></td>
<td id="getCheckOut"></td>
</tr>
<tr>
<td><b>Total Amount</b></td>
<td id="getTotalPrice"></td>
</tr>
<tr>
<td><b>Payment Status</b></td>
<td id="getPaymentStaus"></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div class="modal-footer">
<a class="btn btn-primary" style="border-radius:60px;" href="index.php?reservation"><i
class="fa fa-check-circle"></i></a>
</div>
                                         48
</div>
</div>
</div>
5. ROOM_MANAGE
<br>
<div class="row">
<div class="col-lg-12">
<div id="success"></div>
</div>
</div>
<div class="row">
<div class="col-lg-12">
<div class="panel panel-default">
<div class="panel-heading">Manage Rooms
<button class="btn btn-secondary pull-right" style="border-radius:0%" data-toggle="modal"
data-target="#addRoom">Add Rooms</button>
                                              49
</div>
<div class="panel-body">
<?php
if (isset($_GET['error'])) {
echo "<div class='alert alert-danger'>
<span class='glyphicon glyphicon-info-sign'></span>   Error on Delete !
</div>";
}
if (isset($_GET['success'])) {
echo "<div class='alert alert-success'>
<span class='glyphicon glyphicon-info-sign'></span>   Successfully Delete !
</div>";
}
?>
<table     class="table   table-striped   table-bordered   table-responsive"   cellspacing="0"
width="100%"
id="rooms">
<thead>
<tr>
<th>Room No</th>
<th>Room Type</th>
<th>Booking Status</th>
<th>Check In</th>
<th>Check Out</th>
<th>Action</th>
</tr>
</thead>
<tbody>
<?php
$room_query = "SELECT * FROM room NATURAL JOIN room_type WHERE deleteStatus = 0";
$rooms_result = mysqli_query($connection, $room_query);
if (mysqli_num_rows($rooms_result) > 0) {
                                               50
while ($rooms = mysqli_fetch_assoc($rooms_result)) { ?>
<tr>
<td><?php echo $rooms['room_no'] ?></td>
<td><?php echo $rooms['room_type'] ?></td>
<td>
<?php
if ($rooms['status'] == 0) {
echo '<a href="index.php?reservation&room_id=' . $rooms['room_id'] . '&room_type_id=' .
$rooms['room_type_id'] . '" class="btn btn-success" style="border-radius:0%">Book
Room</a>';
} else {
echo '<a href="#" class="btn btn-danger" style="border-radius:0%">Booked</a>';
}
?>
<td>
<?php
if ($rooms['status'] == 1 && $rooms['check_in_status'] == 0) {
echo '<button class="btn btn-warning" id="checkInRoom" data-id="' . $rooms['room_id'] . '"
data-toggle="modal" style="border-radius:0%" data-target="#checkIn">Check In</button>';
} elseif ($rooms['status'] == 0) {
echo '-';
} else {
                                             51
echo '<button class="btn btn-primary" style="border-radius:0%" id="checkOutRoom" data-
id="' . $rooms['room_id'] . '">Check Out</button>';
} elseif ($rooms['status'] == 0) {
echo '-';
}
?>
</td>
<td>
                                             52
</tbody>
</table>
</div>
</div>
</div>
</div>
                                           53
while ($room_type = mysqli_fetch_assoc($result)) {
echo '<option value="' . $room_type['room_type_id'] . '">' . $room_type['room_type'] .
'</option>';
}
}
?>
</select>
<div class="help-block with-errors"></div>
</div>
<div class="form-group">
<label>Room No</label>
<input class="form-control" placeholder="Room No" id="room_no"
data-error="Enter Room No" required>
<div class="help-block with-errors"></div>
</div>
<button class="btn btn-success pull-right">Add Room</button>
</form>
</div>
</div>
</div>
</div>
</div>
</div>
                                             54
<button type="button" class="close" data-dismiss="modal">×</button>
<h4 class="modal-title">Edit Room</h4>
</div>
<div class="modal-body">
<div class="row">
<div class="col-lg-12">
<form id="roomEditFrom" data-toggle="validator" role="form">
<div class="edit_response"></div>
<div class="form-group">
<label>Room Type</label>
<select class="form-control" id="edit_room_type" required
data-error="Select Room Type">
<option selected disabled>Select Room Type</option>
<?php
$query = "SELECT * FROM room_type";
$result = mysqli_query($connection, $query);
if (mysqli_num_rows($result) > 0) {
while ($room_type = mysqli_fetch_assoc($result)) {
echo '<option value="' . $room_type['room_type_id'] . '">' . $room_type['room_type'] .
'</option>';
}
}
?>
</select>
<div class="help-block with-errors"></div>
</div>
<div class="form-group">
<label>Room No</label>
<input class="form-control" placeholder="Room No" id="edit_room_no" required
data-error="Enter Room No">
<div class="help-block with-errors"></div>
                                             55
</div>
<input type="hidden" id="edit_room_id">
<button class="btn btn-success pull-right">Edit Room</button>
</form>
</div>
</div>
</div>
</div>
</div>
</div>
<!---customer details-->
<div id="cutomerDetailsModal" class="modal fade" role="dialog">
<div class="modal-dialog">
<!-- Modal content-->
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">×</button>
<h4 class="modal-title text-center"><b>Customer's Detail</b></h4>
</div>
<div class="modal-body">
<div class="row">
<div class="col-lg-12">
<table class="table table-responsive table-bordered">
<!-- <thead>
<tr>
<th>Title</th>
<th>Detail</th>
</tr>
</thead> -->
<tbody>
                                            56
<tr>
<td><b>Customer Name</b></td>
<td id="customer_name"></td>
</tr>
<tr>
<td><b>Contact Number</b></td>
<td id="customer_contact_no"></td>
</tr>
<tr>
<td><b>Email</b></td>
<td id="customer_email"></td>
</tr>
<tr>
<td><b>ID Card Type</b></td>
<td id="customer_id_card_type"></td>
</tr>
<tr>
<td><b>ID Card Number</b></td>
<td id="customer_id_card_number"></td>
</tr>
<tr>
<td><b>Address</b></td>
<td id="customer_address"></td>
</tr>
<tr>
<td><b>Remaining Amount</b></td>
<td id="remaining_price"></td>
</tr>
</tbody>
</table>
</div>
</div>
                                         57
</div>
</div>
</div>
</div>
<!---customer details ends here-->
<tbody>
<tr>
<td><b>Customer Name</b></td>
<td id="getCustomerName"></td>
</tr>
<tr>
<td><b>Room Type</b></td>
<td id="getRoomType"></td>
</tr>
<tr>
<td><b>Room Number</b></td>
                                            58
<td id="getRoomNo"></td>
</tr>
<tr>
<td><b>Check In</b></td>
<td id="getCheckIn"></td>
</tr>
<tr>
<td><b>Check Out</b></td>
<td id="getCheckOut"></td>
</tr>
<tr>
<td><b>Total Price</b></td>
<td id="getTotalPrice"></td>
</tr>
</tbody>
</table>
<form role="form" id="advancePayment">
<div class="payment-response"></div>
<div class="form-group col-lg-12">
<label>Advance Payment</label>
<input type="number" class="form-control" id="advance_payment"
placeholder="Please Enter Amounts Here..">
</div>
<input type="hidden" id="getBookingID" value="">
<button type="submit" class="btn btn-primary pull-right">Payment & Check In</button>
</form>
</div>
</div>
</div>
</div>
</div>
                                             59
</div>
<tbody>
<tr>
<td><b>Customer Name</b></td>
<td id="getCustomerName_n"></td>
</tr>
<tr>
<td><b>Room Type</b></td>
<td id="getRoomType_n"></td>
</tr>
<tr>
<td><b>Room Number</b></td>
<td id="getRoomNo_n"></td>
</tr>
<tr>
<td><b>Check In</b></td>
                                            60
<td id="getCheckIn_n"></td>
</tr>
<tr>
<td><b>Check Out</b></td>
<td id="getCheckOut_n"></td>
</tr>
<tr>
<td><b>Total Amount</b></td>
<td id="getTotalPrice_n"></td>
</tr>
<tr>
<td><b>Remaining Amount</b></td>
<td id="getRemainingPrice_n"></td>
</tr>
</tbody>
</table>
<form role="form" id="checkOutRoom_n" data-toggle="validator">
<div class="checkout-response"></div>
<div class="form-group col-lg-12">
<label><b>Remaining Payment</b></label>
<input type="text" class="form-control" id="remaining_amount"
placeholder="Remaining Payment" required
data-error="Please Enter Remaining Amount">
<div class="help-block with-errors"></div>
</div>
<input type="hidden" id="getBookingId_n" value="">
<button type="submit" class="btn btn-primary pull-right">Proceed Checkout</button>
</form>
</div>
                                             61
                                     CHAPTER 7
       Testing is the process of running a system with the intention of finding errors.
Testing enhances the integrity of a system by detecting deviations in design and errors in
the system. Testing aims at detecting error-prone areas. This helps in the prevention of
errors in a system. Testing also adds value to the product by conforming to the user
requirements.
The main purpose of testing is to detect errors and error-prone areas in a system. Testing
must be thorough and well-planned.
The implementation is the final and important phase. It involves usertraining, system
testing in order to ensure successful running of the proposed system.
The testing involves the testing of the developed system using various kinds of data. While
testing, errors are noted and correctness is the mode.
1. Unit Testing.
2. Integration Testing
3.System testing
                                           62
1.1. Unit Testing:
                                               63
                                    CHAPTER 8
8.1 CONCLUSION:
                                           64
65