diff --git a/charity-settings.php b/charity-settings.php
index 60f6533..62354a6 100644
--- a/charity-settings.php
+++ b/charity-settings.php
@@ -1,6 +1,6 @@
fetchColumn();
$total_pages = ceil($total_records / $limit);
// Fetch paginated results
-$query = "SELECT m.*, s.name as status_name, s.color as status_color, u.full_name as assigned_to_name
+$query = "SELECT m.*, s.name as status_name, s.color as status_color, u.full_name as assigned_to_name,
+ (SELECT GROUP_CONCAT(display_name SEPARATOR '|||') FROM inbound_attachments WHERE mail_id = m.id) as attachment_names
FROM inbound_mail m
LEFT JOIN mailbox_statuses s ON m.status_id = s.id
LEFT JOIN users u ON m.assigned_to = u.id
@@ -214,7 +215,7 @@ $users_list = db()->query("SELECT id, full_name FROM users ORDER BY full_name")-
$deepLinkData = null;
if (isset($_GET['action']) && $_GET['action'] === 'edit' && isset($_GET['id'])) {
if (canEdit('inbound')) {
- $stmt = db()->prepare("SELECT * FROM inbound_mail WHERE id = ? ");
+ $stmt = db()->prepare("SELECT m.*, (SELECT GROUP_CONCAT(display_name SEPARATOR '|||') FROM inbound_attachments WHERE mail_id = m.id) as attachment_names FROM inbound_mail m WHERE m.id = ? ");
$stmt->execute([$_GET['id']]);
$deepLinkData = $stmt->fetch();
}
@@ -289,6 +290,7 @@ function getStatusBadgeInList($mail) {
الموعد النهائي
الموضوع
المرسل
+
المرفقات
المسؤول
الحالة
الإجراءات
@@ -313,6 +315,13 @@ function getStatusBadgeInList($mail) {
@@ -138,7 +147,7 @@ function getStatusBadgeInternal($mail) {
-
+
لا توجد رسائل واردة حالياً
diff --git a/internal_outbox.php b/internal_outbox.php
index 074ce8d..040967f 100644
--- a/internal_outbox.php
+++ b/internal_outbox.php
@@ -1,6 +1,6 @@
fetchColumn();
$total_pages = ceil($total_records / $limit);
// Fetch messages
-$query = "SELECT m.*, u_recp.full_name as recipient_name, u_recp.profile_image as recipient_image, s.name as status_name, s.color as status_color
+$query = "SELECT m.*, u_recp.full_name as recipient_name, u_recp.profile_image as recipient_image, s.name as status_name, s.color as status_color,
+ (SELECT GROUP_CONCAT(display_name SEPARATOR ', ') FROM internal_attachments WHERE mail_id = m.id) as attachment_names
FROM internal_mail m
LEFT JOIN users u_recp ON m.assigned_to = u_recp.id
LEFT JOIN mailbox_statuses s ON m.status_id = s.id
@@ -202,6 +203,7 @@ function getStatusBadgeInternal($mail) {
@@ -240,7 +249,7 @@ function getStatusBadgeInternal($mail) {
-
+
لم يتم إرسال أي رسائل حالياً
@@ -296,7 +305,7 @@ function getStatusBadgeInternal($mail) {
-
+
diff --git a/mail/MailService.php b/m_services/MailService.php
similarity index 100%
rename from mail/MailService.php
rename to m_services/MailService.php
diff --git a/mail/config.php b/m_services/config.php
similarity index 100%
rename from mail/config.php
rename to m_services/config.php
diff --git a/mail/index.php b/m_services/index.php
similarity index 100%
rename from mail/index.php
rename to m_services/index.php
diff --git a/mail/install.php b/m_services/install.php
similarity index 100%
rename from mail/install.php
rename to m_services/install.php
diff --git a/outbound.php b/outbound.php
index 11525fc..f61d506 100644
--- a/outbound.php
+++ b/outbound.php
@@ -1,6 +1,6 @@
fetchColumn();
$total_pages = ceil($total_records / $limit);
// Fetch paginated results
-$query = "SELECT m.*, s.name as status_name, s.color as status_color, u.full_name as assigned_to_name
+$query = "SELECT m.*, s.name as status_name, s.color as status_color, u.full_name as assigned_to_name,
+ (SELECT GROUP_CONCAT(display_name SEPARATOR '|||') FROM outbound_attachments WHERE mail_id = m.id) as attachment_names
FROM outbound_mail m
LEFT JOIN mailbox_statuses s ON m.status_id = s.id
LEFT JOIN users u ON m.assigned_to = u.id
@@ -227,7 +228,7 @@ $users_list = db()->query("SELECT id, full_name FROM users ORDER BY full_name")-
$deepLinkData = null;
if (isset($_GET['action']) && $_GET['action'] === 'edit' && isset($_GET['id'])) {
if (canEdit('outbound')) {
- $stmt = db()->prepare("SELECT * FROM outbound_mail WHERE id = ? ");
+ $stmt = db()->prepare("SELECT m.*, (SELECT GROUP_CONCAT(display_name SEPARATOR '|||') FROM outbound_attachments WHERE mail_id = m.id) as attachment_names FROM outbound_mail m WHERE m.id = ? ");
$stmt->execute([$_GET['id']]);
$deepLinkData = $stmt->fetch();
}
@@ -302,6 +303,7 @@ function getStatusBadgeInList($mail) {
الموعد النهائي
الموضوع
المستلم
+
المرفقات
المسؤول
الحالة
الإجراءات
@@ -326,6 +328,13 @@ function getStatusBadgeInList($mail) {