forked from Mahin077/EducationUnlocked
-
Notifications
You must be signed in to change notification settings - Fork 0
/
adminDonate.php
74 lines (55 loc) · 2.64 KB
/
adminDonate.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
<?php
include 'nav.php';
include 'connect.php';
if ($_SESSION['user_name']!='admin') {
header("Location:index.php");
}
$id = $_SESSION['user_id'];
$sqlShowPost = "select user.userid, user.username ,user.type, donation.amount,donation.transactionID,donation.text,donation.date from donation join user on user.userid=donation.userid order by donation.id desc";
$resultShowPost = mysqli_query($conn, $sqlShowPost);
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-KyZXEAg3QhqLMpG8r+8fhAXLRk2vvoC2f3B09zVXn8CA5QIVfZOJ3BCsw2P0p/We" crossorigin="anonymous">
<link rel="stylesheet" href="css/all.min.css">
<link rel="stylesheet" type="text/css" href="css/index.css">
<script type="text/javascript" src="https://code.jquery.com/jquery-1.7.1.min.js"></script>
<title>Homepage</title>
</head>
<body>
<div class="container" style="margin-top: 15px;">
<h2>
Recent Donations
</h2>
</div>
<?php
while ($rowPost = mysqli_fetch_array($resultShowPost)) {
?>
<div class="container mt-5 mb-5">
<div class="row d-flex align-items-center justify-content-center">
<div class="col-md-12">
<div class="card">
<div class="d-flex justify-content-between align-items-end" style="margin-top: 5px;">
<label>User:</label> <span><?php echo $rowPost['username']?></span>
<label>Type:</label> <span><?php echo $rowPost['type']?></span>
<label>Amount:</label> <span><?php echo $rowPost['amount']?></span>
<label>TransactionID:</label> <span><?php echo $rowPost['transactionID']?></span>
<label>Donated at:</label> <span><?php echo $rowPost['date']?></span>
<form action="userDetails.php" method="GET">
<div class="d-flex flex-row muted-color"> <span><button name="user details">user details</button></span> </div>
<input type="hidden" name="_userid" value="<?php echo $rowPost['userid']?>">
</form>
</div>
</div>
</div>
</div>
</div>
<?php
}
?>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js" integrity="sha384-U1DAWAznBHeqEIlVSCgzq+c9gqGAJn5c/t99JyeKa9xxaYpSvHU5awsuZVVFIhvj" crossorigin="anonymous"></script>
</body>
</html>