This repository has been archived by the owner on Feb 24, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 27
/
sentrequestd.php
84 lines (78 loc) · 2.14 KB
/
sentrequestd.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
<?php
require 'file/connection.php';
session_start();
if(!isset($_SESSION['hid']))
{
header('location:login.php');
}
else {
$hid = $_SESSION['hid'];
$sql = "SELECT blooddonate.*, receivers.* from blooddonate, receivers where hid='$hid' && blooddonate.rid=receivers.id";
$result = mysqli_query($conn, $sql);
?>
<!DOCTYPE html>
<html>
<?php $title="Bloodbank | Sent Requests"; ?>
<?php require 'head.php'; ?>
<style>
body{
background: url(image/p4.jpg) no-repeat center;
background-size: cover;
min-height: 0;
height: 650px;
}
.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'; ?>
<table class="table table-responsive table-striped rounded mb-5">
<tr><th colspan="8" class="title">Sent requests</th></tr>
<tr>
<th>#</th>
<th>Name</th>
<th>Email</th>
<th>City</th>
<th>Phone</th>
<th>Blood Group</th>
<th>Status</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;">You have not requested yet. </b>';
}
?>
</div>
<?php while($row = mysqli_fetch_array($result)) { ?>
<tr>
<td><?php echo ++$counter;?></td>
<td><?php echo $row['rname'];?></td>
<td><?php echo $row['remail'];?></td>
<td><?php echo $row['rcity'];?></td>
<td><?php echo $row['rphone'];?></td>
<td><?php echo $row['bg'];?></td>
<td><?php echo $row['status'];?></td>
<td><?php if($row['status'] == 'Accepted'){ ?>
<?php }
else{ ?>
<a href="file/canceld.php?donoid=<?php echo $row['donoid'];?>" class="btn btn-danger">Cancel</a>
<?php } ?>
</td>
</tr>
<?php } ?>
</table>
</div>
<?php require 'footer.php'; ?>
</body>
</html>
<?php } ?>