forked from mentorchita/Blood-Bank-Management-System
-
Notifications
You must be signed in to change notification settings - Fork 0
/
bloodinfo.php
104 lines (95 loc) · 3.62 KB
/
bloodinfo.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
<?php
require 'file/connection.php';
session_start();
if(!isset($_SESSION['hid']))
{
header('location:login.php');
}
else {
?>
<!DOCTYPE html>
<html>
<?php $title="Bloodbank | Add blood samples"; ?>
<?php require 'head.php'; ?>
<style>
body{
background: url(image/p1.jpg) no-repeat center;
background-size: cover;
min-height: 0;
height: 100%;
}
.login-form{
width: calc(100% - 20px);
max-height: 650px;
max-width: 450px;
background-color: white;
}
</style>
<body>
<?php require 'header.php'; ?>
<div class="container cont">
<?php require 'message.php'; ?>
<div class="row justify-content-center">
<div class="col-lg-4 col-md-5 col-sm-6 col-xs-7 mb-5">
<div class="card">
<div class="card-header title">Add blood group available in your hospital</div>
<div class="card-body">
<form action="file/infoAdd.php" method="post">
<a data-toggle="collapse" href="#collapseExample" role="button" aria-expanded="false" aria-controls="collapseExample" title="click to see">Term & conditions. </a><br>
<div class="collapse" id="collapseExample">
If you have a blood sample tested by your doctor’s, nurse, or trained phlebotomist , at a pathology collection centre, clinic or hospital. Blood samples are most commonly taken from the inside of the elbow where the veins are usually closer to the surface. If before the needle is inserted, the area had been cleaned with an antiseptic cloth and blood sample is transferred into tubes containing the correct preservatives then add your blood group available in your hospital to your blood bank.<br><br>
</div>
<input type="checkbox" name="condition" value="agree" required> Agree<br><br>
<select class="form-control" name="bg" required="">
<option>A-</option>
<option>A+</option>
<option>B-</option>
<option>B+</option>
<option>AB-</option>
<option>AB+</option>
<option>O-</option>
<option>O+</option>
</select><br>
<input type="submit" name="add" value="Add" class="btn btn-primary btn-block"><br>
<a href="hospitalpage.html" class="text-centre" >Cancel</a><br>
</form>
</div>
</div>
</div>
<?php if(isset($_SESSION['hid'])){
$hid=$_SESSION['hid'];
$sql = "select * from bloodinfo where hid='$hid'";
$result = mysqli_query($conn, $sql);
}
?>
<div class="col-lg-4 col-md-5 col-sm-6 col-xs-7 mb-5">
<table class="table table-striped table-responsive">
<th colspan="4" class="title">Blood Bank</th>
<tr>
<th>#</th>
<th>Blood Samples</th>
<th>Action</th>
</tr>
<div>
<?php
if ($result) {
$row =mysqli_num_rows( $result);
if ($row) { //echo "<b> Total ".$row." </b>";
}else echo '<b style="color:white;background-color:red;padding:7px;border-radius: 15px 50px;">Nothing to show.</b>';
}
?>
</div>
<?php while($row = mysqli_fetch_array($result)) { ?>
<tr>
<td><?php echo ++$counter; ?></td>
<td><?php echo $row['bg'];?></td>
<td><a href="file/delete.php?bid=<?php echo $row['bid'];?>" class="btn btn-danger">Delete</a></td>
</tr>
<?php } ?>
</table>
</div>
</div>
</div>
<?php require 'footer.php' ?>
</body>
<?php } ?>