online accomodationdspace.cusat.ac.in/jspui/bitstream/123456789/8222/1... · a full fledged...
TRANSCRIPT
ONLINE ACCOMODATION
Division of Computer Science Engineering Page 1
Mini Project Report
On
Online Accommodation
Submitted By:
ROHIT JHA ABHISHEK ANAND
SOUMYA SHRIVASTAVA
In partial fulfillment for the award of the degree of
B. TECH DEGREE
In
COMPUTER SCIENCE & ENGINEERING SCHOOL OF ENGINEERING
COCHIN UNIVERSITY OF SCIENCE & TECHNOLOGY KOCHI-682022
MARCH 2014
ONLINE ACCOMODATION
Division of Computer Science Engineering Page 2
Division of Computer Science
School of Engineering Cochin University of Science & Technology
Kochi-682022
CERTIFICATE
Certified that this is a bonafide record of the project work titled
ONLINE ACCOMADATION
Done by
ROHIT JHA ABHISHEK ANAND
SOUMYA SHRIVASTAVA
of VI semester Computer Science & Engineering in the year 2014 in partial fulfillment of the requirements for the award of Degree of Bachelor of Technology in Computer Science & Engineering of Cochin University
of Science & Technology.
Dr. SUDHEEP ELAYIDOM M PRAMOD PAVITHRAN Project Guide Head of Division
ONLINE ACCOMODATION
Division of Computer Science Engineering Page 3
ACKNOWLEDGEMENT
We take this occasion to thank God, almighty for blessing us with his grace and taking our endeavor to
a successful culmination. We extend our sincere and heartfelt thanks to our esteemed guide
Dr.SUDHEEP ELAYIDOM , for providing us with the right guidance and advice at the crucial junctures
and for showing me the right way. We also take this opportunity to express a deep sense of gratitude to
our class coordinators, Dr. SUDHEEP ELAYIDOM and Mrs PREETHA S for their cordial support,
valuable suggestions and guidance. We extend our sincere thanks to our respected Head of the
division Mr. PRAMOD PAVITHRAN, for allowing us to use the facilities available. We would like to
thank the other faculty members also, at this occasion. Last but not the least, we would like to thank our
friends and family for the support and encouragement they have given us during the course of our work.
ONLINE ACCOMODATION
Division of Computer Science Engineering Page 4
ABSTRACT
GROUP MEMBERS:
Rohit Jha(Roll no.12120075)
Soumya Shrivastava(Roll no.15120081)
Abhishek Anand(Roll no.13120200)
PROJECT GUIDE:
Dr.SUDHEEP ELAYIDOM
DESCRIPTION:
Online accommodation is a web portal for providing details about the rooms available in our campus
.User need to specify their requirement like gender (male, female),room type(single,
double),region(North India, South India)and range(1000,2000 ,3000).The system will match the user
requirement with the
details in the database and after finding the match the required details is given tothe user.
It will also give information about cooks and shops available inside the campus.
The system will have a Admin page from which he can add details about the rooms. This will reduce the
effort required by the new students and existing student in searching room and other useful things.
LANGUAGE USED:
ONLINE ACCOMODATION
Division of Computer Science Engineering Page 5
FORE END: HTML5, PHP 5
BACK END : PHP 5,MySql
TABLE OF CONTENTS
1. INTRODUCTION 1.1 PROJECT AIMS AND OBJECTIVES 1.2 BACKGROUND OF PROJECT
1.3 OPERATION ENVIRONMENT
2. SYSTEM ANALYSIS
2.1 SOFTWARE REQUIREMENT SPECIFICATION
2.2 EXISTING VS PROPOSED
2.3 SOFTWARE TOOL USED
3. SYSTEM DESIGN
3.1 DATA FLOW DIAGRAM’S
3.2 TABLE DESIGN
4. SYSTEM IMPLEMENTATION
4.1 MODULE DESCRIPTION
5. SYSTEM TESTING
6.CONCLUSION.
APPENDIX
ONLINE ACCOMODATION
Division of Computer Science Engineering Page 6
CHAPTER 1
INTRODUCTION
This chapter gives an overview about the aim,objectives, background and operation
environment of the system.
1.1 PROJECT AIMS AND OBJECTIVES
The project aims and objectives that will be achieved after completion of this project are discussed in this subchapter. The aims and objectives are as follows:
Online accommodation search
Details of hostels provided on private basis
Details of shops in the campus
Details of cooks and food facilities nearby
Admin control over the website .
A full fledged database of all the PG and private hostel in the campus.
A Google map experience that makes your problem more easy.
1.2 BACKGROUND OF PROJECT
To find room for living in the campus has been a difficulty for a long time , both north and south Indian students have been a long struggle to overcome this in a short period of time So under the phenomenal guidance of Mr. sudheep you gave us this fantabuluous idea to develop a portal to easy the years of difficulty the students have ben facing. This website gives information about the different accommodationavailable in our own University. It also provides other necessary information from which a new student freshly arriving to this university such as shops that are in the campus , the availability of cook in the area .the website also show the Google map location of some important hostels .thus a package that will easy the accommodation problem.
ONLINE ACCOMODATION
Division of Computer Science Engineering Page 7
1.3 OPERATION ENVIRONMENT
PROCESSOR INTEL CORE PROCESSOR OR ABOVE FOR BETTER
PERFORMANCE
OPERATING SYSTEM
WINDOWS VISTA ,WINDOWS7, UBUNTU, MAC OS
MEMORY 1GB RAM OR MORE
HARD DISK SPACE MINIMUM 5 GB FOR DATABASE USAGE FOR FUTURE
DATABASE MY SQL
ONLINE ACCOMODATION
Division of Computer Science Engineering Page 8
CHAPTER 2
SYSTEM ANALYSIS
In this chapter, we will discuss and analyze about the developing process of Online accommodation System including software requirement specification (SRS) and comparison between existing and proposed system. The functional and non functional requirements are included in SRS part to provide complete description and overview of system requirement before the developing process is carried out. Besides that, existing vs proposed provides a view of how the proposed system will be more efficient than the existing one.
2.1 SOFTWARE REQUIREMENT SPECIFICATION
2.1.1GENERAL DESCRIPTION
2.1.1.1 PRODUCT DESCRIPTION:
Online Accommodation System is a computerized system which helps user (student) to search
for rooms available inside the university campus. It reduces the work load of students to
personally go to each and every rooms available and match withyour requirements.
2.1.1.2 PROBLEM STATEMENT:
The problem occurred before having computerized system includes:
2.1.1.2.1 Human Effort
When computerized system is not implemented large amount of human effort is required to
personally go to each and every accommodation available in university.
2.1.1.2.2 Time Wastage
ONLINE ACCOMODATION
Division of Computer Science Engineering Page 9
When a computerized system is not there large amount of time is wasted in going to each and every
location and talking with the land owner.
2.1.1.2.3 Difficult To Search Room
When there is no computerized system there is always a difficulty in searching rooms because large
amount of effort is put in to prepare the database and if online system was not available same hard
work mustbe put in by the room seeker.
2.1.1.2.4Communication Gap
This problem mostly arises with the North Indian students because of their lack of regional
knowledge. They can’t convey their requirement to the house owner and vice versa.
2.1.2 SYSTEM OBJECTIVES
2.1.2.1 Improvement in control and performance
The system is developed to cope up with the current issues and problems of accommodation .The
system can add user, validate user and is also bug free.
2.1.2.2 Save cost
After computerized system is implemented less human force will be required to search for the
desired rooms.
2.1.2.3 Save time
This computerized system saves a lot of time for the users as they need not personally go to each
and every accommodation and match it with their requirement.
2.1.2.4 Add Info
House owners can add their house’s info if they want into this system with due consent from the
admin.
ONLINE ACCOMODATION
Division of Computer Science Engineering Page 10
2.1.3 SYSTEM REQUIREMENTS
2.1.3.1NON FUNCTIONAL REQUIREMENTS
2.1.3.1.1EFFICIENCY REQUIREMENT
When this online accommodationportal system will be implemented users and house owners can
easily access online accommodation system and searching for accommodation will be very faster .
2.1.3.1.2 RELIABILITY REQUIREMENT
The system should accurately performs accommodation registration, user validation , report
generation and search.
2.1.3.1.3 USABILITY REQUIREMENT
The system is designed for a user friendly environment so that student and house owners can
perform the various tasks easily and in an effective way.
2.1.3.1.4 IMPLEMENTATION REQUIREMNTS
In implementing whole system it uses html in front end with php as server side scripting language
which will be used for database connectivity and the backend ie the database part is developed
using mysql.
2.1.3.1.5 DELIVERY REQUIREMENTS
ONLINE ACCOMODATION
Division of Computer Science Engineering Page 11
The whole system is expected to be delivered in six months of time with a weekly evaluation by the
project guide.
2.1.3.2FUNCTIONAL REQUIREMENTS
2.1.3.2.1SEARCH ACCOMODATION
This feature used by the user to search for accommodation in the system. They are required to enter fields
regarding their gender,location,range region etc. .The corresponding details will be retrieved from the
database and displayed to the user.The system performs the search from the database and based on the
entered field required information is displayed to the user.
New accommodation can be added by the admin.
This feature can be performing by all users to register new admin .Admin is the moderator of the page
and can modify info about the accommodation.
2.1.3.2.2VERIFY ACCOMODATION
System must be able to verify information,Only single entry must be assigned for each attribute of a
table and it should not allow two same address having same location id.
ONLINE ACCOMODATION
Division of Computer Science Engineering Page 12
2.1.3.2.3 DESCRIPTION OF COOK
In this feature we can get the info about the cook available in the university along with their
contact information and their in picsSystem must be able to filter cook details based on keyword
entered.System must be able to show the filtered cook in table view
2.1.3.2.4SHOP DETAILS
This feature gives details about the shop stationed in our campus. System must be able to enter
cook information in database.System must be able to update details of cooks.System must be able to
search if cook is available or not before issuingcook.
ONLINE ACCOMODATION
Division of Computer Science Engineering Page 13
2.1.4 SOFTWARE AND HARDWARE REQUIREMENTS
This section describes the software and hardware requirements of the system
2.1.4.1 SOFTWARE REQUIREMENTS
2.1.4.1.1 Operating system- Windows 7 is used as the operating system as it is stable and supportsmore
features and is more user friendly
2.1.4.1.2 Database MYSQL-MYSQL is used as database as it easy to maintain and retrieve records by simple
queries which are in English language which are easy to understand and easy to write.
2.1.4.1.3 Development tools and Programming language- HTML is used to write the whole code and develop
webpages with CSS, java script for styling work and php for sever side scripting.
2.1.4.2 HARDWARE REQUIREMENTS
Intel core i5 2nd
generation is used as a processor because it is fast than other processors an provide
reliable and stable and we can run our pc for longtime. By using this processor we can keep on
developing our project without any worries.
Ram 1 GB is used as it will provide fast reading and writing capabilities and will inturn support in
processing
ONLINE ACCOMODATION
Division of Computer Science Engineering Page 14
2.1.5 EXISTING VS PROPOSED SYSTEM
The process of finding accommodation was relatively very difficult and made it trouble
for students and parents to find room in campus thus to overcome this this portal was
designed:
i. There is no such existing system presently and this made is difficult
ii. The searching process included a lot of hardship and wastage of time.
iii. The proposed system is completely new concept that will be helpful to students and parents
iv. The proposed system makes a great database of all the accommodation of the campus thus
can be used for other purpose too.
v. The proposed system is quiet secure as only admin is allowed make any entry to it
ONLINE ACCOMODATION
Division of Computer Science Engineering Page 15
2.1.6SOFTWARE TOOLS USED
The whole Project is divided in two parts the front end and the back end.
Front end The front end is designed using of html , Php ,css, Java script :
1. HTML
HTML- HTML or Hyper Text Markup Language is the main markup language for
creating web pages and other information that can be displayed in a web browser.HTML is
written in the form of HTML elementsconsisting of tags enclosed in angle
brackets (like <html>), within the web page content. HTML tags most commonly come in pairs
like <h1> and </h1>, although some tags represent empty elements and so are unpaired, for
example <img>. The first tag in a pair is the start tag, and the second tag is the end tag (they
are also called opening tags and closing tags). In between these tags web designers can add
text, further tags, comments and other types of text-based content. The purpose of a web
browser is to read HTML documents and compose them into visible or audible web pages. The
browser does not display the HTML tags, but uses the tags to interpret the content of the
page.HTML elements form the building blocks of all websites. HTML allows images and
objects to be embedded and can be used to create interactive forms. It provides a means to
create structured documents by denoting structural semantics for text such as headings,
paragraphs, lists, links, quotes and other items. It can embed scripts written in languages such
as JavaScript which affect the behavior of HTML web pages.
An HTML document has a definite structure that must be specified to the browser. The HTML's beginning and end must be defined, as well as the document's HEAD (which contains information for the browser that does not appear in the browser's main window) and its BODY (which contains the text that will appear in the browser's main window). The use and order of tags that define the HTML structure are described below.
ONLINE ACCOMODATION
Division of Computer Science Engineering Page 16
<html>
Marks the beginning of your HTML
<head> Begins the heading section of an HTML document
<title> ... </title> Gives an HTML document a title that appears on the browser menu bar, also will appear on search engines or bookmarks referencing your site (must appear between the <HEAD> ... </HEAD> tags; should be straight text, no tags
</head> Defines the end of the heading
<body> Defines the body of an HTML document (text contained within the <BODY> … </BODY> tags appears in the main browser window). Can be used with "BGCOLOR", "TEXT", "LINK", and "VLINK" attributes
</html> Defines the end of your HTML document
Links used in HTML
<A HREF="http://some.web.server/Document.html"> ... </A> Creates a hypertext link to another page.
<A HREF="http://some.web.server/Document.html#AnchorName"> ... </A> Creates a link to an anchor in another web page.
<A HREF="AnchorName"> ... </A> Creates an anchor within a document that can be linked to.
<IMG SRC="filename.ext"> Inserts a graphic into the web page. "SRC" is a required attribute. "HEIGHT", "WIDTH", "ALT", "BORDER" and "ALIGN" are optional attributes.
ONLINE ACCOMODATION
Division of Computer Science Engineering Page 17
2. Cascading Style Sheets
CSS- Cascading Style Sheets (CSS) is a style sheet language used for describing the look and
formatting of a document written in a markup language. While most often used to style web
pages and interfaces written in HTML and XHTML, the language can be applied to any kind
of XML document, including plain XML, SVG and XUL. HTML was originally designed as a simple
way of presenting information, with the aesthetics of a web page being far less important than the
content (and largely being left up to the web browser). Of course, now that the web has become as
popular as it has, the presentation of your content has become almost critical to a site’s success.
CSS is the key presentational technology that is used to design websites. CSS is a cornerstone
specification of the web and almost all web pages use CSS style sheets to describe their
presentation.CSS is designed primarily to enable the separation of document content from
document presentation, including elements such as the layout, colors, and fonts. This separation
can improve content accessibility, provide more flexibility and control in the specification of
presentation characteristics, enable multiple pages to share formatting, and reduce complexity and
repetition in the structural content (such as by allowing for table less web design).CSS can also
allow the same markup page to be presented in different styles for different rendering methods,
such as on-screen, in print, by voice (when read out by a speech-based browser or screen reader)
and on Braille-based, tactile devices. It can also be used to allow the web page to display differently
depending on the screen size or device on which it is being viewed. While the author of a document
typically links that document to a CSS file, readers can use a different style sheet, perhaps one on
their own computer, to override the one the author has specified. However if the author or the
reader did not link the document to a specific style sheet the default style of the browser will be
applied.CSS specifies a priority scheme to determine which style rules apply if more than one rule
matches against a particular element. In this so-called cascade, priorities or weights are calculated
and assigned to rules, so that the results are predictable.
ONLINE ACCOMODATION
Division of Computer Science Engineering Page 18
3 JavaScript (JS)
JAVA SCRIPT- JavaScript (JS) is a dynamic computer programming language. It is most commonly
used as part of web browsers, whose implementations allow client-side scripts to interact with the user,
control the browser, communicate asynchronously, and alter the document content that is displayed. It
is also being used in server-side programming, game development and the creation of desktop and
mobile applications. JavaScript is a prototype-based scripting language with dynamic typing and
has first-class functions. Its syntax was influenced by C. JavaScript copies many names and naming
conventions from Java, but the two languages are otherwise unrelated and have very different
semantics. The key design principles within JavaScript are taken from
the Self and Scheme programming languages. It is a multi-paradigm language, supporting object-
oriented, imperative, and functional programming styles. The application of JavaScript to use outside of
web pages—for example, in PDF documents, site-specific browsers, and desktop widgets—is also
significant. Newer and faster JavaScript VMs and platforms built upon them (notably Node.js) have also
increased the popularity of JavaScript for server-side web applications. On the client side, JavaScript
was traditionally implemented as an interpreted language but just-in-time compilation is now performed
by recent (post-2012) browsers.
ONLINE ACCOMODATION
Division of Computer Science Engineering Page 19
4. PHP
PHP is a server-side scripting language designed for web development but also used as a general-
purpose programming language.PHP is a popular general-purpose scripting language that is especially
suited to web development.Fast, flexible and pragmatic, PHP powers everything from your blog to the
most popular websites in the world. PHP is now installed on more than 244 million websites and 2.1
million web servers. Originally created by Rasmus Lerdorf in 1995, the reference implementationof PHP
is now produced by The PHP Group. While PHP originally stood for Personal Home Page, it now stands
for PHP: Hypertext Preprocessor, a recursive backronym.PHP code is interpreted by a web server with
a PHP processor module, which generates the resulting web page: PHP commands can be embedded
directly into an HTML source document rather than calling an external file to process data. It has also
evolved to include a command-line interface capability and can be used in standalone graphical
applications.PHP is free software released under the PHP License. PHP can be deployed on most web
servers and also as a standalone shell on almost every operating system and platform, free of charge.
4.1 PHP 5
PHP 5 was released in July 2004 after long development and several pre- releases. It is mainly
driven by its core, the Zend Engine 2.0 with a new object model and dozens of other new features.
PHP's development team includes dozens of developers, as well as dozens others working on PHP-
related and supporting projects, such as PEAR, PECL, and documentation, and an underlying network
infrastructure of well over one-hundred individual web servers on six of the seven continents of the
ONLINE ACCOMODATION
Division of Computer Science Engineering Page 20
world. Though only an estimate based upon statistics from previous years, it is safe to presume PHP is
now installed on tens or even perhaps hundreds of millions of domains around the world.
BACK END- The back end is designed using mysql which is used to design the databases
MYSQL- MySQL ("My S-Q-L", officially, but also called "My Sequel") is (as of July 2013) the
world's second most widely used open-source relational database management
system (RDBMS). It is named after co-founder Michael Widenius daughter, My. The SQL phrase
stands for Structured Query Language. The MySQL development project has made its source
code available under the terms of the GNU General Public License, as well as under a variety
of proprietary agreements. MySQL was owned and sponsored by a single for-profit firm,
the Swedish company MySQL AB, now owned by Oracle Corporation .MySQL is a popular
choice of database for use in web applications, and is a central component of the widely
used LAMP open source web application software stack (and other 'AMP' stacks). LAMP is an
acronym for "Linux, Apache, MySQL, Perl/PHP/Python." Free-software-open source projects
that require a full-featured database management system often use MySQL. For commercial
use, several paid editions are available, and offer additional functionality. Applications which use
MySQL databases include: TYPO3, MODx, Joomla, WordPress, phpBB, MyBB, Drupal and
other software. MySQL is also used in many high-profile, large-scale websites,
including Wikipedia, Google (though not for searches), Facebook, Twitter, Flickr, and YouTube
2 PHP is a server-side scripting language designed for web development but also used as a general-
purpose programming language.PHP is a popular general-purpose scripting language that is
especially suited to web development.Fast, flexible and pragmatic, PHP powers everything from
your blog to the most popular websites in the world. PHP is now installed on more than 244
million websites and 2.1 million web servers. Originally created by Rasmus Lerdorf in 1995,
ONLINE ACCOMODATION
Division of Computer Science Engineering Page 21
the reference implementationof PHP is now produced by The PHP Group. While PHP originally
stood for Personal Home Page, it now stands for PHP: Hypertext Preprocessor, a
recursive backronym.PHP code is interpreted by a web server with a PHP processor module, which
generates the resulting web page: PHP commands can be embedded directly into an HTML source
document rather than calling an external file to process data. It has also evolved to include
a command-line interface capability and can be used in standalone graphical applications.PHP
is free software released under the PHP License. PHP can be deployed on most web servers and
also as a standalone shell on almost every operating system and platform, free of charge.
PHP 5
PHP 5 was released in July 2004 after long development and several pre- releases. It is
mainly driven by its core, the Zend Engine 2.0 with a new object model and dozens of
other new features.
PHP's development team includes dozens of developers, as well as dozens others working
on PHP-related and supporting projects, such as PEAR, PECL, and documentation, and an
underlying network infrastructure of well over one-hundred individual web servers on six of
the seven continents of the world. Though only an estimate based upon statistics from
previous years, it is safe to presume PHP is now installed on tens or even perhaps
hundreds of millions of domains around the world.
ONLINE ACCOMODATION
Division of Computer Science Engineering Page 22
CHAPTER 3
SYSTEM DESIGN
GENERAL MODEL
General model of online accommodation is shown in fig in which administrator and staff at remote
Server can send request to client system to capture their desktop.
\
STAFF
ADMIN
STAFF
NETWORK
ONLINE ACCOMODATION
Division of Computer Science Engineering Page 23
Fig:3.1 General model
DFD
The system is divided into various modules ,each module are further divided into sub-module. The
connection of the main modules is shown with the help of DFDs.DFDs are made of the following
representation-
DFD symbols:
Fig:3.2 Process or action
Fig:3.3 Flow of data
CLIENT1
CLIENT2
CLIENT3
ONLINE ACCOMODATION
Division of Computer Science Engineering Page 24
Fig:3.4 Input or output to the system
Fig:3.4 Storage elements like files,etc.
3.1 DATA FLOW DIAGRAMS
DATA FLOW DIAGRAM FOR SERVICES FORM
STUDENT ENTER
NAME
ENTER SPECIF
ICATION
D
CHECK
FOR
MATCH
WEB SERVER
SEARCH DATABASE
ACCOMADATION DISPLAY PAGE
IF FOUND
ONLINE ACCOMODATION
Division of Computer Science Engineering Page 25
After entering to the home page of the website, student/parent can choose the services option where they are asked to enter name ,gender, range and location etc. fields that will generate a search result on the basis of match found retrieving data from search database.
DATA FLOW DIAGRAM FOR ADMIN LOGIN
FIGURE :3.1
After entering to the home page of the website, admin can choose the admin LOGIN option where they are asked to enter username &password, and if he/she is a valid user then a admin login page will be
displayed and will be redirected to a data addition page.
ADMINT ENTER
URL
ENTER USERNAME
& PASSWORD
CHECK VALIDITY
WEB SERVER
ADMIN DATABASE
ADMIN LOGIN PAGE
IF VALID
ONLINE ACCOMODATION
Division of Computer Science Engineering Page 26
DATA FLOW DIAGRAM FOR DATA ENTRY PAGE
FIGURE :3.2
ADMIN LOGIN PAGE
DATA
ENTRY
PAGE
ENTER DETAIL
SELECT BOOK ISSUE
UPDTE NO. OF COPIS
ESSGE “BOK
RESERVED”
SEARCH DATABASE
IF VALID
O.
MESSAGE
DISPLAYED
3
ONLINE ACCOMODATION
Division of Computer Science Engineering Page 27
It is a 2nd level Data Flow Diagram where after entering ADMIN LOGIN page he/she can enter the
required fields related to any accommodation in the campus thus making a control over duplicate and
illegal entry.
TABLE DESIGN
VARIOUS TABELS TO MAINTAIN
INFORMATION
Search table is used to maintain accommodation details
Field Data type Default Key Extra
locid INT(11) Not Null Primary Auto increment
location VARCHAR(255) Null
region VARCHAR(255) Null
gender VARCHAR(255) Null
Subject VARCHAR(255) Null
Range
INT(10) Null
I
ONLINE ACCOMODATION
Division of Computer Science Engineering Page 28
ADMIN LOGIN TABLE
Field Data Type Default Key Extra
Loginid INT(11) NOT NULL Foreign key
References Admin
Username VARCHAR(255) NULL
Password VARCHAR(255) NULL
ADIMN table is used to maintain accommodation details
Field Data type Default Key Extra
locid INT(11) Not Null Primary Auto increment
location VARCHAR(255) Null
region VARCHAR(255) Null
gender VARCHAR(255) Null
Subject VARCHAR(255) Null
range
INT(10) Null
ONLINE ACCOMODATION
Division of Computer Science Engineering Page 29
CHAPTER 4
SYSTEM IMPLEMENTATION
4.1 MODULE DESCRIPTION
For Online Accommodation System it is divided into the following Modules:
4.1.1 Admin Module
ADMIN
DATA ENTRY DATA
VALIDATION
SEARCH REPORT
GENERATION
ONLINE ACCOMODATION
Division of Computer Science Engineering Page 30
The following module contains various facilities like data entry, data validation ,search and
report generation.
4.1.1 Code for Admin module
4.1.1.1 Code for entering admin username and password <html> <head> <meta http-equiv="content-type" content="text/html; charset=utf-
8" /> <title>Welcome Cusat Accomadation just for you</title> <meta name="keywords" content="" /> <meta name="" content="" /> <link href="default.css" rel="stylesheet" type="text/css"
media="screen" /> </head> <body> <!-- start header --> <div id="header"> <div id="logo"> <h1><a
href="#"><span><STRONG><bold>ONLINE.....</bold></STRONG></span> ACCOMODATION</a></h1>
</div> <div id="menu"> <ul id="main"> <li class="current_page_item"><a
href="index.html">Home</a></li> <li><a href="form1.html">Services</a></li>
ONLINE ACCOMODATION
Division of Computer Science Engineering Page 31
<li><a href="adminlogin.html">ADMIN</a></li> <li><a href="shop.html">Shops</a></li> <li><a href="cook.html">Cook details</a></li> <li><a href="gal.html">Gallery</a></li> </ul> <ul id="feed"> <li><a href="help.html"><FONT
SIZE=3>HELP</FONT SIZE></a></li> </ul> </div> </div> <form method="GET" action="logincheck.php"> <p><label for="username"><font size="8">Enter
Username</font></label></p> <p><input type="text" name="username" value=""></p> <p><label for="password"><font size="8">Enter
Password</font></label></p> <p><input type="password" name="password" value=""></p> <p><font size="8"><input type="submit" name="go"
value="submit"></font></p> </form> </body> </html> //////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
ONLINE ACCOMODATION
Division of Computer Science Engineering Page 32
CODE FOR LOGIN VERIFICATION <?php #admin/index.php #####[make sure you put this code before any html
output]##### //connect to server $dbc = mysqli_connect("localhost","root","","project") or die('could not connect: '. mysqli_connect_error()); //select db mysqli_select_db($dbc, 'project') or die('no db connection'); //check if the login form has been submitted if(isset($_GET['go'])){ #####form submitted, check data...##### //step 1a: sanitise and store data into vars (storing
encrypted password) $usr = $_GET['username']; $psw = SHA1($_GET['password']) ; //using SHA1() to encrypt
passwords //step2: create query to check if username and password
match $q = "SELECT * FROM admin WHERE username='$usr' AND
password='$psw' "; //step3: run the query and store result $res = mysqli_query($dbc, $q); //make sure we have a positive result if(mysqli_num_rows($res) == 1){ ######### LOGGING IN ##########
ONLINE ACCOMODATION
Division of Computer Science Engineering Page 33
//starting a session session_start(); //creating a log SESSION VARIABLE that will persist
through pages $_SESSION['log'] = 'in'; //redirecting to restricted page header('location:restricted.html'); } else { //create an error message $error = 'Wrong details. Please try again'; } }//end isset go ?> <html> <body> <h1>WRONG PASSWORD <a href="adminlogin.html">try again </a> </body> </html> //////////////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
CODE FOR ENTERING DATA INTO THE DATABASE <?php
ONLINE ACCOMODATION
Division of Computer Science Engineering Page 34
$con=mysqli_connect("localhost","root","","project"); // Check connection if (mysqli_connect_errno()) { echo "Failed to connect to MySQL: " . mysqli_connect_error(); } $locid1=$_GET['locid']; $location1=$_GET['location']; $rangee1=$_GET['rangee']; $region1=$_GET['region']; $roomtype1=$_GET['roomtype']; $ownername1=$_GET['ownername']; $contact1=$_GET['contact']; $advance1=$_GET['advance']; $comment1=$_GET['comment']; $address1=$_GET['address']; $sex1=$_GET['sex']; $landmark1=$_GET['landmark']; $sql="INSERT INTO search2
(locid,rangee,location,region,roomtype,ownername,address,contact,advance,comment,sex,landmark )
VALUES
($locid1,$rangee1,$location1,$region1,$roomtype1,$ownername1,$address1,$contact1,$advance1,$comment1,$sex1,$landmark1)";
if(!mysqli_query($con,$sql)) { die(' entered data successfully '); } echo "Entered data successfully\n"; mysql_close($con); ?>
ONLINE ACCOMODATION
Division of Computer Science Engineering Page 35
SERVICES Module
The following module contains various facilities like DATA ENTRY IN FORM, SEARCH DATABASE, FORM ADDITION etc.
CODE OF THIS MODULE: <pre></pre>
SERVICES
CODE FOR
FORM FILLING
FORM
ADDITION
SEARCH
DETAILS
REGARDING THE
HOUSE
RESET AND
LINK TO OTHER
MODULE
SEARCH
THE DATABASE
ONLINE ACCOMODATION
Division of Computer Science Engineering Page 36
<div class="form1"> <div style="padding-top:20px"> <h2><b><font color ="black" size="30"><pre>Enter your
requirments and details</pre> </font></b></h2> <feildset> <form method="GET" action="mailing.php"> <table align="center"> <tr> <td>NAME: </td> <td><input type="text" name="name"></td> </tr> <tr> <td> </td> </tr> <tr> <td> </td> </tr> <tr> <td>Gender </td> <td> <select name="sex" size="1"> <option selected value="MALE">MALE </option> <option value="FEMALE">FEMALE: </option> </select> </td> </tr> <tr> <td> </td> </tr><tr>
ONLINE ACCOMODATION
Division of Computer Science Engineering Page 37
<td> </td> </tr> <tr> <td>ROOM TYPE: </td> <td> <select name="roomtype" size="1"> <option selected value="SINGLE">single </option> <option value="DOUBLE">double </option> <option value="ONE_ROOM_FLAT">one room flat </option> <option value="DOUBLE_ROOM_FLAT" >Double bed room flat </option> </select> </td> </tr> <tr> <td> </td> </tr><tr> <td> </td> </tr> <tr> <td>RANGE: </td> <td> <select name="rangee" size="1"> <option selected value="ONE">below 1000 </option> <option value="TWO" >1000-2000 </option> <option value="THREE" >beyond 2000 </option>
ONLINE ACCOMODATION
Division of Computer Science Engineering Page 38
</select> </td> </tr> <br> <tr> <td> </td> </tr><tr> <td> </td> </tr> <tr> <td>LOCATION: </td> <td> <select name="location" size="1"> <option selected value="ABDULLAH">abdullah corner </option> <option value="MAVELI">maveli nagar </option> <option value="PAYAPILLIY">payapilliy </option> <option value="HMT">hmt colony </option> <option value="HIDAYAT">hidayat nagar </option> </select> </td> </tr> <tr> <td> </td> </tr><tr> <td> </td> </tr> <tr>
ONLINE ACCOMODATION
Division of Computer Science Engineering Page 39
<td>Region </td> <td> <select size="1" name="region"> <option selected value="NORTH">North indian </option> <option value="SOUTH">South indian </option> </select> </td> </tr> <tr> <td> <input type="checkbox" value="declaration"> </td> <td> <b> i hereby declare that the above informations are corect </b> </tr> <tr> <td> </td> </tr><tr> <td> </td> </tr><tr> <td> </td> </tr> <tr> <td> <input type="submit" value="SUBMIT">
ONLINE ACCOMODATION
Division of Computer Science Engineering Page 40
</td> <td> <input type="reset" value="RESET"> </td> </tr> <tr> <td> <div id="capt" class="captcha"> <div style="float:center ;"> <a></a>Please type the code shown in the image: <input
type="text" name="wsp_code"/> </div> <div style="float:center;"> <script type="text/javascript"
src="http://webspamprotect.com/captcha/6226/"></script> <noscript>This form protected by <a
href="http://webspamprotect.com" target="_blank" title="Web form spam protection">WebSpamProtect</a>.
</noscript> </div> </td> </tr> </form> </feildset> </div> </body> </html>
ONLINE ACCOMODATION
Division of Computer Science Engineering Page 41
3 OTHER MODULE
The following module contains various facilities like cook details, shop
details, some special recommendation and gallery.
Some important pages
COOK DETAILS SHOP
DETAILS
SOME
RECOMMANDATION GALLAREY
SECTION
ONLINE ACCOMODATION
Division of Computer Science Engineering Page 42
CHAPTER 5
SYSTEM TESTING
The aim of the system testing process was to determine all defects in our project .The program was
subjected to a set of test inputs and various observations were made and based on these observations
it will be decided whether the program behaves as expected or not.
Our Project went through two levels of testing
1.Unit testing
2.Integration testing
ONLINE ACCOMODATION
Division of Computer Science Engineering Page 43
UNIT TESTING
Unit testing is undertaken when a module has been created and succesfully reviewed .In order to test a
single module we need to provide a complete environment that is besides the module we would
require
4 The procedures belonging to other modules that the module under test calls
5 Non local data structures that module accesses
6 A procedure to call the functions of the module under test with appropriate parameters
Unit testing was done on each and every module that is described under module description of chapter
4
1. Test For the admin module
Testing admin login form-This form is used for log in of administrator of the system. In this
we enter the username and password if both are correct administration page will open other
wise if any of data is wrong it will get redirected back to the login page and again ask for
username and password
ONLINE ACCOMODATION
Division of Computer Science Engineering Page 44
2. Test for SERVICES module
In this section the STUDENT/PARENT can get details from main database and the whole
information depending upon the user specification is generated as a table.
INTEGRATION TESTING
In this type of testing we test various integration of the project module by providing the
input .The primary objective is to test the module interfaces in order to ensure that no
errors are occurring when one module invokes the other module.
ONLINE ACCOMODATION
Division of Computer Science Engineering Page 45
CONCLUSION
This website provides a web portal that is a online accommodation system which will benefit the
students as well as the parents.
It makes entire process online where student and parents can search room online just by few clicks. It
also has a facility for admin login where admin can login and can see status of flats and room issued as
well change there status or give some suggestions. It has a facility of services form where anyone can
search for their accommodation and also a suggestion page is there wherenecessarysuggestion to the
portal can be made and a mesmerizing collection of pictures so that the overview of the campus can be
collected.
Overall this website will help the students as well Parents and will make management of the
accommodation very easy very easy.
THANK YOU
ONLINE ACCOMODATION
Division of Computer Science Engineering Page 46
APPENDIX:
TIMELINE OF PROJECT
JANUARY
2014
ONLINE ACCOMODATION
Division of Computer Science Engineering Page 47
Sunday Monday Tuesday
Wednesday
Thursday Friday Saturday
ABSTRACT OF PROJECT ANALYSIZED
SRS OF THE POJECT DESIGNED
1 2 3 4 5 6 7
FRONT END DEVELOPMENT
STRATED
THE BASIC MAIN PAGE DEVELOPED
THE REQUIRED IMAGES DETAILS COLLECT
8 9 10 11 12 13 14
DEVELOPMENT OF LOGO
MAIN PAGE SILDE SHOW OF IMAGE ADDED
MAINPAGE WORK COMPLETD
15 16 17 18 19 20 21
ONLINE ACCOMODATION
Division of Computer Science Engineering Page 48
MEETING WITH GUIDE
22 23 24 25 26 27
SERVICES FORM CREATED
DATABASE WORK BEGINS
SERVICES FORM COMPLETED
FIRST TABLE CREATED
28 29 30 31
MONTH ENDS
FEBURARY
2014
ONLINE ACCOMODATION
Division of Computer Science Engineering Page 49
Sunday
Monday Tuesday
Wednesday
Thursday Friday Saturday
COLLECTION FOR DATBASE ENTRY BEGIN
REVIEW FROM GUIDE
SEVICES FROM COMPLETE
1 2 3 4 5 6 7
COOK PAGE COMPLETED
SUDHEEP SIR HELPED IN DEVELOPING GALLERY PAGE
SUDHEEPSIR GAVE US GUIDELINE TO DEVELOP MAILING PAGE
8 9 10 11 12 13 14
DEVELOPMENT OF LOGO
GALLERY PAGE SILDE SHOW OF IMAGE ADDED
SMTP SEVER AND OTHER INFORMATION COLLECTED
MAILING PAGE WORK COMPLETD
ONLINE ACCOMODATION
Division of Computer Science Engineering Page 50
15 16 17 18 19 20 21
DEMONSTRATION TO PREETHA MAM
MEETING WITH GUIDE
SUDHEEPSIR GAVE US GUIDELINE TO ADD SHOP PAGES
INFORMATION OF HOUSES FEED IN DATABASE
22 23 GALLERY PAGE COMPLETED24
25 26 27 28
SHOP PAGE COMPLETED
REVIEW FROM GUIDE
ALL REQUIRED TABLES CREATED
MONTH ENDS
MARCH
2014
ONLINE ACCOMODATION
Division of Computer Science Engineering Page 51
Sunday
Monday Tuesday
Wednesday
Thursday Friday Saturday
1 2 3 4 5 6 7
FINAL ADJUSMENT BEGIN
ALL THE LINKS ADDED TO CORRECT PLACE
SUDHEEPSIR
REVIEWED AND CORRECTED OUR PHP SCRIPTS
8 9 10 11 12 13 14
HELP PAGE CREATED
ALL THE IMPORTANT CHANGES IN OUR CSS AS PER GUDING OF SUDHEEP
PROJECT REVIEWED
ONLINE ACCOMODATION
Division of Computer Science Engineering Page 52
SIR
15 16 17 18 19 20 21
MEETING WITH GUIDE
REPORT PREPARED
22 23 25 26 27 28
ABLE TO COMPLETE THE PROJECTCOMPLETED
REVIEW FROM GUIDE
FINAL PREENTATION
ONLINE ACCOMODATION
Division of Computer Science Engineering Page 53
SCREENSHOTS
ONLINE ACCOMODATION
Division of Computer Science Engineering Page 54
FIG:6.1
The above two pictures are the main page that consist the link to various other
pages and modules , it has basic quality to attract and appeal the user
FIGURE:6.2
ONLINE ACCOMODATION
Division of Computer Science Engineering Page 55
The above screen shot depicts the services page where the user can search
for a new accommodation and is the main tool of this portal is the
FIGURE :6.3
The admin login module for admin to make a login to insert data in the data base
ONLINE ACCOMODATION
Division of Computer Science Engineering Page 56
FIGURE:6.3
The details of cook are displayed here.
ONLINE ACCOMODATION
Division of Computer Science Engineering Page 57
Figure:6.4
The vivid images of campus are displayed here.
ONLINE ACCOMODATION
Division of Computer Science Engineering Page 58
Figure:6.5
The help page is for the convenience of user
ONLINE ACCOMODATION
Division of Computer Science Engineering Page 59
Figure:6.6
The details of flat are displayed here.
Figure:6.7
This module represent more details of flats.