]> SAFE projects GIT repository - jmp/mailleur/commitdiff
Working on lvlmai.php table color
authorJean-Marc Pigeon <jmp@safe.c>
Mon, 22 Sep 2025 20:34:35 +0000 (16:34 -0400)
committerJean-Marc Pigeon <jmp@safe.c>
Mon, 22 Sep 2025 20:34:35 +0000 (16:34 -0400)
www/lvlmai.php

index 6cb0dfff1d576c92b77b84c428f4ae8948fbe346..c72aa9719ae5ab7e84eb7256557d53508c3a0bb9 100644 (file)
@@ -38,10 +38,17 @@ $count=$offset+1;
 foreach($actions as $action) {
   $info=substr($action['info'],3,1);
   $status=$action['status'];
+  $subject=htmlspecialchars($action['subject'],ENT_QUOTES);
+  if (($subject==NULL) || (strlen($subject)==0)) 
+    $subject=htmlspecialchars($action['info'],ENT_QUOTES);
   switch ($status) {
     case 250    :
       $bgcolor="#90EE90";       //light green
       break;
+    case 460    :
+      $bgcolor="#ff6666";       //light red
+      $subject=htmlspecialchars($action['info'],ENT_QUOTES);
+      break;
     case 555    :
       $bgcolor="#D3D3D3";       //light gray
       break;
@@ -54,9 +61,6 @@ foreach($actions as $action) {
   $smtpfrom=$action['smtpfrom'];
   $recipient=$action['rcptto'];
   $emailfrom=htmlspecialchars($action['emailfrom'],ENT_QUOTES);
-  $subject=$action['subject'];
-  if (($subject==NULL) || (strlen($subject)==0)) 
-    $subject=htmlspecialchars($action['info'],ENT_QUOTES);
   //generating the table contents
   $line=$line."<TR bgcolor=\"$bgcolor\">\r\n";
   $line=$line."<TD align=left>$count $status</TD>\r\n";