OXIESEC PANEL
- Current Dir:
/
/
var
/
www
/
3-31-025chanakya
/
creamAdmin
Server IP: 139.59.38.164
Upload:
Create Dir:
Name
Size
Modified
Perms
📁
..
-
03/31/2025 06:36:42 AM
rwxr-xr-x
📁
PHPMailer
-
03/26/2025 04:07:42 AM
rwxr-xr-x
📄
addPro.php
800 bytes
03/26/2025 03:48:03 AM
rw-r--r--
📄
dash.php
0 bytes
03/26/2025 03:48:03 AM
rw-r--r--
📄
dashboard.php
8.86 KB
03/26/2025 03:48:03 AM
rw-r--r--
📄
db_connect.php
292 bytes
03/26/2025 03:48:03 AM
rw-r--r--
📄
mail.php
2.01 KB
03/26/2025 03:48:03 AM
rw-r--r--
📄
proUsers.php
8.8 KB
03/26/2025 03:48:03 AM
rw-r--r--
📄
send_otp.php
1.38 KB
03/26/2025 03:48:03 AM
rw-r--r--
📄
userActivity.php
9.79 KB
03/26/2025 03:48:03 AM
rw-r--r--
📄
verification.php
4.71 KB
03/26/2025 03:48:03 AM
rw-r--r--
📄
verify_otp.php
644 bytes
03/26/2025 03:48:03 AM
rw-r--r--
Editing: dashboard.php
Close
<?php include 'db_connect.php'; include '../assets/php/validate.logged.php'; $expiration_time = 15 * 60; if (isset($_SESSION['admin_set_time']) && (time() - $_SESSION['admin_set_time']) > $expiration_time) { unset($_SESSION['admin']); unset($_SESSION['admin_set_time']); } if (isset($_SESSION['admin']) && ($gUserId == 23 && $_SESSION['admin'] == "verified")) { // Get date range from request $start_date = isset($_GET['start_date']) ? $_GET['start_date'] : ''; $end_date = isset($_GET['end_date']) ? $_GET['end_date'] : ''; $filter = isset($_GET['filter']) ? $_GET['filter'] : ''; // Determine date range based on filter if ($filter === 'week') { $start_date = date('Y-m-d', strtotime('-1 week')); $end_date = date('Y-m-d'); } elseif ($filter === 'month') { $start_date = date('Y-m-d', strtotime('-1 month')); $end_date = date('Y-m-d'); } elseif ($filter === 'year') { $start_date = date('Y-m-d', strtotime('-1 year')); $end_date = date('Y-m-d'); } elseif ($filter === 'all') { $start_date = date('Y-m-d', strtotime('-10 year')); $end_date = date('Y-m-d'); } $users = []; if (!empty($start_date) && !empty($end_date)) { $sql = "SELECT * FROM user WHERE date_created BETWEEN ? AND ?"; $stmt = $conn->prepare($sql); $stmt->bind_param("ss", $start_date, $end_date); $stmt->execute(); $result = $stmt->get_result(); if ($result->num_rows > 0) { while ($row = $result->fetch_assoc()) { $users[] = $row; } } else { $users = ["message" => "No records found in the given date range"]; } $stmt->close(); } else { $users = ["error" => "Please provide both start and end date"]; } $conn->close(); ?> <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Admin</title> <style> body { font-family: 'Roboto', sans-serif; background-color: #f4f4f4; margin: 0; padding: 0; display: flex; justify-content: center; align-items: center; min-height: 100vh; color: #333; /* Darker default text color */ } .container { background-color: #fff; padding: 30px; border-radius: 10px; box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); width: 90%; max-width: 960px; } h1 { color: #2c3e50; margin-bottom: 25px; text-align: center; } .form-group { margin-bottom: 20px; } label { display: block; margin-bottom: 8px; color: #7f8c8d; font-weight: 500; } input[type="date"] { width: calc(30% - 22px); /* Adjust width as needed */ padding: 12px; border: 1px solid #bdc3c7; border-radius: 6px; box-sizing: border-box; font-size: 16px; transition: border-color 0.3s ease; } input[type="date"]:focus { border-color: #3498db; outline: none; box-shadow: 0 0 5px rgba(52, 152, 219, 0.2); } button { background-color: #3498db; color: #fff; padding: 12px 20px; border: none; border-radius: 6px; cursor: pointer; font-size: 16px; transition: background-color 0.3s ease; margin-right: 10px; /* Space between buttons */ } button:hover { background-color: #2980b9; } .filter-buttons { margin-bottom: 25px; display: flex; /* Make buttons horizontal */ gap: 10px; /* Space between buttons */ } table { width: 100%; border-collapse: collapse; margin-top: 25px; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); border-radius: 8px; overflow: hidden; } th, td { padding: 15px; border: none; text-align: left; background-color: #fff; } th { background-color: #ecf0f1; font-weight: 600; color: #7f8c8d; padding: 18px; } tr:nth-child(even) { background-color: #f9f9f9; } p { color: #7f8c8d; margin-top: 10px; text-align: center; /* Center the message */ } .table-container { overflow-x: auto; } .set-date { display: flex; align-items: center; gap: 10px; } .set-date label { margin-bottom: 0; /* Align label with input */ } .set-date input[type="date"] { width: calc(25% - 22px); } </style> <link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap" rel="stylesheet"> </head> <body> <div class="container"> <h1>Admin Dashboard</h1> <button onclick="window.location.href='proUsers.php'">Pro users</button> <div class="form-group"> <form method="GET" class="set-date"> <label for="start_date">Start Date:</label> <input type="date" id="start_date" name="start_date"> <label for="end_date">End Date:</label> <input type="date" id="end_date" name="end_date"> <button type="submit">Filter</button> </form> </div> <div class="filter-buttons"> <form method="GET"> <button type="submit" name="filter" value="week">Last Week</button> <button type="submit" name="filter" value="month">Last Month</button> <button type="submit" name="filter" value="year">Last Year</button> <button type="submit" name="filter" value="all">All Time</button> </form> </div> <? if (!empty($users) && isset($users[0]['id'])) { ?> <div>Count-<?= sizeof($users) ?></div> <? } ?> <div class="table-container"> <?php if (!empty($users) && isset($users[0]['id'])): ?> <table> <thead> <tr> <th>ID</th> <th>Name</th> <th>Email</th> <th>Verified</th> <th>Registration Date</th> </tr> </thead> <tbody> <?php foreach ($users as $user): ?> <tr> <td><?php echo htmlspecialchars($user['id']); ?></td> <td><?php echo htmlspecialchars($user['full_name'] ?? 'N/A'); ?></td> <td><?php echo htmlspecialchars($user['email'] ?? 'N/A'); ?></td> <td><?php echo ($user['is_activated']) ? 'Yes' : 'No'; ?></td> <td><?php echo htmlspecialchars($user['date_created'] ?? 'N/A'); ?></td> </tr> <?php endforeach; ?> </tbody> </table> <?php else: ?> <p><?php echo htmlspecialchars($users['message'] ?? $users['error']); ?></p> <?php endif; ?> </div> </div> </body> </html> <? } else { // If the request is not from verify_payment.php, throw an HTTP 500 error. header('HTTP/1.1 500 Internal Server Error'); exit(); } ?>