-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdonation.php
More file actions
46 lines (45 loc) · 1.94 KB
/
Copy pathdonation.php
File metadata and controls
46 lines (45 loc) · 1.94 KB
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
<?php
$page = 'Donation';
include 'php/includes/head.php';
include 'php/includes/navbar.php';
?>
<!-- body -->
<div class="container text-left">
<div class="row">
<div class="col-9">
<div class="row card-columns">
<?php
$donations = $db->query('SELECT customers.username, pets.pet_name, pettype.type, donations.donate FROM donations INNER JOIN customers ON customers.id = donations.madeby INNER JOIN pets on pets.id = donations.madeto RIGHT JOIN pettype ON pettype.id = pets.pet_type WHERE donations.donate > 0 ORDER BY donations.id DESC');
$i = 0;
while($donation = $donations->fetch()) { ?>
<div class="card m-0 bg-transparent border-0 col-12 mt-3">
<div class="card box bg-white m-0">
<div class="card-body p-3">
<h6 class="card-text mb-0 donation-item text-capitalize"><?php echo $donation['username'] ?> has given <i> <?php echo $donation['donate'] ?>$</i> to <?php echo $donation['pet_name'] ?> (<?php echo $donation['type'] ?>)</h6>
</div>
</div>
</div>
<?php $i++; } ?>
</div>
</div>
<div class="col-3">
<div class="row">
<div class="col-12">
<?php include 'php/includes/home_social.php'; ?>
</div>
<div class="col-12">
<div class="box bg-white p-3 my-3">
<?php include 'php/includes/rss.php'; ?>
</div>
</div>
<div class="col-12">
<div class="box bg-success text-white p-3 my-3">
<?php include 'php/includes/donation.php'; ?>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<?php include 'php/includes/foot.php' ?>