Anda di halaman 1dari 77

Final Report

On
Blood Donor

Associate Degree Program In Computer Science


Batch (2016-2018)

SUBMITTED TO:
Prof. Humair Razzaq
HOD Computer Science
The Superior College Lahore

SUBMITTED BY:
Muhammad Arham Adeel
Registration No:(SC18-ADPCS-F16-003)

Iftikhar Hussain
Registration No:(SC18-ADPCS-F16-019)
Advisor:
Lecturer Salman Haider
The Superior College Lahore

The Superior College Lahore, University Campus,


17 KM Raiwind Road,
Lahore, Pakistan

1
THE SUPERIOR COLLEGE LAHORE.
UNIVERSITY CAMPUS.

Superior University or Superior Group of Colleges is a chain of colleges and


universities in Pakistan.
It opened its branches in other cities of Pakistan after opening in Lahore.
The Superior College, Lahore is included in the list of
Higher Education Commission of Pakistan under the head of Recognized
Universities and Degree Awarding Institutions. College got Charter by Govt. of the
Punjab as degree awarding institute after having passed Superior College Bill from
the Punjab Provincial Assembly on May 31, 2003.
Superior University is also listed with the United Nations Educational, Scientific
and Cultural Organization (UNESCO)'s International Association of Universities.
It is the biggest achievement of Superior University that it wins yearly
competitions between different universities at national level.

2
VISION:
"Facilitating Superior Human Beings"

MISSION:
We are committed to enhance the potentials of students, faculty, staff and all
segments of the society by bringing a positive change in their personal and career
lives, motivating them for self-enlightenment through Quality Education,
Personality Development, True Professionalism and Career Planning; thus, adding
value to our nation, and ultimately to humanity.

May ALLAH Almighty help us!

3
ACKNOWLEDGEMENT:

Working on this project on


Blood Donor

was a source of Immense knowledge to me.


We would like to express my Sincere gratitude to

Prof Salman Haider


for him guidance and valuable support throughout the course of this project work.
We Acknowledge with a deep sense of gratitude , the encouragement and
inspiration received from our faculty members and sincere friends .

FROM:

M Arham Adeel
Iftikhar Hussain

4
Abstract:
Emergency situations, such as accidents, create an immediate and critical need for
specific blood types. In short, blood is a saver of all existing lives. So, in such emergency cases,
it is difficult for hospital staff to collect blood in case of shortage of blood without having
appropriate resources. The purpose of this study was to develop a blood management
information system to assist in the management of blood donor records and ease/or control the
distribution of blood in various parts of the country basing on the hospital demands. Our project
will help to finding the blood donations with constant time at single platform. This project is to
build a web-based, online blood donation system, named Blood Donor. That web application will
serve and the application aims at bringing the donors under one roof so that they can donate
blood easily. Currently the donors have to look for the blood donation camps that cause wastage
of time. That project will improve manual information saving technique and replace manual
methodology with digital web form application. Only Blood donors can register to upload its
profile and visitor can easily get information of donors without registering on our web
application. The entire project has been developed keeping in view of the distributed client
server computing technology, in mind. This system provides an online platform for a quick
access to the required donor. That web application allows to access the whole information about
blood donors, readily scalable and adaptable to meet the complex need of blood; it also supports
all the functionalities of blood donor system. The project includes two main modules donor, and
visitors. Through this application any person who is interested in donating the blood can register
himself in the same way if any organization wants to register itself with this site that can also
register. Donor module is for managing blood donation information and donor can change its
password and other information. If donor has forgot its password than he can reset, it by email
verification process. Donor can also delete its account. The whole project makes work easier for
every person using the software in their required category. Without quick and timely access to
donor records, lobbying and sensitization of blood donors becomes very difficult. The blood
management information system offers functionalities to quick access to donor records collected
from various parts of the Sahiwal city areas.

5
Table of Contents
1 INTRODUCTION ........................................................................................... 11
1.1 Introduction and history.............................................................................................. 12
1.2 Scope of Proposed Solution ......................................................................................... 12
1.3 Relevance to courses..................................................................................................... 13
1.3.1 Introduction to Programming (ICP) ................................................................... 13
1.3.2 Object Oriented Programming (OOP) ............................................................... 13
1.3.3 Database System (DB) .......................................................................................... 13
1.3.4 Software Engineering (SE) ................................................................................... 13
1.3.5 Computer Commufnication and Networking (CCN) ........................................ 13
1.3.6 Web Engineering................................................................................................... 14
1.4 Specific Requirements.................................................................................................. 14
1.4.1 Software Interface ................................................................................................. 14
1.4.2 Functional Requirement ....................................................................................... 14
1.4.3 Non Functional Requirement............................................................................... 16
1.5 Implementation of Blood Donor web ......................................................................... 16
1.5.1 Tool Phase .............................................................................................................. 16
1.5.2 Tools ....................................................................................................................... 17
1.6 Existing System............................................................................................................. 17
1.7 Limitations .................................................................................................................... 17
1.7.1 Advantages............................................................................................................. 18
1.8 Drawbacks of Existing System .................................................................................... 18
1.9 The Necessity ................................................................................................................ 19
2 Methodology & Workplan .............................................................................. 20
2.1 Existing Methodologies ................................................................................................ 21
2.1.1 Advantage and Disadvatages ............................................................................... 22
2.1.2 When to use Spiral model: ................................................................................... 22
2.1.3 Spiral model Diagram: ......................................................................................... 23
3 System Analysic & Design .............................................................................. 24
3.1 Use Cases ..........................................................................................................25
6
3.1.1 Registration ........................................................................................................... 25
3.1.2 Verification ............................................................................................................ 26
3.1.3 Login....................................................................................................................... 27
3.1.4 Profile ..................................................................................................................... 28
3.1.5 Profile Update........................................................................................................ 29
3.1.6 Password Change .................................................................................................. 30
3.1.7 Password Reset ...................................................................................................... 31
3.1.8 Account Delete ....................................................................................................... 32
3.1.9 Account Deactivate ............................................................................................... 33
3.1.10 Search ..................................................................................................................... 34
3.1.11 Heros View ............................................................................................................. 35
3.1.12 Contact and Bug Report ....................................................................................... 36
3.2 Planning & Scheduling ................................................................................................ 37
3.2.1 Gantt chart ............................................................................................................ 37
3.3 Class Diagram............................................................................................................... 38
3.4 Activity Diagram .......................................................................................................... 39
3.5 ER Diagram .................................................................................................................. 40
3.6 Detailed description of the components ..................................................................... 41
3.6.1 Components ........................................................................................................... 41
4 System Implementation ...................................................................................42
4.1 Introduction .................................................................................................................. 43
4.2. Code........................................................................................................................ 43
4.2.1 Signup Code........................................................................................................... 43
4.2.2 Login Code............................................................................................................. 45
4.2.3 Table Code ............................................................................................................. 46
4.2.4 Profile Code ........................................................................................................... 46
4.2.5 Find Profile ............................................................................................................ 48
4.2.6 Send Email ............................................................................................................. 52
4.2.7 Error Code ............................................................................................................. 53
4.3 Screen Shots .................................................................................................................. 55
4.3.1 Fetch/Find Blood Donor Module ......................................................................... 55

7
4.3.2 Contact Report and Bug Report From Module ................................................. 56
4.3.3 About ...................................................................................................................... 57
4.3.4 Registration ........................................................................................................... 61
4.3.5 Login....................................................................................................................... 62
4.3.6 Heros View ............................................................................................................. 63
4.3.7 Error Page ............................................................................................................. 64
4.3.8 Find Area ............................................................................................................... 65
4.3.9 Find Area On Mouse Over Reveal Phone Number ........................................... 66
5 System Testing ................................................................................................. 67
5.1 Unit Testing........................................................................................................................ 68
5.2 Integration Testing ............................................................................................................ 68

8
TABLE OF FIGURES
Figure 1: Spiral Model [1] ............................................................................................................ 23
Figure 2: Donor Registeation [2] .................................................................................................. 25
Figure 3 : Donor Verification[3] ................................................................................................... 26
Figure 4: Donor Login[4].............................................................................................................. 27
Figure 5: Donor Profile [5] ........................................................................................................... 28
Figure 6: Donor Profile Update[6]............................................................................................... 29
Figure 7: Donor Password Change[7].......................................................................................... 30
Figure 8: Donor Password Reset[8] ............................................................................................. 31
Figure 9: Donor Account Delete[9] .............................................................................................. 32
Figure 10: Donor Account Deactivate[10] .................................................................................. 33
Figure 11: Visitor Search For Blood Donor [11] .......................................................................... 34
Figure 12: Heros View[12] ........................................................................................................... 35
Figure 13: Visitor Contact and Bug Report[13] ........................................................................... 36
Figure 14: Gaint Chart [14]........................................................................................................... 37
Figure 15: Class diagram [15]....................................................................................................... 38
Figure 16: Activity Diagram[16] .................................................................................................. 39
Figure 17: ER diagram [17] ......................................................................................................... 40
Figure 18: Fetch/Find Blood Donor Module [18]......................................................................... 55
Figure 19: Contact Report and Bug Report From Module [19].................................................... 56
Figure 20: About [20] ................................................................................................................... 57
Figure 21: Registration [21] ......................................................................................................... 61
Figure 22: Login[22] ..................................................................................................................... 62
Figure 23: Hero’s View [23] ......................................................................................................... 63
Figure 24: Error Page [24] ........................................................................................................... 64
Figure 25: Find Area [25] ............................................................................................................ 65
Figure 26: Find Area On Mouse Over Reveal Phone Number [26] ............................................ 66

9
LIST OF TABLES
Table 1: Requirement .................................................................................................................... 15
Table 2: Login Module Test Case ................................................................................................. 69
Table 3: Signup Module Test Case ............................................................................................... 70
Table 4: Search Module Test Case ............................................................................................... 71
Table 5: Profile View Module Test Case ...................................................................................... 72
Table 6: Profile Update Module Test Case ................................................................................... 73
Table 7: Password Reset Module Test Case ................................................................................. 74
Table 8: Password Change Module Test Case .............................................................................. 75
Table 9: Acoount Delete Module Test Case ................................................................................. 76
Table 10: Account Deactivate Module Test Case......................................................................... 77

10
CHAPTER # 1
INTRODUCTION

11
1 INTRODUCTION
1.1 Introduction and history
Blood Donor is a web application suite designed to improve the quality and management
of blood bank and hospital health care management in the areas of health process analysis and
activity-based costing. That web application is developed for all operating systems those have a
web browser and internet connection also that can run on windows phone, Android, IOSX, Linux
etc. where blood finders, blood banks and hospitals can easily look for donors in their nearby
area who will be available in quick time. There will direct search on index(home) page to find
blood information’s. For search query login is not required. There is a login page or signup page
is attached. These pages are significant for gave your information for donation. donor and visitor
by-default on that page every intruder is a visitor. That type of account can check donors, search
for blood donation, get donors information and location. Donor account type is significant. If
anyone want to give their information for donation of blood then, first it has to registered on that
web application at signup details that person will gave its all significant information.
That project will help for all hospitals, Blood finders, Blood donors and every intruder can get
legal blood information with in constant interval. That account can check donors, search for
blood donation, get donors information and location. Donor account type is significant. If anyone
want to give their information for donation of blood then, first it has to registered on that web
application at signup details that person will gave its all significant information. In this
application we will able to execute live donation information’s and blood valuable data search.
There are major two account categories in our app; Donor, Finder/Visitor. They will locate as
donor as signed up account and finder maybe as direct visitor. Donors who are willing to donate
blood have to register in the system. While registering the donors are requested to give the details such as
Blood Group, Available days when the user can donate blood, Location, etc. When patient or visitor
search for a particular blood with particular area then system will automatically analyses the list of donors
who can donate blood for a particular patient and return a list of required donors.

1.2 Scope of Proposed Solution


My website will help to find the blood donors with efficient time and improve our
manual donor finding methodologies. I have been inspired for this website from Pak blood
donors and indiabloodgroup.in That such project is helping a lot to save thousands of lives and
we want to develop such a platform to save life’s in Pakistan/Sahiwal. Through this application
any person who is interested in donating the blood can register himself in the same way if any
organization wants to register itself with this site that can also register. Moreover, if any general
consumer wants to make request blood online he can also take the help of this site.

12
1.3 Relevance to courses
1.3.1 Introduction to Programming (ICP)
A program is a set of instructions that tell the computer to do various things; sometimes the
instruction it has to perform depends on what happened when it performed a previous
instruction. This section gives an overview of the two main ways in which you can give these
instructions, or “commands” as they are usually called. One way uses an interpreter, the other
a compiler. As human languages are too difficult for a computer to understand in an
unambiguous way, commands are usually written in one or other languages specially designed
for the purpose.

1.3.2 Object Oriented Programming (OOP)


Object-oriented programming (OOP) is a programming language model organized
around objects rather than "actions" and data rather than logic. Historically, a program has been
viewed as a logical procedure that takes input data, processes it, and produces output data. The
programming challenge was seen as how to write the logic, not how to define the data. Object-
oriented programming takes the view that what we really care about are the objects we want to
manipulate rather than the logic required to manipulate them.

1.3.3 Database System (DB)


A database is simply an organized collection of related data, typically stored on disk, and
accessible by possibly many concurrent users. Databases are generally separated into application
areas. For example, one database may contain Human Resource (employee and payroll) data;
another may contain sales data; another may contain accounting data; and so on. Databases are
managed by a DBMS.

1.3.4 Software Engineering (SE)


Software engineering is a detailed study of engineering to the design, development and
maintenance of software. Software engineering was introduced to address the issues of low-
quality software projects. Problems arise when a software generally exceeds timelines, budgets,
and reduced levels of quality. It ensures that the application is built consistently, correctly, on
time and on budget and within requirements. The demand of software engineering also emerged
to cater to the immense rate of change in user requirements and environment on which
application is supposed to be working.

1.3.5 Computer Communication and Networking (CCN)


Data communications refers to the transmission of this digital data between two or more
computers and a computer network or data network is a telecommunications network that
allows computers to exchange data. The physical connection between networked computing

13
devices is established using either cable media or wireless media. The best-known computer
network is the Internet.
This tutorial should teach you basics of Data Communication and Computer Network (DCN)
and will also take you through various advance concepts related to Data Communication and
Computer Network.

1.3.6 Web Engineering


Web Engineering is the application of systematic, disciplined and quantifiable approaches to
development, operation, and maintenance of Web-based applications. It is both a pro-active
approach and a growing collection of theoretical and empirical research in Web application
development.

1.4 Specific Requirements


1.4.1 Software Interface
 Search
Searching for donors and their information
 Area vise
 Blood type vise
 Fetched Result back
Gain results in form of webpage from Database using PHP through AI (Artificial
Intelligence)
 Login
Donor use login that will serve donor to update his/her information.
 Signup
Through that process donors will gave their information to donate blood
 Signup verification
After signup a verification email contains a confirmation code will send to that
donor and that donor have to verify that email.

1.4.2 Functional Requirement

HARDWARE AND SOFTWARE REQUIREMENTS:

For Server area


That area will cover that device were that web application will be online hosted; in our
case that will be considered as our development computer where that application will be
coded.

14
Requirement:

Software Requirements

IF IIS windows 95-10


IF Apache Server then all native cross platforms will
sported
PHP 7

Text Editor (Dreamweaver/Sublime text)

MySQL Database

For testing devices Required

Windows phone and OS

AN IOS Devices

Android phone

Hardware Requirements

Ram 512 MB

Any Architecture minimum 8742 Processor

Android phone

For Client area


That area will cover those persons who will use this website
a) Hardware requirement
This application can run all type of native cross to form and Operating System.
Minimum 128 MB Ram required.
b) Software Requirement:
That website can run all native browses.
But have to require minimum one browser.

15
1.4.3 Non-functional Requirement
 Fast response
 Fast result back from Data Base
 Auto check Blood Types for donation by PHP artificial intelligence bot
 Load Balance

1.5 Implementation of Blood Donor


For that web application we have required a web server with Database Management
system. I have used Wamp Web Server for that purpose and My SQL Data Base further
all tools and languages those are used in this project are following:
1.5.1 Tool Phase:

 HTML
Hypertext Markup Language is the standard markup language for creating static web
pages and also dynamic web applications.

 CSS
CSS is a language that describes the style of an HTML document.CSS describes how
HTML elements should be displayed on a webpage. User interface is generally
developed using CSS.

 JAVA SCRIPT
Java script is a high-level, object oriented, interpreted programming language. It is a
language which is also characterized as dynamic, weakly typed, prototype-based.

 BOOTSTRAP (FRAME WORK)


That is a framework written in HTML, CSS and JavaScript. That help to write mega
projects web applications in too much fast manners.

 MATERALIZE.CSS (FRAMEWORK FROM GOOGLE)


That is also an alternative of Bootstrap framework but Materialize is faster and
having more beautiful graphical user interface and developed by GOOGLE. That’s
why we will also use that in our project.

16
 PHP
Hypertext Preprocessor is a server-side scripting language designed for Web
development, but also used as a general-purpose programming language.

 Action Script
A scripting language to make more dynamic a HTML page and handle java script
animations. That will automatically have written by Adobe Animate CC tool.

1.5.2 Tools:
 Sublime Text 3
That is easy and fast tool to write PHP, HTML, CSS, JS and other native
languages that’s why we use that for major development and code modulation.
 Dreamweaver 2018
We initially take start form that tool to write HTML, CSS and JS because that tool
is more user friendly for beginner level. That’s why we take a start form that tool.
 Adobe Animate CC
That tool is used for animation modules like auto write text script, SVG
animations etc. That will help to write action script for animation.
 Adobe Photoshop
Logo, images, concept pages and prototypes for that web application will
designed in that tool.

1.6 Existing System


This Website is designed to help peoples in critical condition by providing them blood.
There will direct search on index(home) page to find blood information’s. Visitor can find blood
with their requirement. Visitor can search blood with blood vise and area vise search. For search
query login is not required. There is a login page or signup page is attached. These pages are
significant for gave your information for donation. That type of account can check donors, search
for blood donation, get donors information and location and get blood within a short interval of
time.

1.7 Limitations
There are some limitations for this web application. Those are following:

 If more than 3 thousand visitors access same page, then application show temporary
server down notification.

17
 There is a bug on contact page, after submit of form that application require a MX
EMAIL configured with blood donor web app. As MX record of any email right now
that’s why that application does not send any email to our server and do nothing after
form sending.
 There is a bug in hero’s page. The slider is interactive but for first time when it get load
its content move towards negative right margin but after a single click event its jQuery
get lodes and it adjusts itself at the center of hero’s page.

1.7.1 Advantages
That web application can

 Find blood donors in constant time with area vise and blood type restriction.
 Handle hounds of visitors plus query rate per second.
 Manage donors through registration process.
 Protect Donors information from over riding through secure md5 hash password.
 Information of Donor can only be changeable after secure login of donor.
 Delete and deactivate/suspend donor account through donor panel.
 Provide the facility of total visitors on a donor’s profile.
 Provide statistics of total registered users on that web application.
 Provide facility of registration for Donor and can gave all information of Donor
with in constant O (1) time to visitor. That’s why visitor don’t have to be register
he/she can check all user’s data without registration process.
 Provide easiest interference to users so that is a more user-friendly web application.
 Show information in pagination so it can fetch information with much faster
manners.

1.8 Drawbacks of Existing System


The major drawbacks of Blood Donor web application are:

 If more than 3 thousand visitors access same page, then application show temporary
server down notification.
 There is a bug on contact page, after submit of form that application require a MX
EMAIL configured with blood donor web app. As MX record of any email right now
that’s why that application does not send any email to our server and do nothing after
form sending.

18
1.9 The Necessity
 Increase managerial satisfaction

 Better operational efficiency

 Accurate Records

19
CHAPTER # 2
METHODOLOGY & WORK PLAN

20
2 Methodology & Workplan
2.1 Existing Methodologies

SPIRAL MODEL
“This Spiral model is a combination of iterative development process model and
sequential linear development model i.e. the waterfall model with a very high emphasis on risk
analysis. It allows incremental releases of the product or incremental refinement through each
iteration around the spiral.”

We have used spiral model because that model helps in parallel process where we both of team
members will easily divide that project into modules and will able to work on parallel at same
time that model also provide functionality of change management. If any change is required than
that is the only model where just those models are changed and that process does not effect on
any other module. Here all phases are separated but parallel can process. That’s why that model
gave more reliability and less time to develop that web application in team. Due to all such
reasons we have used spiral model in our project.

The spiral model is similar to the incremental model, with more emphasis placed on risk
analysis. The spiral model has four phases: Planning, Risk Analysis, Engineering and
Evaluation. A software project repeatedly passes through these phases in iterations (called
Spirals in this model). The baseline spiral, starting in the planning phase, requirements are
gathered and risk is assessed.

1. Planning Phase:

Requirements are gathered during the planning phase. Requirements like ‘BRS’ that is
‘Business Requirement Specifications’ and ‘SRS’ that is ‘System Requirement
specifications’.

2. Risk Analysis:

In the risk analysis phase, a process is undertaken to identify risk and alternate solutions.
A prototype is produced at the end of the risk analysis phase. If any risk is found during
the risk analysis, then alternate solutions are suggested and implemented.

21
3. Engineering Phase:

In this phase software is developed, along with testing at the end of the phase. Hence in
this phase the development and testing is done.

4. Evaluation phase:

This phase allows the customer to evaluate the output of the project to date before the
project continues to the next spiral.

2.1.1 Advantages and Disadvantages of Spiral model:

Advantages:

 High amount of risk analysis hence, avoidance of Risk is enhanced.


 Good for large and mission-critical projects.
 Strong approval and documentation control.
 Additional Functionality can be added at a later date.
 Software is produced early in the software life cycle.

Disadvantages:

 Can be a costly model to use.


 Risk analysis requires highly specific expertise.
 Project’s success is highly dependent on the risk analysis phase.
 Doesn’t work well for smaller projects.

2.1.2 When to use Spiral model:

 When costs and risk evaluation is important


 For medium to high-risk projects
 Long-term project commitment unwise because of potential changes to economic
priorities
 Users are unsure of their needs
 Requirements are complex
 New product line
 Significant changes are expected (research and exploration)

22
2.1.3 Spiral Model Diagram

23
CHAPTER # 3
SYSTEM ANALYSIS & DESIGN

24
3 System Analysis & Design
3.1 Use Cases
Use cases of Blood Donor are as following:

3.1.1 Donor Registration:

Registration

Donor

PRE-CONDITION:
1. User have to provide valid email address and name and have to provide a correct
username and password.
2. User have to provide all required information other profile can also be update able after
registration.

POST CONDITION:
1. If details are accurate then send verification email and save user information in
database.
2. Account have to activate and show after verification and single click on verification
link, link mush be expired.
3. Verification link should be expiring after 15 minutes of registration.
4. There should be an option for “resend verification” link.

ALTERNATIVE PATH:
1. On wrong entries of registration id and invalid email address, system shows an error
message to user to re-enter valid details.

25
2. System have to show strength of password and provide suggestion for stronger
password.
3. If Donor already exists, then system should have to show message for existing user
and Display login link for such Donor.

CONSTRAINTS:
If Donor email already exist, then show a message of already exist donor and If username is
already registered then gave an error message of “not available”.

3.1.2 Donor Profile Verification:

Verifivation

Donor

PRE CONDITION:
1. Donor must verify their account.
2. Send verification link in email address.
3. Click on verification link.

POST CONDITION:
1. Donor can click on the verification link.
. .

26
BASIC PATH:
1. Open email account.
2. Donor can receive the verification link on inbox.
3. Donor can click the link to verify your account.
4. After click, account will be verifying.

CONSTRAINTS:
Donor must Verify account through verification link in email address.

3.1.3 Donor Login:

Login

Donor

PRE CONDITION:
1. Donor must enter correct Username and password.
2. After enter correct details the user will click the login button.

POST CONDITION:
1. After login donor profile will be shown.
2. User can manage their account profile after login.

27
BASIC PATH:
1. Type username/email address and password for login.
2. Click the login button.
3. System verifies the user.
4. If user verified through email, then login to this application.
5. For a verified user the entered details must be correct.

CONSTRAINTS:
1. If username/email address or password is wrong, then a message should be displayed
that user email or password is wrong and user does not exist.
2. If user not verified through email, then also show error message.

3.1.4 Donor Profile:

login

<<include>>

Donor

Profile

PRE CONDITION:
1.Donor must login.

28
POST CONDITION:
1. In case donor can update picture, password.

BASIC PATH:
1. Donor enters user email address and password to login.
2. If donor wants to change the profile go to setting.
3. Click on change the profile button.
4. Select the profile picture in user’s gallery.
5. Click on upload button.
6. Profile picture will change.
7. The changed profile will save in the database.
8. Refresh to check whether the profile has changed or not.

CONSTRAINTS:
1. Donor must login to change profile.

3.1.5 Donor Profile Update:

Login

Donor <<include>>

Profile update

29
PRE CONDITION:
1. Donor must Login.

POST CONDITION:
1. Donor can delete data of the profile assigned to him.
. .

BASIC PATH:
1. Enter email address and password for login.
2. Donor will click on delete button.
3. System will provide option to select files.
4. Donor will select required data that is wants to delete.
5. Click on delete button.
6. Information will be update in database.

CONSTRAINTS:
Donor must login to perform those tasks.

3.1.6 Donor Password change:

Login

<<include>>

Donor
Password change

30
PRE CONDITION:

1. Donor must login.


2. User must enter previous password to reset a new password.

POST CONDITION:

1. Donor can also use his email id to reset password in case of forgetting password.

BASIC PATH:
1. Type correct username and password then donor login.
2. After donor/user can change the password.
3. Click on change password button. Then Donor can enter new password.
4. Password saved to the database by replacing the existing password.
5. Donor can receive a message to change a password successfully.

CONSTRAINTS:

1. Donor must login to change a password.


2. Donor must receive a message to change a password successfully.

3.1.7 Donor Password reset:

Login

<<extend>>
Donor

Password Reset

31
PRE CONDITION:
1. Donor can click on login page and after click on password reset.

POST CONDITION:

1. Donor can reset password without login your account.


. .

BASIC PATH:
1. Donor can click the reset password button.
2. After donor can reset password.
3. Donor can reset password through email.
4. Reset password code can be send in email address.
5. Donor can click the link/code.
6. After you can enter new password.
7. Password can be reset.

CONSTRAINTS:
Donor must have email account to perform those tasks.

3.1.8 Donor account delete:

Login

<<include>>

Donor

Delete

32
PRE CONDITION:
1. User must Login.

POST CONDITION:
1. Donor can delete account through email address or donor can click the delete button to
delete account
. .

BASIC PATH:
1. Enter email address and password for login.
2. Donor will click on delete button.
3. Click on delete button.
4. Account will be deleted.

CONSTRAINTS:
1. Instructor must login to perform those tasks.

3.1.9 Donor account deactivate:

Login

<<include>>

Donor Deactivate

33
PRE CONDITION:
1. User must Login.

POST CONDITION:
1. Donor can deactivate account through email address or donor can click the deactivate
button to deactivate account
. .

BASIC PATH:
1. Enter email address and password for login.
2. Door can find the deactivate button.
3. Donor will click on deactivate button.
4. Click on deactivate button.
5. Account will be deactivating.

CONSTRAINTS:
1. Instructor must login to perform those tasks.

3.1.10 Visitor search for Blood Donors:

Login

<<extend>>

Donor
Search

34
PRE CONDITION:

User must be adding home page to find donors.

POST CONDITION:

A filtered result for appropriate donors must be served for visitor

. .
BASIC PATH:

User can have filtered donor through area wise or blood type wise or through both of
these.

CONSTRAINTS:

Result must be appropriate and accurate depends on filter constraints.

3.1.11 Hero’s View

Home

<<extend>>

Donor
Heros

35
PRE CONDITION:

 Donors must login.


 Visitor can see the donors picture who donate blood

POST CONDITION:
 Donors will become a hero after donating blood

BASIC PATH:
 When door donate its blood its will be a hero.

CONSTRAINTS:
 All blood donators will be shown in hero’s page

3.1.12 Visitor contact and bug report:

Send contact / report bug

Donor

PRE CONDITION:
 Visitor must be at contact form and fill at least name contact and message box to send
contact form or report a bug.

POST CONDITION:
 An email to developer must sent after form submission.

36
BASIC PATH:
 A sent message will display to visitor after email successful sent otherwise that will
show an error message

CONSTRAINTS:
IF There is no email address than don’t sent form.

3.2 Planning & Scheduling


3.2.1 Gantt chart

Febuarary March April May,June July, August


6

2 4

1 2

0
Planning, Purposal design Phase implementation Testing documentationa
Submitted

37
3.3 Class Diagram

Donor
-username
-password
-time
-signupinfo[]
+find/search()
+Login()
+Signup()
UpdateProfiile()
Resetpassword()
deactivateAccont()

Visitor
-visittime
-device
-PublicIpaddress
+find/Search()
+contact_Form/Report_Bug()
Signup():Donor
Login():Donor
Figure 1: Class diagram [12]

38
3.4 Activity Diagram

Blood Donor

Deactivate_and_Delete_Ac
Login&Signup() UpdateProfile() Search()
count()

if exists then
Go to Profile
Find Donor

Login

Get Donor
True information
Retry

False
UpDate Information

SignUp

Deactivate Account

Chane Profile
Information
Delete Account
Phase

39
3.5 ER Diagram

Donor

PK Email

Password

Username

Bloodgroup

address

city

phonenumber

firstname

Secondname

deactivestate

verified

visitedby

Figure: ER diagram []

40
3.6 Detailed description of the components
3.6.1 Components

Visitor:
 Fetch/ Find Blood Donors module
 Contact Form and Bug Report Form module
 Get Donors information module

Donor:
 Registration
 Login
 Profile view
 Profile update
 Password reset
 Password change
 Account Delete
 Account Deactivate
 Account visits

41
CHAPTER # 4
SYSTEM IMPLEMENTATION

42
4 System Implementation
4.1 Introduction
Project Save Life Connect is an innovative approach to address global health. We provide
immediate access to blood donors in Sahiwal 24 hours a day, 7 days a week! Save Life Connect
is one of several community organizations working together as a network that respond to
disasters or emergency situations in an efficient manner.

What we do?
The ultimate goal of this project is to provide an easy-to-use, easy-to-access, efficient, and
reliable way to get life-saving blood, free of cost. Save Life Connect works with network
partners to connect blood donors. Our network of volunteer blood donors is ready to help save
lives any time, any place. Our automated system works efficiently whenever someone needs a
blood transfusion. Simply search about blood with blood group vise and area vise search than All
related required blood list will be shown at the page.

4.2 Code
4.2.1 Signup Code:

<?php

include(<?php

define('DB_SERVER', 'localhost');

define('DB_USERNAME', 'root');

define('DB_PASSWORD', '');

define('DB_DATABASE', 'blooddonor');

$db =
mysqli_connect(DB_SERVER,DB_USERNAME,DB_PASSWORD,DB_DATABASE);

?> );

session_start();

//global defined variables

if ($_SERVER["REQUEST_METHOD"] == "POST") {

43
$myusername = mysqli_real_escape_string($db,$_POST['myusername']);

$mypassword = md5(mysqli_real_escape_string($db,$_POST['mypassword']));

$email = mysqli_real_escape_string($db,$_POST['email']);

$phone = mysqli_real_escape_string($db,$_POST['phone']);

$fname = mysqli_real_escape_string($db,$_POST['fname']);

$lname = mysqli_real_escape_string($db,$_POST['lname']);

$address = mysqli_real_escape_string($db,$_POST['address']);

$city = mysqli_real_escape_string($db,$_POST['city']);

$blood = mysqli_real_escape_string($db,$_POST['myblood']);

$sql="INSERT INTO
donor(username,password,email,phone,fname,lname,address,city,blood,verified,deactive)
values('$myusername','$mypassword','$email','$phone','$fname','$lname','$address','$city','$blood
','unverified','active')";

$result = mysqli_query($db,$sql);

$_SESSION['login'] = "true";

$_SESSION['login_user'] = $myusername;

$_SESSION['email'] = $email;

header("location: profile.php");

else {

echo "Restricted area 502";

?>

44
4.2.2 Login Code:

<?php

include(<?php

define('DB_SERVER', 'localhost');

define('DB_USERNAME', 'root');

define('DB_PASSWORD', '');

define('DB_DATABASE', 'blooddonor');

$db = mysqli_connect(DB_SERVER,DB_USERNAME,DB_PASSWORD,DB_DATABASE);

?>);

session_start();

//global defined veriavles

if ($_SERVER["REQUEST_METHOD"] == "POST"){

$username = mysqli_real_escape_string($db,$_POST['username']);

$password = mysqli_real_escape_string($db,$_POST['password']);

$sql = "SELECT username FROM user WHERE username = '$username' or email = '$username'
and password = '$password'";

$result = mysqli_query($db,$sql);

$row = mysqli_fetch_array($result,MYSQLI_ASSOC);

$active = $row['active'];

$count = mysqli_num_rows($result);

if($count == 1) {

session_register("username");

45
$_SESSION['login_user'] = $myusername;

header("location: profile.php");

}else {

$error = "Your Login Name or Password is invalid";

else {

die("Restricted 502 ERROR");

?>

4.2.3 Table Code


CREATE TABLE donor (`username` VARCHAR(30) NOT NULL ,`password` VARCHAR(32)
NOT NULL , `email` VARCHAR(35) NOT NULL , `phone` VARCHAR(20) NULL , `fname`
VARCHAR(40) NOT NULL , `lname` VARCHAR(40) NOT NULL , `address`
VARCHAR(100) NOT NULL , `city` VARCHAR(50) NOT NULL , `blood` VARCHAR(10)
NOT NULL , `verified` VARCHAR(10) NOT NULL , `deactive` VARCHAR(10) NOT NULL ,
PRIMARY KEY (`username`), UNIQUE (`email`));

4.2.4 Profile Code


<?php

session_start();

if(!isset($_SESSION['login']))

{$_SESSION['error']="Sorry your are not loged in Please Login First to visit this page";

header('Location: error.php');}

$fname=$_SESSION['fname'];
46
$lname=$_SESSION['lname'];

?>

<!DOCTYPE html>

<html>

<head>

<meta charset="utf-8">

<meta http-equiv="X-UA-Compatible" content="IE=edge">

<meta name="viewport" content="width=device-width, initial-scale=1">

<title>Blood Donor:Donate your Blood</title>

<!--My project info-->

<?php require("inc/head.php") ?>

<body class="red lighten-5">

<!--My Program starts from here-->

<!--here is my navbar-->

<?php require("inc/header.php") ?>

<!--My nav bar Ends Here-->

<div class="col s1 m1">

<a href="inc/logout.php" class="btn right hoverable" >Logout</a>

</div>

<br><br>

<!--Here is My admin login page-->

<main>

47
<div class="container">

<div class="row">

<div class="col s12 m12 center">

<h3 class="red-text"><?php echo("Welcome Back: ".$fname." ".$lname."");?></h3>

<p><?php

?></p>

</div>

</div>

</div>

</main>

<!--Here is my Footer-->

<?php require("inc/footer.php"); ?>

</body>

</html>

4.2.5 Find Profile


<?php

if(!isset($_GET['myblood']))

die("<h1 style='color:red;'>Sorry Not Allowed to enter in this page Enter Blood Information to
get results</h1><script>window.location.href='index.html';</script>");

if (isset($_GET['myblood']))

$blood=$_GET['myblood'];

48
if (isset($_GET['farea']))

$area=$_GET['farea'];

if (isset($_GET['fcity']))

$city=$_GET['fcity'];

//find blood donors

if ($city=="" && $area=="") {

echo "".$blood;

?>

<!DOCTYPE html>

<html>

<head>

<meta charset="utf-8">

<meta http-equiv="X-UA-Compatible" content="IE=edge">

<meta name="viewport" content="width=device-width, initial-scale=1">

<title>Blood Donor:Donate your Blood</title>

<!--My project info-->

<?php require("inc/head.php") ?>

49
<body>

<!--My Program starts from here-->

<!--here is my navbar-->

<?php require("inc/header.php") ?>

<!--My nav bar Ends Here-->

<br><br>

<!--Here is My admin login page-->

<main>

<div class="container">

<div class="row">

<div class="col s12 m12">

<h2 class="header blue-text" style="font-size:28px;"><span


style="color:#112340;">22</span> Blood Donors: For <span class="red-
text">AB+</span></h2>

<div class="card horizontal hoverable">

<div class="card-image" style="background-color:#FE0000">

<img src="wp content/img/donorPic.jpg" class="responsive-img">

</div>

<div class="card-stacked">

<div class="card-content">

<h4>Name</h4>

<h3>BLOOD GROUP: <span


style="color:#FE0000;">O+</span></h3>

<p><i class="material-
icons">location_on</i> <span style="text-decuration:none;"><a href="#">any
50
address</a></span><br> <i class="material-icons">location_city</i> <span class="deep-orange-
text">Sahiwal</span></p>

</div>

<div class="card-action center #ffebee red lighten-5">

<a href="#" class="btn" style="background-color:#FE0000;"


onmouseover="this.innerHTML='<i class=material-icons>call</i> +92038324656';"
onmouseout="this.innerHTML='<i class=material-icons>call</i>';"><i class='material-
icons'>call</i></a>

<a href="#" class="btn"><i


class="material-icons">mail</i> themsk@usa.com</a>

</div>

</div>

</div>

</div>

</div>

</div>

</main>

<!--Here is my Footer-->

<?php require("inc/footer.php") ?>

</body>

</html>

4.2.6 Send Email Code


51
<?php

//if variable are filled with information and method is post then do this

if ($_SERVER["REQUEST_METHOD"] == "POST") {

try{

session_start();

//Email information

$admin_email = "mih@asia.com";

if(isset($_POST['pemail']))

$email = $_POST['pemail'];

$subject ="Mail From Report aand bug area";

$comment = $_POST['message'];

if(isset($_POST['pcontact'])){

$contact=$_POST['pcontact'];

$comment.=$contact;

//send email

mail($admin_email, "$subject", $comment, "From:" . $email);

//Email response

$_SESSION['error']="Mail successfully send. Thank you for contacting us!";

catch(Exception $e){

$_SESSION['error']='Caught exception: '. $e->getMessage(). "\n";

else{

52
$_SESSION['error']="Restricted area";

header("location: error.php");

?>

4.2.7 Error Code


<?php

session_start();

if(!isset($_SESSION['error']))

{header('Location: index.html');}

?>

<!DOCTYPE html>

<html>

<head>

<meta charset="utf-8">

<meta http-equiv="X-UA-Compatible" content="IE=edge">

<meta name="viewport" content="width=device-width, initial-scale=1">

<title>Blood Donor:Donate your Blood</title>

<!--My project info-->

<?php require("inc/head.php") ?>

<body class="red lighten-5">

<!--My Program starts from here-->

53
<!--here is my navbar-->

<?php require("inc/header.php") ?>

<!--My nav bar Ends Here-->

<br><br>

<!--Here is My admin login page-->

<main>

<div class="container">

<div class="row">

<div class="col s12 m12 center">

<h1 class="red-text">ERROR FOUND</h1>

<p><?php

if(isset($_SESSION['error'])){$error=$_SESSION['error'];echo $error; }?></p>

<br><a href="index.html" class="btn">Back To Home</a>

</div>

</div>

</div>

</main>

<!--Here is my Footer-->

<?php require("inc/footer.php"); ?>

</body>

</html>

54
4.3 Screen Shots
4.3.1 Fetch/Find Blood Donor Module

55
4.3.2 Contact Form and Bug Report Form module

56
4.3.3 About

57
58
59
60
4.3.4 Registration

61
4.3.5 Login

62
4.3.6 Hero’s view

63
4.3.7 Error Page

64
4.3.8 Find Area

65
4.3.9 Find Area On Mouse Over Reveal Phone Number

66
CHAPTER # 5
SYSTEM TESTING

67
5. System Testing

System Testing is the testing of a complete and fully integrated software product. Usually
software is only one element of a larger computer based system. Ultimately, software is
interfaced with other software/hardware systems. System Testing is actually a series of different
tests whose sole purpose is to exercise the full computer based system.

Two Category of Software Testing

 Black Box Testing


 White Box Testing

System test falls under the black box testing category of software testing.

White box testing is the testing of the internal workings or code of a software application. In
contrast, black box or System Testing is the opposite. System test involves the external workings
of the software from the user's perspective.

 Unit testing:
Unit testing performed on each module or block of code during
development. Unit Testing is normally done by the programmer who writes the code.

 Integration testing
Integration testing done before, during and after integration of a new module into
the main software package. This involves testing of each individual code module.
One piece of software can contain several modules which are often created by several
different programmers. It is crucial to test each module's effect on the entire program
model.

68
Login Module Test Case TEST CASE

Project Name Blood Donor Test Designed by M.Iftikhar, M.Arham


Test Case ID Testc_1 Test Designed date 6/5/2018
Test Priority Medium Test Executed by M.Iftikhar, M.Arham
Test Execution
Module Name Login System 7/5/2018
date
Test Title Verify with valid login user name and password and then send to main application.

Description

Make sure that user can easily login.

Pre-conditions

User has valid username and password

Dependencies

User should have any mail account otherwise create first mail account

Expected
Step Test Steps Test Data Actual Result Status Notes
Result
1 Navigate to login User=example@g User should be able
User is navigated pass
page mail.com to login
2 Provide invalid User=notexist@g No user found signup User navigated to
pass
username mail.com first signup page
3 Navigate to Navigated with
Valid username Password:1234 pass
dashboard success

Post-conditions

User is validated with database and successfully login to account. The account session details are logged in
database.

69
Signup Module Test Case TEST CASE

Project Name Blood Donor Test Designed by M.Iftikhar, M.Arham


Test Case ID Testc_2 Test Designed date 8/5/2018
Test Priority Medium Test Executed by M.Iftikhar, M.Arham
Test Execution
Module Name Signup System 9/5/2018
date
Test Title Verify with valid email and password.

Description

Make sure that user can easily signup.

Pre-conditions

User has valid email.

Dependencies

User should have an email account otherwise first create mail account.

Expected
Step Test Steps Test Data Actual Result Status Notes
Result
1 Navigate to User=example@g User should be able
User is navigated pass
signup page mail.com to signup
2 Verification code User navigated to
User=verify code Successfully Signup pass
sent to mail login page
3 Navigate to Navigated with
Valid username Password:1234 pass
dashboard success

Post-conditions

User is validated with database and successfully verify to account. The account session details are signup in
database.

70
Search Module Test Case TEST CASE

Project Name Blood Donor Test Designed by M.Iftikhar, M.Arham


Test Case ID Testc_3 Test Designed date 12/5/2018
Test Priority Medium Test Executed by M.Iftikhar, M.Arham
Test Execution
Module Name Search System 13/5/2018
date
Test Title User should verify required blood group to contact blood donor.

Description

User can easily search by area vise and blood group vise.

Pre-conditions

User should write valid area or blood group.

Dependencies

User should confirm which blood group is needed.

Expected
Step Test Steps Test Data Actual Result Status Notes
Result
1 All a+ blood donors
Navigate to
User=a+ information will User is navigated pass
Signup page
show.
2 Provide invalid User navigated to
User=c+ No result found pass
blood Group search

Post-conditions

User search for valid area vise or blood group vise to fetch out result.

71
Profile View Module Test Case TEST CASE

Project Name Blood Donor Test Designed by M.Iftikhar, M.Arham


Test Case ID Testc_4 Test Designed date 20/5/2018
Test Priority Medium Test Executed by M.Iftikhar, M.Arham
Test Execution
Module Name Profile View System 21/5/2018
date
Test Title User must have to sign up successfully then page is redirected to profile view.

Description

Profile View can be shown after login .

Pre-conditions

User must have to login first.

Dependencies

User must have to create profile through Sign up.

Expected
Step Test Steps Test Data Actual Result Status Notes
Result
1 Navigate to User information will
User is navigated pass
profile page be shown

Post-conditions

All user information is shown in profile view. User Can be able to change its information

72
Profile Update Module Test Case TEST CASE

Project Name Blood Donor Test Designed by M.Iftikhar, M.Arham


Test Case ID Testc_5 Test Designed date 25/5/2018
Test Priority Medium Test Executed by M.Iftikhar, M.Arham
Test Execution
Module Name Profile Update System 26/5/2018
date
Test Title User must have to write Accurate Information.

Description

Make sure that user information is correct.

Pre-conditions

User must update right information.

Dependencies

User should have to update valid Information.

Expected
Step Test Steps Test Data Actual Result Status Notes
Result
1 Navigate to Information is
User=change data User is navigated pass
update page Successfully Updated
2 Confirm Navigate to Navigated with
Password:1234 pass
Password dashboard success

Post-conditions

User must verify its information and update accurate information.

73
Password Reset Module Test Case TEST CASE

Project Name Blood Donor Test Designed by M.Iftikhar, M.Arham


Test Case ID Testc_6 Test Designed date 5/6/2018
Test Priority Medium Test Executed by M.Iftikhar, M.Arham
Test Execution
Module Name Password reset System 6/6/2018
date
Test Title User have to confirm its identity to reset password.

Description

Make sure that user reset its own id.

Pre-conditions

User has valid confirmation Identity.

Dependencies

User should have any recovery mail or contact information through which password will reset.

Expected
Step Test Steps Test Data Actual Result Status Notes
Result
1 User is navigated to
Navigate to User=recovery User should be able
create new pass
Forget Password address to reset password
password
2 Provide invalid write valid email or
User=not exist Not able to reset. pass
recovery address phone

Post-conditions

User must be able to reset its own account by verifying its recovery mail.

74
Password Change Module Test Case TEST CASE

Project Name Blood Donor Test Designed by M.Iftikhar, M.Arham


Test Case ID Testc_7 Test Designed date 12/6/2018
Test Priority Medium Test Executed by M.Iftikhar, M.Arham
Test Execution
Module Name Password Change System 13/6/2018
date
Test Title User must have to verify its Identity to change password.

Description

User must have to login first to change password.

Pre-conditions

User must login and verify its identity.

Dependencies

User must have to verify its old password to change password.

Expected
Step Test Steps Test Data Actual Result Status Notes
Result
1 Navigate to User=new
Confirm password User is navigated pass
change password password
2 conform Old User=old Password changed User navigated to
pass
password password successfully profile

Post-conditions

User has successfully changed its password after verifying its identity

75
Account Delete Module Test Case TEST CASE

Project Name Blood Donor Test Designed by M.Iftikhar, M.Arham


Test Case ID Testc_8 Test Designed date 20/6/2018
Test Priority Medium Test Executed by M.Iftikhar, M Arham
Test Execution
Module Name Account Delete System 21/6/2018
date
Test Title User must have to login to delete its account.

Description

User can delete its account by verification

Pre-conditions

User has valid password to parentally delete account.

Dependencies

User must know account password to delete account.

Expected
Step Test Steps Test Data Actual Result Status Notes
Result
1 Navigate to
Account is deleted User is native to
conform User=password pass
successfully create account
password page

Post-conditions

Account information will be deleted from database.

76
Account Deactivate Module Test Case TEST CASE

Project Name Blood Donor Test Designed by M.Iftikhar, M.Arham


Test Case ID Testc_9 Test Designed date 22/6/2018
Test Priority Medium Test Executed by M.Iftikhar, M.Arham
Test Execution
Module Name Account Deactivate System 23/6/2018
date
Test Title User must register to deactivate its account.

Description

User can deactivate account by verifying its identity.

Pre-conditions

User must have login to deactivate its account

Dependencies

User must have to login and verify its password for deactivation

Expected
Step Test Steps Test Data Actual Result Status Notes
Result
1 Account is
Navigate to User=verify User is navigated to
successfully pass
deactivate Page password home page.
deactivated
2 Provide invalid User=wrong User navigated to
Confirm Password pass
password password confirmation page

Post-conditions

Account will be disabled.

77

Anda mungkin juga menyukai