From: Jean-Marc Pigeon Date: Mon, 22 Sep 2025 20:19:03 +0000 (-0400) Subject: Changing background color X-Git-Tag: tag-0.17~57 X-Git-Url: https://jmp-git.ovh.safe.ca/?a=commitdiff_plain;h=e61e1c59c5a0818bd0286593259674d349866e14;p=jmp%2Fmailleur Changing background color --- 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 ; - } -