You are on page 1of 91

lOMoARcPSD|38151647

Blood Bank And Donor Management Report php

Software Project Management (Vivekanandha College of Technology for Women)

Scan to open on Studocu

Studocu is not sponsored or endorsed by any college or university


Downloaded by CHETHAN E U (chethanchethueu11@gmail.com)
lOMoARcPSD|38151647

Table of Contents

Page No.

Chapter 1. Introduction

1) Introduction to the System 4


2) Problem Definition 4
3) Aim 4
4) Objective 4
5) Goal 5
6) Need of System 5

Chapter 2. Hardware and Software requirement

1) Introduction 7
2) System environment 7
3) Software requirement 8
4) Hardware requirements 8

Chapter 3. System Analysis

1) Purpose 9
2) Project Scope 9
3) Existing System 9
4) Proposed System 9

Page 1

Downloaded by CHETHAN E U (chethanchethueu11@gmail.com)


lOMoARcPSD|38151647

5) System Description 10

Chapter 4.Implementation issues

1) PHP 11
2) HTML 12
3) CSS 13
4) Javascript 14
5) Mysql 15
Chapter 5. System Design
1) Introduction 21
2) Conceptual Design 22
3) ER-Diagram 23
4) Logical Design 23
5) Physical Design 24
6) Data Flow Diagram of “BloodBank Management” 24

Chapter 6.User Screens


25-32

Chapter 7.Coding
33-85

Chapter 8. Conclusion
7) Features of “BloodBank Management” 86
8) Benefits Accrued from “BloodBank Management” 87
9) Limitations of “BloodBank Management” 88

Page 2

Downloaded by CHETHAN E U (chethanchethueu11@gmail.com)


lOMoARcPSD|38151647

Bibliography

CHAPTER # 1
Introduction
Contents:

 Introduction
 Problem Definition
 Aim
 Objective
 Goal
 Need of System

Page 3

Downloaded by CHETHAN E U (chethanchethueu11@gmail.com)


lOMoARcPSD|38151647

Introduction to the System:

Blood Bank and Donor Management system is a web based application on PHP language and
Mysql database. The purpose of this project was to develop a blood donor management
information system to assist in the management of blood donor records and blood group
records. And this project also helpful for searching blood donor according to location and
blood group. This project includes mainly two modules i.e. admin and visitor.
The current system is manual and it is time-consuming. It is also cost-ineffective, and the
average return is low and diminishing.

Objective:

This software helps to easy management of records such as management of blood donors,
blood groups and also helpful for seekers to searching donor.

Page 4

Downloaded by CHETHAN E U (chethanchethueu11@gmail.com)


lOMoARcPSD|38151647

Goal:

The project is basically targeted at those people who would like online management software.
To make a database that is consistent, reliable and secure.
To provide correct, complete and ongoing information.
To develop a well-organized information storage system.
To make good documentation so as to facilitate possible future enhancements.

Need of the System:


There is always a need of a system that will help in blood bank to manage information of
donors of a corresponding blood group.

Page 5

Downloaded by CHETHAN E U (chethanchethueu11@gmail.com)


lOMoARcPSD|38151647

CHAPTER # 2
Hardware and
Software
Requirements

Software Requirements:

 Microsoft Windows 7/8/10 or Linux.

 XAMPP (MySQL, Apache, PHP).

 Notepad++ or any other text editor.

 Chrome or any other browser.

Hardware Requirements:

 Intel Processor 2.0 GHz or above.

 2 GB RAM or more.

 160 GB or more Hard Disk Drive or above.

Page 6

Downloaded by CHETHAN E U (chethanchethueu11@gmail.com)


lOMoARcPSD|38151647

CHAPTER # 3
System Analysis

Contents:

 Purpose
 Project Scope
 Existing System
 Proposed System
 System Overview

Page 7

Downloaded by CHETHAN E U (chethanchethueu11@gmail.com)


lOMoARcPSD|38151647

Purpose:

The purpose of this project is to provide a way to manage the donor’s detail and also helpful
for website visitors in searching donor according to location and blood group, and also
provide an easy interface for management.

Project Scope:

The project has a wide scope, as it is not intended to a particular organization. This
project is going to develop generic software, which can be applied by any businesses
organization. More over it provides facility to its users. Also the software is going to
provide a huge amount of summary data.

Proposed System:

The blood bank management system is available in the market that can serve blood
bank owners to easily manage blood donor’s records and also helpful for blood seekers
for searching blood donors.

Page 8

Downloaded by CHETHAN E U (chethanchethueu11@gmail.com)


lOMoARcPSD|38151647

System Overview:
The key features required in the system are as follows:

Visitor Feature’s (Front end):

 Responsive Template, Mobile Friendly


 Easy to use
 Blood Donor Registration System
 Blood Group and location-based search engine
 Donor Details Information
 Contact us Inquiry

Admin Feature’s (Administration Section):

 Manage Blood Group(add, delete)


 Add and Delete Donor Information
 Enable and Disable Donors
 Manage Website Pages
 Manage to Contact us Queries
 Update the contact us Info
 Admin Dashboard

Page 9

Downloaded by CHETHAN E U (chethanchethueu11@gmail.com)


lOMoARcPSD|38151647

CHAPTER # 4
Implementation issues

PHP

PHP can be defined as a programming language for Database access from the web's browser.
In other words, it is an HTML-embedded scripting language. It focuses on the logic of how a
page responds to user input and not how the page looks that i.e. not the primary appearance
of the page.
PHP runs on the server side, which means that the web server that sends an HTML file to a
user's browser, will carry out the instructions found in the embedded PHP code first, and then
send the output of the PHP code along with the HTML code. The result is a webpage with
dynamic content.

Brief History on PHP:

PHP is a language for creating website that can be more or less interactive. It was created in
1994 by Rasmus Lerdorf who was a software engineer and who was part of the Apache Team.
In the same year, he created a package, added some database support and called it PHP/FI
(Form Interpretation).

Page 10

Downloaded by CHETHAN E U (chethanchethueu11@gmail.com)


lOMoARcPSD|38151647

In 1995, it was called the Personal Home Page Tool then was released as version2 with a
name called PHP/FI (a form interpreter responsible for analyzing queries). In mid of 1997,
more than 50,000 websites began using PHP and in October, 1998, there was an increase in
the number of websites using PHP which was about 100,000.
In 2000, there was a release of PHP 4.0.2. And currently over 1,000,000 sites in the whole
world are using PHP.

HTML

HTML (Hypertext Markup Language) is the set of markup symbols or codes inserted in a file
intended for display on a World Wide Web browser page. The markup tells the Web browser
how to display a Web page's words and images for the user. Each individual markup code is
referred to as an element (but many people also refer to it as a tag). Some elements come in
pairs that indicate when some display effect is to begin and when it is to end.

Page 11

Downloaded by CHETHAN E U (chethanchethueu11@gmail.com)


lOMoARcPSD|38151647

CASCADING STYLE SHEET (CSS)

Cascading Style Sheets (CSS) are a collection of rules we use to define and modify web
pages. CSS are similar to styles in Word. CSS allow Web designers to have much more
control over their pages look and layout. For instance, you could create a style that defines
the body text to be Verdana, 10 point. Later on, you may easily change the body text to Times
New Roman, 12 point by just changing the rule in the CSS. Instead of having to change the
font on each page of your website, all you need to do is redefine the style on the style sheet,
and it will instantly change on all of the pages that the style sheet has been applied to. With
HTML styles, the font change would be applied to each instance of that font and have to be
changed in each spot.

CSS can control the placement of text and objects on your pages as well as the look of those
objects.

HTML information creates the objects (or gives objects meaning), but styles describe how the
objects should appear. The HTML gives your page structure, while the CSS creates the
“presentation”. An external CSS is really just a text file with a .css extension. These files can
be created with Dreamweaver, a CSS editor, or even Notepad.

The best practice is to design your web page on paper first so you know where you will want
to use styles on your page. Then you can create the styles and apply them to your page.

Page 12

Downloaded by CHETHAN E U (chethanchethueu11@gmail.com)


lOMoARcPSD|38151647

Javascript

JavaScript is a programming language commonly used in web development. It was originally


developed by Netscape as a means to add dynamic and interactive elements to websites.
While JavaScript is influenced byJava, the syntax is more similar to C and is based on EC-
MAScript, a scripting language developed by Sun Microsystems.
JavaScript is a client-side scripting language, which means the source code is processed by
the client's web browser rather than on the web server. This means JavaScript functions can
run after a webpage has loaded without COMMUNICATING with the server. For example, a
JavaScript function may check a web form before it is submitted to make sure all the re-
quired fields have been filled out. The JavaScript code can produce an error message before
any information is actually transmitted to the server.
Like server-side scripting languages, such as PHP and ASP, JavaScript code can be inserted
anywhere within the HTML of a webpage. However, only the output of server-side code is
displayed in the HTML, while JavaScript code remains fully visible in the source of the web-
page. It can also be referenced in a separate .JS file, which may also be viewed in a browser.

Page 13

Downloaded by CHETHAN E U (chethanchethueu11@gmail.com)


lOMoARcPSD|38151647

MYSQL

MySQL is the most popular Open Source Relational SQL Database Management System.
MySQL is one of the best RDBMS being used for developing various web-based software
applications. MySQL is developed, marketed and supported by MySQL AB, which is a
Swedish company.

Page 14

Downloaded by CHETHAN E U (chethanchethueu11@gmail.com)


lOMoARcPSD|38151647

CHAPTER # 5
System Design

Contents:
 Use case diagram
 Class Diagram
 Activity Diagram
 Sequence Diagram
 Data flow diagram

Page 15

Downloaded by CHETHAN E U (chethanchethueu11@gmail.com)


lOMoARcPSD|38151647

Use Case Diagram:

 Use case diagram consists of use cases and actors and shows the interaction
between them. The key points are:

 The main purpose is to show the interaction between the use cases and the
actor.

 To represent the system requirement from user’s perspective.

 The use cases are the functions that are to be performed in the module.

Page 16

Downloaded by CHETHAN E U (chethanchethueu11@gmail.com)


lOMoARcPSD|38151647

Fig: Use Case Diagram b/w admin and system

Page 17

Downloaded by CHETHAN E U (chethanchethueu11@gmail.com)


lOMoARcPSD|38151647

Sequence Diagram For Administrator:-

Login Application Database

Login
:Request

:Validate()
:executeQuery()

Administrator Response
Show Result

Success:hide() Failed:show()

Fig.5.4

Page 18

Downloaded by CHETHAN E U (chethanchethueu11@gmail.com)


lOMoARcPSD|38151647

Data Flow Diagram

A Data Flow Diagram (DFD) is a graphical representation of the "flow" of data through an
Information System. A data flow diagram can also be used for the visualization of Data
Processing. It is common practice for a designer to draw a context-level DFD first which
shows the interaction between the system and outside entities. This context-level DFD is then
"exploded" to show more detail of the system being modeled.

A DFD represents flow of data through a system. Data flow diagrams are commonly used
during problem analysis. It views a system as a function that transforms the input into desired
output. A DFD shows movement of data through the different transformations or processes in
the system.

Dataflow diagrams can be used to provide the end user with a physical idea of where the data
they input ultimately has an effect upon the structure of the whole system from order to dis-
patch to restock how any system is developed can be determined through a dataflow diagram.
The appropriate register saved in database and maintained by appropriate authorities.

Data Flow Diagram Notation

Function

File/Database

Input/output

Flow

Page 19

Downloaded by CHETHAN E U (chethanchethueu11@gmail.com)


lOMoARcPSD|38151647

Data Flow Diagram

Page 20

Downloaded by CHETHAN E U (chethanchethueu11@gmail.com)


lOMoARcPSD|38151647

Page 21

Downloaded by CHETHAN E U (chethanchethueu11@gmail.com)


lOMoARcPSD|38151647

ER DIAGRAM

Page 22

Downloaded by CHETHAN E U (chethanchethueu11@gmail.com)


lOMoARcPSD|38151647

CHAPTER # 6
Output Screens

HOME PAGE

Page 23

Downloaded by CHETHAN E U (chethanchethueu11@gmail.com)


lOMoARcPSD|38151647

Become a Donor Page

Page 24

Downloaded by CHETHAN E U (chethanchethueu11@gmail.com)


lOMoARcPSD|38151647

SEARCH DONOR PAGE

Page 25

Downloaded by CHETHAN E U (chethanchethueu11@gmail.com)


lOMoARcPSD|38151647

CONTACT US PAGE

Page 26

Downloaded by CHETHAN E U (chethanchethueu11@gmail.com)


lOMoARcPSD|38151647

Page 27

Downloaded by CHETHAN E U (chethanchethueu11@gmail.com)


lOMoARcPSD|38151647

ADMIN LOGIN PAGE

ADMIN DASHBOARD PAGE

Page 28

Downloaded by CHETHAN E U (chethanchethueu11@gmail.com)


lOMoARcPSD|38151647

ADD BLOODGROUP PAGE

Page 29

Downloaded by CHETHAN E U (chethanchethueu11@gmail.com)


lOMoARcPSD|38151647

Page 30

Downloaded by CHETHAN E U (chethanchethueu11@gmail.com)


lOMoARcPSD|38151647

MANAGE BLOOD GROUP PAGE

Page 31

Downloaded by CHETHAN E U (chethanchethueu11@gmail.com)


lOMoARcPSD|38151647

ADD DONOR PAGE

Page 32

Downloaded by CHETHAN E U (chethanchethueu11@gmail.com)


lOMoARcPSD|38151647

VIEW DONOR LIST PAGE

Page 33

Downloaded by CHETHAN E U (chethanchethueu11@gmail.com)


lOMoARcPSD|38151647

CHAPTER # 7
Coding
HOME PAGE CODING

<?php
error_reporting(0);
include('includes/config.php');
?>
<!DOCTYPE html>
<html lang="en">

<head>

<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-
fit=no">
<meta name="description" content="">
<meta name="author" content="">

<title>BloodBank & Donor Management System</title>


<link href="vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet">
<link href="vendor/font-awesome/css/font-awesome.min.css" rel="stylesheet"
type="text/css">
<link href="css/modern-business.css" rel="stylesheet">
<style>
.navbar-toggler {
z-index: 1;
}

Page 34

Downloaded by CHETHAN E U (chethanchethueu11@gmail.com)


lOMoARcPSD|38151647

@media (max-width: 576px) {


nav > .container {
width: 100%;
}
}
.carousel-item.active,
.carousel-item-next,
.carousel-item-prev {
display: block;
}
</style>

</head>

<body>

<!-- Navigation -->


<?php include('includes/header.php');?>
<?php include('includes/slider.php');?>

<!-- Page Content -->


<div class="container">

<h1 class="my-4">Welcome to BloodBank & Donor Management System</h1>

<!-- Marketing Icons Section -->


<div class="row">
<div class="col-lg-4 mb-4">
<div class="card">
<h4 class="card-header">The need for blood</h4>

<p class="card-text" style="padding-left:2%">Lorem ipsum dolor sit


amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore
Page 35

Downloaded by CHETHAN E U (chethanchethueu11@gmail.com)


lOMoARcPSD|38151647

magna aliqua. </p>


</div>
</div>
<div class="col-lg-4 mb-4">
<div class="card">
<h4 class="card-header">Blood Tips</h4>

<p class="card-text" style="padding-left:2%">Lorem ipsum dolor sit


amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore
magna aliqua. </p>
</div>
</div>
<div class="col-lg-4 mb-4">
<div class="card">
<h4 class="card-header">Who you could Help</h4>

<p class="card-text" style="padding-left:2%">Lorem ipsum dolor sit


amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore
magna aliqua. </p>
</div>
</div>
</div>
<!-- /.row -->

<!-- Portfolio Section -->


<h2>Some of the Donar</h2>

<div class="row">
<?php
$status=1;
$sql = "SELECT * from tblblooddonars where status=:status order by rand() limit 6";
$query = $dbh -> prepare($sql);
$query->bindParam(':status',$status,PDO::PARAM_STR);
$query->execute();
Page 36

Downloaded by CHETHAN E U (chethanchethueu11@gmail.com)


lOMoARcPSD|38151647

$results=$query->fetchAll(PDO::FETCH_OBJ);
$cnt=1;
if($query->rowCount() > 0)
{
foreach($results as $result)
{ ?>

<div class="col-lg-4 col-sm-6 portfolio-item">


<div class="card h-100">
<a href="#"><img class="card-img-top img-fluid" src="images/blood-
donor.jpg" alt="" ></a>
<div class="card-block">
<h4 class="card-title"><a href="#"><?php echo htmlentities($result-
>FullName);?></a></h4>
<p class="card-text"><b> Gender :</b> <?php echo htmlentities($result->Gender);?
></p>
<p class="card-text"><b>Blood Group :</b> <?php echo htmlentities($result-
>BloodGroup);?></p>

</div>
</div>
</div>

<?php }} ?>

</div>
<!-- /.row -->

<!-- Features Section -->


<div class="row">
Page 37

Downloaded by CHETHAN E U (chethanchethueu11@gmail.com)


lOMoARcPSD|38151647

<div class="col-lg-6">
<h2>BLOOD GROUPS</h2>
<p> blood group of any human being will mainly fall in any one of the following
groups.</p>
<ul>

<li>A positive or A negative</li>


<li>B positive or B negative</li>
<li>O positive or O negative</li>
<li>AB positive or AB negative.</li>
</ul>
<p>A healthy diet helps ensure a successful blood donation, and also makes
you feel better! Check out the following recommended foods to eat prior to your
donation.</p>
</div>
<div class="col-lg-6">
<img class="img-fluid rounded" src="images/blood-donor (1).jpg" alt="">
</div>
</div>
<!-- /.row -->

<hr>

<!-- Call to Action Section -->


<div class="row mb-4">
<div class="col-md-8">
<h4>UNIVERSAL DONORS AND RECIPIENTS</h4>
<p>
The most common blood type is O, followed by type A.

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>
Page 38

Downloaded by CHETHAN E U (chethanchethueu11@gmail.com)


lOMoARcPSD|38151647

</div>
<div class="col-md-4">
<a class="btn btn-lg btn-secondary btn-block" href="become-
donar.php">Become a Donar</a>
</div>
</div>

</div>
<!-- /.container -->

<!-- Footer -->


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

<!-- Bootstrap core JavaScript -->


<script src="vendor/jquery/jquery.min.js"></script>
<script src="vendor/tether/tether.min.js"></script>
<script src="vendor/bootstrap/js/bootstrap.min.js"></script>

</body>

</html>

SEARCH DONOR PAGE CODING

Page 39

Downloaded by CHETHAN E U (chethanchethueu11@gmail.com)


lOMoARcPSD|38151647

<?php
error_reporting(0);
include('includes/config.php');

?>

<!DOCTYPE html>
<html lang="en">
<head>

<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-
fit=no">
<meta name="description" content="">
<meta name="author" content="">

<title>BloodBank & Donor Management System | Become A Donar</title>


<link href="vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet">
<link href="vendor/font-awesome/css/font-awesome.min.css" rel="stylesheet"
type="text/css">
<link href="css/modern-business.css" rel="stylesheet">
<style>
.navbar-toggler {
z-index: 1;
}

@media (max-width: 576px) {


nav > .container {
width: 100%;
}
}
</style>
Page 40

Downloaded by CHETHAN E U (chethanchethueu11@gmail.com)


lOMoARcPSD|38151647

<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');?>

<!-- Page Content -->


<div class="container">

<!-- Page Heading/Breadcrumbs -->


<h1 class="mt-4 mb-3">Search <small>Donor</small></h1>

<ol class="breadcrumb">
<li class="breadcrumb-item">
Page 41

Downloaded by CHETHAN E U (chethanchethueu11@gmail.com)


lOMoARcPSD|38151647

<a href="index.php">Home</a>
</li>
<li class="breadcrumb-item active">Search Donor</li>
</ol>
<?php if($error){?><div class="errorWrap"><strong>ERROR</strong>:<?php
echo htmlentities($error); ?> </div><?php }
else if($msg){?><div class="succWrap"><strong>SUCCESS</strong>:<?php echo
htmlentities($msg); ?> </div><?php }?>
<!-- Content Row -->
<form name="donar" method="post">
<div class="row">

<div class="col-lg-4 mb-4">


<div class="font-italic">Blood Group<span style="color:red">*</span> </div>
<div><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>

Page 42

Downloaded by CHETHAN E U (chethanchethueu11@gmail.com)


lOMoARcPSD|38151647

<div class="col-lg-4 mb-4">


<div class="font-italic">Location </div>
<div><textarea class="form-control" name="location"></textarea></div>
</div>

</div>

<div class="row">
<div class="col-lg-4 mb-4">
<div><input type="submit" name="submit" class="btn btn-primary" value="submit"
style="cursor:pointer"></div>
</div>
</div>
<!-- /.row -->
</form>

<div class="row">
<?php
if(isset($_POST['submit']))
{
$status=1;
$bloodgroup=$_POST['bloodgroup'];
$location=$_POST['location'];
$sql = "SELECT * from tblblooddonars where (status=:status and
BloodGroup=:bloodgroup) || (Address=:location)";
$query = $dbh -> prepare($sql);
$query->bindParam(':status',$status,PDO::PARAM_STR);
$query->bindParam(':bloodgroup',$bloodgroup,PDO::PARAM_STR);
$query->bindParam(':location',$location,PDO::PARAM_STR);
$query->execute();
$results=$query->fetchAll(PDO::FETCH_OBJ);
$cnt=1;
if($query->rowCount() > 0)
{
Page 43

Downloaded by CHETHAN E U (chethanchethueu11@gmail.com)


lOMoARcPSD|38151647

foreach($results as $result)
{ ?>

<div class="col-lg-4 col-sm-6 portfolio-item">


<div class="card h-100">
<a href="#"><img class="card-img-top img-fluid" src="images/blood-
donor.jpg" alt="" ></a>
<div class="card-block">
<h4 class="card-title"><a href="#"><?php echo htmlentities($result-
>FullName);?></a></h4>
<p class="card-text"><b>Mobile No. / Email Id :</b> <?php echo
htmlentities($result->MobileNumber);?> /
<?php if($result->EmailId=="")
{
echo htmlentities(NA);
} else {
echo htmlentities($result->EmailId);
}
?>
</p>
<p class="card-text"><b> Gender :</b> <?php echo htmlentities($result->Gender);?
></p>
<p class="card-text"><b> Age:</b> <?php echo htmlentities($result->Age);?></p>
<p class="card-text"><b>Blood Group :</b> <?php echo htmlentities($result-
>BloodGroup);?></p>
<p class="card-text"><b>Address :</b>
<?php if($result->Address=="")
{
echo htmlentities('NA');
} else {
echo htmlentities($result->Address);
}
?></p>
<p class="card-text"><b>Message :</b> <?php echo htmlentities($result-
Page 44

Downloaded by CHETHAN E U (chethanchethueu11@gmail.com)


lOMoARcPSD|38151647

>Message);?></p>

</div>
</div>
</div>

<?php }}
else
{
echo htmlentities("No Record Found");

} ?>

</div>
</div>
<?php include('includes/footer.php');?>
<!-- Bootstrap core JavaScript -->
<script src="vendor/jquery/jquery.min.js"></script>
<script src="vendor/tether/tether.min.js"></script>
<script src="vendor/bootstrap/js/bootstrap.min.js"></script>
</body>
</html>

DONOR REGISTRRATION PAGE CODING

Page 45

Downloaded by CHETHAN E U (chethanchethueu11@gmail.com)


lOMoARcPSD|38151647

<?php
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;
$sql="INSERT INTO
tblblooddonars(FullName,MobileNumber,EmailId,Age,Gender,BloodGroup,Address,M
essage,status)
VALUES(:fullname,:mobile,:email,:age,:gender,:blodgroup,:address,:message,:status)";
$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->execute();
$lastInsertId = $dbh->lastInsertId();
if($lastInsertId)
{
$msg="Your info submitted successfully";
Page 46

Downloaded by CHETHAN E U (chethanchethueu11@gmail.com)


lOMoARcPSD|38151647

}
else
{
$error="Something went wrong. Please try again";
}

}
?>

<!DOCTYPE html>
<html lang="en">
<head>

<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-
fit=no">
<meta name="description" content="">
<meta name="author" content="">

<title>BloodBank & Donor Management System | Become A Donar</title>


<link href="vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet">
<link href="vendor/font-awesome/css/font-awesome.min.css" rel="stylesheet"
type="text/css">
<link href="css/modern-business.css" rel="stylesheet">
<style>
.navbar-toggler {
z-index: 1;
}

@media (max-width: 576px) {


nav > .container {
width: 100%;
}
Page 47

Downloaded by CHETHAN E U (chethanchethueu11@gmail.com)


lOMoARcPSD|38151647

}
</style>
<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');?>

<!-- Page Content -->


<div class="container">

<!-- Page Heading/Breadcrumbs -->


<h1 class="mt-4 mb-3">Become a <small>Donor</small></h1>

Page 48

Downloaded by CHETHAN E U (chethanchethueu11@gmail.com)


lOMoARcPSD|38151647

<ol class="breadcrumb">
<li class="breadcrumb-item">
<a href="index.php">Home</a>
</li>
<li class="breadcrumb-item active">Become a Donor</li>
</ol>
<?php if($error){?><div class="errorWrap"><strong>ERROR</strong>:<?php
echo htmlentities($error); ?> </div><?php }
else if($msg){?><div class="succWrap"><strong>SUCCESS</strong>:<?php echo
htmlentities($msg); ?> </div><?php }?>
<!-- Content Row -->
<form name="donar" method="post">
<div class="row">
<div class="col-lg-4 mb-4">
<div class="font-italic">Full Name<span style="color:red">*</span></div>
<div><input type="text" name="fullname" class="form-control" required></div>
</div>
<div class="col-lg-4 mb-4">
<div class="font-italic">Mobile Number<span style="color:red">*</span></div>
<div><input type="text" name="mobileno" class="form-control" required></div>
</div>
<div class="col-lg-4 mb-4">
<div class="font-italic">Email Id</div>
<div><input type="email" name="emailid" class="form-control"></div>
</div>
</div>

<div class="row">
<div class="col-lg-4 mb-4">
<div class="font-italic">Age<span style="color:red">*</span></div>
<div><input type="text" name="age" class="form-control" required></div>
</div>

Page 49

Downloaded by CHETHAN E U (chethanchethueu11@gmail.com)


lOMoARcPSD|38151647

<div class="col-lg-4 mb-4">


<div class="font-italic">Gender<span style="color:red">*</span></div>
<div><select name="gender" class="form-control" required>
<option value="">Select</option>
<option value="Male">Male</option>
<option value="Female">Female</option>
</select>
</div>
</div>

<div class="col-lg-4 mb-4">


<div class="font-italic">Blood Group<span style="color:red">*</span> </div>
<div><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>
</div>

<div class="row">
<div class="col-lg-4 mb-4">
<div class="font-italic">Address</div>
Page 50

Downloaded by CHETHAN E U (chethanchethueu11@gmail.com)


lOMoARcPSD|38151647

<div><textarea class="form-control" name="address"></textarea></div>


</div>

<div class="col-lg-8 mb-4">


<div class="font-italic">Message<span style="color:red">*</span></div>
<div><textarea class="form-control" name="message" required> </textarea></div>
</div>
</div>

<div class="row">
<div class="col-lg-4 mb-4">
<div><input type="submit" name="submit" class="btn btn-primary" value="submit"
style="cursor:pointer"></div>
</div>
</div>
<!-- /.row -->
</form>
<!-- /.row -->
</div>
<!-- Bootstrap core JavaScript -->
<script src="vendor/jquery/jquery.min.js"></script>
<script src="vendor/tether/tether.min.js"></script>
<script src="vendor/bootstrap/js/bootstrap.min.js"></script>
</body>

</html>

ADMIN DASHBOARD PAGE CODING

Page 51

Downloaded by CHETHAN E U (chethanchethueu11@gmail.com)


lOMoARcPSD|38151647

<?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">
<meta name="description" content="">
<meta name="author" content="">
<meta name="theme-color" content="#3e454c">

<title>BBDMS | Admin Dashboard</title>

<!-- 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">
Page 52

Downloaded by CHETHAN E U (chethanchethueu11@gmail.com)


lOMoARcPSD|38151647

<!-- 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">
</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">

<h2 class="page-title">Dashboard</h2>

<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">


<?php
$sql ="SELECT id from tblbloodgroup ";
$query = $dbh -> prepare($sql);
Page 53

Downloaded by CHETHAN E U (chethanchethueu11@gmail.com)


lOMoARcPSD|38151647

$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>
</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">


<?
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>

Page 54

Downloaded by CHETHAN E U (chethanchethueu11@gmail.com)


lOMoARcPSD|38151647

<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
&nbsp; <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-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 &nbsp; <i class="fa fa-arrow-right"></i></a>
Page 55

Downloaded by CHETHAN E U (chethanchethueu11@gmail.com)


lOMoARcPSD|38151647

</div>
</div>

</div>
</div>
</div>
</div>
</div>

</div>
</div>
</div>

<!-- Loading Scripts -->


<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>
Page 56

Downloaded by CHETHAN E U (chethanchethueu11@gmail.com)


lOMoARcPSD|38151647

<script>

window.onload = function(){

// Line chart from swirlData for dashReport


var ctx = document.getElementById("dashReport").getContext("2d");
window.myLine = new Chart(ctx).Line(swirlData, {
responsive: true,
scaleShowVerticalLines: false,
scaleBeginAtZero : true,
multiTooltipTemplate: "<%if (label){%><%=label%>: <%}%><
%= value %>",
});

// Pie Chart from doughutData


var doctx = document.getElementById("chart-area3").getContext("2d");
window.myDoughnut = new Chart(doctx).Pie(doughnutData,
{responsive : true});

// Dougnut Chart from doughnutData


var doctx = document.getElementById("chart-area4").getContext("2d");
window.myDoughnut = new Chart(doctx).Doughnut(doughnutData,
{responsive : true});

}
</script>
</body>
</html>
<?php } ?>

ADD BLOOD GROUP PAGE CODING

Page 57

Downloaded by CHETHAN E U (chethanchethueu11@gmail.com)


lOMoARcPSD|38151647

<?php
session_start();
error_reporting(0);
include('includes/config.php');
if(strlen($_SESSION['alogin'])==0)
{
header('location:index.php');
}
else{
// Code for change password
if(isset($_POST['submit']))
{
$bloodgroup=$_POST['bloodgroup'];
$sql="INSERT INTO tblbloodgroup(BloodGroup) VALUES(:bloodgroup)";
$query = $dbh->prepare($sql);
$query->bindParam(':bloodgroup',$bloodgroup,PDO::PARAM_STR);
$query->execute();
$lastInsertId = $dbh->lastInsertId();
if($lastInsertId)
{
$msg="Blood Group Created successfully";
}
else
{
$error="Something went wrong. Please try again";
}

}
?>

<!doctype html>
<html lang="en" class="no-js">

<head>
Page 58

Downloaded by CHETHAN E U (chethanchethueu11@gmail.com)


lOMoARcPSD|38151647

<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>BBDMS | Admin add-bloodgroup</title>

<!-- 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);
Page 59

Downloaded by CHETHAN E U (chethanchethueu11@gmail.com)


lOMoARcPSD|38151647

}
.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">

<h2 class="page-title">Add Blood Group


</h2>

<div class="row">
<div class="col-md-10">
<div class="panel panel-
default">
<div class="panel-
heading">Form fields</div>
<div class="panel-
Page 60

Downloaded by CHETHAN E U (chethanchethueu11@gmail.com)


lOMoARcPSD|38151647

body">
<form
method="post" name="chngpwd" class="form-horizontal" onSubmit="return
valid();">

<?php if($error){?><div
class="errorWrap"><strong>ERROR</strong>:<?php echo htmlentities($error); ?>
</div><?php }
else if($msg){?><div
class="succWrap"><strong>SUCCESS</strong>:<?php echo htmlentities($msg); ?>
</div><?php }?>
<div
class="form-group">

<label class="col-sm-4 control-label">Blood Group</label>

<div class="col-sm-8">

<input type="text" class="form-control" name="bloodgroup" id="bloodgroup"


required>

</div>
</div>
<div
class="hr-dashed"></div>

<div
class="form-group">

<div class="col-sm-8 col-sm-offset-4">


Page 61

Downloaded by CHETHAN E U (chethanchethueu11@gmail.com)


lOMoARcPSD|38151647

<button class="btn btn-primary" name="submit"


type="submit">Submit</button>

</div>
</div>

</form>

</div>
</div>
</div>

</div>

</div>
</div>

</div>
</div>
</div>

<!-- Loading Scripts -->


<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>
Page 62

Downloaded by CHETHAN E U (chethanchethueu11@gmail.com)


lOMoARcPSD|38151647

<script src="js/chartData.js"></script>
<script src="js/main.js"></script>

</body>

</html>
<?php } ?>

ADD DONOR PAGE CODING

Page 63

Downloaded by CHETHAN E U (chethanchethueu11@gmail.com)


lOMoARcPSD|38151647

<?php
session_start();
error_reporting(0);
include('includes/config.php');
if(strlen($_SESSION['alogin'])==0)
{
header('location:index.php');
}
else{

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;
$sql="INSERT INTO
tblblooddonars(FullName,MobileNumber,EmailId,Age,Gender,BloodGroup,Address,M
essage,status)
VALUES(:fullname,:mobile,:email,:age,:gender,:blodgroup,:address,:message,:status)";
$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);
Page 64

Downloaded by CHETHAN E U (chethanchethueu11@gmail.com)


lOMoARcPSD|38151647

$query->bindParam(':message',$message,PDO::PARAM_STR);
$query->bindParam(':status',$status,PDO::PARAM_STR);
$query->execute();
$lastInsertId = $dbh->lastInsertId();
if($lastInsertId)
{
$msg="Your info submitted successfully";
}
else
{
$error="Something went wrong. Please try again";
}

?>
<!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>BBDMS| Admin Add Donor</title>

<!-- Font awesome -->


<link rel="stylesheet" href="css/font-awesome.min.css">
<!-- Sandstone Bootstrap CSS -->
Page 65

Downloaded by CHETHAN E U (chethanchethueu11@gmail.com)


lOMoARcPSD|38151647

<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>
<script language="javascript">
function isNumberKey(evt)
{
Page 66

Downloaded by CHETHAN E U (chethanchethueu11@gmail.com)


lOMoARcPSD|38151647

var charCode = (evt.which) ? evt.which : event.keyCode

if (charCode > 31 && (charCode < 48 || charCode > 57) && charCode!=46)
return false;

return true;
}
</script>
</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">

<h2 class="page-title">Add Donor</h2>

<div class="row">
<div class="col-md-12">
<div class="panel panel-
default">
<div class="panel-
heading">Basic Info</div>
<?php if($error){?><div class="errorWrap"><strong>ERROR</strong>:<?php echo
htmlentities($error); ?> </div><?php }
else if($msg){?><div
class="succWrap"><strong>SUCCESS</strong>:<?php echo htmlentities($msg); ?>
</div><?php }?>
Page 67

Downloaded by CHETHAN E U (chethanchethueu11@gmail.com)


lOMoARcPSD|38151647

<div class="panel-
body">
<form method="post" class="form-horizontal" enctype="multipart/form-data">
<div class="form-group">
<label class="col-sm-2 control-label">Full Name<span
style="color:red">*</span></label>
<div class="col-sm-4">
<input type="text" name="fullname" class="form-control" required>
</div>
<label class="col-sm-2 control-label">Mobile No<span
style="color:red">*</span></label>
<div class="col-sm-4">
<input type="text" name="mobileno" onKeyPress="return isNumberKey(event)"
maxlength="10" class="form-control" required>
</div>
</div>

<div class="form-group">
<label class="col-sm-2 control-label">Email id </label>
<div class="col-sm-4">
<input type="email" name="emailid" class="form-control">
</div>
<label class="col-sm-2 control-label">Age<span style="color:red">*</span></label>
<div class="col-sm-4">
<input type="text" name="age" class="form-control" required>
</div>
</div>

<div class="form-group">
<label class="col-sm-2 control-label">Gender <span
style="color:red">*</span></label>
<div class="col-sm-4">
<select name="gender" class="form-control" required>
Page 68

Downloaded by CHETHAN E U (chethanchethueu11@gmail.com)


lOMoARcPSD|38151647

<option value="">Select</option>
<option value="Male">Male</option>
<option value="Female">Female</option>
</select>
</div>
<label class="col-sm-2 control-label">Blood Group<span
style="color:red">*</span></label>
<div class="col-sm-4">

<select name="bloodgroup" class="form-control" required>


<option value="">Select</option>
<?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>

<div class="hr-dashed"></div>
<div class="form-group">
<label class="col-sm-2 control-label">Address</label>
Page 69

Downloaded by CHETHAN E U (chethanchethueu11@gmail.com)


lOMoARcPSD|38151647

<div class="col-sm-10">
<textarea class="form-control" name="address" ></textarea>
</div>
</div>

<div class="hr-dashed"></div>
<div class="form-group">
<label class="col-sm-2 control-label">Message<span
style="color:red">*</span></label>
<div class="col-sm-10">
<textarea class="form-control" name="message" required> </textarea>
</div>
</div>

<div
class="form-group">

<div class="col-sm-8 col-sm-offset-2">

<button class="btn btn-default" type="reset">Cancel</button>

<button class="btn btn-primary" name="submit" type="submit">Save


changes</button>

</div>
</div>

</form>
</div>
</div>
</div>
</div>
Page 70

Downloaded by CHETHAN E U (chethanchethueu11@gmail.com)


lOMoARcPSD|38151647

</div>
</div>

</div>
</div>
</div>

<!-- Loading Scripts -->


<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>
<?php } ?>

VIEW DONOR LIST PAGE CODING

<?php
Page 71

Downloaded by CHETHAN E U (chethanchethueu11@gmail.com)


lOMoARcPSD|38151647

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();

$msg="Booking Successfully Cancelled";


}

if(isset($_REQUEST['public']))
{
$aeid=intval($_GET['public']);
$status=1;

$sql = "UPDATE tblblooddonars SET Status=:status WHERE id=:aeid";


$query = $dbh->prepare($sql);
$query -> bindParam(':status',$status, PDO::PARAM_STR);
$query-> bindParam(':aeid',$aeid, PDO::PARAM_STR);
$query -> execute();

$msg="Booking Successfully Confirmed";


Page 72

Downloaded by CHETHAN E U (chethanchethueu11@gmail.com)


lOMoARcPSD|38151647

}
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();

$msg="Record deleted Successfully ";


}

?>

<!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>BBDMS | Donor List </title>

<!-- 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">
Page 73

Downloaded by CHETHAN E U (chethanchethueu11@gmail.com)


lOMoARcPSD|38151647

<!-- 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');?>

Page 74

Downloaded by CHETHAN E U (chethanchethueu11@gmail.com)


lOMoARcPSD|38151647

<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">Donors List</h2>

<!-- Zero Configuration Table -->


<div class="panel panel-default">
<div class="panel-heading">Donors
Info</div>
<div class="panel-body">
<?php if($error){?><div
class="errorWrap"><strong>ERROR</strong>:<?php echo htmlentities($error); ?>
</div><?php }
else if($msg){?><div
class="succWrap"><strong>SUCCESS</strong>:<?php echo htmlentities($msg); ?>
</div><?php }?>
<a href="download-records.php" style="color:red; font-
size:16px;">Download Donor List</a>
<table id="zctb"
class="display table table-striped table-bordered table-hover" cellspacing="0"
width="100%">
<thead>
<tr>
<th>#</th>

<th>Name</th>

<th>Mobile No</th>

Page 75

Downloaded by CHETHAN E U (chethanchethueu11@gmail.com)


lOMoARcPSD|38151647

<th>Email</th>

<th>Age</th>

<th>Gender</th>
<th>Blood
Group</th>

<th>address</th>

<th>Message </th>

<th>action </th>
</tr>
</thead>
<tfoot>
<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>

Page 76

Downloaded by CHETHAN E U (chethanchethueu11@gmail.com)


lOMoARcPSD|38151647

<th>action </th>
</tr>
</tfoot>
<tbody>

<?php $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)
{ ?>
<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>

Page 77

Downloaded by CHETHAN E U (chethanchethueu11@gmail.com)


lOMoARcPSD|38151647

<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')"> Make
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')"> Make 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')"> Delete</a>
</td>

</tr>
<?php
$cnt=$cnt+1; }} ?>

</tbody>
</table>

</div>
</div>

</div>
</div>

Page 78

Downloaded by CHETHAN E U (chethanchethueu11@gmail.com)


lOMoARcPSD|38151647

</div>
</div>
</div>

<!-- Loading Scripts -->


<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>
<?php } ?>

MANAGE BLOOD GROUP PAGE CODING

<?php
Page 79

Downloaded by CHETHAN E U (chethanchethueu11@gmail.com)


lOMoARcPSD|38151647

session_start();
error_reporting(0);
include('includes/config.php');
if(strlen($_SESSION['alogin'])==0)
{
header('location:index.php');
}
else{
if(isset($_GET['del']))
{
$id=$_GET['del'];
$sql = "delete from tblbloodgroup WHERE id=:id";
$query = $dbh->prepare($sql);
$query -> bindParam(':id',$id, PDO::PARAM_STR);
$query -> execute();
$msg="Data Deleted successfully";

?>

<!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">
Page 80

Downloaded by CHETHAN E U (chethanchethueu11@gmail.com)


lOMoARcPSD|38151647

<title>BBDMS |Admin Manage Blood groups </title>

<!-- 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);
Page 81

Downloaded by CHETHAN E U (chethanchethueu11@gmail.com)


lOMoARcPSD|38151647

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">

<h2 class="page-title">Manage Blood


Groups</h2>

<!-- Zero Configuration Table -->


<div class="panel panel-default">
<div class="panel-heading">Listed
Blood Groups</div>
<div class="panel-body">
<?php if($error){?><div
class="errorWrap"><strong>ERROR</strong>:<?php echo htmlentities($error); ?>
</div><?php }
else if($msg){?><div
class="succWrap"><strong>SUCCESS</strong>:<?php echo htmlentities($msg); ?>
</div><?php }?>
<table id="zctb"
class="display table table-striped table-bordered table-hover" cellspacing="0"
width="100%">
Page 82

Downloaded by CHETHAN E U (chethanchethueu11@gmail.com)


lOMoARcPSD|38151647

<thead>
<tr>
<th>#</th>

<th>Blood Groups/th>

<th>Creation Date</th>

<th>Action</th>
</tr>
</thead>
<tfoot>
<tr>
<th>#</th>

<th>Brand Name</th>

<th>Creation Date</th><th>Action</th>
</tr>
</tr>
</tfoot>
<tbody>

<?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)
{ ?>
Page 83

Downloaded by CHETHAN E U (chethanchethueu11@gmail.com)


lOMoARcPSD|38151647

<tr>
<td><?
php echo htmlentities($cnt);?></td>
<td><?
php echo htmlentities($result->BloodGroup);?></td>
<td><?
php echo htmlentities($result->PostingDate);?></td>
<td>
<a href="manage-bloodgroup.php?del=<?php echo $result->id;?>" onclick="return
confirm('Do you want to delete');"><i class="fa fa-close"></i></a></td>
</tr>
<?php
$cnt=$cnt+1; }} ?>

</tbody>
</table>

</div>
</div>

</div>
</div>

</div>
</div>
</div>

<!-- Loading Scripts -->


<script src="js/jquery.min.js"></script>
<script src="js/bootstrap-select.min.js"></script>
Page 84

Downloaded by CHETHAN E U (chethanchethueu11@gmail.com)


lOMoARcPSD|38151647

<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>
<?php } ?>

Page 85

Downloaded by CHETHAN E U (chethanchethueu11@gmail.com)


lOMoARcPSD|38151647

CHAPTER # 8
Advantages & Limitations

Advantages of “Blood Bank And Donor Management System”:

“Blood Bank and Donor Management System” provides various


features, which complement the information system and increase the
productivity of the system. These features make the system easily usable and
convenient. Some of the important features included are listed as follows:

 Intelligent User Forms Design


 Data access and manipulation through same forms
 Access to most required information
 Data Security
 Restrictive data access, as per login assigned only.
 Organized and structured storage of facts.
 Strategic Planning made easy.
 No decay of old Records.
 Exact financial position of the Business.

Limitations of “Blood Bank and Donor Management System”:

Page 86

Downloaded by CHETHAN E U (chethanchethueu11@gmail.com)


lOMoARcPSD|38151647

Besides the above achievements and the successful completion of the project,
we still feel the project has some limitations, listed as below:

1. It is not a large scale system.


2. Only limited information provided by this system.
3. Since it is an offline project, operated from from pc in which it is in-
stalled.
4. People who are not familiar with computers can’t use this software.

CHAPTER # 8
Future Scope
Page 87

Downloaded by CHETHAN E U (chethanchethueu11@gmail.com)


lOMoARcPSD|38151647

FUTURE SCOPE

This web application involves almost all the basic features of the blood bank and donor man-
agement. The future implementation will be online help for the users and chatting with web-
site administrator.

CONCLUSION

The project entitled “Blood Bank and Donor Management System” is developed using
HTML, CSS and JS as front end and PHP language and MYSQL database in back end to
computerize the process of donor’s management. This project covers only the basic features
required.

Bibliography
Page 88

Downloaded by CHETHAN E U (chethanchethueu11@gmail.com)


lOMoARcPSD|38151647

 FOR PHP INSTALLATION

 http://www.php.net/

 FOR DEPLOYMENT AND PACKING ON SERVER

www.developer.com
www.15seconds.com

 FOR MY SQL

 http://www.mysql.com/

 FOR CSS

 http://cssed.sourceforge.net/

 FOR APACHE

 http://www.apache.org/

 FOR OTHER USEFUL REFERENCES

 http://www.w3schools.com/default.asp

Page 89

Downloaded by CHETHAN E U (chethanchethueu11@gmail.com)


lOMoARcPSD|38151647

 http://en.wikipedia.org/

 REFERENCE BOOKS

Lee Babin, “Beginning Ajax with PHP”.


Leon Atkinson,“ Core PHP Programming” .
Luke Welling & Laura Thompson, “Beginning Ajax with PHP”.
Roger S.Pressman, “Software Engineering”.

Page 90

Downloaded by CHETHAN E U (chethanchethueu11@gmail.com)

You might also like