";
- echo "";
- echo "";
-
- $urlMailbox=urlencode($mailbox);
-
- // Print the headers
- for ($i=1; $i <= count($index_order); $i++) {
- switch ($index_order[$i]) {
- case 1: # checkbox
- case 5: # flags
- echo ' | ';
- break;
-
- case 2: # from
- if ($mailbox == $sent_folder)
- echo ' '. _("To") .'';
- else
- echo ' | '. _("From") .'';
-
- if ($sort == 2)
- echo " ![](\"../images/up_pointer.gif\") | \n";
- elseif ($sort == 3)
- echo " \n";
- elseif ($sort != -1)
- echo " \n";
- echo "";
- break;
-
- case 3: # date
- echo ' '. _("Date") .'';
- if ($sort == 0)
- echo " ![](\"../images/up_pointer.gif\") | \n";
- elseif ($sort == 1)
- echo " \n";
- elseif ($sort == 6)
- echo " \n";
- elseif ($sort != -1)
- echo " \n";
- echo '';
- break;
-
- case 4: # subject
- echo ' '. _("Subject") ."\n";
- if ($sort == 4)
- echo " ![](\"../images/up_pointer.gif\") | \n";
- elseif ($sort == 5)
- echo " \n";
- elseif ($sort != -1)
- echo " \n";
- echo "";
- break;
-
- case 6: # size
- echo ' ' . _("Size")." | \n";
- break;
- }
- }
- echo " \n";
- }
-
- function ShowSelectAllLink($startMessage, $sort)
- {
- global $checkall, $PHP_SELF, $what, $where, $mailbox;
-
- echo "\n";
- if (isset($checkall) && $checkall == '1')
- echo _("Unselect All");
- else
- echo _("Select All");
- echo "\n";
- }
-
- function processSubject($subject)
- {
- // Shouldn't ever happen -- caught too many times in the IMAP functions
- if ($subject == '')
- return _("(no subject)");
-
- if (strlen($subject) <= 55)
- return $subject;
-
- $ent_strlen=strlen($subject);
- $trim_val=50;
- $ent_offset=0;
- // see if this is entities-encoded string
- // If so, Iterate through the whole string, find out
- // the real number of characters, and if more
- // than 55, substr with an updated trim value.
- while (($ent_loc = strpos($subject, '&', $ent_offset)) !== false &&
- ($ent_loc_end = strpos($subject, ';', $ent_loc)) !== false)
- {
- $trim_val += ($ent_loc_end-$ent_loc)+1;
- $ent_strlen -= $ent_loc_end-$ent_loc;
- $ent_offset = $ent_loc_end+1;
- }
-
- if ($ent_strlen <= 55)
- return $subject;
-
- return substr($subject, 0, $trim_val) . '...';
- }
+ $safe_name = preg_replace("/[^0-9A-Za-z_]/", '_', $aMailbox['NAME']);
+ $form_name = "FormMsgs" . $safe_name;
+
+ echo ' |