Download dashboard.php from Presidor1/STC_APP: direct link, hf CLI and curl.
- Browser
- Download file 2.03 kB
-
https://huggingface.co/spaces/Presidor1/STC_APP/resolve/main/dashboard.php
- Command line
-
hf download hf://spaces/Presidor1/STC_APP/dashboard.php
-
curl -L -o dashboard.php https://huggingface.co/spaces/Presidor1/STC_APP/resolve/main/dashboard.php
2.03 kB
| session_start(); | |
| if (!isset($_SESSION["admin"])) { | |
| header("Location: admin.html"); | |
| exit(); | |
| } | |
| include 'db_connect.php'; | |
| $pendingQuery = "SELECT * FROM applications WHERE status = 'Pending'"; | |
| $approvedQuery = "SELECT * FROM applications WHERE status = 'Approved'"; | |
| $pendingResult = $conn->query($pendingQuery); | |
| $approvedResult = $conn->query($approvedQuery); | |
| <!DOCTYPE html><html lang="en"> | |
| <head> | |
| <meta charset="UTF-8" /> | |
| <title>Admin Dashboard - STC</title> | |
| <link rel="stylesheet" href="admin.css" /> | |
| </head> | |
| <body> | |
| <div class="admin-dashboard"> | |
| <h1>Welcome Admin</h1><!-- Admin Navigation --> | |
| <div class="admin-nav"> | |
| <a href="change_password.php">Change Password</a> | |
| <a href="logout.php" class="danger">Logout</a> | |
| </div> | |
| <!-- Pending Applications --> | |
| <h2>Pending Applications</h2> | |
| <table> | |
| <tr> | |
| <th>Full Name</th> | |
| <th>Email</th> | |
| <th>Phone</th> | |
| <th>LGA</th> | |
| <th>Action</th> | |
| </tr> | |
| <?php while ($row = $pendingResult->fetch_assoc()) { | |
| <tr> | |
| <td> htmlspecialchars($row['fullname']) </td> | |
| <td> htmlspecialchars($row['email']) </td> | |
| <td> htmlspecialchars($row['phone']) </td> | |
| <td> htmlspecialchars($row['lga']) </td> | |
| <td> | |
| <a href="approve.php?id=<?= $row['id'] ?>" class="btn-approve">Approve</a> | |
| <a href="reject.php?id=<?= $row['id'] ?>" class="btn-reject">Reject</a> | |
| </td> | |
| </tr> | |
| <?php } ?> | |
| </table> | |
| <!-- Approved Applications --> | |
| <h2>Approved Applications</h2> | |
| <table> | |
| <tr> | |
| <th>Full Name</th> | |
| <th>Email</th> | |
| <th>Phone</th> | |
| <th>State</th> | |
| <th>Print</th> | |
| </tr> | |
| <?php while ($row = $approvedResult->fetch_assoc()) { | |
| <tr> | |
| <td> htmlspecialchars($row['fullname']) </td> | |
| <td> htmlspecialchars($row['email']) </td> | |
| <td> htmlspecialchars($row['phone']) </td> | |
| <td> htmlspecialchars($row['state']) </td> | |
| <td><a href="print_id.php?id=<?= $row['id'] ?>" target="_blank">🖨️ Print ID</a></td> | |
| </tr> | |
| } | |
| </table> | |
| </div> | |
| </body> | |
| </html> |