From f27cca08ff786ceff1870147f6d6bad14d71117f Mon Sep 17 00:00:00 2001 From: polo Date: Fri, 23 Oct 2026 00:47:32 +0200 Subject: =?UTF-8?q?dossiers=20avec=20majuscule,=20namespace=20pour=20toute?= =?UTF-8?q?s=20les=20classes,=20autoload=20psr-4,=20UserDataService::creat?= =?UTF-8?q?eZip=20d=C3=A9plac=C3=A9=20dans=20Backup?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/View/ShowEmailsBuilder.php | 71 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 src/View/ShowEmailsBuilder.php (limited to 'src/View/ShowEmailsBuilder.php') diff --git a/src/View/ShowEmailsBuilder.php b/src/View/ShowEmailsBuilder.php new file mode 100644 index 0000000..b02174d --- /dev/null +++ b/src/View/ShowEmailsBuilder.php @@ -0,0 +1,71 @@ +getName() . '.php'; + if(file_exists($viewFile)) + { + // objets Email groupés par destinataire + $emails_by_recipient = []; + foreach($node->getNodeData()->getEmails() as $email){ + $recipient = $email->getRecipient(); + $emails_by_recipient[$recipient][] = $email; + } + + // affiche une table par destinataire + $emails = ''; + foreach($emails_by_recipient as $recipient => $emails_list){ + $html = '

Destinataire: ' . $recipient . '

+ + + + + + + + + + + + + '; + + // insère les données + foreach($emails_list as $email){ + $html .= ' + + + + + + + + '; + } + + $html .= ' +
ExpéditeurAdresseContenuDateEffacement prévu leSensible
' . htmlspecialchars($email->getSenderName()) . '' . htmlspecialchars($email->getSenderAddress()) . '' . htmlspecialchars($email->getContent()) . '' . $email->getDateTime()->format('d/m/Y') . '' . $email->getDeletionDate()->format('d/m/Y') . 'isSensitive() ? 'checked' : '') . ' onclick="toggleSensitiveEmail(' . $email->getId() . ')">
'; + $emails .= $html; + } + + ob_start(); + require $viewFile; // insertion de $this->html généré par unfoldMenu + $this->html = ob_get_clean(); // pas de concaténation .= cette fois on écrase + } + else{ + header('Location: ' . new URL(['error' => 'show_emails_view_not_found'])); + die; + } + } +} \ No newline at end of file -- cgit v1.2.3