From e61e1c59c5a0818bd0286593259674d349866e14 Mon Sep 17 00:00:00 2001 From: Jean-Marc Pigeon Date: Mon, 22 Sep 2025 16:19:03 -0400 Subject: [PATCH] Changing background color --- www/lvlmai.php | 32 ++++++++++++-------------------- 1 file changed, 12 insertions(+), 20 deletions(-) diff --git a/www/lvlmai.php b/www/lvlmai.php index 56c52c1..6cb0dff 100644 --- a/www/lvlmai.php +++ b/www/lvlmai.php @@ -37,13 +37,18 @@ $line=""; $count=$offset+1; foreach($actions as $action) { $info=substr($action['info'],3,1); - //if ($info=="-") - // continue; - $bgcolor="white"; - if ($count & 1 ) { - $bgcolor="green"; - } $status=$action['status']; + switch ($status) { + case 250 : + $bgcolor="#90EE90"; //light green + break; + case 555 : + $bgcolor="#D3D3D3"; //light gray + break; + default : + $bgcolor="yellow"; + break; + } $date=$action['creation']; $reverse=$action['reverse']; $smtpfrom=$action['smtpfrom']; @@ -53,7 +58,7 @@ foreach($actions as $action) { if (($subject==NULL) || (strlen($subject)==0)) $subject=htmlspecialchars($action['info'],ENT_QUOTES); //generating the table contents - $line=$line."\r\n"; + $line=$line."\r\n"; $line=$line."$count $status\r\n"; $line=$line."$date\r\n"; $line=$line."$reverse\r\n"; @@ -73,19 +78,6 @@ $STR = << -.table-userlist tr:nth-child(odd) - { - background-color: #66ff99; /*light green */ - color: black ; - } - -.table-userlist tr:nth-child(even) - { - background-color: white; - color: black ; - } -
-- 2.47.3