-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathadminPage.php
More file actions
139 lines (117 loc) · 4.47 KB
/
adminPage.php
File metadata and controls
139 lines (117 loc) · 4.47 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
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
<?php
echo ' <title>DFR | Admin</title>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Roboto+Condensed&display=swap" rel="stylesheet">
<link rel="stylesheet" href="style.css">';
echo '<link rel="stylesheet" href="style.css">';
echo '
<div id="title">
Donation and Fund Raiser
</div>
<div id="nav">
<a href="index.html" class="move"> Home </a>
<a href="admin.php" class="move" id="current"> Admin </a>
<a href="receiver.php" class="move"> Receiver Registration </a>
<a href="donor.php" class="move"> Donor Registration </a>
<a href="receiverList.php" class="move"> Receiver List </a>
<a href="donorList.php" class="move"> Donor List </a>
<a href="contact.html" class="move"> Contact Us </a>
</div>';
session_start();
if(isset($_SESSION['IS_AUTHENTICATED']) && $_SESSION['IS_AUTHENTICATED'] == 1)
{
$link = mysqli_connect('localhost', 'root', '','donation fund raiser');
if(!$link)
{
die('Failed to connect to server: ');
}
$qry = 'SELECT * FROM rec';
$result = mysqli_query($link, $qry);
echo '<h1>The Receiver\'s requests are - </h1>';
echo '<table width="98%" border="1" align="center">
<tr class = "heading">
<th>Aadhar Number</th>
<th>Name</th>
<th> Mobile Number </th>
<th> Address </th>
<th> Task </th>
<th> Amount needed </th>
<th> Bank name </th>
<th> Account no. </th>
<th> IFSC </th>
<th> DATE & TIME </th>
<th>Amount Received</th>
<th>Status </th>
</tr>';
while (($row1 = $result->fetch_assoc()))
{
echo '<tr style="text-align:center;">
<td>'.$row1['Aadhar Number'].'</td>
<td>'.$row1['Name'].'</td>
<td>'.$row1['Mobile Number'].'</td>
<td>'.$row1['Address'].'</td>
<td>'.$row1['Task'].'</td>
<td>'.$row1['Amount needed'].'</td>
<td>'.$row1['Bank name'].'</td>
<td>'.$row1['Account no.'].'</td>
<td>'.$row1['IFSC'].'</td>
<td>'.$row1['DATE & TIME'].'</td>
<td>'.$row1['Amount Received'].'</td>
<td>'.$row1['Status'].'</td>
</tr>';
}
echo '</table>';
echo '<br><form action="receiverChange.php" method="post">
<input type="submit" name="submit" value ="Update/Delete" class="submit btn">
</form><br><br><br><br>';
$qry1 = 'SELECT * FROM don';
$result1 = mysqli_query($link, $qry1);
echo '<h1>The Donor\'s requests are - </h1>';
echo '<table width="98%" border="1" align="center">
<tr class="heading">
<th>Aadhar Number</th>
<th>Name</th>
<th> Mobile Number </th>
<th> Address </th>
<th> Receiver Aadhar</th>
<th> Amount Donating</th>
<th> Google Drive Link of Photo of Donation</th>
<th> DATE & TIME </th>
<th>Status </th>
</tr>';
while (($row = $result1->fetch_assoc()))
{
echo '<tr style="text-align:center;">
<td>'.$row['Aadhar Number'].'</td>
<td>'.$row['Name'].'</td>
<td>'.$row['Mobile Number'].'</td>
<td>'.$row['Address'].'</td>
<td>'.$row['Receiver Aadhar'].'</td>
<td>'.$row['Amount donating'].'</td>
<td>'.$row['Google Drive Link of Photo of Donation'].'</td>
<td>'.$row['DATE & TIME'].'</td>
<td>'.$row['Status'].'</td>
</tr>';
}
echo '</table>';
$result1 = mysqli_query($link, $qry1);
echo '<br><form action="donorChange.php" method="post">
<input type="submit" name="submit" value ="Update/Delete" class="submit btn">
</form><br><br><br><br>';
echo '
<form action="logout.php" method="post">
<input type="submit" name="submit" value ="Logout" class="submit btn" style="width: 350px;">
</form>';
echo ' <div id="footer">
<footer>
<p id="footer-text"> Copyright © to DFR - IIITDMJ </p>
</footer>
</div>';
}
else
{
header('location:admin.php');
exit();
}
?>