-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdonate.php
55 lines (48 loc) · 1.75 KB
/
donate.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
<?php $title = "Donate" ?>
<?php include "includes/components/header.php" ?>
<!-- Responsive navbar-->
<?php include "includes/components/navbar.php" ?>
<?php
if (!isset($_SESSION["id"])) {
$_SESSION["id"] = -1;
}
?>
<!-- Page Content-->
<section class="pt-4">
<div class="container px-lg-5">
<h1>Donations</h1>
<br>
<hr>
<br>
<!-- Page Features-->
<?php
$fundraisers = getDonations();
while ($row = mysqli_fetch_assoc($fundraisers)) {
echo "
<div class='card bg-light'>
<div class='card-body'>
<div class='row'>
<div class='col-xl-6 col-md-4'>
<p><h4><strong>{$row['title']}</strong></h4></p>
<p>{$row['description']}</p>
<hr>
<p><strong>Target: </strong>" . number_format($row['total_target']) . " BDT</p>
<p><strong>Raised: </strong>" . number_format(getSumOfDonations($row['id'])) . " BDT</p>
<p><strong>Duration:</strong> {$row['duration']}</p>
</div>
<div style='text-align: center; align-items: center; justify-content: center; line-height: 200px; height: 200px;' class='col-xl-6 col-md-4'>
<a class='btn btn-primary' href='payment/example_hosted.php?title={$row['title']}&fund_id={$row['id']}'>Donate!</a>
</div>
</div>
</div>
</div>
<br>
<hr>
<br>
";
}
?>
</div>
</section>
<!-- Footer-->
<?php include "includes/components/footer.php" ?>