You are on page 1of 182

1

PROJECT REPORT
ON
HOSTEL MANAGEMENT SYSTEM

For the partial fulfillment of the degree in


Bachelor of Computer Application

Submitted By:
Project Guide Pramod Singh Rautela
Dr. M.K.Sharma Prateek Mishra
Professor Priyanka Joshi
AIMCA Pramod Rana
Rahul singh bhoj

Faculty of Computer Science Applications


Amrapali Group of Institutes
2

CERTIFICATE

This is to certify that the project report entitled HOSTEL MANAGEMENT


SYSTEM submitted by Pramod Singh Rautela, Prateek Mishra, Priyanka
Joshi, Pramod Rana, Rahul Singh Bhoj to the Department of Amrapali Institute
of Management & Computer Application ,Haldwani for the partial fulfillment
of the requirements of the degree of Bachelor Of Computer Applications, is a
record of the authentic work carried out by them under my guidance and
supervision. The report has reached the requisite standards for submission.
The results contained in this report have not been submitted in part or full to any
other university or institute for the award of any degree or diploma.

Date

Place

Dr.
M.K,Sharma

Professor

AIMCA, Haldwani

(Project Guide)
3
4

ACKNOWLEDGEMENT

Exchange of ideas generate the new object to work in a better way whenever a
person is helped and cooperated by others his heart is bound to pay gratitude
and obligation to them.
To develop a project is not a one-man show. It is essentially a collective work,
where every step taken with all precautions and care.
Therefore our first duty is to THANKS all persons who took pain in completing
this project.
Firstly, we thank our mentor Dr. M.K.Sharma who gave us inspiration to do
work in this project and gave us his precious time whenever needed.
Thanks may be the matter of merely formality but with us it is expression of
heartfelt gratitude to our project supervision.
We are highly indebted for his invaluable suggestions and boosting confidence
to make this successful.
The success of this work is mostly due to his suitable guidance.

We also thank our class fellows and friends, who helped us a lot during our
project work.

This is to certify that the project entitled Student Attendance Management


System prepared by us,
Pramod Singh Rautela
Prateek Mishra
Priyanka Joshi
Pramod Rana
Rahul Singh Bhoj
5

For the partial fulfillment of the requirements of the minor project embodies
the work we all are doing during 5th semester of BCA under supervision of the
supervisor from this project.

CANDIDATES DECLARATION

We hereby declare that the work, which is being presented in the report entitled,
HOSTEL MANAGEMENT SYSTEM, in the fulfillment of the requirement
for the award of degree of Bachelor of Computer Applications, Haldwani is an
authentic Record of our work carried out under the supervision of
Dr.M.K.Sharma, Professor, Department of Amrapali Institute Of Management
& Computer Application, Haldwani. The matter embodied in this report has not
been submitted by us for the award of any other degree.

DATE:

Pramod Singh Rautela


Prateek Mishra
Priyanka Joshi
Pramod Rana
Rahul Singh Bhoj
6
7

Table of Content:

1- INTRODUCTION

1.1 PROJECT INTRODUCTION

1.2 PROBLEM DESCRIPTION

1.3 ABOUT ORGANIZATION

2-SYTEM STUDY

2.1 EXISTING SYSTEM WITH LIMITATIONS

2.2 PROPOSED SYSTEM WITH OBJECTIVES

2.3FEASIBILITY STUDY

2.3.1 ECONOMIC FEASIBILITY

2.3.2 TECHNICAL FEASIBILIT

2.3.3DURATION FEASIBILITY

3-SYSTEM ANALYSIS

3.1SYSTEM FLOWCHARTS

3.2E-R DIAGRAMS

3.3DATA FLOW DIAGRAM (DFDS)

3.4 REQUIREMENT SPECIFICATIONS

4-SYSTEM DESIGN

4.1FILE/DATABASE DESIGN

4.2NORMALIZATION

4.3INPUT/OUTPUT FORM DESIGN

4.4 SCREEN DESIGN

4.5 REPORT DESIGN


8

5-CODING

5.1LIST OF PROGRAMS

5.2 INPUTS

5.3 OUTPUTS

6- SYSTEM TESTING

6.1 PREPARATION OF TEST DATA & TEST ORACLE

6.2 UNIT TESTING , CLASS TESTING

6.3 TESTING WITH DUMMY/LIVE DATA

7- SYSTEM SECURITY

7.1 CHECKS AND CONTROL

7.2 ENCRYPTION, SECURE

8-CONCLUSIONS AND FUTURE ENHANCEMENTS

8.1 CONCLUSION

8.2 SCOPE FOR FUTURE PROSPECTS


9

GROUP MEMBERS AND THEIR WORK

1) Priyanka Joshi - Helps in documentation

2) Pramod Singh Rautela- Form Designing and coding

3) Prateek Mishra- Form Designing

4) Pramod Rana Database design

5) Rahul Singh Bhoj- Project Documentation and designing


10

1.1 INTRODUCTION

As the name specifies HOSTEL MANAGEMENT SYSTEM is software developed


for managing various activities in the hostel. For the past few years the number of
educational institutions
is increasing rapidly. Thereby the number of hostels is also increasing for the
accommodation of the students
studying in this institution. And hence there is a lot of strain on the person who are
running the hostel and
softwares are not usually used in this context. This particular project deals with the
problems on managing a
11

hostel and avoids the problems which occur when carried manually.
Identification of the drawbacks of the existing system leads to the development of
computerized hostel
management system that will be compatible to the existing system with the system
which is more users
friendly and more GUI oriented. We can improve the efficiency of the system, thus
overcome the drawbacks
of the existing hostel management system.Less human error, Strength and strain of
manual labour can be
reduced, High security, Data redundancy can be avoided to some extent, Data
consistency, Easy to handle,
Easy data updating, Easy record keeping, Backup data can be easily generated.

1.1 Background
This Hostel Management System is developed in favor of the hostel management team
which helps them to
save the records of the students about their rooms and other things. It helps them from
the manual work from
which it is very difficult to find the record of the students and the information about
those ones who had left the
hostel years before.

This solution is developed on the plight of the hostel management team, through this
they cannot require so
efficient person to handle and manage the affairs of the students in the hostel, all you
need to do is to
login as administrator and you can see the information of all the students who have
obtained and registered their
hostel form, click verify to ascertain their eligibility and allocate them to the available
hostel.
12

Identification of the problems of the existing hostel management leads to the


development of computerized
solution that will be compatible to the existing hostel management with the solution
which is more users
friendly and more GUI oriented. We can improve the efficiency of the hostel
management, thus
overcome the drawbacks of the existing management.

1.2 Objectives
The main objectives of this project work are that:
Student will no longer apply for their hostels manually.
The warden can see and access the students data.

This also will reduce the manual work of the persons in admin penal.
It helps the admin to know the number of students that can leave in a room and a block.
To ensure that the number of student staying in a room does not exceed specified limit.
Help the admin to disseminate information to students without calling for a meeting or
moving room
b room.
To know the number of items (e.g. bed) given to student staying in the hostel
To ensure that student remit the hostel property given to them before vacating the
hostel.

The system helps the admin to:


Allot different students to their different hostels.
Vacate the student from the hostels
Control the status of the hostel fee payment.
Edith the details of the students and modify the students records.
13

1.3 Problem Definition


Rufus Giwa Polytechnic has eleven hostels, which consist of five boys hostels and six
girls hostels.
All these
hostels at present are managed manually by the hostel officer. Thus, there are a lot of
duplications which
cannot be easily avoided. Hence, there is lot strains on the hostel management due to the
manual processes
presently in used.
14

1.2 PROJECT DESCRIPTION

PROJECT DEFINITION:
This system developed will reduce the manual work and avoid redundant data.
By maintaining the teaching manually, then efficient reports cannot be
generated. The system can generate efficient weekly consolidate report based
on the kids skills. As the data are maintained in registers it has been a tough
task for admin and staff to maintain for long time. Instead the software can
keep long and retrieve the information when needed.

PROJECT OVERVIEW:

Kids learning basically has two main modules for proper functioning
Admin module is has rights for creating any new entry of student details.
User has rights of collect daily marks, generating result.
Result report can be taken by given details of student details, class.

MODULE DESCRIPTION:

The system should be designed in such a way that only authorized people
should be allowed to access some
Particular modules. The records should be modified by only administrators
and no one else. The user should always be in control of the application and
not the vice versa.

PROJECT CATEGORY:
15

For academic purpose only. This project is used for academic purpose only.
Learning of the students can be managed by this system. This can be used by
the institution or any educational department for which it is designed.
16

TOOLS/PLATFORM REQUIRED:

VISUAL BASIC 6.0 (FRONT END)


Visual Basic is a third-generation event-driven programming
language &Integrated Development Environment (IDE) from
Microsoft. Visual Basic is derived from BASIC, a user friendly
programming language designed for beginners, & it enables
the Rapid Application Development (RAD) of Graphical User
Interface (GUI) applications, access to databases using data
access objects, remote data objects or ActiveX data objects,
& creation of ActiveX controls & objects.

MS ACCESS 2007 (DATABASE)

Microsoft Access is a database management system from


Microsoft that combines the relational Microsoft Jet Database
Engine with a graphical user interface & software development
tools.MS Access stores data in its own format based on the
Access Jet Database Engine. It can also import or link directly to
data stored in other applications & databases. Like other Microsoft
Office applications, Access is supported by Visual Basic for
Applications (VBA), an object based programming language that
can reference a variety of objects including DAO (Data Access
Objects), ActiveX Data Objects and many other ActiveX
components.
17

2- SYSTEM STUDY

2.1 EXISTING SYSTEM

In the present system all work is done on paper. The whole session Score is
stored in register and at the end of the session the result are generated. We are
not interested in generating result in the middle of the session or as per the
requirement because it takes more time in calculation. At the end of session the
students can see their total performance.

LIMITATIONS

Not user friendly: The existing system is not user


friendly because the retrieval of data is very slow and
data is not maintained efficiently.
Difficulty in result generating: We require more
calculations to generate the result so it is generated at
the end of the session.
Manual control: All calculations to a generate report is
done manually so there is greater chance of errors.
18

Lots of paperwork: Existing system requires lot of paper


work. Loss of even a single register/record led to
difficult situation because all the papers are needed to
generate the reports.
Time consuming: Every work is done manually so we
cannot generate report in the middle of the session or as
per the requirement because it is very time consuming.

2.2 PROPOSED SYSTEM

To overcome the drawbacks of the existing system, the proposed


system has been evolved. This project aims to reduce the paper work
and saving time to generate accurate results from the student learning.
The system provides with the best user interface. The efficient reports
can be generated by using this proposed system.
19

OBJECTIVE

1. Accuracy: - The level of accuracy in the propose system will be higher. All
operation would be done
2. correctly and it ensures that whatever information is coming from the center is
accurate

3. Reliability: - The reliability of the proposed system will be high due to the above
stated reasons. The

4. reason for the increased reliability of the system is that now there would be
proper storage of information.

5. No Redundancy:-In the proposed system utmost care would be that no


information is repeated
6. anywhere, in storage or otherwise. This would assure economic use of storage
space and consistency in the data stored.

7. Reports Generation Easy: reports can be easily generated in the proposed system
so user can generate the report as per the requirement (monthly) or in the
middle of the session. User can give the notice to the students about their
performance.

8. Very Less Paper Work: The proposed system requires very less paper work. All
the data is feted into the computer immediately and reports can be generated
through computers. Moreover work became very easy because there is no need to
keep data on paper.

9. Computer Operator Control: Computer operator control will be there so no chance


of errors.
Moreover storing and retrieving of information is easy. So work can be done
speedily and in time.
20

2.3 FEASIBILITY STUDY

Depending on the results of the initial investigation the survey is now expanded
to a more detailed feasibility study. FEASIBILITY STUDY is a test of system
proposal according to its workability, impact of the organization, ability to meet
needs and effective use of the resources. It focuses on these major questions:

During feasibility analysis for this project, following primary areas of interest
are to be considered. Investigation and generating ideas about a new system
does this.
Steps in feasibility analysis
Eight steps involved in the feasibility analysis are:

Form a project team and appoint a project leader.


Prepare system flowcharts.
Enumerate potential proposed system.
Define and identify characteristics of proposed system.
Determine and evaluate performance and cost effective of each proposed system.
Weight system performance and cost data.
Select the best-proposed system.
Prepare and report final project directive to management.

2.3.1 ECONOMIC FEASIBILITY


21

Development of this application is highly economically feasible. The


only thing to be done is making an environment with an effective
supervision.
It is cost effective in the sense that has eliminated the paper work
completely. The system is also time effective because the calculations
are automated which are made at the end of the month or as per the
user requirement.

2.3.2 TECHNICAL FEASIBILITY

The study of resource availability that may affect the ability to achieve an
acceptable system. This evolution determines whether the technology needed
for the proposed system is available or not.

Can the work for the project be done with current equipment existing
software technology &available personal?

Can the system be upgraded if developed?

If new technology is needed then what can be developed?

This is concerned with specifying equipment and software that will


successfully satisfy the user requirement.

The technical needs of the system may include:


22

2.3.3 DURATION FEASIBILITY

Time evaluation is the most important consideration in the development of


project. The time schedule required for the developed of this project is very
important since more development time effect machine time, cost and cause
delay in the development of other systems.

3-SYSTEM ANALYSIS

System analysis is the process of gathering and interpreting facts, diagnosing


problems and using the facts to improve the system.
23

Analysis is the detailed study of various operation performed by a system and


their relationship within and outside of the system.
This involves gathering information and using structured tools for analysis.

3.1 FLOW CHART: Data Flow Diagram


A DFD also known as bubble chart has the purpose of clarifying system
requirements and identifying major transformations. It shows the flow of
data through a system. It is a graphical tool because it presents a picture. The
DFD may be partitioned into levels that represent increasing information flow
and functional detail.
Four simple notations are used to complete a DFD. These notations are
given below:-

DATA FLOW: - The data flow is used to describe the movement of


information from one part of the system to another part. Flows represent
data in motion. It is a pipe line through which information flows.

PROCESS: - A circle or bubble represents a process that transforms incoming


data to outgoing data. Process shows a part of the system that transform inputs
to outputs.
24

EXTERNAL ENTITY: - A square defines a source or destination of system


data. External entities represent any entity that supplies or receive information
from the system but is not a part of the system.

DATA STORE: - The data store represents a logical file. A logical file can
represent either a data store symbol which can represent either
a data structure or a physical file on disk. The data store is used to collect data
at rest or a temporary repository of data.
25
26

1-Level DFD
27

1.1 -Level DFD


28

2-Level DFD
29

2.2-Level DFD
30
31

Coding :
Login page :
<?php
session_start();
include('includes/config.php');
if(isset($_POST['login']))
{
$email=$_POST['email'];
$password=$_POST['password'];
$stmt=$mysqli->prepare("SELECT email,password,id
FROM userregistration WHERE email=? and
password=? ");

$stmt-
>bind_param('ss',$email,$password);

$stmt->execute();

$stmt ->
bind_result($email,$password,$id);

$rs=$stmt->fetch();

$stmt->close();
32

$_SESSION['id']=$id;

$_SESSION['login']=$email;

$uip=$_SERVER['REMOTE_ADDR'];

$ldate=date('d/m/
Y h:i:s', time());

if($rs)
{
$uid=$_SESSION['id'];

$uemail=$_SESSION['login'];
$ip=$_SERVER['REMOTE_ADDR'];
$geopluginURL='http://www.geoplugin.net/php.gp?ip=
'.$ip;
$addrDetailsArr =
unserialize(file_get_contents($geopluginURL));
$city = $addrDetailsArr['geoplugin_city'];
$country =
$addrDetailsArr['geoplugin_countryName'];
33

$log="insert into
userLog(userId,userEmail,userIp,city,country)
values('$uid','$uemail','$ip','$city','$country')";
$mysqli->query($log);
if($log)
{
header("location:dashboard.php");
}
}

else
{

echo
"<script>alert('Invalid Username/Email or
password');</script>";
}
}
?>

<!doctype html>
<html lang="en" class="no-js">
<head>
<meta
charset="UTF-8">
34

<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">
35

<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 type="text/javascript">
function valid()
{
if(document.registration.password.value!=
document.registration.cpassword.value)
{
alert("Password and Re-Type Password Field do not
match !!");
36

document.registration.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-
37

md-12">

<h2
class="page-title">User Login </h2>

<div
class="row">

<div class="col-
md-6 col-md-offset-3">

<div
class="well row pt-2x pb-3x bk-light">

<div
class="col-md-8 col-md-offset-2">

<form
action="" class="mt" method="post">
38

<label for="" class="text-uppercase text-


sm">Email</label>

<input
type="text" placeholder="Email" name="email"
class="form-control mb">

<label for="" class="text-uppercase text-


sm">Password</label>

<input
type="password" placeholder="Password"
name="password" class="form-control mb">

<input
39

type="submit" name="login" class="btn btn-primary


btn-block" value="login" >

</form>

</div>

</div>

<div
class="text-center text-light">

<a h
ref="forgot-password.php" class="text-light">Forgot
password?</a>

</div>

</div>

</div>

</div>
40

</div>

</div>

</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>
41

<script
src="js/fileinput.js"></script>
<script
src="js/chartData.js"></script>
<script
src="js/main.js"></script>
</body>

</html>
42

Registration page:
<?php
session_start();
include('includes/config.php');
if(isset($_POST['submit']))
{
$regno=$_POST['regno'];
$fname=$_POST['fname'];
$mname=$_POST['mname'];
$lname=$_POST['lname'];
$gender=$_POST['gender'];
$contactno=$_POST['contact'];
$emailid=$_POST['email'];
$password=$_POST['password'];
$query="insert into
userRegistration(regNo,firstName,middleName,lastName,ge
nder,contactNo,email,password) values(?,?,?,?,?,?,?,?)";
$stmt = $mysqli->prepare($query);
$rc=$stmt-
>bind_param('sssssiss',$regno,$fname,$mname,$lname,$gen
der,$contactno,$emailid,$password);
$stmt->execute();
43

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>User 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">
44

<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 type="text/javascript">
function valid()
{
if(document.registration.password.value!=

document.registration.cpassword.value)
{
alert("Password and Re-Type Password Field do not match
!!");
document.registration.cpassword.focus();
return false;
}
45

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">

<h2 class="page-title">Student
Registration </h2>

<div class="row">
<div class="col-md-12">
<div class="panel
panel-primary">
46

<div class="panel-heading">Fill all Info</div>


<div class="panel-
body">
<form method="post" action=""
name="registration" class="form-horizontal"
onSubmit="return valid();">

<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" required="required" >
</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" required="required" >
47

</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">
</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" required="required">
</div>
</div>

<div class="form-group">
48

<label class="col-sm-2 control-label">Gender : </label>


<div class="col-sm-8">
<select name="gender" class="form-control"
required="required">
<option value="">Select Gender</option>
<option value="male">Male</option>
<option value="female">Female</option>
<option value="others">Others</option>
</select>
</div>
</div>
<div class="form-group">

<label class="col-sm-2 control-label">Contact No : </label>


<div class="col-sm-8">
<input type="text" name="contact" id="contact"
class="form-control" required="required">
</div>
</div>

<div class="form-group">
49

<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" onBlur="checkAvailability()"
required="required">
<span id="user-availability-status" style="font-
size:12px;"></span>
</div>
</div>

<div class="form-group">
<label class="col-sm-2 control-label">Password: </label>
<div class="col-sm-8">
<input type="password" name="password" id="password"
class="form-control" required="required">
</div>
</div>

<div class="form-group">
<label class="col-sm-2 control-label">Confirm Password :
</label>
50

<div class="col-sm-8">
<input type="password" name="cpassword"
id="cpassword" 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>
51

</div>
</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>
function checkAvailability() {

$("#loaderIcon").show();
jQuery.ajax({
url: "check_availability.php",
52

data:'emailid='+$("#email").val(),
type: "POST",
success:function(data){
$("#user-availability-status").html(data);
$("#loaderIcon").hide();
},
error:function ()

{
event.preventDefault();
alert('error');
}
});
}
</script>

</html>
53

Book Hostel code:


<?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'];
54

$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'];
$query="insert into
registration(roomno,seater,feespm,foodstatus,stayfrom,duration,c
ourse,regno,firstName,middleName,lastName,gender,contactno,e
mailid,egycontactno,guardianName,guardianRelation,guardianC
ontactno,corresAddress,corresCIty,corresState,corresPincode,pm
ntAddress,pmntCity,pmnatetState,pmntPincode)
values(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)";
$stmt = $mysqli->prepare($query);
$rc=$stmt-
>bind_param('iiiisisissssisississsisssi',$roomno,$seater,$feespm,$f
oodstatus,$stayfrom,$duration,$course,$regno,$fname,$mname,$l
name,$gender,$contactno,$emailid,$emcntno,$gurname,$gurrelat
55

ion,$gurcntno,$caddress,$ccity,$cstate,$cpincode,$paddress,$pcit
y,$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">
56

<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({
57

type: "POST",
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">
58

<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)
{ ?>
59

<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);" 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())
60

{
?>
<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">
61

<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">
62

<label class="col-sm-2 control-label">Duration</label>


<div class="col-sm-8">
<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>
63

<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())
{
64

?>
<option value="<?php echo $row->course_fn;?>"><?php echo
$row->course_fn;?>&nbsp;&nbsp;(<?php echo $row-
>course_sn;?>)</option>
<?php } ?>
</select> </div>
</div>

<?php
$aid=$_SESSION['id'];
$ret="select * from userregistration where id=?";
$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">
65

<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">
66

<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">
<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>
67

<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>
68

</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>
69

<div class="form-group">
<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>
70

<?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">
71

<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>

<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">
72

<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 } ?>
73

</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>
74

</div>
</div>
</div>
</div>
</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(){
75

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 (){}
76

});
}
</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",
data :{userinfo:fetch_dbid},
success:function(data){
$('.result').val(data);
}
});
})});
</script>

</html>
77

Profile code:
<?php
session_start();
include('includes/config.php');
date_default_timezone_set('Asia/Kolkata');
include('includes/checklogin.php');
check_login();
$aid=$_SESSION['id'];
if(isset($_POST['update']))
{

$regno=$_POST['regno'];
$fname=$_POST['fname'];
$mname=$_POST['mname'];
$lname=$_POST['lname'];
$gender=$_POST['gender'];
$contactno=$_POST['contact'];
$udate = date('d-m-Y h:i:s', time());
$query="update userRegistration set
regNo=?,firstName=?,middleName=?,lastName=?,gender=?,conta
ctNo=?,updationDate=? where id=?";
$stmt = $mysqli->prepare($query);
78

$rc=$stmt-
>bind_param('sssssisi',$regno,$fname,$mname,$lname,$gender,$
contactno,$udate,$aid);
$stmt->execute();
echo"<script>alert('Profile updated Succssfully');</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>Profile Updation</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">>
79

<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 type="text/javascript">
function valid()
{
if(document.registration.password.value!=
document.registration.cpassword.value)
{
alert("Password and Re-Type Password Field do not match !!");
document.registration.cpassword.focus();
return false;
}
return true;
}
80

</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">
<?php
$aid=$_SESSION['id'];
$ret="select * from userregistration where id=?";
$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="row">
<div class="col-md-12">
<h2 class="page-title"><?php
echo $row->firstName;?>'s&nbsp;Profile </h2>
81

<div class="row">
<div class="col-md-12">
<div class="panel
panel-primary">
<div class="panel-
heading">

Last Updation date : &nbsp; <?php echo $row->updationDate;?>


</div>

<div class="panel-body">
<form method="post" action="" name="registration"
class="form-horizontal" onSubmit="return valid();">

<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" required="required" value="<?php echo $row-
>regNo;?>" >
82

</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;?>"
required="required" >
</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;?>" >
</div>
</div>

<div class="form-group">
<label class="col-sm-2 control-label">Last Name : </label>
83

<div class="col-sm-8">
<input type="text" name="lname" id="lname" class="form-
control" value="<?php echo $row->lastName;?>"
required="required">
</div>
</div>

<div class="form-group">
<label class="col-sm-2 control-label">Gender : </label>
<div class="col-sm-8">
<select name="gender" class="form-control"
required="required">
<option value="<?php echo $row->gender;?>"><?php echo
$row->gender;?></option>
<option value="male">Male</option>
<option value="female">Female</option>
<option value="others">Others</option>

</select>
</div>
</div>

<div class="form-group">
<label class="col-sm-2 control-label">Contact No : </label>
84

<div class="col-sm-8">
<input type="text" name="contact" id="contact" class="form-
control" maxlength="10" value="<?php echo $row-
>contactNo;?>" required="required">
</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>
<span id="user-availability-status" style="font-
size:12px;"></span>
</div>
</div>
<?php } ?>

<div class="col-sm-6 col-sm-offset-4">


85

<input type="submit" name="update" Value="Update Profile"


class="btn btn-primary">
</div>
</form>

</div>
</div>
</div>
</div>
</div>
</div>
</div>
</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>
86

<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();
87

jQuery.ajax({
url: "check_availability.php",
data:'emailid='+$("#email").val(),
type: "POST",
success:function(data){
$("#user-availability-status").html(data);
$("#loaderIcon").hide();
},
error:function (){}
});
}
</script>

</html>
88

Change password code:


<?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)
{
89

$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">
90

<meta name="description" content="">


<meta name="author" content="">
<meta name="theme-color" content="#3e454c">
<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)
91

{
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">

<h2 class="page-title">Change
Password </h2>
92

<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);
$stmt->execute();
$stmt -> bind_result($result);
$stmt -> fetch(); ?>

Last Updation
Date:&nbsp;<?php echo $result; ?> </div>
<div class="panel-
body">
<form method="post" class="form-
horizontal" name="changepwd" id="change-pwd"
onSubmit="return valid();">
<?php if(isset($_POST['changepwd']))
{ ?>
93

<p
style="color: red"><?php echo htmlentities($_SESSION['msg']);
?><?php echo htmlentities($_SESSION['msg']=""); ?></p>
<?php } ?>
<div
class="hr-dashed"></div>
<div
class="form-group">

<label class="col-sm-4 control-label">old Password </label>

<div class="col-sm-8">
<input type="password" value=""
name="oldpassword" id="oldpassword" class="form-control"
onBlur="checkpass()" required="required">
<span
id="password-availability-status" class="help-block m-b-none"
style="font-size:12px;"></span> </div>
</div>
<div
class="form-group">

<label class="col-sm-4 control-label">New


Password</label>

<div class="col-sm-8">
94

<input
type="password" class="form-control" name="newpassword"
id="newpassword" value="" required="required">

</div>
</div>
<div class="form-group">
<label class="col-
sm-4 control-label">Confirm Password</label>
<div class="col-
sm-8">
<input type="password" class="form-
control" value="" required="required" id="cpassword"
name="cpassword" >

</div>
</div>

<div class="col-sm-6 col-sm-offset-4">

<button class="btn btn-default"


type="submit">Cancel</button>
95

<input type="submit" name="changepwd" Value="Change


Password" class="btn btn-primary">
</div>

</form>

</div>
</div>
</div>
</div>

</div>
</div>

</div>
</div>

</div>
96

</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();
97

},
error:function (){}
});
}
</script>
</body>

</html>
98

Admin code:
<?php
session_start();
include('includes/config.php');
if(isset($_POST['login']))
{
$username=$_POST['username'];
$password=$_POST['password'];
$stmt=$mysqli->prepare("SELECT username,email,password,id
FROM admin WHERE (userName=?|| email=?) and password=?
");
$stmt-
>bind_param('sss',$username,$username,$password);
$stmt->execute();
$stmt ->
bind_result($username,$username,$password,$id);
$rs=$stmt->fetch();
$_SESSION['id']=$id;
$uip=$_SERVER['REMOTE_ADDR'];
$ldate=date('d/m/Y h:i:s', time());
if($rs)
{
// $insert="INSERT into
admin(adminid,ip)VALUES(?,?)";
99

// $stmtins = $mysqli->prepare($insert);
// $stmtins->bind_param('sH',$id,$uip);
//$res=$stmtins->execute();
header("location:admin-profile.php");
}

else
{
echo "<script>alert('Invalid
Username/Email or password');</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="">
100

<meta name="author" content="">

<title>Admin login</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">
101

<h1 class="text-center text-bold


text-light mt-4x">Hostel Management System</h1>
<div class="well row pt-2x pb-3x
bk-light">
<div class="col-md-8 col-
md-offset-2">

<form action=""
class="mt" method="post">
<label for=""
class="text-uppercase text-sm">Your Username or
Email</label>
<input
type="text" placeholder="Username" name="username"
class="form-control mb">
<label for=""
class="text-uppercase text-sm">Password</label>
<input
type="password" placeholder="Password" name="password"
class="form-control mb">

<input
type="submit" name="login" class="btn btn-primary btn-block"
value="login" >
</form>
102

</div>
</div>
</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>
</html>
103

Manage student code:


<?php
session_start();
include('includes/config.php');
include('includes/checklogin.php');
check_login();

if(isset($_GET['del']))
{
$id=intval($_GET['del']);
$adn="delete from registration where id=?";
$stmt= $mysqli->prepare($adn);
$stmt->bind_param('i',$id);
$stmt->execute();
$stmt->close();
echo "<script>alert('Data Deleted');</script>" ;
}
?>
<!doctype html>
<html lang="en" class="no-js">

<head>
104

<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>Manage Rooms</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 language="javascript" type="text/javascript">
var popUpWin=0;
function popUpWindow(URLStr, left, top, width, height)
{
if(popUpWin)
105

{
if(!popUpWin.closed) popUpWin.close();
}
popUpWin = open(URLStr,'popUpWin',
'toolbar=no,location=no,directories=no,status=no,menubar=no,sc
rollbars=yes,resizable=no,copyhistory=yes,width='+510+',height=
'+430+',left='+left+',
top='+top+',screenX='+left+',screenY='+top+'');
}
</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">Manage
Rooms</h2>
106

<div class="panel panel-default">


<div class="panel-
heading">All Room 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>Student Name</th>

<th>Reg no</th>

<th>Contact no </th>

<th>room no </th>

<th>Seater </th>

<th>Staying From </th>

<th>Action</th>
</tr>
107

</thead>
<tfoot>
<tr>

<th>Sno.</th>

<th>Student Name</th>

<th>Reg no</th>

<th>Contact no </th>

<th>Room no </th>

<th>Seater </th>

<th>Staying From </th>

<th>Action</th>
</tr>
</tfoot>
<tbody>
<?php
$aid=$_SESSION['id'];
$ret="select * from registration";
108

$stmt= $mysqli->prepare($ret) ;
//$stmt->bind_param('i',$aid);
$stmt->execute() ;//ok
$res=$stmt->get_result();
$cnt=1;
while($row=$res->fetch_object())
{
?>
<tr><td><?php echo $cnt;;?></td>
<td><?php echo $row->firstName;?><?php echo $row-
>middleName;?><?php echo $row->lastName;?></td>
<td><?php echo $row->regno;?></td>
<td><?php echo $row->contactno;?></td>
<td><?php echo $row->roomno;?></td>
<td><?php echo $row->seater;?></td>
<td><?php echo $row->stayfrom;?></td>
<td>
<a href="javascript:void(0);"
onClick="popUpWindow('http://localhost/hostel/admin/full-
profile.php?id=<?php echo $row->id;?>');" title="View Full
Details"><i class="fa fa-desktop"></i></a>&nbsp;&nbsp;
<a href="manage-students.php?del=<?php echo $row->id;?>"
title="Delete Record" onclick="return confirm("Do you want to
delete");"><i class="fa fa-close"></i></a></td>
109

</tr>
<?php
$cnt=$cnt+1;
} ?>

</tbody>
</table>

</div>
</div>

</div>
</div>

</div>
</div>
</div>
110

<!-- 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>

</body>

</html>
111

Admin profile code:


<?php
session_start();
include('includes/config.php');
include('includes/checklogin.php');
check_login();

if(isset($_GET['del']))
{
$id=intval($_GET['del']);
$adn="delete from registration where id=?";
$stmt= $mysqli->prepare($adn);
$stmt->bind_param('i',$id);
$stmt->execute();
$stmt->close();
echo "<script>alert('Data Deleted');</script>" ;
}
?>
<!doctype html>
<html lang="en" class="no-js">

<head>
112

<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>Manage Rooms</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 language="javascript" type="text/javascript">
var popUpWin=0;
function popUpWindow(URLStr, left, top, width, height)
{
if(popUpWin)
113

{
if(!popUpWin.closed) popUpWin.close();
}
popUpWin = open(URLStr,'popUpWin',
'toolbar=no,location=no,directories=no,status=no,menubar=no,sc
rollbars=yes,resizable=no,copyhistory=yes,width='+510+',height=
'+430+',left='+left+',
top='+top+',screenX='+left+',screenY='+top+'');
}
</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">Manage
Rooms</h2>
114

<div class="panel panel-default">


<div class="panel-
heading">All Room 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>Student Name</th>

<th>Reg no</th>

<th>Contact no </th>

<th>room no </th>

<th>Seater </th>

<th>Staying From </th>

<th>Action</th>
</tr>
115

</thead>
<tfoot>
<tr>

<th>Sno.</th>

<th>Student Name</th>

<th>Reg no</th>

<th>Contact no </th>

<th>Room no </th>

<th>Seater </th>

<th>Staying From </th>

<th>Action</th>
</tr>
</tfoot>
<tbody>
<?php
$aid=$_SESSION['id'];
$ret="select * from registration";
116

$stmt= $mysqli->prepare($ret) ;
//$stmt->bind_param('i',$aid);
$stmt->execute() ;//ok
$res=$stmt->get_result();
$cnt=1;
while($row=$res->fetch_object())
{
?>
<tr><td><?php echo $cnt;;?></td>
<td><?php echo $row->firstName;?><?php echo $row-
>middleName;?><?php echo $row->lastName;?></td>
<td><?php echo $row->regno;?></td>
<td><?php echo $row->contactno;?></td>
<td><?php echo $row->roomno;?></td>
<td><?php echo $row->seater;?></td>
<td><?php echo $row->stayfrom;?></td>
<td>
<a href="javascript:void(0);"
onClick="popUpWindow('http://localhost/hostel/admin/full-
profile.php?id=<?php echo $row->id;?>');" title="View Full
Details"><i class="fa fa-desktop"></i></a>&nbsp;&nbsp;
<a href="manage-students.php?del=<?php echo $row->id;?>"
title="Delete Record" onclick="return confirm("Do you want to
delete");"><i class="fa fa-close"></i></a></td>
117

</tr>
<?php
$cnt=$cnt+1;
} ?>

</tbody>
</table>

</div>
</div>

</div>
</div>

</div>
</div>
</div>
118

<!-- 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>

</body>

</html>
119

Logout code:
<?php
session_start();
unset($_SESSION['id']);
session_destroy();
header('Location:../index.php');
?>
120

Full-profile code:
<?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();
}
121

</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 id = '".$_GET['id']."'");
while($row=mysql_fetch_array($ret))
{
?>
<tr>
<td colspan="2" align="center"
class="font1">&nbsp;</td>
122

</tr>
<tr>
<td colspan="2" align="center"
class="font1">&nbsp;</td>
</tr>

<tr>
<td colspan="2" class="font"><?php echo
ucfirst($row['firstName']);?> <?php echo
ucfirst($row['lastName']);?>'S <span class="font1"> information
&raquo;</span> </td>
</tr>
<tr>
<td colspan="2"
class="font">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<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 &raquo; </td>
</tr>
<tr>
123

<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>
124

<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>
<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>
125

</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 &raquo; </td>
</tr>
<tr>
<td width="12%" valign="top" class="heading">Course: </td>
<td class="comb-value1"><?php echo $row['course'];?></td>
126

</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>
127

</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>
<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>
128

</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 &raquo; </td>
129

</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>
130

<tr>
<td colspan="2" class="heading" style="color:
red;">Permanent Address &raquo; </td>
</tr>
<tr>
<td width="12%" valign="top" class="heading">Address: </td>
<td class="comb-value1"><?php echo
$row['pmntAddress'];?></td>
</tr>

<tr>
<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>
131

<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>
132

</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%">&nbsp;</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%">&nbsp;</td>
<td width="26%"><label>
<input name="Submit2" type="submit" class="txtbox4"
value="Close this document " onClick="return f2();" />
</label></td>
<td width="8%">&nbsp;</td>
<td width="14%">&nbsp;</td>
</tr>
133

</table>
</form> </td>
</tr>
<tr>
<td colspan="2">&nbsp;</td>
</tr>
</table>
</body>
</html>
134

Dashboard code:
<?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">
135

<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">
136

<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>
137

<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 &nbsp; <i class="fa fa-arrow-right"></i></a>
</div>
</div>
138

</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>
139

<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(){

// 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");
140

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>

</html>
141

System design:
Login Page:
142

User Login Page:


143

Student Registration:
144

3.4 REQUIREMENT SPECIFIC

HARDWARE & SOFTWARE REQUIREMENT:-

The following are the requirements in this system:

HARDWARE REQUIREMENT:-

RAM:-512MB
Hard Disk:-1 GB
Processor:-Intel Pentium 4 or higher
Operating System:-Windows XP,7,8,10

SOFTWARE REQUIREMENT:-

Microsoft windows
Visual basic 6.0(Front end)
MS Access(Database)
145

4-SYSTEM DESIGN

4.1 DATABASE DESIGN


146
147
148

FORM DESIGN:
149
150

INPUT DESIGN:

ENGLISH PAGE OUTPUT DESIGN:


151

MATH PAGE OUTPUT DESIGN:


152

HINDI PAGE OUTPUT DESIGN:


153

POEM OUTPUT DESIGN:


154

OUTPUT OF POEM(HINDI POEM):


155

OUTPUT OF SELECTED POEM:


156

INPUT TEST DESIGN:


157

OUTPUT:
158
159

4.4 REPORT DESIGN


160
161

5-CODING
Welcome page coding:

Private Sub Command1_Click()

Unload Me

End Sub

Private Sub Command2_Click()

Form3.Show

Unload Me

End Sub

Categories page coding :

Private Sub Command1_Click()

Form4.Show

End Sub

Private Sub Command2_Click()

Form5.Show

End Sub

Private Sub Command3_Click()

Form1.Show
162

End Sub

Private Sub Command4_Click()

Form6.Show

End Sub

Private Sub Command5_Click()

Form9.Show

End Sub

Subject page coding (English page) :

Private Sub Command1_Click()

poem9.Show

End Sub

Private Sub Command2_Click()

poem10.Show

End Sub

Private Sub Command3_Click()

Unload Me

End Sub
163

Subject page coding (Maths page) :

Private Sub Command1_Click()

End Sub

Private Sub Command3_Click()

Unload Me

End Sub

Subject page coding (Hindi page) :

Private Sub Command1_Click()

poem7.Show

End Sub

Private Sub Command2_Click()

poem8.Show

End Sub

Private Sub Command3_Click()

Unload Me

End Sub
164

Private Sub Frame1_DragDrop(Source As Control, X As Single, Y As


Single)

End Sub

Subject page coding (Poem page) :

Private Sub Command1_Click()

Form7.Show

End Sub

Private Sub Command2_Click()

Form8.Show

End Sub

Private Sub Command3_Click()

Unload Me

End Sub

Subject page coding (Test page) :

Private Sub Command1_Click()

If Text1.Text <> Empty Then


165

Set snt = New tt_cls

str1 = "insert into master(std_name,marks,q_id) values('" &


Text1.Text & "',0,11)"

snt.execute_qry (str1)

Form10.Show

Unload Me

Else

MsgBox "PLEASE ENTER A VALID NAME"

End If

End Sub

Private Sub Command2_Click()

Form3.Show

Unload Me

End Sub

Private Sub Frame1_DragDrop(Source As Control, X As Single, Y As


Single)

End Sub
166

Choose Poem Categorie :


Private Sub Command1_Click()

Form7.Show

End Sub

Private Sub Command2_Click()

Form8.Show

End Sub

Private Sub Command3_Click()

Unload Me

End Sub

Choose a Hindi Poem Categorie code :


Private Sub Command1_Click()

poem1.Show

End Sub

Private Sub Command2_Click()

poem2.Show

End Sub

Private Sub Command3_Click()

poem3.Show

End Sub
167

Private Sub Command5_Click()

Unload Me

End Sub

Private Sub Command6_Click()

Form3.Show

Unload Me

End Sub

Private Sub Frame1_DragDrop(Source As Control, X As Single, Y As


Single)

End Sub

Choose from English Poem Code :


Private Sub Command1_Click()

poem4.Show

End Sub

Private Sub Command2_Click()

poem5.Show
168

End Sub

Private Sub Command3_Click()

poem6.Show

End Sub

Private Sub Command4_Click()

Unload Me

End Sub

Private Sub Command5_Click()

Form3.Show

Unload Me

End Sub

Choose subject categories code:

Private Sub Command1_Click()

qtype = "english"
169

Set cnt = New tt_cls

str1 = "update master set q_type='" & qtype & "'"

cnt.execute_qry (str1)

Form11.Show

Unload Me

End Sub

Private Sub Command2_Click()

qtype = "math"

Set cnt = New tt_cls

str1 = "update master set q_type='" & qtype & "'"

cnt.execute_qry (str1)

Form11.Show

Unload Me

End Sub
170

Private Sub Command3_Click()

qtype = "hindi"

Set cnt = New tt_cls

str1 = "update master set q_type='" & qtype & "'"

cnt.execute_qry (str1)

Form11.Show

Unload Me

End Sub

Choose subject categories code(TEST):

Dim counter, FLAG As Integer

Dim answ As String


171

Private Sub Command1_Click()

Unload Me

End Sub

Private Sub Command2_Click()

Dim LOOP1 As Integer

Set cnt = New tt_cls

Set cnt2 = New tt_cls

str1 = "select * from master"

cnt.execute_qry (str1)

With cnt.rs

qtype = .Fields("q_type")

End With

str1 = " select * from question where q_type='" & qtype & "'"

cnt.execute_qry (str1)

With cnt.rs

Max = .RecordCount

For LOOP1 = 0 To .RecordCount

If LOOP1 = counter Then

If Opt1.Value = True Then

ans = Opt1.Caption
172

If ans = answ Then

mark = 1

Else

mark = 0

End If

ElseIf Opt2.Value = True Then

ans = Opt2.Caption

If ans = answ Then

mark = 1

Else

mark = 0

End If

ElseIf Opt3.Value = True Then

ans = Opt3.Caption

If ans = answ Then

mark = 1

Else

mark = 0

End If

ElseIf Opt4.Value = True Then

ans = Opt4.Caption

If ans = answ Then

mark = 1
173

Else

mark = 0

End If

Else

mark = 0

End If

str1 = "insert into master (std_name,marks,q_id,q_type) values ('" & a &


"'," & mark & ",11,

'" & a & "')"

cnt2.execute_qry (str1)

If LOOP1 = Max Then

Exit For

Else

lblq.Caption = .Fields("q")

Opt1.Caption = .Fields("q_op1")

Opt2.Caption = .Fields("q_op2")

Opt3.Caption = .Fields("q_op3")

Opt4.Caption = .Fields("q_op4")

answ = .Fields("q_ans")

Exit For

End If
174

End If

.MoveNext

Next LOOP1

End With

If Max = counter Then

Form13.Show

Me.Hide

End If

counter = counter + 1

Opt1.Value = False

Opt2.Value = False

Opt3.Value = False

Opt4.Value = False

End Sub

Private Sub Form_Load()

Set cnt = New tt_cls

str1 = "select * from master"

cnt.execute_qry (str1)
175

With cnt.rs

qtype = .Fields("q_type")

End With

str1 = " select * from question where q_type='" & qtype & "'"

cnt.execute_qry (str1)

With cnt.rs

lblq.Caption = .Fields("q")

Opt1.Caption = .Fields("q_op1")

Opt2.Caption = .Fields("q_op2")

Opt3.Caption = .Fields("q_op3")

Opt4.Caption = .Fields("q_op4")

answ = .Fields("q_ans")

End With

counter = counter + 1

Opt1.Value = False

Opt2.Value = False

Opt3.Value = False

Opt4.Value = False

End Sub
176

Private Sub Opt1_Click()

End Sub

6-SYSTEM TESTING
177

6.1 INTRODUCTION
Once source code has been generated, software must be
tested to uncover as many errors as possible before
delivery to customer. Our goal is to design a
series of test cases that have a high likelihood of finding
errors. To uncover the errors
software techniques are used. These techniques provide
systematic guidance for
designing test that

(1) Exercise the internal logic of software components, and


(2) Exercise the input and output domains of
the program to uncover errors in a program
function, behavior and performance.

6.1.1 Steps: Software is tested from two different perspectives:


(1) Internal program logic is exercised
using White box test case design
Techniques.
(2) Software requirements are
exercised using block box test
case
Design techniques.

6.2 Testing Methodologies:

A strategy for software testing must accommodate


low-level tests that are
necessary to verify that a small source code segment has
been correctly implemented as well as high-level tests
that validate major system functions against
customer requirements. A strategy must provide
guidance for the practitioner and a set of milestones for
the manager. Because the steps of the test strategy occur
at a time when deadline pressure begins to rise, progress
178

must be measurable and problems must surface as early as


possible.
179

6.2.1 Unit testing:

Unit testing focuses verification effort on the smallest unit of software design-
the software component or module. The unit test is white-box oriented. The unit testing
implemented in every module of student attendance management System. By giving
correct manual input to the system, the data are stored in database and retrieved. If you
want the required module to access input or to get the output from the end user, any
error will accrue the time will provide handler to show what type of error will accrued.

6.2.2 System testing:

System testing is actually a series of different tests whose primary purpose is to fully exercise
the computer-based system. Below we have described the two types of testing which have been
taken for this project. It is to check all modules worked on input basis .If you want change any
values or inputs will change all information, so specified input is must.

6.2.3 Performance Testing:


Performance testing is designed to test the run-time performance of software within
the context of an integrated system. Performance testing occurs throughout all steps
in the testing process. Even at the unit level, the performance of an individual module
may be assessed as white-box tests are conducted. This project reduce attendance table,
codes. it will generate report fast.no have extra time or waiting of results .entered correct
data will show result few millisecond just used only low memory of our system.
Automatically do not get access to other software, get users permission and access to
other applications.
180

7-SYSTEM SECURITY
181

8-CONCLUSIONS AND FUTURE ENHANCEMENT

8.1 CONCLUSION

To conclude, Project Data Grid works like a component which can access all the databases
and picks up different functions. It overcomes the many limitations incorporated in the
learning.
Generate report flexibly.
Easy environment
Implementation.

8.2 Scope for future development

The project has a very vast scope in future. The project can be implemented on intranet in
future. Project can be updated in near future as and when requirement for the same arises,
as it is very flexible in terms of expansion. With the proposed software of database Space
Manager ready and fully functional the client is now able to manage and hence run the
entire work in a much better, accurate and error free manner. The following are the future
scope for the project.

Discontinue of particular student eliminate potential attendance.


Id number Reader based learning system.
Individual Learning and creating result system with photo using Student login.
182

BIBLIOGRAPHY

References-
1. Internet Help
2. Project Mentor
3. Seniors
4. Teachers
5. Friends

You might also like