Library Management System
Library Management System
TABLE OF CONTENTS
ABSTRACT 5
1. INTRODUCTION 6
1.1 PROJECT AIMS AND OBJECTIVES 6
2. SYSTEM ANALYSIS 9
2.1 SOFTWARE REQUIREMENT SPECIFICATION 9
3. SYSTEM DESIGN 20
3.1 TABLE DESIGN 20
4. SYSTEM IMPLEMENTATION 30
4.1 MODULE DESCRIPTION 30
5. SYSTEM TESTING 85
5.1 UNIT TESTING 85
7. REFERENCES 89
ABSTRACT
Overall this project of ours is being developed to help the students as well as
staff of library to maintain the library in the best way possible and also reduce
the human efforts.
CHAPTER 1
INTRODUCTION
Books and student maintenance modules are also included in this system which
would keep track of the students using the library and also a detailed description
about the books a library
contains. With this computerized system there will be no loss of book record
or member record which generally happens when a non computerized system
is used.
All these modules are able to help librarian to manage the library with more
convenience and in a more efficient way as compared to library systems which
are not computerized.
CHAPTER 2
SYSTEM ANALYSIS
PRODUCT DESCRIPTION:
Library Management System is a computerized system which helps
user(librarian) to manage the library daily activity in electronic
format. It reduces the risk of paper work such as file lost, file
damaged and time consuming.
It can help user to manage the transaction or record more
effectively and time- saving.
PROBLEM STATEMENT:
The problem occurred before having computerized system includes:
File
lost
When computerized system is not implemented file is always lost
because of human environment.Some times due to some human error
there may be a loss of records.
RELIABILITY REQUIREMENT
The system should accurately performs member registration
,member validation , report generation, book transaction and search
USABILITY REQUIREMENT
The system is designed for a user friendly environment so that
student and staff of library can perform the various tasks easily and
in an effective way.
ORGANIZATIONAL REQUIREMENT
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.
DELIVERY REQUIREMENTS
The whole system is expected to be delivered in six months of time
with a weekly evaluation by the project guide.
Functional requirements
-user id is provided when they register
-The system must only allow user with valid id and password to enter the
system
-The system performs authorization process which decides what user level can
acess to.
-The user must be able to logout after they finished using system.
Functional requirements
-System must be able to verify information
-System must be able to delete information if information is wrong
DESCRIPTION OF FEATURE
This feature is found in book maintenance part . we can search book
based on book id , book name , publication or by author name.
Functional requirements
- System must be able to search the database based on select search
type
- System must be able to filter book based on keyword enterd
- System must be able to show the filtered book in table view
DESCRIPTION OF FEATURE
This feature allows to issue and return books and also view reports of book
issued.
Functional requirements
-System must be able to enter issue information in database.
-System must be able to update number of books.
- System must be able to search if book is available or not before issuing
books
-System should be able to enter issue and return date information
DESCRIPTION OF FEATURE
This feature allows teacher and student to add information about various
workshops being conducted in college and colleges nearby.
Division Of Computer Science And Engineering Page 13
Library Management System
Functional requirements
-System should be able to add detailed information about events .
-System should be able to display information on notice board available in
the homepage of site
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
Division Of Computer Science And Engineering Page 20
Library Management System
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
CHAPTER 3
SYSTEM DESIGN
TEACHER
DATABASE
ENTER
ENTE USERNA CHEC
TEACH ME
R K
ER UR & VALIDIT
L PASSWO Y
RD
IF VALID
TEACH
WEB SERVER ER
LOGIN
PAGE
After entering to the home page of the website , teacher can choose the
TEACHER LOGIN option where they are asked to enter username & password
, and if he/she is a valid user then a teacher login page will be displayed.
STUDENT
DATABASE
ENTER
ENTE USERNA CHEC
STUDE ME
R K
NT UR & VALIDIT
L PASSWO Y
RD
IF VALID
STUDE
WEB SERVER NT
LOGIN
PAGE
After entering to the home page of the website , student can choose the
STUDENT LOGIN option where they are asked to enter username & password
, and if he/she is a valid user then a student login page will be displayed.
LOGI
N
DATABA
SE
STUDE SE EN IF MESSAG
LE TE I SE NO UP
NT LE . DAT E “BOOK
CT R CT OF E
LOGIN BO BO F BO NO. RESERV
PAGE OK OK OK BOO OF ED”
ISS DE ISS K
UE TAI AV UE ISSU CO
L ED
BL LESS PIE
THA
N S
3
It is a 2nd level Data Flow Diagram where after entering STUDENT LOGIN
page he/she can select a book issue option where after entering the book
detail, he/she can select the book issue option and if the maximum no of books
issued limit is not crossed then a request will be sent to the librarian who will
approve the book issue.
ENT IF
SELEC
HOM T ER BOO
FOU K
E ADVAN BOO
ND DETAI
CE K
SEARC DET LS
H AIL
BOOK
DATAB
ASE
After the home page login there will be an option of the book search where
after entering book detail like author name, publication, book name etc book
details will be displayed.
ADMIN STUDENT
DATABASE DATABASE
After the home page login there will be an option of CREATE AN ACCOUNT
where after entering student detail ,if all the fields are filled then a request will
be sent to the librarian who will approve him as a registered member of the
library.
CHAPTER 4
SYSTEM IMPLEMENTATION
ADMIN
<li><a
href="http://localhost/xampp/project/library/egallery.php">E
Gallery</a></li>
<li><a
href="http://localhost/xampp/project/library/questionpaper.php">Question
Paper</a></li>
<li><a href="http://localhost/xampp/project/library/aboutus.php">About
Us</a></li>
<li><a href="http://localhost/xampp/project/library/bookissue.php">Book
Issue
</a></li>
<li class="last"><a href="#"></a></li>
</ul>
</div>
<!-- ###### -->
</div>
</div>
<!--
###############################################################
########
################################ -->
<div class="wrapper">
<div id="featured_slide" class="clear">
<!-- ###### -->
<div class="overlay_left"></div>
<div id="featured_content">
<div class="featured_box" id="fc1"><img
src="../images/demo/slider/1.gif" alt=""
/>
<div class="floater">
<h2>All ABOUT SOE LIBRARY</h2>
<p>School oF Engineering Library or the S.O.E library is one of the
finest library
in kerela having a good collection of books related to various subjects</p>
<p class="readmore"><a href="#">Continue Reading »</a></p>
</div>
</div>
<div class="featured_box" id= "fc2"><img src="../images/demo/slider/2.gif"
alt=""
/>
<div
class="floater">
<h2>Existence</h2>
<p>School oF Engineering library came into existence in year 1995
and from then
Division Of Computer Science And Engineering Page 37
Library Management System
on it has been a premier source of information for college students</p>
<p class="readmore"><a href="#">Continue Reading »</a></p>
</div>
</div>
<div class="featured_box" id="fc3"><img src="../images/demo/slider/3.gif"
alt=""
/>
<div class="floater">
<h2>Collection</h2>
<p>School of Engineering Library has a collection of over 25000
books related to
various subjects in engineering</p>
<!--
###############################################################
########
################################ -->
<div class="wrapper row3">
<div class="rnd">
<div id="container" class="clear">
Division Of Computer Science And Engineering Page 39
Library Management
<!--
System
###############################################################
########
################################ -->
<div id="homepage"
class="clear">
<!-- ###### -->
<div id="left_column">
<h2>Sugeestion</h2>
<div class="imgholder"><a href="#"><img
src="../images/images/suggestions.jpg" alt=""
/></a></div>
<h2>Book request</h2>
<div class="imgholder"><a href="#"><img
src="../images/images/bookrequest1.jpg" alt=""
/></a></div>
<h2>Account creation</h2>
<div class="imgholder"><a href="#"><img
src="../images/images/account.jpg" alt="" /></a></div>
<h2>Photos</h2>
<div class="imgholder"><a href="#"><img
src="../images/images/photos.jpg" alt="" /></a></div>
</div>
<!-- ###### -->
<div id="latestnews">
<h2>Pls enter username and password to login</h2>
<table
>
<form action="checklogin.php" method="post"><br><br>
Username:<input name="username" type="text"
maxlength="12"><br><br> Password:<input name="password"
type="password" maxlength="12">
<input name="submit" type="submit">
</form>
</table>
</div>
<!-- ###### -->
<li><a
href="http://localhost/xampp/project/library/newarrival.php">» New
Arrivals</a></li>
<li><a
href="http://localhost/xampp/project/library/onlinebooks.php">» Online
Books</a></li>
<li><a
href="http://localhost/xampp/project/library/egallery.php">» E-
Gallery</a></li>
<li><a
href="http://localhost/xampp/project/library/aboutus.php">» About
Us</a></li>
<li><a
href="http://localhost/xampp/project/library/contactus.php">»
Contact Us</a></li>
<li><a
href="http://localhost/xampp/project/library/questionpaper.php">»
Question Papers</a></li>
<li><a
href="http://localhost/xampp/project/library/latestnews.php">» Latest
Events & News</a></li>
</ul>
</div>
<!--
###############################################################
########
################################ -->
</div>
</div>
</div>
<!--
###############################################################
########
################################ -->
<!--
###############################################################
########
################################ -->
<div class="wrapper">
<div id="copyright" class="clear">
<p class="fl_left">Copyright © 2014 - All Rights Reserved
for SOE LIBRARY-</p>
</div>
Division Of Computer Science And Engineering Page 43
Library Management System
</div>
</body>
</html>
<?ph
p session_start();
$host="localhost"; // Host name
$username="root"; // Mysql username
$password=""; // Mysql password
$regno= $row['regno'] ;
$name= $row['stuname'] ;
$branch= $row['branch'] ;
$semester= $row['semester'] ;
$section= $row['section'] ;
$yearofadm= $row['yearofadm'];
$email=$row['email'];
$username= $row['username'];
$password= $row['password'];
}
mysqli_close($con
);
?>
<?php
require '../include/connection1.php';
$admin="[email protected]";
$sql="INSERT INTO
student(Libid,regno,stuname,branch,semester,section,yearofadm) VALUES
('$libid','$regno','$name','$branch','$semester','$section','$yearofadm')";
$result="INSERT INTO
studentlogin(logid,username,password,numbooks) VALUES
('$libid','$username','$password','')";
if (!mysqli_query($connection,$sql))
{
die('Error1: ' . mysqli_error($connection));
}
else if (!mysqli_query($connection,$result))
{
die('Error2: ' . mysqli_error($connection));
}
else
mail($email,"registrationdetails","you are registered pls login with ur
email id and password","From: $admin\n");
echo"added 1 record";
mysqli_close($connection);
?>
<?php
require '../include/connection.php';
$result = mysqli_query($con,"SELECT * FROM student");
while($row = mysqli_fetch_array($result))
{
$libid=$row['libid'] ;
$regno= $row['regno'] ;
$name= $row['stuname'] ;
$branch= $row['branch'] ;
Division Of Computer Science And Engineering Page 47
Library Management System
$semester= $row['semester'] ;
$section= $row['section'] ;
$yearofadm= $row['yearofadm'];
$email=$row['email'];
$username= $row['username'];
$password= $row['password'];
}
$sql=mysqli_query($con,"DELETE FROM student WHERE libid='$libid'");
mysqli_close($con);
?>
<?php
$con=mysqli_connect("localhost","root","rahul#1991","library");
// Check connection
if (mysqli_connect_errno())
{
echo "Failed to connect to MySQL: " . mysqli_connect_error();
}
$loginid=$_POST['teacherid'];
$username=$_POST['username'];
$password=$_POST['password'];
$teachername=$_POST['teachername'];
$designation=$_POST['designation'];
$branch=$_POST['branch'];
$contactno=$_POST['contact'];
$lecture='';
$sql="INSERT INTO teacher (Tid, name, designation, branch,
contactno,lectures) VALUES
( $loginid,$teachername,$designation,$branch,$contactno,$lecture)";
$tql="INSERT INTO teacherlogin
($loginid,$username,$password) VALUES
( $loginid,$username, $password)";
if (!mysqli_query($con,$sql))
{
echo "error";
}
if (!mysqli_query($con,$tql))
{
echo "error1";
}
echo "successs";
?>
<?php
$con=mysqli_connect("localhost","root","","library");
// Check connection
if (mysqli_connect_errno())
{
echo "Failed to connect to MySQL: " . mysqli_connect_error();
}
if (!mysqli_query($con,$sql))
{
echo "error";
}
echo "successs";
mysqli_close($con);
?>
<?php
$con=mysqli_connect("localhost","root","","admin");
// Check connection
if (mysqli_connect_errno())
{
echo "Failed to connect to MySQL: " . mysqli_connect_error();
}
if (!mysqli_query($con,$sql))
{
echo "error";
}
echo "successs";
Division Of Computer Science And Engineering Page 51
Library Management System
mysqli_close($con);
?>
4.1.2Student Module
STUDEN
T
USERNAME FORGOT
AND PASSWO
PASSWORD RD
AUTHENTICA
TION
<!DOCTYPE html>
<html xml:lang="EN" lang="EN" dir="ltr">
<head>
<title>SOE LIBRARY INFORMATION SYSTEM</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta http-equiv="imagetoolbar" content="no" />
<link rel="stylesheet" href="../styles/layout.css" type="text/css" />
<!-- Homepage Specific Elements -->
<script type="text/javascript" src="../scripts/jquery-1.4.1.min.js"></script>
Division Of Computer Science And Engineering Page 54
Library Management System
<script type="text/javascript" src="../scripts/jquery-ui-
1.7.2.custom.min.js"></script>
<script type="text/javascript" src="../scripts/jquery.tabs.setup.js"></script>
<!-- End Homepage Specific Elements -->
</head>
<body id="top">
<div class="wrapper row1">
</ul>
<form action="#" method="post" id="sitesearch">
<fieldset>
<strong>Search:</strong>
<input type="text" value="Search Our webiste for books;"
onfocus="this.value=(this.value=='Search Our website for books;')? '' :
this.value ;"
/>
<input type="image" src="../images/search.gif" id="search"
alt="Search" />
</fieldset
>
</form>
</div>
</div>
Division Of Computer Science And Engineering Page 56
Library Management
</div>
System
<!--
#############################################################
#######
################################### -->
<div class="wrapper row2">
<div
class="rnd">
<!-- ###### -->
<div id="topnav">
<ul>
<li class="active"><a href="homepage.php">Home</a></li>
<li><a href="newarrivals.php">New Arrivals</a></li>
<li><a href="onlinebooks.php">Online Books</a></li>
<li><a href="egallery.php">E Gallery</a></li>
<li><a href="questionpaper.php">Question Paper</a></li>
<li><a href="aboutus.php">About Us</a></li>
<li><a href="bookissue.php">Book Issue </a></li>
<li class="last"><a href="#"></a></li>
</ul>
</div>
<!-- ###### -->
</div>
</div>
<!--
#############################################################
#######
################################### -->
<div class="wrapper">
<div id="featured_slide" class="clear">
<!-- ###### -->
<div class="overlay_left"></div>
<div id="featured_content">
<div class="featured_box" id="fc1"><img
src="../images/demo/slider/1.gif" alt="" />
<div class="floater">
<h2>All ABOUT SOE LIBRARY</h2>
<p>School oF Engineering Library or the S.O.E library is one
of the finest library in kerela having a good collection of books
related to various subjects</p>
<p class="readmore"><a href="#">Continue Reading
»</a></p>
</div>
</div>
<div class="featured_box" id= "fc2"><img
src="../images/demo/slider/2.gif" alt="" />
<div class="floater">
<h2>Existence</h
2>
<p>School oF Engineering library came into existence in year
1995 and from then on it has been a premier source of information
for college students</p>
<p class="readmore"><a href="#">Continue Reading
»</a></p>
Division Of Computer Science And Engineering Page 58
Library Management
</div>
System
</div>
<div class="featured_box" id="fc3"><img
src="../images/demo/slider/3.gif" alt="" />
<div class="floater">
<h2>Collection</h2>
<p>School of Engineering Library has a collection of over
25000 books related to various subjects in engineering</p>
<h2>Sugeestion</h2>
<div class="imgholder"><a href="#"><img
src="../images/images/suggestions.jpg" alt=""
/></a></div>
<h2>Book request</h2>
<div class="imgholder"><a href="#"><img
src="../images/images/bookrequest1.jpg" alt=""
/></a></div>
<h2>Account creation</h2>
<div class="imgholder"><a href="#"><img
src="../images/images/account.jpg" alt=""
/></a></div>
<h2>Photos</h2>
<div class="imgholder"><a href="#"><img
src="../images/images/photos.jpg" alt="" /></a></div>
</div>
<!-- ###### -->
<div
id="latestnews">
<h2>ENTER YOUR DETAILS</h2>
<p><span class="error">* required field.</span></p>
<table
>
<form action="insertaccount.php" method="POST">
<legend>Student Information:</legend>
<tr>
<td>Library Id:</td> <td><input type="text" name="libid" size="30">
<span class="error">* </span><br><br></td>
</tr>
<tr>
<td>Registration No: </td> <td><input type="text" name="regno"
size="30">
<span class="error">* </span><br><br></td>
</tr>
<tr>
<td>Name: </td> <td> <input type="text" name="stuname"
size="30">
<span class="error">* </span><br><br></td>
</tr>
<tr>
<td>Branch: </td> <td> <select name="branch" size="1"
tabindex="7">
Division Of Computer Science And Engineering Page 62
Library Management System
<option selected="selected">Computer Science</option>
<option>Electronics & Communication</option>
<option>Electrical & Electronics</option>
<option>Mechanical</option>
<option>Safety & Fire</option>
<option>Civil</option>
<option>Information Technology</option>
</select>
<span class="error">* </span><br><br></td>
</tr>
<tr>
<td>Semester: </td> <td><select name="semester" size="1"
tabindex="8">
<option selected="selected">1&2</option>
<option>3</option>
<option>4</option>
<option>5</option>
<option>6</option>
<option>7</option>
<option>8</option>
</select>
<span class="error">* </span><br><br></td>
</tr>
<tr>
<td>Section: </td> <td><select name="section" size="1" tabindex="2">
<option selected="selected">A</option>
<option>B</option>
</select>
<span class="error">* </span><br><br></td>
</tr>
<tr>
<td>Year of adm:</td> <td> <input type="text"name="yearofadm"
size="30">
<span class="error">* </span><br><br></td>
</tr>
<tr>
<td>Email:</td> <td> <input type="email"name="email" size="30">
<span class="error">* </span><br><br></td>
</tr>
<tr>
<td>Username:</td> <td> <input type="text"name="username" size="30">
<span class="error">* </span><br><br></td>
</tr>
<tr>
<td>Password:</td> <td> <input type="password"name="password"
size="30">
<span class="error">* </span><br><br></td>
</tr>
<tr>
<td><p>Click the submit</p></td>
</tr>
<tr>
Division Of Computer Science And Engineering Page 64
Library Management System
<td height="40"><input type="submit" name= "submit"
value="submit" action= "insertaccount.php"></td>
</tr>
</form>
</table>
</div>
<!-- ###### -->
<li><a
href="http://localhost/xampp/project/library/questionpaper/questionpaper.p
hp">&ra quo; Question Papers</a></li>
<li><a
href="http://localhost/xampp/project/library/latestnews/latestnews.php">
» Latest Events & News</a></li>
</ul>
</div>
<!--
#############################################################
#######
################################### -->
</div>
</div>
</div>
<!--
#############################################################
#######
################################### -->
<!--
#############################################################
#######
################################### -->
<div class="wrapper">
<div id="copyright" class="clear">
<p class="fl_left">Copyright © 2013 - All Rights Reserved
for SOE LIBRARY-</p>
</div>
</div>
</body>
</html>
<?php
// define variables and set to empty values
$libidErr = $regnoErr = $stunameErr = $branchErr = $semesterErr =
$sectionErr =
$yearofadmErr = $usernameErr = $passwordErr = "";
$libid = $regno = $stuname = $branch = $semester = $section =
$yearofadm =
$username = $password = "";
if ($_SERVER["REQUEST_METHOD"] == "POST")
{
Division Of Computer Science And Engineering Page 68
Library Management System
if (empty($_POST["libid"]))
{$libidErr = "libid is
required"; echo $libidErr;
include("createaccount.php"
);
}
els
e
{$libid= test_input($_POST["libid"]);}
if (empty($_POST["regno"]))
{$regnoErr = "Registration number is required";
echo $regnoErr;
include("createaccount.php");
}
els
e
{$regno = test_input($_POST["regno"]);}
if (empty($_POST["stuname"]))
{ $stunameErr = "student name is
required"; echo $stunameErr;
include("createaccount.php");
}
els
e
{$stuname = test_input($_POST["stuname"]);}
if (empty($_POST["branch"]))
{$branchErr = " branch is
required" ; echo $branchErr;
include("createaccount.php");
}
els
e
{$branch = test_input($_POST["branch"]);
if (empty($_POST["semester"]))
{$semesterErr = "semester is
required"; echo $semesterErr;
include("createaccount.php");
}
els
e
{$semester = test_input($_POST["semester"]);}
if (empty($_POST["section"]))
{$sectionErr = "section is
Division Of Computer Science And Engineering Page 70
Library Management System
required"; echo $sectionErr;
include("createaccount.php");
}
els
e
{$section = test_input($_POST["section"]);}
if (empty($_POST["yearofadm"]))
{$yearofadmErr = "year of adm. is
required"; echo $yearofadmErr;
include("createaccount.php");
}
els
e
{$yearofadm = test_input($_POST["yearofadm"]);
}
if (empty($_POST["username"]))
{$usernameErr = "username is
required"; echo $usernameErr;
include("createaccount.php");
}
els
e
{$username = test_input($_POST["username"]);
}
if (empty($_POST["password"]))
{$passwordErr = "password is
required"; echo $passwordErr;
include("createaccount.php");
}
els
e
{$password = test_input($_POST["password"]);}
function test_input($data)
{
$data = trim($data);
$data = stripslashes($data);
$data = htmlspecialchars($data);
return $data;
}
?>
<?php
$con=mysqli_connect("localhost","root","","admin");
// Check connection
if (mysqli_connect_errno())
{
Division Of Computer Science And Engineering Page 72
Library Management System
echo "Failed to connect to MySQL: " . mysqli_connect_error();
}
$sql="INSERT INTO
student(libid,regno,stuname,branch,semester,section,yearofadm,email,use
rname,pass word)
VALUES
('$_POST[libid]','$_POST[regno]','$_POST[stuname]','$_POST[branch]','$
_POST[s
emester]','$_POST[section]','$_POST[yearofadm]','$_POST[email]','$_PO
ST[userna me]','$_POST[password]')";
if (!mysqli_query($con,$sql))
{
die('Error: ' . mysqli_error($con));
}
echo "wait for conformation";
mysqli_close($con);
?>
<?php
//Start
session
session_start
();
//Unset the variables stored in
session
unset($_SESSION['SESS_userna
me']);
unset($_SESSION['SESS_passwo
rd']);
?>
<!DOCTYPE html>
<html xml:lang="EN" lang="EN" dir="ltr">
<head>
<title>SOE LIBRARY INFORMATION SYSTEM</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"
/>
<meta http-equiv="imagetoolbar" content="no" />
<link rel="stylesheet" href="../styles/layout.css" type="text/css" />
<!-- Homepage Specific Elements -->
<script type="text/javascript" src="../scripts/jquery-1.4.1.min.js"></script>
Division Of Computer Science And Engineering Page 74
Library Management System
<script type="text/javascript" src="../scripts/jquery-ui-
1.7.2.custom.min.js"></script>
<script type="text/javascript" src="../scripts/jquery.tabs.setup.js"></script>
<!-- End Homepage Specific Elements -->
</head>
<body id="top">
<div class="wrapper row1">
<div id="header" class="clear">
<div class="fl_left">
<li><a
href="http://localhost/xampp/project/library/onlinebooks.php">Online
Books</a></li>
<li><a
href="http://localhost/xampp/project/library/egallery.php">E
Gallery</a></li>
<li><a
href="http://localhost/xampp/project/library/questionpaper.php">Q
uestion Paper</a></li>
<li><a href="http://localhost/xampp/project/library/aboutus.php">About
Us</a></li>
<li><a href="http://localhost/xampp/project/library/bookissue.php">Book
Issue
</a></li>
<li class="last"><a href="#"></a></li>
</ul>
</div>
<!-- ###### -->
</div>
</div>
<!--
#############################################################
#######
################################### -->
<div class="wrapper">
<div id="featured_slide" class="clear">
<!-- ###### -->
<div class="overlay_left"></div>
<div id="featured_content">
<div class="featured_box" id="fc1"><img
src="../images/demo/slider/1.gif" alt="" />
<div class="floater">
<h2>All ABOUT SOE LIBRARY</h2>
<p>School oF Engineering Library or the S.O.E library is one
of the finest library in kerela having a good collection of books
related to various subjects</p>
<p class="readmore"><a href="#">Continue Reading
»</a></p>
</div>
</div>
<div class="featured_box" id= "fc2"><img
src="../images/demo/slider/2.gif" alt="" />
<div class="floater">
<h2>Existence</h
Division Of Computer Science And Engineering Page 78
Library Management
2>
System
<p>School oF Engineering library came into existence in year
1995 and from then on it has been a premier source of information
for college students</p>
<p class="readmore"><a href="#">Continue Reading
»</a></p>
</div>
</div>
<div class="featured_box" id="fc3"><img
src="../images/demo/slider/3.gif" alt="" />
<div class="floater">
<h2>Collection</h2>
<p>School of Engineering Library has a collection of over
25000 books related to various subjects in engineering</p>
<p class="readmore"><a href="#">Continue Reading
»</a></p>
</div>
</div>
<div class="featured_box" id="fc4"><img
src="../images/demo/slider/4.gif" alt="" />
<div class="floater">
<h2>E-Repository</h2>
<p>School oF Engineering Library has a collection of 6000 cds
and 2800 online journals and also has a section where teachers
upload their lectures notes and student can download them.</p>
<p class="readmore"><a href="#">Continue Reading
»</a></p>
</div>
</div>
<div class="featured_box" id="fc5"><img
src="../images/demo/slider/5.gif" alt="" />
<div class="floater">
<h2>Latest News and events</h2>
<p></p>
<p class="readmore"><a href="#">Click here to go to
latest news page;</a></p>
</div>
</div>
</div>
<ul id="featured_tabs">
<li><a href="#fc1">All About The Library</a></li>
<li><a href="#fc2">Existence</a></li>
<li><a href="#fc3">Collection of Books</a></li>
<li><a href="#fc4">E-Repository</a></li>
<li class="last"><a href="#fc5">Latest News & Events</a></li>
</ul>
<div class="overlay_right"></div>
<!-- ###### -->
</div>
</div>
<!--
#############################################################
#######
################################### -->
<div class="wrapper
Division Of Computer row3">
Science And Engineering Page 80
Library Management
<div
System
class="rnd">
<div id="container" class="clear">
<!--
#############################################################
#######
################################### -->
<div id="homepage" class="clear">
<!-- ###### -->
<div id="left_column">
<h2>Sugeestion</h2>
<div class="imgholder"><a href="#"><img
src="../images/images/suggestions.jpg" alt=""
/></a></div>
<h2>Book request</h2>
<div class="imgholder"><a href="#"><img
src="../images/images/bookrequest1.jpg" alt=""
/></a></div>
<h2>Account creation</h2>
<div class="imgholder"><a href="#"><img
src="../images/images/account.jpg" alt=""
/></a></div>
<h2>Photos</h2>
<div class="imgholder"><a href="#"><img
src="../images/images/photos.jpg" alt="" /></a></div>
</div>
<!-- ###### -->
<div id="latestnews">
<h2>Pls enter username and password to login</h2>
<table
>
<form action="checklogin.php" method="post"><br><br>
Username:<input name="username" type="text"
maxlength="12"><br><br> Password:<input name="password"
type="password" maxlength="12">
<input name="submit" type="submit">
</form>
</table>
</div>
<!-- ###### -->
<li><a
href="http://localhost/xampp/project/library/homepage.php">»
Home</a></li>
<li><a
href="http://localhost/xampp/project/library/studentlogin.php">»
Student Login</a></li>
<li><a href="teacherlogin.php">» Teacher Login</a></li>
<li><a
href="http://localhost/xampp/project/library/adminlogin.php">&r
aquo; Adminlogin</a></li>
<li><a
href="http://localhost/xampp/project/library/newarrival.php">»
; New Arrivals</a></li>
<li><a
href="http://localhost/xampp/project/library/onlinebooks.php">»
Online Books</a></li>
<li><a
href="http://localhost/xampp/project/library/egallery.php">» E-
Gallery</a></li>
<li><a
href="http://localhost/xampp/project/library/aboutus.php">» About
Us</a></li>
<li><a
href="http://localhost/xampp/project/library/contactus.php">»
Contact Us</a></li>
<li><a
href="http://localhost/xampp/project/library/questionpaper.php">»
Question Papers</a></li>
<li><a
href="http://localhost/xampp/project/library/latestnews.php">» Latest
Events & News</a></li>
</ul>
</div>
<!--
#############################################################
#######
################################### -->
</div>
</div>
</div>
<!--
#############################################################
#######
################################### -->
Division Of Computer Science And Engineering Page 84
Library Management
<!--
System
#############################################################
#######
################################### -->
<div class="wrapper">
<div id="copyright" class="clear">
<p class="fl_left">Copyright © 2014 - All Rights Reserved
for SOE LIBRARY-</p>
</div>
</div>
</body>
</html>
<?php
session_start();
$host="localhost"; // Host name
$username="root"; // Mysql username
$password=""; // Mysql password
$db_name="library"; // Database name
$tbl_name="studentlogin"; // Table name
}
}
?>
<?php
$con=mysqli_connect("localhost","root","","admin");
// Check connection
if (mysqli_connect_errno())
{
echo "Failed to connect to MySQL: " . mysqli_connect_error();
}
$sql="INSERT INTO
event(Name,date,time,venue,mname,contactno,email) VALUES
('$_POST[ename]','$_POST[date]','$_POST[time]','$_POST[venue]','$_P
OST[name
]','$_POST[phno]','$_POST[email]')";
if (!mysqli_query($con,$sql))
{
die('Error: ' . mysqli_error($con));
}
echo "wait for conformation";
mysqli_close($con);
?>
4.1.2 Screenshot for Student login
TEACHE
R
TEACHER LOGIN
SUGGESTI
ONS
EVENT ADDITION
USERNAME FORGOT
AND PASSWO
PASSWORD RD
AUTHENTICA
TION
<?ph
p session_start();
$host="localhost"; // Host name
$username="root"; // Mysql username
$password=""; // Mysql password
$db_name="library"; // Database name
$tbl_name="teacherlogin"; // Table name
$result=mysql_query($sql);
<?php
session_start
();
?>
<!DOCTYPE html>
<html xml:lang="EN" lang="EN" dir="ltr">
<head>
<title>SOE LIBRARY INFORMATION SYSTEM</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"
/>
<meta http-equiv="imagetoolbar" content="no" />
<link rel="stylesheet" href="../styles/layout.css" type="text/css" />
<!-- Homepage Specific Elements -->
Division Of Computer Science And Engineering Page 62
Library Management System
<script type="text/javascript" src="../scripts/jquery-1.4.1.min.js"></script>
<script type="text/javascript" src="../scripts/jquery-ui-
1.7.2.custom.min.js"></script>
<!--
#############################################################
#######
################################### -->
<div class="wrapper row3">
<div
class="rnd">
<div id="container"
class="clear">
<!--
#############################################################
#######
################################### -->
<div id="homepage" class="clear">
<!-- ###### -->
<div id="left_column">
<h2>Sugeestion</h2>
<div class="imgholder"><a href="#"><img
src="../images/images/suggestions.jpg" alt=""
/></a></div>
<h2>Book request</h2>
<div class="imgholder"><a href="#"><img
src="../images/images/bookrequest1.jpg" alt=""
/></a></div>
<h2>Account creation</h2>
<div class="imgholder"><a href="#"><img
src="../images/images/account.jpg" alt=""
/></a></div>
<h2>Photos</h2
>
<div class="imgholder"><a href="#"><img
src="../images/images/photos.jpg" alt="" /></a></div>
</div>
<!-- ###### -->
<div id="latestnews">
<h2>Pls enter sugeestion in less than 255 characters</h2>
<table border=1>
<form action="suggestion.php" method="post">
<tr>
<td>SUGGESTION</td><td><textarea name="suggestion"
rows="5" cols="50"></textarea><br></br></td>
</tr>
<tr>
<td><input type="submit"
Division Of Computer Science And Engineering Page 70
Library Management System
value="submit"name="submit"><br></br><
/td>
</tr>
</form>
</table>
<
</div>
<!-- ###### -->
</div>
<!--
#############################################################
#######
################################### -->
<!--
#############################################################
#######
################################### -->
<div id="academiclinks" class="clear">
<h2>Quickly Find What You Are Looking For</h2>
<div class="linkbox">
<ul>
<li><a
href="http://localhost/xampp/project/library/homepage.php">»
Home</a></li>
<li><a
href="http://localhost/xampp/project/library/studentlogin.php">»
Student Login</a></li>
<li><a href="teacherlogin.php">» Teacher Login</a></li>
<li><a
href="http://localhost/xampp/project/library/adminlogin.php">&r
aquo; Adminlogin</a></li>
<li><a
href="http://localhost/xampp/project/library/newarrival.php">»
; New Arrivals</a></li>
<li><a
href="http://localhost/xampp/project/library/onlinebooks.php">»
Online Books</a></li>
<li><a
href="http://localhost/xampp/project/library/egallery.php">» E-
Gallery</a></li>
<li><a
href="http://localhost/xampp/project/library/aboutus.php">» About
Us</a></li>
<li><a
href="http://localhost/xampp/project/library/contactus.php">»
Contact Us</a></li>
<li><a
href="http://localhost/xampp/project/library/questionpaper.php">»
Question Papers</a></li>
<li><a
href="http://localhost/xampp/project/library/latestnews.php">» Latest
Events & News</a></li>
</ul>
</div>
Division Of Computer Science And Engineering Page 72
Library Management System
<!--
#############################################################
#######
################################### -->
</div>
</div>
</div>
<!--
#############################################################
#######
################################### -->
<!--
#############################################################
#######
################################### -->
<div class="wrapper">
<div id="copyright" class="clear">
<p class="fl_left">Copyright © 2014 - All Rights Reserved
for SOE LIBRARY-</p>
</div>
</div>
</body>
</html>
<?php
session_start
();
require '../include/connection1.php';
$sql = mysqli_query($connection,"SELECT * FROM
studentlogin where username='$_SESSION[SESS_username]'&&
password='$_SESSION[SESS_password]'");
$rocount=mysqli_num_rows($s
ql);
if($rocount==1)
{
while($row = mysqli_fetch_array($sql))
{
$logid=$row['logid'];
$username= $row['username'] ;
$password= $row['password'] ;
$numbooks= $row['numbooks'];
}
}
$result = mysqli_query($connection,"SELECT * FROM
student where libid='$logid'");
$rowcount=mysqli_num_rows($result);
if($rowcount==1)
{
while($row = mysqli_fetch_array($result))
{
Division Of Computer Science And Engineering Page 74
Library Management System
$libid=$row['libid'];
$regno= $row['regno'] ;
$stuname= $row['stuname'] ;
$branch= $row['branch'] ;
$semester= $row['semester'] ;
$section= $row['section'] ;
$yearofadm= $row['yearofadm'] ;
}
}
mysqli_close($connection);
?>
<?php
require'../include/connection.p
hp';
if (!mysqli_query($con,$sql))
{
echo "error";
}
echo "successs";
mysqli_close($con);
?>
BOOK
MAINTENANCE
The following module contains various facilities like add new book and
search book. In the ‘add new book’ section if any new book comes in
the library then the librarian can add its specifications. Similarly if the
user wants to search for a specific book then he/she can use search
book option to do it.
<?php
$con=mysqli_connect("localhost","root","","library");
// Check connection
if (mysqli_connect_errno())
{
echo "Failed to connect to MySQL: " . mysqli_connect_error();
}
if (!mysqli_query($con,$sql))
{
echo "error";
Division Of Computer Science And Engineering Page 77
Library} Management System
echo "successs";
mysqli_close($con);
?>
<?php
$con=mysqli_connect("localhost","root","","admin");
// Check connection
if (mysqli_connect_errno())
{
echo "Failed to connect to MySQL: " . mysqli_connect_error();
}
if (!mysqli_query($con,$sql))
{
echo "error";
}
echo "successs";
mysqli_close($con);
?>
<!DOCTYPE html>
<html xml:lang="EN" lang="EN" dir="ltr">
<head>
<title>SOE LIBRARY INFORMATION SYSTEM</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta http-equiv="imagetoolbar" content="no" />
<link rel="stylesheet" href="../styles/layout.css" type="text/css" />
<!-- Homepage Specific Elements -->
<script type="text/javascript" src="../scripts/jquery-1.4.1.min.js"></script>
<script type="text/javascript" src="../scripts/jquery-ui-
1.7.2.custom.min.js"></script>
<script type="text/javascript" src="../scripts/jquery.tabs.setup.js"></script>
<!-- End Homepage Specific Elements -->
</head>
<body id="top">
<div class="wrapper row1">
<div id="header" class="clear">
Division Of Computer Science And Engineering Page 79
Library Management
<div
System
class="fl_left">
<h1><a href="homepage.php">SOE LIBRARY
MANAGEMENT SYSTEM</a></h1>
<p></p>
</div>
<div class="fl_right">
<ul>
<li><a href="homepage.php">Home</a></li>
<li><a
href="http://localhost/xampp/project/library/contact/Contactus.php">Contact
Us</a></li
>
<li><a
href="http://localhost/xampp/project/library/egateway/egateway.php">E-
Gateway</a></li>
<li><a
href="http://localhost/xampp/project/library/studentlogin/studentlogin.php">
Student Login</a></li>
<li ><a
href="http://localhost/xampp/project/library/teachrlogin/teacherlogin.php">Tea
cherlogi n</a></li>
<li><a
href="http://localhost/xampp/project/library/admin/adminlogin.php">Adminlogin
</a></ li>
</ul>
<form action="#" method="post" id="sitesearch">
<fieldset
>
<strong>Search:</strong>
<input type="text" value="Search Our webiste for books;"
onfocus="this.value=(this.value=='Search Our website for books;')? '' :
this.value ;" />
<input type="image" src="images/search.gif" id="search" alt="Search" />
</fieldset
>
</form>
</div>
</div>
</div>
<!--
###############################################################
########
################################ -->
<div class="wrapper row2">
<div
class="rnd">
<!-- ###### -
Division Of Computer Science And Engineering Page 81
Library Management
->
System
<div id="topnav">
<ul>
<li class="active"><a href="homepage.php">Home</a></li>
<li><a
href="http://localhost/xampp/project/library/newarrivals/newarrivals.php
">New Arrivals</a></li>
<li><a
href="http://localhost/xampp/project/library/onlinebooks/onlinebooks.php"
>Online Books</a></li>
<li><a
href="http://localhost/xampp/project/library/egallery/egallery.php">E
Gallery</a></li>
<li><a
href="http://localhost/xampp/project/library/questionpaper/questionpaper.php"
>Questio n Paper</a></li>
<li><a
href="http://localhost/xampp/project/library/aboutus/aboutus.php">About
Us</a></li>
<li><a
href="http://localhost/xampp/project/library/abouts/bookissue.php">Book
Issue </a></li>
<li class="last"><a href="#"></a></li>
</ul>
</div>
<!-- ###### -->
</div>
</div>
<!--
###############################################################
########
################################ -->
<div class="wrapper">
<div id="featured_slide" class="clear">
<!-- ###### -->
<div class="overlay_left"></div>
<div id="featured_content">
<div class="featured_box" id="fc1"><img
src="../images/demo/slider/12.gif" alt=""
/>
<div class="floater">
<h2>All ABOUT SOE LIBRARY</h2>
<p>School oF Engineering Library or the S.O.E library is one of the
finest library
in kerela having a good collection of books related to various subjects</p>
<p class="readmore"><a href="#">Continue Reading »</a></p>
</div>
</div>
<div class="featured_box" id= "fc2"><img
src="../images/demo/slider/21.gif" alt=""
/>
<div
class="floater">
<h2>Existence</h2>
<p>School oF Engineering library came into existence in year 1995
Division Of Computer Science And Engineering Page 83
Library Management System
and from then
on it has been a premier source of information for college students</p>
<p class="readmore"><a href="#">Continue Reading »</a></p>
</div>
</div>
<div class="featured_box" id="fc3"><img src="../images/demo/slider/31.gif"
alt=""
/>
<div class="floater">
<h2>Collection</h2>
<div id="left_column">
<h2>Sugeestion</h2>
<div class="imgholder"><a href="#"><img
src="../images/images/suggestions.jpg" alt=""
/></a></div>
<h2>Book request</h2>
<div class="imgholder"><a href="#"><img
src="../images/images/bookrequest1.jpg" alt=""
/></a></div>
<h2>Account creation</h2>
<div class="imgholder"><a
href="http://localhost/xampp/project/library/create/createaccount.php
"><img src="../images/images/account.jpg" alt="" /></a></div>
<h2>Photos</h2>
<div class="imgholder"><a href="#"><img
src="../images/images/photos.jpg" alt="" /></a></div>
</div>
<!-- ###### -->
<div id="latestnews">
<h2>ENTER BOOK DETAILS</h2>
<table
>
<form action="advancesearchresult.php" method="POST">
<legend>Book Information:</legend>
<tr>
<td>Book Code:</td> <td><input type="text"
name="bookcode" size="30"><br><br></td>
</tr>
<tr>
<td>Book Name: </td> <td><input type="text"
name="bookname" size="30"><br><br></td>
</tr>
<tr>
<td>Publication: </td> <td> <input type="text"
name="publication" size="30"><br><br></td>
</tr>
<tr>
<td>Author Name: </td> <td> <input
type="text"name="authorname" size="30"><br><br></td>
</tr>
<tr>
<td><p>Click the submit</p></td>
Division</tr>
Of Computer Science And Engineering Page 87
Library Management System
<tr>
<td height="40"><input type="submit" name= "submit"
value="submit" action= "insertaccount.php"></td>
</tr>
</form>
</table>
<!--
###############################################################
########
################################ -->
<!--
###############################################################
########
################################ -->
<div id="academiclinks" class="clear">
<h2>Quickly Find What You Are Looking For</h2>
<div class="linkbox">
<ul>
<li><a
href="http://localhost/xampp/project/library/homepage.php">»
Home</a></li>
<li><a
href="http://localhost/xampp/project/library/studentlogin.php">»
Student Login</a></li>
<li><a
href="http://localhost/xampp/project/library/teacherlogin.php">»
Teacher Login</a></li>
<li><a
href="http://localhost/xampp/project/library/adminlogin.php">»
Adminlogin</a></li>
<li><a
href="http://localhost/xampp/project/library/newarrivals.php">» New
Arrivals</a></li>
<li><a
href="http://localhost/xampp/project/library/onlinebooks.php">» Online
Books</a></li>
<li><a
Division Of Computer Science And Engineering Page 89
Library Management System
href="http://localhost/xampp/project/library/egallery.php">» E-
Gallery</a></li>
<li><a
href="http://localhost/xampp/project/library/aboutus.php">» About
Us</a></li>
<li><a
href="http://localhost/xampp/project/library/contactus.php">»
Contact Us</a></li>
<li><a
href="http://localhost/xampp/project/library/questionpaper.php">»
Question Papers</a></li>
<li><a
href="http://localhost/xampp/project/library/latestnews.php">» Latest
Events & News</a></li>
</ul>
</div>
<!--
###############################################################
########
################################ -->
</div>
</div>
</div>
<!--
###############################################################
########
################################ -->
<!--
###############################################################
########
################################ -->
<div class="wrapper">
<div id="copyright" class="clear">
<p class="fl_left">DEVELOPER:
VIKRAM,RAHUL,PRABHAKAR,RAJAT</p>
</div>
</div>
</body>
</html>
<?php
$con=mysqli_connect("localhost","root","","library");
// Check connection
if (mysqli_connect_errno())
{
echo "Failed to connect to MySQL: " . mysqli_connect_error();
}
$code=$_POST['bookcode'];
$name=$_POST['bookname'];
$aname=$_POST['authorname'];
$publication=$_POST['publication'];
$result = mysqli_query($con,"SELECT * FROM books WHERE code =
'$code' ||
bookname = '$name' || author = '$aname' || publication = '$publication'");
</tr>";
while($row = mysqli_fetch_array($result))
{
echo "<tr>";
echo "<td>" . $row['code'] . "</td>";
echo "<td>" . $row['bookname'] . "</td>";
echo "<td>" . $row['author'] . "</td>";
echo "<td>" . $row['publication'] . "</td>";
echo "<td>" . $row['subject'] . "</td>";
echo "<td>" . $row['numberofbooks'] . "</td>";
echo "</tr>";
}
echo "</table>";
mysqli_close($con);
?>
BOOK
TRANSACTION
The following module contains various facilities like issue book, return
book and check reservation.
<?php
require'../include/connection1.p
hp';
$result = mysqli_query($connection,"SELECT * FROM studentlogin");
while($row = mysqli_fetch_array($result))
{
$libid=$row['logid']
;
$username=
$row['username'];
$password=
$row['password'];
$numbooks=$row['numbook
s'];
}
if($numbooks>3
)
{
echo"cannnot issue books limit exceeded";
}
else
{
$libid=$_POST['libid'];
$bookid=$_POST['bookid'];
$issuedate=$_POST['issuedate'];
$returndate=date_add($issuedate,date_interval_create_from_date_string("15
days"));
$sql="INSERT INTO
issuebooks(libid,bookid,issuedate,returndate) VALUES
('$libid','$bookid','$issuedate','$returndate')";
mysqli_query($connection,"UPDATE studentlogin SET
numbooks=numbooks+1
WHERE logid='$libid'");
mysqli_query($connection,"UPDATE book SET
numberofbooks=numberofbooks-1
WHERE code='$bookid'");
if (!mysqli_query($connection,$sql))
{
die('Error1: ' . mysqli_error($connection));
Division Of Computer Science And Engineering Page 94
Library Management
}
System
else
echo"added 1 record";
}
mysqli_close($connection);
?>
<?php
require'../include/connection1.p
hp';
$libid=$_POST['libid'];
$bookid=$_POST['bookid'];
$result = mysqli_query($connection,"SELECT * FROM issuebooks where libid=
'$libid' &&
bookid='$bookid'");
$rowcount=mysqli_num_rows($result);
if($rowcount>0)
{
$sql=mysqli_query($connection,"UPDATE studentlogin SET
numbooks=numbooks-1
WHERE logid='$libid'");
$sql1=mysqli_query($connection,"UPDATE book
SET
numberofbooks=numberofbooks+1
WHERE code='$bookid'");
$sql2=mysqli_query($connection,"DELETE FROM issuebooks
WHERE
libid=$libid && bookid='$bookid'");
}
els
e echo"no book issued";
mysqli_close($connection);
?>
REPOR
T
<?php
require '../include/connection1.php';
$result = mysqli_query($connection,"SELECT * FROM
teacher")
; $count=mysqli_num_rows($result);
echo "<table border='1' style='width=100px'>
<tr>
<td>Teacher id</td>
<td>Name</td>
<td>Designation</td>
<td>Branch</td>
<td>Contact no</td>
</tr>";
while($count>0
Division Of Computer Science And Engineering Page 98
Library Management
) System
{
while($row = mysqli_fetch_array($result))
{echo "<tr>";
echo "<td>" . $row['tid'] . "</td>";
echo "<td>" . $row['name'] . "</td>";
echo "<td>" . $row['designation'] . "</td>";
echo "<td>" . $row['branch'] .
"</td>"; echo "<td>" .
$row['contactno'] . "</td>";
echo"</tr>";
}
$count=$count-1;
}
mysqli_close($connection);
?>
</table>
<?php
require '../include/connection1.php';
$result = mysqli_query($connection,"SELECT * FROM
student")
; $count=mysqli_num_rows($result);
echo "<table border='1' style='width=100px'>
<tr>
<td>Libraryid</td>
<td>Registration number</td>
<td>Name</td>
<td>Branch</td>
<td>Semester</td>
<td>Section</td>
<td>Year of adm</td>
</tr>";
while($count>0)
{
while($row = mysqli_fetch_array($result))
{echo "<tr>";
echo "<td>" . $row['libid'] .
"</td>"; echo "<td>" .
$row['regno'] . "</td>"; echo
"<td>" . $row['stuname'] . "</td>";
echo "<td>" . $row['branch'] .
Division Of Computer Science And Engineering Page
100
Library"</td>";
Management System
echo "<td>" .
$row['semester'] . "</td>"; echo
"<td>" . $row['section'] . "</td>";
echo "<td>" . $row['yearofadm'] .
"</td>";
echo"</tr>";
}
$count=$count-1;
}
mysqli_close($connection);
?>
</table>
<?php
require '../include/connection1.php';
$result = mysqli_query($connection,"SELECT * FROM
issuebooks order by libid");
$count=mysqli_num_rows($result);
echo "<table border='1' style='width=100px'>
<tr>
<td>Libraryid</td>
<td>Bookid</td>
<td>Issue date</td>
<td>Return date</td>
</tr>";
while($count>0)
{
while($row = mysqli_fetch_array($result))
{echo "<tr>";
echo "<td>" . $row['libid'] . "</td>";
echo "<td>" . $row['bookid'] .
"</td>"; echo "<td>" .
$row['issuedate'] . "</td>"; echo
"<td>" . $row['returndate'] . "</td>";
echo"</tr>";
}
$count=$count-1;
}
mysqli_close($connection);
?>
</table>
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
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 ie besides the module we would require
The procedures belonging to other modules that the module under
test calls
Non local data structures that module accesses
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
INTEGRATION TESTING
CHAPTER 6
There is a future scope of this facility that many more features such as online
lectures video tutorials can be added by teachers as well as online
assignments submission facility , a feature Of group chat where students can
discuss various issues of engineering can be added to this project thus
making it more interactive more user friendly and project which fulfills each
users need in the best way possible
CHAPTER 7
REFERENCES
http://www.w3schools.com/html/html_intro.asp
http://www.w3schools.com/css/css_background.asp
http://www.w3schools.com/js/js_datatypes.asp
http://www.w3schools.com/sql/sql_insert.asp
http://www.w3schools.com/sql/sql_update.asp
http://www.w3schools.com/php/php_forms.asp
Fundamentals of software engineering by Rajib mall, PHIlearning
Web development and application development by Ivan Byross BPB
publications