Professional Documents
Culture Documents
1 INTRODUCTION TO PROJECT 5
3 FEASIBILITY STUDY 9
4 SYSTEM DESIGN 12
7 E-R DIAGRAM 26
9 DATA DICTIONARY 31
10 FORM LAYOUT 33
11 SOURCE CODE 44
12 CONCLUSION 57
13 BIBLIOGRAPHY 58
1
1. Introduction
A blood donation is a process whereby a person voluntarily has blood drawn to be used for
future transfusions when in need at hospitals for treatment procedures that
require them. Donation may be of whole blood (blood drawn directly from the body) or of
specific components of the blood; such as red blood cells, white blood cells, plasma, and
platelets. Blood banks often participate in the process of
collecting blood and other procedures such as managing stocks, approving blood requests and
updating donation information
The inspiration of this project is to improve blood banks in Thailand and to develop a blood bank
information system which focuses on making an online
system that is accessible for both donors and administrators. Donors can directly receive
information regarding their previous blood donations, including their blood
results and donation history, in order to easily schedule their next donations. They can also
update the personal information through the system, without having to contact the blood bank
registry.
The system is also developed for the administrators, who are the main authority in
the system. Administrators can add, modify, delete, and query any donation
information if necessary. The administrator is also responsible for responding to the hospital’s
blood requests and checking the stocks in the blood bank’s inventory
2
2. Statement of the Problem
The following problem arises when using a typical blood bank’s existing system:
• Personal profile accessibility
The donor’s information can only be updated by the administrators of the blood bank. A donor
can update their information by calling, faxing, e-mailing, but not by themselves. This is a waste
of time just for updating a piece of information and it
may be troublesome for some donors.
• Lost or damaged card
A typical membership card can easily get damaged if it is exposed to the sunlight or weather and
this causes to ruin the card’s barcode which is significantly
important for retrieving records. If the card gets lost or stolen, the donor has to make a
replacement card to keep their membership at the blood bank.
• Donation record accessibility
The donor ID card is the only tangible evidence that contains the donor’s recent
donation records, if the card gets lost, donors may find it difficult to schedule their next
appointment since they are not able to see the last time they had donated
blood.
3. User Requirements
There are two internal users involved in this system. The user requirements are considered as
follows:
Donor
1. To be able to view their donation records, including where and when they made donations,
and the blood results for each, to learn of their donated blood quality
and schedule their next donations. (Solving P3, P6)
2. To be able to view and update their personal information, including name,
contact address, and phone number, to keep their donor’s information record upto-date with the
blood bank. (Solving P1)
3. To be notified of the blood results of their previous donation by e-mail, to know
the success of their donation. (Solving P4)
Administrator
1. To be able to create, update, delete, and query donor’s records in order to manage donor
information.
2. To be able to create, update, delete, and retrieve donation records to manage information
about donations made.
3. To be able to deposit donated blood into inventory when donations are made.
5
4. To be able to withdraw blood from the inventory and keep a record of blood
stocks to always keep count of the blood bags. (Solving P5)
5. To be able to create, update, delete, and retrieve request records from hospitals
to manage hospital requests for blood.
6. To be able to create, update, delete, and query hospital’s records in order to manage hospital
information.
7. To be able to send e-mails to donors for their user account and blood results through the
system. (Solving P6)
8. To be able to send e-mail responding to hospitals for their blood requests through the system.
(Solving P6)
4
4. Objectives
The goal of the project is to develop a web application for blood banks to manage information
about their donors and blood stock. The main objectives of this
website development can be defined as follows:
1. To develop a system that provides functions to support donors to view and
manage their information conveniently.
2. To maintain records of blood donors, blood donation information and blood
stocks in a centralized database system.
3. To inform donors of their blood result after their donation.
4. To support searching, matching and requesting for blood convenient for
administrators.
5. To provide a function to send an e-mail directly to the donor for their user
account and the hospital, the availability of the blood bag.
5. Scope of the Project
The system functions and features of our system will include the following:
• Registration
This function allows the donor and administrator to register as a user to interact with the system.
The system requires the user to login before viewing and editing any information.
• View and edit information online
Donors are allowed to view their blood donation records online by their given account. They can
also edit their personal information through the system.
• Data is input by the Administrators
The donor’s information and donation records can be sent from the hospital to the
administrator by calling or e-mail. The administrator is responsible for keying the received data
into the system.
• Recording donation records
The system is able to record data of whole blood which is sent from the hospital.
6
Methodology
7
System Analysis
Developing the system, which meets the SRS and solving all the requirements of the system?
Demonstrating the system and installing the system at client's location after the acceptance testing is
successful.
Submitting the required user manual describing the system interfaces to work on it and also the
documents of the system.
Conducting any user training that might be needed for using the system.
Maintaining the system for a period of one year after installation.
8
The modules involved are:
1. Administration:
In this module the Administrator has the privileges to add all the Blood Groups, Blood Type,
Organization, Type, Country, State, City, and Location. He can search all the info about the
Organization, Donor.
User Account:
AccountID
Username
Password
UserDesc
HintQuestion
Answer
RoleID
Active
Functionality
9
HARDWARE REQUIREMENTS:
SOFTWARE REQUIREMENTS:
10
SYSTEM IMPLEMENTATION AND TESTING
5.1 CODING
Home
<?php
require 'functions/functions.php';
session_start();
if (!isset($_SESSION['user'])) {
header("location:index.php");
}
$user = $_SESSION['user'];
session_destroy();
session_start();
$_SESSION['user'] = $user;
ob_start();
$conn = connect();
?>
<!DOCTYPE>
<html>
<head>
<title>Blood Bank</title>
<link rel = "icon" href =
"images/logo.png"
type = "image/x-icon">
<style type="text/css">
<style>
body
{
margin: 0;
padding: 0;
color:red;
background-image: url("seamless.jpg");
}
ul
{
list-style-type: none;
background-color: red;
height: 40px;
width:98%;
11
}
a
{
text-decoration: none;
font-size: 25px;
color:white;
position: relative;
top: 4px;
}
li
{
display: inline;
font-style: 15px;
padding: 38px;
margin-left: 20 px;
position: relative;
left: 70px;
p
{
text-align: justify;
max-width: 1000px;
max-height: 80px;
position: absolute;
left: 60px;
font-size: 20px;
top: 350px;
margin-left: 95px;
}
h6
{
position: relative;
top: 180px;
left:60px;
font-size: 20px;
margin-left: 95px;
}
.bloodquery
{
position: relative;
top:160px;
left: 60px;
font-size: 20px;
12
margin-left: 95px;
}
.ongoingcamps
{
position: relative;
top: 180px;
left: 60px;
font-size: 20px;
margin-left: 95px;
}
.saap{
position: relative;
top:160px;
left: 60px;
font-size: 20px;
margin-left: 40px;
color:black;
footer{
position: relative;
bottom: 10;
}
@media (max-height:100px){
footer { position: static; }
header { padding-top:20px; }
}
.footer-distributed{
background-color: #2c292f;
box-sizing: border-box;
width: 100%;
text-align: left;
font: bold 16px sans-serif;
padding: 20px 20px 20px 20px
margin-top:100px;
height:220px;
}
.footer-distributed .footer-left,
.footer-distributed .footer-center,
.footer-distributed .footer-right{
display: inline-block;
vertical-align: bottom;
13
}
.footer-distributed .footer-left{
width: 100%;
height:100px;
}
.footer-distributed h3{
color: #ffffff;
font: normal 36px 'Cookie', cursive;
margin: 0;
}
.footer-distributed h3 span{
color: #e0ac1c;
}
.footer-distributed .footer-links{
color: #ffffff;
margin: 20px 0 12px;
}
.footer-distributed .footer-links a{
display:inline-block;
line-height: 1.8;
text-decoration: none;
color: inherit;
}
.footer-distributed .footer-company-name{
color: #8f9296;
font-size: 10px;
font-weight: normal;
margin: 0;
}
.footer-distributed .footer-center{
width: 30%;
height: 20px;
14
}
.footer-distributed .footer-center
{
background-color:#33383b;
color: #ffffff;
font-size: 25px;
width: 10px;
height: 10px;
border-radius: 50%;
text-align: center;
line-height: 20px;
margin: 10px 15px;
vertical-align: middle;
}
.footer-distributed .footer-center i.fa-envelope{
font-size: 17px;
line-height: 20px;
}
.footer-distributed .footer-center p{
display: inline-block;
color: #ffffff;
vertical-align: middle;
margin:0;
}
.footer-distributed .footer-center p span{
display:block;
font-weight: normal;
font-size:14px;
line-height:20px;
}
.footer-distributed .footer-center p a{
color: #e0ac1c;
text-decoration: none;;
}
.footer-distributed .footer-right{
width: 30%;
}
.footer-distributed .footer-company-about{
line-height: 20px;
color: #92999f;
font-size: 13px;
font-weight: normal;
margin: 0;
}
15
display: block;
color: #ffffff;
font-size: 18px;
font-weight: bold;
margin-bottom: 20px;
}
.footer-distributed .footer-icons{
margin-top: 25px;
}
1
.footer-distributed .footer-icons a{
display: inline-block;
width: 35px;
height: 35px;
cursor: pointer;
background-color: #33383b;
border-radius: 2px;
font-size: 20px;
color: #ffffff;
text-align: center;
line-height: 35px;
margin-right: 3px;
margin-bottom: 5px;
}
.footer-distributed .footer-left,
.footer-distributed .footer-center,
.footer-distributed .footer-right{
display: block;
width: 100%;
margin-bottom: 40px;
text-align: center;
}
.footer-distributed .footer-center i{
margin-left: 0;
}
</style>
</head>
<body>
<p style="text-align:center;font-size:40px;font-family:cursive;color:black;text-
16
decoration:underline;border-radius:0.5px;margin-left:585px;margin-top:-362">BBMS</p>
<ul>
<br>
<br>
<div class="bloodquery">
<video width="1100" height="500" align="left" controls>
<source src="video/bd.mp4" type="video/mp4">
<source src="movie.ogg" type="video/ogg">
Your browser does not support the video tag.
</video>
</div>
</br>
</br>
<br>
<br>
<div class="saap">
<br>
<p1 style="margin-bottom:100px">In 2018, before starting the “Festin-O-Beats 2018”, students'
cultural festival, the Unitedworld School of Business (PGDM Batch 2012-14) students organised
a Blood Donation Camp. More than 150 students donated their blood in this noble cause.
</p1>
</br>
<br>
<img src="images/c1.jpg" alt="" height="100px" width="300px">
17
</br>
<br>
<p2 style="margin-bottom:100px">In 2016,blood donation camp was organised by student of
RIMS at remote areas in five main villages of kangpokpi Distric of Manipur.
</br>
<br>
<img src="images/c2.jpg" alt="" height="100px" width="300px">
</p2>
</br>
<br>
<p3 style="margin-bottom:100px">Blood donation camp organised in Noida.
</br>
<br>
</div>
<footer class="footer-distributed">
<div class="footer-left">
<h3>© 2019 BBMS</span></h3>
<a href="home.php">Top</a>
<a href="">
<br>
</br>
</br>
</div>
</body>
18
</html>
Index
<?php
session_start();
include "functions/header.php";
?>
<html>
<head>
<link rel="stylesheet" type="text/css" href="bootstrap.css">
<link rel="stylesheet" type="text/css" href="bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="bootstrap-theme.css">
<link rel="stylesheet" type="text/css" href="bootstrap-theme.min.css">
<style>
{
margin:0;
padding:0;
}
body {
background:url('seamless.jpg');
}
.navbar {
border-radius: 0;
}
.logo-icon {
width: 60px;
}
.navbar-brand>img {
float: left;
margin: -15px 0 0 0;
}
.navbar>.container-fluid .navbar-brand {
margin-left: 40px;
}
.navbar-inverse {
background-color: #ae0202;
border-color: #ae0202;
}
19
.navbar-inverse .navbar-brand {
color: #ffffff;
}
.navbar-inverse .navbar-nav>li>a {
color: #ffffff;
}
.navbar-nav>li>.dropdown-menu {
background: #ae0202;
}
.navbar-inverse .navbar-nav>.open>a, .navbar-inverse .navbar-nav>.open>a:focus, .navbar-
inverse .navbar-nav>.open>a:hover {
background-color: #740202;
}
.dropdown-menu>li>a {
color: #fff;
}
.dropdown-menu>li>a:focus, .dropdown-menu>li>a:hover {
color: #ffffff;
background-color: #740202;
}
.dropdown-menu>li>a {
color: #fff;
padding: 12px 20px;
}
.navbar {
margin-bottom: 0;
}
.cover {
height: 300px;
background: url(../images/cover.jpg);
background-attachment: fixed;
}
.banner img {
width: 100%;
height: 400px;
}
.footer {
background: #191919;
height: 20px;
}
.copyright {
background: #000;
color: #fff;
padding: 15px 0;
}
.input-group:hover {
text-decoration: none;
}
.error{
20
color:red;
}
.spacer {
height: 20px;
}
@media (min-width: 768px)
{
.modal-dialog {
width: 500px;
margin: 30px auto;
}
}
.navbar>.container-fluid .navbar-brand {
margin-left: 0;
}
.heading-reg {
font-family: 'Varela Round';
padding: 10px;
text-align: center;
color: #ae0202;
}
button.banner-try {
background: #ae0202;
color: #fff;
padding: 20px;
margin: 40px 0;
width: 100%;
}
.error-image {
margin-top: 40px;
width: 100%;
}
.col-md-6 img {
width: 180px;
}
.icon-col {
text-align: center;
margin-top: -30px;
}
.request {
background: #191919;
padding: 10px;
color:#fff;
margin: 10px;
transition: 0.2s;
cursor: pointer;
box-shadow: 4px 4px 8px -2px #ae0202;
}
.request:hover {
21
transform: scale(1.02);
}
.blood {
font-size: 7em;
}
.col-md-5.contact {
padding: 20px;
font-size: 18px;
}
.myTable td{
padding: 5px;
}
td.table_row {
color: #adadad;
}
.sbutton {
width: 100%;
margin-top: 25px;
}
.main-section {
}
.col-md-8.main-section h2 {
font-size: 40px;
font-family: 'Varela Round';
color: #d3181f;
}
.main-section p {
letter-spacing: 1px;
line-height: 23px;
text-align: justify;
}
.note{
font-size: 16px;
}
.sidebar {
padding: 30px;
}
.sidebar img {
width:100%;
}
.carousel-inner > .item > img,
.carousel-inner > .item > a > img {
width: 70%;
margin: auto;
}
.carousel-inner > .item > img,
.carousel-inner > .item > a > img {
22
width: 50%;
margin: auto;
</style>
<div class="item">
<img src="images/clip3.jpg" alt="Chania" width="460" height="345">
</div>
<div class="item">
<img src="images/clip2.jpeg" alt="Flower" width="460" height="345">
</div>
<div class="item">
23
</a>
</div>
</section>
<!-- Banner Section Ends -->
24
<button type="button" class="close" data-dismiss="modal">×</button>
<h4 class="modal-title">Sign Up</h4>
</div>
<div class="modal-body">
<form method="POST" action="classes/register.php" onSubmit="return Validate()">
<div class="input-group">
<span class="input-group-addon"><i class="glyphicon glyphicon-user"></i></span>
<input id="email" name="username" type="email" class="form-control"
placeholder="Email">
</div>
<br>
<div class="input-group">
<span class="input-group-addon"><i class="glyphicon glyphicon-lock"></i></span>
<input id="password" name="password" type="password" class="form-control"
placeholder="Password">
</div>
<br>
<div class="input-group">
<span class="input-group-addon"><i class="glyphicon glyphicon-lock"></i></span>
<input id="cpassword" onKeyUp="Validate();" name="cpassword" type="password"
class="form-control" placeholder="Confirm Password">
</div>
<br>
<div class="input-group">
<span class="error" id="perror"></span>
</div>
<br>
<div class="input-group">
<input type="submit" value="Sign Up" name="submit" class="btn btn-success">
</div>
</form>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
25
</button>
</div>
<div class="modal-body">
<form method="POST" action="classes/login.php">
<div class="input-group">
<span class="input-group-addon"><i class="glyphicon glyphicon-user"></i></span>
<input id="email" type="email" class="form-control" name="email"
placeholder="Email">
</div>
<br>
<div class="input-group">
<span class="input-group-addon"><i class="glyphicon glyphicon-lock"></i></span>
<input id="password" name="password" type="password" class="form-control"
name="password" placeholder="Password">
</div>
<br>
<div class="input-group">
<input type="submit" value="Login" name="login" class="btn btn-success"
name="msg" placeholder="Additional Info">
Not a Member? <a href="#" data-toggle="modal" data-target="#LoginModal">Sign
Up</a>
</div>
</form>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
Login
<?php
require 'functions/functions.php';
require_once 'connection.php';
if (isset($_SESSION['user'])) {
header("location:home.php");
}
26
session_destroy();
session_start();
ob_start();
?>
<html>
<head>
<link rel = "icon" href =
"images/logo.png"
type = "image/x-icon">
<style>
body{
margin:5%;
color:#6a6f8c;
background-image: url("seamless.jpg");
font:600 16px/18px 'Open Sans',sans-serif;
}
*,:after,:before{box-sizing:border-box}
.clearfix:after,.clearfix:before{content:'';display:table}
.clearfix:after{clear:both;display:block}
a{color:inherit;text-decoration:none}
.button {
display: flex;
flex-flow: row wrap;
align-items: center;
}
.login-wrap{
width:100%;
margin:auto;
max-width:400px;
min-height:600px;
position:relative;
background:url(abc.png) no-repeat center;
box-shadow:10px 10px 15px 0 rgba(1,0,0,.24),0 17px 50px 0 rgba(0,0,0,.19);
}
.login-html{
width:100%;
height:12%;
position:absolute;
padding:100px 40px 500px 63px;
background:rgba(21, 39, 38, 0.83);
}
.login-html .sign-in-htm,
.login-html .sign-up-htm{
top:0;
left:0;
27
right:0;
bottom:0;
position:absolute;
transform:rotateY(180deg);
backface-visibility:hidden;
transition:all .4s linear;
}
.login-html .sign-in,
.login-html .sign-up,
.login-form .group .check{
display:none;
}
.login-html .tab,
.login-form .group .label,
.login-form .group .button{
text-transform:uppercase;
}
.login-html .tab{
font-size:25px;
margin-right:34px;
padding-bottom:11px;
margin:1 24px 15px 0;
display:inline-block;
border-bottom:9px solid transparent;
}
.login-html .sign-in:checked + .tab,
.login-html .sign-up:checked + .tab{
color:#d5e2dc;
border-color:#969eab;
}
.login-form{
min-height:355px;
position:relative;
perspective:1000px;
transform-style:preserve-3d;
}
.login-form .group{
margin-bottom:8px;
}
.login-form .group .label,
.login-form .group .input,
.login-form .group .button{
width:100%;
color:#121311;
display:block;
}
.login-form .group .input,
.login-form .group .button{
border:none;
28
padding:15px 20px;
border-radius:2px;
background:rgba(255,255,255,.1);
}
.login-form .group input[data-type="password"]{
text-security:circle;
-webkit-text-security:circle;
}
.login-form .group .label{
color:#3eeac1;
font-size:17px;
}
.login-form .group .button{
background:#1bad76;
}
.login-form .group label .icon{
width:15px;
height:15px;
border-radius:5px;
position:relative;
display:inline-block;
background:rgba(255,255,255,.1);
}
.login-form .group label .icon:before,
.login-form .group label .icon:after{
content:'';
width:10px;
height:2px;
background:#fff;
position:absolute;
transition:all .2s ease-in-out 0s;
}
.login-form .group label .icon:before{
left:3px;
width:5px;
bottom:6px;
transform:scale(0) rotate(0);
}
.login-form .group label .icon:after{
top:6px;
right:0;
transform:scale(0) rotate(0);
}
.login-form .group .check:checked + label{
color:#fff;
}
.login-form .group .check:checked + label .icon{
background:#1161ee;
}
29
.login-form .group .check:checked + label .icon:before{
transform:scale(1) rotate(45deg);
}
.login-form .group .check:checked + label .icon:after{
transform:scale(1) rotate(-45deg);
}
.login-html .sign-in:checked + .tab + .sign-up + .tab + .login-form .sign-in-htm{
transform:rotate(0);
}
.login-html .sign-up:checked + .tab + .login-form .sign-up-htm{
transform:rotate(0);
}
.hr{
height:2px;
margin:60px 0 50px 0;
background:rgba(255,255,255,.2);
}
.foot-lnk{
text-align:center;
}
.logo{
color:#663399;
font-size:25px;
font-family:verdana;
text-align:left;
margin-top:10px;
float:center;
margin:10px;
line-height:50px;
padding-left:15px;
}
.header{
width:105.5%;
height:60px;
background-color:#E6E6FA;
margin-top:-74.5px;
}
.gogte
{
font-family:verdana;
text-align:left;
margin-top:10px;
float:center;
margin:10px;
30
line-height:50px;
padding-left:15px;
}
</style>
</head>
<body>
</form>
<p style="text-align: center;font-size: 60px;font-family:cursive;color:black;text-
decoration:underline;border-radius:0.5px">BBMS</p>
<p style="text-align: center;font-size: 20px;font-style:bold;color: black;text-
decoration:underline"></p>
<div class="login-wrap">
<div class="login-html">
<div class="login-form">
<div class="sign-in-htm">
<div class="group">
<form action="home.php">
<label for="user" class="label">Username</label>
<input id="user" type="text" class="input" name="user">
</div>
<div class="group">
<label for="pass" class="label">Password</label>
<input id="pass" type="password" class="input" data-type="password"
name="pass">
</div>
<div class="group">
<input id="check" type="checkbox" class="check" checked>
<label for="check"><span class="icon"></span> Keep me Signed in</label>
</div>
<div class="group">
<input type="submit" class="button" name="sub" value="Log In">
</div>
<div class="group">
<a href="forgot.php">Forgot Password</a>
31
<?php
$user= $pass="";
if(isset($_POST['sub']))
{
$user=$_POST['user'];
$pass=$_POST['pass'];
$q=$db-> prepare("SELECT * from login where user='$user' && pass='$pass'");
$q->execute();
$res=$q->fetchAll(PDO::FETCH_OBJ);
if($res)
{
$_SESSION['user']=$user;
header("Location:home.php");
}
else
{
echo"<script>alert('Wrong email or password')</script>";
}
function test_input($data){
$data=trim($data);
$data=stripslashes($data);
$data=htmlspecialchars($data);
return $data;
}
?>
<div class="footer-left">
<h3></span></h3>
<div class="hr"></div>
<div class="foot-lnk">
<a href="forgot.html"></a>
</div>
</div>
32
Interface design
33
34
35
36
37
38
Conclusion:
All in all we hope that the Omani people get benefit from our system. We hope all
information we get it are what they want. Actually, all challenges and problems that
faced us was nothing. We say that after we finished our project. We recommend
hospitals, customers and employments in hospitals to use this system which will help
them to get most details about blood bank management system. Our system is benefit
for spend less effort and time on blood donation
39
ONLINE REFERENCE:
www.w3schools.com
https://www.php.net/
https://www.tutorialspoint.com/php/index.htm
https://www.codecademy.com/learn/learn-php
40