-
Notifications
You must be signed in to change notification settings - Fork 0
/
admin_view_donor.php
168 lines (151 loc) · 3.61 KB
/
admin_view_donor.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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
<?php
session_start();
include("config.php");
if(!isset($_SESSION['usertype']))
{
header("location:admin.php");
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<?php include("admin_head.php");?>
</head>
<body>
<?php include("admin_topnav.php"); ?>
<div class="container" style='margin-top:70px'>
<div class="row">
<div class="col-sm-3">
<?php include("admin_side_nav.php");?>
</div>
<div class="col-sm-9" >
<h3 class='text-danger'> Donor Details </h3><hr>
<div class="row">
<?php
if(isset($_GET["id"]))
{
$sql="SELECT * FROM blood_donor WHERE DONOR_ID=".$_GET["id"];
$result=$con->query($sql);
if($result->num_rows>0)
{
$row=$result->fetch_assoc();
?>
<div class="col-md-4">
<div class="panel">
<div class="panel-body">
<img src="<?php echo $row["DONOR_PIC"];?>" class="image-rounded" height="300px" width="100%">
</div>
</div>
</div>
<div class="col-md-8">
<table class="table table-striped">
<tr>
<th>Name</th>
<td><?php echo $row["NAME"];?></td>
</tr>
<tr>
<th>Father Name</th>
<td><?php echo $row["FATHER_NAME"];?></td>
</tr>
<tr>
<th>Gender</th>
<td><?php echo $row["GENDER"];?></td>
</tr>
<tr>
<th>D.O.B</th>
<td><?php echo $row["DOB"];?></td>
</tr>
<tr>
<th>Blood Group</th>
<td><?php echo $row["BLOOD"];?></td>
</tr>
<tr>
<th>Body Weight</th>
<td><?php echo $row["BODY_WEIGHT"];?></td>
</tr>
<tr>
<th>Email</th>
<td><?php echo $row["EMAIL"];?></td>
</tr>
<tr>
<th>Address</th>
<td><?php echo $row["ADDRESS"];?></td>
</tr>
<tr>
<th>District</th>
<td><?php echo $row["DISTRICT"];?></td>
</tr>
<tr>
<th>POST_CODE</th>
<td><?php echo $row["POST_CODE"];?></td>
</tr>
<tr>
<th>Division</th>
<td><?php echo $row["DIVISION"];?></td>
</tr>
<tr>
<th>Contact-1</th>
<td><?php echo $row["CONTACT_1"];?></td>
</tr>
<tr>
<th>Contact-2</th>
<td><?php echo $row["CONTACT_2"];?></td>
</tr>
<tr>
<th>Voluntary</th>
<td><?php echo $row["VOLUNTARY"];?></td>
</tr>
<tr>
<th>Group</th>
<td><?php echo $row["VOLUNTARY_GROUP"];?></td>
</tr>
<tr>
<th>Is New Donor</th>
<td><?php echo $row["NEW_DONOR"];?></td>
</tr>
<tr>
<th>Last Donoted Date</th>
<td><?php echo $row["LAST_D_DATE"];?></td>
</tr>
<tr>
<th>Status</th>
<td><?php
$status=$row["STATUS"];
if($status==0)
{
echo'<a href="admin_activate.php?id='.$row["DONOR_ID"].'" class="btn btn-sm btn-danger">Activate Now</a>';
}
else
{
echo'<a href="admin_deactivate.php?id='.$row["DONOR_ID"].'" class="btn btn-sm btn-success">Deactivate Now</a>';
}
?></td>
</tr>
</table>
</div>
<?php
}
}
else
{
echo "<script>window.open('admin_donor.php','_self');</script>";
}
?>
<form class="col-md-6" method="post" action="update_last.php">
<div class="form-group">
<label class="control-label text-danger" for="ldata">Last Donate Date</label>
<input type="text" placeholder="YYYY/MM/DD" required id="ldata" name="ldata" class="form-control input-sm DATES">
</div>
<input type="hidden" name="id" value="<?php echo $_GET["id"];?>">
<button class="btn btn-success"> Save Changes</button>
</form>
</div>
</div>
</div>
</div>
<hr>
<?php include("admin_footer.php"); ?>
<script>
</script>
</body>
</html>