MCA4
MCA4
Project Report
On
ACKNOWLEDGEMENT
We take this opportunity to express our hearty thanks to all those who
individually as well as collectively helped us in the successful completion of
this report .We are thankful to Dr Basanta Kumar Padhi, H.O.D., Department
of Master in Computer Application and also thankful to all the faculty
members of our MCA Department of Balasore College of Engineering and
Technology for having supported me to carry out this project report and for
their constant advice .
We are the student of MCA hereby declare that We own our responsibility for
the information and results provided in the project titled “-Online Library
Management System-” , submitted to BPUT, Rourkela, Odisha for award
for MCA degree . We have taken care of , in all respect to honour the
intellectual property right and have acknowledged the contributions of others
for using them in this academic purpose . We further declare that in case of
any violation of intellectual property rights or copyright ,We as the candidate
would be fully responsible for the same .Our supervisor and institute should
not be held for full or partial violation of copyright if found at any stage of my
degree.
Date: 05-05-2024
Place: BALASORE
BALASORE COLLEGE OF ENGINEERING & TECHNOLOGY
SERAGARH,BALASORE,ODISHA
CERTIFICATE
This is to certify that the project entitled “Online library Management system” is carried out
by AMRUTANSHU PRUSTY a student of Master in Computer Application of Balasore
College of Engineering & Technology, Sergarh, Balasore bearing Regd. No. 2205225004
under my supervision and guidance .This project has been submitted in partial fulfilment
of course of MCA at BCET, Balasore.
No part of this project has been submitted for the award of any previous degree to the best
of my
knowledge.
CONTENT
Chapter-1
1.1 Introduction.
1.2 Motivation.
1.3 Objective.
Chapter-2
2.1 Background.
2.3 Challenges.
Chapter-3
3.1 Requirement Analysis.
Chapter- 4
4.1 Implementation & testing
Chapter -5
5.1 Conclusion
References
Chapter: 1
1.1 Introduction
Introduction: Modern Generation is going to dependable on computer and through computer
we use Software. Hence, we are learning java that’s why we create an Application for managing
library system by using java. By using this, we can store a student’s information, issue a book
and store a student’s information who take a book from this library. Mainly this application are
used by Library administration.
1.3 Objectives: The aim of this project is to develop a system that can handle & manage the
activities involved in a library in an efficient & reliable way. Less managing personnel & easy
searching availability & user profile managing are major goals in this project.
Develop a system that can replace the manual library managing system.
Attractive user interfaces to navigate through the system for the users.
Develop the system documentation with detailed UML specifications.
Chapter: 2
2.1 Background
Library Management System is an application which refers to library systems which are
generally small or medium in size. It is used by librarian to manage the library using a
computerized system where he/she can record various transactions like issue of books, return of
books, addition of new books, addition of new students etc.
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.
2.2 Scope of the Problem:
2.3 Challenges:
UMl design.
Working with java GUI and Swim.
.
Chapter: 3
3.1 Requirement Specification
Requirement Collection & Analysis:
Software configuration:
This software package is developed using java as front end which is supported by sun micro
system. Microsoft SQL server is the back end to store the database.
Operating system: Windows 7, 8,10
Language: java Runtime Environment, NetBeans 8.2(front end) Database: Sqlite server
Hardware Configuration:
Frontend
PHP-
PHP is a server-side scripting language designed for web development but also used as a general-
purpose programming language. 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 implementation of
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 .PHPcode 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 inter face 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 stand alone shell on almost every operating
system and platform, free of charge.
Scripting Language:
A scripting language is a language that interprets scripts at runtime. Scripts are usually embedded
into other software environments.
31.3M
460
Next
Stay
The purpose of the scripts is usually to enhance the performance or perform routine tasks for an
application.
Server side scripts are interpreted on the server while client side scripts are interpreted by the client
application.
PHP is a server side script that is interpreted on the server while JavaScript is an example of a client
side script that is interpreted by the client browser. Both PHP and JavaScript can be embedded into
HTML pages.
Has all the features needed to develop Mostly used for routine tasks
complete applications.
The code has to be compiled before it can The code is usually executed without
be executed compiling
Does not need to be embedded into other Is usually embedded into other software
languages environments.
PHP means - Personal Home Page, but it now stands for the recursive backronym PHP: Hypertext Pre
processor.
PHP code may be embedded into HTML code, or it can be used in combination with various web
template systems, web content management system and web frameworks.
A PHP file can also contain tags such as HTML and client side scripts such as JavaScript.
HTML is an added advantage when learning PHP Language. You can even learn PHP without
knowing HTML but it’s recommended you at least know the basics of HTML.
Database management systems DBMS for database powered applications.
For more advanced topics such as interactive applications and web services, you will
need JavaScript and XML.
The flowchart diagram shown below illustrates the basic architecture of a PHP web application and how
the server handles the requests.
Why use PHP?
You have obviously heard of a number of programming languages out there; you may be wondering why
we would want to use PHP as our poison for the web programming. Below are some of the compelling
reasons.
In terms of market share, there are over 20 million websites and application on the internet developed
using PHP scripting language.
The diagram below shows some of the popular sites that use PHP
PHP vs Asp.Net VS JSP VS CFML
ASP – Active Server Pages, JSP – Java Server Pages, CFML – Cold Fusion Markup language The table
below compares the various server side scripting languages with PHP
Learning curve short Longer than Longer than Longer than PHP
PHP PHP
File extension and Tags In order for the server to identify our PHP files and scripts, we
must save the file with the “.php” extension. Older PHP file extensions include
.phtml
.php3
.php4
.php5
.phps
PHP was designed to work with HTML, and as such, it can be embedded into the HTML code.
You can create PHP files without any html tags and that is called Pure PHP file .
The server interprets the PHP code and outputs the results as HTML code to the web browsers.
In order for the server to identify the PHP code from the HTML code, we must always enclose the PHP
code in PHP tags.
A PHP tag starts with the less than symbol followed by the question mark and then the words “php”.
The PHP tags themselves are not case-sensitive, but it is strongly recommended that we use lower case
letter. The code below illustrates the above point.
<?php … ?>
We will be referring to the PHP lines of code as statements. PHP statements end with a semi colon (;). If
you only have one statement, you can omit the semi colon. If you have more than one statement, then you
must end each line with a semi colon. For the sake of consistency, it is recommended that you always end
your statement(s) with a semi colon. PHP scripts are executed on the server. The output is returned in
form of HTML.
CSS
CSS Stands for "Cascading Style Sheet." Cascading style sheets are used to format the layout of Web
pages. They can be used to define text styles, table sizes, and other aspects of Web pages that
previously could only be defined in a page's HTML. The basic purpose of CSS is to separate the
content of a web document (written in any markup language)from its presentation (that is written
using Cascading Style Sheets). There are lots of benefits that one can extract through CSS like
improved content accessibility ,better flexibility and more over, CSS gives a level of control over
various presentation characteristics of the document. It also helps in reducing the complexity and helps
in saving overall presentation time. CSS gives the option of selecting various style schemes and
rules according to the requirements and it also allows the same HTML document to be presented in more
than one varying style.
Advantages of CSS
CSS saves time − You can write CSS once and then reuse same sheet in multiple HTML pages.
You can define a style for each HTML element and apply it to as many Web pages as you want.
Pages load faster − If you are using CSS, you do not need to write HTML tag attributes every
time. Just write one CSS rule of a tag and apply it to all the occurrences of that tag. So less code
means faster download times.
Easy maintenance − To make a global change, simply change the style, and all elements in all
the web pages will be updated automatically.
Superior styles to HTML − CSS has a much wider array of attributes than HTML, so you can
give a far better look to your HTML page in comparison to HTML attributes.
Multiple Device Compatibility − Style sheets allow content to be optimized for more than one
type of device. By using the same HTML document, different versions of a website can be
presented for handheld devices such as PDAs and cell phones or for printing.
Global web standards − Now HTML attributes are being deprecated and it is being
recommended to use CSS. So its a good idea to start using CSS in all the HTML pages to make
them compatible to future browsers.
CSS is created and maintained through a group of people within the W3C called the CSS Working
Group. The CSS Working Group creates documents called specifications. When a specification has been
discussed and officially ratified by the W3C members, it becomes a recommendation.
These ratified specifications are called recommendations because the W3C has no control over the actual
implementation of the language. Independent companies and organizations create that software.
A CSS comprises of style rules that are interpreted by the browser and then applied to the corresponding
elements in your document. A style rule is made of three parts −
Selector − A selector is an HTML tag at which a style will be applied. This could be any tag like
<h1> or <table> etc.
Property − A property is a type of attribute of HTML tag. Put simply, all the HTML attributes
are converted into CSS properties. They could be color, border etc.
Value − Values are assigned to properties. For example, color property can have value
either red or #F1F1F1 etc.
JavaScript is considered to be one of the most famous scripting languages of all time. JavaScript, by
definition, is a Scripting Language of the World Wide Web. The main usage of JavaScript is to add
various Web function a lities, Web form validations, browser detections, creation of cookies and so
on. JavaScript is one of the most popular scripting languages and that is why it is supported by almost all
web browsers available today like Firefox, We used the browser Opera or Internet Explorer.
JavaScript is considered to be one of the most powerful scripting languages in use today. It is often
used for the development of client-side web development. JavaScript is used to make web pages
more interactive and dynamic.
JavaScript is a light weight programming language and it is embedded directly into the HTML code.
JavaScript, as the name suggests, was influenced by many languages, especially Java.
Learn Web Development provides information for beginners and introduces basic concepts of
programming and the Internet.
JavaScript Guide (this guide) provides an overview about the JavaScript language and its objects.
JavaScript Reference provides detailed reference material for JavaScript.
If you are new to JavaScript, start with the articles in the learning area and the JavaScript Guide. Once you
have a firm grasp of the fundamentals, you can use the JavaScript Reference to get more details on
individual objects and statements.
What is JavaScript?
JavaScript is a cross-platform, object-oriented scripting language used to make webpages interactive (e.g.,
having complex animations, clickable buttons, popup menus, etc.). There are also more advanced server
side versions of JavaScript such as Node.js, which allow you to add more functionality to a website than
downloading files (such as realtime collaboration between multiple computers). Inside a host environment
(for example, a web browser), JavaScript can be connected to the objects of its environment to provide
programmatic control over them.
JavaScript contains a standard library of objects, such as Array, Date, and Math, and a core set of language
elements such as operators, control structures, and statements. Core JavaScript can be extended for a
variety of purposes by supplementing it with additional objects; for example:
Client-side JavaScript extends the core language by supplying objects to control a browser and
its Document Object Model (DOM). For example, client-side extensions allow an application to
place elements on an HTML form and respond to user events such as mouse clicks, form input, and
page navigation.
Server-side JavaScript extends the core language by supplying objects relevant to running
JavaScript on a server. For example, server-side extensions allow an application to communicate
with a database, provide continuity of information from one invocation to another of the
application, or perform file manipulations on a server.
This means that in the browser, JavaScript can change the way the webpage (DOM) looks. And, likewise,
Node.js JavaScript on the server can respond to custom requests from code written in the browser.
JavaScript and Java are similar in some ways but fundamentally different in some others. The JavaScript
language resembles Java but does not have Java's static typing and strong type checking. JavaScript
follows most Java expression syntax, naming conventions and basic control-flow constructs which was the
reason why it was renamed from Live Script to JavaScript.
In contrast to Java's compile-time system of classes built by declarations, JavaScript supports a runtime
system based on a small number of data types representing numeric, Boolean, and string values. JavaScript
has a prototype-based object model instead of the more common class-based object model. The prototype-
based model provides dynamic inheritance; that is, what is inherited can vary for individual objects.
JavaScript also supports functions without any special declarative requirements. Functions can be
properties of objects, executing as loosely typed methods.
JavaScript is a very free-form language compared to Java. You do not have to declare all variables, classes,
and methods. You do not have to be concerned with whether methods are public, private, or protected, and
you do not have to implement interfaces. Variables, parameters, and function return types are not explicitly
typed.
Java is a class-based programming language designed for fast execution and type safety. Type safety
means, for instance, that you can't cast a Java integer into an object reference or access private memory by
corrupting Java byte codes. Java's class-based model means that programs consist exclusively of classes
and their methods. Java's class inheritance and strong typing generally require tightly coupled object
hierarchies. These requirements make Java programming more complex than JavaScript programming.
In contrast, JavaScript descends in spirit from a line of smaller, dynamically typed languages such as
HyperTalk and dBASE. These scripting languages offer programming tools to a much wider audience
because of their easier syntax, specialized built-in functionality, and minimal requirements for object
creation.
For more information on the differences between JavaScript and Java, see the chapter Details of the object
model.
JavaScript is standardized at Ecma International — the European association for standardizing information
and communication systems (ECMA was formerly an acronym for the European Computer Manufacturers
Association) to deliver a standardized, international programming language based on JavaScript. This
standardized version of JavaScript, called ECMA Script, behaves the same way in all applications that
support the standard. Companies can use the open standard language to develop their implementation of
JavaScript. The ECMA Script standard is documented in the ECMA-262 specification. See New in
JavaScript to learn more about different versions of JavaScript and ECMA Script specification editions.
The ECMA-262 standard is also approved by the ISO (International Organization for Standardization) as
ISO-16262. You can also find the specification on the Ecma International website. The ECMA Script
specification does not describe the Document Object Model (DOM), which is standardized by the World
Wide Web Consortium (W3C) and/or WHATWG (Web Hypertext Application Technology Working
Group). The DOM defines the way in which HTML document objects are exposed to your script. To get a
better idea about the different technologies that are used when programming with JavaScript, consult the
article JavaScript technologies overview.
The ECMA Script specification is a set of requirements for implementing ECMA Script. It is useful if you
want to implement standards-compliant language features in your ECMA Script implementation or engine
(such as Spider Monkey in Firefox, or V8 in Chrome).
The ECMA Script document is not intended to help script programmers. Use the JavaScript documentation
for information when writing scripts.
The ECMA Script specification uses terminology and syntax that may be unfamiliar to a JavaScript
programmer. Although the description of the language may differ in ECMA Script, the language itself
remains the same. JavaScript supports all functionality outlined in the ECMA Script specification.
The JavaScript documentation describes aspects of the language that are appropriate for a JavaScript
programmer.
What is a Database?
A database is a separate application that stores a collection of data. Each database has one or more
distinct APIs for creating, accessing, managing, searching and replicating the data it holds.
Other kinds of data stores can also be used, such as files on the file system or large hash tables in
memory but data fetching and writing would not be so fast and easy with those type of systems.
Nowadays, we use relational database management systems (RDBMS) to store and manage huge volume
of data. This is called relational database because all the data is stored into different tables and relations
are established using primary keys or other keys known as Foreign Keys.
RDBMS Terminology
Before we proceed to explain the MySQL database system, let us revise a few definitions related to the
database.
mysqld.exe --console
NOTE − If you are on NT, then you will have to use mysqld-nt.exe instead of mysqld.exe
If all went well, you will see some messages about startup and InnoDB. If not, you may have a
permissions issue. Make sure that the directory that holds your data is accessible to whatever user
(probably MySQL) the database processes run under.
MySQL will not add itself to the start menu, and there is no particularly nice GUI way to stop the server
either. Therefore, if you tend to start the server by double clicking the mysqld executable, you should
remember to halt the process by hand by using mysqladmin, Task List, Task Manager, or other
Windows-specific means.
After MySQL, has been successfully installed, the base tables have been initialized and the server has
been started: you can verify that everything is working as it should be via some simple tests.
Use mysqladmin binary to check the server version. This binary would be available in /usr/bin on linux
and in C:\mysql\bin on windows.
[root@host]#mysqladmin --version
It will produce the following result on Linux. It may vary depending on your installation −
If you do not get such a message, then there may be some problem in your installation and you would
need some help to fix it.
You can connect to your MySQL server through the MySQL client and by using the mysql command.
At this moment, you do not need to give any password as by default it will be set as blank.
[root@host]#mysql
It should be rewarded with a mysql> prompt. Now, you are connected to the MySQL server and you can
execute all the SQL commands at the mysql> prompt as follows −
MySQL ships with a blank password for the root MySQL user. As soon as you have successfully
installed the database and the client, you need to set a root password as given in the following code block
−
Now to make a connection to your MySQL server, you would have to use the following command −
[root@host]#mysql -u root -p
Enter password:*******
UNIX users will also want to put your MySQL directory in your PATH, so you won't have to keep
typing out the full path every time you want to use the command-line client.
If you want to run the MySQL server at boot time, then make sure you have the following entry in the
/etc/rc.local file.
/etc/init.d/mysqld start
Running and Shutting down MySQL Server
First check if your MySQL server is running or not. You can use the following command to check it −
If your MySql is running, then you will see mysqld process listed out in your result. If server is not
running, then you can start it by using the following command −
root@host# cd /usr/bin
./safe_mysqld&
Now, if you want to shut down an already running MySQL server, then you can do it by using the
following command −
root@host# cd /usr/bin
./mysqladmin -u root -p shutdown
Enter password: ******
For adding a new user to MySQL, you just need to add a new entry to the user table in the
database mysql.
The following program is an example of adding a new user guest with SELECT, INSERT and UPDATE
privileges with the password guest123; the SQL query is −
mysql> SELECT host, user, password FROM user WHERE user ='guest';
+-----------+---------+------------------+
| host |user | password |
+-----------+---------+------------------+
| localhost | guest|6f8c114b58f2ce9e|
+-----------+---------+------------------+
1 row inset(0.00 sec)
When adding a new user, remember to encrypt the new password using PASSWORD() function
provided by MySQL. As you can see in the above example, the password mypass is encrypted to
6f8c114b58f2ce9e.
Notice the FLUSH PRIVILEGES statement. This tells the server to reload the grant tables. If you don't
use it, then you won't be able to connect to MySQL using the new user account at least until the server is
rebooted.
You can also specify other privileges to a new user by setting the values of following columns in user
table to 'Y' when executing the INSERT query or you can update them later using UPDATE query.
Select_priv
Insert_priv
Update_priv
Delete_priv
Create_priv
Drop_priv
Reload_priv
Shutdown_priv
Process_priv
File_priv
Grant_priv
References_priv
Index_priv
Alter_priv
Another way of adding user account is by using GRANT SQL command. The following example will
add user zara with password zara123 for a particular database, which is named as TUTORIALS.
This will also create an entry in the MySQL database table called as user.
NOTE − MySQL does not terminate a command until you give a semi colon (;) at the end of the SQL
command.
The /etc/my.cnf File Configuration
In most of the cases, you should not touch this file. By default, it will have the following entries −
[mysqld]
datadir=/var/lib/mysql
socket =/var/lib/mysql/mysql.sock
[mysql.server]
user =mysql
basedir=/var/lib
[safe_mysqld]
err-log =/var/log/mysqld.log
pid-file =/var/run/mysqld/mysqld.pid
Here, you can specify a different directory for the error log, otherwise you should not change any entry
in this table.
Here is the list of the important MySQL commands, which you will use time to time to work with
MySQL database −
USE Databasename − This will be used to select a database in the MySQL workarea.
SHOW DATABASES − Lists out the databases that are accessible by the MySQL DBMS.
SHOW TABLES − Shows the tables in the database once a database has been selected with the
use command.
SHOW COLUMNS FROM tablename: Shows the attributes, types of attributes, key
information, whether NULL is permitted, defaults, and other information for a table.
SHOW INDEX FROM tablename − Presents the details of all indexes on the table, including
the PRIMARY KEY.
SHOW TABLE STATUS LIKE tablename\G − Reports details of the MySQL DBMS
performance and statistics.
MySQL works very well in combination of various programming languages like PERL, C, C++, JAVA
and PHP. Out of these languages, PHP is the most popular one because of its web application
development capabilities.
This tutorial focuses heavily on using MySQL in a PHP environment. If you are interested in MySQL
with PERL, then you can consider reading the PERL Tutorial.
PHP provides various functions to access the MySQL database and to manipulate the data records inside
the MySQL database. You would require to call the PHP functions in the same way you call any other
PHP function.
The PHP functions for use with MySQL have the following general format −
mysql_function(value,value,...);
The second part of the function name is specific to the function, usually a word that describes what the
function does. The following are two of the functions, which we will use in our tutorial −
mysqli_connect($connect);mysqli_query($connect,"SQL statement");
DATA FLOW DIAGRAM’S
LEVEL 0
LEVEL 1
Chapter:4
<?php
session_start();
error_reporting(0);
include('includes/config.php');
if(strlen($_SESSION['login'])==0)
header('location:index.php');
else{?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
</head>
<body>
<?php include('includes/header.php');?>
<div class="content-wrapper">
<div class="container">
<div class="col-md-12">
</div>
</div>
<div class="row">
<?php
$sid=$_SESSION['stdid'];
$query1->bindParam(':sid',$sid,PDO::PARAM_STR);
$query1->execute();
$results1=$query1->fetchAll(PDO::FETCH_OBJ);
$issuedbooks=$query1->rowCount();
?>
Book Issued
</div>
</div>
<?php
$rsts=0;
$query2->bindParam(':sid',$sid,PDO::PARAM_STR);
$query2->bindParam(':rsts',$rsts,PDO::PARAM_STR);
$query2->execute();
$results2=$query2->fetchAll(PDO::FETCH_OBJ);
$returnedbooks=$query2->rowCount();
?>
</div>
</div>
</div>
</div>
</div>
<?php include('includes/footer.php');?>
<!-- JAVASCRIPT FILES PLACED AT THE BOTTOM TO REDUCE THE LOADING TIME -->
<script src="assets/js/jquery-1.10.2.js"></script>
<script src="assets/js/bootstrap.js"></script>
<script src="assets/js/custom.js"></script>
</body>
</html>
<?php } ?>
my-profile.php
<?php
session_start();
include('includes/config.php');
error_reporting(0);
if(strlen($_SESSION['login'])==0)
header('location:index.php');
else{
if(isset($_POST['update']))
$sid=$_SESSION['stdid'];
$fname=$_POST['fullanme'];
$mobileno=$_POST['mobileno'];
$query = $dbh->prepare($sql);
$query->bindParam(':sid',$sid,PDO::PARAM_STR);
$query->bindParam(':fname',$fname,PDO::PARAM_STR);
$query->bindParam(':mobileno',$mobileno,PDO::PARAM_STR);
$query->execute();
}
?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<!--[if IE]>
<![endif]-->
</head>
<body>
<?php include('includes/header.php');?>
<!-- MENU SECTION END-->
<div class="content-wrapper">
<div class="container">
<div class="col-md-12">
</div>
</div>
<div class="row">
<div class="panel-heading">
My Profile
</div>
<div class="panel-body">
<?php
$sid=$_SESSION['stdid'];
$query->execute();
$results=$query->fetchAll(PDO::FETCH_OBJ);
$cnt=1;
if($query->rowCount() > 0)
foreach($results as $result)
{ ?>
<div class="form-group">
<label>Student ID : </label>
</div>
<div class="form-group">
</div>
<?php if($result->UpdationDate!=""){?>
<div class="form-group">
</div>
<?php } ?>
<div class="form-group">
<?php if($result->Status==1){?>
<?php }?>
</div>
<div class="form-group">
</div>
<div class="form-group">
</div>
<div class="form-group">
<label>Enter Email</label>
</div>
<?php }} ?>
</div>
</div>
</div>
</div>
</div>
</div>
<?php include('includes/footer.php');?>
<script src="assets/js/jquery-1.10.2.js"></script>
<script src="assets/js/bootstrap.js"></script>
<script src="assets/js/custom.js"></script>
</body>
</html>
<?php } ?>
Index.php
<?php
session_start();
error_reporting(0);
include('includes/config.php');
if($_SESSION['login']!=''){
$_SESSION['login']='';
if(isset($_POST['login']))
{
//code for captach verification
else {
$email=$_POST['emailid'];
$password=md5($_POST['password']);
$query-> execute();
$results=$query->fetchAll(PDO::FETCH_OBJ);
if($query->rowCount() > 0)
$_SESSION['stdid']=$result->StudentId;
if($result->Status==1)
$_SESSION['login']=$_POST['emailid'];
} else {
}
}
else{
?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<body>
<?php include('includes/header.php');?>
<div class="content-wrapper">
<div class="container">
<div class="col-md-12">
</div>
</div>
<div class="row">
<div class="panel-heading">
LOGIN FORM
</div>
<div class="panel-body">
<div class="form-group">
</div>
<div class="form-group">
<label>Password</label>
</div>
<div class="form-group">
</div>
</form>
</div>
</div>
</div>
</div>
</div>
</div>
<?php include('includes/footer.php');?>
<script src="assets/js/jquery-1.10.2.js"></script>
<!-- BOOTSTRAP SCRIPTS -->
<script src="assets/js/bootstrap.js"></script>
<script src="assets/js/custom.js"></script>
</body>
</html>
Index.php
<?php
session_start();
include('includes/config.php');
if(isset($_POST['login']))
$emailreg=$_POST['emailreg'];
$password=$_POST['password'];
$stmt->bind_param('sss',$emailreg,$emailreg,$password);
$stmt->execute();
$rs=$stmt->fetch();
$stmt->close();
$_SESSION['id']=$id;
$_SESSION['login']=$emailreg;
$uip=$_SERVER['REMOTE_ADDR'];
if($rs)
$uid=$_SESSION['id'];
$uemail=$_SESSION['login'];
$ip=$_SERVER['REMOTE_ADDR'];
$geopluginURL='http://www.geoplugin.net/php.gp?ip='.$ip;
$addrDetailsArr = unserialize(file_get_contents($geopluginURL));
$city = $addrDetailsArr['geoplugin_city'];
$country = $addrDetailsArr['geoplugin_countryName'];
$mysqli->query($log);
if($log)
header("location:dashboard.php");
else
}
?>
<!doctype html>
<head>
<meta charset="UTF-8">
<script type="text/javascript">
function valid()
{
if(document.registration.password.value!= document.registration.cpassword.value)
document.registration.cpassword.focus();
return false;
return true;
</script>
</head>
<body>
<?php include('includes/header.php');?>
<div class="ts-main-content">
<?php include('includes/sidebar.php');?>
<div class="content-wrapper">
<div class="container-fluid">
<div class="row">
<div class="col-md-12">
<div class="row">
<input type="text"
placeholder="Email / Registration Number" name="emailreg" class="form-control mb" required="true">
<input type="password"
placeholder="Password" name="password" class="form-control mb" required="true">
</form>
</div>
</div>
<a href="forgot-password.php"
style="color:black;">Forgot password?</a>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<script src="js/jquery.min.js"></script>
<script src="js/bootstrap-select.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/jquery.dataTables.min.js"></script>
<script src="js/dataTables.bootstrap.min.js"></script>
<script src="js/Chart.min.js"></script>
<script src="js/fileinput.js"></script>
<script src="js/chartData.js"></script>
<script src="js/main.js"></script>
</body>
</html>
Registration.php
<?php
session_start();
include('includes/config.php');
if(isset($_POST['submit']))
{
$regno=$_POST['regno'];
$fname=$_POST['fname'];
$mname=$_POST['mname'];
$lname=$_POST['lname'];
$gender=$_POST['gender'];
$contactno=$_POST['contact'];
$emailid=$_POST['email'];
$password=$_POST['password'];
$result ="SELECT count(*) FROM userRegistration WHERE email=? || regNo=?";
$stmt = $mysqli->prepare($result);
$stmt->bind_param('ss',$email,$regno);
$stmt->execute();
$stmt->bind_result($count);
$stmt->fetch();
$stmt->close();
if($count>0)
{
echo"<script>alert('Registration number or email id already registered.');</script>";
}else{
<!doctype html>
<html lang="en" class="no-js">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1, maximum-
scale=1">
<meta name="description" content="">
<meta name="author" content="">
<meta name="theme-color" content="#3e454c">
<title>User Registration</title>
<link rel="stylesheet" href="css/font-awesome.min.css">
<link rel="stylesheet" href="css/bootstrap.min.css">
<link rel="stylesheet" href="css/dataTables.bootstrap.min.css">>
<link rel="stylesheet" href="css/bootstrap-social.css">
<link rel="stylesheet" href="css/bootstrap-select.css">
<link rel="stylesheet" href="css/fileinput.min.css">
<link rel="stylesheet" href="css/awesome-bootstrap-checkbox.css">
<link rel="stylesheet" href="css/style.css">
<script type="text/javascript" src="js/jquery-1.11.3-jquery.min.js"></script>
<script type="text/javascript" src="js/validation.min.js"></script>
<script type="text/javascript" src="http://code.jquery.com/jquery.min.js"></script>
<script type="text/javascript">
function valid()
{
if(document.registration.password.value!= document.registration.cpassword.value)
{
alert("Password and Re-Type Password Field do not match !!");
document.registration.cpassword.focus();
return false;
}
return true;
}
</script>
</head>
<body>
<?php include('includes/header.php');?>
<div class="ts-main-content">
<?php include('includes/sidebar.php');?>
<div class="content-wrapper">
<div class="container-fluid">
<div class="row">
<div class="col-md-12">
<div class="row">
<div class="col-md-12">
<div class="panel panel-primary">
<div class="panel-heading">Fill all
Info</div>
<div class="panel-body">
<form method="post" action="" name="registration" class="form-horizontal"
onSubmit="return valid();">
<div class="form-group">
<label class="col-sm-2 control-label"> Registration No : </label>
<div class="col-sm-8">
<input type="text" name="regno" id="regno" class="form-control" required="required"
onBlur="checkRegnoAvailability()">
<span id="user-reg-availability" style="font-size:12px;"></span>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">First Name : </label>
<div class="col-sm-8">
<input type="text" name="fname" id="fname" class="form-control" required="required" >
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">Middle Name : </label>
<div class="col-sm-8">
<input type="text" name="mname" id="mname" class="form-control">
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">Last Name : </label>
<div class="col-sm-8">
<input type="text" name="lname" id="lname" class="form-control" required="required">
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">Gender : </label>
<div class="col-sm-8">
<select name="gender" class="form-control" required="required">
<option value="">Select Gender</option>
<option value="male">Male</option>
<option value="female">Female</option>
<option value="others">Others</option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">Contact No : </label>
<div class="col-sm-8">
<input type="text" name="contact" id="contact" class="form-control" required="required">
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">Email id: </label>
<div class="col-sm-8">
<input type="email" name="email" id="email" class="form-control" onBlur="checkAvailability()"
required="required">
<span id="user-availability-status" style="font-size:12px;"></span>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">Password: </label>
<div class="col-sm-8">
<input type="password" name="password" id="password" class="form-control" required="required">
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">Confirm Password : </label>
<div class="col-sm-8">
<input type="password" name="cpassword" id="cpassword" class="form-control" required="required">
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<script src="js/jquery.min.js"></script>
<script src="js/bootstrap-select.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/jquery.dataTables.min.js"></script>
<script src="js/dataTables.bootstrap.min.js"></script>
<script src="js/Chart.min.js"></script>
<script src="js/fileinput.js"></script>
<script src="js/chartData.js"></script>
<script src="js/main.js"></script>
</body>
<script>
function checkAvailability() {
$("#loaderIcon").show();
jQuery.ajax({
url: "check_availability.php",
data:'emailid='+$("#email").val(),
type: "POST",
success:function(data){
$("#user-availability-status").html(data);
$("#loaderIcon").hide();
},
error:function ()
{
event.preventDefault();
alert('error');
}
});
}
</script>
<script>
function checkRegnoAvailability() {
$("#loaderIcon").show();
jQuery.ajax({
url: "check_availability.php",
data:'regno='+$("#regno").val(),
type: "POST",
success:function(data){
$("#user-reg-availability").html(data);
$("#loaderIcon").hide();
},
error:function ()
{
event.preventDefault();
alert('error');
}
});
}
</script>
</html>
Dashboard.php
<?php
session_start();
include('includes/config.php');
include('includes/checklogin.php');
check_login();
?>
<!doctype html>
<html lang="en" class="no-js">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1, maximum-
scale=1">
<meta name="description" content="">
<meta name="author" content="">
<meta name="theme-color" content="#3e454c">
<title>DashBoard</title>
<link rel="stylesheet" href="css/font-awesome.min.css">
<link rel="stylesheet" href="css/bootstrap.min.css">
<link rel="stylesheet" href="css/dataTables.bootstrap.min.css">
<link rel="stylesheet" href="css/bootstrap-social.css">
<link rel="stylesheet" href="css/bootstrap-select.css">
<link rel="stylesheet" href="css/fileinput.min.css">
<link rel="stylesheet" href="css/awesome-bootstrap-checkbox.css">
<link rel="stylesheet" href="css/style.css">
</head>
<body>
<?php include("includes/header.php");?>
<div class="ts-main-content">
<?php include("includes/sidebar.php");?>
<div class="content-wrapper">
<div class="container-fluid">
<div class="row">
<div class="col-md-12">
<div class="row">
<div class="col-md-3">
<div class="panel panel-
default">
<div class="panel-body
bk-primary text-light">
<div class="stat-
panel text-center">
<div
class="stat-panel-number h1 ">My Profile</div>
</div>
</div>
<a href="my-
profile.php" class="block-anchor panel-footer">Full Detail <i class="fa fa-arrow-right"></i></a>
</div>
</div>
<div class="col-md-3">
<div class="panel panel-
default">
<div class="panel-body
bk-success text-light">
<div class="stat-
panel text-center">
<div class="stat-
panel-number h1 ">My Room</div>
</div>
</div>
<a href="room-
details.php" class="block-anchor panel-footer text-center">See All <i class="fa fa-arrow-right"></i></a>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<script>
window.onload = function(){
}
</script>
</body>
</html>
Registration.php
<?php
session_start();
include('includes/config.php');
if(isset($_POST['submit']))
{
$regno=$_POST['regno'];
$fname=$_POST['fname'];
$mname=$_POST['mname'];
$lname=$_POST['lname'];
$gender=$_POST['gender'];
$contactno=$_POST['contact'];
$emailid=$_POST['email'];
$password=$_POST['password'];
$result ="SELECT count(*) FROM userRegistration WHERE email=? || regNo=?";
$stmt = $mysqli->prepare($result);
$stmt->bind_param('ss',$email,$regno);
$stmt->execute();
$stmt->bind_result($count);
$stmt->fetch();
$stmt->close();
if($count>0)
{
echo"<script>alert('Registration number or email id already registered.');</script>";
}else{
<!doctype html>
<html lang="en" class="no-js">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1, maximum-
scale=1">
<meta name="description" content="">
<meta name="author" content="">
<meta name="theme-color" content="#3e454c">
<title>User Registration</title>
<link rel="stylesheet" href="css/font-awesome.min.css">
<link rel="stylesheet" href="css/bootstrap.min.css">
<link rel="stylesheet" href="css/dataTables.bootstrap.min.css">>
<link rel="stylesheet" href="css/bootstrap-social.css">
<link rel="stylesheet" href="css/bootstrap-select.css">
<link rel="stylesheet" href="css/fileinput.min.css">
<link rel="stylesheet" href="css/awesome-bootstrap-checkbox.css">
<link rel="stylesheet" href="css/style.css">
<script type="text/javascript" src="js/jquery-1.11.3-jquery.min.js"></script>
<script type="text/javascript" src="js/validation.min.js"></script>
<script type="text/javascript" src="http://code.jquery.com/jquery.min.js"></script>
<script type="text/javascript">
function valid()
{
if(document.registration.password.value!= document.registration.cpassword.value)
{
alert("Password and Re-Type Password Field do not match !!");
document.registration.cpassword.focus();
return false;
}
return true;
}
</script>
</head>
<body>
<?php include('includes/header.php');?>
<div class="ts-main-content">
<?php include('includes/sidebar.php');?>
<div class="content-wrapper">
<div class="container-fluid">
<div class="row">
<div class="col-md-12">
<div class="row">
<div class="col-md-12">
<div class="panel panel-primary">
<div class="panel-heading">Fill all
Info</div>
<div class="panel-body">
<form method="post" action="" name="registration" class="form-horizontal"
onSubmit="return valid();">
<div class="form-group">
<label class="col-sm-2 control-label"> Registration No : </label>
<div class="col-sm-8">
<input type="text" name="regno" id="regno" class="form-control" required="required"
onBlur="checkRegnoAvailability()">
<span id="user-reg-availability" style="font-size:12px;"></span>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">First Name : </label>
<div class="col-sm-8">
<input type="text" name="fname" id="fname" class="form-control" required="required" >
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">Middle Name : </label>
<div class="col-sm-8">
<input type="text" name="mname" id="mname" class="form-control">
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">Last Name : </label>
<div class="col-sm-8">
<input type="text" name="lname" id="lname" class="form-control" required="required">
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">Gender : </label>
<div class="col-sm-8">
<select name="gender" class="form-control" required="required">
<option value="">Select Gender</option>
<option value="male">Male</option>
<option value="female">Female</option>
<option value="others">Others</option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">Contact No : </label>
<div class="col-sm-8">
<input type="text" name="contact" id="contact" class="form-control" required="required">
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">Email id: </label>
<div class="col-sm-8">
<input type="email" name="email" id="email" class="form-control" onBlur="checkAvailability()"
required="required">
<span id="user-availability-status" style="font-size:12px;"></span>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">Password: </label>
<div class="col-sm-8">
<input type="password" name="password" id="password" class="form-control" required="required">
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">Confirm Password : </label>
<div class="col-sm-8">
<input type="password" name="cpassword" id="cpassword" class="form-control" required="required">
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<script src="js/jquery.min.js"></script>
<script src="js/bootstrap-select.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/jquery.dataTables.min.js"></script>
<script src="js/dataTables.bootstrap.min.js"></script>
<script src="js/Chart.min.js"></script>
<script src="js/fileinput.js"></script>
<script src="js/chartData.js"></script>
<script src="js/main.js"></script>
</body>
<script>
function checkAvailability() {
$("#loaderIcon").show();
jQuery.ajax({
url: "check_availability.php",
data:'emailid='+$("#email").val(),
type: "POST",
success:function(data){
$("#user-availability-status").html(data);
$("#loaderIcon").hide();
},
error:function ()
{
event.preventDefault();
alert('error');
}
});
}
</script>
<script>
function checkRegnoAvailability() {
$("#loaderIcon").show();
jQuery.ajax({
url: "check_availability.php",
data:'regno='+$("#regno").val(),
type: "POST",
success:function(data){
$("#user-reg-availability").html(data);
$("#loaderIcon").hide();
},
error:function ()
{
event.preventDefault();
alert('error');
}
});
}
</script>
</html>
Dashboard.php
<?php
session_start();
include('includes/config.php');
include('includes/checklogin.php');
check_login();
?>
<!doctype html>
<html lang="en" class="no-js">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1, maximum-
scale=1">
<meta name="description" content="">
<meta name="author" content="">
<meta name="theme-color" content="#3e454c">
<title>DashBoard</title>
<link rel="stylesheet" href="css/font-awesome.min.css">
<link rel="stylesheet" href="css/bootstrap.min.css">
<link rel="stylesheet" href="css/dataTables.bootstrap.min.css">
<link rel="stylesheet" href="css/bootstrap-social.css">
<link rel="stylesheet" href="css/bootstrap-select.css">
<link rel="stylesheet" href="css/fileinput.min.css">
<link rel="stylesheet" href="css/awesome-bootstrap-checkbox.css">
<link rel="stylesheet" href="css/style.css">
</head>
<body>
<?php include("includes/header.php");?>
<div class="ts-main-content">
<?php include("includes/sidebar.php");?>
<div class="content-wrapper">
<div class="container-fluid">
<div class="row">
<div class="col-md-12">
<div class="row">
<div class="col-md-3">
<div class="panel panel-
default">
<div class="panel-body
bk-primary text-light">
<div class="stat-
panel text-center">
<div
class="stat-panel-number h1 ">My Profile</div>
</div>
</div>
<a href="my-
profile.php" class="block-anchor panel-footer">Full Detail <i class="fa fa-arrow-right"></i></a>
</div>
</div>
<div class="col-md-3">
<div class="panel panel-
default">
<div class="panel-body
bk-success text-light">
<div class="stat-
panel text-center">
<div class="stat-
panel-number h1 ">My Room</div>
</div>
</div>
<a href="room-
details.php" class="block-anchor panel-footer text-center">See All <i class="fa fa-arrow-right"></i></a>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<script>
window.onload = function(){
}
</script>
</body>
</html>
Test results and report:
Login
System Testing
The testing process focuses on the logical intervals of the software ensuring
that all statements have been tested and on functional interval is conducting
tests to uncover errors and ensure that defined input will produce actual
results that agree with the required results. Program level testing, modules
Testing Methods
Black box testing focuses on the functional requirements of the software. This
is black box testing enables the software engineering to derive a set of input
conditions that will fully exercise all functional requirements for a program.
Interface errors
Performance errors
Unit testing
programmer tests if individual units of source code are fit for use.
Ideally, each test case is independent from the others: substitutes like
method stubs, objects, fakes and test harnesses can be used to assist testing a
module in isolation.
Integration Testing:
This testing is sometimes called Integration and Testing. Integration testing is
combined and tested as a group. It occurs after unit testing and before system
testing. Integration testing takes as its input modules that have been unit
test plan to those aggregates and delivers as its output the integrated system
Validation Testing:
that validation succeeds when the software functions in a manner that can
User acceptance of a system is a key factor of any system. The system under
the prospective system users at the same time of developing and marketing
Test Cases
OCCURED
page page
user Admin.
4 SignUp,Sanjana Signup Page Please enter No The
a valid wrong
password. password
******* is
given for
user
sanjana.
Chapter: 5
5.1 Conclusion & Future Scope
Discussion & conclusion: In this application we can entry a new book
which has a specific id, price, pages, book name, publisher. We also add a
student’s information such as name, id, father’s name, batch, semester which is
help admin when a student issue a book & return a book. If admin wants to see
the details information of returning or issuing a book with date, he needs to click
just a button on our application.
5.2 Scope for further development: we have many scope for developing our
Application. We can make this application as Server based application. In our
application we don’t have student’s interaction to this application. We can
make this happen in future. We can make this application as an android
application which is very helpful to the user and the library authority.
References:
1. https://netbeans.org/downloads/
2. http://www.oracle.com/technetwork/java/javase/downloads/jdk 8-
downloads-2133151.html
3. http://www.jtattoo.net/Download.html
4. http://launch4j.sourceforge.net/
5. https://sourceforge.net/projects/finalangelsanddemons/files/rs2x
ml.jar/download
6. https://bitbucket.org/xerial/sqlite-jdbc/downloads/
7. http://www.java2s.com/Code/Jar/j/Downloadjcalendar14jar.htm
8. https://www.youtube.com/playlist?list=PLEAQNNR8IlB4R7NfqBY1
frapYo97L6fOQ