OXIESEC PANEL
- Current Dir:
/
/
var
/
www
/
cream
/
Xpress_backup
Server IP: 139.59.38.164
Upload:
Create Dir:
Name
Size
Modified
Perms
📁
..
-
06/17/2025 10:17:24 AM
rwxrwxr-x
📄
.browserslistrc
208 bytes
01/06/2025 07:58:55 AM
rw-r--r--
📄
.gitignore
42 bytes
01/06/2025 07:58:55 AM
rw-r--r--
📄
.htaccess
803 bytes
01/06/2025 07:58:55 AM
rw-r--r--
📄
.htaccess.swp
12 KB
01/06/2025 07:58:56 AM
rw-r--r--
📄
.travis.yml
199 bytes
01/06/2025 07:58:56 AM
rw-r--r--
📄
09-01-25navbar.php
23.78 KB
05/19/2025 10:07:19 AM
rw-r--r--
📄
15-02-25viewList.php
15.21 KB
05/19/2025 10:07:19 AM
rw-r--r--
📄
17-02-25newCompaign.php
13.09 KB
05/19/2025 10:07:17 AM
rw-r--r--
📁
NLEditor
-
05/19/2025 10:07:19 AM
rwxr-xr-x
📄
addList.php
5.65 KB
05/19/2025 10:07:17 AM
rw-r--r--
📄
adi_deliveryViewList.php
11.25 KB
05/19/2025 10:07:17 AM
rw-r--r--
📄
aditya_choose.php
6.13 KB
05/19/2025 10:07:17 AM
rw-r--r--
📄
aditya_viewCampaign.php
25.53 KB
05/19/2025 10:07:19 AM
rwxrwxrwx
📁
assets
-
01/06/2025 08:00:13 AM
rwxr-xr-x
📄
back_choose_template.php
8.12 KB
05/19/2025 10:07:19 AM
rw-r--r--
📄
blacklist.php
13.47 KB
05/19/2025 10:07:19 AM
rw-r--r--
📄
bounceViewList.php
13.28 KB
05/19/2025 10:07:19 AM
rw-r--r--
📄
bounce_handler.php
5.05 KB
05/19/2025 10:07:17 AM
rw-r--r--
📄
checkNotificationTopics.php
5.11 KB
05/19/2025 10:07:19 AM
rw-r--r--
📁
check_identity
-
05/19/2025 10:07:17 AM
rwxr-xr-x
📄
checknotif.php
1.01 KB
05/19/2025 10:07:19 AM
rw-r--r--
📄
choose_template.php
9.73 KB
05/19/2025 10:07:17 AM
rw-r--r--
📄
clickViewList.php
11.72 KB
05/19/2025 10:07:19 AM
rw-r--r--
📄
click_handler.php
1.75 KB
05/19/2025 10:07:19 AM
rw-r--r--
📄
complaintsViewList.php
7.43 KB
05/19/2025 10:07:17 AM
rw-r--r--
📄
complaints_handler.php
2.89 KB
05/19/2025 10:07:19 AM
rw-r--r--
📄
composer.json
200 bytes
01/06/2025 07:59:01 AM
rw-r--r--
📄
composer.lock
39.12 KB
01/06/2025 07:59:01 AM
rw-r--r--
📄
createList.php
17.48 KB
05/19/2025 10:07:19 AM
rw-r--r--
📁
credentials
-
01/06/2025 08:01:45 AM
rwxr-xr-x
📄
csv.php
11.8 KB
05/19/2025 10:07:17 AM
rw-r--r--
📁
data
-
03/03/2025 11:56:59 AM
rwxrwxrwx
📄
db.php
1000 bytes
05/19/2025 10:07:17 AM
rw-r--r--
📄
deleteCampaign.php
966 bytes
05/19/2025 10:07:19 AM
rw-r--r--
📄
delete_list.php
903 bytes
05/19/2025 10:07:17 AM
rw-r--r--
📄
delete_users.php
435 bytes
05/19/2025 10:07:17 AM
rw-r--r--
📄
deliveryViewList.php
11.45 KB
05/19/2025 10:07:17 AM
rw-r--r--
📄
delivery_handler.php
3.25 KB
05/19/2025 10:07:17 AM
rw-r--r--
📄
download_Complaints.php
1.16 KB
05/19/2025 10:07:17 AM
rw-r--r--
📄
download_bounces.php
1.18 KB
05/19/2025 10:07:17 AM
rw-r--r--
📄
download_clicked.php
1.23 KB
05/19/2025 10:07:17 AM
rw-r--r--
📄
download_delivered.php
1.12 KB
05/19/2025 10:07:19 AM
rw-r--r--
📄
download_open.php
1.22 KB
05/19/2025 10:07:17 AM
rw-r--r--
📄
download_report.php
3.33 KB
05/19/2025 10:07:19 AM
rw-r--r--
📄
download_unique_open.php
1.6 KB
05/19/2025 10:07:17 AM
rw-r--r--
📄
duplicate_campaign.php
1.62 KB
05/19/2025 10:07:17 AM
rw-r--r--
📄
edit_campaign.php
1.45 KB
05/19/2025 10:07:17 AM
rw-r--r--
📄
edit_list.php
9.99 KB
05/19/2025 10:07:19 AM
rw-r--r--
📄
feedback.php
1.66 KB
05/19/2025 10:07:17 AM
rw-r--r--
📄
fetch_template.php
493 bytes
05/19/2025 10:07:17 AM
rw-r--r--
📄
footer.php
1.7 KB
05/19/2025 10:07:17 AM
rw-r--r--
📁
grfx
-
01/06/2025 08:01:47 AM
rwxrwxrwx
📄
himanshu_index.php
6.66 KB
05/19/2025 10:07:17 AM
rw-r--r--
📄
himanshu_newCompaign.php
11.92 KB
05/19/2025 10:07:17 AM
rw-r--r--
📄
housekeeping.php
23.07 KB
05/19/2025 10:07:17 AM
rw-r--r--
📄
index.php
7.95 KB
05/19/2025 10:07:17 AM
rwxrwxrwx
📄
insert_list.php
2.64 KB
05/19/2025 10:07:17 AM
rw-r--r--
📁
js
-
01/06/2025 08:01:49 AM
rwxr-xr-x
📄
load.php
159 bytes
05/19/2025 10:07:19 AM
rw-r--r--
📁
log
-
01/07/2025 07:47:04 AM
rwxrwxrwx
📄
main.css
1.32 KB
01/09/2025 10:38:27 AM
rw-r--r--
📄
navbar.php
22.64 KB
05/19/2025 10:07:19 AM
rw-r--r--
📄
navbar_menu.php
1.65 KB
05/19/2025 10:07:17 AM
rw-r--r--
📄
newCompaign.php
14.61 KB
05/19/2025 10:07:17 AM
rw-r--r--
📄
obc_cards.php
8.25 KB
05/19/2025 10:07:17 AM
rw-r--r--
📄
openViewList.php
13.25 KB
05/19/2025 10:07:19 AM
rw-r--r--
📄
open_handler.php
1.75 KB
05/19/2025 10:07:19 AM
rw-r--r--
📁
process
-
05/19/2025 10:07:17 AM
rwxrwxrwx
📄
process_emails.php
11.96 KB
05/19/2025 10:07:17 AM
rw-r--r--
📄
real-recipients.csv
39.48 KB
01/06/2025 07:59:07 AM
rw-r--r--
📄
resubscribe.php
5.61 KB
05/19/2025 10:07:19 AM
rw-r--r--
📄
sample.csv
55 bytes
01/06/2025 07:59:08 AM
rw-r--r--
📄
save.php
252 bytes
05/19/2025 10:07:17 AM
rw-r--r--
📄
save_campaign.php
612 bytes
05/19/2025 10:07:17 AM
rw-r--r--
📄
saved_content.html
6.48 KB
01/07/2025 11:02:10 AM
rw-r--r--
📄
send_email.php
987 bytes
05/19/2025 10:07:17 AM
rwxrwxrwx
📄
send_email_campaignGraph.php
2.24 KB
05/19/2025 10:07:19 AM
rwxrwxrwx
📄
sendgrid.php
3.62 KB
05/19/2025 10:07:17 AM
rw-r--r--
📄
showListMembers.php
10.69 KB
05/19/2025 10:07:17 AM
rw-r--r--
📄
showcase.php
7.93 KB
05/19/2025 10:07:19 AM
rw-r--r--
📄
sidebar.php
0 bytes
05/19/2025 10:07:17 AM
rw-r--r--
📄
sns_subscribe.php
5.25 KB
05/19/2025 10:07:17 AM
rw-r--r--
📄
submit_form.php
2.48 KB
05/19/2025 10:07:17 AM
rw-r--r--
📄
template_index.php
7.37 KB
05/19/2025 10:07:17 AM
rw-r--r--
📄
test-mail.csv
337 bytes
01/06/2025 07:59:10 AM
rw-r--r--
📄
test.php
969 bytes
05/19/2025 10:07:17 AM
rw-r--r--
📄
test_process_emails.php
1.91 KB
05/19/2025 10:07:19 AM
rw-r--r--
📄
unsubscribe.php
7.63 KB
05/19/2025 10:07:17 AM
rw-r--r--
📄
upload_image.php
606 bytes
05/19/2025 10:07:17 AM
rw-r--r--
📁
uploads
-
03/03/2025 01:00:59 PM
rwxrwxrwx
📁
vendor
-
05/19/2025 10:07:19 AM
rwxr-xr-x
📄
verify.html
486 bytes
01/06/2025 07:59:11 AM
rw-r--r--
📄
verify.php
3.12 KB
05/19/2025 10:07:17 AM
rw-r--r--
📄
verify_email.php
5.12 KB
05/19/2025 10:07:19 AM
rw-r--r--
📄
viewCampaign.php
25.37 KB
05/19/2025 10:07:17 AM
rw-r--r--
📄
viewList.php
16.51 KB
05/19/2025 10:07:17 AM
rw-r--r--
📄
xpress_handler.php
10.38 KB
05/19/2025 10:07:17 AM
rw-r--r--
📄
znewCompaign.php
11.22 KB
05/19/2025 10:07:17 AM
rw-r--r--
📄
zunsubscribe.php
6.02 KB
05/19/2025 10:07:19 AM
rw-r--r--
📄
zzindex.php
6.89 KB
05/19/2025 10:07:19 AM
rw-r--r--
📄
zzzzindex.php
6.76 KB
05/19/2025 10:07:17 AM
rw-r--r--
📄
zzzzzindex.php
6.88 KB
05/19/2025 10:07:19 AM
rw-r--r--
Editing: housekeeping.php
Close
<?php include '../assets/php/validate.logged.php'; include 'db.php'; include '../assets/php/config.php'; include '../assets/php/function.php'; // Pagination $items_per_page = 50; $current_page = isset($_GET['page']) ? (int)$_GET['page'] : 1; $offset = ($current_page - 1) * $items_per_page; // Fetch unsubscribed $unsubscribedResult = $conn->query("SELECT s.name, s.email, s.status FROM subscribers s INNER JOIN list l ON s.list_id = l.id WHERE s.status='unsubscribed' AND l.user_id = $gUserId LIMIT $offset, $items_per_page"); $total_unsubscribed = $conn->query("SELECT COUNT(*) as count FROM subscribers WHERE status='unsubscribed'")->fetch_assoc()['count']; $total_unsubscribed_pages = ceil($total_unsubscribed / $items_per_page); // Fetch subscribed $subscribedResult = $conn->query("SELECT s.name, s.email, s.status FROM subscribers s INNER JOIN list l ON s.list_id = l.id WHERE s.status = 'subscribed' AND l.user_id = $gUserId LIMIT $offset, $items_per_page"); $total_subscribed = $conn->query("SELECT COUNT(*) as count FROM subscribers WHERE status='subscribed'")->fetch_assoc()['count']; $total_subscribed_pages = ceil($total_subscribed / $items_per_page); // blacklist logic if (isset($_POST['action']) && $_POST['action'] == 'add') { $email = $_POST['email']; $reason = $_POST['reason'] ?? ''; if (!filter_var($email, FILTER_VALIDATE_EMAIL)) { echo "Invalid email address."; exit; } $stmt = $conn->prepare("INSERT INTO blacklist (user_id, email, reason) VALUES (?, ?, ?)"); $stmt->bind_param('iss', $gUserId, $email, $reason); if ($stmt->execute()) { echo "<script>alert('Email successfully added to the blacklist.'); window.location.href='housekeeping.php';</script>"; } else { echo "<script>alert('Error adding email: " . $conn->error . "'); window.location.href='housekeeping.php';</script>"; } $stmt->close(); } // Handle removing from blacklist if (isset($_POST['action']) && $_POST['action'] == 'remove') { $email = $_POST['email']; $stmt = $conn->prepare("DELETE FROM blacklist WHERE email = ?"); $stmt->bind_param('s', $email); if ($stmt->execute()) { echo "<script>alert('Email successfully removed from the blacklist.'); window.location.href='housekeeping.php';</script>"; } else { echo "<script>alert('Error removing email: " . $conn->error . "'); window.location.href='housekeeping.php';</script>"; } $stmt->close(); } // Handle blocking by domain if (isset($_POST['action']) && $_POST['action'] == 'block_domain') { $domain = $_POST['domain']; if (empty($domain)) { echo "Domain is required."; exit; } $stmt = $conn->prepare("INSERT INTO blacklist (user_id, email, reason) VALUES (?, ?, 'Blocked by domain')"); $domainWildcard = "%@$domain"; $stmt->bind_param('is', $gUserId, $domainWildcard); if ($stmt->execute()) { echo "Domain successfully blocked."; } else { echo "Error blocking domain: " . $conn->error; } $stmt->close(); } // Handle removing by domain if (isset($_POST['action']) && $_POST['action'] == 'unblock_domain') { $domain = $_POST['domain']; if (empty($domain)) { echo "Domain is required."; exit; } $stmt = $conn->prepare("DELETE FROM blacklist WHERE email LIKE ?"); $domainWildcard = "%@$domain"; $stmt->bind_param('s', $domainWildcard); if ($stmt->execute()) { echo "Domain successfully unblocked."; } else { echo "Error unblocking domain: " . $conn->error; } $stmt->close(); } // Handle bulk email deletion if (isset($_POST['action']) && $_POST['action'] == 'bulk_delete') { $emails = $_POST['emails']; // Prepare the statement for bulk deletion $emailArray = explode(',', $emails); $placeholders = implode(',', array_fill(0, count($emailArray), '?')); $stmt = $conn->prepare("DELETE FROM blacklist WHERE email IN ($placeholders)"); $stmt->bind_param(str_repeat('s', count($emailArray)), ...$emailArray); if ($stmt->execute()) { echo "<script>alert('Email successfully removed from the blacklist.'); window.location.href='housekeeping.php';</script>"; } else { echo "<script>alert('Error removing email: " . $conn->error . "'); window.location.href='housekeeping.php';</script>"; } $stmt->close(); } // Fetch blacklisted emails $limit = 10; $page = isset($_GET['page']) ? intval($_GET['page']) : 1; $offset = ($page - 1) * $limit; $blacklistQuery = "SELECT * FROM blacklist where user_id = $gUserId LIMIT $limit OFFSET $offset"; $blacklistResult = $conn->query($blacklistQuery); // Fetch total records for pagination $totalQuery = "SELECT COUNT(*) as total FROM blacklist"; $totalResult = $conn->query($totalQuery); $totalRow = $totalResult->fetch_assoc(); $totalRecords = $totalRow['total']; $totalPages = ceil($totalRecords / $limit); ?> <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Knobly Cream: Create • Reach • Measure</title> <!-- jQuery --> <script src="https://code.jquery.com/jquery-3.6.0.min.js"></script> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> <!-- Font Awesome CSS --> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/all.min.css"> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/all.min.css"> <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/css/bootstrap.min.css" integrity="sha384-9aIt2nRpC12Uk9gS9baDl411NQApFmC26EwAOH8WgZl5MYYxFfc+NcPb1dKGj7Sk" crossorigin="anonymous" /> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.0.0/animate.min.css" /> <link rel="stylesheet" href="../inc/fontawesome/css/all.min.css" /> <link rel="stylesheet" href="../inc/magnific-popup.css" /> <link rel="stylesheet" href="../inc/style.css" /> <link rel="stylesheet" href="../assets/css/styles.css"> <link rel="stylesheet" href="main.css"> <script src="https://code.jquery.com/jquery-3.6.0.min.js"></script> <script src="https://code.jquery.com/jquery-3.5.1.min.js" integrity="sha256-9/aliU8dGd2tb6OSsuzixeV4y/faTqgFtohetphbbj0=" crossorigin="anonymous"></script> <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/js/bootstrap.min.js" integrity="sha384-OgVRvuATP1z7JjHLkuOU7Xw704+h835Lr+6QL9UvYjZE3Ipu6Tp75j7Bh/kR0JKI" crossorigin="anonymous"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.8.0/Chart.min.js" crossorigin="anonymous"></script> <script src="https://cdn.tiny.cloud/1/u5oz235qw5jiqww4udm90ocp9zg2rncblqo2ch0ym3twjgyt/tinymce/5/tinymce.min.js" referrerpolicy="origin"></script> <script src="https://js.zohostatic.com/books/zfwidgets/assets/js/zf-widget.js"></script> <script src="../inc/jquery.magnific-popup.min.js"></script> <link href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-icons/1.10.5/font/bootstrap-icons.min.css" rel="stylesheet"> <script src="../inc/common.js"></script> <script type="text/javascript"> </script> <!-- Custom Styles --> <style> .table td, .table th { vertical-align: middle; color: #333; } /* Custom Sidebar Styling */ #layoutSidenav { display: flex; min-height: 100vh; } #layoutSidenav_content { flex-grow: 1; padding-left: 0; /* Removed unnecessary padding */ } .sb-nav-fixed #layoutSidenav_content { padding-top: 5px; } .page-link { border-radius: 0.25rem; color: white; /* Ensure white text for pagination in dark mode */ } .btn-danger { color: #fff; background-color: #2b2b2b !important; border-color: #2b2b2b !important; } .btn-warning { color: #212529; background-color: #2b2b2b; border-color: #2b2b2b; } .btn-group button, .btn-group a { margin: 0 5px; } .table-responsive { margin-bottom: 20px; overflow-x: auto; /* Added horizontal scroll */ } .table thead th { background-color: #343a40; color: white; text-align: center; } body.dark-mode .table td, .table th { vertical-align: middle; color: white; } body.light-mode .table td, .table th { vertical-align: middle; Color: black; } body.dark-mode { background-color: #121212; color: white; } body.dark-mode .breadcrumb { /* background-color: #333; */ color: white; } body.dark-mode .table { background-color: #1e1e1e; color: white; } body.dark-mode .table th, body.dark-mode .table td { border-color: #444; } body.dark-mode .table-striped tbody tr:nth-of-type(odd) { background-color: #333; } body.dark-mode .table-striped tbody tr:nth-of-type(even) { background-color: #2b2b2b; } body.dark-mode .table th { color: white; } body.dark-mode .table a { color: #ff9307; } /* Pagination styling for dark mode */ .pagination .page-item.active .page-link { background-color: #007bff; border-color: #007bff; color: white; /* White text for active page */ } .pagination .page-link { background-color: #343a40; border: 1px solid #343a40; color: white; /* White text for links */ } /* Mobile-friendly tweaks */ @media (max-width: 768px) { #layoutSidenav { flex-direction: column; } #layoutSidenav_content { padding-left: 15px; } .pagination { font-size: 14px; /* Smaller pagination for mobile */ } } .go-back-bar { margin-top: 1px !important; } </style> </head> <body class="sb-nav-fixed"> <?php include "navbar.php"; ?> <?php include "../assets/php/go_backbar.php"; ?> <div id="layoutSidenav"> <?php include 'sidebar.php'; ?> <div id="layoutSidenav_content"> <main> <div id="panelContent" class="container-fluid col-md-9"> <!-- Unsubscribed Users Section --> <ol class="breadcrumb my-4"> <li class="breadcrumb-item d-flex justify-content-between align-items-center w-100"> <h4>Unsubscribed Users</h4> <div class="btn-group" role="group"> <a href="resubscribe.php" class="btn btn-primary"><i class="fas fa-check"></i> Resubscribe Selected</a> </div> </li> </ol> <div class="table-responsive"> <div class="d-flex justify-content-between mb-3"> <input type="text" id="search-unsubscribed" class="form-control" placeholder="Search Unsubscribed Users..."> </div> <table class="table table-bordered table-striped"> <thead class="thead-dark"> <tr> <th>Select</th> <th>Name</th> <th>Email</th> <th>Status</th> <th>Action</th> </tr> </thead> <tbody id="unsubscribed-table-body"> <?php while ($row = $unsubscribedResult->fetch_assoc()): ?> <tr> <td><input type="checkbox" class="select-user" data-email="<?php echo htmlspecialchars($row['email']); ?>"></td> <td><?php echo htmlspecialchars($row['name']); ?></td> <td><?php echo htmlspecialchars($row['email']); ?></td> <td><?php echo htmlspecialchars($row['status']); ?></td> <td> <a href="delete_users.php?email=<?php echo urlencode($row['email']); ?>" class="btn btn-danger btn-sm" onclick="return confirm('Are you sure you want to remove this user?');">Remove</a> </td> </tr> <?php endwhile; ?> </tbody> </table> <!-- Pagination for Unsubscribed Users --> <nav aria-label="Page navigation"> <ul class="pagination justify-content-center"> <?php for ($page = 1; $page <= $total_unsubscribed_pages; $page++): ?> <li class="page-item <?php if ($page == $current_page) echo 'active'; ?>"> <a class="page-link" href="?page=<?php echo $page; ?>"><?php echo $page; ?></a> </li> <?php endfor; ?> </ul> </nav> </div> <!-- Subscribed Users Section --> <ol class="breadcrumb my-4"> <li class="breadcrumb-item d-flex justify-content-between align-items-center w-100"> <h4>Subscribed Users</h4> <div class="btn-group" role="group"> </div> </li> </ol> <div class="table-responsive"> <div class="d-flex justify-content-between mb-3"> <input type="text" id="search-subscribed" class="form-control" placeholder="Search Subscribed Users..."> </div> <table class="table table-bordered table-striped"> <thead class="thead-dark"> <tr> <th>Select</th> <th>Name</th> <th>Email</th> <th>Status</th> <th>Action</th> </tr> </thead> <tbody id="subscribed-table-body"> <?php while ($row = $subscribedResult->fetch_assoc()): ?> <tr> <td><input type="checkbox" class="select-user" data-email="<?php echo htmlspecialchars($row['email']); ?>"></td> <td><?php echo htmlspecialchars($row['name']); ?></td> <td><?php echo htmlspecialchars($row['email']); ?></td> <td><?php echo htmlspecialchars($row['status']); ?></td> <td> <a href="unsubscribe.php?email=<?php echo urlencode($row['email']); ?>" class="btn btn-warning btn-sm" onclick="return confirm('Are you sure you want to unsubscribe this user?');">Unsubscribe</a> </td> </tr> <?php endwhile; ?> </tbody> </table> <!-- Pagination for Subscribed Users --> <!-- <nav aria-label="Page navigation"> <ul class="pagination justify-content-center"> <?php for ($page = 1; $page <= $total_subscribed_pages; $page++): ?> <li class="page-item <?php if ($page == $current_page) echo 'active'; ?>"> <a class="page-link" href="?page=<?php echo $page; ?>"><?php echo $page; ?></a> </li> <?php endfor; ?> </ul> </nav> --> </div> </div> </main> </div> </div> <div id="panelContent" class="container-fluid"> <div class="container mt-5"> <ol class="breadcrumb my-3"> <li class="breadcrumb-item w-100" style="display:flex; justify-content:space-between; align-items:center;"> <h4>Blacklist Management</h4> </li> </ol> <!-- Form to Add Email to Blacklist --> <form action="housekeeping.php" method="post" class="mb-4"> <input type="hidden" name="action" value="add"> <div class="form-group"> <label for="email">Email to add in Blacklist:</label> <input type="email" id="email" name="email" class="form-control" required> </div> <div class="form-group"> <label for="reason">Reason (optional):</label> <textarea id="reason" name="reason" class="form-control"></textarea> </div> <button type="submit" class="btn btn-primary">Add to Blacklist</button> </form> <!-- Form to Remove Email from Blacklist --> <form action="housekeeping.php" method="post" class="mb-4"> <input type="hidden" name="action" value="remove"> <div class="form-group"> <label for="remove-email">Email to Remove from blacklist:</label> <input type="email" id="remove-email" name="email" class="form-control" required> </div> <button type="submit" class="btn btn-danger">Remove from Blacklist</button> </form> <!-- Form to Block by Domain --> <form action="housekeeping.php" method="post" class="mb-4"> <input type="hidden" name="action" value="block_domain"> <div class="form-group"> <label for="domain">Domain to Block:</label> <input type="text" id="domain" name="domain" class="form-control" placeholder="example.com" required> </div> <button type="submit" class="btn btn-warning">Block Domain</button> </form> <!-- Table of Blacklisted Emails --> <div class="table-responsive"> <table class="table table-striped"> <thead> <tr> <th>Email</th> <th>Reason</th> <th>Actions</th> </tr> </thead> <tbody> <?php while ($row = $blacklistResult->fetch_assoc()) { ?> <tr> <td><?php echo htmlspecialchars($row['email']); ?></td> <td><?php echo htmlspecialchars($row['reason']); ?></td> <td> <form action="housekeeping.php" method="post" class="d-inline"> <input type="hidden" name="action" value="remove"> <input type="hidden" name="email" value="<?php echo htmlspecialchars($row['email']); ?>"> <button type="submit" class="btn btn-danger btn-sm">Remove</button> </form> </td> </tr> <?php } ?> </tbody> </table> </div> <!-- Pagination --> <nav aria-label="Page navigation example"> <ul class="pagination justify-content-center " style="gap:10px"> <li class="page-item <?php echo $page == 1 ? 'disabled' : ''; ?>"> <a class="page-link" href="?page=<?php echo $page - 1; ?>">Previous</a> </li> <?php for ($i = 1; $i <= $totalPages; $i++) { ?> <li class="page-item <?php echo $i == $page ? 'active' : ''; ?>"> <a class="page-link" href="?page=<?php echo $i; ?>"><?php echo $i; ?></a> </li> <?php } ?> <li class="page-item <?php echo $page == $totalPages ? 'disabled' : ''; ?>"> <a class="page-link" href="?page=<?php echo $page + 1; ?>">Next</a> </li> </ul> </nav> </div> </div> <!-- Bootstrap JS and dependencies --> <script> // Select/Deselect all checkboxes $('#select-all-unsubscribed').click(function() { $('input.select-user').prop('checked', this.checked); }); $('#select-all-subscribed').click(function() { $('input.select-user').prop('checked', this.checked); }); // Search functionality $('#search-unsubscribed').on('keyup', function() { var searchTerm = $(this).val().toLowerCase(); $('#unsubscribed-table-body tr').each(function() { var rowText = $(this).text().toLowerCase(); $(this).toggle(rowText.indexOf(searchTerm) > -1); }); }); $('#search-subscribed').on('keyup', function() { var searchTerm = $(this).val().toLowerCase(); $('#subscribed-table-body tr').each(function() { var rowText = $(this).text().toLowerCase(); $(this).toggle(rowText.indexOf(searchTerm) > -1); }); }); </script> </body> </html>