OXIESEC PANEL
- Current Dir:
/
/
var
/
www
/
cream
/
reader
/
znew1aws-ses
Server IP: 139.59.38.164
Upload:
Create Dir:
Name
Size
Modified
Perms
📁
..
-
03/04/2025 08:32:49 AM
rwxr-xr-x
📄
.browserslistrc
208 bytes
03/03/2025 08:18:55 AM
rw-r--r--
📄
.gitignore
42 bytes
03/03/2025 08:18:55 AM
rw-r--r--
📄
.htaccess
803 bytes
03/03/2025 08:18:55 AM
rw-r--r--
📄
.htaccess.swp
12 KB
03/03/2025 08:18:55 AM
rw-r--r--
📄
.travis.yml
199 bytes
03/03/2025 08:18:55 AM
rw-r--r--
📄
addList.php
4.7 KB
05/19/2025 10:07:15 AM
rw-r--r--
📄
allTemplates.php
5 KB
05/19/2025 10:07:15 AM
rw-r--r--
📄
bbsns_subscribe.php
5.14 KB
05/19/2025 10:07:15 AM
rw-r--r--
📄
bcreateList.php
9.61 KB
05/19/2025 10:07:15 AM
rw-r--r--
📄
blacklist.php
14.09 KB
05/19/2025 10:07:15 AM
rw-r--r--
📄
bounceViewList.php
5.86 KB
05/19/2025 10:07:15 AM
rw-r--r--
📄
bounce_handler.php
9.87 KB
05/19/2025 10:07:15 AM
rw-r--r--
📄
bprocess_emails.php
6.73 KB
05/19/2025 10:07:15 AM
rw-r--r--
📄
checkNotificationTopics.php
5.11 KB
05/19/2025 10:07:15 AM
rw-r--r--
📁
check_identity
-
05/19/2025 10:07:15 AM
rwxr-xr-x
📄
checknotif.php
1.01 KB
05/19/2025 10:07:15 AM
rw-r--r--
📄
ckeditor.php
2.14 KB
05/19/2025 10:07:15 AM
rw-r--r--
📄
click_handler.php
1.75 KB
05/19/2025 10:07:15 AM
rw-r--r--
📄
combined.php
11.23 KB
05/19/2025 10:07:15 AM
rw-r--r--
📄
complaintsViewList.php
5.72 KB
05/19/2025 10:07:15 AM
rw-r--r--
📄
complaints_handler.php
2.89 KB
05/19/2025 10:07:15 AM
rw-r--r--
📄
composer.json
200 bytes
03/03/2025 08:18:56 AM
rw-r--r--
📄
composer.lock
39.12 KB
03/03/2025 08:18:56 AM
rw-r--r--
📄
createList.php
10.05 KB
05/19/2025 10:07:15 AM
rw-r--r--
📁
credentials
-
03/03/2025 08:25:28 AM
rwxr-xr-x
📄
csv.php
10.1 KB
05/19/2025 10:07:15 AM
rw-r--r--
📄
db.php
1000 bytes
05/19/2025 10:07:15 AM
rw-r--r--
📄
delete_list.php
509 bytes
05/19/2025 10:07:15 AM
rw-r--r--
📄
deliveryViewList.php
5.71 KB
05/19/2025 10:07:15 AM
rw-r--r--
📄
delivery_handler.php
3.25 KB
05/19/2025 10:07:15 AM
rw-r--r--
📄
download_Complaints.php
974 bytes
05/19/2025 10:07:15 AM
rw-r--r--
📄
download_bounces.php
1007 bytes
05/19/2025 10:07:15 AM
rw-r--r--
📄
download_delivered.php
971 bytes
05/19/2025 10:07:15 AM
rw-r--r--
📄
download_unique_open.php
1.6 KB
05/19/2025 10:07:15 AM
rw-r--r--
📄
edit_list.php
8.39 KB
05/19/2025 10:07:15 AM
rw-r--r--
📄
feedback.php
1.66 KB
05/19/2025 10:07:15 AM
rw-r--r--
📄
footer.php
4.71 KB
05/19/2025 10:07:15 AM
rw-r--r--
📄
housekeeping.php
9.97 KB
05/19/2025 10:07:15 AM
rw-r--r--
📄
index.php
8.12 KB
05/19/2025 10:07:15 AM
rw-r--r--
📄
insert_list.php
2.64 KB
05/19/2025 10:07:15 AM
rw-r--r--
📁
log
-
05/19/2025 10:07:15 AM
rwxr-xr-x
📄
navbar.php
1.64 KB
05/19/2025 10:07:15 AM
rw-r--r--
📄
newCompaign.php
5.94 KB
05/19/2025 10:07:15 AM
rw-r--r--
📄
open_handler.php
1.75 KB
05/19/2025 10:07:15 AM
rw-r--r--
📄
process_emails.php
10.21 KB
05/19/2025 10:07:15 AM
rw-r--r--
📄
real-recipients.csv
39.48 KB
03/03/2025 08:18:56 AM
rw-r--r--
📄
sample.csv
55 bytes
03/03/2025 08:18:56 AM
rw-r--r--
📄
send_email.php
987 bytes
05/19/2025 10:07:15 AM
rw-r--r--
📄
send_email_campaignGraph.php
2.24 KB
05/19/2025 10:07:15 AM
rw-r--r--
📄
sendgrid.php
3.62 KB
05/19/2025 10:07:15 AM
rw-r--r--
📄
showListMembers.php
4.54 KB
05/19/2025 10:07:15 AM
rw-r--r--
📄
showcase.php
7.93 KB
05/19/2025 10:07:15 AM
rw-r--r--
📄
sidebar.php
3.11 KB
05/19/2025 10:07:15 AM
rw-r--r--
📄
sns_subscribe.php
5.25 KB
05/19/2025 10:07:15 AM
rw-r--r--
📄
submit_form.php
2.48 KB
05/19/2025 10:07:15 AM
rw-r--r--
📄
test-mail.csv
337 bytes
03/03/2025 08:18:56 AM
rw-r--r--
📄
test.php
969 bytes
05/19/2025 10:07:15 AM
rw-r--r--
📄
test_process_emails.php
1.91 KB
05/19/2025 10:07:15 AM
rw-r--r--
📄
upload_image.php
606 bytes
05/19/2025 10:07:15 AM
rw-r--r--
📁
uploads
-
03/03/2025 08:25:38 AM
rwxr-xr-x
📁
vendor
-
05/19/2025 10:07:15 AM
rwxr-xr-x
📄
verify.html
486 bytes
03/03/2025 08:18:56 AM
rw-r--r--
📄
verify.php
3.12 KB
05/19/2025 10:07:15 AM
rw-r--r--
📄
verify_email.php
5.12 KB
05/19/2025 10:07:15 AM
rw-r--r--
📄
viewCampaign.php
13.05 KB
05/19/2025 10:07:15 AM
rw-r--r--
📄
viewList.php
8.47 KB
05/19/2025 10:07:15 AM
rw-r--r--
📄
zsidebar.php
3.27 KB
05/19/2025 10:07:15 AM
rw-r--r--
📄
zviewCampaign.php
8.94 KB
05/19/2025 10:07:15 AM
rw-r--r--
📄
zzprocess_emails.php
10.07 KB
05/19/2025 10:07:15 AM
rw-r--r--
Editing: viewCampaign.php
Close
<?php // Include necessary files include '../inc/validate.logged.php'; include '../inc/config.php'; include 'db.php'; // Get the campaign ID from the query parameter $campaignId = isset($_GET['id']) ? intval($_GET['id']) : 0; // Fetch unique clicks, unique opens, bounces, and deliveries function fetch_campaign_data($conn, $campaignId) { $data = []; $queries = [ 'unique_clicks' => "SELECT COUNT(*) AS count FROM messages m INNER JOIN email_clicks ec ON ec.message_id = m.message_id WHERE m.campaign_id = ?", 'unique_opens' => "SELECT COUNT(*) AS count FROM messages m INNER JOIN email_opens eo ON eo.message_id = m.message_id WHERE m.campaign_id = ?", 'bounces' => "SELECT COUNT(*) AS count FROM bounces b INNER JOIN messages m ON m.message_id = b.message_id WHERE m.campaign_id = ?", 'deliveries' => "SELECT COUNT(*) AS count FROM deliveries d INNER JOIN messages m ON m.message_id = d.message_id WHERE m.campaign_id = ?" ]; foreach ($queries as $key => $query) { $stmt = $conn->prepare($query); $stmt->bind_param("i", $campaignId); $stmt->execute(); $result = $stmt->get_result(); $data[$key] = $result->fetch_assoc()['count']; $stmt->close(); } return $data; } // Fetch campaign details $campaignData = fetch_campaign_data($conn, $campaignId); $campaign = $conn->query("SELECT campaign_name, action, list_id, sent_date FROM campaigns WHERE id = $campaignId")->fetch_assoc(); $list = $conn->query("SELECT list_name FROM list WHERE id = {$campaign['list_id']}")->fetch_assoc(); ?> <!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> <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.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="../inc/style.css" /> <link rel="stylesheet" href="../inc/genai_style.css" /> <script src="https://code.jquery.com/jquery-3.6.0.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.8.0/Chart.min.js" crossorigin="anonymous"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/html2canvas/1.4.1/html2canvas.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/chartjs-plugin-datalabels/2.0.0/chartjs-plugin-datalabels.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.8.0/Chart.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/chartjs-plugin-datalabels/0.7.0/chartjs-plugin-datalabels.min.js"></script> <style> .chart-container { display: flex; justify-content: space-between; height: 300px; /* Same height for both charts */ } .chart { width: 48%; } .bar-chart-container { height: 300px; } h2 { margin-bottom: 20px; font-size: 24px; font-weight: bold; color: #333; } p { margin-bottom: 5px; color: #555; } .btn-secondary { margin-right: 10px; } .legend { display: flex; justify-content: center; margin-top: 10px; } .legend-item { display: flex; align-items: center; margin-right: 15px; } .legend-dot { width: 10px; height: 10px; border-radius: 50%; margin-right: 5px; } </style> <link href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-icons/1.10.5/font/bootstrap-icons.min.css" rel="stylesheet"> </head> <body class="sb-nav-fixed"> <?php include "navbar.php"; ?> <div id="layoutSidenav"> <?php include 'sidebar.php'; ?> <div id="layoutSidenav_content"> <main> <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;"> <h2>Campaign Details: <?= htmlspecialchars($campaign['campaign_name']) ?></h2> <button onclick="downloadPageImage()" class="btn btn-secondary">Download Report as Image</button> <a href="createList.php" class="btn btn-primary" style="background-color: #007bff; border-color: #007bff;"> <i class="bi bi-arrow-left"></i> Back </a> </li> </ol> <hr /> <div class="mt-4"> <h4>Send Report Image via Email</h4> <input type="email" id="emailInput" class="form-control" placeholder="Enter recipient's email" required> <div class="mt-3"> <label for="imageUpload" class="form-label">Select an Image:</label> <input type="file" id="imageUpload" class="form-control" accept="image/*" required> </div> <div class="mt-3"> <button onclick="sendSelectedImage()" class="btn btn-primary">Send Report</button> </div> </div> <br> <div id="specificContent"> <p><strong>Campaign Name: </strong><?= htmlspecialchars($campaign['campaign_name']) ?></p> <p><strong>Action:</strong> <?= htmlspecialchars($campaign['action']) ?></p> <p><strong>List Name:</strong> <?= htmlspecialchars($list['list_name']) ?></p> <p><strong>Sent Date:</strong> <?= htmlspecialchars($campaign['sent_date']) ?></p> <div class="chart-container"> <!-- Pie Chart --> <div class="chart"> <canvas id="deliveriesBouncesChart"></canvas> </div> <!-- Bar Chart --> <div class="chart"> <canvas id="horizontalBarChart"></canvas> <div class="legend"> <div class="legend-item"> <div class="legend-dot" style="background-color: #4caf50;"></div> Delivered </div> <div class="legend-item"> <div class="legend-dot" style="background-color: #f44336;"></div> Bounces </div> <div class="legend-item"> <div class="legend-dot" style="background-color: #3f51b5;"></div> Unique Opens </div> <div class="legend-item"> <div class="legend-dot" style="background-color: #ff9800;"></div> Unique Clicks </div> </div> </div> </div> </div> </div> </div> </main> </div> </div> <script> document.addEventListener('DOMContentLoaded', function() { const deliveries = <?= $campaignData['deliveries'] ?>; const bounces = <?= $campaignData['bounces'] ?>; const unique_opens = <?= $campaignData['unique_opens'] ?>; const unique_clicks = <?= $campaignData['unique_clicks'] ?>; // Pie Chart const deliveriesBouncesChart = new Chart(document.getElementById('deliveriesBouncesChart'), { type: 'pie', data: { labels: ['Delivered', 'Bounced', 'Unique Opens', 'Unique Clicks'], datasets: [{ data: [deliveries, bounces, unique_opens, unique_clicks], backgroundColor: ['#4caf50', '#f44336', '#3f51b5', '#ff9800'] }] }, options: { plugins: { datalabels: { display: true, color: '#fff', formatter: (value) => value, font: { weight: 'bold' } } }, title: { display: true, text: 'Deliveries vs Bounces vs Unique Opens vs Unique Clicks' }, responsive: true, maintainAspectRatio: false, }, plugins: [ChartDataLabels] }); // Horizontal Bar Chart const horizontalBarChart = new Chart(document.getElementById('horizontalBarChart'), { type: 'horizontalBar', data: { labels: ['Delivered', 'Bounces', 'Unique Opens', 'Unique Clicks'], datasets: [{ label: 'Count', data: [deliveries, bounces, unique_opens, unique_clicks], backgroundColor: ['#4caf50', '#f44336', '#3f51b5', '#ff9800'], borderWidth: 1, barThickness: 20 }] }, options: { plugins: { datalabels: { display: true, color: '#fff', formatter: (value) => value, font: { weight: 'bold' } } }, title: { display: true, text: 'Campaign Statistics' }, scales: { xAxes: [{ ticks: { beginAtZero: true } }] }, responsive: true, maintainAspectRatio: false, tooltips: { enabled: true, callbacks: { label: function(tooltipItem) { return tooltipItem.xLabel; } } } }, plugins: [ChartDataLabels] }); }); function downloadPageImage() { const content = document.getElementById('specificContent'); // Use the ID of the section you want to capture html2canvas(content).then(function(canvas) { const link = document.createElement('a'); link.href = canvas.toDataURL('image/png'); link.download = 'Campaign_Details_Page.png'; link.click(); }); } function sendSelectedImage() { const email = document.getElementById('emailInput').value; const fileInput = document.getElementById('imageUpload'); const file = fileInput.files[0]; if (!email || !file) { alert("Please provide both an email address and select an image."); return; } const formData = new FormData(); formData.append('email', email); formData.append('image', file); fetch('send_email_campaignGraph.php', { method: 'POST', body: formData }) .then(response => response.json()) .then(data => { if (data.success) { alert('Email sent successfully!'); } else { alert('Failed to send email.'); } }); } </script> </body> </html>