Вы находитесь на странице: 1из 26

BLOOD BANK AND ORAGN

<?php

session_start();

$tmp=$_SESSION['tmp'];

?>

<html>

<head>

<style>

ul{

list-style-type: none;

margin: 0;

padding: 0;

overflow: hidden;

background-color: crimson;

li

float: left;

li a{

display: block;

color: white;

text-align: center;

padding: 14px 16px;

text-decoration: none;

font-size: 25;
}

li a:hover

background-color: lavender;

.card {

box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2);

max-width: 300px;

margin: auto;

text-align: center;

font-family: arial;

.title {

color: grey;

font-size: 18px;

button {

border: none;

outline: 0;

display: inline-block;

padding: 8px;

color: white;

background-color: #000;

text-align: center;

cursor: pointer;
width: 100%;

font-size: 18px;

a{

text-decoration: none;

font-size: 22px;

color: black;

.b{

text-decoration:underline;

font-size: 18px;

color: blue;

font-family:inherit;

button:hover, a:hover {

opacity: 0.7;

</style>

</head>

<body>

<center>

<div id="container" style="white-space:nowrap">

<div id="image" style="display:inline;">

<img src="images/02.jpg" width="150" height="70"align="left"> <br>

</div>

<div id="text" title="BLOOD BANK" style="display:inline; white-space:nowrap;" ><b>


<font size="10" color="red">

BLOOD BANK AND ORGAN DONATION

</font>

</b>

</div>

</div></center>

<br>

<ul>

<li><a class="active" href="indes.php">Home</a></li>

<li><a href="donorprofile.php">Donor</a></li>

<li><a href="finddonor.php">Acceptor</a></li>

<li><a href="hosp.php">Hospitals</a></li>

<li><a href="camp.php">Camp</a></li>

<li><a href="contact.php">Contact Us</a></li>

</ul>

<body align="right"><font size="3">

<a href="index.php" class="b">LOGOUT</a>&nbsp;&nbsp;&nbsp;</font></body><br>

<center>

<form action="accpdet.php" method="POST" style="width:500px;height:700px; background-color:pink;


align:center" >

<br>

<?php

$names=$_SESSION['name2'];

$dob=$_SESSION['dob2'];

$bg=$_SESSION['bg2'];

$cn=$_SESSION['cn2'];

$state=$_SESSION['state2'];
$dist=$_SESSION['dist2'];

$city=$_SESSION['city2'];

$add=$_SESSION['add2'];

$gender=$_SESSION['gender2'];

$weight=$_SESSION['weight2'];

$email=$_SESSION['email2'];

$lbd=$_SESSION['lbd2'];

$status=$_SESSION['dstatus'];

?>

<label> NAME
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs
p;&nbsp;&nbsp; </label><input type="text" name="name" value="<?php echo $names ?>" > <br><br>

<label> DOB
</label>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <input type="date" name="date" value="<?php echo $dob ?>"><br><br>

<label > BLOODGROUP </label>&nbsp;&nbsp; <select style="width: 130px" name="bg">

<option value="<?php echo $bg ?>"><?php echo $bg ?>

<option value=" -- Select Group-- "> -- Select Group--

<option value="A1+">A1+

<option value="A1-">A1-

<option value="A2+">A2+

<option value="A2-">A2-

<option value="B+">B+

<option value="B-">B-

<option value="A1B+">A1B+

<option value="A1B-">A1B-

<option value="A2B+">A2B+

<option value="A2B-">A2B-

<option value="AB+">AB+

<option value="AB-">AB-
<option value="O+">O+

<option value="O-">O-

<option value="A+">A+

<option value="A-">A-

</option>

</select><br><br>

<label >CONTACT NO</label>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <input type="text"


name="contactno" value="<?php echo $cn?>" ><br><br>

<label> STATE</label>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <select
style="width: 130px" name="state">

<option value="<?php echo $state ?>"><?php echo $state ?>

<option value="--Select State--">--Select State--

<option value="Andhra Pradesh "> Andhra Pradesh

<option value="Arunachal Pradesh ">Arunachal Pradesh

<option value="Assam ">Assam

<option value="Bihar ">Bihar

<option value="Chandigarh ">Chandigarh

<option value="Chhattisgarh ">Chhattisgarh

<option value="Delhi ">Delhi

<option value="Goa ">Goa

<option value="Gujarat ">Gujarat

<option value="Haryana ">Haryana

<option value="Himachal Pradesh ">Himachal Pradesh

<option value="Jammu and Kashmir ">Jammu and Kashmir

<option value="Jharkhand ">Jharkhand

<option value="Karnataka ">Karnataka

<option value="Kerala">Kerala

<option value="Madhya Pradesh ">Madhya Pradesh


<option value="Maharashtra ">Maharashtra

<option value="Manipur ">Manipur

<option value="Meghalaya ">Meghalaya

<option value="Nagaland ">Nagaland

<option value="Orissa ">Orissa

<option value="Pondicherry ">Pondicherry

<option value="Punjab ">Punjab

<option value="Rajasthan ">Rajasthan

<option value="Sikkim ">Sikkim

<option value="Tamilnadu">Tamilnadu

<option value="Tripura ">Tripura

<option value="Uttar Pradesh">Uttar Pradesh

<option value="Uttaranchal">Uttaranchal

<option value="West Bengal">West Bengal

</option>

</select> <br><br>

<label> DISTRICT </label>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <select


style="width: 130px" name="dist">

<option value="<?php echo $dist ?>"><?php echo $dist ?>

<option value="Select District">--Select District--

<option value="Select Any">Select Any

</option>

</select> <br><br>

<label> CITY
</label>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb
sp; <select style="width: 130px" name="city">

<option value="<?php echo $city ?>"><?php echo $city ?>


<option value="Select City">--Select City--

<option value="Select Any">Select Any

</option>

</select> <br><br>

<label> ADDRESS</label>>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <input type="text"


name="add" value="<?php echo $add?>" ><br><br>

<?php

if($gender=='female')

echo' <label> GENDER</label>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <input type="radio"


name="gender" value="male" >male&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input
type="radio" name="radio" value="female" checked="true">female<br><br>';

elseif($gender=='male')

echo'<label>GENDER</label>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <input type="radio"


name="gender" value="male"
checked="true">male&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="radio"
name="radio" value="female" >female<br><br>';

?>

<label>WEIGHT</label>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <input
type="text" name="weight" value="<?php echo $weight?>"> kgs &nbsp;&nbsp;&nbsp;<br><br>

<label>E-
MAIL</label>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <input type="text" name="email" value="<?php echo $email?>"> <br><br>

<label>DATE OF LAST BLOOD DONATION</label>&nbsp;&nbsp; <input type="date" name="lbd" value="<?php echo


$lbd?>"><br><br><br>

<input type="submit" value="request" name="req">


<?php

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

if($status=="available")

mail($email,"Blood Request","I need ur Blood");

echo "mail sended";

else

echo "donor status is unavailable";

?>

</form>

</center>

</body>

</html>

<?php

session_start();

$con=mysqli_connect("localhost","root","","blood bank");

$result=mysqli_query($con,"select * from donors");

while($row=$result->fetch_assoc())

$username=$row['username'];

$lbd=$row['lbd'];

$lbd=date_create($lbd);
$lbd= date_format($lbd,"y-m-d");

$sd=date("y-m-d");

if($lbd<$sd)

$bd="available";

mysqli_query($con,"update donors set dstatus='$bd' where username='$username'");

else

$bd="unavailable";

mysqli_query($con,"update donors set dstatus='$bd' where username='$username'");

$result=mysqli_query($con,"select * from campin");

while($row=$result->fetch_assoc())

$eo=$row['eoc'];

$eoc=date_create($eo);

$eoc= date_format($eoc,"y-m-d");

$sd=date("y-m-d");

if($eoc<$sd)

mysqli_query($con,"delete from campin where eoc='$eo'");

$_SESSION['tmp']=0;

$_SESSION['lt']="";
#mail("dct.vignesh@gmail.com","dds","sfsdf");

?>

<html>

<head>

<link rel="stylesheet" href="css/style.css" type="text/css" media="all" />

<script src="js/jquery-1.4.1.min.js" type="text/javascript"></script>

<script src="js/jquery.jcarousel.pack.js" type="text/javascript"></script>

<script src="js/jquery-func.js" type="text/javascript"></script>

<style>

.a{

list-style-type: none;

margin: 0;

padding: 0;

overflow: hidden;

background-color: crimson;

li

float: left;

li a{

display: block;

color: white;

text-align: center;

padding: 14px 16px;

text-decoration: none;

font-size: 25;

}
li a:hover

background-color: f;

.d

font-size: 12px;

color: blue;

.abc{

border: 2px;

background-color: azure;

</style>

</head>

<body >

<center>

<div id="container" style="white-space:nowrap">

<div id="image" style="display:inline;">

<img src="images/02.jpg" width="150" height="70"align="left"> <br>


</div>

<div id="text" title="BLOOD BANK " style="display:inline; white-space:nowrap; align:middle" ><b>

<font size="10" color="firebrick" face="Berlin Sans FB">

BLOOD BANK AND ORGAN DONATION

</font>

</b>

</div>

</div></center>

<br> <br>

<ul class="a">

<li><a class="active" href="index.php">Home</a></li>

<li><a href="donorprofile.php">Donor</a></li>

<li><a href="finddonor.php">Acceptor</a></li>

<li><a href="hosp.php">Hospitals</a></li>

<li><a href="camp.php">Camp</a></li>

<li><a href="organprofile.php">Organ</a></li>

<li><a href="contact.php">Contact Us</a></li>

</ul>

<br>

<body align="right">

<font size="3">

<a href="donorsignup.php">Donor Signup</a>&nbsp;&nbsp;&nbsp;

<a href="userlogin.php">User Signup</a> &nbsp;&nbsp;&nbsp;

<a href="adminlogin.php">Admin Login</a> &nbsp;&nbsp;&nbsp;

</font>

</body>
<form action="index.php" method="POST" >

<table>

<tr>

<!-- <td style=" height:auto;width:250;">-->

<td>

<form style="width:300px;height:500px" >

<div>

<font size="10" color="red">

<b> Who can donate Blood?</b></font>

<marquee direction="up">

<font size="4">

* Anyone above 18 years weighing more than 50kgs(110 Ibs)can donate blood.<br><br>

* The donor should not have donated blood in the last 3 months.<br><br>

* The donor should not have undergone any major surgery within 3 months.<br><br>

* The donor has not had alcohol 48 hours before the donation.<br><br>

* The donor should avoid smoking on the day of donation and 3hours after donation.<br><br>

* The donor should not have fever at the time of donation.<br><br>

* The donor should have had a good meal before donation.<br><br>

* The donor should disclose whether he is under any medication,malaria,jaundice,etc.<br><br>

* The donor should not have has any tooth extraction in the past 2 weeks.<br><br>

* The donor should not be pregnant.<br><br>

* The donor should not have had any immunization at least one month before.

</font>

</marquee>

</div>

</form>
</td>

<td >

<form action="index.php" method="POST" style="width:700px;height:950px" style="top:0;">

<body bgcolor="transparant">

<div id="slider" class="box">

<div id="slider-holder"><ul>

<li> <a href="#"> <img src="images/02.jpg" width="700" height="300"></a> </li>

<li><a href="#"> <img src="images/blood-donors.jpg" width="700" height="300"></a> </li>

<li><a href="#"> <img src="images/ravoof-blog-give-blood.jpg" width="700" height="300"></a> </li>

<li><a href="#"> <img src="images/cell.jpg" width="700" height="300"></a> </li>

</ul>

</div>

</div>

</body>

</form>

</td>

<td rowspan="2">

<form action="index.php" method="POST" class="xyz" style="height:900px;width:400px; background-color:white" >

<b><font size="8" color="red">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; LOGIN

</font>

</b>

<font size="4"><br><br>

&nbsp; &nbsp;&nbsp; &nbsp; &nbsp;&nbsp; <label> USER NAME</label>&nbsp;&nbsp; <input type="text"


name="username"><br><br>

&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <label> PASSWORD</label>&nbsp;&nbsp; <input type="password"


name="pwd"><br><br> </font>
&nbsp; &nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;<input type="submit" value=" Donorsignin "
name="Donorsignin">&nbsp;&nbsp;&nbsp;&nbsp;

&nbsp; &nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;<input type="submit" value=" Usersignin "


name="Usersignin">&nbsp;&nbsp;&nbsp;&nbsp;<br><br>

<?php

$temp=0;

$con=mysqli_connect("localhost","root","","blood bank");

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

$name=$_POST['username'];

$password=$_POST['pwd'];

$result= mysqli_query($con,"select * from donors");

while($row=$result->fetch_assoc())

if($name==$row['username'] & $password==$row['pwd'])

$_SESSION['tmp']="1";

$temp=1;

$names=$row['name'];

$dob=$row['dob'];

$bg=$row['bloodgroup'];

$cn=$row['contactno'];

$state=$row['state'];

$dist=$row['dist'];

$city=$row['city'];

$add=$row['address'];

$gender=$row['gender'];
$weight=$row['weight'];

$email=$row['email'];

$lbd=$row['lbd'];

if($temp!=1)

echo'<script>window.alert("login failed")</script>';

else

$_SESSION['name']=$name;

$_SESSION['names']=$names;

$_SESSION['dob']=$dob;

$_SESSION['bg']=$bg;

$_SESSION['cn']=$cn;

$_SESSION['state']=$state;

$_SESSION['dist']=$dist;

$_SESSION['city']=$city;

$_SESSION['add']=$add;

$_SESSION['gender']=$gender;

$_SESSION['weight']=$weight;

$_SESSION['email']=$email;

$_SESSION['lbd']=$lbd;

$_SESSION['lt']="donorlogin";

echo'<script>window.alert("login success")</script>';
echo'<meta http-equiv="refresh" content="1; URL=indes.php"/>';

#header('location:donorlogin.php');

# exit;

#if(isset($_POST['forgetpassword']))

#{

# echo' <a href="forgetpassword.php" class="d"></a>';

#}

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

$name=$_POST['username'];

$password=$_POST['pwd'];

$result= mysqli_query($con,"select * from userlogin");

while($row=$result->fetch_assoc())

if($name==$row['username'] & $password==$row['password'])

$_SESSION['tmp']="1";

$temp=1;

if($temp!=1)

echo'<script>window.alert("login failed")</script>';
}

else

$_SESSION['lt']="userlogin";

echo'<script>window.alert("login success")</script>';

echo'<meta http-equiv="refresh" content="1; URL=indes.php"/>';

?>

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a href="forgetpassword.php"


class="d">forgetpassword</a>

</form>

<form>

<br> <br> <br><br>

</form>

</td>

</tr>

</table>
</form>

</body>

</html>

<?php

session_start();

$tmp=$_SESSION['tmp'];

$lt=$_SESSION['lt'];

//if($tmp=="1")

//{

// if($lt=="donorlogin")

// {

//$name=$_SESSION['name'];

// }

?>

<html>

<head>

<style>

ul{

list-style-type: none;

margin: 0;

padding: 0;

overflow: hidden;

background-color: crimson;

li

float: left;
}

li a{

display: block;

color: white;

text-align: center;

padding: 14px 16px;

text-decoration: none;

font-size: 25;

li a:hover

background-color: lavender;

.card {

box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2);

max-width: 300px;

margin: auto;

text-align: center;

font-family: arial;

.title {

color: grey;

font-size: 18px;

}
button {

border: none;

outline: 0;

display: inline-block;

padding: 8px;

color: white;

background-color: #000;

text-align: center;

cursor: pointer;

width: 100%;

font-size: 18px;

a{

text-decoration: none;

font-size: 22px;

color: black;

button:hover, a:hover {

opacity: 0.7;

.ba{

text-decoration:underline;

font-size: 18px;

color: blue;

font-family:inherit;

}
</style>

</head>

<body>

<center>

<div id="container" style="white-space:nowrap">

<div id="image" style="display:inline;">

<img src="images/02.jpg" width="150" height="70"align="left"> <br>

</div>

<div id="text" title="BLOOD BANK" style="display:inline; white-space:nowrap;" ><b>

<font size="10" color="red">

BLOOD BANK AND ORGAN DONATION

</font>

</b>

</div>

</div></center>

<br>

<ul>

<li><a class="active" href="indes.php">Home</a></li>

<li><a href="donorprofile.php">Donor</a></li>

<li><a href="finddonor.php">Acceptor</a></li>

<li><a href="hosp.php">Hospitals</a></li>

<li><a href="organprofile.php">Organ</a></li>

<li><a href="contact.php">Contact Us</a></li>

</ul>
<body align="right"><font size="3">

<a href="index.php" class="ba">LOGOUT</a>&nbsp;&nbsp;&nbsp;</font></body><br>

<br> <br> <center>

<form action="donorprofile.php" method="POST">

<table cellpadding="30px" cellspacing="30px">

<?php

$t=0;

$names="";

$bg="";

$state="";

$con=mysqli_connect("localhost","root","","blood bank");

$result=mysqli_query($con,"select * from organ");

while($row=$result->fetch_assoc())

$names=$row['uname'];

$bg=$row['organ'];

$state=$row['hname'];

$cn=$row['cno'];

$username=$row['mailid'];

$t=$t+1;

if($t==1)

echo '<tr>';

echo '<td>';

echo' <form action="" method="POST">';

echo' <h2 style="text-align:center">';echo $names;echo'</h2>';


echo' <div class="card">';

# echo'<a href="#"> <img src="data:image/jpeg;base64,';echo $row['img'] ;'" style="width:100%" height="auto"


>';

echo' <a href="#"><img src="images/Man-Gentleman-Silhouette-Gray-Free-Illustrations-F-


0424.jpg"width="300" height="150"/></a>';

echo'<p class="title">ORGAN: '.$bg.'</p>';

echo' <h5>HOSPITAL NAME: '.$state.'</h5>';

echo' <h5>CONTACT NO: '.$cn.'</h5>';

echo '<input type="text" name="t1" style="display:none" value="'.$username.'">';

echo'<p><button name="b">Detail</button></p>';

echo' </div>';

echo' </form> </td> ';

else if($t==2)

echo '<td>';

echo'<form action="" method="POST">';

echo' <h2 style="text-align:center">'.$names.'</h2>';

echo'<div class="card">';

echo' <a href="#"><img src="images/Man-Gentleman-Silhouette-Gray-Free-Illustrations-F-


0424.jpg"width="300" height="150"/></a>';

echo'<p class="title">ORGAN: '.$bg.'</p>';

echo' <h5>HOSPITAL NAME: '.$state.'</h5>';

echo' <h5>CONTACT NO: '.$cn.'</h5>';

echo '<input type="text" name="t1" style="display:none" value="'.$username.'">';

echo'<p><button name="b">Detail</button></p>';

# echo'<p><input type="submit" value="detail" name="b"></p>';

echo '</div></form> </td> ';

}
else if($t==3)

echo '<td><form action="" method="POST">';

echo' <h2 style="text-align:center">'.$names.'</h2>';

echo'<div class="card">';

echo' <a href="#"><img src="images/Man-Gentleman-Silhouette-Gray-Free-Illustrations-F-


0424.jpg"width="300" height="150"/></a>';

echo'<p class="title">ORGAN: '.$bg.'</p>';

echo' <h5>HOSPITAL NAME: '.$state.'</h5>';

echo' <h5>CONTACT NO: '.$cn.'</h5>';

echo '<input type="text" name="t1" style="display:none" value="'.$username.'">';

echo'<p><button name="b">Detail</button></p>';

echo'</div> </form></td> </tr>';

$t=0;

# echo'<li> <a href="#"><img src="data:image/jpeg;base64,'.$row['img'].'"width="300" height="200"/></a>';

</table>

</form>

</center>

</body>

</html>

Вам также может понравиться