You are on page 1of 68

ABSTRACT

Manual management of hostels is challenging since it involves a lot of work load and time consumption.
The system we have developed can easily manage the hostel details which include: Student records, room
details, and an easy way of allocating the rooms. Main feature of this application is to enable users to
login and update their profile, while choosing the rooms of their choice online. The main tools used to
develop the application are MySQL database and Php scripting language.

[Type text]
2|Page

[Type text]
Table of Contents
INTRODUCTION ......................................................................................................
1. .......................... 6
Scope Definition
........................................................................................................................
1.1. ... 6
Existing System
........................................................................................................................
1.2. .... 6
Proposed System
.........................................................................................................................
1.3. .. 6
Project Management strategy
1.4. ........................................................................................................ 6
2. SYSTEM ANALYSIS AND DESIGN
................................................................................................. 7
CONTEXT DIAGRAM
2.1. ................................................................................................................ 7
ENTITY RELATIONSHIP DIAGRAM
2.2. ...................................................................................... 7
Data Flow Diagram
2.3. ....................................................................................................................... 8
2.3.1.Room Application and Allocation Process
........................................................................... 8
System
Implementation...........................................................................................................
3. .............. 9
DATABASE IMPLEMENTATION
3.1. ............................................................................................. 9
TABLE: APPLICATIONS
3.1.1. ................................................................................................... 9
TABLE: ROOMS
3.1.2. ................................................................................................................. 9
TABLE: STUDENTS
3.1.3. ........................................................................................................... 9
TABLE: USERS
3.1.4. ................................................................................................................. 10
Web Interface
.......................................................................................................................
3.2. ....... 10
Scripting ...........................................................................................................
3.3. ........................... 10
3.3.1.Php is used for server-side scripting.
.................................................................................. 10
Database Connection
3.4. .................................................................................................................. 10
3.5 Site Map
................................................................................................................................
............ 11
SOFTWARE REQUIREMENTS
4. SPECIFICATIONS....................................................................... 12
4.1. Introduction ....................................................................................................... 12

[Type text]
..........................
Purpose .............................................................................................................
4.2. ........................... 12
Scope ..............................................................................................................
4.3. ............................. 12
4.4.ABBREVIATIONS, DEFINITIONS AND ACRONYMS
........................................................ 12
References ........................................................................................................
4.5. ........................... 13
Overview ..........................................................................................................
4.6. ........................... 13
General Description
5. ............................................................................................................................ 13
Product Perspective
5.1. ..................................................................................................................... 13
System Interface
5.1.1. .................................................................................................................. 13

3|Pag
e

[Type text]
User Interface
................................................................................................................
5.1.2. ......13
Hardware Interface
5.1.3. .............................................................................................................. 14
Software Interface
5.1.4. ............................................................................................................... 14
Communication Interface
5.1.5. .................................................................................................... 14
Memory Constraints
5.1.6. ............................................................................................................ 15
Operations ..................................................................................................
5.1.7. .........................15
Site Adaptation requirements
5.1.8. .............................................................................................. 15
Product Functions
5.2. ........................................................................................................................... 15
User Functions
......................................................................................................................
5.2.1. ..15
Student Functions
5.2.2. .................................................................................................................... 15
User Characteristics
5.2.3. ................................................................................................................ 15
General Constraints
5.3. ..................................................................................................................... 16
Assumptions and Dependencies
5.4. .................................................................................................. 16
Specific Requirements
6. ........................................................................................................................ 16
External Interface Requirements
6.1. ................................................................................................. 16
Functional Requirements
6.2. ............................................................................................................ 16
Administrator Functions
6.2.1. ......................................................................................................... 16
Add User
................................................................................................................
6.2.1.1. .........16
View Applicants
6.2.1.2. .............................................................................................................. 16
View Students
................................................................................................................
6.2.1.3. .17
Change Password
6.2.1.4. ............................................................................................................ 17
Student Functions
6.2.2. .................................................................................................................... 17
Profile .........................................................................................................
6.2.2.1. .........................17
6.2.2.2. Apply Room 17
................................................................................................................

[Type text]
....
Status of Application
6.2.2.3. ....................................................................................................... 18
View History
................................................................................................................
6.2.2.4. ...18
Change Password
6.2.2.5. ............................................................................................................ 18
Use Cases
............................................................................................................................
6.3. ............19
Hostel Management System Use Case Diagram
6.3.1. ..................................................................... 19
Login ........................................................................................................
6.3.1.1. .......................19
Manage User Accounts
6.3.1.2. ................................................................................................... 20
Manage Student Activities
6.3.1.3. .............................................................................................. 21

4|Page

[Type text]
6.4. Non-functional Requirements
21
6.4.1. Performance Requirements
21
6.4.2. Design Constraints
22
6.4.3. Standards Compliance
22
6.4.4. Reliability
22
6.4.5. Availability
22
6.4.6. Security
22
6.4.7. Maintainability
22
6.4.8. Portability
22
APPENDIXES
..................................................................................................................................................................
23
Appendix A: (i) Project Task Schedule
..............................................................................................................................................................
23
Appendix A: (ii) Project Gantt Chart
..............................................................................................................................................................
23
Appendix B: Database Relations
..............................................................................................................................................................
23
Screen Shot of the users table
..........................................................................................................................................................
23
Screen Shot of the students table
..........................................................................................................................................................
23
Screen Shot of the rooms table
..........................................................................................................................................................
24
Screen shot of the applicants table
..........................................................................................................................................................
24
Appendix C: Web Interface
..............................................................................................................................................................
24

[Type text]
Appendix D: Php Scripts
..............................................................................................................................................................
26
session.php
..........................................................................................................................................................
26
functions.php
..........................................................................................................................................................
27
applyRoom.php
..........................................................................................................................................................
28
processProfile.php
..........................................................................................................................................................
31
profile.php
..........................................................................................................................................................
32
Appendix E: Database Connection
..............................................................................................................................................................
35

5|Page

[Type text]
1. INTRODUCTION

1.1. Scope Definition


The Hostel Management System is an online application which will capture all the management activities
involved with the hostels. The administrator module is concerned with all administration details, while the
student module is concerned with management of student details in regards to the hostel. Students are
allocated rooms based on their availability. The students module enables them to apply for a room, and
manage their details. They then check their application status to check whether a room has been allocated to
them. The systems database will capture both the administrator details, and the students details.

1.2. Existing System


The current system offers a manual method of application; in which students fill in a form and submit to
the hostel administrator, who then keys in the students details into the system. Rooms are manually
allocated by the hostel administrator. It has been noted that the allocation system is biased in the sense
that the hostel administrator allocates rooms to those he personally know. This manual system has shown
to be slow, time consuming, and inconveniencing to the students.

1.3. Proposed System


The proposed system tries to solve the problems highlighted in the problems of the manual system. The
students module will enable a student to login into the system, and apply for a preferred room, after
which they wait for online room allotment. The admin module enables the administrator to allocate rooms
to students. The system will ensure that any hostel property will be accounted for by the occupants of the
room, this way, when an item is damaged or lost, the occupants of the room will be held responsible. The
system is online based, hence accessible from anywhere, and enables bias to be eliminated. Hence
students get the opportunity to get accommodation in the hostel on time. Labor costs are minimized, since
the system is automated

1.4. Project Management strategy


Refer to appendix A (i) and (ii): Project task schedule, and Project Gantt chart respectively.

6|Page

[Type text]
2. SYSTEM ANALYSIS AND DESIGN

2.1. CONTEXT DIAGRAM

Applicatio
n Application

Allocated/Rej Allocate/Rejecte
STUDENT ected HOSTEL MANAGEMENT d HOSTEL
SYSTEM

Fig 1: Context Diagram of Hostel Management System

In the context diagram above, the student applies for a room. The student either gets allocated to a room
or the application is rejected.

2.2. ENTITY RELATIONSHIP DIAGRAM

USERS

PK USER_ID

USERNAME STUDENTS
HASHED_PASSWORD

ADMIN PK STUD_ID
PK,FK1 USER_ID

FNAME
LNAME
ROOMS GENDER
ASSIGNED_ROOM_I PLACEOFRESIDENCE
PK D PHONENUMBER
ADDRESS
LOCATION PERSONALIMAGE
CONDITION

APPLICATIONS
PK APP_ID
PK,FK1 STUD_ID
ASSIGNED_ROOM_I
PK,FK2 D

PREFERREDROOM
SEMESTER
YEAR
STATUS

Fig 2: ERD of Hostel Management System

[Type text]
7|Page

[Type text]
Student can apply only up to one room, and rooms can have many applicants. Applications can have
many rooms and students.

2.3. Data Flow Diagram

2.3.1. Room Application and Allocation Process

User
Details User
Verify User Details User
Valid User

Check
Application Applied User Applied Room
Status
Non Valid User

Apply Room Room


Application

Allocate Room Applied Room

Receipt Payment

Finan
Bill Room Payment ce

Fig 3: DFD of Hostel Management System

In fig 3 above, the system checks for an existing user, who may be a student or administrator, by
authenticating the username and password. If they dont match the details in the database, the system
will return an invalid username and password message. If the credentials match the details in the
database, the system will check the students application status. The system then retrieves the students
application details.

[Type text]
8|Page

[Type text]
3. System Implementation
The system is implemented using Apache web server, MySQL, and PHP. The administrator can access
the backend through PhpMyAdmin console provided by the Apache server.

3.1. DATABASE IMPLEMENTATION


The database is designed using MySQL database running on apache server. Each of the tables on the
database is identified by a unique primary key. Entities have been entered into their respective relations.

See appendix B: Database relations.

3.1.1. TABLE: APPLICATIONS


COLUMN PRIMARY DATA COMMENT
NAME KEY TYPE
app_id Yes int(10) Primary Key which is AUTO_INCREMENT
stud_id No int(10) Foreign Key references the students table.
preferredRoom No varchar2(20) Applicant chooses between a single or double
semester No varchar2(20) room. Applicant chooses the respective semester.
year No year(4) Applicant chooses the respective year.
assigned_room_id No Int(10) Foreign Key references the rooms table.
status No varchar2(20) Whether the applicant is assigned a room or not.

3.1.2. TABLE: ROOMS

COLUMN PRIMARY DATA COMMENT


NAME KEY TYPE
room_id Yes int(11) Primary Key which is AUTO_INCREMENT
location No varchar2(20) The location of the room
condition No varchar2(20) The rooms condition; whether its good or bad
type No varchar2(20) The type of the room; whether single or double.

3.1.3. TABLE: STUDENTS


COLUMN PRIMA DATA COMMENT
NAME RY KEY TYPE
stud_id Yes int(10) Primary Key which is AUTO_INCREMENT
fName No varchar2(3 The students First Name.
0)
lName No varchar2(3 The students Last Name.

9|Page

[Type text]
0)
gender No varchar2(6) The students gender; whether Male or Female.
placeOfResi No varchar2(4 The students place of Residence.
dence 5)
phoneNumb No varchar2(2 The students phone number.
er 0)
user_id No int(10) Foreign Key references the users table
address No varchar2(2 The students address.
5)
personalIma No varchar(50) The students Image.
ge

3.1.4. TABLE: USERS


COLUMN PRIMARY DATA TYPE COMMENT
NAME KEY
user_id Yes int(10) Primary Key which is AUTO_INCREMENT
username No varchar2(20) The username.
hashed_password No varchar2(50) The HMS user respective passwords which are
encrypted.
admin No tinyint(1) HMS checks to confirm whether user is
administrator.

3.2. Web Interface


The web pages are created using html5 and php scripts. Here, php will also be used to create the
session cookies which will enable login and logout processes.

See appendix C: Web interfaces.

3.3. Scripting

3.3.1. Php is used for server-side scripting.


See appendix 4: Php scripts.

3.4. Database Connection


A single database connection file is created and called within each php script.

See appendix E: Database connection

10 | P a g e
3.5 Site Map

INDEX

ADMIN HOME STUDENT HOME

PROFILE
ADD USER

APPLY
ROOM
VIEW APPLICANTS

STATUS
OF
VIEW STUDENTS APPLICATION

VIEW
HISTORY
CHANGE
PASSWORD

11 | P a
ge
4. SOFTWARE REQUIREMENTS SPECIFICATIONS
Preface

This section contains the Software Requirements Specification (SRS) Document for the Hostel
Managements System (HMS). The main aim is to enable online room application and allocation to the
students.

4.1. Introduction
The following subsections are an overview of the entire Software Requirements Specification (SRS)
document.

4.2. Purpose
This SRS section describes the design decisions and the detailed design needed to implement the system.
It defines the product functions, user characteristics, constraints under which it must operate, how the
system will react to external stimuli, and specific requirements of the system. The document is intended
for the users and the developers of the system.

4.3. Scope
HMS has the main aim of managing room application and allocation in a Web-based environment. The
overall system will consist of HMS Database System and HMS Web Interface. The HMS database system
will supply the fundamental database structure of the entire system whereas its Web Interface will provide
a secure Web interface between the users and the database. HMS aims towards establishing a paperless
office rather than using a manual system.

The objectives of the project are: To enable online room application and allocation in a timely manner, to
enable the students update their details online, to eliminate duplicate data, and to enable a smooth
communication channel between the system administrator and its users,

4.4. ABBREVIATIONS, DEFINITIONS AND ACRONYMS


DFD Data Flow Diagram

ERD Entity Relationship Diagram

SRS Software Requirements Specifications

HMS Hostel Management System

PHP Hypertext Processor

12 | P a g e
HTML5 Hyper Text Markup Language 5

MYSQL Open source database application

SQL Structured Query Language

Users The people who will be actually using the system

4.5. References
IEEE Standards 1016-1998, Recommended Practice for Software Design Descriptions

4.6. Overview
This document is prepared in accordance with the IEEE Standards 830-1998, IEEE Recommended
Practice for Software Requirements Specifications.

Section 5.0 of this document gives a general description of HMS. It also provides product perspectives,
product functions, user characteristics, general constraints, and assumptions and dependencies of the
system.

Section 6.0 contains additional design details. It will contain functional and performance
requirements, design constraints, attributes and external interface requirements for the HMS.

5. General Description
This section describes the general factors that affect the HMS and its requirements. This part of SRS
provides a background for the requirements for ease of comprehension.

5.1. Product Perspective

5.1.1. System Interface


The HMS is a complete web enabled system which can be accessed through web browser.

5.1.2. User Interface


The user interface is as follows:

Screen Name Description


Login Login into system as student or admin
Student Module: Profile Student can view and update personal details.
Student Module: Apply Room Student applies room by selecting the preferred
room, semester, and year.

13 | P a g e
Student Module: Status of Application Student can check their application status.
Student Module: View history Student Students can view history of past applications
Module: Change Password Student Student can change his/her password.
Module: Logout After the student is done using the system, he/she
logs out.
Administrator Module: Add user Admin can add a new user by assigning new user
name and passwords respectively.
Administrator Module: View Applicants Admin can view the applicants by selecting the year
and semester.
Administrator Module: View Students Admin can view the students details.
Administrator Module: Change Password Admin can change his/her password.

5.1.3. Hardware Interface


Client Side

Any Personal computer, which can support any X-window or Windows environment with a mouse
support, is acceptable.

Server Side

HMS will be run on a web server, which is installed into the school server.

5.1.4. Software Interface


Server Side

Apache Web server is installed and will enable HMS to interact with its users. PHP is a server-side
scripting language, which will be used to code the HMS.

Client Side

On the client side the required software product is Internet Explorer/Google Chrome/Mozilla Firefox
supporting at least HTML version 3.2, java enabled, and any operating system that can run the browsers.

5.1.5. Communication Interface


The default communication protocol for data transmission between server and the client is Transmission
Control Protocol/ Internet Protocol (TCP/IP). At the upper level Hyper Text Transfer Protocol (HTTP)
will be used for communication between the web server and client.

14 | P a g e
5.1.6. Memory Constraints
The client computer, which runs the web browser, should have enough physical memory to run this
program.

5.1.7. Operations
The HMS operations needed by the users are described below.

Administrator of the system creates and defines the status of users by (Add User). The user will be
given a unique username and password. The Admin may change their passwords by (Change
Password). The Admin can view applicants and also view the students details.

The student accesses the system by logging in. They can view their profiles and update it
(Profile), Apply room, View Status of Application, View history and change their passwords.

5.1.8. Site Adaptation requirements


The school servers have requirements to operate PHP scripts (Apache Web server 1.3.2 with PHP 4.0
modules).

5.2. Product Functions

5.2.1. User Functions


The administrator of HMS shall add new users to the system who is basically the student. After
entering the information about the user, the system gives a unique username and password to the
user.
The administrator shall view applicants and students, and change password.

5.2.2. Student Functions


The student shall view and update their profiles.
The student shall apply a room.
The student shall view the status of application.
The student shall view their history and change their password.

5.2.3. User Characteristics


The Administrator

This user has to have at least Window 7/Linux OS and Internet browsing skills for administrating HMS
user profiles.

15 | P a g e
The Student

This user has to have at least Window 7/Linux OS and Internet browsing skills to use the system.

5.3. General Constraints


Academic rules and IEEE standards have to be observed throughout the entire requirements process.

5.4. Assumptions and Dependencies


The system will not store any payment information; rather all payments will be handled by the
finance department of the university.

Credit card payment or any other form of payment other than through the finance department
is not allowed on the system.

6. Specific Requirements

6.1. External Interface Requirements


The HMS uses the standard input/output devices for a personal computer. This includes the following:
Keyboard, Mouse, Monitor and Printer.

6.2. Functional Requirements

6.2.1. Administrator Functions

6.2.1.1. Add User


Introduction: HMS shall enable administrator to add new users to the system.

Input: username and password.

Process: The administrator activates the function and enters the username and password of the new user.
The function will also check the database whether the user already exists or not. According to the results,
the system adds the user to the all user list with a confirmation message, or the function displays an error
message.

Output: error message or confirmation message.

6.2.1.2. View Applicants


Introduction: HMS shall display all the applicants archived in the system.

Input: none

16 | P a g e
Process: The administrator selects the semester and year. The function queries the database for the
students who have applied for rooms.

Output: All applicants with their respective details (user id, preferred room, and assigned room id) will
be displayed.

6.2.1.3. View Students


Introduction: HMS shall display all the students in the system.

Input: none

Process: When the administrator logon the system, automatically, all student list is displayed. The
function queries the database for all the students.

Output: List of all students with their respective details (student id, first name, and last name, and
gender, place of residence, phone number, and address) will be displayed.

6.2.1.4. Change Password


Introduction: HMS shall enable administrator to change the password.

Input: old password, new password, confirm password

Process: Administrator activates the function to change the password. The new password and confirm
password fields are entered. If they match, the old password will be updated with the new one.

Output: Error or confirmation message will be displayed.

6.2.2. Student Functions

6.2.2.1. Profile
Introduction: HMS shall enable student to view and update their profile.

Input: none

Process: By this function, the database is queried for all the personal information of the student.

Output: All students personal information is displayed.

6.2.2.2. Apply Room


Introduction: HMS shall enable a student to apply a room.

Input: preferred room, semester, and year.

17 | P a g e
Process: By this function, the selected information is stored into the database.

Output: All students application information is stored into the database

6.2.2.3. Status of Application


Introduction: HMS shall enable the student to view the status of their room application.

Input: student id

Process: By this function, the database is queried for all the room application information of the student.

Output: All application status is displayed.

6.2.2.4. View History


Introduction: HMS shall enable the student to view their previous application history.

Input: student id

Process: By this function, the database is queried for all the previous room application information of the
student.

Output: All room application history is displayed.

6.2.2.5. Change Password


Introduction: HMS shall enable student to change the password.

Input: old password, new password, confirm password

Process: student activates the function to change the password. The new password and confirm password
fields are entered. If they match, the old password will be updated with the new one.

Output: Error or confirmation message will be displayed.

18 | P a g e
6.3. Use Cases

6.3.1. Hostel Management System Use Case Diagram

6.3.1.1. Login
Use Case Login
Name

Introduction This use case describes how a user logs into the HMS.

Actors Administrator and Student.

Pre- None
Conditions

Basic Flow This use case starts when the actor wishes to login to the HMS which requests that the
actor enter his/her username and password. The actor enters his/her username &

19 | P a g e
password. System validates username and password, and if finds correct allow
the actor to log into the system.

Alternate Flow Invalid name and password. If in the basic flow, the actor enters an invalid name and/or
password, the system displays an error message.

The actor can choose to either return to the beginning of the basic flow or cancel the
login, at that point, the use case ends.

Post-Condition If the use case is successful, the actor is logged into the system. If not, the system state
is unchanged.

6.3.1.2. Manage User Accounts


Use Case Name Manage User Accounts

Introduction This use case allows the administrator to maintain user account. This includes
adding, viewing applicants, view students and changing passwords.

Actors Administrator

Pre-Conditions The administrator must be logged on to the system before the use case begins.

Post-Condition If the use case was successful, the user is added, applicant information is viewed,
view student details, and admin can change his/her password. Otherwise, the system
state is unchanged.

Basic Flow This use case starts when the Administrator wishes to add a user, view applicant,
view student, and change his /her password.

The system requests that the Administrator specify the function he/she would like to
perform (Add User, View Applicant, View Student, or Change Password).

Once the Administrator provides the requested information, one of the sub-flows is
executed

If the Administrator selected Add User, the Add User sub flow is executed.

If the Administrator selected View Applicant, the

20 | P a g e
View Applicant sub-flow is executed.

If the Administrator selected Change Password, the Change Password sub-flow is


executed.

Alternate Flow User Not Found: If a user account with the specified details does not exist, the system
displays an error message. The Administrator can then enter a different User name
or cancel the operation, at which point the use case ends.

Post-Condition The system shall add, view applicant, view student, and change password.

6.3.1.3. Manage Student Activities


Use Case Name Manage Student Activities

Introduction Allows the student to manage their various activities. This includes View Profile,
Apply Room, View Status of Application, View History, and Change Password.

Actors Student.

Pre-Conditions Student must be logged into the system.

Post-Condition If use case is successful, the student can view their profiles, apply room, view status
of application, view history and change password. Otherwise the system state is
unchanged.

Basic Flow Starts when student wishes to view Profile, Apply Room, view Status of Application,
and Change Password. The system requests the Student to specify the function;
he/she would like to perform.

Alternate Flow The system displays an error message if student information is unavailable.

Post-Condition The system shall view Profile, Apply Room, view Status of Application, and Change
Password for the student.

6.4. Non-functional Requirements

6.4.1. Performance Requirements


Performance requirements define acceptable response times for system functionality. Depending on the
user internet connection speed;

21 | P a g e
The load time for user interface screens should take no longer than two seconds.

The log in information shall be verified within five seconds.

Queries shall return results within five seconds.

6.4.2. Design Constraints


The system is an online web application which runs on any operating system platform. It is developed
using PHP, HTML5 and MYSQL database.

6.4.3. Standards Compliance


There is consistency in variable names within the system. The graphical user interfaces have a
consistent look and feel.

6.4.4. Reliability
The system database connectivity has been designed with a persistent connection to ensure system
reliability. The system runs on a dedicated server to ensure that it is reliable at all times.

6.4.5. Availability
The system is available at all times, but a room application is open at the beginning of every semester
to ensure that rooms are available.

6.4.6. Security
The system has an authorization mechanism for users to identify their personal profiles. Therefore,
different users will have different authorization levels to access the data. The system should utilize certain
cryptographic techniques for instance SHA1 algorithm, encrypting passwords.

6.4.7. Maintainability
The system is developed using PHP, and PHP is a cross platform programming language which is easy to
maintain. Most of the PHP variables are global variables.

6.4.8. Portability
The HMS runs on any desktop computer supporting web browsing.

22 | P a g e
APPENDIXES

Appendix B: Database Relations

Screen Shot of the users table

Screen Shot of the students table


Screen Shot of the rooms table

Screen shot of the applicants table

Appendix C: Web Interface

Index.php

24 | P a g e
25 | P a
ge
Appendix D: Php Scripts

Index.php:

<?php
error_reporting(1);
error_reporting(1);
$con = mysql_connect("localhost","root","","full");

mysql_select_db("full",$con);

//marquee display
$q = "SELECT marquee1 FROM admin WHERE id=1";
$q1 = mysql_query($q);
$disp = mysql_fetch_array($q1);
//echo $disp['marquee1'];

//change colg name


$q2 = "SELECT colgname FROM admin WHERE id=1";
$q21 = mysql_query($q2);
$colgdisp = mysql_fetch_array($q21);

//change intro content


$q3 = "SELECT colgintro FROM admin WHERE id=1";
$q31 = mysql_query($q3);
$introdisp = mysql_fetch_array($q31);
//echo $introdisp['colgintro'];

//change footer
$q4 = "SELECT footerinfo FROM admin WHERE id=1";
$q41 = mysql_query($q4);
$footerdisp = mysql_fetch_array($q41);
//echo $footerdisp['footerinfo'];

?>
<html>
<head>
<title>Sample School Project</title>
<link rel="stylesheet" type="text/css" href="engine/css/slideshow.css" media="screen" />
<style type="text/css">.slideshow a#vlb{display:none}</style>
<script type="text/javascript" src="engine/js/mootools.js"></script>
<script type="text/javascript" src="engine/js/visualslideshow.js"></script>
<link rel="stylesheet" type="text/css" href="engine1/style.css" />
<script type="text/javascript" src="engine1/jquery.js"></script>

<style type="text/css" media="screen">


#horizontalmenu ul
{
padding:1; margin:1; list-style:none;
}
#horizontalmenu li
{
float:left;
position:relative;
padding-right:89;
display:block;
border:0px solid #CC55FF;
border-style:inset;
margin-left:20px;
}
#horizontalmenu li ul
{
display:none;
position:absolute;
}
#horizontalmenu li:hover ul{
display:block;
background:#C4C4C4;
height:auto; width:8em;
}
#horizontalmenu li ul li
{
clear:both;
border-style:none;}
</style>
</head>
<table width="1333" height="1100" border="1">
<tbody>
<tr>
<th height="39" colspan="2" style="background-color:#4E4E4E"><div style="text-
align:left;color:#FFFFFF"><b><font size="+3"><a href="index.php" style="text-decoration:none ;
color:#FFFFFF"><?php echo $colgdisp['colgname'];?></a></font></b><marquee direction="left"
height="100%">
<?php echo $disp['marquee1']; ?></marquee></div></th>
</tr>
<tr>
<th height="317" colspan="2">
<!--Slider-->
<div id="wowslider-container1">
<div class="ws_images"><ul>
<li><img src="data1/images/banner_01.jpg" alt="Multispeciality College Campus" title="Multispeciality
College Campus" id="wows1_0"/></li>
<li><img src="data1/images/highlightnews.jpg" alt="International Accredition" title="International
Accredition" id="wows1_1"/></li>
<li><img src="data1/images/img21644.jpg" alt="Best Overall Employement" title="Best Overall
Employement" id="wows1_2"/></li>
<li><img src="data1/images/url.jpg" alt="Best Of Class Infrastructure" title="Best Of Class
Infrastructure" id="wows1_3"/></li>
</ul></div>
<div class="ws_bullets"><div>
<a href="#" title="Multispeciality College Campus"><img src="data1/tooltips/banner_01.jpg"
alt="Multispeciality College Campus"/>1</a>
<a href="#" title="International Accredition"><img src="data1/tooltips/highlightnews.jpg"
alt="International Accredition"/>2</a>
<a href="#" title="Best Overall Employement"><img src="data1/tooltips/img21644.jpg" alt="Best
Overall Employement"/>3</a>
<a href="#" title="Best Of Class Infrastructure"><img src="data1/tooltips/url.jpg" alt="Best Of Class
Infrastructure"/>4</a>
</div></div>
<span class="wsl"></span>
<a href="#" class="ws_frame"></a>
</div>
<script type="text/javascript" src="engine1/wowslider.js"></script>
<script type="text/javascript" src="engine1/script.js"></script>
<!--slider end-->

</th>
</tr>
<tr>
<td height="38" colspan="2" style="background-color:#6E68FF">
<div id="horizontalmenu">
<ul>
<li><a href="index.php" onMouseOver="this.style.color='#FFFFFF'"
onMouseOut="this.style.color='#353535'" style="color:#353535 ; text-decoration:none;"
><b>HOME</b></a></li>
<li><a href="index.php?option=about" onMouseOver="this.style.color='#FFFFFF'"
onMouseOut="this.style.color='#353535'" style="color:#353535 ; text-
decoration:none;"><b>ABOUT</b></a></li>
<li><a href="index.php?option=contact" onMouseOver="this.style.color='#FFFFFF'"
onMouseOut="this.style.color='#353535'" style="color:#353535 ; text-
decoration:none;"><b>CONTACT</b></a></li>
<li><a href="index.php?option=gallery" onMouseOver="this.style.color='#FFFFFF'"
onMouseOut="this.style.color='#353535'" style="color:#353535 ; text-
decoration:none;"><b>GALLERY</b></a></li>
<li><a href="index.php?option=course" onMouseOver="this.style.color='#FFFFFF'"
onMouseOut="this.style.color='#353535'" style="color:#353535 ; text-
decoration:none;"><b>COURSES</b></a></li>
<li><a href="index.php?option=regs" onMouseOver="this.style.color='#FFFFFF'"
onMouseOut="this.style.color='#353535'" style="color:#353535 ; text-
decoration:none;"><b>REGISTRATION</b></a></li>
<li><a href="#" onMouseOver="this.style.color='#FFFFFF'"
onMouseOut="this.style.color='#353535'" style="color:#353535 ; text-
decoration:none;"><b>HOSTEL</b></a>
<ul style="width:100%">
<li style="width:100%"><a href="index.php?option=login"
onMouseOver="this.style.color='#FFFFFF'" onMouseOut="this.style.color='#353535'"
style="color:#353535 ; text-decoration:none;">Hostel Login</a></li>
</ul>
</li>
</ul>

</li>

</ul>
</div>

</td>
</tr>
<tr>
<td width="974" height="647" bgcolor="#D9D9D9" style="vertical-align:text-top">
<?php
@$opt = $_GET['option'];
if($opt=="")
{
?>
<center>
<h2><b><font size="+3"><?php echo $colgdisp['colgname'];?>
</font></b></h2>
</center>
<center><img src="images/colg.jpg" width="696" height="488"></center>
<p><center>
<p>&nbsp;</p>
<p><strong><font size="+2"><?php echo $colgdisp['colgname'];?></font></strong> <b>-</b> <font
size="+1"><?php echo $introdisp['colgintro']; ?></font></p>
</center></p>
<?php
error_reporting(1);
}
else{
switch($opt)
{
case 'regs':
include('registration.php') ;
break;
case 'login':
include('login.php');
break;
case 'about':
include('about.php');
break;
case 'contact':
include('contact.php');
break;
case 'gallery':
include('gallery.php');
break;
case 'course':
include ('course.php');
break;
case 'cdrive':
include('cdrive.php');
break;
case 'news':
include('news.php');
break;
case 'sports':
include('sports.php');
break;
case 'admission':
include ('admission.php');
break;
case 'sdp':
include('sdp.php');
break;
case 'wevents':
include('wevents.php');
break;
case 'notice':
include('notice.php');
break;

}}

?>

</td>
<td width="343" style="background-color:#468EFF">
<center><font size="+2"><b style="color:#191B7E"><div style="background-
color:#969BFB">College Updates</div><br></b></font></center>
<marquee direction="up" height="100%" onMouseOver="this.stop();"
onMouseOut="this.start();">
<center><a href="index.php?option=cdrive" style="text-decoration:none"><font
size="+1"><b>Campus Drive</b></font></a></center><br>
<center><a href="index.php?option=news" style="text-decoration:none"><font
size="+1"><b>News</b></font></a></center><br>
<center><a href="index.php?option=sports" style="text-decoration:none"><font
size="+1"><b>Sports Fest</b></font></a></center><br>
<!--<center><a href="" style="text-decoration:none"><font size="+1"><b>Quiz
Competition</b></font></a></center><br>-->
<center><a href="index.php?option=admission" style="text-decoration:none"><font
size="+1"><b>Admission 2014</b></font></a></center><br>
<center><a href="index.php?option=sdp" style="text-decoration:none"><font
size="+1"><b>Student Development Programme</b></font></a></center><br>
<center><a href="index.php?option=wevents" style="text-decoration:none"><font
size="+1"><b>Weekend Events</b></font></a></center><br>
<center><a href="index.php?option=notice" style="text-decoration:none"><font
size="+1"><b>Notice Board</b></font></a></center><br>
<!--<center><a href="" style="text-decoration:none"><font size="+1"><b>Summer
Vacation</b></font></a></center><br>-->
<!--<center><a href="index.php?option=course" style="text-decoration:none"><font
size="+1"><b>Courses Offered</b></font></a></center><br>
<center><a href="index.php?option=gallery" style="text-decoration:none"><font
size="+1"><b>Gallery</b></font></a></center><br>-->
</marquee>
</td>
</tr>
<tr>
<td height="25" colspan="2" style="background-color:#B8AFFF"><center><b>&copy; <?php echo
$footerdisp['footerinfo']; ?></b></center>
<div align="right"><a href="#facebook"><img src="images/f.png" width="30" height="30"
alt=""/></a><a href="#twitter"><img src="images/t.png" width="30" height="30" alt=""/></a><a
href="#youtube"><img src="images/y.png" width="30" height="30" alt=""/></a></div></td>
</tr>
</tbody>
</table>
</html>

session.php

<?php

include("includes/functions.php");

session_start();

function confirmLogIn(){ if(!

logged_in())

{ redirect_to("index.php

");

function logged_in(){

return isset($_SESSION['user_id']);

?>

functions.php
<?php

$mainPage=false;

function mysql_prep( $value ) {

$magic_quotes_active = get_magic_quotes_gpc();

$new_enough_php = function_exists( "mysql_real_escape_string" ); // i.e. PHP >= v4.3.0

if( $new_enough_php ) { // PHP v4.3.0 or higher

/ undo any magic quote effects so mysql_real_escape_string can do the

work if( $magic_quotes_active ) { $value = stripslashes( $value ); }

$value = mysql_real_escape_string( $value );

} else { // before PHP v4.3.0

/ if magic quotes aren't already on then add slashes manually

if( !$magic_quotes_active ) { $value = addslashes( $value ); }


// if magic quotes are active, then the slashes already exist
}

return $value;

function redirect_to( $location = NULL ) {

27 | P a g e
if ($location != NULL)

{ header("Location:

{$location}"); exit;

function confirm_query($result_set) {
if (!$result_set) {

die("Database query failed: " . mysql_error());

}}?>

applyRoom.php
<?php

$title="HMS | Admin - Apply Room";

require_once("includes/session.php");

confirmLogIn();

include("includes/header.php");

include("includes/connectDb.php");

//save details in applications table

if(isset($_POST['submit']))

{ extract($_POST);

$query="INSERT INTO applications(stud_id, preferredRoom,semester,year,status)


VALUES('{$_SESSION['stud_id']}',

'{$pRoom}','{$sem}','{$year}','NOT ASSIGNED')";

$result=mysql_query($query,$connection);

confirm_query($result);

mysql_close($connection);

echo "<h3>Application successful!</h3>";

echo "<table class='pull-center'><tr><th>Preferred


Room</th><th>Semester</th><th>Year</th><th>Status</th><tr>";

28 | P a g e
echo "<tr><td>{$pRoom}</td><td>{$sem}</td><td>{$year}</td><td>NOT
ASSIGNED</td></tr></table>";

?>

<form class="applyRoom" action="applyRoom.php"

method="post"> <label>Preferred Room</label><select

name="pRoom"> <option>------</option>

<option>Single</option>

<option>Double</option>

</select>

<label>Semester</label><select name="sem">

<option>------</option>

<option>Spring</option>

<option>Fall</option>

<option>Summer</option>

</select>

<label>Year</label><select name="year">

<option>------</option>

<option>2013</option>

<option>2014</option>

<input class="btn btn-success" type="submit" name="submit" value="Apply

Room" /> </select>

</form>

<?php include("includes/footer.php");?>

processRooms.php

<?php

include("includes/session.php");

29 | P a g e
include("includes/connectDb.php");

$counter=0;

$names=array('a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z');

if(isset($_POST['confirmRooms'])){

// extract($_POST);

/ echo $_POST['app'];

foreach ($_POST as $key => $value)

{ if(preg_match("[^APP]",$key) )

$counter++;

$count=$counter;

$counter=1;

foreach ($_POST as $key => $value)

{ if(preg_match("[^rID]",$key) )

{ if($value==''){

$query="UPDATE applications SET status='NOT ASSIGNED', assigned_room_id";

$query.="=0";

else{

$query="UPDATE applications SET status='ASSIGNED', assigned_room_id";

$query.="={$value}";

$query.=" WHERE app_id={$counter}";

//POST INDIVIDUAL ROOM ID TO DB:-

$result=mysql_query($query,$connection);
30 | P a g e
confirm_query($result);

$counter++;

redirect_to("viewApplicants.php");

processProfile.php
<?php

include("includes/session.php");

require_once("includes/connectDb.php");

$target=NULL;

if(isset($_FILES['fUpload'])){ if($_FILES['fUpload']['type']=='image/png'||

$_FILES['fUpload']['type']=='image/jpeg'){

$source=$_FILES['fUpload']['tmp_name'];

$target="images/profile/".basename($_FILES['fUpload']['name']);

$targetName=basename($_FILES['fUpload']['name']);

if(move_uploaded_file($source, $target)){

saveOtherDetails($targetName,$connection);

print("File uploaded successfully");

else{

if($_FILES['fUpload']['error']==UPLOAD_ERR_NO_FILE){

saveOtherDetails($targetName);

echo $_FILES['fUpload']['error']."<br />";

//$size=getImageSize($target);

// $imgstr="<p> <img width=\"size[0]\" height=\"size[1]\" ";

31 | P a g e
// $imgstr.="src=\"$target\" alt=\"uploaded image\" />";

else{

redirect_to("profile.php");

echo $_FILES['fUpload']['error']."<br

/>"; print "Upload a jpeg/png photo";

function saveOtherDetails($targetName,$connection)

{ extract($_POST);

$targetName=mysql_prep($targetName);

$fname=mysql_prep($fname);

$lname=mysql_prep($lname);

$gender=mysql_prep($gender);

$pnumber=mysql_prep($pnumber);

$pOfRes=mysql_prep($pOfRes);

$address=mysql_prep($address);

$query="UPDATE students SET fName = '{$fname}', gender='{$gender}',


lName = '{$lname}',

placeOfResidence = '{$pOfRes}', personalImage='{$targetName}',

phoneNumber = '{$pnumber}',

address = '{$address}' WHERE user_id = {$_SESSION['user_id']}";


$result=mysql_query($query,$connection);

confirm_query($result);

redirect_to("profile.php");}?>

profile.php
<?php

$title="HMS | Student - Profile";

require_once("includes/session.php");

32 | P a g e
confirmLogIn();

require_once("includes/connectDb.php");

include_once("includes/functions.php");

include("includes/header.php");

$user_id=$_SESSION['user_id'];

$query="SELECT * FROM students WHERE user_id={$user_id} LIMIT 1";


$result=mysql_query($query);

confirm_query($result);

if(mysql_num_rows($result)==1){

$found_student=mysql_fetch_array($result);
}

?>

<div class="span3 offset9">

<?php

echo "<legend>Student Profile</legend>";

$html="<form method=\"post\" action=\"processProfile.php\" enctype=\"multipart/form-data\">";

$html.="<label>Upload profile picture</label><input type='hidden' name='MAX_FILE_SIZE'


value='2000000' /> <input type='file' name='fUpload' value='' size='60'/><br />";

$html.="<label>First Name</label><input type=\"text\" name=\"fname\"


value=\"{$found_student['fName']}\" />";

$html.="<label>Last Name</label><input type=\"text\" name=\"lname\"


value=\"{$found_student['lName']}\" />";

$html.="<label>Address</label><input type=\"text\" name=\"address\"


value=\"{$found_student['address']}\" />";

$html.="<label>Gender</label>";

$html.="<select name='gender'>";

if($found_student['gender']=='Male')

$html.="<option selected='selected'>Male</option>";

$html.="<option>Female</option>";

}
33 | P a g e
else if($found_student['gender']=='Female')

{ $html.="<option

selected='selected'>Female</option>";

$html.="<option>Male</option>";

else

{ $html.="<option>Male</option>";

$html.="<option>Female</option>";

$html.="</select><br />";

$html.="<label>Place of Residence</label><input type=\"text\"


name=\"pOfRes\" value=\"{$found_student['placeOfResidence']}\" />";

$html.="<label>Phone Number</label><input type=\"text\"


name=\"pnumber\" value=\"{$found_student['phoneNumber']}\"/>";

$html.="<input type=\"submit\" name=\"submit\" value='Save' class=\"btn btn-success\"/>";

$html.="<input type=\"reset\" name=\"reset\" value='Clear' class=\"btn btn-info\"/>";

$html.="</form>";

if(isset($_POST['submit']))

{ echo $html;

if(!isset($_POST['submit']))

{ if($found_student['personalImage']==NULL)

{ $html="<img class='pull-left' src='images/doe.png' />";

else if($found_student['personalImage']!=NULL){

$html="<img class='pull-left' height='250' width='250'


src='images/profile/"."{$found_student['personalImage']}' />";

$html.="<table class='profile'>";

$html.="<tr><td><strong>First
Name</strong></td><td><span>{$found_student['fName']}</span></td></tr>";
34 | P a g e
$html.="<tr><td><strong>Last Name
</strong></td><td><span>{$found_student['lName']}</span></td></tr>";

$html.="<tr><td><strong>Address</strong>
</td><td><span>{$found_student['address']}</span></td></tr>";

$html.="<tr><td><strong>Gender</strong>
</td><td><span>{$found_student['gender']}</span></td></tr>";

$html.="<tr><td><strong>Place of
Residence</strong></td><td><span>{$found_student['placeOfResidence']}</span></td></tr>";

$html.="<tr><td><strong>Phone
Number</strong></td><td><span>{$found_student['phoneNumber']}</span></td></tr>";

$html.="<form method='post' action='profile.php'></tr>";

$html.="<tr><td><input type='submit' value='update' name='submit' class=\"btn


btn-success\"/></td></tr>";

$html.="</form>";

$html.="</table>";

echo $html;

?>

</div>

<?php include("includes/footer.php");

?>

Backend.php:-

<?php
session_start();
error_reporting(1);
if($_SESSION['admin']=="")
{
header('location:admin.php');
}
else
{

//logout
if(isset($_POST['logout']))
{
header('location:adminlogout.php');
}

$con = mysql_connect("localhost","root","","full");
mysql_select_db("full",$con);

//header marquee
if(isset($_POST['m1save']))
{
$marquee = $_POST['marquee1'];
$query = "UPDATE admin SET marquee1='$marquee' WHERE id=1";
mysql_query($query);
$confirm ="<b style='color:red'>Page Saved</b>";
}

//colg name
if(isset($_POST['cnsave']))
{
$cname = $_POST['colgname'];
$query2 = "UPDATE admin SET colgname='$cname' WHERE id=1";
mysql_query($query2);
$confirm2 = "<b style='color:red'>Page Saved</b>";
}

//colg intro
if(isset($_POST['intsave']))
{
$intro = $_POST['colgintro'];
$query3 = "UPDATE admin SET colgintro='$intro' WHERE id=1";
mysql_query($query3);
$confirm3 = "<b style='color:red'>Page Saved</b>";
}

//footer info
if(isset($_POST['footersave']))
{
$footer = $_POST['footerinfo'];
$query4 = "UPDATE admin SET footerinfo='$footer' WHERE id=1";
mysql_query($query4);
$confirm4 = "<b style='color:red'>Page Saved</b>";
}

//about page
if(isset($_POST['aboutsave']))
{
$abouthead = $_POST['abouthead'];
$aboutinfo = $_POST['aboutinfo'];
$query5 = "UPDATE admin SET abouthead='$abouthead' WHERE id=1";
$query6 = "UPDATE admin SET aboutinfo='$aboutinfo' WHERE id=1";
mysql_query($query5);
mysql_query($query6);
$confirm5 = "<b style='color:red'>Page Saved</b>";
}
?>
<div align="center">
<form method="post">
<table width="1328" height="628" border="1">
<tbody>
<tr>
<td colspan="6" bgcolor="#5D5CEC"><center><font size="+2"><strong style="color:
#FFFFFF">Administrator Control Panel</strong></font></center><div align="right"><input
type="submit" value="Logout" name="logout"></div></td>
</tr>
<tr>
<td width="323" height="543">
<center><p><b>[ Content of Header Marquee ]</b>
<textarea placeholder="Input Marquee for the header of the Page!"
name="marquee1"></textarea><br>
<input type="submit" value="Save" name="m1save"><br><?php echo $confirm; ?>
</p></center><br>
<p><center><b>Change College Name : </b><br>
<input type="text" placeholder="College Name" name="colgname" size="50"><input
type="submit" value="Save" name="cnsave"><br><?php echo $confirm2; ?
></center></p><br>
<center><p><b>Change College Intoduction</b><br>
<textarea placeholder="Input Introduction for College" name="colgintro"></textarea><br>
<input type="submit" value="Save" name="intsave"><br><?php echo $confirm3; ?
></p></center><br>
<center><p><b>Change Footer</b><br>
<input type="text" placeholder="copyright information etc," name="footerinfo"
size="50"><br>
<input type="submit" value="Save" name="footersave"><br><?php echo $confirm4; ?
></p></center>
</td>
<td width="475">
<p><center><b>Edit "About" Page</b><br><br>
Page Heading : <input type="text" placeholder="heading" name="abouthead"
size="30"><br><br>
[ Page Content ]<br>
<textarea placeholder="Input Content" name="aboutinfo"></textarea><br>
<input type="submit" value="Save" name="aboutsave"><br><?php echo $confirm5; ?
></p></center>

</td>
<td width="40">&nbsp;</td>
<td width="57">&nbsp;</td>
<td width="60">&nbsp;</td>
<td width="333">&nbsp;</td>
</tr>
</tbody>
</table>
</form>
</div>
<?php
}
?>
Appendix E: Database Connection

<?php

$connection=mysql_connect("localhost","root","");

if(!$connection){

die("Database connection has failed ".mysql_error());

$db_select=mysql_select_db("hms",$connection);

if(!$db_select){

die("Database selection has failed

".mysql_error()); }?>

Registration.php:--

<?php

error_reporting(1);

//mysql Connection

$con =

mysql_connect("localhost","root","","full") or

die(mysql_error());

//select database

mysql_select_db("full",$con);

//captcha

$num1 = range(9,0);

$num2 = range(9,0);

$rnum1 = array_rand($num1);

$rnum2 = array_rand($num2);

$n1 = $num1[$rnum1];
$n2 = $num2[$rnum2];

$sum = $n1 + $n2;

$res = $n1." + ".$n2;

if(isset($_POST['submit']))

if($_POST['c1']==$_POST['c2'])

$n = $_POST['uname'];

$pass = $_POST['upass'];

$p = md5($pass);//encrypt pass

$em = $_POST['umail'];

$gen = $_POST['gender'];

$mob = $_POST['umob'];

$add = $_POST['address'];

//$img = $_FILES['file']['name'];

//check user if already exists

$q = "SELECT mob FROM users WHERE

mob='$mob'";

$cq = mysql_query($q);

$ret = mysql_num_rows($cq);

if($ret == true)

echo "<center><h2

style='color:red'>User with same Mobile no.

already exists</h2></center>";

//insert into database

else

{
$query = "INSERT INTO users

VALUES

('','$n','$p','$em','$gen','$mob','$add')";

mysql_query($query);

//mkdir("images/".$_POST['umail']);

//move_uploaded_file($_FILES['file']

['tmp_name'],"images/".$_POST['umail']."/".

$_FILES['file']['name']);

echo "<center><h2

style='color:green'>Details Saved!

</h2></center>";

else

echo '<script>alert("Wrong

Verification Code, try again!")</script>';

//display details

if(isset($_POST['display']))

$que = mysql_query("select * from

users");

echo "<div align='center'>";

echo "<table border='1'

bgcolor='#B2B8FF' width='500px'>";
echo "<tr><th>User

ID</th><th>UserName</th><th>Password<b

r>(Encrypted)</th><th>Email</th><th>Gend

er</th><th>Mobile

No.</th><th>Image</th><th>Option</th></tr

>";

while($row=

mysql_fetch_array($que))

echo "<tr>";

echo "<td>".$row['id']."</td>";

echo "<td>".

$row['username']."</td>";

echo "<td>".

$row['password']."</td>";

echo "<td>".$row['email']."</td>";

echo "<td>".$row['gender']."</td>";

echo "<td>".$row['mob']."</td>";

$e=$row['email'];

$img=$row['image'];

echo "<td><img src='images/$e/$img'

width='70' height='70'/></td>";

echo "<td><a

href='edit.php'>Edit</a>&nbsp;&nbsp;

<a href='delete.php?

email=$e'>Delete</a>
</td>";

echo "</tr>";

echo "</table>";

echo "</div>";

?>

<html>

<head>

<script>

function go()

document.location='./login.php';

function refresh()

document.location='./index.php';

</script>

</head>

<body style="background-color:#E5E5E5">

<div align="center">

<form method="post"

enctype="multipart/form-data">

<fieldset style="display: inline-flex;

background-color: #D8D8D8;">
<legend><font

size="+2"><strong>Registration</strong></fo

nt></legend>

<p><b>UserName : </b><input

type="text" name="uname" required/>*</p>

<p><b>Password : </b><input

type="password" name="upass"

required/>*</p>

<p><b>Email : </b><input type="email"

name="umail" required/>*</p>

<p><b>Gender : </b><input type="radio"

name="gender"

value="m">Male&nbsp;<input type="radio"

name="gender" value="f">Female</p>

<p><b>Mobile No. : </b><input

type="text" name="umob" required/>*</p>

<b>Address : </b><textarea

placeholder="Input Address"

name="address"></textarea>

<fieldset style="display: inline-flex;

background-color:

#D8D8D8;"><legend><strong>Verification</

strong></legend><p><?php

error_reporting(1);

echo $res." = ";

?>

<input type="hidden" name="c1" value="<?

php echo $sum; ?>">


<input type="text" name="c2" autofocus

placeholder="Enter

Sum">*</p></fieldset><br>

<p><input type="submit" name="submit"

value="Register">&nbsp;<input type="reset"

onClick="refresh()"></p>

</form>

</div>

</body>

</html>

Profile.php:--

<?php

session_start();

error_reporting(1);

if($_SESSION['user']=="")

header('location:index.php');

//mysql Connection

$con =

mysql_connect("localhost","root","","full") or

die(mysql_error());

//select database

mysql_select_db("full",$con);

?>

<html>
<head>

<title>Sample School Project</title>

<link rel="stylesheet" type="text/css"

href="engine/css/slideshow.css"

media="screen" />

<style type="text/css">.slideshow

a#vlb{display:none}</style>

<script type="text/javascript"

src="engine/js/mootools.js"></script>

<script type="text/javascript"

src="engine/js/visualslideshow.js"></script>

<link rel="stylesheet" type="text/css"

href="engine1/style.css" />

<script type="text/javascript"

src="engine1/jquery.js"></script>

<style type="text/css" media="screen">

#horizontalmenu ul

padding:1; margin:1; list-style:none;

#horizontalmenu li

float:left;

position:relative;

padding-right:89;

display:block;

border:0px solid #CC55FF;

border-style:inset;

margin-left:20px;
}

#horizontalmenu li ul

display:none;

position:absolute;

#horizontalmenu li:hover ul{

display:block;

background:#C4C4C4;

height:auto; width:8em;

#horizontalmenu li ul li

clear:both;

border-style:none;}

</style>

</head>

<table width="1333" height="1100"

border="1">

<tbody>

<tr>

<th height="39" colspan="2"

style="background-color:#4E4E4E"><div

style="text-

align:left;color:#FFFFFF"><b><font

size="+3"><a href="index.php" style="text-

decoration:none ; color:#FFFFFF">ABC

Group Of

Institutions</a></font></b><marquee

direction="left" height="100%">
This Message will be

editable by Administrator After Login!

</marquee></div></th>

</tr>

<tr>

<th height="317" colspan="2">

<!--Slider-->

<div id="wowslider-container1">

<div class="ws_images"><ul>

<li><img src="data1/images/banner_01.jpg"

alt="Multispeciality College Campus"

title="Multispeciality College Campus"

id="wows1_0"/></li>

<li><img

src="data1/images/highlightnews.jpg"

alt="International Accredition"

title="International Accredition"

id="wows1_1"/></li>

<li><img src="data1/images/img21644.jpg"

alt="Best Overall Employement" title="Best

Overall Employement" id="wows1_2"/></li>

<li><img src="data1/images/url.jpg"

alt="Best Of Class Infrastructure" title="Best

Of Class Infrastructure" id="wows1_3"/></li>

</ul></div>

<div class="ws_bullets"><div>

<a href="#" title="Multispeciality College

Campus"><img

src="data1/tooltips/banner_01.jpg"

alt="Multispeciality College Campus"/>1</a>


<a href="#" title="International

Accredition"><img

src="data1/tooltips/highlightnews.jpg"

alt="International Accredition"/>2</a>

<a href="#" title="Best Overall

Employement"><img

src="data1/tooltips/img21644.jpg" alt="Best

Overall Employement"/>3</a>

<a href="#" title="Best Of Class

Infrastructure"><img

src="data1/tooltips/url.jpg" alt="Best Of Class

Infrastructure"/>4</a>

</div></div>

<span class="wsl"></span>

<a href="#" class="ws_frame"></a>

</div>

<script type="text/javascript"

src="engine1/wowslider.js"></script>

<script type="text/javascript"

src="engine1/script.js"></script>

<!--slider end-->

</th>

</tr>

<tr>

<td height="38" colspan="2"

style="background-color:#6E68FF">

<div align="center"><a

href="index.php" style="text-

decoration:none ; color:#010101"
id="horizontalmenu

li"><b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&

nbsp;&nbsp;&nbsp;HOME</b></a>

<a href="profile.php?option=about"

style="text-decoration:none ;

color:#010101"><b>&nbsp;&nbsp;&nbsp;&n

bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ABO

UT</b></a>

<a href="profile.php?option=mfees"

style="text-decoration:none ;

color:#010101"><b>&nbsp;&nbsp;&nbsp;&n

bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;MES

S FEES</b></a>

<a href="profile.php?option=rfees"

style="text-decoration:none ;

color:#010101"><b>&nbsp;&nbsp;&nbsp;&n

bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ROO

M FEES</b></a>

<div align="right"><a href="logout.php"

style="text-decoration:none"><input

type="submit" value="Logout"

name="logout"></a></div></td>

</tr>

<tr>

<td width="974" height="647"

bgcolor="#D9D9D9" style="vertical-

align:text-top">

<?php

@$opt = $_GET['option'];

if($opt=="")
{

?>

<html>

<h1><center>Welcome <?php echo

$_SESSION['user']; ?></center></h1>

</html>

<?php

error_reporting(1);

else{

switch($opt)

case 'regs':

include('registration.php')

break;

case 'login':

include('login.php');

break;

case 'about':

include('about.php');

break;

case 'contact':

include('contact.php');

break;

case 'gallery':

include('gallery.php');

break;

case 'course':

include ('course.php');
break;

case 'mfees':

include('mfees.php');

break;

case 'rfees':

include('rfees.php');

break;

}}

?>

</td>

<td width="343" style="background-

color:#468EFF">

<center><font size="+2"><b

style="color:#191B7E"><div

style="background-color:#969BFB">College

Updates</div><br></b></font></center>

<marquee direction="up"

height="100%" onMouseOver="this.stop();"

onMouseOut="this.start();">

<center><a href=""

style="text-decoration:none"><font

size="+1"><b>Campus

Drive</b></font></a></center><br>

<center><a href="" style="text-

decoration:none"><font
size="+1"><b>News</b></font></a></center

><br>

<center><a href="" style="text-

decoration:none"><font size="+1"><b>Sports

Fest</b></font></a></center><br>

<center><a href="" style="text-

decoration:none"><font size="+1"><b>Quiz

Competition</b></font></a></center><br>

<center><a href="" style="text-

decoration:none"><font

size="+1"><b>Admission

2014</b></font></a></center><br>

<center><a href="" style="text-

decoration:none"><font

size="+1"><b>Placement

List</b></font></a></center><br>

<center><a href="" style="text-

decoration:none"><font

size="+1"><b>Weekend

Events</b></font></a></center><br>

<center><a href="" style="text-

decoration:none"><font size="+1"><b>Notice

Board</b></font></a></center><br>

<center><a href="" style="text-

decoration:none"><font

size="+1"><b>Summer

Vacation</b></font></a></center><br>

<center><a href="" style="text-

decoration:none"><font
size="+1"><b>Summer

Training</b></font></a></center><br>

<center><a href="index.php?

option=course" style="text-

decoration:none"><font

size="+1"><b>Courses

Offered</b></font></a></center><br>

<center><a href="index.php?

option=gallery" style="text-

decoration:none"><font

size="+1"><b>Gallery</b></font></a></cent

er><br>

</marquee>

</td>

</tr>

<tr>

<td height="25" colspan="2"

style="background-

color:#B8AFFF"><center><b>&copy; 2014

by UserName | Managed by

ABC</b></center></td>

</tr>

</tbody>

</table>

</html>

You might also like