Project
Project
RUBAN.S ABISHEK.D
(31120U09065) ( 31120U09041)
Under the guidance of
EXAMINER - I EXAMINER – II
Date: Date:
ACKNOWLEDGEMENT
With profound gratitude I thank Almighty GOD for all blessings showered on me for completing my
course and project work successfully in time.
I take this opportunity to express my gratitude to all those who contribution in this project work.First
of all I would offer my thanks to the principal Dr. T. MOHAMED ILYAS ,M.Com., M.B.A., M.Phil., PhD.
for the facilities and assistance provided by him during the course of my study.
I render my thankfulness to all faculties and programmer for their precious help directly and indirectly
to complete my project successfully.
At last but not a least I consider my privilege to express our respect to all guided inspired andhelped me
-RUBAN.S
-ABISHEK.D
ABSTRACT
1
TABLE OF CONTENTS
Chapter Page no
1 INTRODUCTION 03
1.1 1.1PROJECT OVERVIEW 03
1.2 1.2PROJECT STATEMENT 04
1.3
1.3PROJECT OBJECTIVES 05
2 SYSTEM ANALYSIS 06
2.1 2.1 EXISTING SYSTEM 06
2.2 2.2 PRPOSED SYSTEM 07
3 FEASIBILITY STUDY 08
3.1 3.1 TECHNICAL FEASIBILITY 08
3.2 3.2 ECONOMIC FEASIBILITY 09
3.3 3.3 OPERATIONAL FEASIBILITY 10
7 APPENDIX 21
7.1 7.1SOURCE CODE 21
7.2 7.2SAMPLE SCREEN SHOT 51
8 CONCLUSION 63
8.1 8.1 SUMMARY 64
8.2 8.2 REFERENCE 65
2
Chapter 1
1.INTRODUCTION
The hostel management system is web based software to provide college students
accommodation to the university hostel more efficiently. This project also keeps
details of the hostellers and applied students. It is headed by Warden. He will be
the administrator. For accommodate a large number of students into hostel.
This document is intended to minimize human works and make hostel allocation
is an easier job for cusat students and hostel authorities by providing online
application for hostel, automatically select the students from the waiting list and
mess calculation, complaint registration, notice board etc. etc. Students will get
approval notification in their mails. Hostellers can view notice board, hostel fee,
mess menu by login into the online system.
3
1.2 PROBLEM STATEMENT
There are a lot of drawbacks in keeping and maintaining a hostel. Especially with a
manual system. Since most hostels are being run by only one hostel manager, the number
of students in a room are sometimes not known by the officer. He has to go room by
room to ensure that a room is occupied or not. Sometimes people may be owing in the
hostel and they are saved on papers or huge notebooks, and sometimes receipts. If the
books should go missing or stolen, one would never be able to know if a student is owing
or not. Room allocation also becomes a problem as the officer might not know which
rooms are available or not. And some hostels have a lot of rooms or have mare storeys
and it would be very tedious to go through all storeys in search of a free room for an
applicant. Also the officer might not know the number of students in a room or know if a
room is full or not.
4
1.3 PROJECT OBJECTIVES
Maintain the students as hostellers and waiting list students separatelyProcess allotment list.
Admin can send the approval notification to every approved student via email .
Automatically insert student’s details to the hosteller’s record when the allotment is
confirmed by the admin and deleted when vacation is conformed or after the course end
date.
Admin can edit notice board and each student can view it.
Hostel secretary can calculate hostel fee including mess fee and can edit mess menu
5
Chapter 2
2.SYSTEM ANALYSIS
2.1EXISTING SYSTEM
The existing system is manual based and need lot of efforts and consume enough time.
In the existing system we can apply for the hostels online but the allotment processes are
done manually. It may lead to corruptions in the allocation process as well as hostel fee
calculation. The existing system does not deals with mess calculation and complaint
registration.
DISADVANTAGES:
6
2.2 PROPOSED SYSYTEM
The proposed system is having many advantages over the existing system. It
require less overhead and very efficient. The proposed system deals with the
mess calculation and allotment process efficiently.
Room allocation: The system would automate the process of assigning
rooms to students based on their preferences, availability, and other
factors.
Check-in/check-out: The system would allow hostel staff to check
students in and out of the hostel, manage their stay, and keep track of
any fees or payments due.
Attendance management: The system would track student attendance
and generate reports for the hostel management team.
Meal management: The system would allow students to choose meal
plans, track their food consumption, and generate reports for the
kitchen staff.
Maintenance management: The system would allow staff to report and
track maintenance issues, assign tasks to maintenance personnel, and
generate reports for the hostel management team.
Security management: The system would track visitor access, monitor
surveillance cameras, and alert security personnel to any suspicious
activity.
Communication management: The system would provide a platform
for students and staff to communicate with each other, request
assistance, and receive notifications from the hostel management team.
Billing and payment management: The system would generate bills for
students, track payments, and send reminders for any overdue
payments.
7
Chapter 3
3.FEASIBILITY STUDY
The technical feasibility in the proposed system deals with the technology used in
the system. It deals with the hardware and software used in the system whether they are of
latest technology or not. It happens that after a system is prepared a new technology arises
and the user wants the system based on that technology. This system use windows platform,
.net as front end technology and sql server as backend technology. Thus HOSTEL
MANAGEMENT SYSTEM is technically feasible.
Data storage capacity: The system would need to handle large amounts of data,
including student information, room availability, meal plans, billing records,
maintenance logs, and security records. Appropriate database management systems
must be selected and optimized to handle this data load.
Security considerations: The system would store sensitive student data, which
requires secure access controls, data encryption, and regular backups to ensure data
security.
8
3.2 ECONOMICAL FEASIBILITY
User acceptance: The success of the system depends on user acceptance. It's essential
to involve hostel staff and students in the development process and gather their
feedback to ensure the system meets their needs and expectations.
Staff training: The staff must be adequately trained to use the system effectively. The
training program should be well-structured and delivered in a way that is easy to
understand.
Integration with existing systems: The system must integrate with existing systems
to ensure smooth operation. This may include integrating with accounting systems,
student management systems, or security systems.
Maintenance and support: The system requires maintenance and support to keep it
running smoothly. A well-designed maintenance and support plan should be in place
to address any issues promptly.
9
3.3 OPERATIONAL FEASIBILITY
The project has been developed in such a way that it becomes very easy
even for a person with little computer knowledge to operate it. This software is very
user friendly and does not require any technical person to operate .Thus the project is
even operationally feasible.
Staff Training: The system should be easy to learn and use to minimize the
need for extensive staff training. It should be intuitive and user-friendly, with
clear documentation and online help.
Data Integrity: The system should ensure data accuracy and integrity by
enforcing appropriate data validation and verification measures.
10
Chapter 4
Student Module
In student module, they can Submit application form, change password, can
check status,view notice board, view monthly hostel fee and submit the vacating
form.
Secretary Module
In secretary module, the secretary can calculate the mess bill, and edit the mess
menu, viewthe notice board and also change the password.
11
4.1 HARDWARE CONFIGURATION
12
4.2 SOFTWARE CONFIGURATION
13
Chapter 5
5.SYSTEM DESIGN
The system design is divided in to three portions. The Administrator section ,hostel
secretary section and student section
5.1 APPLICATION OVERVIEW.
1 Administrator
1. The Administrator can allot different students to the different hostels.
2. He can vacate the students for the hostels.
3. He can control the status of the fee payment.
4. He can edit the details of the students. He can change their rooms, edit and delete the
studentrecords.
5. He can edit the news
board 6.He can check the
complaints
Notice Board
. In input data design, we design the source document that
capture the data and then select the media used to enter them into the
computer. There are two major approaches for entering data in to the
computer. They are
· Menus.
· Dialog Boxes.
14
5.2 DATAFLOW DIADRAMS
15
16
5.2DATABASE DESIGN (TABLE STRUCTURE)
NAME TYPE
NAME VARCHAR
GENDER VARCHAR
DOB DATE
ADDRESS NCHAR
PINCODE INT
DISTRICT VARCHAR
LANDLINE NUMBER INT
MOBILE NUMBER INT
NAME &ADDRESS OF NCHAR
PARENT OR GUARDIAN
PARENT’S PHONE NUMBER INT
EMAIL ID NCHAR
RELIGION VARCHAR
CAST VARCHAR
DISTANCE IN KILOMETER FLOAT
COMMUNAL RESERVATION CHAR
PHYSICALLY CHAR
HANDICAPPED
FOREIGN STUDENT CHAR
COURSE OF STUDY CHAR
NATURE OF STUDY NCHAR
DEPARTMENT NCHAR
DATE OF ADMISSION TO DATE
COURSE
EXPECTED DATE OF DATE
COMPLETION OF COURSE
DATE FROM ADMISSION DATE
REQUIRES
FELLOWSHIPS ANY CHAR
RECIEVED
FELLOWSHIP DETAILS VARCHAR
PHOTO IMAGE
SIGN IMAGE
THUMP IMPRESSION IMAGE
USERNAME NCHAR
PASSWORD NCHAR
CONFORM PASSWORD NCHAR
17
MESS FEE CALCULATION
NAME TYPE
DEPARTM VARCHAR
ENT
STUDENTN VARCHAR
AME
COST PER FLOAT
DAY
NO OF INT
DAYS
RENT FLOAT
HOSTELFE FLOAT
E
PAYMENT STATUS
NAME TYPE
DEPARTMENT VARCHAR
STUDENT NAME VARCHAR
STATUS CHAR
VACATION
NAME TYPE
NAME VARCHAR
DEPARTMENT VARCHAR
YEAR VARCHAR
CS_STUDY VARCHAR
DATESUB CHAR
DATEREL CHAR
REASON VARCHAR
USERNAME VARCHAR
18
Chapter 6
Implementation is the stage in the project where the theoretical design is turned into a
working system and is giving confidence on the new system for the users that it will work
efficiently and effectively. It involves careful planning, investigation of the current
system and its constraints on implementation, design of methods to achieve the change
over, an evaluation of change over methods. Apart from planning major task of preparing
the implementation are education and training of users. The implementation process
begins with preparing a plan for the implementation of the system. According to this
plan, the activities are to be carried out, discussions made regarding the equipment and
resources and the additional equipment has to be acquired to implement the new system.
In network backup system no additional resources are needed. Implementation is the final
and the most important phase. The most critical stage in achieving a successful new
system is giving the users confidence that the new system will work and be effective. The
system can be implemented only after thorough testing is done and if it is found to be
working according to the specification. This method also offers the greatest security since
the old system can take over if the errors are found or inability to handle certain type of
transactions while using the new system.
19
6.2 SYSTEM TESTING
As the part of system testing we execute the program with the intent of finding errors
and missing operations and also a complete verification to determine whether the
objectives are met and the user requirements are satisfied. The ultimate aim is quality
assurance.
Tests are carried out and the results are compared with the expected document. In the
case of erroneous results, debugging is done. Using detailed testing strategies a test plan
is carried out on each module. The various tests performed are unit testing, integration
testing and user acceptancetesting.
Unit Testing
The software units in the system is are modules and routines that are assembled an
integrated to perform a specific function. As a part of unit testing we executed the program
for individual modules independently. This enables, to detect errors in coding and logic that
are contained within each of the three module. This testing includes entering data that is
filling formsand ascertaining if the value matches to the type and entered into the database.
The various controls are tested to ensure that each performs its action as required.
Integration Testing
Data can be lost across any interface, one module can have an adverse effect on
another, sub functions when combined, may not produce the desired major functions.
Integration testing is a systematic testing to discover errors associated within the
interface. The objective is to take unit tested modules and build a program structure. All
the modules are combined and tested as a whole. Here the admin module, sec module and
student module options are integrated and tested. This testing provides the assurance that
the application is well integrated functional unit with smooth transition of data.
20
Chapter 7
7. APPENDIX
7.1 SOURCE CODE
1. Checklogin.php
<?php
function check_login()
{
if(strlen($_SESSION['id'])==0)
{
$host = $_SERVER['HTTP_HOST'];
$uri = rtrim(dirname($_SERVER['PHP_SELF']), '/\\');
$extra="index.php";
$_SESSION["id"]="";
header("Location: http://$host$uri/$extra");
}
}
?>
2. Config.php
<?php
$dbuser="root";
$dbpass="";
$host="localhost";
$db="hostel";
$mysqli =new mysqli($host,$dbuser, $dbpass, $db);
?>
3. Dbcontroller.php
<?php
$DB_host = "localhost";
$DB_user = "root";
$DB_pass = "";
$DB_name = "hostel";
try
{
$DB_con = new
PDO("mysql:host={$DB_host};dbname={$DB_name}",$DB_user,$DB_pass);
$DB_con->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
}
catch(PDOException $e)
{
$e->getMessage();
}
?>
21
4. Header.php
</div>
<?php } ?>
<?php if($_SESSION['id'])
{ ?><div class="brand clearfix">
<a href="#" class="logo" style="font-size:16px;">Hostel Management System</a>
<span class="menu-btn"><i class="fa fa-bars"></i></span>
<ul class="ts-profile-nav">
<li class="ts-account">
<a href="#"><img src="img/ts-avatar.jpg" class="ts-avatar hidden-side" alt=""> Account <i
class="fa fa-angle-down hidden-side"></i></a>
<ul>
<li><a href="my-profile.php">My Account</a></li>
<li><a href="logout.php">Logout</a></li>
</ul>
</li>
</ul>
</div>
<?php
} else { ?>
<div class="brand clearfix">
<a href="#" class="logo" style="font-size:16px;">Hostel Management System</a>
<span class="menu-btn"><i class="fa fa-bars"></i></span
22
5.Pdoconfig.php
<?php
$DB_host = "localhost";
$DB_user = "root";
$DB_pass = "";
$DB_name = "hostel";
try
{
$DB_con = new
PDO("mysql:host={$DB_host};dbname={$DB_name}",$DB_us
er,$DB_pass);
$DB_con->setAttribute(PDO::ATTR_ERRMODE,
PDO::ERRMODE_EXCEPTION);
}
catch(PDOException $e)
{
$e->getMessage();
}
?>
6.Sidebar.php
<nav class="ts-sidebar">
<ul class="ts-sidebar-menu">
<li class="ts-label">Main</li>
<?PHP if(isset($_SESSION['id']))
{ ?>
<li><a href="dashboard.php"><i class="fa fa-desktop"></i>Dashboard</a></li><li><a href="my-
profile.php"><i class="fa fa-user"></i> My Profile</a></li>
<li><a href="change-password.php"><i class="fa fa-files-o"></i>Change Password</a></li>
<li><a href="book-hostel.php"><i class="fa fa-file-o"></i>Book Hostel</a></li>
<li><a href="room-details.php"><i class="fa fa-file-o"></i>Room Details</a></li>
<li><a href="access-log.php"><i class="fa fa-file-o"></i>Access log</a></li>
<?php } else { ?>
<li><a href="registration.php"><i class="fa fa-files-o"></i> User Registration</a></li>
<li><a href="index.php"><i class="fa fa-users"></i> User Login</a></li>
<li><a href="admin"><i class="fa fa-user"></i> Admin Login</a></li>
<?php } ?>
</ul>
</nav>
23
7.Change password
<?php
session_start();
include('includes/config.php');
date_default_timezone_set('Asia/Kolkata');
include('includes/checklogin.php');
check_login();
$ai=$_SESSION['id'];
// code for change password
if(isset($_POST['changepwd']))
{
$op=$_POST['oldpassword'];
$np=$_POST['newpassword'];
$udate=date('d-m-Y h:i:s', time());;
$sql="SELECT password FROM userregistration where password=?";
$chngpwd = $mysqli->prepare($sql);
$chngpwd->bind_param('s',$op);
$chngpwd->execute();
$chngpwd->store_result();
$row_cnt=$chngpwd->num_rows;;
if($row_cnt>0)
{
$con="update userregistration set password=?,passUdateDate=? where id=?";
$chngpwd1 = $mysqli->prepare($con);
$chngpwd1->bind_param('ssi',$np,$udate,$ai);
$chngpwd1->execute();
$_SESSION['msg']="Password Changed Successfully !!";
}
else
{
$_SESSION['msg']="Old Password not match !!";
}
}
?>
<!doctype html>
<html lang="en" class="no-js">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<meta name="theme-color" content="#3e454c">
24
<title>Change Password</title>
<link rel="stylesheet" href="css/font-awesome.min.css">
<link rel="stylesheet" href="css/bootstrap.min.css">
<link rel="stylesheet" href="css/dataTables.bootstrap.min.css">>
<link rel="stylesheet" href="css/bootstrap-social.css">
<link rel="stylesheet" href="css/bootstrap-select.css">
<link rel="stylesheet" href="css/fileinput.min.css">
<link rel="stylesheet" href="css/awesome-bootstrap-checkbox.css">
<link rel="stylesheet" href="css/style.css">
<script type="text/javascript" src="js/jquery-1.11.3-jquery.min.js"></script>
<script type="text/javascript" src="js/validation.min.js"></script>
<script type="text/javascript">
function valid()
{
if(document.changepwd.newpassword.value!= document.changepwd.cpassword.value)
{
alert("Password and Re-Type Password Field do not match !!");
document.changepwd.cpassword.focus();
return false;
}
return true;
}
</script>
</head>
<body>
<?php include('includes/header.php');?>
<div class="ts-main-content">
<?php include('includes/sidebar.php');?>
<div class="content-wrapper">
<div class="container-fluid">
<div class="row">
<div class="col-md-12">
<div class="row">
<div class="col-md-10">
<div class="panel panel-default">
<div class="panel-heading">
<?php $result ="SELECT passUdateDate FROM userregistration WHERE id=?";
$stmt = $mysqli->prepare($result);
$stmt->bind_param('i',$ai);
25
$stmt->execute();
$stmt -> bind_result($result);
$stmt -> fetch(); ?>
</form>
</div>
</div>
</div>
</div>
</div>
</div>
26
</div>
</div>
</div>
</div>
</div>
<script src="js/jquery.min.js"></script>
<script src="js/bootstrap-select.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/jquery.dataTables.min.js"></script>
<script src="js/dataTables.bootstrap.min.js"></script>
<script src="js/Chart.min.js"></script>
<script src="js/fileinput.js"></script>
<script src="js/chartData.js"></script>
<script src="js/main.js"></script>
<script>
function checkpass() {
$("#loaderIcon").show();
jQuery.ajax({
url: "check_availability.php",
data:'oldpassword='+$("#oldpassword").val(),
type: "POST",
success:function(data){
$("#password-availability-status").html(data);
$("#loaderIcon").hide();
},
error:function (){}
});
}
</script>
</body>
</html>
27
8.Access login
<?php
session_start();
include('includes/config.php');
include('includes/checklogin.php');
check_login();
?>
<!doctype html>
<html lang="en" class="no-js">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<meta name="theme-color" content="#3e454c">
<title>Access Log</title>
<link rel="stylesheet" href="css/font-awesome.min.css">
<link rel="stylesheet" href="css/bootstrap.min.css">
<link rel="stylesheet" href="css/dataTables.bootstrap.min.css">
<link rel="stylesheet" href="css/bootstrap-social.css">
<link rel="stylesheet" href="css/bootstrap-select.css">
<link rel="stylesheet" href="css/fileinput.min.css">
<link rel="stylesheet" href="css/awesome-bootstrap-checkbox.css">
<link rel="stylesheet" href="css/style.css">
</head>
<body>
<?php include('includes/header.php');?>
<div class="ts-main-content">
<?php include('includes/sidebar.php');?>
<div class="content-wrapper">
<div class="container-fluid">
<div class="row">
<div class="col-md-12">
<h2 class="page-title">Access Log</h2>
<div class="panel panel-default">
<div class="panel-heading">All Courses Details</div>
<div class="panel-body">
<table id="zctb" class="display table table-striped table-bordered table-hover" cellspacing="0" width="100%">
<thead>
<tr>
<th>Sno.</th>
<th>User Id</th>
<th>User Email</th>
<th>IP</th>
<th>City</th>
<th>Country</th>
<th>Login Time</th>
28
</tr>
</thead>
<tfoot>
<tr>
<th>Sno.</th>
<th>User Id</th>
<th>User Email</th>
<th>IP</th>
<th>City</th>
<th>Country</th>
<th>Login Time</th>
</tr>
</tfoot>
<tbody>
<?php
$aid=$_SESSION['id'];
$ret="select * from userlog where userId=?";
$stmt= $mysqli->prepare($ret) ;
$stmt->bind_param('i',$aid);
$stmt->execute() ;
$res=$stmt->get_result();
$cnt=1;
while($row=$res->fetch_object())
{
?>
<tr><td><?php echo $cnt;;?></td>
<td><?php echo $row->userId;?></td>
<td><?php echo $row->userEmail;?></td>
<td><?php echo $row->userIp;?></td>
<td><?php echo $row->city;?></td>
<td><?php echo $row->country;?></td>
<td><?php echo $row->loginTime;?></td>
</tr>
<?php
$cnt=$cnt+1;
} ?>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>
9.Book hostel
<?php
session_start();
include('includes/config.php');
include('includes/checklogin.php');
check_login();
//code for registration
if(isset($_POST['submit']))
{
$roomno=$_POST['room'];
$seater=$_POST['seater'];
$feespm=$_POST['fpm'];
$foodstatus=$_POST['foodstatus'];
$stayfrom=$_POST['stayf'];
$duration=$_POST['duration'];
$course=$_POST['course'];
$regno=$_POST['regno'];
$fname=$_POST['fname'];
$mname=$_POST['mname'];
$lname=$_POST['lname'];
$gender=$_POST['gender'];
$contactno=$_POST['contact'];
$emailid=$_POST['email'];
$emcntno=$_POST['econtact'];
$gurname=$_POST['gname'];
$gurrelation=$_POST['grelation'];
$gurcntno=$_POST['gcontact'];
$caddress=$_POST['address'];
$ccity=$_POST['city'];
$cstate=$_POST['state'];
$cpincode=$_POST['pincode'];
$paddress=$_POST['paddress'];
$pcity=$_POST['pcity'];
$pstate=$_POST['pstate'];
$ppincode=$_POST['ppincode'];
30
$query="insert into
registration(roomno,seater,feespm,foodstatus,stayfrom,duration,course,regno,firstName,middleName,lastNam
e,gender,contactno,emailid,egycontactno,guardianName,guardianRelation,guardianContactno,corresAddress,c
orresCIty,corresState,corresPincode,pmntAddress,pmntCity,pmnatetState,pmntPincode)
values(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)";
$stmt = $mysqli->prepare($query);
$rc=$stmt-
>bind_param('iiiisisissssisississsisssi',$roomno,$seater,$feespm,$foodstatus,$stayfrom,$duration,$course,$regn
o,$fname,$mname,$lname,$gender,$contactno,$emailid,$emcntno,$gurname,$gurrelation,$gurcntno,$caddre
ss,$ccity,$cstate,$cpincode,$paddress,$pcity,$pstate,$ppincode);
$stmt->execute();
echo"<script>alert('Student Succssfully register');</script>";
}
?>
<!doctype html>
<html lang="en" class="no-js">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<meta name="theme-color" content="#3e454c">
<title>Student Hostel Registration</title>
<link rel="stylesheet" href="css/font-awesome.min.css">
<link rel="stylesheet" href="css/bootstrap.min.css">
<link rel="stylesheet" href="css/dataTables.bootstrap.min.css">>
<link rel="stylesheet" href="css/bootstrap-social.css">
<link rel="stylesheet" href="css/bootstrap-select.css">
<link rel="stylesheet" href="css/fileinput.min.css">
<link rel="stylesheet" href="css/awesome-bootstrap-checkbox.css">
<link rel="stylesheet" href="css/style.css">
<script type="text/javascript" src="js/jquery-1.11.3-jquery.min.js"></script>
<script type="text/javascript" src="js/validation.min.js"></script>
<script type="text/javascript" src="http://code.jquery.com/jquery.min.js"></script>
<script>
function getSeater(val) {
$.ajax({
type: "POST",
url: "get_seater.php",
data:'roomid='+val,
success: function(data){
//alert(data);
$('#seater').val(data);
}
});
$.ajax({
type: "POST",
31
url: "get_seater.php",
data:'rid='+val,
success: function(data){
//alert(data);
$('#fpm').val(data);
}
});
}
</script>
</head>
<body>
<?php include('includes/header.php');?>
<div class="ts-main-content">
<?php include('includes/sidebar.php');?>
<div class="content-wrapper">
<div class="container-fluid">
<div class="row">
<div class="col-md-12">
<h2 class="page-title">Registration </h2>
<div class="row">
<div class="col-md-12">
<div class="panel panel-primary">
<div class="panel-heading">Fill all Info</div>
<div class="panel-body">
<form method="post" action="" class="form-horizontal">
<?php
$uid=$_SESSION['login'];
$stmt=$mysqli->prepare("SELECT emailid FROM registration WHERE emailid=? ");
$stmt->bind_param('s',$uid);
$stmt->execute();
$stmt -> bind_result($email);
$rs=$stmt->fetch();
$stmt->close();
if($rs)
{ ?>
<h3 style="color: red" align="left">Hostel already booked by you</h3>
<?php }
else{
echo "";
}
?>
<div class="form-group">
<label class="col-sm-4 control-label"><h4 style="color: green" align="left">Room Related info </h4> </label>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">Room no. </label>
<div class="col-sm-8">
<select name="room" id="room"class="form-control" onChange="getSeater(this.value);"
32
onBlur="checkAvailability()" required>
<option value="">Select Room</option>
<?php $query ="SELECT * FROM rooms";
$stmt2 = $mysqli->prepare($query);
$stmt2->execute();
$res=$stmt2->get_result();
while($row=$res->fetch_object())
{
?>
<option value="<?php echo $row->room_no;?>"> <?php echo $row->room_no;?></option>
<?php } ?>
</select>
<span id="room-availability-status" style="font-size:12px;"></span>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">Seater</label>
<div class="col-sm-8">
<input type="text" name="seater" id="seater" class="form-control" >
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">Fees Per Month</label>
<div class="col-sm-8">
<input type="text" name="fpm" id="fpm" class="form-control" >
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">Food Status</label>
<div class="col-sm-8">
<input type="radio" value="0" name="foodstatus" checked="checked"> Without Food
<input type="radio" value="1" name="foodstatus"> With Food(Rs 2000.00 Per Month Extra)
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">Stay From</label>
<div class="col-sm-8">
<input type="date" name="stayf" id="stayf" class="form-control" >
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">Duration</label>
<div class="col-sm-8">
33
<select name="duration" id="duration" class="form-control">
<option value="">Select Duration in Month</option>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
<option value="7">7</option>
<option value="8">8</option>
<option value="9">9</option>
<option value="10">10</option>
<option value="11">11</option>
<option value="12">12</option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">Total Amount</label>
<div class="col-sm-8">
<input type="text" name="ta" id="ta" class="result form-control" >
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label"><h4 style="color: green" align="left">Personal info </h4> </label>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">course </label>
<div class="col-sm-8">
<select name="course" id="course" class="form-control" required>
<option value="">Select Course</option>
<?php $query ="SELECT * FROM courses";
$stmt2 = $mysqli->prepare($query);
$stmt2->execute();
$res=$stmt2->get_result();
while($row=$res->fetch_object())
{
?>
<option value="<?php echo $row->course_fn;?>"><?php echo $row->course_fn;?> (<?php echo
$row->course_sn;?>)</option>
<?php } ?>
</select> </div>
</div>
<?php
$aid=$_SESSION['id'];
$ret="select * from userregistration where id=?";
34
$stmt= $mysqli->prepare($ret) ;
$stmt->bind_param('i',$aid);
$stmt->execute() ;//ok
$res=$stmt->get_result();
//$cnt=1;
while($row=$res->fetch_object())
{
?>
<div class="form-group">
<label class="col-sm-2 control-label">Registration No : </label>
<div class="col-sm-8">
<input type="text" name="regno" id="regno" class="form-control" value="<?php echo $row->regNo;?>"
readonly >
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">First Name : </label>
<div class="col-sm-8">
<input type="text" name="fname" id="fname" class="form-control" value="<?php echo $row->firstName;?>"
readonly>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">Middle Name : </label>
<div class="col-sm-8">
<input type="text" name="mname" id="mname" class="form-control" value="<?php echo $row-
>middleName;?>" readonly>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">Last Name : </label>
<div class="col-sm-8">
<input type="text" name="lname" id="lname" class="form-control" value="<?php echo $row->lastName;?>"
readonly>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">Gender : </label>
<div class="col-sm-8">
<input type="text" name="gender" value="<?php echo $row->gender;?>" class="form-control" readonly>
</div>
</div>
<div class="form-group">
35
<label class="col-sm-2 control-label">Contact No : </label>
<div class="col-sm-8">
<input type="text" name="contact" id="contact" value="<?php echo $row->contactNo;?>" class="form-
control" readonly>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">Email id : </label>
<div class="col-sm-8">
<input type="email" name="email" id="email" class="form-control" value="<?php echo $row->email;?>"
readonly>
</div>
</div>
<?php } ?>
<div class="form-group">
<label class="col-sm-2 control-label">Emergency Contact: </label>
<div class="col-sm-8">
<input type="text" name="econtact" id="econtact" class="form-control" required="required">
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">Guardian Name : </label>
<div class="col-sm-8">
<input type="text" name="gname" id="gname" class="form-control" required="required">
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">Guardian Relation : </label>
<div class="col-sm-8">
<input type="text" name="grelation" id="grelation" class="form-control" required="required">
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">Guardian Contact no : </label>
<div class="col-sm-8">
<input type="text" name="gcontact" id="gcontact" class="form-control" required="required">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label"><h4 style="color: green" align="left">Correspondense Address </h4>
</label>
</div>
<div class="form-group">
36
<label class="col-sm-2 control-label">Address : </label>
<div class="col-sm-8">
<textarea rows="5" name="address" id="address" class="form-control" required="required"></textarea>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">City : </label>
<div class="col-sm-8">
<input type="text" name="city" id="city" class="form-control" required="required">
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">State </label>
<div class="col-sm-8">
<select name="state" id="state"class="form-control" required>
<option value="">Select State</option>
<?php $query ="SELECT * FROM states";
$stmt2 = $mysqli->prepare($query);
$stmt2->execute();
$res=$stmt2->get_result();
while($row=$res->fetch_object())
{
?>
<option value="<?php echo $row->State;?>"><?php echo $row->State;?></option>
<?php } ?>
</select> </div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">Pincode : </label>
<div class="col-sm-8">
<input type="text" name="pincode" id="pincode" class="form-control" required="required">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label"><h4 style="color: green" align="left">Permanent Address </h4> </label>
</div>
<div class="form-group">
<label class="col-sm-5 control-label">Permanent Address same as Correspondense address : </label>
<div class="col-sm-4">
<input type="checkbox" name="adcheck" value="1"/>
</div>
</div>
37
<div class="form-group">
<label class="col-sm-2 control-label">Address : </label>
<div class="col-sm-8">
<textarea rows="5" name="paddress" id="paddress" class="form-control" required="required"></textarea>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">City : </label>
<div class="col-sm-8">
<input type="text" name="pcity" id="pcity" class="form-control" required="required">
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">State </label>
<div class="col-sm-8">
<select name="pstate" id="pstate"class="form-control" required>
<option value="">Select State</option>
<?php $query ="SELECT * FROM states";
$stmt2 = $mysqli->prepare($query);
$stmt2->execute();
$res=$stmt2->get_result();
while($row=$res->fetch_object())
{
?>
<option value="<?php echo $row->State;?>"><?php echo $row->State;?></option>
<?php } ?>
</select> </div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">Pincode : </label>
<div class="col-sm-8">
<input type="text" name="ppincode" id="ppincode" class="form-control" required="required">
</div>
</div>
<div class="col-sm-6 col-sm-offset-4">
<button class="btn btn-default" type="submit">Cancel</button>
<input type="submit" name="submit" Value="Register" class="btn btn-primary">
</div>
</form>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
38
</div>
</div>
</div>
</div>
</div>
<script src="js/jquery.min.js"></script>
<script src="js/bootstrap-select.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/jquery.dataTables.min.js"></script>
<script src="js/dataTables.bootstrap.min.js"></script>
<script src="js/Chart.min.js"></script>
<script src="js/fileinput.js"></script>
<script src="js/chartData.js"></script>
<script src="js/main.js"></script>
</body>
<script type="text/javascript">
$(document).ready(function(){
$('input[type="checkbox"]').click(function(){
if($(this).prop("checked") == true){
$('#paddress').val( $('#address').val() );
$('#pcity').val( $('#city').val() );
$('#pstate').val( $('#state').val() );
$('#ppincode').val( $('#pincode').val() );
}
});
});
</script>
<script>
function checkAvailability() {
$("#loaderIcon").show();
jQuery.ajax({
url: "check_availability.php",
data:'roomno='+$("#room").val(),
type: "POST",
success:function(data){
$("#room-availability-status").html(data);
$("#loaderIcon").hide();
},
error:function (){}
});
}
</script>
<script type="text/javascript">
$(document).ready(function() {
$('#duration').keyup(function(){
var fetch_dbid = $(this).val();
$.ajax({
type:'POST',
url :"ins-amt.php?action=userid",
39
data :{userinfo:fetch_dbid},
success:function(data){
$('.result').val(data);
}
});
})});
</script>
</html>
10.Check availibitiy
<?php
require_once("includes/config.php");
if(!empty($_POST["emailid"])) {
$email= $_POST["emailid"];
if (filter_var($email, FILTER_VALIDATE_EMAIL)===false) {
echo "error : You did not enter a valid email.";
}
else {
$result ="SELECT count(*) FROM userRegistration WHERE email=?";
$stmt = $mysqli->prepare($result);
$stmt->bind_param('s',$email);
$stmt->execute();
$stmt->bind_result($count);
$stmt->fetch();
$stmt->close();
if($count>0)
{
echo "<span style='color:red'> Email already exist .</span>";
}
else{
echo "<span style='color:green'> Email available for registration .</span>";
}
}
}
if(!empty($_POST["oldpassword"]))
{
$pass=$_POST["oldpassword"];
$result ="SELECT password FROM userregistration WHERE password=?";
$stmt = $mysqli->prepare($result);
$stmt->bind_param('s',$pass);
$stmt->execute();
$stmt -> bind_result($result);
$stmt -> fetch();
$opass=$result;
if($opass==$pass)
echo "<span style='color:green'> Password matched .</span>";
else echo "<span style='color:red'> Password Not matched</span>";
40
}
if(!empty($_POST["roomno"]))
{
$roomno=$_POST["roomno"];
$result ="SELECT count(*) FROM registration WHERE roomno=?";
$stmt = $mysqli->prepare($result);
$stmt->bind_param('i',$roomno);
$stmt->execute();
$stmt->bind_result($count);
$stmt->fetch();
$stmt->close();
if($count>0)
echo "<span style='color:red'>$count. Seats already full.</span>";
else
echo "<span style='color:red'>All Seats are Available</span>";
}
?>
11.Dashboard.php
<?php
session_start();
include('includes/config.php');
include('includes/checklogin.php');
check_login();
?>
<!doctype html>
<html lang="en" class="no-js">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<meta name="theme-color" content="#3e454c">
<title>DashBoard</title>
<link rel="stylesheet" href="css/font-awesome.min.css">
<link rel="stylesheet" href="css/bootstrap.min.css">
<link rel="stylesheet" href="css/dataTables.bootstrap.min.css">
<link rel="stylesheet" href="css/bootstrap-social.css">
<link rel="stylesheet" href="css/bootstrap-select.css">
<link rel="stylesheet" href="css/fileinput.min.css">
<link rel="stylesheet" href="css/awesome-bootstrap-checkbox.css">
<link rel="stylesheet" href="css/style.css">
</head>
<body>
<?php include("includes/header.php");?>
<div class="ts-main-content">
41
<?php include("includes/sidebar.php");?>
<div class="content-wrapper">
<div class="container-fluid">
<div class="row">
<div class="col-md-12">
<h2 class="page-title">Dashboard</h2>
<div class="row">
<div class="col-md-12">
<div class="row">
<div class="col-md-3">
<div class="panel panel-default">
<div class="panel-body bk-primary text-light">
<div class="stat-panel text-center">
<div class="stat-panel-number h1 ">My Profile</div>
</div>
</div>
<a href="my-profile.php" class="block-anchor panel-footer">Full Detail <i class="fa fa-arrow-right"></i></a>
</div>
</div>
<div class="col-md-3">
<div class="panel panel-default">
<div class="panel-body bk-success text-light">
<div class="stat-panel text-center">
<div class="stat-panel-number h1 ">My Room</div>
</div>
</div>
<a href="room-details.php" class="block-anchor panel-footer text-center">See All <i class="fa fa-arrow-
right"></i></a>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- Loading Scripts -->
<script src="js/jquery.min.js"></script>
<script src="js/bootstrap-select.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/jquery.dataTables.min.js"></script>
<script src="js/dataTables.bootstrap.min.js"></script>
<script src="js/Chart.min.js"></script>
<script src="js/fileinput.js"></script>
<script src="js/chartData.js"></script>
<script src="js/main.js"></script>
<script>window.onload = function(){
42
// Line chart from swirlData for dashReport
var ctx = document.getElementById("dashReport").getContext("2d");
window.myLine = new Chart(ctx).Line(swirlData, {
responsive: true,
scaleShowVerticalLines: false,
scaleBeginAtZero : true,
multiTooltipTemplate: "<%if (label){%><%=label%>: <%}%><%= value %>",
});
// Pie Chart from doughutData
var doctx = document.getElementById("chart-area3").getContext("2d");
window.myDoughnut = new Chart(doctx).Pie(doughnutData, {responsive : true});
// Dougnut Chart from doughnutData
var doctx = document.getElementById("chart-area4").getContext("2d");
window.myDoughnut = new Chart(doctx).Doughnut(doughnutData, {responsive : true});
}
</script>
</body>
<div class="foot"><footer>
<p> Brought To You By <a href="https://code-projects.org/">Code-Projects</p>
</footer> </div>
<style> .foot{text-align: center; border: 1px solid black;}</style>
</html>
12.Forget password
<?php
session_start();
include('includes/config.php');
if(isset($_POST['login']))
{
$email=$_POST['email'];
$contact=$_POST['contact'];
$stmt=$mysqli->prepare("SELECT email,contactNo,password FROM userregistration WHERE (email=? &&
contactNo=?) ");
$stmt->bind_param('ss',$email,$contact);
$stmt->execute();
$stmt -> bind_result($username,$email,$password);
$rs=$stmt->fetch();
if($rs)
{
$pwd=$password;
}
else
{
echo "<script>alert('Invalid Email/Contact no or password');</script>";
}
}
?>
43
<!doctype html>
<html lang="en" class="no-js">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<title>User Forgot Password</title>
<link rel="stylesheet" href="css/font-awesome.min.css">
<link rel="stylesheet" href="css/bootstrap.min.css">
<link rel="stylesheet" href="css/dataTables.bootstrap.min.css">
<link rel="stylesheet" href="css/bootstrap-social.css">
<link rel="stylesheet" href="css/bootstrap-select.css">
<link rel="stylesheet" href="css/fileinput.min.css">
<link rel="stylesheet" href="css/awesome-bootstrap-checkbox.css">
<link rel="stylesheet" href="css/style.css">
</head>
<body>
<div class="login-page bk-img" style="background-image: url(img/login-bg.jpg);">
<div class="form-content">
<div class="container">
<div class="row">
<div class="col-md-6 col-md-offset-3">
<h1 class="text-center text-bold text-light mt-4x">Forgot Password</h1>
<div class="well row pt-2x pb-3x bk-light">
<div class="col-md-8 col-md-offset-2">
<?php if(isset($_POST['login']))
{ ?>
<p>Yuor Password is <?php echo $pwd;?><br> Change the Password After login</p>
<?php } ?>
<form action="" class="mt" method="post">
<label for="" class="text-uppercase text-sm">Your Email</label>
<input type="email" placeholder="Email" name="email" class="form-control mb">
<label for="" class="text-uppercase text-sm">Your Contact no</label>
<input type="text" placeholder="Contact no" name="contact" class="form-control mb">
<input type="submit" name="login" class="btn btn-primary btn-block" value="login" >
</form>
</div>
</div>
<div class="text-center text-light">
<a href="index.php" class="text-light">Sign in?</a>
</div>
</div>
</div>
</div>
</div>
</div>
<script src="js/jquery.min.js"></script>
44
<script src="js/bootstrap-select.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/jquery.dataTables.min.js"></script>
<script src="js/dataTables.bootstrap.min.js"></script>
<script src="js/Chart.min.js"></script>
<script src="js/fileinput.js"></script>
<script src="js/chartData.js"></script>
<script src="js/main.js"></script>
</body>
</html>
13.Full profile.php
<?php
session_start();
//include("includes/config.php");
$mysql_hostname = "localhost";
$mysql_user = "root";
$mysql_password = "";
$mysql_database = "hostel";
$prefix = "";
$bd = mysql_connect($mysql_hostname, $mysql_user, $mysql_password) or die("Could not connect
database");
mysql_select_db($mysql_database, $bd) or die("Could not select database");
?>
<script language="javascript" type="text/javascript">
function f2()
{
window.close();
}
function f3()
{
window.print();
}
</script>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Student Information</title>
<link href="style.css" rel="stylesheet" type="text/css" />
<link href="hostel.css" rel="stylesheet" type="text/css">
</head>
<body>
<table width="100%" border="0">
<?php
$ret= mysql_query("SELECT * FROM registration where emailid = '".$_GET['id']."'");
while($row=mysql_fetch_array($ret))
45
{
?>
<tr>
<td colspan="2" align="center" class="font1"> </td>
</tr>
<tr>
<td colspan="2" align="center" class="font1"> </td>
</tr>
<tr>
<td colspan="2" class="font"><?php echo ucfirst($row['firstName']);?> <?php echo
ucfirst($row['lastName']);?>'S <span class="font1"> information »</span> </td>
</tr>
<tr>
<td colspan="2"
class="font">
<div align="right">Reg Date : <span class="comb-value"><?php echo $row['postingDate'];?></span></div></td>
</tr>
<tr>
<td colspan="2" class="heading" style="color: red;">Room Related Info » </td>
</tr>
<tr>
<td colspan="2" class="font1"><table width="100%" border="0">
<tr>
<td width="32%" valign="top" class="heading">Room no : </td>
<td class="comb-value1"><span class="comb-value"><?php echo $row['roomno'];?></span></td>
</tr>
<tr>
<td width="22%" valign="top" class="heading">Seater : </td>
<td class="comb-value1"><span class="comb-value"><?php echo $row['seater'];?></span></td>
</tr>
<tr>
<td width="12%" valign="top" class="heading">Fees PM : </td>
<td class="comb-value1"><?php echo $fpm=$row['feespm'];?></td>
</tr>
<tr>
<td width="12%" valign="top" class="heading">Food Status: </td>
<td class="comb-value1"><?php if($row['foodstatus']==0)
{
echo "Without Food";
}
else
{
echo "With Food";
}
;?></td>
</tr>
<tr>
<td width="12%" valign="top" class="heading">Staying From: </td>
46
<td class="comb-value1"><?php echo $row['stayfrom'];?></td>
</tr>
<tr>
<td width="12%" valign="top" class="heading">Duration: </td>
<td class="comb-value1"><?php echo $dr=$row['duration'];?></td>
</tr>
<tr>
<td width="12%" valign="top" class="heading">Total Fee: </td>
<td class="comb-value1">
<?php if($row['foodstatus']==1)
{
$fd=2000;
echo (($dr*$fpm)+$fd);
}
else
{
echo $dr*$fpm;
}
?></td>
</tr>
<tr>
<td colspan="2" align="left" class="heading" style="color: red;">Personal Info » </td>
</tr>
<tr>
<td width="12%" valign="top" class="heading">Course: </td>
<td class="comb-value1"><?php echo $row['course'];?></td>
</tr>
<tr>
<td width="12%" valign="top" class="heading">Reg no: </td>
<td class="comb-value1"><?php echo $row['regno'];?></td>
</tr>
<tr>
<td width="12%" valign="top" class="heading">First Name: </td>
<td class="comb-value1"><?php echo $row['firstName'];?></td>
</tr>
<tr>
<td width="12%" valign="top" class="heading">Middle name: </td>
<td class="comb-value1"><?php echo $row['middleName'];?></td>
</tr>
<tr>
<td width="12%" valign="top" class="heading">Last: </td>
<td class="comb-value1"><?php echo $row['lastName'];?></td>
</tr>
<tr>
<td width="12%" valign="top" class="heading">Gender: </td>
<td class="comb-value1"><?php echo $row['gender'];?></td>
</tr>
<tr>
<td width="12%" valign="top" class="heading">Contact No: </td>
47
<td class="comb-value1"><?php echo $row['contactno'];?></td>
</tr>
<tr>
<td width="12%" valign="top" class="heading">Email id: </td>
<td class="comb-value1"><?php echo $row['emailid'];?></td>
</tr>
<tr>
<td width="12%" valign="top" class="heading">Emergency Contact: </td>
<td class="comb-value1"><?php echo $row['egycontactno'];?></td>
</tr>
<tr>
<td width="12%" valign="top" class="heading">Guardian Name: </td>
<td class="comb-value1"><?php echo $row['guardianName'];?></td>
</tr>
<tr>
<td width="12%" valign="top" class="heading">Guardian Relation: </td>
<td class="comb-value1"><?php echo $row['guardianRelation'];?></td>
</tr>
<tr>
<td width="12%" valign="top" class="heading">Guardian Contact: </td>
<td class="comb-value1"><?php echo $row['guardianContactno'];?></td>
</tr>
<tr>
<td colspan="2" class="heading" style="color: red;">Correspondence Address » </td>
</tr>
<tr>
<td width="12%" valign="top" class="heading">Address: </td>
<td class="comb-value1"><?php echo $row['corresAddress'];?></td>
</tr>
<tr>
<td width="12%" valign="top" class="heading">City: </td>
<td class="comb-value1"><?php echo $row['corresCIty'];?></td>
</tr>
<tr>
<td width="12%" valign="top" class="heading">State: </td>
<td class="comb-value1"><?php echo $row['corresState'];?></td>
</tr>
<tr>
<td width="12%" valign="top" class="heading">Pincode: </td>
<td class="comb-value1"><?php echo $row['corresPincode'];?></td>
</tr>
<tr>
<td colspan="2" class="heading" style="color: red;">Permanent Address » </td>
</tr>
<tr>
<td width="12%" valign="top" class="heading">Address: </td>
<td class="comb-value1"><?php echo $row['pmntAddress'];?></td>
</tr>
<tr>
48
<td width="12%" valign="top" class="heading">City: </td>
<td class="comb-value1"><?php echo $row['pmntCity'];?></td>
</tr>
<tr>
<td width="12%" valign="top" class="heading">State: </td>
<td class="comb-value1"><?php echo $row['pmnatetState'];?></td>
</tr>
<tr>
<td width="12%" valign="top" class="heading">Pincode: </td>
<td class="comb-value1"><?php echo $row['pmntPincode'];?></td>
</tr>
<tr>
<td width="12%" valign="top" class="heading">State: </td>
<td class="comb-value1"><?php echo $row['pmnatetState'];?></td>
</tr>
<?php } ?>
</table></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
<tr>
<td colspan="2" align="right" ><form id="form1" name="form1" method="post" action="">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="14%"> </td>
<td width="35%" class="comb-value"><label>
<input name="Submit" type="submit" class="txtbox4" value="Prints this Document " onClick="return f3();" />
</label></td>
<td width="3%"> </td>
<td width="26%"><label>
<input name="Submit2" type="submit" class="txtbox4" value="Close this document " onClick="return f2();" />
</label></td>
<td width="8%"> </td>
<td width="14%"> </td>
</tr>
</table>
</form> </td>
</tr>
<tr>
<td colspan="2"> </td>
</tr>
</table>
</body>
</html>
49
14.Get seater.php
<?php
include('includes/pdoconfig.php');
if(!empty($_POST["roomid"]))
{
$id=$_POST['roomid'];
$stmt = $DB_con->prepare("SELECT * FROM rooms WHERE room_no = :id");
$stmt->execute(array(':id' => $id));
?>
<?php
while($row=$stmt->fetch(PDO::FETCH_ASSOC))
{
?>
<?php echo htmlentities($row['seater']); ?>
<?php
}
}
if(!empty($_POST["rid"]))
{
$id=$_POST['rid'];
$stmt = $DB_con->prepare("SELECT * FROM rooms WHERE room_no = :id");
$stmt->execute(array(':id' => $id));
?>
<?php
while($row=$stmt->fetch(PDO::FETCH_ASSOC))
{
?>
<?php echo htmlentities($row['fees']); ?>
<?php
}
}
?>
15.Logout.php
<?php
session_start();
unset($_SESSION['id']);
session_destroy();
header('Location:index.php');
?>
50
7.2 SAMPLE SCREEN SHOT
1. USERLOGIN
51
2. DASHBOARD
52
3. ROOMS DETAILS
53
4. ROOM RELATED INFO
54
5. ACCESS LOG
55
6. CODE’S PROFILE
56
7. CHANGE PASSWORD
57
8. STUDENT REGISTRATION
58
9. USER REGISTRATION
59
10. PERSONAL INFO
60
11. PERMANENT ADRESS
61
12. ORRESPONDENSE ADDRESS
62
Chapter 8
8. CONCLUSION
To conclude the description about the project The project, developed using ASP.net
with c# and SQL SERVER is based on the requirement specification of the user and the
analysis of the existing system, with flexibility for future enhancement.
HOSTEL MANAGEMENT SYSTEM is very useful for hostel allotment and mess fee
calculation . This hostel management software is designed for people who want to manage
various activities in the hostel. For the past few years the numbers of educational
institutions are increasing rapidly. Thereby the numbers of hostels are also increasing for
the accommodation of the students studying in this institution. And hence there is a lot
of strain onthe person who are running the hostel and software’s are not usually used in
this context. This particular project deals with the problems on managing a hostel and
avoids the problems which occur when carried manually.
Identification of the drawbacks of the existing system leads to the designing of
computerized system that will be compatible to the existing system with the system
which is more user friendly and more GUI oriented.
63
8.1 SUMMARY
This project is aimed at developing a system for keeping records and showing
information about or in a hostel. This system will help the hostel officer to be able to
manage the affairs of the hostel. This system will provide full information about a
student in the hostel. It will show rooms available or not and number of people in a
particular room. This will also provide information on students who have paid in full or
are still owing. This system will also provide a report on the summary detail regarding
fees and bills students are owing. Also included is a user module for employees or the
hostel officer.
64
8.2 REFERENCE
[2] Agnes Molnar and Adam Granicz , “ .Net with Visual C# 2010”.
schools.http//w3
school.com/css_file
hostel.
http//cusat.ac.in/hostel_form
encyclopedia.
http://www.en.wikipedia.org/wiki/Wireless_securit
y.
65