-
Notifications
You must be signed in to change notification settings - Fork 94
/
Copy pathhome.php
210 lines (180 loc) · 7.8 KB
/
home.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
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
<!DOCTYPE html>
<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>
<style>
</style>
</head>
<body>
<div class="header">
<?php
$active="home";
include('head.php'); ?>
</div>
<?php include'ticker.php'; ?>
<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\_107317099_blooddonor976.jpg" alt="image\_107317099_blooddonor976.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>
<!-- 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">
<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'";
$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'];
}
}
?>
</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>
<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>
<!-- /.row -->
<!-- Features Section -->
<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'];
}
}
?></p>
</div>
<div class="col-lg-6">
<img class="img-fluid rounded" src="image\blood_donationcover.jpeg" alt="" >
</div>
</div>
<!-- /.row -->
<hr>
<!-- Call to Action Section -->
<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'];
}
}
?></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>