diff --git a/dashboard_financial.php b/dashboard_financial.php
index 7c2c99a7..2cd0c00f 100644
--- a/dashboard_financial.php
+++ b/dashboard_financial.php
@@ -1,7 +1,7 @@
+
+
+
+
-
-
@@ -493,6 +510,161 @@ $vendors_added = intval($row['vendors_added']);
+
+
+
+
+ CURRENT_DATE
+ AND domain_expire < CURRENT_DATE + INTERVAL 30 DAY
+ AND domain_archived_at IS NULL"
+));
+$expiring_domains = $sql_domains_expiring['expiring_domains'];
+
+// Expiring Certificates (but not ones that have already expired)
+$sql_certs_expiring = mysqli_fetch_assoc(mysqli_query(
+ $mysqli,
+ "SELECT COUNT('certificate_id') as expiring_certs
+ FROM certificates
+ WHERE certificate_expire IS NOT NULL
+ AND certificate_expire > CURRENT_DATE
+ AND certificate_expire < CURRENT_DATE + INTERVAL 30 DAY
+ AND certificate_archived_at IS NULL"
+));
+$expiring_certificates = $sql_certs_expiring['expiring_certs'];
+
+?>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/functions.php b/functions.php
index a607e679..47bea8a0 100644
--- a/functions.php
+++ b/functions.php
@@ -879,8 +879,8 @@ function addToMailQueue($mysqli, $data) {
$config_invoice_from_name = strval(getSettingValue($mysqli, 'config_invoice_from_name'));
foreach ($data as $email) {
- $recipient = strval($email['email']);
- $recipient_name = strval($email['name']);
+ $recipient = strval($email['recipient']);
+ $recipient_name = strval($email['recipient_name']);
$subject = strval($email['subject']);
$body = strval($email['body']);
diff --git a/post/invoice.php b/post/invoice.php
index b091c19e..50da20fe 100644
--- a/post/invoice.php
+++ b/post/invoice.php
@@ -1002,8 +1002,8 @@ if (isset($_GET['email_invoice'])) {
// Queue Mail
$data = [
[
- 'email' => $contact_email_escaped,
- 'name' => $contact_name_escaped,
+ 'recipient' => $contact_email_escaped,
+ 'recipient_name' => $contact_name_escaped,
'subject' => $subject,
'body' => $body
]
@@ -1043,8 +1043,8 @@ if (isset($_GET['email_invoice'])) {
$data = [
[
- 'email' => $billing_contact_email,
- 'name' => $billing_contact_name,
+ 'recipient' => $billing_contact_email,
+ 'recipient_name' => $billing_contact_name,
'subject' => $subject,
'body' => $body
]
@@ -1172,8 +1172,8 @@ if (isset($_GET['force_recurring'])) {
$data = [
[
- 'email' => $contact_email,
- 'name' => $contact_name,
+ 'recipient' => $contact_email,
+ 'recipient_name' => $contact_name,
'subject' => $subject,
'body' => $body
]
diff --git a/post/ticket.php b/post/ticket.php
index 1ac04b7b..c4fe1571 100644
--- a/post/ticket.php
+++ b/post/ticket.php
@@ -119,12 +119,13 @@ if (isset($_POST['add_ticket'])) {
// Email Ticket Contact
// Queue Mail
- $data = [];
- $data[] = [
- 'recipient' => $contact_email_escaped,
- 'recipient_name' => $contact_name_escaped,
- 'subject' => $subject_escaped,
- 'body' => $body_escaped,
+ $data = [
+ [
+ 'recipient' => $contact_email_escaped,
+ 'recipient_name' => $contact_name_escaped,
+ 'subject' => $subject_escaped,
+ 'body' => $body_escaped,
+ ]
];
// Also Email all the watchers
@@ -134,11 +135,13 @@ if (isset($_POST['add_ticket'])) {
$watcher_email_escaped = sanitizeInput($row['watcher_email']);
// Queue Mail
- $data[] = [
- 'recipient' => $watcher_email_escaped,
- 'recipient_name' => $watcher_email_escaped,
- 'subject' => $subject_escaped,
- 'body' => $body_escaped,
+ $data = [
+ [
+ 'recipient' => $watcher_email_escaped,
+ 'recipient_name' => $watcher_email_escaped,
+ 'subject' => $subject_escaped,
+ 'body' => $body_escaped,
+ ]
];
}
addToMailQueue($mysqli, $data);