Adds message flag usage.. messages are bold if unread, not shown if deleted.
authorlkehresman <lkehresman@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Tue, 22 Feb 2000 12:06:33 +0000 (12:06 +0000)
committerlkehresman <lkehresman@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Tue, 22 Feb 2000 12:06:33 +0000 (12:06 +0000)
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@234 7612ce4b-ef26-0410-bec9-ea0150e637f0

functions/imap_messages.php

index dbbdcce..adc170e 100755 (executable)
    /******************************************************************************
     **  Returns the flags for the specified messages 
     ******************************************************************************/
-   function sqimap_get_flags () {
+   function sqimap_get_flags ($imap_stream, $start, $end) {
+      fputs ($imap_stream, "a001 FETCH $start:$end FLAGS\n");
+      $read = sqimap_read_data ($imap_stream, "a001", true, $response, $message);
+      $i = 0;
+      while ($i < count($read)) {
+         if (strpos($read[$i], "FLAGS")) {
+            $tmp = ereg_replace("\(", "", $read[$i]);
+            $tmp = ereg_replace("\)", "", $tmp);
+            $tmp = str_replace("\\", "", $tmp);
+            $tmp = substr($tmp, strpos($tmp, "FLAGS")+6, strlen($tmp));
+            $tmp = trim($tmp);
+            $flags[$i] = explode(" ", $tmp);
+         } else {
+            $flags[$i][0] = "None";
+         }
+         $i++;
+      }
+      return $flags;
    }
 
    /******************************************************************************