BBDMS Report
BBDMS Report
Project Report
On
“Blood Bank & Donor Management System”
SCHOOL OF SCIENCES
1
Blood Bank & Donor Management System
A Project submitted
in partial fulfilment of the requirements
for the Degree of
2
GIET UNIVERSITY,GUNUPUR
Department of Computer Science & Applications
Dist. - Rayagada, Odisha-765022
CERTIFICATE
This is to certify that the project work entitled “BLOOD BANK &
DONOR MANAGEMENT SYSTEM” is done by Bichitra Kumar
Jena, Nilakantha Gouda and Sugyan Pradhan, Regd. No. :-
22PG030168, 22PG030154, 22PG030155 in partially fulfils the
requirements for the 4th Semester Examination of Master of Computer
Applications during the academic year 2022-24. This work is
submitted to the department as part of the 4th Semester Major Project
evaluation.
3
ACKNOWLEDGEMENT
We express our sincere gratitude to Prof. Satya Narayan Das, Head of The Department of
Computer Science and Applications for allowing me to accomplish the project. With his
active support and guidance, this project report has been completed.
We also thank “Mr. Pritam Kumar Raul” our Project Coordinator for guidance and help.
We also thank “Mr. A V Mahesh” our Project Supervisor for guidance and help.
4
CONTENTS
1. Synopsis
2. Introduction
3. System Analysis
Preliminary Investigation
➢ Feasibility Study
▪ Technical Feasibility
▪ Operational Feasibility
▪ Economical Feasibility
Gathering Information
System Study
➢ Existing System
➢ Proposed System
4. System Requirements
Software Environment
Working Environment
➢ Hardware Configuration
➢ Software Configuration
5. System Design
System Flow Diagram
Data Flow Diagrams
Database Design
➢ Data Dictionary
Screens
6. System Testing
9. Bibliography
5
SYNOPSIS
The numbers of persons who are in need of blood are increasing in large number day
by day. In order to help people who are in need of blood, my Online Blood Bank can
be used effectively for getting the details of blood donors having the same blood
group and within the same city. With the help of my Online Blood Bank people who
are having the thought of donating blood gets registered in my Online Blood Bank
giving his total details.
My site also helps people who are in need of blood by giving the details of the
donors by searching, if at all there are no donors having the same group and within
their own city they will be given the addresses with phone numbers of some contact
persons in major cities who represent a club or an organization with free of cost.
❑ Searching a Donor
6
INTRODUCTION
System Development:
The process of building systems has always been complex with system
becoming larger, the costs and complexities get multiplied. So the need for better
methods for developing systems is widely recognized to be effective and the applied
model should meet a few basic requirements.
▪ The model should separate the logical system from the physical system.
Based on the above requirements of the system model, system study has been made.
Various methodologies have been applied for system study, evolving design
Project:
The persons who like to donate blood registers in my site. The persons in need of
blood searches for the persons having the same blood group and within the city. If he
found a donor in his city then he gets the total details of the donor, if he doesn’t find
any donor then he is given the contact numbers and addresses of the Life Saving
7
Contact Persons for major cities. In this projects we use PHP and Mysql and it
Admin Module
Dashboard: In this section, admin can view all the details in brief like total blood
Blood Group: In this section, admin can manage blood group(Add/ Delete).
Donor List: In this section, admin can view list of donor and have right to delete and
Manage Contact us Query: In this section, admin can manage query which is
received by users.
Update Contact info: In this section, admin can update the contact details of website.
Request Received by Donor: In this section, admin can view the request of blood
Admin can also update his profile, change the password and recover the password.
Donor Module
Home: Its is welcome page for users and donor. If any users want to donate the blood
Contact Us: Users can contact with admin the through contact us page.
Search Donor: Users can search the donor according to city and blood group.
8
Registered Users(Donor)
Home: Its is welcome page for users and donor. If any users want to donate the blood
Contact Us: Users can contact with admin the through contact us page.
Search Donor: Users can search the donor according to city and blood group.
My Account:
•• Profile
•• Change Password
•• Request Received
•• Logout
Donor can also update his profile, change the password and recover the password.
9
SYSTEM ANALYSIS
Preliminary Investigation:
• Project clarification
• Feasibility study
• Project appraisal
Project clarification is the process of selecting a project request for further study.
When a system development or modification request is made, the first systems
activity, the preliminary investigation, begins the activity has three parts: Request
clarification, feasibility study and project appraisal. Many requests from employees
and users in organization are not clearly stated.
Therefore before any systems investigation can be considered, the project request
must be examined to determine preciously what the originator wants. This is called
Request clarification.
As important outcome of the preliminary investigation is the determination that the
system request in feasible.
Feasibility Study:
The feasibility study is performed to determine whether the proposed system is viable
considering the Technical, Operational and Economical factors. After going through
feasibility study we can have a clear-cut view of the system’s benefits and drawbacks.
Technical Feasibility:
The proposed system is developed using Active Server Page, VB Script and HTML as
front-end tool and Oracle 8 as the back end. The proposed system needs a Personal
Web Server to serve the requests submitted by the users. The Web browser is used to
view the web page that is available within the Windows operating system itself. The
proposed system will run under Win9x, NT, and win2000 environment. As Windows
10
is very user friendly and GUI OS it is very easy to use. All the required hardware and
software are readily available in the market. Hence the system is technically feasible.
Operational Feasibility:
Economical Feasibility:
As the necessary hardware and software are available in the market at a low cost, the
initial investment is the only cost incurred and does not need any further
enhancements. Hence it is economically feasible.
The system is feasible in all respects and hence it encourages taking up the system
design.
Gathering Information:
The analysis through collection of data plays the wider role in the analysis of the
system. So the data is collected at different levels of management to keep track of full
information of the system.
The collection of data is done from
Top Level Management
Middle Level Management
Low Level Management
Different methods used to collect the data:
Questioners:
The data is collected through questioners by filling a set of questions from the
different levels of management. The questions made by questioners are three different
types.
They are,
Structured questioners:
11
Unstructured questioners:
Semi-structured questioners:
Interviews:
Interviews were conducted to collect the information. The interviews were conducted
at two levels.
1. Formal Group Interviews: the interviews conducted for formal
groups i.e., the hierarchical (official) groups in the firm.
2. Informal Group Interviews: the interviews were conducted for
informal groups i.e., the groups formed out side the company.
Observation:
The data is also collected by observation of the firm. The data is collected by
observing on the site at different timings and at different situations like when the firm
is busy and when the firm hasn’t much work to do.
Record Review:
To collect the data and to get a clear idea of the firm some of the data is also collected
from the past records of the firm. This information helps very much to get a clear idea
of the firm i.e., the different problems occurred in different seasons and some
exception conditions. This very much gives a clear idea of exceptional conditions.
System Study:
Present system:
There are certain features limiting the process of the present system.
12
Proposed system:
The proposed system, Online Blood Bank site overcomes the drawbacks of the present
system. The Blood Bank helps the people who are in need of a blood by giving them
overall details regarding the donors with the same blood group and with in their city.
❑ The people in need of blood can search for the donors by giving their
blood group and city name.
❑ The person’s time and work is reduced very much which prevails in
the present system.
Limitation:
❑ In this project the searching can be done for donors for majority of
cities but not for every city.
❑ In this project the contact person’s details are given for the limited
cities only.
13
SYSTEM REQUIREMENTS
Software Environment:
Technology used:
Http
Http Basics
PHP
MYSQL
HTML
JAVASCRIPT
HTTP:
The Hypertext Transfer Protocol is stateless, TCP/IP based protocol used for
communicating on the World Wide Web. HTTP defines the precise manner in which
Web clients communicate with Web servers. HTTP/1.0 is the most common version in
use today. Oddly enough, this protocol is not officially recognized as an Internet
standard. It is documented in the informational RFC 1945. Its successor, HTTP/1.1, is
currently a proposed Internet standard and many browsers and servers now support
this new version.
HTTP Basics:
14
❑ The client opens a connection to the server.
Connectionless Protocol:
HTTP is a connectionless protocol. As you may have guessed, the difference between
a connectionless and a connection-oriented protocol is in the way they handle
connections. Using a connectionless protocol, the client opens a connection with the
server, sends a request, receives a response, and closes the connection. Each request
requires its own connection. With a connection-oriented protocol, the client connects
to the server, sends a request, receives response, and then holds the connection open in
order to service future requests.
The connectionless nature of HTTP is both strength and a weakness. Because it holds
a connection open only long enough to service the request, very few server resources
are required to service large numbers of users. In fact many popular Web sites service
millions of users in a single day. The drawback to a connectionless protocol is that a
connection must be established with every request. Opening a new connection with
each request incurs a performance penalty that translates into additional delays for the
user.
15
required to open a new connection is incurred only once rather than with every
request. Unfortunately, each open connection consumes some amount of server
resources. These finite resources, such as memory and disk space, limit the number of
concurrent users the server can handle. In contrast to a Web site, an FTP site can
rarely support more than a few hundred users at a time.
Stateless Protocol:
The stateless nature of HTTP is both strength and a weakness. It is strength in that its
stateless nature keeps the protocol simple and straightforward. It also consumes fewer
resources on the server and can support more simultaneous users since there are no
client credentials and connections to maintain. The disadvantage is in the overhead
required to create a new connection with each request and the inability to track a
single user as he traverses a Web site.
PHP
What is PHP?
PHP is a server scripting language, and a powerful tool for making dynamic and
interactive Web pages.
Syntax –
<!DOCTYPE html>
<html>
<body>
<?php
16
echo "My first PHP script!";
?>
</body>
</html>
• PHP files can contain text, HTML, CSS, JavaScript, and PHP code
• PHP code are executed on the server, and the result is returned to the browser
as plain HTML
• PHP files have extension ".php"
With PHP you are not limited to output HTML. You can output images, PDF files,
and even Flash movies. You can also output any text, such as XHTML and XML.
Why PHP?
MYSQL
MySQL is a popular database management system. It has a free and open source
version. With its rich features, it has been the choice for many database driven PHP
applications.
17
MySQL History
MySQL was founded by Michael Widenius and David Axmark in 1994. It was then
developed under the company MySQL AB where the company provided both open
source and commercial licenses. In January 2008, Sun Microsystems acquired
MySQL AB and in January 2010, Oracle acquired Sun Microsystems making MySQL
owned by Oracle.Since Oracle is primarily a proprietary software company, concerns
have been raised about the future of MySQL. MySQL forks like MariaDB and
alternatives like PostgreSQL have gained more attention with these concerns.
However still MySQL is used by many open source software and large scale websites.
Why to Use?
Oracle greatly supports RDBMS features. Also it supports high security to the data
and faster accessing capability. It can be run on a variety of platforms and operating
systems. One can develop an application easily by providing user-friendly
environment.
18
The features of oracle are portability and compatibility.
HTML:
The extended reach of information and services to customers that the Internet has
enabled, has created a new challenge for the developer. The developer should develop
a user interface that is distributable, available on multiple platforms and supports a
wide range of client environments from handheld wireless devices to high-end
workstations. So to maintain a broad reach to client environments and to achieve
greatest compatibility with all browsers, this system uses standard HTML.
Hyper Text Markup Language is the standard language for creating documents for the
World Wide Web. An HTML document is a text file, which contains the elements, in
the form of tags that a web browser uses to display text, multimedia objects, and
hyperlinks using HTML; we can format a document for display and add hyperlinks to
other documents.
The user interface has been designed in HTML hence can be browsed in any web
browser.
JavaScript
JavaScript Tutorial for beginners and professionals is a solution of client side dynamic
pages.
JavaScript is an object-based scripting language (programming language) that is
lightweight and cross-platform
JavaScript is not compiled but translated. The JavaScript Translator is responsible
to translate the JavaScript code.
Our JavaScript tutorial include all points of Statements , Comments, Variables,
Operators, Arithmetic, Assignment, Data Types, Functions, Objects, Scope, Events,
Strings, String Methods, Numbers, Number Methods, Math, Date Methods , Arrays,
19
Array Methods, Booleans, Comparisons, Conditions, Switch, Loop For, Loop While,
Break, Type Conversion, RegExp, Errors, Debugging etc
JavaScript Examples
The JavaScript example is the easiest to code. The reason being there are three places
where the code can be placed
Here are the three places where the JavaScript can be saved.
One is within the existing body tag, it can be saved in the head tag and last but not the
least it can be saved in the external JavaScript file.
The script tag present in the JavaScript file mentions that we are using the JavaScript.
Next the text or the actual script used this is the content which will provide
information to the browser for the data. The document.Write() is the function which is
used in order to display the dynamic content using the JavaScript.
There are three main places where the JavaScript code can be embedded are
mentioned below:
20
WORKING ENVIRONMENT
Hardware Configuration:
RAM : 64 MB RAM
Software Configuration:
21
SYSTEM DESIGN
System design is the process of planning a new system or to replace the existing
system. Simply, system design is like the blueprint for building, it specifies all the
features that are to be in the finished product.
System design phase follows system analysis phase. Design is concerned with
identifying functions, data streams among those functions, maintaining a record of the
design decisions and providing a blueprint the implementation phase.
Design is the bridge between system analysis and system implementation. Some of the
essential fundamental concepts involved in the design of application software are:
• Abstraction
• Modularity
• Verification
22
• Verification that the design satisfies the requirement analysis.
Some of the important factors of quality that are to be considered in the design of
application software are:
Reliability:
The software should behave strictly according to the original specification and should
function smoothly under normal conditions.
Extensibility:
Reusability:
The software should be developed using a modular approach, which permits modules
to be reused by other application, if possible.
The System Design briefly describes the concept of system design and it contains four
sections. The first section briefly describes the features that the system is going to
provide to the user and the outputs that the proposed system is going to offer.
The second section namely Logical Design describes the Data Flow Diagrams, which
show clearly the data movements, the processes and the data sources, and sinks, E-R
diagrams which represent the overall logical design of the database, and high-level
process structure of the system.
The process of design involves “conceiving and planning out in the mind” and making
a drawing pattern, or sketch of the system. In software design there are two types of
major activities, Conceptual Design and Detailed Design.
Details or internal design involves conceiving, planning out, and specifying the
internal structure and processing details of the software product. The goal of internal
design is to specify internal structure, processing details, blueprint of implementation,
testing, and maintenance activities.
23
One of the important fundamental concepts of software design is modularity. A
modularity system consists interfaces among the units. Modularity enhances design
clarity, which in turn eases implementation, debugging, testing, documentation, and
maintenance of the software product.
Preliminary Design:
Code design:
The purpose of code is to facilitate the identification and retrieval for items of
information. A code is an ordered collection of symbols designed to provide unique
identification of an entity or attribute. To achieve unique identification there must be
only one place where the identified entity or the attribute can be entered in the code;
conversely there must be a place in the code for everything that is to be identified.
This mutually exclusive feature must be built into any coding system.
The codes for this system are designed with two features in mind. Optimum human
oriented use and machine efficiency. Length of the code range from length of one to
length of five characteristics:
➢ The code structure is unique; ensuring that only one value of the
code with a single meaning may be correctly applied to a given entity or
attributes.
24
➢ The code structure is expansible allowing for growth of its set
of entities and attributes.
➢ The code is concise and brief for recording, communication,
transmission and storage efficiencies.
➢ They have a uniform size and format.
➢ The codes are simple so that the user can easily understand it.
➢ The codes are also versatile i.e., it is easy to modify to reflect
necessary changes in condition, chart eristic and relationships of the encode
entities.
➢ The codes are also easily storable for producing reports in a
predetermined order of format.
➢ The codes are also stable and do not require being frequently
updated thereby promoting user efficiency.
➢ The codes are also meaningful.
➢ They are also operable i.e., they are adequate for present and
anticipate data processing both for machine and human use.
Input Design:
Input design is a part of overall system design, which requires very careful attention.
The main objectives of input design are:
➢ To produce a cost-effective method of input.
➢ To achieve the highest possible level of accuracy.
➢ To ensure that the input is acceptable to and understood by the
user staff.
In this system input screens are designed very carefully so that no inaccurate data
will enter the database. The data is made as easy as possible. For simplifying the
data entry many facilities are given.
Each and every screen in this system is facilitated by many pushbuttons so that the
user can easily work with this system.
25
Output Design:
Outputs from computer systems are required primarily to communicate the results of
processing to users. They are also to provide a permanent hard copy of these results
for later consultation.
The various types of outputs are required by this system are given below:
➢ External outputs, whose destination is outside the concern and
which require special attention because they, project the image of the concern.
➢ Internal outputs, whose destination is within the concern and
which require careful design because they are the user’s main interface within
the computer.
➢ Operation outputs, whose use is purely within the computer
department, E.g., program listings, usage statistics etc,
➢ Interactive outputs, which involves the user in communicating
directly with the computers.
26
SYSTEM FLOW DIAGRAM
Blood
Bank
Admin Blood
Seekers
Donor
Sigin Search
View donor
General Contact
Informat with
Details ion Donor
Modification
27
Data flow Diagrams
I Level – DFD:
Registration
Blood
Donors
Life Saving
Contacts
Blood
Ba n k
Paging
Services
Blood
Seekers
Search
28
II Level – DFD:
Registration
Blood
Donors
Life Saving
Contacts
Blood
Ba n k
Paging
Blood
Seekers Services
Search
Receive
Donor
Details
29
UML Diagram
S i gn i n
Admin Panel
Manage Inquiries
Update Profile
Change Password
30
Donor Signup
Sign in
View Received
Request
Can Enquire
Update Profile
Change Password
31
ER Diagram
32
DATABASE DESIGN
Database is an integrated collection of data and provides a centralized access to the
data and makes possible to treat data as a separate resource. Usually centralized data
managing software is called a Relational Database Management System (RDBMS).
The most significant different between RDBMS and other type of Data Management
is the separation of data as seen by the program and data as store of on the direct
access storage device. This is the difference between logical and physical data.
Data Dictionary:
The efficiency of an application developed using RDBMS mainly depend upon the
database tables, the fields in each table and the way the tables are opened using the
contents in them to retrieve the necessary information. Hence a careful selection of
tables and their fields are imperative.
The database tables used in this system are created keeping the above points in mind.
The tables used are given below.
MYSQL Table Structure
33
Table Name: tblbloodgroup
Description: - This Table is store type of blood group info.
34
Table Name: tblcontactusquery
35
Class Diagram
36
SCREENS (Project Screen Shots)
Home Page
37
About Us Page
38
Contact Us
39
Donor List
Search Page
40
Donor Registration
Donor Login
41
Donor Profile
42
Change Password
43
Request Received
44
Admin
Admin Login
Dashboard
45
Profile
Change Password
46
Manage Blood Group
Donor List
47
Manage Contact Us Query
Manages Pages
48
Update Contact us Page
Forgot Password
49
REFERENCE CODE
1. Index Page
<?php
error_reporting(0);
include('includes/config.php');
?>
<!DOCTYPE html>
<html lang="zxx">
<head>
<title>Blood Bank Donar Management System | Home Page</title>
<script>
addEventListener("load", function () {
setTimeout(hideURLbar, 0);
}, false);
function hideURLbar() {
window.scrollTo(0, 1);
}
</script>
<!--// Meta tag Keywords -->
</head>
<body>
<?php include('includes/header.php');?>
</div>
</div>
</div>
</li>
<li>
<div class="banner-top2">
<div class="banner-info_agile_w3ls">
<div class="container">
<h3>One Blood Donation Save three
Lives
<span>every day</span>
</h3>
</div>
</div>
</div>
</li>
<li>
<div class="banner-top3">
<div class="banner-info_agile_w3ls">
<div class="container">
<!-- <h3>"Sometimes money cannot save life
<span>but donated blood
51
can</span>
</h3> -->
</div>
</div>
</div>
</li>
</ul>
</div>
</div>
<!-- //banner -->
<div class="clearfix"></div>
<div class="price-top">
</div>
</div>
</div>
<!-- //blog -->
<ul>
<div class="col-lg-6">
<img class="img-fluid rounded" src="images/blood-donor (1).jpg" alt="">
</div>
</div>
Type O individuals are often called "universal donors" since their blood can be transfused into
persons with any blood type. Those with type AB blood are called "universal recipients"
because they can receive blood of any type.</p>
</div>
<div class="col-md-4" style="padding-top: 30px;">
<a class="btn btn-lg btn-secondary btn-block login-button ml-lg-5 mt-lg-0 mt-4 mb-
lg-0 mb-3" data-toggle="modal" data-target="#exampleModalCenter1" href="#" data-
toggle="modal" data-target="#exampleModalCenter1"> Become a Donar</a>
</div>
</div>
</div>
54
</div>
<!-- //treatments -->
$("#slider4").responsiveSlides({
auto: true,
pager: true,
nav: true,
speed: 1000,
namespace: "callbacks",
before: function () {
<script src="js/bootstrap.js"></script>
<!-- Necessary-JavaScript-File-For-Bootstrap -->
</body>
</html>
2. Login Pages
<?php session_start();
error_reporting(0);
include('includes/config.php');
if(isset($_POST['login']))
{
$email=$_POST['email'];
$password=md5($_POST['password']);
$sql ="SELECT id FROM tblblooddonars WHERE EmailId=:email and Password=:password";
$query=$dbh->prepare($sql);
$query->bindParam(':email',$email,PDO::PARAM_STR);
$query-> bindParam(':password', $password, PDO::PARAM_STR);
$query-> execute();
$results=$query->fetchAll(PDO::FETCH_OBJ);
if($query->rowCount() > 0)
{
foreach ($results as $result) {
$_SESSION['bbdmsdid']=$result->id;
}
$_SESSION['login']=$_POST['email'];
echo "<script type='text/javascript'> document.location ='index.php'; </script>";
} else{
echo "<script>alert('Invalid Details');</script>";
}
}
?>
<!DOCTYPE html>
<html lang="zxx">
<head>
<title>Blood Bank Donar Management System | About Us </title>
<!-- Meta tag Keywords -->
<script>
addEventListener("load", function () {
setTimeout(hideURLbar, 0);
}, false);
function hideURLbar() {
window.scrollTo(0, 1);
}
56
</script>
<!--// Meta tag Keywords -->
</head>
<body>
<?php include('includes/header.php');?>
</div>
<!-- //banner 2 -->
</div>
<!-- page details -->
<div class="breadcrumb-agile">
<div aria-label="breadcrumb">
<ol class="breadcrumb">
<li class="breadcrumb-item">
<a href="index.php">Home</a>
</li>
<li class="breadcrumb-item active" aria-current="page">Login</li>
</ol>
</div>
</div>
<!-- //page details -->
57
required="">
</div>
<button type="submit" class="btn submit mb-4" name="login">Login</button>
<!-- <p class="forgot-w3ls text-center pb-4">
<a href="#" class="text-white">Forgot your password?</a>
</p> -->
<p class="account-w3ls text-center pb-4" style="color:#000">
Don't have an account?
<a href="sign-up.php" >Create one now</a>
</p>
</form>
</div>
</div>
</section>
<!-- //about -->
<?php include('includes/footer.php');?>
58
<script src="js/bootstrap.js"></script>
<!-- Necessary-JavaScript-File-For-Bootstrap -->
</body>
</html>
3. About Page
<?php
error_reporting(0);
include('includes/config.php');
?>
<!DOCTYPE html>
<html lang="zxx">
<head>
<title>Blood Bank Donar Management System | About Us </title>
<!-- Meta tag Keywords -->
<script>
addEventListener("load", function () {
setTimeout(hideURLbar, 0);
}, false);
function hideURLbar() {
window.scrollTo(0, 1);
}
</script>
<!--// Meta tag Keywords -->
</head>
<body>
<?php include('includes/header.php');?>
59
</div>
<!-- //banner 2 -->
</div>
<!-- page details -->
<div class="breadcrumb-agile">
<div aria-label="breadcrumb">
<ol class="breadcrumb">
<li class="breadcrumb-item">
<a href="index.php">Home</a>
</li>
<li class="breadcrumb-item active" aria-current="page">About Us</li>
</ol>
</div>
</div>
<!-- //page details -->
</div>
</section>
<!-- //about -->
<?php include('includes/footer.php');?>
60
pager: true,
nav: true,
speed: 1000,
namespace: "callbacks",
before: function () {
$('.events').append("<li>before event fired.</li>");
},
after: function () {
$('.events').append("<li>after event fired.</li>");
}
});
});
</script>
<!-- //banner slider -->
<script src="js/bootstrap.js"></script>
<!-- Necessary-JavaScript-File-For-Bootstrap -->
</body>
</html>
4. Profile
<?php
error_reporting(0);
include('includes/config.php');
?>
<!DOCTYPE html>
<html lang="zxx">
<head>
<title>Blood Bank Donar Management System | About Us </title>
<!-- Meta tag Keywords -->
<script>
addEventListener("load", function () {
setTimeout(hideURLbar, 0);
}, false);
function hideURLbar() {
window.scrollTo(0, 1);
}
</script>
<!--// Meta tag Keywords -->
61
<!-- Custom-Files -->
<link rel="stylesheet" href="css/bootstrap.css">
<!-- Bootstrap-Core-CSS -->
<link rel="stylesheet" href="css/style.css" type="text/css" media="all" />
<!-- Style-CSS -->
<link rel="stylesheet" href="css/fontawesome-all.css">
<!-- Font-Awesome-Icons-CSS -->
<!-- //Custom-Files -->
</head>
<body>
<?php include('includes/header.php');?>
</div>
<!-- //banner 2 -->
</div>
<!-- page details -->
<div class="breadcrumb-agile">
<div aria-label="breadcrumb">
<ol class="breadcrumb">
<li class="breadcrumb-item">
<a href="index.php">Home</a>
</li>
<li class="breadcrumb-item active" aria-current="page">About Us</li>
</ol>
</div>
</div>
<!-- //page details -->
62
<h3 class="title"><?php echo htmlentities($result->PageName); ?></h3>
<span>
<i class="fas fa-user-md"></i>
</span>
</div>
<p class="aboutpara text-center mx-auto"><?php echo $result->detail; ?>.</p>
<?php } } ?>
</div>
</section>
<!-- //about -->
<?php include('includes/footer.php');?>
<script src="js/bootstrap.js"></script>
<!-- Necessary-JavaScript-File-For-Bootstrap -->
63
</body>
</html>
5. Sign Up
<?php
session_start();
error_reporting(0);
include('includes/config.php');
if(isset($_POST['submit']))
{
$fullname=$_POST['fullname'];
$mobile=$_POST['mobileno'];
$email=$_POST['emailid'];
$age=$_POST['age'];
$gender=$_POST['gender'];
$blodgroup=$_POST['bloodgroup'];
$address=$_POST['address'];
$message=$_POST['message'];
$status=1;
$password=md5($_POST['password']);
$ret="select EmailId from tblblooddonars where EmailId=:email";
$query= $dbh -> prepare($ret);
$query-> bindParam(':email', $email, PDO::PARAM_STR);
$query-> execute();
$results = $query -> fetchAll(PDO::FETCH_OBJ);
if($query -> rowCount() == 0)
{
$sql="INSERT INTO
tblblooddonars(FullName,MobileNumber,EmailId,Age,Gender,BloodGroup,Address,Message,status,Password)
VALUES(:fullname,:mobile,:email,:age,:gender,:blodgroup,:address,:message,:status,:password)";
$query = $dbh->prepare($sql);
$query->bindParam(':fullname',$fullname,PDO::PARAM_STR);
$query->bindParam(':mobile',$mobile,PDO::PARAM_STR);
$query->bindParam(':email',$email,PDO::PARAM_STR);
$query->bindParam(':age',$age,PDO::PARAM_STR);
$query->bindParam(':gender',$gender,PDO::PARAM_STR);
$query->bindParam(':blodgroup',$blodgroup,PDO::PARAM_STR);
$query->bindParam(':address',$address,PDO::PARAM_STR);
$query->bindParam(':message',$message,PDO::PARAM_STR);
$query->bindParam(':status',$status,PDO::PARAM_STR);
$query->bindParam(':password',$password,PDO::PARAM_STR);
$query->execute();
$lastInsertId = $dbh->lastInsertId();
if($lastInsertId)
{
64
?>
<!DOCTYPE html>
<html lang="zxx">
<head>
<title>Blood Bank Donar Management System | About Us </title>
<!-- Meta tag Keywords -->
<script>
addEventListener("load", function () {
setTimeout(hideURLbar, 0);
}, false);
function hideURLbar() {
window.scrollTo(0, 1);
}
</script>
<!--// Meta tag Keywords -->
</head>
<body>
<?php include('includes/header.php');?>
</div>
<!-- //banner 2 -->
</div>
<!-- page details -->
<div class="breadcrumb-agile">
<div aria-label="breadcrumb">
<ol class="breadcrumb">
<li class="breadcrumb-item">
<a href="index.php">Home</a>
</li>
<li class="breadcrumb-item active" aria-current="page">Signup</li>
</ol>
65
</div>
</div>
<!-- //page details -->
<div class="form-group">
<label class="mb-2">Email Id</label>
<input type="email" name="emailid" class="form-control" placeholder="Email Id">
</div>
<div class="form-group">
<label class="mb-2">Age</label>
<input type="text" class="form-control" name="age" id="age" placeholder="Age" required="">
</div>
<div class="form-group">
<label class="mb-2">Gender</label>
<select name="gender" class="form-control" required>
<option value="">Select</option>
<option value="Male">Male</option>
<option value="Female">Female</option>
</select>
</div>
<div class="form-group">
<label class="mb-2">Blood Group</label>
<select name="bloodgroup" class="form-control" required>
<?php $sql = "SELECT * from tblbloodgroup ";
$query = $dbh -> prepare($sql);
$query->execute();
$results=$query->fetchAll(PDO::FETCH_OBJ);
$cnt=1;
if($query->rowCount() > 0)
{
foreach($results as $result)
{ ?>
<option value="<?php echo htmlentities($result->BloodGroup);?>"><?php echo htmlentities($result-
>BloodGroup);?></option>
<?php }} ?>
</select>
</div>
<div class="form-group">
<label>Address</label>
<input type="text" class="form-control" name="address" id="address" required="true"
placeholder="Address">
</div>
<div class="form-group">
<label>Message</label>
66
<textarea class="form-control" name="message" required> </textarea>
</div>
<div class="form-group">
<label>Password</label>
<input type="password" class="form-control" name="password" id="password" required="">
</div>
</div>
</section>
<!-- //about -->
<?php include('includes/footer.php');?>
67
<!-- necessary snippets for few javascript files -->
<script src="js/medic.js"></script>
<script src="js/bootstrap.js"></script>
<!-- Necessary-JavaScript-File-For-Bootstrap -->
</body>
</html>
6. Contact-Blood
<?php
session_start();
error_reporting(0);
include('includes/config.php');
if(isset($_POST['send']))
{
$cid=$_GET['cid'];
$name=$_POST['fullname'];
$email=$_POST['email'];
$contactno=$_POST['contactno'];
$brf=$_POST['brf'];
$message=$_POST['message'];
$sql="INSERT INTO tblbloodrequirer(BloodDonarID,name,EmailId,ContactNumber,BloodRequirefor,Message)
VALUES(:cid,:name,:email,:contactno,:brf,:message)";
$query = $dbh->prepare($sql);
$query->bindParam(':cid',$cid,PDO::PARAM_STR);
$query->bindParam(':name',$name,PDO::PARAM_STR);
$query->bindParam(':email',$email,PDO::PARAM_STR);
$query->bindParam(':contactno',$contactno,PDO::PARAM_STR);
$query->bindParam(':brf',$brf,PDO::PARAM_STR);
$query->bindParam(':message',$message,PDO::PARAM_STR);
$query->execute();
$lastInsertId = $dbh->lastInsertId();
if($lastInsertId)
{
}
?>
<!DOCTYPE html>
<html lang="zxx">
<head>
<title>Blood Bank Donar Management System | Blood Requerer </title>
<!-- Meta tag Keywords -->
<script>
addEventListener("load", function () {
setTimeout(hideURLbar, 0);
}, false);
68
function hideURLbar() {
window.scrollTo(0, 1);
}
</script>
<!--// Meta tag Keywords -->
</head>
<body>
<?php include('includes/header.php');?>
</div>
<!-- //banner 2 -->
</div>
<!-- page details -->
<div class="breadcrumb-agile">
<div aria-label="breadcrumb">
<ol class="breadcrumb">
<li class="breadcrumb-item">
<a href="index.php">Home</a>
</li>
<li class="breadcrumb-item active" aria-current="page">Blood Needed Person</li>
</ol>
</div>
</div>
<!-- //page details -->
69
<div class="col-lg-5 w3_agileits-contact-left">
</div>
<div class="col-lg-7 contact-right-w3l">
<h5 class="title-w3 text-center mb-5"><h5 class="title-w3 text-center mb-5">Fill following form for
blood</h5></h5>
<form action="#" method="post">
<div class="d-flex space-d-flex">
<div class="form-group grid-inputs">
<label for="recipient-name" class="col-form-label">Your Name</label>
<input type="text" class="form-control" id="name" name="fullname" placeholder="Please enter your
name.">
</div>
<div class="form-group grid-inputs">
<label for="recipient-name" class="col-form-label">Phone Number</label>
<input type="tel" class="form-control" id="phone" name="contactno" placeholder="Please enter your
phone number.">
</div>
</div>
<div class="form-group">
<label for="recipient-name" class="col-form-label">Message</label>
<textarea rows="10" cols="100" class="form-control" id="message" name="message" placeholder="Please
enter your message" maxlength="999" style="resize:none"></textarea>
</div>
<div class="form-group">
<input type="submit" value="Send Message" name="send">
</div>
</form>
</div>
</div>
</div>
</div>
<!-- //contact -->
<?php include('includes/footer.php');?>
70
<!-- Default-JavaScript-File -->
<script src="js/bootstrap.js"></script>
<!-- Necessary-JavaScript-File-For-Bootstrap -->
</body>
</html>
7. Change Password
<?php
session_start();
error_reporting(0);
include('includes/config.php');
if (strlen($_SESSION['bbdmsdid']==0)) {
header('location:logout.php');
} else{
if(isset($_POST['change']))
{
$uid=$_SESSION['bbdmsdid'];
$cpassword=md5($_POST['currentpassword']);
$newpassword=md5($_POST['newpassword']);
$sql ="SELECT ID FROM tblblooddonars WHERE id=:uid and Password=:cpassword";
71
$query= $dbh -> prepare($sql);
$query-> bindParam(':uid', $uid, PDO::PARAM_STR);
$query-> bindParam(':cpassword', $cpassword, PDO::PARAM_STR);
$query-> execute();
$results = $query -> fetchAll(PDO::FETCH_OBJ);
}
}
?>
<!DOCTYPE html>
<html lang="zxx">
<head>
<title>Blood Bank Donar Management System !! Change Password</title>
<script>
addEventListener("load", function () {
setTimeout(hideURLbar, 0);
}, false);
function hideURLbar() {
window.scrollTo(0, 1);
}
</script>
<script type="text/javascript">
function checkpass()
{
if(document.changepassword.newpassword.value!=document.changepassword.confirmpassword.value)
{
alert('New Password and Confirm Password field does not match');
document.changepassword.confirmpassword.focus();
return false;
}
return true;
}
</script>
72
<link
href="//fonts.googleapis.com/css?family=Open+Sans:300,300i,400,400i,600,600i,700,700i,800,800i&subset=cyrillic,
cyrillic-ext,greek,greek-ext,latin-ext,vietnamese"
rel="stylesheet">
<link
href="//fonts.googleapis.com/css?family=Roboto+Condensed:300,300i,400,400i,700,700i&subset=cyrillic,cyrillic-
ext,greek,greek-ext,latin-ext,vietnamese"
rel="stylesheet">
<!-- //Web-Fonts -->
</head>
<body>
<?php include('includes/header.php');?>
</div>
<!-- //banner 2 -->
</div>
<!-- page details -->
<div class="breadcrumb-agile">
<div aria-label="breadcrumb">
<ol class="breadcrumb">
<li class="breadcrumb-item">
<a href="index.php">Home</a>
</li>
<li class="breadcrumb-item active" aria-current="page">Change Password</li>
</ol>
</div>
</div>
<!-- //page details -->
</div>
<div class="contact-right-w3l appoint-form">
<h5 class="title-w3 text-center mb-5">Reset your password if needed</h5>
<form action="#" method="post" onsubmit="return checkpass();"
name="changepassword">
<div class="form-group">
<label for="recipient-name" class="col-form-label">Current
Password</label>
<input type="password" class="form-control"
name="currentpassword" id="currentpassword"required='true'>
</div>
<div class="form-group">
<label for="recipient-phone" class="col-form-label">New
73
Password</label>
<input type="password" name="newpassword" class="form-
control" required="true">
</div>
<div class="form-group">
<label for="recipient-phone" class="col-form-label">Confirm
Password</label>
<input type="password" class="form-control"
name="confirmpassword" id="confirmpassword" required='true'>
</div>
<?php include('includes/footer.php');?>
<!-- Js files -->
<!-- JavaScript -->
<script src="js/jquery-2.2.3.min.js"></script>
<!-- Default-JavaScript-File -->
<!--start-date-piker-->
<link rel="stylesheet" href="css/jquery-ui.css" />
<script src="js/jquery-ui.js"></script>
<script>
$(function () {
$("#datepicker,#datepicker1").datepicker();
});
</script>
<!-- //End-date-piker -->
<script src="js/bootstrap.js"></script>
<!-- Necessary-JavaScript-File-For-Bootstrap -->
</body>
</html><?php } ?>
8. Admin Index
<?php
session_start();
74
include('includes/config.php');
if(isset($_POST['login']))
{
$username=$_POST['username'];
$password=md5($_POST['password']);
$sql ="SELECT UserName,Password FROM tbladmin WHERE UserName=:username and Password=:password";
$query= $dbh -> prepare($sql);
$query-> bindParam(':username', $username, PDO::PARAM_STR);
$query-> bindParam(':password', $password, PDO::PARAM_STR);
$query-> execute();
$results=$query->fetchAll(PDO::FETCH_OBJ);
if($query->rowCount() > 0)
{
$_SESSION['alogin']=$_POST['username'];
echo "<script type='text/javascript'> document.location = 'dashboard.php'; </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="">
<body>
75
name="username" class="form-control mb">
</body>
</html>
9. Database config
<?php
// DB credentials.
define('DB_HOST','localhost');
define('DB_USER','root');
define('DB_PASS','');
define('DB_NAME','bbdms');
// Establish database connection.
try
{
$dbh = new PDO("mysql:host=".DB_HOST.";dbname=".DB_NAME,DB_USER,
DB_PASS,array(PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES 'utf8'"));
}
catch (PDOException $e)
{
exit("Error: " . $e->getMessage());
}
?>
76
10. Header
<div class="brand clearfix">
<a href="dashboard.php" style="font-size: 20px; padding-top:1%; color:#fff">BloodBank & Donor Management System
</a>
<span class="menu-btn"><i class="fa fa-bars"></i></span>
<ul class="ts-profile-nav">
<li class="ts-account">
<a href="#"><img src="img/ts-avatar.jpg" class="ts-avatar hidden-side" alt=""> Account <i
class="fa fa-angle-down hidden-side"></i></a>
<ul><li><a href="profile.php">Profile</a></li>
<li><a href="change-password.php">Change Password</a></li>
<li><a href="logout.php">Logout</a></li>
</ul>
</li>
</ul>
</div>
11. Footer
<li class="ts-account">
<a href="#"><img src="img/ts-avatar.jpg" class="ts-avatar hidden-side" alt=""> Account <i
class="fa fa-angle-down hidden-side"></i></a>
<ul><li><a href="profile.php">Profile</a></li>
<li><a href="change-password.php">Change Password</a></li>
<li><a href="logout.php">Logout</a></li>
</ul>
</li>
</ul>
</div>
<?php
session_start();
error_reporting(0);
include('includes/config.php');
if(strlen($_SESSION['alogin'])==0)
{
header('location:index.php');
}
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">
77
<meta name="description" content="">
<meta name="author" content="">
<meta name="theme-color" content="#3e454c">
<body>
<?php include('includes/header.php');?>
<div class="ts-main-content">
<?php include('includes/leftbar.php');?>
<div class="content-wrapper">
<div class="container-fluid">
<div class="row">
<div class="col-md-12">
<h2 class="page-title">Dashboard</h2>
<div class="row">
<div class="col-md-12">
<div class="row">
<div class="col-md-4">
<div class="panel panel-default">
<div class="panel-body bk-
primary text-light">
<div class="stat-panel
text-center">
<?php
$sql ="SELECT id from tblbloodgroup ";
$query = $dbh -> prepare($sql);
$query->execute();
$results=$query->fetchAll(PDO::FETCH_OBJ);
$bg=$query->rowCount();
?>
<div
class="stat-panel-number h1 "><?php echo htmlentities($bg);?></div>
<div
class="stat-panel-title text-uppercase">Listed Blood Groups</div>
</div>
</div>
<a href="manage-
bloodgroup.php" class="block-anchor panel-footer">Full Detail <i class="fa fa-arrow-right"></i></a>
78
</div>
</div>
<div class="col-md-4">
<div class="panel panel-default">
<div class="panel-body bk-
success text-light">
<div class="stat-panel
text-center">
<?php
$sql1 ="SELECT id from tblblooddonars ";
$query1 = $dbh -> prepare($sql1);;
$query1->execute();
$results1=$query1->fetchAll(PDO::FETCH_OBJ);
$regbd=$query1->rowCount();
?>
<div
class="stat-panel-number h1 "><?php echo htmlentities($regbd);?></div>
<div
class="stat-panel-title text-uppercase">Registered Blood Group</div>
</div>
</div>
<a href="donor-list.php"
class="block-anchor panel-footer text-center">Full Detail <i class="fa fa-arrow-right"></i></a>
</div>
</div>
<div class="col-md-4">
<div class="panel panel-default">
<div class="panel-body bk-info
text-light">
<div class="stat-panel
text-center">
<?php
$sql6 ="SELECT id from tblcontactusquery ";
$query6 = $dbh -> prepare($sql6);;
$query6->execute();
$results6=$query6->fetchAll(PDO::FETCH_OBJ);
$query=$query6->rowCount();
?>
<div
class="stat-panel-number h1 "><?php echo htmlentities($query);?></div>
<div
class="stat-panel-title text-uppercase">Total Quries</div>
</div>
</div>
<a href="manage-
conactusquery.php" class="block-anchor panel-footer text-center">Full Detail <i class="fa fa-arrow-right"></i></a>
</div>
</div>
<!------------------------>
<div class="col-md-4">
<div class="panel panel-danger">
<div class="panel-body bk-info
text-light">
<div class="stat-panel
text-center">
<?php
$sql6 ="SELECT ID from tblbloodrequirer ";
$query6 = $dbh -> prepare($sql6);;
$query6->execute();
$results6=$query6->fetchAll(PDO::FETCH_OBJ);
$totalreuqests=$query6->rowCount();
79
?>
<div
class="stat-panel-number h1 "><?php echo htmlentities($totalreuqests);?></div>
<div
class="stat-panel-title text-uppercase">Total Blood Request Received</div>
</div>
</div>
<a href="requests-received.php"
class="block-anchor panel-footer text-center">Full Detail <i class="fa fa-arrow-right"></i></a>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<script>
window.onload = function(){
80
responsive: true,
scaleShowVerticalLines: false,
scaleBeginAtZero : true,
multiTooltipTemplate: "<%if (label){%><%=label%>: <%}%><%= value %>",
});
}
</script>
</body>
</html>
<?php } ?>
<?php
session_start();
error_reporting(0);
include('includes/config.php');
if(strlen($_SESSION['alogin'])==0)
{
header('location:index.php');
}
else{
if(isset($_REQUEST['hidden']))
{
$eid=intval($_GET['hidden']);
$status="0";
$sql = "UPDATE tblblooddonars SET Status=:status WHERE id=:eid";
$query = $dbh->prepare($sql);
$query -> bindParam(':status',$status, PDO::PARAM_STR);
$query-> bindParam(':eid',$eid, PDO::PARAM_STR);
$query -> execute();
if(isset($_REQUEST['public']))
{
$aeid=intval($_GET['public']);
$status=1;
81
//Code for Deletion
if(isset($_REQUEST['del']))
{
$did=intval($_GET['del']);
$sql = "delete from tblblooddonars WHERE id=:did";
$query = $dbh->prepare($sql);
$query-> bindParam(':did',$did, PDO::PARAM_STR);
$query -> execute();
?>
<!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">
82
</head>
<body>
<?php include('includes/header.php');?>
<div class="ts-main-content">
<?php include('includes/leftbar.php');?>
<div class="content-wrapper">
<div class="container-fluid">
<div class="row">
<div class="col-md-12">
83
$query = $dbh -> prepare($sql);
$query->execute();
$results=$query->fetchAll(PDO::FETCH_OBJ);
$cnt=1;
if($query->rowCount() > 0)
{
foreach($results as $result)
{ ?>
<tr>
<td><?php echo
htmlentities($cnt);?></td>
<td><?php echo
htmlentities($result->FullName);?></td>
<td><?php echo
htmlentities($result->MobileNumber);?></td>
<td><?php echo
htmlentities($result->EmailId);?></td>
<td><?php echo
htmlentities($result->Gender);?></td>
<td><?php echo
htmlentities($result->Age);?></td>
<td><?php echo
htmlentities($result->BloodGroup);?></td>
<td><?php echo
htmlentities($result->Address);?></td>
<td><?php echo
htmlentities($result->Message);?></td>
<td>
<?php if($result->status==1)
{?>
<a href="donor-list.php?hidden=<?php echo htmlentities($result->id);?>" onclick="return confirm('Do you really want to hiidden
this detail')" class="btn btn-primary"> Make it Hidden</a>
<?php } else {?>
<a href="donor-list.php?public=<?php echo htmlentities($result->id);?>" onclick="return confirm('Do you really want to Public
this detail')" class="btn btn-primary"> Make it Public</a>
<?php } ?>
<a href="donor-list.php?del=<?php echo htmlentities($result->id);?>" onclick="return confirm('Do you really want to delete this
record')" class="btn btn-danger" style="margin-top:1%;"> Delete</a>
</td>
</tr>
<?php $cnt=$cnt+1; }} ?>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
84
</div>
</div>
Record
<?php
session_start();
//error_reporting(0);
session_regenerate_id(true);
include('includes/config.php');
if(strlen($_SESSION['alogin'])==0)
{
header("Location: index.php"); //
}
else{?>
<table border="1">
<thead>
<tr>
<th>#</th>
<th>Name</th>
<th>Mobile No</th>
<th>Email</th>
<th>Age</th>
<th>Gender</th>
<th>Blood Group</th>
<th>address</th>
<th>Message </th>
<th>posting date </th>
</tr>
</thead>
<?php
$filename="Donor list";
$sql = "SELECT * from tblblooddonars ";
$query = $dbh -> prepare($sql);
$query->execute();
$results=$query->fetchAll(PDO::FETCH_OBJ);
$cnt=1;
if($query->rowCount() > 0)
{
foreach($results as $result)
{
echo '
<tr>
85
<td>'.$cnt.'</td>
<td>'.$complainNumber= $result->FullName.'</td>
<td>'. $MobileNumber= $result->MobileNumber.'</td>
<td>'.$EmailId= $result->EmailId.'</td>
<td>'.$Gender= $result->Gender.'</td>
<td>'.$Age= $result->Age.'</td>
<td>'.$BloodGroup=$result->BloodGroup.'</td>
<td>'.$BloodGroup=$result->Address.'</td>
<td>'.$BloodGroup=$result->Message.'</td>
<td>'.$BloodGroup=$result->PostingDate.'</td>
</tr>
';
header("Content-type: application/octet-stream");
header("Content-Disposition: attachment; filename=".$filename."-report.xls");
header("Pragma: no-cache");
header("Expires: 0");
$cnt++;
}
}
?>
</table>
<?php } ?>
forgetpassword
<?php
session_start();
include('includes/config.php');
if(isset($_POST['submit']))
{
$email=$_POST['email'];
$mobile=$_POST['mobile'];
$newpassword=md5($_POST['newpassword']);
$sql ="SELECT Email FROM tbladmin WHERE Email=:email and MobileNumber=:mobile";
$query= $dbh -> prepare($sql);
$query-> bindParam(':email', $email, PDO::PARAM_STR);
$query-> bindParam(':mobile', $mobile, PDO::PARAM_STR);
$query-> execute();
$results = $query -> fetchAll(PDO::FETCH_OBJ);
if($query -> rowCount() > 0)
{
$con="update tbladmin set Password=:newpassword where Email=:email and MobileNumber=:mobile";
$chngpwd1 = $dbh->prepare($con);
$chngpwd1-> bindParam(':email', $email, PDO::PARAM_STR);
$chngpwd1-> bindParam(':mobile', $mobile, PDO::PARAM_STR);
$chngpwd1-> bindParam(':newpassword', $newpassword, PDO::PARAM_STR);
$chngpwd1->execute();
echo "<script>alert('Your Password succesfully changed');</script>";
}
else {
echo "<script>alert('Email id or Mobile no is invalid');</script>";
}
}
?>
<!doctype html>
<html lang="en" class="no-js">
<head>
<meta charset="UTF-8">
86
<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="">
<body>
87
<input class="form-control mb" type="password"
name="confirmpassword" placeholder="Confirm Password" required="true" />
</body>
</html>
logout
<?php
session_start();
include('includes/config.php');
if(isset($_POST['submit']))
{
$email=$_POST['email'];
$mobile=$_POST['mobile'];
$newpassword=md5($_POST['newpassword']);
$sql ="SELECT Email FROM tbladmin WHERE Email=:email and MobileNumber=:mobile";
$query= $dbh -> prepare($sql);
$query-> bindParam(':email', $email, PDO::PARAM_STR);
$query-> bindParam(':mobile', $mobile, PDO::PARAM_STR);
$query-> execute();
$results = $query -> fetchAll(PDO::FETCH_OBJ);
if($query -> rowCount() > 0)
{
$con="update tbladmin set Password=:newpassword where Email=:email and MobileNumber=:mobile";
$chngpwd1 = $dbh->prepare($con);
$chngpwd1-> bindParam(':email', $email, PDO::PARAM_STR);
$chngpwd1-> bindParam(':mobile', $mobile, PDO::PARAM_STR);
88
else {
echo "<script>alert('Email id or Mobile no is invalid');</script>";
}
}
?>
<!doctype html>
<html lang="en" class="no-js">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<body>
89
<input type="text" class="form-control mb"
name="mobile" placeholder="Mobile Number" required="true" maxlength="10" pattern="[0-9]+">
</body>
</html>
MANAGE BLOODGROUP
<?php
session_start();
include('includes/config.php');
if(isset($_POST['submit']))
{
$email=$_POST['email'];
$mobile=$_POST['mobile'];
$newpassword=md5($_POST['newpassword']);
$sql ="SELECT Email FROM tbladmin WHERE Email=:email and MobileNumber=:mobile";
$query= $dbh -> prepare($sql);
$query-> bindParam(':email', $email, PDO::PARAM_STR);
$query-> bindParam(':mobile', $mobile, PDO::PARAM_STR);
$query-> execute();
$results = $query -> fetchAll(PDO::FETCH_OBJ);
90
if($query -> rowCount() > 0)
{
$con="update tbladmin set Password=:newpassword where Email=:email and MobileNumber=:mobile";
$chngpwd1 = $dbh->prepare($con);
$chngpwd1-> bindParam(':email', $email, PDO::PARAM_STR);
$chngpwd1-> bindParam(':mobile', $mobile, PDO::PARAM_STR);
$chngpwd1-> bindParam(':newpassword', $newpassword, PDO::PARAM_STR);
$chngpwd1->execute();
echo "<script>alert('Your Password succesfully changed');</script>";
}
else {
echo "<script>alert('Email id or Mobile no is invalid');</script>";
}
}
?>
<!doctype html>
<html lang="en" class="no-js">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<body>
91
checkpass();">
</body>
</html>
MANAGE CONSEQUENT
<?php
session_start();
error_reporting(0);
include('includes/config.php');
if(strlen($_SESSION['alogin'])==0)
92
{
header('location:index.php');
}
else{
if(isset($_REQUEST['eid']))
{
$eid=intval($_GET['eid']);
$status=1;
$sql = "UPDATE tblcontactusquery SET status=:status WHERE id=:eid";
$query = $dbh->prepare($sql);
$query -> bindParam(':status',$status, PDO::PARAM_STR);
$query-> bindParam(':eid',$eid, PDO::PARAM_STR);
$query -> execute();
if(isset($_REQUEST['del']))
{
$did=intval($_GET['del']);
$sql = "delete from tblcontactusquery WHERE id=:did";
$query = $dbh->prepare($sql);
$query-> bindParam(':did',$did, PDO::PARAM_STR);
$query -> execute();
?>
<!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">
93
<style>
.errorWrap {
padding: 10px;
margin: 0 0 20px 0;
background: #fff;
border-left: 4px solid #dd3d36;
-webkit-box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);
box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);
}
.succWrap{
padding: 10px;
margin: 0 0 20px 0;
background: #fff;
border-left: 4px solid #5cb85c;
-webkit-box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);
box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);
}
</style>
</head>
<body>
<?php include('includes/header.php');?>
<div class="ts-main-content">
<?php include('includes/leftbar.php');?>
<div class="content-wrapper">
<div class="container-fluid">
<div class="row">
<div class="col-md-12">
94
<th>Message</th>
<th>Posting date</th>
<th>Action</th>
</tr>
</tr>
</tfoot>
<tbody>
<td><?php echo
htmlentities($result->ContactNumber);?></td>
<td><?php echo
htmlentities($result->Message);?></td>
<td><?php echo
htmlentities($result->PostingDate);?></td>
<?php if($result->status==1)
{
?><td>Read<br /> |
<a href="manage-conactusquery.php?del=<?php echo htmlentities($result->id);?>" onclick="return confirm('Do
you really want to Delete?')" >Delete</a></td>
<?php } else {?>
</tbody>
</table>
</div>
</div>
</div>
</div>
95
</div>
</div>
</div>
}
?>
<!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">
96
<!-- Font awesome -->
<link rel="stylesheet" href="css/font-awesome.min.css">
<!-- Sandstone Bootstrap CSS -->
<link rel="stylesheet" href="css/bootstrap.min.css">
<!-- Bootstrap Datatables -->
<link rel="stylesheet" href="css/dataTables.bootstrap.min.css">
<!-- Bootstrap social button library -->
<link rel="stylesheet" href="css/bootstrap-social.css">
<!-- Bootstrap select -->
<link rel="stylesheet" href="css/bootstrap-select.css">
<!-- Bootstrap file input -->
<link rel="stylesheet" href="css/fileinput.min.css">
<!-- Awesome Bootstrap checkbox -->
<link rel="stylesheet" href="css/awesome-bootstrap-checkbox.css">
<!-- Admin Stye -->
<link rel="stylesheet" href="css/style.css">
<style>
.errorWrap {
padding: 10px;
margin: 0 0 20px 0;
background: #fff;
border-left: 4px solid #dd3d36;
-webkit-box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);
box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);
}
.succWrap{
padding: 10px;
margin: 0 0 20px 0;
background: #fff;
border-left: 4px solid #5cb85c;
-webkit-box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);
box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);
}
</style>
</head>
<body>
<?php include('includes/header.php');?>
<div class="ts-main-content">
<?php include('includes/leftbar.php');?>
<div class="content-wrapper">
<div class="container-fluid">
<div class="row">
<div class="col-md-12">
<div class="row">
<div class="col-md-10">
<div class="panel panel-default">
<div class="panel-heading">Form fields</div>
<div class="panel-body">
<form method="post" class="form-
horizontal" onSubmit="return valid();">
97
<?php
<div class="hr-dashed"></div>
<div class="form-group">
<label class="col-sm-4
control-label">Admin Name</label>
<div class="col-sm-8">
<input
type="text" name="adminname" value="<?php echo $row->AdminName;?>" class="form-control" required='true'>
</div>
</div>
<div class="hr-dashed"></div>
<div class="form-group">
<label class="col-sm-4
control-label">User Name</label>
<div class="col-sm-8">
<input
type="text" name="username" value="<?php echo $row->UserName;?>" class="form-control" readonly="">
</div>
</div>
<div class="hr-dashed"></div>
<div class="form-group">
<label class="col-sm-4
control-label">Contact Number</label>
<div class="col-sm-8">
<input
type="text" name="mobilenumber" value="<?php echo $row->MobileNumber;?>" class="form-control" maxlength='10'
required='true' pattern="[0-9]+">
</div>
</div>
<div class="hr-dashed"></div>
<div class="form-group">
<label class="col-sm-4
control-label">Email</label>
<div class="col-sm-8">
<input
type="email" name="email" value="<?php echo $row->Email;?>" class="form-control" required='true'>
</div>
</div>
<div class="hr-dashed"></div>
<div class="hr-dashed"></div>
<div class="form-group">
<label class="col-sm-4
control-label">Admin Registration Date</label>
<div class="col-sm-8">
<input
type="text" name="" value="<?php echo $row->AdminRegdate;?>" readonly="" class="form-control">
</div>
98
</div>
<div class="hr-dashed"></div>
<?php $cnt=$cnt+1;}} ?>
<div class="form-group">
<div class="col-sm-8
col-sm-offset-4">
<button
class="btn btn-primary" name="submit" type="submit">Save changes</button>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>
<?php } ?>
REQUEST RECEIVED
<?php
session_start();
error_reporting(0);
include('includes/config.php');
if(strlen($_SESSION['alogin'])==0)
{
header('location:index.php');
}
else{
?>
<!doctype html>
99
<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">
</head>
<body>
<?php include('includes/header.php');?>
<div class="ts-main-content">
<?php include('includes/leftbar.php');?>
<div class="content-wrapper">
<div class="container-fluid">
<div class="panel-body">
<form method="post" name="search"
100
class="form-horizontal" onSubmit="return valid();">
<div class="form-group">
<label class="col-sm-4
control-label">Search by Donor or Requirer Name / Phone Number</label>
<div class="col-sm-8">
<input
type="text" class="form-control" name="searchdata" id="searchdata" required>
</div>
</div>
<div class="hr-dashed"></div>
<div class="form-group">
<div class="col-sm-8
col-sm-offset-4">
<button
class="btn btn-primary" name="search" type="submit">Search</button>
</div>
</div>
</form>
</div>
<div class="col-md-12">
<?php
if(isset($_POST['search']))
{
$sdata=$_POST['searchdata'];
?>
<h4 align="center">Result against "<?php echo $sdata;?>" keyword </h4>
<tbody>
<tr><?php
$sql="SELECT
101
tblbloodrequirer.BloodDonarID,tblbloodrequirer.name,tblbloodrequirer.EmailId,tblbloodrequirer.ContactNumber,tblbloodrequirer.
BloodRequirefor,tblbloodrequirer.Message,tblbloodrequirer.ApplyDate,tblblooddonars.id as
donid,tblblooddonars.FullName,tblblooddonars.MobileNumber from tblbloodrequirer join tblblooddonars on
tblblooddonars.id=tblbloodrequirer.BloodDonarID where tblblooddonars.FullName like '%$sdata%' ||
tblblooddonars.MobileNumber like '%$sdata%' || tblbloodrequirer.name like '%$sdata%' || tblbloodrequirer.ContactNumber like
'%$sdata%'";
$query = $dbh -> prepare($sql);
$query->execute();
$results=$query->fetchAll(PDO::FETCH_OBJ);
$cnt=1;
if($query->rowCount() > 0)
{
foreach($results as $row)
{ ?>
<td><?php echo htmlentities($cnt);?></td>
<td><?php echo htmlentities($row->FullName);?></td>
<td><?php echo htmlentities($row->MobileNumber);?></td>
<td><?php echo htmlentities($row->name);?></td>
<td><?php echo htmlentities($row->ContactNumber);?></td>
<td><?php echo htmlentities($row->EmailId);?></td>
<td><?php echo htmlentities($row->BloodRequirefor);?></td>
<td>
<?php echo htmlentities($row->ApplyDate);?>
</td>
</tr>
<?php $cnt=$cnt+1;}} else {?>
<tr>
<th colspan="8" style="color:red;"> No Record found</th>
</tr>
<?php } }?>
</tbody>
</table></div>
</div</div>
</div>
</div>
<script src="js/chartData.js"></script>
<script src="js/main.js"></script>
</body>
</html>
<?php } ?>
102
} SYSTEM TESTING
System testing is the stage before system implementation where the system is made
error free and all the needed modifications are made. The system was tested with test
data and necessary corrections to the system were carried out. All the reports were
checked by the user and approved. The system was very user friendly with online help
to assist the user wherever necessary.
Test Plan:
A test plan is a general document for the entire project, which defines the scope,
approach to be taken, and schedule of testing, as well as identifying the test item for
the entire testing process, and the personal responsible for the different activities of
testing. This document describes the plan for testing, the knowledge management tool.
❑ Test units
❑ Features to be tested
❑ Test deliverables
❑ Schedule
❑ Personal allocation
Test units:
Test Case specification is major activity in the testing process. In this project, I have
performed two levels of testing.
❑ Unit testing
❑ System testing
103
▪ Exception handling
Alpha Testing:
This was done at the developer’s site by a customer. The software is used in a natural
setting with the developer “looking over the shoulder” of the user and recording errors
and usage problems. Alpha tests are conducted in a controlled environment.
Beta Testing:
This was conducted at one or more customer sites by the end-user of the software.
Unlike alpha testing, the developer is generally not present. Therefore, the beta test is
a “live” application of the software in an environment that cannot be controlled by the
developer. The customer records all problems that are encountered during beta testing
and reports these to the developer at regular intervals. As a result of problems
reported during beta tests, software engineers make modifications and then prepare for
release of the software product to the entire customer base.
Test deliverables:
▪ Error report
The test case specification for system testing has to be submitted for review before the
system testing commences.
104
IMPLEMENTATION AND EVALUATION
During the software-testing phase each module of software is thoroughly tested for
bugs and for accuracy of output. The system developed is very user-friendly and the
detailed documentation is also given to the user as online help wherever necessary.
The implementation phase normally ends with the formal test involving all the
components.
The entire system was developed using the PHP, HTML, JavaScript, Personal Web
Server, and MYSQL as back end. The HTML is used to design the web page. The
Personal Web Server is used to understand the client’s request and to send response to
them. The JAVASCRIPT are used for client-side validations so that the user can enter
only appropriate input in the input fields. The MYSQL is the back end tool where the
database resides.
Hence the design of the entire system is user-friendly and simple the implementation
has been quite easy.
105
CONCLUSION AND FUTURE
ENHANCEMENT
This project has given me an ample opportunity to design, code, and test and
implements an application. This has helped in putting into practice of various
Software Engineering principles and Database Management concepts like maintaining
integrity and consistency of data. Further, this has helped me to learn more about
MYSQL, PHP, HTML, JAVASCRIPT, Adobe Photoshop 7.0 and Personal Web
Server.
Extensibility:
The other features, which the Blood bank services provide, can also be incorporated
into this Blood Bank. The Encryption standards can also be used to make the
transactions more secure. The Socket Secure Layer protocol can also used in
implementing the system, which gives highest security in the Internet.
Future Enhancement:
As there was a little number of contact person’s information given, some people may
face difficulty in getting blood fast. So i like to gather more information regarding the
contact persons in other cities as well as villages and will provide much more services
for the people and help everyone with humanity.
106
BIBLIOGRAPHY
✓
✓ PHP and MySQL web development
✓
✓ The complete reference PHP
www.php.net
www.tutorialpoints.com
www.w3school.com
107