KEMBAR78
Project Dissertation | PDF | World Wide Web | Internet & Web
0% found this document useful (0 votes)
40 views151 pages

Project Dissertation

The document outlines a project report titled 'LIFE-LINKER' submitted by students of St. Xavier's College, Kolkata, for a Blood Bank & Donation Management System. The system aims to improve blood donation processes by managing donor information and facilitating blood requests through a web application. It includes sections on project objectives, technology surveys, system design, and implementation details, emphasizing the importance of data management in enhancing blood donation efficiency.

Uploaded by

GiibertDas
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
40 views151 pages

Project Dissertation

The document outlines a project report titled 'LIFE-LINKER' submitted by students of St. Xavier's College, Kolkata, for a Blood Bank & Donation Management System. The system aims to improve blood donation processes by managing donor information and facilitating blood requests through a web application. It includes sections on project objectives, technology surveys, system design, and implementation details, emphasizing the importance of data management in enhancing blood donation efficiency.

Uploaded by

GiibertDas
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 151

St.

Xavier’s College (Autonomous), Kolkata

B.Sc. Students:
Semester VI – Chapters 1 to 7

30, Mother Teresa Sarani, Kolkata 700016

Department of Computer Science


www.sxccal.edu | csc@sxccal.edu | 2255 1271

LIFE-LINKER

St. Xavier's College


[Autonomous], Kolkata
LIFE-LINKER
by Student’s-
Sylvain Das
Ayush Raj Minz
Madeti Daya Sagar Rao

Under Guidance of –

Prof. Dr. Anal Acharya Sir

Submitted to the Department of Computer Science in partial fulfilment of the requirements for
the degree of M/B.Sc. Computer Science 30, Mother Teresa Sarani, Kolkata 700016.
St. Xavier’s College (Autonomous), Kolkata

CERTIFICATE OF AUTHENTICATED WORK

This is to certify that the project report entitled LIFE-LINKER submitted to


Department of Computer Science , ST. XAVIER'S COLLEGE [AUTONOMOUS],
KOLKATA, in partial fulfilment of the requirement for the award of the
degree of Bachelor of computer science (B.Sc.) is an original work carried out by:

Name Roll No Registration No

SYLVAIN DAS 542 A01-1112-0930-21

AYUSH RAJ MINZ 561 A01-1132-0947-21

MADETI DAYA SAGAR RAO 557 A01-1112-0943-21

under my guidance. The matter embodied in this project is authentic and is genuine
work done by the student and has not been submitted whether to this College or to
any other Institute for the fulfilment of the requirement of any course of study.

...…………………………………. ...………………………………….

Signature of the Supervisor Signature of the Head of the Department

…………..………………………..
Name of the Supervisor

Date: ……………….. Date: …………………

Name and Signature of the Project Team members:


St. Xavier’s College (Autonomous), Kolkata

Name Signature

1……………………………….. ……………………………..……..

2……………………………….. …………………………………….

3……………………………….. ……………………………………
St. Xavier’s College (Autonomous), Kolkata

ACKNOWLEDGEMENT

We would like to express our heartfelt gratitude to all those who have supported
and guided us throughout this project.

Firstly, we would like to extend our gratitude to Rev. Fr. Dr. J. Felix Raj, Vice
Chancellor of St. Xavier’s University, Kolkata, and former Principal of St.
Xavier’s College (Autonomous), Kolkata, for his unwavering support and
encouragement.

We are also grateful to Rev. Fr. Dominic Savio, the current Principal of the
Institution, and Dr. Romit Beed, Head of the Department of Computer Science,
for providing us with the opportunity to work on this project and for their
constant guidance and support.

We are immensely thankful to our mentor, Professor Dr. Anal Acharya, whose
expert advice and guidance were invaluable at every step of this journey.

We also acknowledge the cooperation between our team members and


appreciate each member's contribution to making this project successful.

Last but not least, we would like to express our appreciation to all the teaching
and non-teaching staff of the Department of Computer Science for their
unwavering support and help, without whom this project would not have been
completed successfully.

Once again, we extend our heartfelt gratitude to everyone who has contributed
to making this project a success.
St. Xavier’s College (Autonomous), Kolkata

TABLE OF CONTENTS

Sl. No Topic Pg. no


1. INTRODUCTION 6

1.1 Abstract 6

1.2 Background 8

1.3 Objectives 8

1.4 Purpose, Scope & Applicability 9

2 SURVEY OF TECHNOLOGIES 10-12

3 9-14
Technical Specification
3.1 User specification and software requirements

3.2

4 SYSTEM DESIGN 14-20

4.1 ER Diagram

4.2 Data flow Diagram

4.3 Basic Modules


St. Xavier’s College (Autonomous), Kolkata

5 IMPLEMENTATION 20-137

5.1 Code Details

5.2 Code Snippets

6 RESULT 137-150

7 150-151
conclusion

CHAPTER 1: INTRODUCTION

1.1 ABSTRACT

“Blood Bank & Donation Management System” is a browser-based system that is designed to
store, process, retrieve and analyse information concerned with the administrative and inventory
management within a blood bank. This system is mainly based on collection, storage, and usage
of blood in needy situations. This project aims at maintaining all the information pertaining to
blood donors, different blood groups available in each hospital and help them manage in a better
way. Aim is to provide transparency in this field, make the process of obtaining blood from a
blood bank hassle free and corruption free and make the system of blood bank management
effective. Our client is not interested in blood stocking instead we are stocking blood donors’
St. Xavier’s College (Autonomous), Kolkata

information. The donors who are interested in donating blood has to register in the database.
There is no storage of blood so no complications in the project. The software is fully integrated
with CRM (customer relationship management) as well as CMS (content management system)
solution. It is developed in a manner that is easily manageable, time saving and relieving one
from manual works. The requirement of the blood must be requested and we supply the
information of the donor. The donors can update their status whether they are available or not.

The project analyses the system requirements and then comes up with the requirements
specifications. It studies other related systems and then come up with system specifications. The
system is then designed in accordance with specifications to satisfy the requirements. The system
design is then implemented with MYSQL, PHP and HTML. The system is designed as an
interactive and content management system. The content management system deals with data
entry, validation confirm and updating whiles the interactive system deals with systems and
product development projects or indeed for any activity where you must manage a relationship.

The purpose of this BLOOD BANK & DONATION MANAGEMENT SYSTEM PROJECT
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. Without quick and timely access to donor records, creating market
strategies for blood donation, lobbying and sensitization of blood donors becomes very difficult.
The blood management information system offers functionality to quick access to donor records
collected from various parts of the country.

It enables monitoring of the results and performance of the blood donation activity such that
relevant and measurable objectives of the organization can be checked.

It provides to management timely, confidential and secure medical reports that facilitates
planning and decision making and hence improved medical service delivery. The reports
generated by the system give answers to most of the challenges management faces as far as
blood donor records are concerned.
St. Xavier’s College (Autonomous), Kolkata

The Ethiopian Red Cross Society publication, Development in the 1990 states that information
from blood donors should be completely confidential and if this is not assured, names of the
blood donors should not be recorded at all and/or an alternative record identification should be
used.

1.2 BACKGROUND

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 Kolkata 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.

Data is the code word of the computer industry. Data refers to a collection of facts usually
collected as a result of observation and experiment or processes within a computer system. This
may consist of numbers, words or images or observations of a set of variables. Data are often
viewed as a lowest level of abstraction from which information and knowledge are derived.

In this project we have given an insight to the development of a computer-based database titled
"BLOOD BANK & DONATION MANAGEMENT SYSTEM" using PHP as a front-end and
SQL as back-end.
St. Xavier’s College (Autonomous), Kolkata

Blood Bank automation or computerization of the blood bank is the application of computers to
perform either in part or the activities that are carried out in the blood bank setting. Blood bank
automation requires the use of computers and associated programs that are suited for the
purpose.

Blood Bank management system is used to perform tasks such as registration of customers,
blood. It helps the customer to purchase the required blood bases on their needs. Customer can
make transaction through cash. Information related to blood, employees, customers, etc can be
easily retrieved.

This software is required to eliminate tedious manual searching, cataloguing, and loaning out of
medicines, Including registration and clearance of customers.

1.3 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:

(i) To develop a system that provides functions to support donors to view and manage

their information conveniently.

(ii) To maintain records of blood donors, blood donation information and blood stocks in a

centralized database system.

(iii) To inform donors of their blood result after their donation.

(iv) To support searching, matching and requesting for blood convenient for administrators.

(v) To provide a function to search for a nearby hospitals and blood banks.

1.4 PURPOSE
St. Xavier’s College (Autonomous), Kolkata

Our project focuses on the development and the functionality of a basic Blood Bank
Management System (BBMS) for medical purpose. This project is motivated by lack of keeping
tracks of blood in the manual system where there a high possibility of miss tracking of the blood
and a lot of malfunction error like filling the wrong date of the blood collection.

Chapter 2: SURVEY OF THE TECHNOLOGIES

APACHE:- Apache commonly refers to the Apache HTTP Server, which is an open-source web
server software developed and maintained by the Apache Software Foundation. It's one of the
most widely used web servers globally. Apache HTTP Server is highly customizable and
extensible, supporting a variety of modules that enhance its functionality, such as mod_ssl for
SSL/TLS encryption, mod_rewrite for URL rewriting, and many others. Apache is used by the
approx 40% of websites all over the world.
When any visitor wishes to load a page of any website, for example “About us “ page the visitor
browser will send a request on the server. Apache will send a response along with each requested
file(html files,images etc) of the “about us” page. The client and server communicate by HTTP
protocol, and Apache is responsible for secure and smooth communication among both the
machines.

Fig 2.1:- Basic working of the apache

MySQL:- MySQL is the world’s most popular open source database.


According to DB-Engines, MySQL ranks as the second-most-popular
database, behind Oracle Database. MySQL powers many of the most
accessed applications, including Facebook, Twitter, Netflix, Uber, Airbnb,
Shopify, and Booking.com.
St. Xavier’s College (Autonomous), Kolkata

MySQL is a widely adopted open-source relational database management system (RDBMS)


known for its performance, reliability, and scalability. It operates on a client-server architecture
where clients interact with the database server to perform operations such as querying, inserting,
updating, and deleting data. Data in MySQL is stored in tables using the structured query
language (SQL), organized within databases. MySQL ensures data integrity and reliability
through its adherence to the ACID (Atomicity, Consistency, Isolation, Durability) properties,
ensuring consistency even in the face of system failures or errors.

HTML :- HTML stands for hypertext markup language used to create web pages. It provides a
content and layout of the web pages. HTML uses tags and attributes to define elements such as
headings, paragraphs, images, videos, links and tables. These elements provide the basic
structure and the content aspects of the web page and they can be styled by using CSS.

CSS:- CSS stands for Cascading style sheet and it is used to beautify or styled presentation of
the web page. It allows the programmers to separate the presentation of a web page from its
content, making it more convenient to modify and maintain. CSS is also used to control the
layout, colors, fonts and other visual aspects of the web page. It works in conjunction with
HTML, using selectors to target specific HTML elements and applying styles to them.

PHP:- PHP stands for Hypertext PreProcessor is the most widely used open source and general
purpose server side scripting language used mainly in web development to create dynamic
St. Xavier’s College (Autonomous), Kolkata

websites and applications. It was developed in 1994 by Rasmus Lerdorf. It is not only used to
build the web apps of many tech giants like Facebook but is also used to build many CMS
(Content Management System) like WordPress, Drupal, Shopify, WooCommerce etc.

About 33,765,025 active websites use PHP. If you include the historical sites, it totals
87,120,710. Millions of these sites have been relying on it since 1995. It’s among the first
languages web developers got used to, and it continues to be a reliable option today.

PHP can be used in any Windows OS computer. This system requires very low system
resources and it will work in almost all configurations. In the existing system all functions are
doing manually. So, if they get this designed software, the problems can be avoided and thus the
system will run smoothly. In the proposed system, data can be easily stored and managed using
database management system software. The reports and results for various queries can be
generated easily. So these are some of the abilities of PHP that makes it suitable to be used as
server-side scripting language.

CHAPTER 3: REQUIREMNETS AND ANALYSIS

3.1 PROBLEM DEFINITION

Even though technology is spreading at a very fast speed but there is not much blood bank
system that runs in on machine and still it runs manually. Let us take an example ,when a person
needs a certain group of blood and his blood group is not available in any hospital or blood
banks then his family needs to add an alert messages through various social media platforms to
those who wants to donate to them and this process can take a lot of time that it may lead to a
critical situation of the patient life. In addition, there is lack of proper database about blood
donors and its medical history. This may lead to blood bag contamination and may affect the life
of the receiptant. Therefore, this projects aims to determine how the use of the online bank
management system enhances blood transfusion safely.

3.2 REQUIREMENTS SPECIFICATION

3.2.1 USER REQUIREMENTS


St. Xavier’s College (Autonomous), Kolkata

There are two internal users involved in this system. The user requirements are considered as
follows:

(i) Donor: -

(a) 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.

(b) To be able to view and update their personal information, including name,
contact address, and phone number, to keep their donor’s information record up
to-date with the blood bank.

(c) To be notified of the blood results of their previous donation by e-mail, to know
the success of their donation.

(ii) Administrator –.

(a) To be able to create, update, delete, and query donor’s records in order to manage
donor information.

(b) To be able to create, update, delete, and retrieve donation records to manage
information about donations made.

(c) To be able to deposit donated blood into inventory when donations are made.

(d) To be able to withdraw blood from the inventory and keep a record of blood stocks
to always keep count of the blood bags.

(e) To be able to create, update, delete, and retrieve request records from hospitals to
manage hospital requests for blood.

(f) To be able to create, update, delete, and query hospital’s records in order to
manage hospital information.

(g) To be able to send e-mails to donors for their user account and blood results
through the system.
St. Xavier’s College (Autonomous), Kolkata

(h) To be able to send e-mail responding to hospitals for their blood requests through
the system.

3.2.2 HARDWARE REQUIREMENTS:-

 Pentium-IV(Processor).

 2 GB RAM

 Hard disk with at least free space of 2 GB

 Microsoft Compatible 101 or more Key Board

3.2.3 SOFTWARE REQUIEMENTS:-

 Operating System: Windows (Windows 10 Recommended for ease)

 Web-Technology: PHP

 Front-End: HTML, CSS, JAVASCRIPT

 Back-End: MySQL, PHP

 Web Server: Apache SERVER (XAMPP)

CHAPTER 4: SYSTEM DESIGN

System design is the process of developing specification for candidate system that meet the
criteria established in the system analysis. Major step in system design is the preparation of the
input forms and the output reports in a form to the user. The main objectives of the system
design is to the packages easily by any computer operator system design is the creative act of
invention, developing new outputs, a database, offline files, methods, procedures and out for
processing business to meet an organization objectives.
St. Xavier’s College (Autonomous), Kolkata

4.1 CONCEPTUAL MODELS

USERCASE DIAGRAM

To model a system the most important aspect is to capture the dynamic behaviour. To clarify a
bit in details, dynamic behaviour means the behaviour of the system when it is running
operating. So only static behaviour is not sufficient to model a system rather dynamic behaviour
is more important than static behaviour. In UML there are five diagrams available to model
dynamic nature and use case diagram is one of them. Now as we must discuss that the use case
diagram is dynamic in nature there should be some internal or external factors for making the
interaction. These internal and external agents are known as actors. So, use case diagrams are
consists of actors, use cases and their relationships. The diagram is used to model the
system/subsystem of an application. A single use case diagram captures a particular functionality
of a system.
St. Xavier’s College (Autonomous), Kolkata

Fig 4.1 USER CASE DIAGRAM FOR ADMIN AND DONOR

ENTITY RELATIONSHIP DIAGRAM (ERD)

An Entity-Relationship Diagram (ERD) is a visual representation of the entities and their


relationships within a database. It's a powerful tool used during the database design phase to
model the structure of the database and its entities, attributes, and relationships.
For this project, we have implemented ERD through writing a mermaid code and we got the
desired ER diagram below is the attached er Diagram along with the mermaid code.

MERMAID CODE
HOSPITAL {
hospitalID int
name string
St. Xavier’s College (Autonomous), Kolkata

address string
contactNumber string
}
DONOR {
donorID int
name string
contactNumber number
mail string
age number
gender string
address string

bloodGroup string

lastDonationDate date
}
RECIPIENT {
recipientID int
name string
bloodGroup string
requiredUnits int
}
BLOOD_UNIT {
bloodID int
donorID int
bloodGroup string
collectionDate date
St. Xavier’s College (Autonomous), Kolkata

expiryDate date
}
ADMIN {
ADMIN_ID int
name string
password password
contactNumber string
}
DONOR }|..|{ BLOOD_UNIT : "Donates"
BLOOD_UNIT }|..|{ RECIPIENT : "Receives"
ADMIN }|..|{ HOSPITAL : "Manages"
St. Xavier’s College (Autonomous), Kolkata

Fig 4.2 ER Diagram

CONTEXT DIAGRAM: -

A context diagram is a high-level view of a system. It’s a basic sketch meant to


define an entity based on its scope, boundaries, and relation to external
components like stakeholders. It is also known as 0-level data flow diagram
(DFD).

Fig 4.3 0-level DFD


St. Xavier’s College (Autonomous), Kolkata

Fig 4.4 Level-1 DFD

CHAPTER 5. IMPLEMENTATION AND TESTING

Admin side
Add donor
<?php include 'session.php'; ?>
<html>

<head>

<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
St. Xavier’s College (Autonomous), Kolkata

<link rel="stylesheet"
href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.16.0/umd/popper.min.js"></
script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/js/bootstrap.min.js"></script>

<style>

#sidebar{position:relative;margin-top:-20px}
#content{position:relative;margin-left:210px}
@media screen and (max-width: 600px) {
#content {
position:relative;margin-left:auto;margin-right:auto;
}
}
</style>
</head>

<body style="color:black">
<?php
include 'conn.php';
if (isset($_SESSION['loggedin']) && $_SESSION['loggedin'] == true) {
?>
<div id="header">
<?php $active="add"; include 'header.php';
?>
</div>
St. Xavier’s College (Autonomous), Kolkata

<div id="sidebar">
<?php include 'sidebar.php'; ?>

</div>
<div id="content">
<div class="content-wrapper">
<div class="container-fluid">
<div class="row">
<div class="col-md-12 lg-12 sm-12">

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


</div>
</div>
<hr>
<form name="donor" action="save_donor_data.php" method="post">
<div class="row">
<div class="col-lg-4 mb-4"><br>
<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"><br>
<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"><br>
<div class="font-italic">Email Id</div>
<div><input type="email" name="emailid" class="form-control"></div>
St. Xavier’s College (Autonomous), Kolkata

</div>
</div>

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

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


<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"><br>
<div class="font-italic">Blood Group<span style="color:red">*</span></div>
<div><select name="blood" class="form-control" required>
<option value=""selected disabled>Select</option>
<?php
include 'conn.php';
$sql= "select * from blood";
$result=mysqli_query($conn,$sql) or die("query unsuccessful.");
St. Xavier’s College (Autonomous), Kolkata

while($row=mysqli_fetch_assoc($result)){
?>
<option value=" <?php echo $row['blood_id'] ?>"> <?php echo $row['blood_group'] ?>
</option>
<?php } ?>
</select>
</div>
</div>

</div>
<br>
<div class="row">
<div class="col-lg-4 mb-4">
<div class="font-italic">Address<span style="color:red">*</span></div>
<div><textarea class="form-control" name="address" required></textarea></div></div>
</div> <br>
<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" onclick="popup()"></div>
</div>
</div>
</form>

</div>
</div>
</div>
<?php
St. Xavier’s College (Autonomous), Kolkata

} else {
echo '<div class="alert alert-danger"><b> Please Login First To Access Admin
Portal.</b></div>';
?>
<form method="post" name="" action="login.php" class="form-horizontal">
<div class="form-group">
<div class="col-sm-8 col-sm-offset-4" style="float:left">

<button class="btn btn-primary" name="submit" type="submit">Go to Login


Page</button>
</div>
</div>
</form>
<?php }
?>
<script>
function popup() {
alert("Data added Successfully.");
}
</script>
</body>
</html>

CHANGE PASSWORD
<?php include 'session.php'; ?>

<html>
St. Xavier’s College (Autonomous), Kolkata

<head>

<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet"
href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.16.0/umd/popper.min.js"></
script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/js/bootstrap.min.js"></script>

<style>

#sidebar{position:relative;margin-top:-20px}
#content{position:relative;margin-left:210px}
@media screen and (max-width: 600px) {
#content {
position:relative;margin-left:auto;margin-right:auto;
}
}
</style>
</head>
<?php
include 'conn.php';
if (isset($_SESSION['loggedin']) && $_SESSION['loggedin'] == true) {
?>
<body style="color:black">
<div id="header">
St. Xavier’s College (Autonomous), Kolkata

<?php include 'header.php';


?>
</div>
<div id="sidebar">
<?php
$active="";
include 'sidebar.php'; ?>

</div>
<div id="content">
<div class="content-wrapper">
<div class="container-fluid">

<div class="row">
<div class="col-md-12 lg-12 sm-12">

<h1 class="page-title">Change Password</h1>


</div>
</div>
<div class="row">
<div class="col-md-10">
<div class="panel panel-default">
<div class="panel-heading">Password Fields</div>
<div class="panel-body">
<form method="post" name="chngpwd" class="form-horizontal">

<div class="form-group" method="post">


St. Xavier’s College (Autonomous), Kolkata

<label class="col-sm-4 control-label">Current Password</label>


<div class="col-sm-8">
<input type="password" class="form-control" name="currpassword"
id="password" required>
</div>
</div>
<div class="hr-dashed"></div>

<div class="form-group">
<label class="col-sm-4 control-label">New Password</label>
<div class="col-sm-8">
<input type="password" class="form-control" name="newpassword"
id="newpassword" required>
</div>
</div>
<div class="hr-dashed"></div>

<div class="form-group">
<label class="col-sm-4 control-label">Confirm Password</label>
<div class="col-sm-8">
<input type="password" class="form-control" name="confirmpassword"
id="confirmpassword" required>
</div>
</div>
<div class="hr-dashed"></div>
St. Xavier’s College (Autonomous), Kolkata

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

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


changes</button>
</div>
</div>

</form>

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

<?php

if(isset($_POST["submit"])){
$username=$_SESSION['username'];
$password=mysqli_real_escape_string($conn,$_POST["currpassword"]);
$sql="select * from admin_info where admin_username='$username'";
$result=mysqli_query($conn,$sql) or die("query failed.");
if(mysqli_num_rows($result)>0)
{
while($row=mysqli_fetch_assoc($result)){
if($password==$row['admin_password']){
St. Xavier’s College (Autonomous), Kolkata

$newpassword=mysqli_real_escape_string($conn,$_POST["newpassword"]);
$confpassword=mysqli_real_escape_string($conn,$_POST["confirmpassword"]);

if($newpassword==$confpassword)
{
if($newpassword!=$password)
{
$sql1="UPDATE admin_info set admin_password='{$newpassword}' where
admin_username='{$username}'";
$result1=mysqli_query($conn,$sql1) or die("query failed.");
echo '<div class="alert alert-success alert_dismissible"><button type="button" class="close"
data-dismiss="alert">&times;</button><b> Password Changed Successfully.</b></div>';
}
else {
echo '<div class="alert alert-info alert_dismissible"><button type="button" class="close"
data-dismiss="alert">&times;</button><b>New Password Can not be same as Current
Password..</b></div>';
}
}

else {
echo '<div class="alert alert-warning alert_dismissible"><button type="button"
class="close" data-dismiss="alert">&times;</button> <b>New Password and Confirm Password
Not Matched!</b></div>';
}
}
else {
echo '<div class="alert alert-danger alert_dismissible"><button type="button" class="close"
data-dismiss="alert">&times;</button><b> Current Password not matched!</b></div>';
}
St. Xavier’s College (Autonomous), Kolkata

}
}
}
?>
<?php
}
else {
echo '<div class="alert alert-danger"><b> Please Login First To Access Admin
Portal.</b></div>';
?>
<form method="post" name="" action="login.php" class="form-horizontal">
<div class="form-group">
<div class="col-sm-8 col-sm-offset-4" style="float:left">

<button class="btn btn-primary" name="submit" type="submit">Go to Login


Page</button>
</div>
</div>
</form>
<?php }
?>
</div>
</div>
</div>
</body>
</html>

CONNECTION.PHP
St. Xavier’s College (Autonomous), Kolkata

<?php
$conn=mysqli_connect("localhost","root","","blood_donation") or die("Connection error");
?>
DASHBOARD.php
<html>

<head>

<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet"
href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.16.0/umd/popper.min.js"></
script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/js/bootstrap.min.js"></script>

<style>

#sidebar{position:relative;margin-top:-20px}
#content{position:relative;margin-left:210px}
@media screen and (max-width: 600px) {
#content {
position:relative;margin-left:auto;margin-right:auto;
}
}
St. Xavier’s College (Autonomous), Kolkata

.block-anchor {
color:red;

cursor: pointer;
}
</style>
</head>

<body style="color:black;" >

<?php
include 'conn.php';
include 'session.php';
if (isset($_SESSION['loggedin']) && $_SESSION['loggedin'] == true) {
?>

<div id="header">
<?php include 'header.php';
?>
</div>
<div id="sidebar">
<?php
$active="dashboard";
include 'sidebar.php'; ?>

</div>
<div id="content">
St. Xavier’s College (Autonomous), Kolkata

<div class="content-wrapper">
<div class="container-fluid">
<div class="row">
<div class="col-md-12 lg-12 sm-12">
<h1 class="page-title">Dashboard</h1>
</div>
</div>
<hr>
<div class="row">
<div class="col-md-12">
<div class="row">
<div class="col-md-3">
<div class="panel panel-default panel-info" style="border-radius:50px;">
<div class="panel-body panel-info bk-primary text-light" style="background-
color:#D6EAF8; border-radius:50px">
<div class="stat-panel text-center">
<?php
$sql =" SELECT * from donor_details ";
$result=mysqli_query($conn,$sql) or die("query failed.");
$row=mysqli_num_rows($result);

?>

<div class="stat-panel-number h1"><?php echo $row?></div>


<div class="stat-panel-title text-uppercase">Blood Donors Available </div>
<br>
St. Xavier’s College (Autonomous), Kolkata

<button class="btn btn-danger" onclick="window.location.href =


'donor_list.php';">
Full Detail <i class="fa fa-arrow-right"></i>
</button>

</div>
</div>

</div>
</div>

<div class="col-md-3">
<div class="panel panel-default panel-info" style="border-radius:50px;">
<div class="panel-body panel-info bk-primary text-light" style="background-
color:#ABEBC6;border-radius:50px;">
<div class="stat-panel text-center">
<?php
$sql1 =" SELECT * from contact_query ";
$result1=mysqli_query($conn,$sql1) or die("query failed.");
$row1=mysqli_num_rows($result1);

?>

<div class="stat-panel-number h1 "><?php echo $row1?></div>


<div class="stat-panel-title text-uppercase"> All User Queries </div>
<br>
St. Xavier’s College (Autonomous), Kolkata

<button class="btn btn-danger" onclick="window.location.href = 'query.php';">


Full Detail <i class="fa fa-arrow-right"></i>
</button>
</div>
</div>

</div>
</div>

<div class="col-md-3">
<div class="panel panel-default panel-info" style="border-radius:50px;">
<div class="panel-body panel-info bk-primary text-light" style="background-
color:#E8DAEF ;border-radius:50px; ">
<div class="stat-panel text-center">
<?php
$sql2 ="SELECT * from contact_query where query_status=2 ";
$result2=mysqli_query($conn,$sql2) or die("query failed.");
$row2=mysqli_num_rows($result2);

?>

<div class="stat-panel-number h1 "><?php echo $row2 ?></div>


<div class="stat-panel-title text-uppercase"> Pending Queries </div>
<br>
<button class="btn btn-danger" onclick="window.location.href =
'pending_query.php';">
Full Detail <i class="fa fa-arrow-right"></i>
St. Xavier’s College (Autonomous), Kolkata

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

</div>
</div>

</div>
</div>
</div>
<?php
} else {
echo '<div class="alert alert-danger"><b> Please Login First To Access Admin
Portal.</b></div>';
?>
<form method="post" name="" action="login.php" class="form-horizontal">
<div class="form-group">
<div class="col-sm-8 col-sm-offset-4" style="float:left">

<button class="btn btn-primary" name="submit" type="submit">Go to Login


Page</button>
</div>
</div>
</form>
<?php }
?>
St. Xavier’s College (Autonomous), Kolkata

</body>
</html>
DELETE.php
<?php
include 'conn.php';
$donor_id = $_GET['id'];
$sql= "DELETE FROM donor_details where donor_id={$donor_id}";
$result=mysqli_query($conn,$sql);

header("Location: donor_list.php");

mysqli_close($conn);

?>
Delete_querry.php
<?php
include 'conn.php';

$que_id = $_GET['id'];
$sql= "DELETE FROM contact_query where query_id={$que_id}";
$result=mysqli_query($conn,$sql);
mysqli_close($conn);

?>
Donor_list.php
St. Xavier’s College (Autonomous), Kolkata

<html>

<head>

<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet"
href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.16.0/umd/popper.min.js"></
script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/js/bootstrap.min.js"></script>

<style>

#sidebar{position:relative;margin-top:-20px}
#content{position:relative;margin-left:210px}
@media screen and (max-width: 600px) {
#content {
position:relative;margin-left:auto;margin-right:auto;
}
}
#he{
font-size: 14px;
font-weight: 600;
text-transform: uppercase;
padding: 3px 7px;
color: #fff;
St. Xavier’s College (Autonomous), Kolkata

text-decoration: none;
border-radius: 3px;
align:center
}
</style>
</head>
<?php
include 'conn.php';
include 'session.php';
if (isset($_SESSION['loggedin']) && $_SESSION['loggedin'] == true) {
?>
<body style="color:black">
<div id="header">
<?php include 'header.php';
?>
</div>
<div id="sidebar">
<?php $active="list"; include 'sidebar.php'; ?>

</div>
<div id="content" >
<div class="content-wrapper">
<div class="container-fluid">
<div class="row">
<div class="col-md-12 lg-12 sm-12">

<h1 class="page-title">Donor List</h1>


St. Xavier’s College (Autonomous), Kolkata

</div>

</div>
<hr>
<?php
include 'conn.php';

$limit = 10;
if(isset($_GET['page'])){
$page = $_GET['page'];
}else{
$page = 1;
}
$offset = ($page - 1) * $limit;
$count=$offset+1;
$sql= "select * from donor_details join blood where
donor_details.donor_blood=blood.blood_id LIMIT {$offset},{$limit}";
$result=mysqli_query($conn,$sql);
if(mysqli_num_rows($result)>0) {
?>

<div class="table-responsive">
<table class="table table-bordered" style="text-align:center">
<thead style="text-align:center">
<th style="text-align:center">S.no</th>
<th style="text-align:center">Name</th>
<th style="text-align:center">Mobile Number</th>
St. Xavier’s College (Autonomous), Kolkata

<th style="text-align:center">Email Id</th>


<th style="text-align:center">Age</th>
<th style="text-align:center">Gender</th>
<th style="text-align:center">Blood Group</th>
<th style="text-align:center">Address</th>
<th style="text-align:center">Action</th>
</thead>
<tbody>
<?php
while($row = mysqli_fetch_assoc($result)) { ?>
<tr>
<td><?php echo $count++; ?></td>
<td><?php echo $row['donor_name']; ?></td>
<td><?php echo $row['donor_number']; ?></td>
<td><?php echo $row['donor_mail']; ?></td>
<td><?php echo $row['donor_age']; ?></td>
<td><?php echo $row['donor_gender']; ?></td>
<td><?php echo $row['blood_group']; ?></td>
<td><?php echo $row['donor_address']; ?></td>
<td id="he" style="width:100px">
<a style="background-color:aqua" href='delete.php?id=<?php echo
$row['donor_id']; ?>'> Delete </a>
</td>
</tr>
<?php } ?>
</tbody>
</table>
</div>
St. Xavier’s College (Autonomous), Kolkata

<?php } ?>

<div class="table-responsive"style="text-align:center;align:center">
<?php
$sql1 = "SELECT * FROM donor_details";
$result1 = mysqli_query($conn, $sql1) or die("Query Failed.");

if(mysqli_num_rows($result1) > 0){

$total_records = mysqli_num_rows($result1);

$total_page = ceil($total_records / $limit);

echo '<ul class="pagination admin-pagination">';


if($page > 1){
echo '<li><a href="donor_list.php?page='.($page - 1).'">Prev</a></li>';
}
for($i = 1; $i <= $total_page; $i++){
if($i == $page){
$active = "active";
}else{
$active = "";
}
St. Xavier’s College (Autonomous), Kolkata

echo '<li class="'.$active.'"><a href="donor_list.php?page='.$i.'">'.$i.'</a></li>';


}
if($total_page > $page){
echo '<li><a href="donor_list.php?page='.($page + 1).'">Next</a></li>';
}

echo '</ul>';
}
?>
</div>
</div>
</div>
</div>
<?php }
else {
echo '<div class="alert alert-danger"><b> Please Login First To Access Admin
Portal.</b></div>';
?>
<form method="post" name="" action="login.php" class="form-horizontal">
<div class="form-group">
<div class="col-sm-8 col-sm-offset-4" style="float:left">

<button class="btn btn-primary" name="submit" type="submit">Go to Login


Page</button>
</div>
</div>
</form>
<?php }
St. Xavier’s College (Autonomous), Kolkata

?>
</body>
</html>

Header.php
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet"
href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/js/bootstrap.min.js"></script>
<style>
.navbar {
background-color: #333333 ;
padding: 10px 10px;
color:#FF0404 ;
}
.navbar a {
float: left;
color: white;
text-align: center;
padding: 12px;
text-decoration: none;
font-size: 18px;
St. Xavier’s College (Autonomous), Kolkata

line-height: 25px;
}
.navbar-brand {
font-size: 25px;
font-weight: bold;

}
.navbar a {
float: none;
display: block;
text-align: left;
}
.navbar-right {
float: none;
}
#qq:hover{
background-color:#E5E8E8 ;
border-radius: 5px;
}
}
</style>
</head>
<body>

<nav class="navbar navbar-inverse">


<div class="container-fluid">
<div class="navbar-header">
St. Xavier’s College (Autonomous), Kolkata

<a class="navbar-brand" id="qq" href="dashboard.php" style="color:#F51A14;">Blood


Bank & Donation Admin Panel</a>
</div>
<ul class="nav navbar-nav navbar-right">

<li class="dropdown"><a class="dropdown-toggle" id="qw" data-toggle="dropdown"


href="#" style="font-weight:bold;color:white "> <span class="glyphicon
glyphicon-user"></span>&nbsp&nbsp
<?php
include 'conn.php';
$username=$_SESSION['username'];
$sql="select * from admin_info where admin_username='$username'";
$result=mysqli_query($conn,$sql) or die("query failed.");
$row=mysqli_fetch_assoc($result);
echo "Hello ".$row['admin_name'];
?><span class="caret"></span></a>
<ul class="dropdown-menu" style="background-color:#D6EAF8;">
<li><a href="change_password.php" style="color:#DC7633 ">Change Password
</a></li>
<li><a href="logout.php" style="color:#D35400 ;">Logout</a></li>
</ul>
</li>
</ul>

</div>

</nav>
</body></html>
Login.php
St. Xavier’s College (Autonomous), Kolkata

<html>

<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="">
<link rel="stylesheet"
href="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.16.0/umd/popper.min.js"></
script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js"></script></
head>
<body background="admin_image\blood-cells.jpg">

<form class="" action="<?php $_SERVER['PHP_SELF']; ?>" method="post">

<div class="container" style="margin-top:200px;">


<div class="row justify-content-center">
<div class="col-lg-6">
<h1 class="mt-4 mb-3" style="color:#D2F015 ;">
Blood Bank & Management
<br>Admin Login Portal
</h1>

</div>
</div>
St. Xavier’s College (Autonomous), Kolkata

<div class="card" style="height:250px;


background-image:url('admin_image/glossy1.jpg');">
<div class="card-body">

<div class="row justify-content-lg-center justify-content-mb-center" >


<div class="col-lg-6 mb-6 ">
<div class="font-italic" style="font-weight:bold">Username<span
style="color:red">*</span></div>
<div><input type="text" name="username" placeholder="Enter your username"
class="form-control" value="" required></div>
</div>
</div>
<div class="row justify-content-lg-center justify-content-mb-center">
<div class="col-lg-6 mb-6 "><br>
<div class="font-italic"style="font-weight:bold">Password<span
style="color:red">*</span></div>
<div><input type="password" name="password" placeholder="Enter your Password"
class="form-control" value="" required></div>
</div>
</div>
<div class="row justify-content-lg-center justify-content-mb-center">
<div class="col-lg-4 mb-4 " style="text-align:center"><br>
<div><input type="submit" name="login" class="btn btn-primary" value="LOGIN"
style="cursor:pointer"></div>
</div>
</div>
</div>
</div></div>
<br>
<?php
St. Xavier’s College (Autonomous), Kolkata

include 'conn.php';

if(isset($_POST["login"])){

$username=mysqli_real_escape_string($conn,$_POST["username"]);
$password=mysqli_real_escape_string($conn,$_POST["password"]);

$sql="SELECT * from admin_info where admin_username='$username' and


admin_password='$password'";
$result=mysqli_query($conn,$sql) or die("query failed.");

if(mysqli_num_rows($result)>0)
{
while($row=mysqli_fetch_assoc($result)){
session_start();
$_SESSION['loggedin'] = true;
$_SESSION["username"]=$username;
header("Location: dashboard.php");
}
}
else {
echo '<div class="alert alert-danger" style="font-weight:bold"> Username and Password are
not matched!</div>';
}

}
?>
</form>
St. Xavier’s College (Autonomous), Kolkata

</body>
</html>

Logout.php
<?php
session_start();
unset($_SESSION['login']);
session_destroy();
header("location:login.php");
?>
Nicedit.js
var bkExtend=function(){var A=arguments;if(A.length==1){A=[this,A[0]]}for(var B in A[1])
{A[0][B]=A[1][B]}return A[0]};function bkClass(){}bkClass.prototype.construct=function()
{};bkClass.extend=function(C){var A=function(){if(arguments[0]!==bkClass){return
this.construct.apply(this,arguments)}};var B=new
this(bkClass);bkExtend(B,C);A.prototype=B;A.extend=this.extend;return A};var
bkElement=bkClass.extend({construct:function(B,A){if(typeof (B)=="string"){B=(A||
document).createElement(B)}B=$BK(B);return B},appendTo:function(A)
{A.appendChild(this);return this},appendBefore:function(A)
{A.parentNode.insertBefore(this,A);return this},addEvent:function(B,A)
{bkLib.addEvent(this,B,A);return this},setContent:function(A){this.innerHTML=A;return
this},pos:function(){var C=curtop=0;var B=obj=this;if(obj.offsetParent)
{do{C+=obj.offsetLeft;curtop+=obj.offsetTop}while(obj=obj.offsetParent)}var A=(!
window.opera)?parseInt(this.getStyle("border-width")||this.style.border)||
0:0;return[C+A,curtop+A+this.offsetHeight]},noSelect:function(){bkLib.noSelect(this);return
this},parentTag:function(A){var
B=this;do{if(B&&B.nodeName&&B.nodeName.toUpperCase()==A){return
B}B=B.parentNode}while(B);return false},hasClass:function(A){return
this.className.match(new RegExp("(\\s|^)nicEdit-"+A+"(\\s|$)"))},addClass:function(A){if(!
this.hasClass(A)){this.className+=" nicEdit-"+A}return this},removeClass:function(A)
{if(this.hasClass(A)){this.className=this.className.replace(new RegExp("(\\s|
^)nicEdit-"+A+"(\\s|$)")," ")}return this},setStyle:function(A){var B=this.style;for(var C in A)
{switch(C)
{case"float":B.cssFloat=B.styleFloat=A[C];break;case"opacity":B.opacity=A[C];B.filter="alpha(
opacity="+Math.round(A[C]*100)+")";break;case"className":this.className=A[C];break;defa
ult:B[C]=A[C]}}return this},getStyle:function(A,C){var B=(!C)?
St. Xavier’s College (Autonomous), Kolkata

document.defaultView:C;if(this.nodeType==1){return(B&&B.getComputedStyle)?
B.getComputedStyle(this,null).getPropertyValue(A):this.currentStyle[bkLib.camelize(A)]}},rem
ove:function(){this.parentNode.removeChild(this);return this},setAttributes:function(A){for(var
B in A){this[B]=A[B]}return this}});var bkLib={isMSIE:
(navigator.appVersion.indexOf("MSIE")!=-1),addEvent:function(C,B,A){(C.addEventListener)?
C.addEventListener(B,A,false):C.attachEvent("on"+B,A)},toArray:function(C){var
B=C.length,A=new Array(B);while(B--){A[B]=C[B]}return A},noSelect:function(B)
{if(B.setAttribute&&B.nodeName.toLowerCase()!="input"&&B.nodeName.toLowerCase()!
="textarea"){B.setAttribute("unselectable","on")}for(var A=0;A<B.childNodes.length;A++)
{bkLib.noSelect(B.childNodes[A])}},camelize:function(A){return
A.replace(/\-(.)/g,function(B,C){return C.toUpperCase()})},inArray:function(A,B)
{return(bkLib.search(A,B)!=null)},search:function(A,C){for(var B=0;B<A.length;B++)
{if(A[B]==C){return B}}return null},cancelEvent:function(A){A=A||
window.event;if(A.preventDefault&&A.stopPropagation)
{A.preventDefault();A.stopPropagation()}return false},domLoad:[],domLoaded:function()
{if(arguments.callee.done)
{return }arguments.callee.done=true;for(i=0;i<bkLib.domLoad.length;i++){bkLib.domLoad[i]
()}},onDomLoaded:function(A){this.domLoad.push(A);if(document.addEventListener)
{document.addEventListener("DOMContentLoaded",bkLib.domLoaded,null)}else{if(bkLib.isM
SIE){document.write("<style>.nicEdit-main p { margin: 0; }</style><script id=__ie_onload
defer "+((location.protocol=="https:")?"src='javascript:void(0)'":"src=//0")+"><\/script>");
$BK("__ie_onload").onreadystatechange=function(){if(this.readyState=="complete")
{bkLib.domLoaded()}}}}window.onload=bkLib.domLoaded}};function $BK(A){if(typeof
(A)=="string"){A=document.getElementById(A)}return(A&&!A.appendTo)?
bkExtend(A,bkElement.prototype):A}var bkEvent={addEvent:function(A,B){if(B)
{this.eventList=this.eventList||{};this.eventList[A]=this.eventList[A]||
[];this.eventList[A].push(B)}return this},fireEvent:function(){var
A=bkLib.toArray(arguments),C=A.shift();if(this.eventList&&this.eventList[C]){for(var
B=0;B<this.eventList[C].length;B++){this.eventList[C][B].apply(this,A)}}}};function __(A)
{return A}Function.prototype.closure=function(){var
A=this,B=bkLib.toArray(arguments),C=B.shift();return function(){if(typeof (bkLib)!
="undefined"){return
A.apply(C,B.concat(bkLib.toArray(arguments)))}}};Function.prototype.closureListener=functio
n(){var A=this,C=bkLib.toArray(arguments),B=C.shift();return function(E){E=E||
window.event;if(E.target){var D=E.target}else{var D=E.srcElement}return A.apply(B,
[E,D].concat(C))}};

var nicEditorConfig = bkClass.extend({


buttons : {
St. Xavier’s College (Autonomous), Kolkata

'bold' : {name : __('Click to Bold'), command : 'Bold', tags : ['B','STRONG'], css :


{'font-weight' : 'bold'}, key : 'b'},
'italic' : {name : __('Click to Italic'), command : 'Italic', tags : ['EM','I'], css :
{'font-style' : 'italic'}, key : 'i'},
'underline' : {name : __('Click to Underline'), command : 'Underline', tags : ['U'],
css : {'text-decoration' : 'underline'}, key : 'u'},
'left' : {name : __('Left Align'), command : 'justifyleft', noActive : true},
'center' : {name : __('Center Align'), command : 'justifycenter', noActive : true},
'right' : {name : __('Right Align'), command : 'justifyright', noActive : true},
'justify' : {name : __('Justify Align'), command : 'justifyfull', noActive : true},
'ol' : {name : __('Insert Ordered List'), command : 'insertorderedlist', tags :
['OL']},
'ul' : {name : __('Insert Unordered List'), command : 'insertunorderedlist', tags :
['UL']},
'subscript' : {name : __('Click to Subscript'), command : 'subscript', tags :
['SUB']},
'superscript' : {name : __('Click to Superscript'), command : 'superscript', tags :
['SUP']},
'strikethrough' : {name : __('Click to Strike Through'), command : 'strikeThrough',
css : {'text-decoration' : 'line-through'}},
'removeformat' : {name : __('Remove Formatting'), command : 'removeformat',
noActive : true},
'indent' : {name : __('Indent Text'), command : 'indent', noActive : true},
'outdent' : {name : __('Remove Indent'), command : 'outdent', noActive : true},
'hr' : {name : __('Horizontal Rule'), command : 'insertHorizontalRule', noActive :
true}
},
iconsPath : 'http://js.nicedit.com/nicEditIcons-latest.gif',
buttonList :
['save','bold','italic','underline','left','center','right','justify','ol','ul','fontSize','fontFamily','fontForma
t','indent','outdent','image','upload','link','unlink','forecolor','bgcolor'],
St. Xavier’s College (Autonomous), Kolkata

iconList :
{"xhtml":1,"bgcolor":2,"forecolor":3,"bold":4,"center":5,"hr":6,"indent":7,"italic":8,"justify":9,"l
eft":10,"ol":11,"outdent":12,"removeformat":13,"right":14,"save":25,"strikethrough":16,"subscri
pt":17,"superscript":18,"ul":19,"underline":20,"image":21,"link":22,"unlink":23,"close":24,"arro
w":26,"upload":27}

});
;
var nicEditors={nicPlugins:[],editors:[],registerPlugin:function(B,A)
{this.nicPlugins.push({p:B,o:A})},allTextAreas:function(C){var
A=document.getElementsByTagName("textarea");for(var B=0;B<A.length;B++)
{nicEditors.editors.push(new nicEditor(C).panelInstance(A[B]))}return
nicEditors.editors},findEditor:function(C){var B=nicEditors.editors;for(var A=0;A<B.length;A+
+){if(B[A].instanceById(C)){return B[A].instanceById(C)}}}};var
nicEditor=bkClass.extend({construct:function(C){this.options=new
nicEditorConfig();bkExtend(this.options,C);this.nicInstances=new
Array();this.loadedPlugins=new Array();var A=nicEditors.nicPlugins;for(var
B=0;B<A.length;B++){this.loadedPlugins.push(new
A[B].p(this,A[B].o))}nicEditors.editors.push(this);bkLib.addEvent(document.body,"mousedown
",this.selectCheck.closureListener(this))},panelInstance:function(B,C)
{B=this.checkReplace($BK(B));var A=new bkElement("DIV").setStyle({width:
(parseInt(B.getStyle("width"))||B.clientWidth)+"px"}).appendBefore(B);this.setPanel(A);return
this.addInstance(B,C)},checkReplace:function(B){var A=nicEditors.findEditor(B);if(A)
{A.removeInstance(B);A.removePanel()}return B},addInstance:function(B,C)
{B=this.checkReplace($BK(B));if(B.contentEditable||!!window.opera){var A=new
nicEditorInstance(B,C,this)}else{var A=new
nicEditorIFrameInstance(B,C,this)}this.nicInstances.push(A);return
this},removeInstance:function(C){C=$BK(C);var B=this.nicInstances;for(var
A=0;A<B.length;A++){if(B[A].e==C)
{B[A].remove();this.nicInstances.splice(A,1)}}},removePanel:function(A){if(this.nicPanel)
{this.nicPanel.remove();this.nicPanel=null}},instanceById:function(C){C=$BK(C);var
B=this.nicInstances;for(var A=0;A<B.length;A++){if(B[A].e==C){return
B[A]}}},setPanel:function(A){this.nicPanel=new
nicEditorPanel($BK(A),this.options,this);this.fireEvent("panel",this.nicPanel);return
this},nicCommand:function(B,A){if(this.selectedInstance)
{this.selectedInstance.nicCommand(B,A)}},getIcon:function(D,A){var
C=this.options.iconList[D];var B=(A.iconFiles)?
A.iconFiles[D]:"";return{backgroundImage:"url('"+((C)?this.options.iconsPath:B)
+"')",backgroundPosition:((C)?((C-1)*-18):0)+"px 0px"}},selectCheck:function(C,A){var
B=false;do{if(A.className&&A.className.indexOf("nicEdit")!=-1){return
false}}while(A=A.parentNode);this.fireEvent("blur",this.selectedInstance,A);this.lastSelectedIns
St. Xavier’s College (Autonomous), Kolkata

tance=this.selectedInstance;this.selectedInstance=null;return
false}});nicEditor=nicEditor.extend(bkEvent);
var nicEditorInstance=bkClass.extend({isSelected:false,construct:function(G,D,C)
{this.ne=C;this.elm=this.e=G;this.options=D||{};newX=parseInt(G.getStyle("width"))||
G.clientWidth;newY=parseInt(G.getStyle("height"))||G.clientHeight;this.initialHeight=newY-
8;var H=(G.nodeName.toLowerCase()=="textarea");if(H||this.options.hasPanel){var
B=(bkLib.isMSIE&&!((typeof document.body.style.maxHeight!
="undefined")&&document.compatMode=="CSS1Compat"));var
E={width:newX+"px",border:"1px solid
#ccc",borderTop:0,overflowY:"auto",overflowX:"hidden"};E[(B)?"height":"maxHeight"]=(this.
ne.options.maxHeight)?this.ne.options.maxHeight+"px":null;this.editorContain=new
bkElement("DIV").setStyle(E).appendBefore(G);var A=new bkElement("DIV").setStyle({width:
(newX-
8)+"px",margin:"4px",minHeight:newY+"px"}).addClass("main").appendTo(this.editorContain)
;G.setStyle({display:"none"});A.innerHTML=G.innerHTML;if(H)
{A.setContent(G.value);this.copyElm=G;var F=G.parentTag("FORM");if(F)
{bkLib.addEvent(F,"submit",this.saveContent.closure(this))}}A.setStyle((B)?
{height:newY+"px"}:
{overflow:"hidden"});this.elm=A}this.ne.addEvent("blur",this.blur.closure(this));this.init();this.b
lur()},init:function(){this.elm.setAttribute("contentEditable","true");if(this.getContent()=="")
{this.setContent("<br
/>")}this.instanceDoc=document.defaultView;this.elm.addEvent("mousedown",this.selected.clos
ureListener(this)).addEvent("keypress",this.keyDown.closureListener(this)).addEvent("focus",th
is.selected.closure(this)).addEvent("blur",this.blur.closure(this)).addEvent("keyup",this.selected.
closure(this));this.ne.fireEvent("add",this)},remove:function()
{this.saveContent();if(this.copyElm||this.options.hasPanel)
{this.editorContain.remove();this.e.setStyle({display:"block"});this.ne.removePanel()}this.disabl
e();this.ne.fireEvent("remove",this)},disable:function()
{this.elm.setAttribute("contentEditable","false")},getSel:function()
{return(window.getSelection)?window.getSelection():document.selection},getRng:function()
{var A=this.getSel();if(!A||A.rangeCount===0){return }return(A.rangeCount>0)?
A.getRangeAt(0):A.createRange()},selRng:function(A,B){if(window.getSelection)
{B.removeAllRanges();B.addRange(A)}else{A.select()}},selElm:function(){var
C=this.getRng();if(!C){return }if(C.startContainer){var
D=C.startContainer;if(C.cloneContents().childNodes.length==1){for(var
B=0;B<D.childNodes.length;B++){var
A=D.childNodes[B].ownerDocument.createRange();A.selectNode(D.childNodes[B]);if(C.compa
reBoundaryPoints(Range.START_TO_START,A)!
=1&&C.compareBoundaryPoints(Range.END_TO_END,A)!=-1){return
$BK(D.childNodes[B])}}}return $BK(D)}else{return $BK((this.getSel().type=="Control")?
C.item(0):C.parentElement())}},saveRng:function()
{this.savedRange=this.getRng();this.savedSel=this.getSel()},restoreRng:function()
{if(this.savedRange){this.selRng(this.savedRange,this.savedSel)}},keyDown:function(B,A)
{if(B.ctrlKey){this.ne.fireEvent("key",this,B)}},selected:function(C,A){if(!A&&!
St. Xavier’s College (Autonomous), Kolkata

(A=this.selElm)){A=this.selElm()}if(!C.ctrlKey){var B=this.ne.selectedInstance;if(B!=this)
{if(B)
{this.ne.fireEvent("blur",B,A)}this.ne.selectedInstance=this;this.ne.fireEvent("focus",B,A)}this.
ne.fireEvent("selected",B,A);this.isFocused=true;this.elm.addClass("selected")}return
false},blur:function()
{this.isFocused=false;this.elm.removeClass("selected")},saveContent:function()
{if(this.copyElm||this.options.hasPanel){this.ne.fireEvent("save",this);(this.copyElm)?
this.copyElm.value=this.getContent():this.e.innerHTML=this.getContent()}},getElm:function()
{return this.elm},getContent:function()
{this.content=this.getElm().innerHTML;this.ne.fireEvent("get",this);return
this.content},setContent:function(A)
{this.content=A;this.ne.fireEvent("set",this);this.elm.innerHTML=this.content},nicCommand:fu
nction(B,A){document.execCommand(B,false,A)}});
var nicEditorIFrameInstance=nicEditorInstance.extend({savedStyles:[],init:function(){var
B=this.elm.innerHTML.replace(/^\s+|\s+$/g,"");this.elm.innerHTML="";(!B)?B="<br
/>":B;this.initialContent=B;this.elmFrame=new
bkElement("iframe").setAttributes({src:"javascript:;",frameBorder:0,allowTransparency:"true",s
crolling:"no"}).setStyle({height:"100px",width:"100%"}).addClass("frame").appendTo(this.elm)
;if(this.copyElm){this.elmFrame.setStyle({width:(this.elm.offsetWidth-4)+"px"})}var A=["font-
size","font-family","font-weight","color"];for(itm in A)
{this.savedStyles[bkLib.camelize(itm)]=this.elm.getStyle(itm)}setTimeout(this.initFrame.closur
e(this),50)},disable:function(){this.elm.innerHTML=this.getContent()},initFrame:function(){var
B=$BK(this.elmFrame.contentWindow.document);B.designMode="on";B.open();var
A=this.ne.options.externalCSS;B.write("<html><head>"+((A)?'<link href="'+A+'"
rel="stylesheet" type="text/css" />':"")+'</head><body id="nicEditContent" style="margin: 0 !
important; background-color: transparent
!important;">'+this.initialContent+"</body></html>");B.close();this.frameDoc=B;this.frameWin
=$BK(this.elmFrame.contentWindow);this.frameContent=$BK(this.frameWin.document.body).s
etStyle(this.savedStyles);this.instanceDoc=this.frameWin.document.defaultView;this.heightUpd
ate();this.frameDoc.addEvent("mousedown",this.selected.closureListener(this)).addEvent("keyu
p",this.heightUpdate.closureListener(this)).addEvent("keydown",this.keyDown.closureListener(t
his)).addEvent("keyup",this.selected.closure(this));this.ne.fireEvent("add",this)},getElm:function
(){return this.frameContent},setContent:function(A)
{this.content=A;this.ne.fireEvent("set",this);this.frameContent.innerHTML=this.content;this.hei
ghtUpdate()},getSel:function(){return(this.frameWin)?
this.frameWin.getSelection():this.frameDoc.selection},heightUpdate:function()
{this.elmFrame.style.height=Math.max(this.frameContent.offsetHeight,this.initialHeight)
+"px"},nicCommand:function(B,A)
{this.frameDoc.execCommand(B,false,A);setTimeout(this.heightUpdate.closure(this),100)}});
var nicEditorPanel=bkClass.extend({construct:function(E,B,A)
{this.elm=E;this.options=B;this.ne=A;this.panelButtons=new
Array();this.buttonList=bkExtend([],this.ne.options.buttonList);this.panelContain=new
bkElement("DIV").setStyle({overflow:"hidden",width:"100%",border:"1px solid
St. Xavier’s College (Autonomous), Kolkata

#cccccc",backgroundColor:"#efefef"}).addClass("panelContain");this.panelElm=new
bkElement("DIV").setStyle({margin:"2px",marginTop:"0px",zoom:1,overflow:"hidden"}).addCl
ass("panel").appendTo(this.panelContain);this.panelContain.appendTo(E);var
C=this.ne.options;var D=C.buttons;for(button in D)
{this.addButton(button,C,true)}this.reorder();E.noSelect()},addButton:function(buttonName,opti
ons,noOrder){var button=options.buttons[buttonName];var type=(button.type)?
eval("(typeof("+button.type+') == "undefined") ? null : '+button.type+";"):nicEditorButton;var
hasButton=bkLib.inArray(this.buttonList,buttonName);if(type&&(hasButton||
this.ne.options.fullPanel)){this.panelButtons.push(new
type(this.panelElm,buttonName,options,this.ne));if(!hasButton)
{this.buttonList.push(buttonName)}}},findButton:function(B){for(var
A=0;A<this.panelButtons.length;A++){if(this.panelButtons[A].name==B){return
this.panelButtons[A]}}},reorder:function(){var C=this.buttonList;for(var B=0;B<C.length;B++)
{var A=this.findButton(C[B]);if(A)
{this.panelElm.appendChild(A.margin)}}},remove:function(){this.elm.remove()}});
var nicEditorButton=bkClass.extend({construct:function(D,A,C,B)
{this.options=C.buttons[A];this.name=A;this.ne=B;this.elm=D;this.margin=new
bkElement("DIV").setStyle({"float":"left",marginTop:"2px"}).appendTo(D);this.contain=new
bkElement("DIV").setStyle({width:"20px",height:"20px"}).addClass("buttonContain").appendT
o(this.margin);this.border=new
bkElement("DIV").setStyle({backgroundColor:"#efefef",border:"1px solid
#efefef"}).appendTo(this.contain);this.button=new
bkElement("DIV").setStyle({width:"18px",height:"18px",overflow:"hidden",zoom:1,cursor:"poi
nter"}).addClass("button").setStyle(this.ne.getIcon(A,C)).appendTo(this.border);this.button.add
Event("mouseover",this.hoverOn.closure(this)).addEvent("mouseout",this.hoverOff.closure(this)
).addEvent("mousedown",this.mouseClick.closure(this)).noSelect();if(!window.opera)
{this.button.onmousedown=this.button.onclick=bkLib.cancelEvent}B.addEvent("selected",this.e
nable.closure(this)).addEvent("blur",this.disable.closure(this)).addEvent("key",this.key.closure(t
his));this.disable();this.init()},init:function(){},hide:function()
{this.contain.setStyle({display:"none"})},updateState:function(){if(this.isDisabled)
{this.setBg()}else{if(this.isHover){this.setBg("hover")}else{if(this.isActive)
{this.setBg("active")}else{this.setBg()}}}},setBg:function(A){switch(A){case"hover":var
B={border:"1px solid #666",backgroundColor:"#ddd"};break;case"active":var B={border:"1px
solid #666",backgroundColor:"#ccc"};break;default:var B={border:"1px solid
#efefef",backgroundColor:"#efefef"}}this.border.setStyle(B).addClass("button-"+A)},checkNod
es:function(A){var
B=A;do{if(this.options.tags&&bkLib.inArray(this.options.tags,B.nodeName))
{this.activate();return true}}while(B=B.parentNode&&B.className!
="nicEdit");B=$BK(A);while(B.nodeType==3){B=$BK(B.parentNode)}if(this.options.css)
{for(itm in this.options.css)
{if(B.getStyle(itm,this.ne.selectedInstance.instanceDoc)==this.options.css[itm])
{this.activate();return true}}}this.deactivate();return false},activate:function(){if(!
this.isDisabled)
{this.isActive=true;this.updateState();this.ne.fireEvent("buttonActivate",this)}},deactivate:functi
St. Xavier’s College (Autonomous), Kolkata

on(){this.isActive=false;this.updateState();if(!this.isDisabled)
{this.ne.fireEvent("buttonDeactivate",this)}},enable:function(A,B)
{this.isDisabled=false;this.contain.setStyle({opacity:1}).addClass("buttonEnabled");this.updateS
tate();this.checkNodes(B)},disable:function(A,B)
{this.isDisabled=true;this.contain.setStyle({opacity:0.6}).removeClass("buttonEnabled");this.up
dateState()},toggleActive:function(){(this.isActive)?
this.deactivate():this.activate()},hoverOn:function(){if(!this.isDisabled)
{this.isHover=true;this.updateState();this.ne.fireEvent("buttonOver",this)}},hoverOff:function()
{this.isHover=false;this.updateState();this.ne.fireEvent("buttonOut",this)},mouseClick:function()
{if(this.options.command)
{this.ne.nicCommand(this.options.command,this.options.commandArgs);if(!
this.options.noActive)
{this.toggleActive()}}this.ne.fireEvent("buttonClick",this)},key:function(A,B)
{if(this.options.key&&B.ctrlKey&&String.fromCharCode(B.keyCode||
B.charCode).toLowerCase()==this.options.key){this.mouseClick();if(B.preventDefault)
{B.preventDefault()}}}});
var nicPlugin=bkClass.extend({construct:function(B,A)
{this.options=A;this.ne=B;this.ne.addEvent("panel",this.loadPanel.closure(this));this.init()},load
Panel:function(C){var B=this.options.buttons;for(var A in B)
{C.addButton(A,this.options)}C.reorder()},init:function(){}});

var nicPaneOptions = { };

var nicEditorPane=bkClass.extend({construct:function(D,C,B,A)
{this.ne=C;this.elm=D;this.pos=D.pos();this.contain=new
bkElement("div").setStyle({zIndex:"99999",overflow:"hidden",position:"absolute",left:this.pos[0
]+"px",top:this.pos[1]+"px"});this.pane=new
bkElement("div").setStyle({fontSize:"12px",border:"1px solid
#ccc",overflow:"hidden",padding:"4px",textAlign:"left",backgroundColor:"#ffffc9"}).addClass("
pane").setStyle(B).appendTo(this.contain);if(A&&!A.options.noClose){this.close=new
bkElement("div").setStyle({"float":"right",height:"16px",width:"16px",cursor:"pointer"}).setStyl
e(this.ne.getIcon("close",nicPaneOptions)).addEvent("mousedown",A.removePane.closure(this))
.appendTo(this.pane)}this.contain.noSelect().appendTo(document.body);this.position();this.init()
},init:function(){},position:function(){if(this.ne.nicPanel){var B=this.ne.nicPanel.elm;var
A=B.pos();var C=A[0]+parseInt(B.getStyle("width"))-(parseInt(this.pane.getStyle("width"))
+8);if(C<this.pos[0]){this.contain.setStyle({left:C+"px"})}}},toggle:function(){this.isVisible=!
this.isVisible;this.contain.setStyle({display:
((this.isVisible)?"block":"none")})},remove:function(){if(this.contain)
{this.contain.remove();this.contain=null}},append:function(A)
{A.appendTo(this.pane)},setContent:function(A){this.pane.setContent(A)}});
St. Xavier’s College (Autonomous), Kolkata

var nicSelectOptions = {
buttons : {
'fontSize' : {name : __('Select Font Size'), type : 'nicEditorFontSizeSelect',
command : 'fontsize'},
'fontFamily' : {name : __('Select Font Family'), type :
'nicEditorFontFamilySelect', command : 'fontname'},
'fontFormat' : {name : __('Select Font Format'), type :
'nicEditorFontFormatSelect', command : 'formatBlock'}
}
};

var nicEditorSelect=bkClass.extend({construct:function(D,A,C,B)
{this.options=C.buttons[A];this.elm=D;this.ne=B;this.name=A;this.selOptions=new
Array();this.margin=new bkElement("div").setStyle({"float":"left",margin:"2px 1px 0
1px"}).appendTo(this.elm);this.contain=new
bkElement("div").setStyle({width:"90px",height:"20px",cursor:"pointer",overflow:"hidden"}).ad
dClass("selectContain").addEvent("click",this.toggle.closure(this)).appendTo(this.margin);this.it
ems=new bkElement("div").setStyle({overflow:"hidden",zoom:1,border:"1px solid
#ccc",paddingLeft:"3px",backgroundColor:"#fff"}).appendTo(this.contain);this.control=new
bkElement("div").setStyle({overflow:"hidden","float":"right",height:"18px",width:"16px"}).add
Class("selectControl").setStyle(this.ne.getIcon("arrow",C)).appendTo(this.items);this.txt=new
bkElement("div").setStyle({overflow:"hidden","float":"left",width:"66px",height:"14px",margin
Top:"1px",fontFamily:"sans-
serif",textAlign:"center",fontSize:"12px"}).addClass("selectTxt").appendTo(this.items);if(!
window.opera)
{this.contain.onmousedown=this.control.onmousedown=this.txt.onmousedown=bkLib.cancelEv
ent}this.margin.noSelect();this.ne.addEvent("selected",this.enable.closure(this)).addEvent("blur"
,this.disable.closure(this));this.disable();this.init()},disable:function()
{this.isDisabled=true;this.close();this.contain.setStyle({opacity:0.6})},enable:function(A)
{this.isDisabled=false;this.close();this.contain.setStyle({opacity:1})},setDisplay:function(A)
{this.txt.setContent(A)},toggle:function(){if(!this.isDisabled){(this.pane)?
this.close():this.open()}},open:function(){this.pane=new nicEditorPane(this.items,this.ne,
{width:"88px",padding:"0px",borderTop:0,borderLeft:"1px solid #ccc",borderRight:"1px solid
#ccc",borderBottom:"0px",backgroundColor:"#fff"});for(var C=0;C<this.selOptions.length;C+
+){var B=this.selOptions[C];var A=new
bkElement("div").setStyle({overflow:"hidden",borderBottom:"1px solid
St. Xavier’s College (Autonomous), Kolkata

#ccc",width:"88px",textAlign:"left",overflow:"hidden",cursor:"pointer"});var D=new
bkElement("div").setStyle({padding:"0px
4px"}).setContent(B[1]).appendTo(A).noSelect();D.addEvent("click",this.update.closure(this,B[
0])).addEvent("mouseover",this.over.closure(this,D)).addEvent("mouseout",this.out.closure(this,
D)).setAttributes("id",B[0]);this.pane.append(A);if(!window.opera)
{D.onmousedown=bkLib.cancelEvent}}},close:function(){if(this.pane)
{this.pane=this.pane.remove()}},over:function(A)
{A.setStyle({backgroundColor:"#ccc"})},out:function(A)
{A.setStyle({backgroundColor:"#fff"})},add:function(B,A){this.selOptions.push(new
Array(B,A))},update:function(A)
{this.ne.nicCommand(this.options.command,A);this.close()}});var
nicEditorFontSizeSelect=nicEditorSelect.extend({sel:{1:"1&nbsp;(8pt)",2:"2&nbsp;
(10pt)",3:"3&nbsp;(12pt)",4:"4&nbsp;(14pt)",5:"5&nbsp;(18pt)",6:"6&nbsp;
(24pt)"},init:function(){this.setDisplay("Font&nbsp;Size...");for(itm in this.sel)
{this.add(itm,'<font size="'+itm+'">'+this.sel[itm]+"</font>")}}});var
nicEditorFontFamilySelect=nicEditorSelect.extend({sel:{arial:"Arial","comic sans ms":"Comic
Sans","courier new":"Courier
New",georgia:"Georgia",helvetica:"Helvetica",impact:"Impact","times new
roman":"Times","trebuchet ms":"Trebuchet",verdana:"Verdana"},init:function()
{this.setDisplay("Font&nbsp;Family...");for(itm in this.sel){this.add(itm,'<font
face="'+itm+'">'+this.sel[itm]+"</font>")}}});var
nicEditorFontFormatSelect=nicEditorSelect.extend({sel:
{p:"Paragraph",pre:"Pre",h6:"Heading&nbsp;6",h5:"Heading&nbsp;5",h4:"Heading&nbsp;4",h3
:"Heading&nbsp;3",h2:"Heading&nbsp;2",h1:"Heading&nbsp;1"},init:function()
{this.setDisplay("Font&nbsp;Format...");for(itm in this.sel){var
A=itm.toUpperCase();this.add("<"+A+">","<"+itm+' style="padding: 0px; margin:
0px;">'+this.sel[itm]+"</"+A+">")}}});nicEditors.registerPlugin(nicPlugin,nicSelectOptions);

var nicButtonTips=bkClass.extend({construct:function(A)
{this.ne=A;A.addEvent("buttonOver",this.show.closure(this)).addEvent("buttonOut",this.hide.cl
osure(this))},show:function(A)
{this.timer=setTimeout(this.create.closure(this,A),400)},create:function(A){this.timer=null;if(!
this.pane){this.pane=new nicEditorPane(A.button,this.ne,
{fontSize:"12px",marginTop:"5px"});this.pane.setContent(A.options.name)}},hide:function(A)
{if(this.timer){clearTimeout(this.timer)}if(this.pane)
{this.pane=this.pane.remove()}}});nicEditors.registerPlugin(nicButtonTips);

var nicEditorAdvancedButton=nicEditorButton.extend({init:function()
{this.ne.addEvent("selected",this.removePane.closure(this)).addEvent("blur",this.removePane.cl
osure(this))},mouseClick:function(){if(!this.isDisabled){if(this.pane&&this.pane.pane)
{this.removePane()}else{this.pane=new nicEditorPane(this.contain,this.ne,{width:
(this.width||"270px"),backgroundColor:"#fff"},this);this.addPane();this.ne.selectedInstance.save
St. Xavier’s College (Autonomous), Kolkata

Rng()}}},addForm:function(C,G){this.form=new
bkElement("form").addEvent("submit",this.submit.closureListener(this));this.pane.append(this.f
orm);this.inputs={};for(itm in C){var D=C[itm];var F="";if(G){F=G.getAttribute(itm)}if(!F)
{F=D.value||""}var A=C[itm].type;if(A=="title"){new
bkElement("div").setContent(D.txt).setStyle({fontSize:"14px",fontWeight:"bold",padding:"0px",
margin:"2px 0"}).appendTo(this.form)}else{var B=new
bkElement("div").setStyle({overflow:"hidden",clear:"both"}).appendTo(this.form);if(D.txt){new
bkElement("label").setAttributes({"for":itm}).setContent(D.txt).setStyle({margin:"2px
4px",fontSize:"13px",width:"50px",lineHeight:"20px",textAlign:"right","float":"left"}).appendT
o(B)}switch(A){case"text":this.inputs[itm]=new
bkElement("input").setAttributes({id:itm,value:F,type:"text"}).setStyle({margin:"2px
0",fontSize:"13px","float":"left",height:"20px",border:"1px solid
#ccc",overflow:"hidden"}).setStyle(D.style).appendTo(B);break;case"select":this.inputs[itm]=ne
w bkElement("select").setAttributes({id:itm}).setStyle({border:"1px solid
#ccc","float":"left",margin:"2px 0"}).appendTo(B);for(opt in D.options){var E=new
bkElement("option").setAttributes({value:opt,selected:
(opt==F)?"selected":""}).setContent(D.options[opt]).appendTo(this.inputs[itm])}break;case"cont
ent":this.inputs[itm]=new bkElement("textarea").setAttributes({id:itm}).setStyle({border:"1px
solid #ccc","float":"left"}).setStyle(D.style).appendTo(B);this.inputs[itm].value=F}}}new
bkElement("input").setAttributes({type:"submit"}).setStyle({backgroundColor:"#efefef",border:
"1px solid #ccc",margin:"3px
0","float":"left",clear:"both"}).appendTo(this.form);this.form.onsubmit=bkLib.cancelEvent},sub
mit:function(){},findElm:function(B,A,E){var
D=this.ne.selectedInstance.getElm().getElementsByTagName(B);for(var C=0;C<D.length;C++)
{if(D[C].getAttribute(A)==E){return $BK(D[C])}}},removePane:function(){if(this.pane)
{this.pane.remove();this.pane=null;this.ne.selectedInstance.restoreRng()}}});

var nicLinkOptions = {
buttons : {
'link' : {name : 'Add Link', type : 'nicLinkButton', tags : ['A']},
'unlink' : {name : 'Remove Link', command : 'unlink', noActive : true}
}
};

var nicLinkButton=nicEditorAdvancedButton.extend({addPane:function()
{this.ln=this.ne.selectedInstance.selElm().parentTag("A");this.addForm({"":
{type:"title",txt:"Add/Edit Link"},href:{type:"text",txt:"URL",value:"http://",style:
St. Xavier’s College (Autonomous), Kolkata

{width:"150px"}},title:{type:"text",txt:"Title"},target:{type:"select",txt:"Open In",options:
{"":"Current Window",_blank:"New Window"},style:
{width:"100px"}}},this.ln)},submit:function(C){var A=this.inputs.href.value;if(A=="http://"||
A==""){alert("You must enter a URL to Create a Link");return false}this.removePane();if(!
this.ln){var
B="javascript:nicTemp();";this.ne.nicCommand("createlink",B);this.ln=this.findElm("A","href",
B)}if(this.ln)
{this.ln.setAttributes({href:this.inputs.href.value,title:this.inputs.title.value,target:this.inputs.targ
et.options[this.inputs.target.selectedIndex].value})}}});nicEditors.registerPlugin(nicPlugin,nicLi
nkOptions);

var nicColorOptions = {
buttons : {
'forecolor' : {name : __('Change Text Color'), type : 'nicEditorColorButton',
noClose : true},
'bgcolor' : {name : __('Change Background Color'), type :
'nicEditorBgColorButton', noClose : true}
}
};

var nicEditorColorButton=nicEditorAdvancedButton.extend({addPane:function(){var
D={0:"00",1:"33",2:"66",3:"99",4:"CC",5:"FF"};var H=new
bkElement("DIV").setStyle({width:"270px"});for(var A in D){for(var F in D){for(var E in D)
{var I="#"+D[A]+D[E]+D[F];var C=new
bkElement("DIV").setStyle({cursor:"pointer",height:"15px","float":"left"}).appendTo(H);var
G=new bkElement("DIV").setStyle({border:"2px solid "+I}).appendTo(C);var B=new
bkElement("DIV").setStyle({backgroundColor:I,overflow:"hidden",width:"11px",height:"11px"
}).addEvent("click",this.colorSelect.closure(this,I)).addEvent("mouseover",this.on.closure(this,G
)).addEvent("mouseout",this.off.closure(this,G,I)).appendTo(G);if(!window.opera)
{C.onmousedown=B.onmousedown=bkLib.cancelEvent}}}}this.pane.append(H.noSelect())},col
orSelect:function(A){this.ne.nicCommand("foreColor",A);this.removePane()},on:function(A)
{A.setStyle({border:"2px solid #000"})},off:function(A,B){A.setStyle({border:"2px solid
"+B})}});var nicEditorBgColorButton=nicEditorColorButton.extend({colorSelect:function(A)
{this.ne.nicCommand("hiliteColor",A);this.removePane()}});nicEditors.registerPlugin(nicPlugin
,nicColorOptions);
St. Xavier’s College (Autonomous), Kolkata

var nicImageOptions = {
buttons : {
'image' : {name : 'Add Image', type : 'nicImageButton', tags : ['IMG']}
}

};

var nicImageButton=nicEditorAdvancedButton.extend({addPane:function()
{this.im=this.ne.selectedInstance.selElm().parentTag("IMG");this.addForm({"":
{type:"title",txt:"Add/Edit Image"},src:{type:"text",txt:"URL",value:"http://",style:
{width:"150px"}},alt:{type:"text",txt:"Alt Text",style:{width:"100px"}},align:
{type:"select",txt:"Align",options:
{none:"Default",left:"Left",right:"Right"}}},this.im)},submit:function(B){var
C=this.inputs.src.value;if(C==""||C=="http://"){alert("You must enter a Image URL to
insert");return false}this.removePane();if(!this.im){var
A="javascript:nicImTemp();";this.ne.nicCommand("insertImage",A);this.im=this.findElm("IMG
","src",A)}if(this.im)
{this.im.setAttributes({src:this.inputs.src.value,alt:this.inputs.alt.value,align:this.inputs.align.val
ue})}}});nicEditors.registerPlugin(nicPlugin,nicImageOptions);

var nicSaveOptions = {
buttons : {
'save' : {name : __('Save this content'), type : 'nicEditorSaveButton'}
}
};

var nicEditorSaveButton=nicEditorButton.extend({init:function(){if(!this.ne.options.onSave)
{this.margin.setStyle({display:"none"})}},mouseClick:function(){var
B=this.ne.options.onSave;var
A=this.ne.selectedInstance;B(A.getContent(),A.elm.id,A)}});nicEditors.registerPlugin(nicPlugin
,nicSaveOptions);
St. Xavier’s College (Autonomous), Kolkata

var nicXHTML=bkClass.extend({stripAttributes:
["_moz_dirty","_moz_resizing","_extended"],noShort:
["style","title","script","textarea","a"],cssReplace:{"font-weight:bold;":"strong","font-
style:italic;":"em"},sizes:{1:"xx-small",2:"x-small",3:"small",4:"medium",5:"large",6:"x-
large"},construct:function(A){this.ne=A;if(this.ne.options.xhtml)
{A.addEvent("get",this.cleanup.closure(this))}},cleanup:function(A){var B=A.getElm();var
C=this.toXHTML(B);A.content=C},toXHTML:function(C,A,L){var G="";var O="";var
P="";var I=C.nodeType;var Q=C.nodeName.toLowerCase();var
N=C.hasChildNodes&&C.hasChildNodes();var B=new Array();switch(I){case 1:var
H=C.attributes;switch(Q)
{case"b":Q="strong";break;case"i":Q="em";break;case"font":Q="span";break}if(A){for(var
F=0;F<H.length;F++){var K=H[F];var M=K.nodeName.toLowerCase();var D=K.nodeValue;if(!
K.specified||!D||bkLib.inArray(this.stripAttributes,M)||typeof (D)=="function")
{continue}switch(M){case"style":var J=D.replace(/ /g,"");for(itm in this.cssReplace)
{if(J.indexOf(itm)!=-1)
{B.push(this.cssReplace[itm]);J=J.replace(itm,"")}}P+=J;D="";break;case"class":D=D.replace("
Apple-style-span","");break;case"size":P+="font-size:"+this.sizes[D]+";";D="";break}if(D)
{O+=" "+M+'="'+D+'"'}}if(P){O+=' style="'+P+'"'}for(var F=0;F<B.length;F++){G+="<"+B[F]
+">"}if(O==""&&Q=="span"){A=false}if(A){G+="<"+Q;if(Q!="br"){G+=O}}}if(!N&&!
bkLib.inArray(this.noShort,M)){if(A){G+=" />"}}else{if(A){G+=">"}for(var
F=0;F<C.childNodes.length;F++){var E=this.toXHTML(C.childNodes[F],true,true);if(E)
{G+=E}}}if(A&&N){G+="</"+Q+">"}for(var F=0;F<B.length;F++){G+="</"+B[F]
+">"}break;case 3:G+=C.nodeValue;break}return G}});nicEditors.registerPlugin(nicXHTML);

var nicCodeOptions = {
buttons : {
'xhtml' : {name : 'Edit HTML', type : 'nicCodeButton'}
}

};

var nicCodeButton=nicEditorAdvancedButton.extend({width:"350px",addPane:function()
{this.addForm({"":{type:"title",txt:"Edit HTML"},code:
{type:"content",value:this.ne.selectedInstance.getContent(),style:
{width:"340px",height:"200px"}}})},submit:function(B){var
St. Xavier’s College (Autonomous), Kolkata

A=this.inputs.code.value;this.ne.selectedInstance.setContent(A);this.removePane()}});nicEditors
.registerPlugin(nicPlugin,nicCodeOptions);

var nicBBCode=bkClass.extend({construct:function(A){this.ne=A;if(this.ne.options.bbCode)
{A.addEvent("get",this.bbGet.closure(this));A.addEvent("set",this.bbSet.closure(this));var
B=this.ne.loadedPlugins;for(itm in B){if(B[itm].toXHTML)
{this.xhtml=B[itm]}}}},bbGet:function(A){var
B=this.xhtml.toXHTML(A.getElm());A.content=this.toBBCode(B)},bbSet:function(A)
{A.content=this.fromBBCode(A.content)},toBBCode:function(B){function A(D,C)
{B=B.replace(D,C)}A(/\n/gi,"");A(/<strong>(.*?)<\/strong>/gi,"[b]$1[/b]");A(/<em>(.*?)<\/
em>/gi,"[i]$1[/i]");A(/<span.*?style="text-decoration:underline;">(.*?)<\/span>/gi,"[u]$1[/
u]");A(/<ul>(.*?)<\/ul>/gi,"[list]$1[/list]");A(/<li>(.*?)<\/li>/gi,"[*]$1[]");A(/<ol>(.*?)<\/ol>/
gi,"[list=1]$1[/list]");A(/<img.*?src="(.*?)".*?>/gi,"[img]$1[/img]");A(/<a.*?href="(.*?)".*?
>(.*?)<\/a>/gi,"[url=$1]$2[/url]");A(/<br.*?>/gi,"\n");A(/<.*?>.*?<\/.*?>/gi,"");return
B},fromBBCode:function(A){function
B(D,C){A=A.replace(D,C)}B(/\[b\](.*?)\[\/b\]/gi,"<strong>$1</strong>");B(/\[i\](.*?)\[\/i\]/
gi,"<em>$1</em>");B(/\[u\](.*?)\[\/u\]/gi,'<span
style="text-decoration:underline;">$1</span>');B(/\[list\](.*?)\[\/list\]/gi,"<ul>$1</ul>");B(/\
[list=1\](.*?)\[\/list\]/gi,"<ol>$1</ol>");B(/\[\*\](.*?)\[\/\*\]/gi,"<li>$1</li>");B(/\[img\](.*?)\[\/
img\]/gi,'<img src="$1" />');B(/\[url=(.*?)\](.*?)\[\/url\]/gi,'<a
href="$1">$2</a>');B(/\n/gi,"<br />");return A}});nicEditors.registerPlugin(nicBBCode);

var nicUploadOptions = {
buttons : {
'upload' : {name : 'Upload Image', type : 'nicUploadButton'}
}

};

var nicUploadButton=nicEditorAdvancedButton.extend({nicURI:"https://api.imgur.com/3/
image",errorText:"Failed to upload image",addPane:function(){if(typeof
window.FormData==="undefined"){return this.onError("Image uploads are not supported in this
browser, use Chrome, Firefox, or Safari
instead.")}this.im=this.ne.selectedInstance.selElm().parentTag("IMG");var A=new
bkElement("div").setStyle({padding:"10px"}).appendTo(this.pane.pane);new
bkElement("div").setStyle({fontSize:"14px",fontWeight:"bold",paddingBottom:"5px"}).setCont
St. Xavier’s College (Autonomous), Kolkata

ent("Insert an Image").appendTo(A);this.fileInput=new
bkElement("input").setAttributes({type:"file"}).appendTo(A);this.progress=new
bkElement("progress").setStyle({width:"100%",display:"none"}).setAttributes("max",100).appe
ndTo(A);this.fileInput.onchange=this.uploadFile.closure(this)},onError:function(A)
{this.removePane();alert(A||"Failed to upload image")},uploadFile:function(){var
B=this.fileInput.files[0];if(!B||!B.type.match(/image.*/)){this.onError("Only image files can be
uploaded");return }this.fileInput.setStyle({display:"none"});this.setProgress(0);var A=new
FormData();A.append("image",B);var C=new
XMLHttpRequest();C.open("POST",this.ne.options.uploadURI||
this.nicURI);C.onload=function(){try{var D=JSON.parse(C.responseText).data}catch(E){return
this.onError()}if(D.error){return
this.onError(D.error)}this.onUploaded(D)}.closure(this);C.onerror=this.onError.closure(this);C.
upload.onprogress=function(D){this.setProgress(D.loaded/
D.total)}.closure(this);C.setRequestHeader("Authorization","Client-ID
c37fc05199a05b7");C.send(A)},setProgress:function(A)
{this.progress.setStyle({display:"block"});if(A<0.98)
{this.progress.value=A}else{this.progress.removeAttribute("value")}},onUploaded:function(B)
{this.removePane();var D=B.link;if(!this.im){this.ne.selectedInstance.restoreRng();var
C="javascript:nicImTemp();";this.ne.nicCommand("insertImage",D);this.im=this.findElm("IMG
","src",D)}var A=parseInt(this.ne.selectedInstance.elm.getStyle("width"));if(this.im)
{this.im.setAttributes({src:D,width:(A&&B.width)?
Math.min(A,B.width):""})}}});nicEditors.registerPlugin(nicPlugin,nicUploadOptions);

/* START CONFIG */
var nicExampleOptions = {
buttons : {
'example' : {name : __('Some alt text for the button'), type : 'nicEditorExampleButton'}
}/* NICEDIT_REMOVE_START */,iconFiles : {'example' :
'http://js.nicedit.com/nicEditIcons-latest.gif'}/* NICEDIT_REMOVE_END */
};
/* END CONFIG */

bkLib.onDomLoaded(function() {
St. Xavier’s College (Autonomous), Kolkata

new nicEditor({buttonList :
['fontSize','fontFamily','bold','italic','underline','strikeThrough','ul','forecolor','bgcolor','link','unlin
k']}).panelInstance('area4');

});
Pages.php
<html>

<head>

<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet"
href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.16.0/umd/popper.min.js"></
script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/js/bootstrap.min.js"></script>

<style>

#sidebar{position:relative;margin-top:-20px}
#content{position:relative;margin-left:210px}
@media screen and (max-width: 600px) {

#content {
position:relative;margin-left:auto;margin-right:auto;
St. Xavier’s College (Autonomous), Kolkata

}
}
#he{
font-size: 14px;
font-weight: 600;
text-transform: uppercase;
padding: 3px 7px;
color: #fff;
text-decoration: none;
border-radius: 3px;
align:center
}

</style>

</head>
<?php
include 'conn.php';
include 'session.php';
if (isset($_SESSION['loggedin']) && $_SESSION['loggedin'] == true) {
?>
<body style="color:black">
<div id="header" >
<?php include 'header.php';
?>
</div>
<div id="sidebar">
St. Xavier’s College (Autonomous), Kolkata

<?php $active="pages";
include 'sidebar.php'; ?>

</div>
<div id="content" >
<div class="content-wrapper">
<div class="container-fluid">
<div class="row">
<div class="col-md-12 lg-12 sm-12">

<h1 class="page-title">Manage Page Data</h1>

</div>

</div>
<hr>
<?php
$limit = 3;
if(isset($_GET['page'])){
$page = $_GET['page'];
}else{
$page = 1;
}
$offset = ($page - 1) * $limit;
$count=$offset+1;
$sql= "select * from pages LIMIT {$offset},{$limit} ";
$result=mysqli_query($conn,$sql);
St. Xavier’s College (Autonomous), Kolkata

if(mysqli_num_rows($result)>0) {
?>

<div class="table-responsive">
<table class="table table-bordered" style="text-align:center">
<thead style="text-align:center">
<th style="text-align:center">S.no</th>
<th style="text-align:center">Page Name</th>
<th style="text-align:center">Page Type</th>
<th style="text-align:center">Page Data</th>
<th style="text-align:center">Edit Page</th>
</thead>
<tbody>
<?php
while($row = mysqli_fetch_assoc($result)) { ?>
<tr>
<td ><?php echo $count++; ?></td>
<td ><?php echo $row['page_name']; ?></td>
<td ><?php echo $row['page_type']; ?></td>
<td id="example" style="text-align:left"><div style="width:100%; max-
height:110px; overflow:auto"><?php echo $row['page_data']; ?></div></td>
<td id="he" style="width:100px;">
<a style="background-color:aqua" href='update_page_details.php?type=<?php echo
$row['page_type'];?>'> <span class="glyphicon glyphicon-edit"></span></a>
</td>
</tr>
<?php } ?>
</tbody>
St. Xavier’s College (Autonomous), Kolkata

</table>
</div>
<?php } ?>

<div class="table-responsive"style="text-align:center;align:center">
<?php
$sql1 = "SELECT * FROM pages";
$result1 = mysqli_query($conn, $sql1) or die("Query Failed.");

if(mysqli_num_rows($result1) > 0){

$total_records = mysqli_num_rows($result1);

$total_page = ceil($total_records / $limit);

echo '<ul class="pagination admin-pagination">';


if($page > 1){
echo '<li><a href="pages.php?page='.($page - 1).'">Prev</a></li>';
}
for($i = 1; $i <= $total_page; $i++){
if($i == $page){
$active = "active";
}else{
$active = "";
}
echo '<li class="'.$active.'"><a href="pages.php?page='.$i.'">'.$i.'</a></li>';
}
St. Xavier’s College (Autonomous), Kolkata

if($total_page > $page){


echo '<li><a href="pages.php?page='.($page + 1).'">Next</a></li>';
}

echo '</ul>';
}
?>
</div>
</div>
</div>
</div>
<?php }
else {
echo '<div class="alert alert-danger"><b> Please Login First To Access Admin
Portal.</b></div>';
?>
<form method="post" name="" action="login.php" class="form-horizontal">
<div class="form-group">
<div class="col-sm-8 col-sm-offset-4" style="float:left">

<button class="btn btn-primary" name="submit" type="submit">Go to Login


Page</button>
</div>
</div>
</form>
<?php }

?>
St. Xavier’s College (Autonomous), Kolkata

</body>
</html>

Pending_querry.php
<html>

<head>

<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet"
href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.16.0/umd/popper.min.js"></
script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/js/bootstrap.min.js"></script>

<style>

#sidebar{position:relative;margin-top:-20px}
#content{position:relative;margin-left:210px}
@media screen and (max-width: 600px) {
#content {
position:relative;margin-left:auto;margin-right:auto;
}
}
#he{
font-size: 14px;
St. Xavier’s College (Autonomous), Kolkata

font-weight: 600;
text-transform: uppercase;
padding: 3px 7px;
color: #fff;
text-decoration: none;
border-radius: 3px;
align:center
}
</style>
</head>
<?php
include 'conn.php';
include 'session.php';
if (isset($_SESSION['loggedin']) && $_SESSION['loggedin'] == true) {
?>
<body style="color:black">
<div id="header">
<?php include 'header.php';
?>
</div>
<div id="sidebar">
<?php $active="query"; include 'sidebar.php'; ?>

</div>
<div id="content" >
<div class="content-wrapper">
<div class="container-fluid">
St. Xavier’s College (Autonomous), Kolkata

<div class="row">
<div class="col-md-12 lg-12 sm-12">

<h1 class="page-title">Pending Query</h1>

</div>

</div>
<hr>
<script>
function clickme(){
if(confirm("Do you really Want to Read ?"))
{
document.getElementById("demo").innerHTML = "Read";
<?php
echo '<div class="alert alert-info alert_dismissible"><b><button type="button"
class="close" data-dismiss="alert">&times;</button></b><b>Pending Request
"Read".</b></div>';

$que_id = $_GET['id'];
$sql1="update contact_query set query_status='1' where query_id={$que_id}";
$result=mysqli_query($conn,$sql1);
?>
}
}

</script>
St. Xavier’s College (Autonomous), Kolkata

<?php
include 'conn.php';

$limit = 10;
if(isset($_GET['page'])){
$page = $_GET['page'];
}else{
$page = 1;
}
$offset = ($page - 1) * $limit;
$count=$offset+1;
$sql= " select * from contact_query where query_status>1 LIMIT {$offset},{$limit}";
$result=mysqli_query($conn,$sql);
if(mysqli_num_rows($result)>0) {
?>

<div class="table-responsive">
<table class="table table-bordered" style="text-align:center">
<thead style="text-align:center">
<th style="text-align:center">S.no</th>
<th style="text-align:center">Name</th>
<th style="text-align:center">Email Id</th>
<th style="text-align:center">Mobile Number</th>
<th style="text-align:center">Message</th>
<th style="text-align:center">Posting Date</th>
St. Xavier’s College (Autonomous), Kolkata

<th style="text-align:center">Status</th>
<th style="text-align:center">Action</th>
</thead>
<tbody>
<?php
while($row = mysqli_fetch_assoc($result)) { ?>
<tr>

<td><?php echo $count++; ?></td>


<td><?php echo $row['query_name']; ?></td>
<td><?php echo $row['query_mail']; ?></td>
<td><?php echo $row['query_number']; ?></td>
<td><?php echo $row['query_message']; ?></td>
<td><?php echo $row['query_date']; ?></td>
<?php if($row['query_status']==1)
{
?><td>Read<br></td>
<?php } else {?>

<td><a href="query.php?id=<?php echo $row['query_id'];?>" onclick="clickme()"><b


id="demo">Pending</b></a><br>

</td>
<?php } ?>
<td id="he" style="width:100px">
<a style="background-color:aqua" href='delete_query.php?id=<?php echo
$row['query_id']; ?>'> Delete </a>
St. Xavier’s College (Autonomous), Kolkata

</td>
</tr>
<?php } ?>
</tbody>
</table>
</div>
<?php } ?>

<div class="table-responsive"style="text-align:center;align:center">
<?php
$sql1 = "SELECT * FROM contact_query";
$result1 = mysqli_query($conn, $sql1) or die("Query Failed.");

if(mysqli_num_rows($result1) > 0){

$total_records = mysqli_num_rows($result1);

$total_page = ceil($total_records / $limit);

echo '<ul class="pagination admin-pagination">';


if($page > 1){
echo '<li><a href="query.php?page='.($page - 1).'">Prev</a></li>';
}
for($i = 1; $i <= $total_page; $i++){
if($i == $page){
$active = "active";
}else{
St. Xavier’s College (Autonomous), Kolkata

$active = "";
}
echo '<li class="'.$active.'"><a href="query.php?page='.$i.'">'.$i.'</a></li>';
}
if($total_page > $page){
echo '<li><a href="query.php.php?page='.($page + 1).'">Next</a></li>';
}

echo '</ul>';
}
?>

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

<?php
} else {
echo '<div class="alert alert-danger"><b> Please Login First To Access Admin
Portal.</b></div>';
?>
<form method="post" name="" action="login.php" class="form-horizontal">
<div class="form-group">
<div class="col-sm-8 col-sm-offset-4" style="float:left">

<button class="btn btn-primary" name="submit" type="submit">Go to Login


Page</button>
</div>
St. Xavier’s College (Autonomous), Kolkata

</div>
</form>
<?php }
?>

</body>
</html>

Querry.php
<html>

<head>

<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet"
href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.16.0/umd/popper.min.js"></
script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/js/bootstrap.min.js"></script>

<style>

#sidebar{position:relative;margin-top:-20px}
#content{position:relative;margin-left:210px}
@media screen and (max-width: 600px) {
#content {
St. Xavier’s College (Autonomous), Kolkata

position:relative;margin-left:auto;margin-right:auto;
}
}
#he{
font-size: 14px;
font-weight: 600;
text-transform: uppercase;
padding: 3px 7px;
color: #fff;
text-decoration: none;
border-radius: 3px;
align:center
}
</style>
</head>
<?php
include 'conn.php';
include 'session.php';
if (isset($_SESSION['loggedin']) && $_SESSION['loggedin'] == true) {
?>
<body style="color:black">
<div id="header">
<?php include 'header.php';
?>
</div>
<div id="sidebar">
<?php $active="query"; include 'sidebar.php'; ?>
St. Xavier’s College (Autonomous), Kolkata

</div>
<div id="content" >
<div class="content-wrapper">
<div class="container-fluid">
<div class="row">
<div class="col-md-12 lg-12 sm-12">

<h1 class="page-title">User Query</h1>

</div>

</div>
<hr>
<script>
function clickme(){
if(confirm("Do you really Want to Read ?"))
{
document.getElementById("demo").innerHTML = "Read";
<?php
echo '<div class="alert alert-info alert_dismissible"><b><button type="button"
class="close" data-dismiss="alert">&times;</button></b><b>Pending Request
"Read".</b></div>';

$que_id = $_GET['id'];
$sql1="update contact_query set query_status='1' where query_id={$que_id}";
$result=mysqli_query($conn,$sql1);
?>
St. Xavier’s College (Autonomous), Kolkata

}
}

</script>

<?php
include 'conn.php';

$limit = 10;
if(isset($_GET['page'])){
$page = $_GET['page'];
}else{
$page = 1;
}
$offset = ($page - 1) * $limit;
$count=$offset+1;
$sql= "select * from contact_query LIMIT {$offset},{$limit}";
$result=mysqli_query($conn,$sql);
if(mysqli_num_rows($result)>0) {
?>

<div class="table-responsive">
<table class="table table-bordered" style="text-align:center">
<thead style="text-align:center">
<th style="text-align:center">S.no</th>
St. Xavier’s College (Autonomous), Kolkata

<th style="text-align:center">Name</th>
<th style="text-align:center">Email Id</th>
<th style="text-align:center">Mobile Number</th>
<th style="text-align:center">Message</th>
<th style="text-align:center">Posting Date</th>
<th style="text-align:center">Status</th>
<th style="text-align:center">Action</th>
</thead>
<tbody>
<?php
while($row = mysqli_fetch_assoc($result)) { ?>
<tr>

<td><?php echo $count++; ?></td>


<td><?php echo $row['query_name']; ?></td>
<td><?php echo $row['query_mail']; ?></td>
<td><?php echo $row['query_number']; ?></td>
<td><?php echo $row['query_message']; ?></td>
<td><?php echo $row['query_date']; ?></td>
<?php if($row['query_status']==1)
{
?><td>Read<br></td>
<?php } else {?>

<td><a href="query.php?id=<?php echo $row['query_id'];?>" onclick="clickme()"><b


id="demo">Pending</b></a><br>
St. Xavier’s College (Autonomous), Kolkata

</td>
<?php } ?>
<td id="he" style="width:100px">
<a style="background-color:aqua" href='delete_query.php?id=<?php echo
$row['query_id']; ?>'> Delete </a>
</td>
</tr>
<?php } ?>
</tbody>
</table>
</div>
<?php } ?>

<div class="table-responsive"style="text-align:center;align:center">
<?php
$sql1 = "SELECT * FROM contact_query";
$result1 = mysqli_query($conn, $sql1) or die("Query Failed.");

if(mysqli_num_rows($result1) > 0){

$total_records = mysqli_num_rows($result1);

$total_page = ceil($total_records / $limit);

echo '<ul class="pagination admin-pagination">';


if($page > 1){
echo '<li><a href="query.php?page='.($page - 1).'">Prev</a></li>';
}
St. Xavier’s College (Autonomous), Kolkata

for($i = 1; $i <= $total_page; $i++){


if($i == $page){
$active = "active";
}else{
$active = "";
}
echo '<li class="'.$active.'"><a href="query.php?page='.$i.'">'.$i.'</a></li>';
}
if($total_page > $page){
echo '<li><a href="query.php.php?page='.($page + 1).'">Next</a></li>';
}

echo '</ul>';
}
?>

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

<?php
} else {
echo '<div class="alert alert-danger"><b> Please Login First To Access Admin
Portal.</b></div>';
?>
<form method="post" name="" action="login.php" class="form-horizontal">
<div class="form-group">
<div class="col-sm-8 col-sm-offset-4" style="float:left">
St. Xavier’s College (Autonomous), Kolkata

<button class="btn btn-primary" name="submit" type="submit">Go to Login


Page</button>
</div>
</div>
</form>
<?php }
?>

</body>
</html>

Save_donor_data.php
<?php
$name=$_POST['fullname'];
$number=$_POST['mobileno'];
$email=$_POST['emailid'];
$age=$_POST['age'];
$gender=$_POST['gender'];
$blood_group=$_POST['blood'];
$address=$_POST['address'];
$conn=mysqli_connect("localhost","root","","blood_donation") or die("Connection error");
$sql= "INSERT INTO
donor_details(donor_name,donor_number,donor_mail,donor_age,donor_gender,donor_blood,do
nor_address)
values('{$name}','{$number}','{$email}','{$age}','{$gender}','{$blood_group}','{$address}')";
$result=mysqli_query($conn,$sql) or die("query unsuccessful.");
header("Location: http://localhost/BDMS/admin/donor_list.php");
St. Xavier’s College (Autonomous), Kolkata

mysqli_close($conn);
?>

Session.php
<?php session_start(); ?>
Sidebar.php
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Sofia">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet"
href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.0/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.0/js/bootstrap.min.js"></script>
<style>
body {
margin: 0;
font-family: 'Averia Gruesa Libre';font-size: 15px;
color:#F8F9F9;
}

.sidebar {
margin: 0;
padding: 0;
width: 210px;
background-color: #333333;
St. Xavier’s College (Autonomous), Kolkata

position: fixed;
height: 100%;
overflow: auto;

.sidebar a {
display: block;
color: white;

padding: 16px;
text-decoration: none;
}

.sidebar a:hover:not(.active) {
background-color: #555;
color: white;
}

div.content {
margin-left: 200px;
padding: 1px 16px;
height: 1000px;
}
St. Xavier’s College (Autonomous), Kolkata

@media screen and (max-width: 700px) {


.sidebar {
width: 100%;
height: auto;
position: relative;
}
.sidebar a {float: left;}
div.content {margin-left: 0;}
}
a.act{
background: linear-gradient(to right, #00C9FF 0%, #92FE9D 100%);
color: black;
border-radius:10px;
}

@media screen and (max-width: 400px) {


.sidebar a {
text-align: center;
float: none;
}
}
</style>
</head>
<body>

<div class="sidebar" ><b>


St. Xavier’s College (Autonomous), Kolkata

<a href="dashboard.php" <?php if($active=='dashboard') echo "class='act'"; ?>><span


class="glyphicon glyphicon-dashboard"></span>&nbsp&nbspDashboard</a>
<a href="add_donor.php" <?php if($active=='add') echo "class='act'"; ?>><span
class="glyphicon glyphicon-pencil"></span>&nbsp&nbspAdd Donor</a>
<a href="donor_list.php" <?php if($active=='list') echo "class='act'"; ?>><span
class="glyphicon glyphicon-list-alt"></span>&nbsp&nbsp Donor List</a>
<a href="query.php" <?php if($active=='query') echo "class='act'"; ?>><span
class="glyphicon glyphicon-check"></span>&nbsp&nbspCheck Contactus Query</a>

<a href="pages.php" <?php if($active=='pages') echo "class='act'"; ?>><span


class="glyphicon glyphicon-edit"></span>&nbsp&nbspManage Pages</a>
<a href="update_contact.php" <?php if($active=='contact') echo "class='act'"; ?>><span
class="glyphicon glyphicon-edit"></span>&nbsp&nbspUpdate Contact Info</a>

</div>

Update_connect.php
<html>

<head>

<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet"
href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.16.0/umd/popper.min.js"></
script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/js/bootstrap.min.js"></script>
St. Xavier’s College (Autonomous), Kolkata

<style>

#sidebar{position:relative;margin-top:-20px}
#content{position:relative;margin-left:210px}
@media screen and (max-width: 600px) {
#content {
position:relative;margin-left:auto;margin-right:auto;
}
}
</style>
</head>

<body style="color:black">

<?php
include 'conn.php';
include 'session.php';
if (isset($_SESSION['loggedin']) && $_SESSION['loggedin'] == true) {
?>

<div id="header">
<?php include 'header.php';
?>
</div>
<div id="sidebar">
<?php
$active="contact";
St. Xavier’s College (Autonomous), Kolkata

include 'sidebar.php'; ?>

</div>
<div id="content">
<div class="content-wrapper">
<div class="container-fluid">
<div class="row">
<div class="col-md-12 lg-12 sm-12">

<h1 class="page-title">Update Contact Info</h1>


</div>
</div>
<hr>
<?php if(isset($_POST['update']))
{
$address=$_POST['address'];
$number=$_POST['email'];
$email=$_POST['contactno'];
$conn=mysqli_connect("localhost","root","","blood_donation") or die("Connection error");
$sql= "update contact_info set contact_address='{$address}', contact_mail='{$email}',
contact_phone='{$number}' where contact_id='1'";
$result=mysqli_query($conn,$sql) or die("query unsuccessful.");
echo '<div class="alert alert-success"><b>Contact Details Updated Successfully.</b></div>';

mysqli_close($conn);
}
?>
St. Xavier’s College (Autonomous), Kolkata

<div class="row">
<div class="col-md-10">
<div class="panel panel-default">
<div class="panel-heading">Contact Details</div>
<div class="panel-body">
<form method="post" name="change_contact" class="form-horizontal">

<div class="form-group">
<label class="col-sm-4 control-label"> Address</label>
<div class="col-sm-8">
<textarea class="form-control" name="address" id="address" required></textarea>
</div>
</div>
<div class="form-group">
<label class="col-sm-4 control-label"> Email id</label>
<div class="col-sm-8">
<input type="email" class="form-control" name="email" id="email" value=""
required>
</div>
</div>
<div class="form-group">
<label class="col-sm-4 control-label"> Contact Number </label>
<div class="col-sm-8">
<input type="text" class="form-control" value="" name="contactno" id="contactno"
required>
</div>
</div>
St. Xavier’s College (Autonomous), Kolkata

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

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

<button class="btn btn-primary" name="update" type="submit">Update</button>


</div>
</div>

</form>

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

</div>

</div>
</div>
</div>
<?php
} else {
St. Xavier’s College (Autonomous), Kolkata

echo '<div class="alert alert-danger"><b> Please Login First To Access Admin


Portal.</b></div>';
?>
<form method="post" name="" action="login.php" class="form-horizontal">
<div class="form-group">
<div class="col-sm-8 col-sm-offset-4" style="float:left">

<button class="btn btn-primary" name="submit" type="submit">Go to Login


Page</button>
</div>
</div>
</form>
<?php }
?>

</body>
</html>

Update_page_details.php

<html>

<head>

<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet"
href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css">
St. Xavier’s College (Autonomous), Kolkata

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.16.0/umd/popper.min.js"></
script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/js/bootstrap.min.js"></script>
<script type="text/javascript" src="nicEdit.js"></script>
<style>

#sidebar{position:relative;margin-top:-20px}
#content{position:relative;margin-left:210px}
@media screen and (max-width: 600px) {
#content {
position:relative;margin-left:auto;margin-right:auto;
}

#area1, #area4{
width: 70vw;
min-height: 50vh;
font-family: tahoma;
}

.nicEdit-panel > div > * {


opacity: 1 !important;
}

.nicEdit-buttonContain {
padding: .5em;
}
St. Xavier’s College (Autonomous), Kolkata

.nicEdit-panelContain{

.nicEdit-selectContain{
margin-top: 8px;
padding:.5em
}

.nicEdit-selectTxt{
font-family: Tahoma !important;
font-size: 12px !important;
}

.nicEdit-main{
outline: 0;
}

}
</style>
</head>

<body style="color:black">

<?php
include 'conn.php';
St. Xavier’s College (Autonomous), Kolkata

include 'session.php';
if (isset($_SESSION['loggedin']) && $_SESSION['loggedin'] == true) {
?>

<div id="header">
<?php include 'header.php';
?>
</div>
<div id="sidebar">
<?php $active ="";
include 'sidebar.php'; ?>

</div>
<div id="content">
<div class="content-wrapper">
<div class="container-fluid">
<div class="row">
<div class="col-md-12 lg-12 sm-12">

<h1 class="page-title">Update Page Details</h1>


</div>
</div>
<hr>
<div class="row">
<div class="col-md-10">
<div class="panel panel-default">
<div class="panel-heading">Page Details</div>
St. Xavier’s College (Autonomous), Kolkata

<div class="panel-body">

<form name="updata_page" method="post">


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

<div class="form-group">
<label class="col-sm-4 control-label">Selected Page : </label>
<?php
include 'conn.php';
switch($_GET['type'])
{
case "aboutus" :
echo "About US";
break;
case "donor" :
echo "Why Donate Blood";
break;
case "needforblood" :
echo "The Need For Blood";
break;
case "needforblood" :
echo "The Need For Blood";
break;
case "bloodtips" :
echo "Blood Tips";
break;
case "whoyouhelp" :
St. Xavier’s College (Autonomous), Kolkata

echo "Why you could Help";


break;
case "bloodgroups" :
echo "Blood Groups";
break;
case "universal" :
echo "Universal Donors And Recepients";
break;
}

?>
</div>
<div class="form-group">
<label class="col-sm-4 control-label">Page Details: </label>
<div class="col-sm-4">
<div id="sample">

<textarea cols="60" rows="10" id="area4" name="data">


</textarea>

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

<div class="form-group">
<div class="col-sm-8 col-sm-offset-4"><br>
St. Xavier’s College (Autonomous), Kolkata

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


</div>
</div>

</form>

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

</div>

<?php if(isset($_POST['submit']))
{
$type=$_GET['type'];
$data=$_POST['data'];
$conn=mysqli_connect("localhost","root","","blood_donation") or die("Connection error");
$sql= "update pages set page_data='{$data}'where page_type='{$type}'";
$result=mysqli_query($conn,$sql) or die("query unsuccessful.");
echo '<div class="alert alert-success"><b>Page Data Updated Successfully.</b></div>';
}

?>

</div>
St. Xavier’s College (Autonomous), Kolkata

</div>
</div>
<?php
} else {
echo '<div class="alert alert-danger"><b> Please Login First To Access Admin
Portal.</b></div>';
?>
<form method="post" name="" action="login.php" class="form-horizontal">
<div class="form-group">
<div class="col-sm-8 col-sm-offset-4" style="float:left">

<button class="btn btn-primary" name="submit" type="submit">Go to Login


Page</button>
</div>
</div>
</form>
<?php }
?>

</body>
</html>

User side
About_us.php
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
St. Xavier’s College (Autonomous), Kolkata

<meta name="description" content="">


<meta name="author" content="">
<link rel="stylesheet"
href="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.16.0/umd/popper.min.js"></
script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js"></script>
<link rel="icon" type="image/x-icon" href="image/favicon.ico"/>

</head>
<style>
</style>
<body>

<?php
$active ='about';
include('head.php');

?>

<div id="page-container" style="margin-top:50px; position: relative;min-height: 84vh;">


<div class="container">
<div id="content-wrap" style="padding-bottom:50px;">
<div class="row">
<div class="col-lg-6">
St. Xavier’s College (Autonomous), Kolkata

<h1 class="mt-4 mb-3">About Us</h1>


<p> <?php
include 'conn.php';
$sql=$sql= "select * from pages where page_type='aboutus'";
$result=mysqli_query($conn,$sql);
if(mysqli_num_rows($result)>0) {
while($row = mysqli_fetch_assoc($result)) {
echo $row['page_data'];
}
}

?>
</p>

</div>
<div class="col-lg-6">
<img class="img-fluid rounded" src="image\banner_590x300.jpg" style="height:400px"
alt="error" >
</div>
</div>
</div></div>

<?php include('footer.php')
?>
</div>
</body>

</html>
St. Xavier’s College (Autonomous), Kolkata

Contact_us.php
<html>
<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="">
<link rel="stylesheet"
href="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.16.0/umd/popper.min.js"></
script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js"></script>
<link rel="icon" type="image/x-icon" href="image/favicon.ico"/>
</head>

<body>
<?php $active ='contact';
include 'head.php'; ?>
<?php
if(isset($_POST["send"])){
$name=$_POST['fullname'];
$number=$_POST['contactno'];
$email=$_POST['email'];
$message=$_POST['message'];
$conn=mysqli_connect("localhost","root","","blood_donation") or die("Connection error");
St. Xavier’s College (Autonomous), Kolkata

$sql= "insert into contact_query (query_name,query_mail,query_number,query_message)


values('{$name}','{$number}','{$email}','{$message}')";
$result=mysqli_query($conn,$sql) or die("query unsuccessful.");
echo '<div class="alert alert-success alert_dismissible"><b><button type="button"
class="close" data-dismiss="alert">&times;</button></b><b>Query Sent, We will contact you
shortly. </b></div>';
}?>

<div id="page-container" style="margin-top:50px; position: relative;min-height: 84vh;">


<div class="container">
<div id="content-wrap" style="padding-bottom:50px;">
<h1 class="mt-4 mb-3">Contact</h1>
<div class="row">
<div class="col-lg-8 mb-4">
<h3>Send us a Message</h3>
<form name="sentMessage" method="post">
<div class="control-group form-group">
<div class="controls">
<label>Full Name:</label>
<input type="text" class="form-control" id="name" name="fullname" required>
<p class="help-block"></p>
</div>
</div>
<div class="control-group form-group">
<div class="controls">
<label>Phone Number:</label>
<input type="tel" class="form-control" id="phone" name="contactno" required >
</div>
St. Xavier’s College (Autonomous), Kolkata

</div>
<div class="control-group form-group">
<div class="controls">
<label>Email Address:</label>
<input type="email" class="form-control" id="email" name="email" required>
</div>
</div>
<div class="control-group form-group">
<div class="controls">
<label>Message:</label>
<textarea rows="10" cols="100" class="form-control" id="message"
name="message" required maxlength="999" style="resize:none"></textarea>
</div>
</div>
<button type="submit" name="send" class="btn btn-primary">Send Message</button>
</form>
</div>
<div class="col-lg-4 mb-4">
<h2>Contact Details</h2>
<?php
include 'conn.php';
$sql= "select * from contact_info";
$result=mysqli_query($conn,$sql);
if(mysqli_num_rows($result)>0) {
while($row = mysqli_fetch_assoc($result)) { ?>
<br>
<p>
<h4>Address :</h4><?php echo $row['contact_address']; ?>
St. Xavier’s College (Autonomous), Kolkata

</p>
<p>
<h4>Contact Number :</h4><?php echo $row['contact_mail']; ?>
</p>
<p>
<h4> Email: </h4><a href="#"><?php echo $row['contact_phone']; ?></a>
</a></b>
</p>
<?php }
} ?>
</div>
</div>
<!-- /.row -->

</div>
</div>
<?php include 'footer.php' ?>
</div>
</body>

</html>

Donate_blood

<html>
St. Xavier’s College (Autonomous), Kolkata

<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="">
<link rel="stylesheet"
href="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.16.0/umd/popper.min.js"></
script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js"></script>
<link rel="icon" type="image/x-icon" href="image/favicon.ico"/>
</head>

<body style="background-color:lightblue;">
<?php
$active ='donate';
include('head.php') ?>

<div id="page-container" style="margin-top:50px; position: relative;min-height: 84vh;">


<div class="container">
<div id="content-wrap" style="padding-bottom:50px;">
<div class="row">
<div class="col-lg-6">
<h1 class="mt-4 mb-3">Donate Blood </h1>
</div>
</div>
<form name="donor" action="savedata.php" method="post">
St. Xavier’s College (Autonomous), Kolkata

<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(below 60)<span style="color:red">*</span></div>
<div><input type="text" name="age" class="form-control" required></div>
</div>
<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>
<option value="Others">Others</option>
</select>
St. Xavier’s College (Autonomous), Kolkata

</div>
</div>
<div class="col-lg-4 mb-4">
<div class="font-italic">Blood Group<span style="color:red">*</span></div>
<div><select name="blood" class="form-control" required>
<option value=""selected disabled>Select</option>
<?php
include 'conn.php';
$sql= "select * from blood";
$result=mysqli_query($conn,$sql) or die("query unsuccessful.");
while($row=mysqli_fetch_assoc($result)){
?>
<option value=" <?php echo $row['blood_id'] ?>"> <?php echo $row['blood_group'] ?>
</option>
<?php } ?>
</select>
</div>
</div>
</div>
<div class="row">
<div class="col-lg-4 mb-4">
<div class="font-italic">Address<span style="color:red">*</span></div>
<div><textarea class="form-control" name="address" 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>
St. Xavier’s College (Autonomous), Kolkata

</div>
</div>
</div>
</div>
<?php include('footer.php') ?>
</div>
</body>
</html>

Footer.php
<html>
<head>
<style>
#footer {

position:absolute;
left: 0;
bottom: 0;
width: 100%;
height: fit-content;
padding: 5px;
background-color:#000000;
color:white;
text-align: center;
}
</style>
</head>
St. Xavier’s College (Autonomous), Kolkata

<body>

<div id="footer" >


<b><center>COPYRIGHT © 2024<br>
Blood Bank & Donation Management
<br>
<?php
$conn=mysqli_connect("localhost","root","","blood_donation") or die("Connection error");
$sql= "SELECT * FROM `donor_details`";
$result=mysqli_query($conn,$sql) or die("query unsuccessful.");
$num_rows = mysqli_num_rows($result);
?>
DONORS ENROLLED :<b style='color: yellow;'> <?php echo $num_rows; ?></b>
<br>
ALL RIGHTS RESERVED.
</center>
</div>

</body>

</html>

Head.php

<html>
St. Xavier’s College (Autonomous), Kolkata

<head>

<style>

.header {
overflow:hidden;
background-color: #333;
top: 0;
width:100%;
padding: 10px 5px;
color:#FF0404 ;
}

.header a {
float: left;
color: white;
text-align: center;
padding: 12px;
text-decoration: none;
font-size: 18px;
line-height: 25px;
border-radius: 4px;
font-weight:bold;
}
St. Xavier’s College (Autonomous), Kolkata

.header a.logo {
font-size: 25px;
font-weight: bold;
color:#FF0404 ;
}

.header a:hover {
background-color: #ddd;
color: black;
}
.header-right {
float: right;
}

/* Add media queries for responsiveness - when the screen is 500px wide or less, stack the links
on top of each other */
@media screen and (max-width: 500px) {
.header a {
float: none;
display: block;
text-align: left;
}
.header-right {
float: none;
}
}
a.act{
background: linear-gradient(to right, #fd746c 0%, #ff9068 100%);
St. Xavier’s College (Autonomous), Kolkata

color: white;
border-radius:30px;
}
a.logo2{
background-color: #333;
}
</style>
</head>

<body>
<div class="header">
<a href="home.php" class="logo"<?php if($active=='home') echo "class='logo2'"; ?>>Blood
Bank & Donation </a>
<div class="header-right">
<a href="about_us.php" <?php if($active=='about') echo "class='act'"; ?> >About Us</a>
<a href="why_donate_blood.php" <?php if($active=='why') echo "class='act'"; ?>>Why
Donate Blood</a>
<a href="donate_blood.php" <?php if($active=='donate') echo "class='act'"; ?>>Become A
Donor</a>
<a href="need_blood.php" <?php if($active=='need') echo "class='act'"; ?>>Need Blood</a>
<a href="contact_us.php" <?php if($active=='contact') echo "class='act'"; ?>>Contact Us</a>
</div>
</div>

</body>
</html>
Home.php
<!DOCTYPE html>
St. Xavier’s College (Autonomous), Kolkata

<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="">
<link rel="stylesheet"
href="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.16.0/umd/popper.min.js"></
script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js"></script>
<link rel="icon" type="image/x-icon" href="image/favicon.ico"/>
<style>
</style>
</head>

<body>
<div class="header">
<?php
$active="home";
include('head.php'); ?>

</div>
<?php include'ticker.php'; ?>
<div class="container">
St. Xavier’s College (Autonomous), Kolkata

<div class="row">
<div class="col-12">
<div class="text-center">
<img src="./image/blood_drop_logo.jpg" style = "height : 100px">
</div>
</div>
</div>
</div>

<div id="page-container" style="margin-top:50px; position: relative;min-height: 84vh; ">


<div class="container">
<div id="content-wrap"style="padding-bottom:75px;">

<div id="demo" class="carousel slide" data-ride="carousel">

<!-- Indicators -->


<ul class="carousel-indicators">
<li data-target="#demo" data-slide-to="0" class="active"></li>
<li data-target="#demo" data-slide-to="1"></li>
</ul>

<!-- The slideshow -->


<div class="carousel-inner">
<div class="carousel-item active">
<img src="image\life_linker.jpg" alt="image\life-linker.jpg" width="100%" height="500">

</div>
<div class="carousel-item">
St. Xavier’s College (Autonomous), Kolkata

<img src="image\blood_don.jpg" alt="image\blood_don.jpg" width="100%"


height="500">
</div>
<div class="carousel-item">
<img src="image\Blood-facts_10-illustration-graphics__canteen.png" alt="image\Blood-
facts_10-illustration-graphics__canteen.png" width="100%" height="500">
</div>
<div class="carousel-item">
<img class="img-fluid rounded" src="image\blood_donationcover.jpeg"
alt="" >
</div>

</div>

<!-- Left and right controls -->


<a class="carousel-control-prev" href="#demo" data-slide="prev">
<span class="carousel-control-prev-icon"></span>
</a>
<a class="carousel-control-next" href="#demo" data-slide="next">
<span class="carousel-control-next-icon"></span>
</a>
</div>
<br>
<h1 style="text-align:center;font-size:45px;">Welcome to BloodBank & Donor
Management System</h1>
<br>
<div class="row">
<div class="col-lg-4 mb-4">
St. Xavier’s College (Autonomous), Kolkata

<div class="card">
<h4 class="card-header card bg-info text-white" >The need for blood</h4>

<p class="card-body overflow-auto" style="padding-left:2%;height:120px;text-


align:left;">
<?php
include 'conn.php';
$sql=$sql= "select * from pages where page_type='needforblood'";
$result=mysqli_query($conn,$sql);
if(mysqli_num_rows($result)>0) {
while($row = mysqli_fetch_assoc($result)) {
echo $row['page_data'];
}
}

?>
</p>
</div>
</div>
<div class="col-lg-4 mb-4">
<div class="card">
<h4 class="card-header card bg-info text-white">Blood Tips</h4>

<p class="card-body overflow-auto" style="padding-left:2%;height:120px;text-


align:left;">
<?php
include 'conn.php';
$sql=$sql= "select * from pages where page_type='bloodtips'";
St. Xavier’s College (Autonomous), Kolkata

$result=mysqli_query($conn,$sql);
if(mysqli_num_rows($result)>0) {
while($row = mysqli_fetch_assoc($result)) {
echo $row['page_data'];
}
}

?>
</p>

</div>
</div>
<div class="col-lg-4 mb-4">
<div class="card">
<h4 class="card-header card bg-info text-white" >Who you could Help</h4>

<p class="card-body overflow-auto" style="padding-left:2%;height:120px;text-


align:left;">
<?php
include 'conn.php';
$sql=$sql= "select * from pages where page_type='whoyouhelp'";
$result=mysqli_query($conn,$sql);
if(mysqli_num_rows($result)>0) {
while($row = mysqli_fetch_assoc($result)) {
echo $row['page_data'];
}
}
St. Xavier’s College (Autonomous), Kolkata

?>
</p>

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

<h2>Blood Donor Names</h2>

<div class="row">
<?php
include 'conn.php';
$sql= "select * from donor_details join blood where
donor_details.donor_blood=blood.blood_id order by rand() limit 6";
$result=mysqli_query($conn,$sql);
if(mysqli_num_rows($result)>0)
{
while($row = mysqli_fetch_assoc($result)) {
?>
<div class="col-lg-4 col-sm-6 portfolio-item" ><br>
<div class="card" style="width:300px">
<img class="card-img-top" src="image\blood_drop_logo.jpg" alt="Card image"
style="width:100%;height:300px">
<div class="card-body">
<h3 class="card-title"><?php echo $row['donor_name']; ?></h3>
<p class="card-text">
<b>Blood Group : </b> <b><?php echo $row['blood_group']; ?></b><br>
St. Xavier’s College (Autonomous), Kolkata

<b>Mobile No. : </b> <?php echo $row['donor_number']; ?><br>


<b>Gender : </b><?php echo $row['donor_gender']; ?><br>
<b>Age : </b> <?php echo $row['donor_age']; ?><br>
<b>Address : </b> <?php echo $row['donor_address']; ?><br>
</p>

</div>
</div>
</div>
<?php }} ?>
</div>
<br>

<div class="row">
<div class="col-lg-6">
<h2>BLOOD GROUPS</h2>
<p>
<?php
include 'conn.php';
$sql=$sql= "select * from pages where page_type='bloodgroups'";
$result=mysqli_query($conn,$sql);
if(mysqli_num_rows($result)>0) {
while($row = mysqli_fetch_assoc($result)) {
echo $row['page_data'];
}
St. Xavier’s College (Autonomous), Kolkata

?></p>

</div>
<div class="col-lg-6">
<img src="image\Bloodtype.jpg" width="480" height="459" style="border: 5px solid
black;">
</div>
</div>
<!-- /.row -->

<hr>

<div class="row mb-4">


<div class="col-md-8">
<h4>UNIVERSAL DONORS AND RECIPIENTS</h4>
<p>
<?php
include 'conn.php';
$sql=$sql= "select * from pages where page_type='universal'";
$result=mysqli_query($conn,$sql);
if(mysqli_num_rows($result)>0) {
while($row = mysqli_fetch_assoc($result)) {
echo $row['page_data'];
}
}
St. Xavier’s College (Autonomous), Kolkata

?></p>
</div>
<div class="col-md-4">
<a class="btn btn-lg btn-secondary btn-block" href="donate_blood.php"
style="align:center; background-color:#7FB3D5;color:#273746 ">Become a Donor </a>
</div>
</div>

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

</body>

</html>
Need_blood.php
<html>

<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="">
<link rel="stylesheet"
href="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
St. Xavier’s College (Autonomous), Kolkata

<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.16.0/umd/popper.min.js"></
script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js"></script>
<link rel="icon" type="image/x-icon" href="image/favicon.ico"/>
</head>

<body style="background-color:lightblue;">
<?php
$active ='need';
include('head.php') ?>

<div id="page-container" style="margin-top:50px; position: relative;min-height: 84vh;">


<div class="container">
<div id="content-wrap" style="padding-bottom:50px;">

<div class="row">
<div class="col-lg-6">
<h1 class="mt-4 mb-3">Need Blood</h1>

</div>
</div>
<form name="needblood" action="" 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="blood" class="form-control" required>
<option value=""selected disabled>Select</option>
<?php
St. Xavier’s College (Autonomous), Kolkata

include 'conn.php';
$sql= "select * from blood";
$result=mysqli_query($conn,$sql) or die("query unsuccessful.");
while($row=mysqli_fetch_assoc($result)){
?>
<option value=" <?php echo $row['blood_id'] ?>"> <?php echo $row['blood_group'] ?>
</option>
<?php } ?>
</select>
</div>
</div>

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


<div class="font-italic">Reason, why do you need blood?<span
style="color:red">*</span></div>
<div><textarea class="form-control" name="address" required></textarea></div></div>
</div>
<div class="row">
<div class="col-lg-4 mb-4">
<div><input type="submit" name="search" class="btn btn-primary" value="Search"
style="cursor:pointer"></div>
</div>

</div><div class="row">
<?php if(isset($_POST['search'])){

$bg=$_POST['blood'];
$sql= "select * from donor_details join blood where
donor_details.donor_blood=blood.blood_id AND donor_blood='{$bg}' order by rand() limit 5";
St. Xavier’s College (Autonomous), Kolkata

$result=mysqli_query($conn,$sql) or die("query unsuccessful.");


if(mysqli_num_rows($result)>0) {
while($row = mysqli_fetch_assoc($result)) {
?>

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


<div class="card" style="width:300px">
<img class="card-img-top" src="image\blood_drop_logo.jpg" alt="Card image"
style="width:100%;height:300px">
<div class="card-body">
<h3 class="card-title"><?php echo $row['donor_name']; ?></h3>
<p class="card-text">
<b>Blood Group : </b> <b><?php echo $row['blood_group']; ?></b><br>
<b>Mobile No. : </b> <?php echo $row['donor_number']; ?><br>
<b>Gender : </b><?php echo $row['donor_gender']; ?><br>
<b>Age : </b> <?php echo $row['donor_age']; ?><br>
<b>Address : </b> <?php echo $row['donor_address']; ?><br>
</p>

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

<?php
}
}
else
{
St. Xavier’s College (Autonomous), Kolkata

echo '<div class="alert alert-danger">No Donor Found For your search Blood group
</div>';

}
} ?>
</div>
</div>
</div>
<?php include 'footer.php' ?>
</div>
</body>

</html>
Saveddata.php
<?php
$name=$_POST['fullname'];
$number=$_POST['mobileno'];
$email=$_POST['emailid'];
$age=$_POST['age'];
$gender=$_POST['gender'];
$blood_group=$_POST['blood'];
$address=$_POST['address'];
if (intval($age) >=60) {
?>
<p>Age cannot exceed 60. Click <a href="donate_blood.php">here</a> to go back.<p>
<?php
exit();
St. Xavier’s College (Autonomous), Kolkata

// header("location: ./home.php");
}
$conn=mysqli_connect("localhost","root","","blood_donation") or die("Connection error");
$sql= "INSERT INTO
donor_details(donor_name,donor_number,donor_mail,donor_age,donor_gender,donor_blood,do
nor_address)
values('{$name}','{$number}','{$email}','{$age}','{$gender}','{$blood_group}','{$address}')";
$result=mysqli_query($conn,$sql) or die("query unsuccessful.");

header("Location: ./home.php");

mysqli_close($conn);
?>
Search blood group.php
<?php

$bg=$_POST['blood'];
$conn=mysqli_connect("localhost","root","","blood_donation") or die("Connection error");
$sql= "select * from donor_details where donor_blood='{$bg}' order by rand() limit 5";
$result=mysqli_query($conn,$sql) or die("query unsuccessful.");
if(mysqli_num_rows($result)>0) {
while($row = mysqli_fetch_assoc($result)) {
?>
<div class="row">
<div class="col-lg-4 col-sm-6 portfolio-item" ><br>
<div class="card" style="width:300px">
<img class="card-img-top" src="image\blood_drop_logo.jpg" alt="Card image"
style="width:100%;height:300px">
<div class="card-body">
St. Xavier’s College (Autonomous), Kolkata

<h3 class="card-title"><?php echo $row['donor_name']; ?></h3>


<p class="card-text">
<b>Blood Group : </b> <b><?php echo $row['blood_group']; ?></b><br>
<b>Mobile No. : </b> <?php echo $row['donor_number']; ?><br>
<b>Gender : </b><?php echo $row['donor_gender']; ?><br>
<b>Age : </b> <?php echo $row['donor_age']; ?><br>
<b>Address : </b> <?php echo $row['donor_address']; ?><br>
</p>

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

Slider.php
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet"
href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/js/bootstrap.min.js"></script>
</head>
<body>
<div class="container" style="margin-top:100px">
<div id="myCarousel" class="carousel slide" data-ride="carousel">
<ol class="carousel-indicators">
<li data-target="#myCarousel" data-slide-to="0" class="active"></li>
St. Xavier’s College (Autonomous), Kolkata

<li data-target="#myCarousel" data-slide-to="1"></li>


</ol>

<div class="carousel-inner">
<div class="item active">
<img src="image\_107317099_blooddonor976.jpg" alt="Los Angeles"
style="width:100%; height:550px;margin-top:0px;">
</div>

<div class="item">
<img src="image\Blood-facts_10-illustration-graphics__canteen.png" alt="Chicago"
style="width:100%;height:550px;margin-top:0px;">
</div>
</div>

<a class="left carousel-control" href="#myCarousel" data-slide="prev">


<span class="glyphicon glyphicon-chevron-left"></span>
<span class="sr-only">Previous</span>
</a>
<a class="right carousel-control" href="#myCarousel" data-slide="next">
<span class="glyphicon glyphicon-chevron-right"></span>
<span class="sr-only">Next</span>
</a>
</div>
</div>
</body>
St. Xavier’s College (Autonomous), Kolkata

</html>

Ticker.php

<html>
<head>
<style>
@media screen and (max-width: 80px) {
.news {
position:relative;margin-left:auto;margin-right:auto;margin-top:400px ;
}
.text1{
box-shadow:none !important;
position:relative;
margin-left:auto;margin-right:auto;
}
}
.blue {
background: #347fd0;
}

.news {
box-shadow: inset 0 -15px 30px rgba(10,4,60,0.4), 0 5px 10px rgba(10,20,100,0.5);
width: 100%;
height:50px;
margin-top:0px;
overflow: hidden;
St. Xavier’s College (Autonomous), Kolkata

border-radius: 4px;
padding: 1px;
-webkit-user-select: none;

.news span {
float: left;
color: #fff;
padding: 9px;
position: relative;
top: 1%;
box-shadow: inset 0 -15px 30px rgba(0,0,0,0.4);
font: 16px 'Raleway', Helvetica, Arial, sans-serif;
-webkit-font-smoothing: antialiased;
-webkit-user-select: none;
cursor: pointer;
}

.text1{

box-shadow:none !important;
position:relative;
width:90%
}
St. Xavier’s College (Autonomous), Kolkata

</style>
</head>
<body>
</body>
</head>
</html>
Why_donate_blood.php
<html>
<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="">
<link rel="stylesheet"
href="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.16.0/umd/popper.min.js"></
script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js"></script>
<link rel="icon" type="image/x-icon" href="image/favicon.ico"/>

</head>

<body>

<?php
$active ='why';
St. Xavier’s College (Autonomous), Kolkata

include('head.php');
?>

<div id="page-container" style="margin-top:50px; position: relative;min-height: 84vh;">


<div class="container">
<div id="content-wrap" style="padding-bottom:50px;">
<div class="row">
<div class="col-lg-6">
<h1 class="mt-4 mb-3">Why Should I Donate Blood ? </h1>
<p>
<?php
include 'conn.php';
$sql=$sql= "select * from pages where page_type='donor'";
$result=mysqli_query($conn,$sql);
if(mysqli_num_rows($result)>0) {
while($row = mysqli_fetch_assoc($result)) {
echo $row['page_data'];
}
}

?>
</p>

</div>
<div class="col-lg-6">
<img class="img-fluid rounded" src="image\08f2fccc45d2564f74ead4a6d5086871.png"
style="height:600px; width:500px" alt="error" >
</div>
St. Xavier’s College (Autonomous), Kolkata

</div>
</div>

</div>

<?php include('footer.php')
?>
</div>
</body></html>

CHAPTER 6: RESULTS AND DISCUSSION

Fig 6.1 admin login portal


St. Xavier’s College (Autonomous), Kolkata

Fig 6.2 Dashboard

Fig 6.3 Donor form on admin side


St. Xavier’s College (Autonomous), Kolkata

Fig 6.4 donors list with donor information


St. Xavier’s College (Autonomous), Kolkata

Fig 6.5 user query

Fig 6.6 Manage Pages

Fig 6.7 Update Contact Info


St. Xavier’s College (Autonomous), Kolkata

Fig 6.8 Homepage


St. Xavier’s College (Autonomous), Kolkata

Fig 6.9 Blood Donor Names(homepage)


St. Xavier’s College (Autonomous), Kolkata

Fig 6.10 Types of blood group(Homepage)


St. Xavier’s College (Autonomous), Kolkata

Fig 6.11 About us

Fig 6.12 Why Donate blood


St. Xavier’s College (Autonomous), Kolkata

Fig 6.13 donor registration page

Fig 6.14 need blood


St. Xavier’s College (Autonomous), Kolkata

Fig 6.15 contact us

Fig 6.17 file-linker database


St. Xavier’s College (Autonomous), Kolkata

Fig 6.18 admin database

Fig 6.19 blood database


St. Xavier’s College (Autonomous), Kolkata

Fig 6.20 page database

Fig 6.21 query database


St. Xavier’s College (Autonomous), Kolkata

Chapter 7: CONCLUSION

7.1Limitations of the project


(i) Nearby Blood Banks and Hospitals:- There is no search option for the nearby hospital and
blood bank .
(ii) information about the blood donation camps:- Informing people through updates on the
homepage about the nearby blood donation camps.
(iii)validation through emails:- sending an email to the donor as well as the recipient about the
blood donation and blood availability.
(iv)Total units of blood:- making an inventory for keeping the records of the blood units.

7.2Future scope of improvement


(i) Adding the option of searching of the hospital as well as blood banks that are located nearby.
(ii) Updating the homepage about the blood donation camps.
(iii)Validation through e-mails.
(iv)Online E-certificate facility that is to be given to those who donates blood.

REFERNCES

WWW.oracle.org
Javatpoint.com
W3schools
Canva for designing templates
Icocovertor.com for converting favicon
Techjury.net
Mermaid.live for making er diagram
Online.visual-paradigm for dfd and context diagram
www.eraktkosh.in
St. Xavier’s College (Autonomous), Kolkata

www.wikipedia.com
html-color.codes
PHP: The complete Reference, Steven Holzner, Mcgraw Hill Education

You might also like