added option to have no sorting (click on icon beside date)
[squirrelmail.git] / functions / mailbox_display.php
CommitLineData
59177427 1<?php
7c1b84d9 2
3302d0d4 3 /**
a09387f4 4 ** mailbox_display.php
3302d0d4 5 **
6 ** This contains functions that display mailbox information, such as the
7 ** table row that has sender, date, subject, etc...
8 **
9 **/
a4c2cd49 10
266fe275 11 $mailbox_display_php = true;
d068c0ec 12
1809bad8 13 function printMessageInfo($imapConnection, $t, $i, $key, $mailbox, $sort, $startMessage, $where, $what) {
af9404d7 14 global $color, $msgs, $msort;
f9b3e5d9 15 global $sent_folder;
9d157cec 16 global $message_highlight_list;
8e265988 17 global $index_order;
cbdc5621 18
0d455368 19 $msg = $msgs[$key];
d92b6f31 20
c36ed9cf 21 $senderName = sqimap_find_displayable_name($msg["FROM"]);
05207a68 22 $urlMailbox = urlencode($mailbox);
7aaa81fc 23 $subject = trim($msg["SUBJECT"]);
8fca0a65 24 if ($subject == "")
25 $subject = _("(no subject)");
26
926da13e 27 echo "<TR>\n";
7151188f 28
29 if ($msg["FLAG_FLAGGED"] == true) { $flag = "<font color=$color[2]>"; $flag_end = "</font>"; }
30 if ($msg["FLAG_SEEN"] == false) { $bold = "<b>"; $bold_end = "</b>"; }
0d455368 31 if ($mailbox == $sent_folder) { $italic = "<i>"; $italic_end = "</i>"; }
7151188f 32
9d157cec 33 for ($i=0; $i < count($message_highlight_list); $i++) {
d059be8f 34 if (trim($message_highlight_list[$i]["value"]) != "") {
35 if ($message_highlight_list[$i]["match_type"] == "to_cc") {
a2790a61 36 if (strpos("^^".strtolower($msg["TO"]), strtolower($message_highlight_list[$i]["value"])) || strpos("^^".strtolower($msg["CC"]), strtolower($message_highlight_list[$i]["value"]))) {
d059be8f 37 $hlt_color = $message_highlight_list[$i]["color"];
38 continue;
39 }
a2790a61 40 } else if (strpos("^^".strtolower($msg[strtoupper($message_highlight_list[$i]["match_type"])]),strtolower($message_highlight_list[$i]["value"]))) {
1195c340 41 $hlt_color = $message_highlight_list[$i]["color"];
42 continue;
d059be8f 43 }
44 }
9d157cec 45 }
623332f3 46
9d157cec 47 if (!$hlt_color)
48 $hlt_color = $color[4];
1809bad8 49
50 if ($where && $what) {
51 $search_stuff = "&where=".urlencode($where)."&what=".urlencode($what);
52 }
d76f6440 53
8e265988 54 for ($i=1; $i <= count($index_order); $i++) {
55 switch ($index_order[$i]) {
56 case 1: # checkbox
57 echo " <td width=1% bgcolor=$hlt_color align=center><input type=checkbox name=\"msg[$t]\" value=".$msg["ID"]."$checked></TD>\n";
58 break;
59 case 2: # from
60 echo " <td width=30% bgcolor=$hlt_color>$italic$bold$flag$senderName$flag_end$bold_end$italic_end</td>\n";
61 break;
62 case 3: # date
63 echo " <td nowrap width=1% bgcolor=$hlt_color><center>$bold$flag".$msg["DATE_STRING"]."$flag_end$bold_end</center></td>\n";
64 break;
65 case 4: # subject
66 echo " <td bgcolor=$hlt_color>$bold<a href=\"read_body.php?mailbox=$urlMailbox&passed_id=".$msg["ID"]."&startMessage=$startMessage&show_more=0$search_stuff\">$flag$subject$flag_end</a>$bold_end</td>\n";
67 break;
68 case 5: # flags
9db5f5fc 69 $stuff = false;
fd0a282a 70 echo " <td bgcolor=$hlt_color width=1% nowrap><b><small>\n";
9db5f5fc 71 if ($msg["FLAG_ANSWERED"] == true) {
72 echo "A\n";
73 $stuff = true;
74 }
75 if ($msg["TYPE0"] == "multipart") {
76 echo "+\n";
77 $stuff = true;
78 }
79 if (ereg("(1|2)",substr($msg["PRIORITY"],0,1))) {
80 echo "<font color=$color[1]>!</font>\n";
81 $stuff = true;
82 }
f9b3e5d9 83 if ($msg["FLAG_DELETED"]) {
84 echo "<font color=\"$color[1]\">D</font>\n";
85 $stuff = true;
86 }
87
9db5f5fc 88 if (!$stuff) echo "&nbsp;\n";
89 echo "</small></b></td>\n";
8e265988 90 break;
91 case 6: # size
6e7468f6 92 echo " <td bgcolor=$hlt_color width=1%>$bold".show_readable_size($msg['SIZE'])."$bold_end</td>\n";
8e265988 93 break;
94 }
95 }
96
7151188f 97
98 echo "</tr>\n";
926da13e 99 }
100
101 /**
102 ** This function loops through a group of messages in the mailbox and shows them
103 **/
5b6ae78a 104 function showMessagesForMailbox($imapConnection, $mailbox, $numMessages, $startMessage, $sort, $color,$show_num, $use_cache) {
105 global $msgs, $msort;
f9b3e5d9 106 global $sent_folder;
9d157cec 107 global $message_highlight_list;
a3432f47 108 global $auto_expunge;
109
0d455368 110 sqimap_mailbox_expunge($imapConnection, $mailbox);
111 sqimap_mailbox_select($imapConnection, $mailbox);
61a4ac35 112
5b6ae78a 113 if (!$use_cache) {
0d455368 114 // if it's sorted
5b6ae78a 115 if ($numMessages >= 1) {
0d455368 116 if ($sort < 6) {
117 for ($q = 0; $q < $numMessages; $q++) {
118 if($mailbox == $sent_folder)
119 $hdr = sqimap_get_small_header ($imapConnection, $q+1, true);
120 else
121 $hdr = sqimap_get_small_header ($imapConnection, $q+1, false);
122
123 $from[$q] = $hdr->from;
124 $date[$q] = $hdr->date;
125 $subject[$q] = $hdr->subject;
126 $to[$q] = $hdr->to;
127 $priority[$q] = $hdr->priority;
128 $cc[$q] = $hdr->cc;
129 $size[$q] = $hdr->size;
130 $type[$q] = $hdr->type0;
131 $flags[$q] = sqimap_get_flags ($imapConnection, $q+1);
132 }
133 } else {
134 // if it's not sorted
135 if ($startMessage + ($show_num - 1) < $numMessages) {
136 $endMessage = $startMessage + ($show_num-1);
137 } else {
138 $endMessage = $numMessages;
139 }
140
141 if ($endMessage < $startMessage) {
142 $startMessage = $startMessage - $show_num;
143 if ($startMessage < 1)
144 $startMessage = 1;
145 }
146
147 $j = $startMessage - 1;;
148 echo $startMessage . " - " . $endMessage . "<br>";
149 for ($q = $startMessage; $q <= $endMessage; $q++) {
150 if($mailbox == $sent_folder)
151 $hdr = sqimap_get_small_header ($imapConnection, $q, true);
152 else
153 $hdr = sqimap_get_small_header ($imapConnection, $q, false);
154
155 $from[$j] = $hdr->from;
156 $date[$j] = $hdr->date;
157 $subject[$j] = $hdr->subject;
158 $to[$j] = $hdr->to;
159 $priority[$j] = $hdr->priority;
160 $cc[$j] = $hdr->cc;
161 $size[$j] = $hdr->size;
162 $type[$j] = $hdr->type0;
163 $flags[$j] = sqimap_get_flags ($imapConnection, $q);
164 $j++;
165 }
166 }
5b6ae78a 167 }
168
169 $j = 0;
0d455368 170 if ($sort == 6) {
171 $end = $startMessage + $show_num - 1;
172 } else {
173 $end = $numMessages;
174 }
175 while ($j < $end) {
5b6ae78a 176 $date[$j] = ereg_replace(" ", " ", $date[$j]);
177 $tmpdate = explode(" ", trim($date[$j]));
0d455368 178
5b6ae78a 179 $messages[$j]["TIME_STAMP"] = getTimeStamp($tmpdate);
180 $messages[$j]["DATE_STRING"] = getDateString($messages[$j]["TIME_STAMP"]);
181 $messages[$j]["ID"] = $j+1;
182 $messages[$j]["FROM"] = decodeHeader($from[$j]);
e9f8ea4e 183 $messages[$j]["FROM-SORT"] = strtolower(sqimap_find_displayable_name(decodeHeader($from[$j])));
5b6ae78a 184 $messages[$j]["SUBJECT"] = decodeHeader($subject[$j]);
e9f8ea4e 185 $messages[$j]["SUBJECT-SORT"] = strtolower(decodeHeader($subject[$j]));
3e69e88b 186 $messages[$j]["TO"] = decodeHeader($to[$j]);
0d455368 187 $messages[$j]["PRIORITY"] = $priority[$j];
1195c340 188 $messages[$j]["CC"] = $cc[$j];
fde32e3f 189 $messages[$j]["SIZE"] = $size[$j];
9db5f5fc 190 $messages[$j]["TYPE0"] = $type[$j];
e9f8ea4e 191
192 # fix SUBJECT-SORT to remove Re:
0d455368 193 $re_abbr = # Add more here!
194 "vedr|sv|" . # Danish
195 "re|aw"; # English
196 if (eregi("^($re_abbr):[ ]*(.*)$", $messages[$j]['SUBJECT-SORT'], $regs))
197 $messages[$j]['SUBJECT-SORT'] = $regs[2];
5b6ae78a 198
199 $num = 0;
200 while ($num < count($flags[$j])) {
201 if ($flags[$j][$num] == "Deleted") {
202 $messages[$j]["FLAG_DELETED"] = true;
203 }
f9b3e5d9 204 elseif ($flags[$j][$num] == "Answered") {
5b6ae78a 205 $messages[$j]["FLAG_ANSWERED"] = true;
206 }
f9b3e5d9 207 elseif ($flags[$j][$num] == "Seen") {
5b6ae78a 208 $messages[$j]["FLAG_SEEN"] = true;
209 }
f9b3e5d9 210 elseif ($flags[$j][$num] == "Flagged") {
5b6ae78a 211 $messages[$j]["FLAG_FLAGGED"] = true;
212 }
213 $num++;
7151188f 214 }
5b6ae78a 215 $j++;
3302d0d4 216 }
f9b3e5d9 217
218 /* Only ignore messages flagged as deleted if we are using a
219 * trash folder or auto_expunge */
0d455368 220 if (($move_to_trash || $auto_expunge) && $sort != 6)
f9b3e5d9 221 {
222 /** Find and remove the ones that are deleted */
223 $i = 0;
224 $j = 0;
225 while ($j < $numMessages) {
226 if ($messages[$j]["FLAG_DELETED"] == true) {
227 $j++;
228 continue;
229 }
230 $msgs[$i] = $messages[$j];
231
232 $i++;
5b6ae78a 233 $j++;
5b6ae78a 234 }
f9b3e5d9 235 $numMessages = $i;
0d455368 236 } else {
237 $msgs = $messages;
5b10f02a 238 }
5b6ae78a 239 }
926da13e 240
4c2d69ac 241 // There's gotta be messages in the array for it to sort them.
f9b3e5d9 242 if ($numMessages > 0 && ! $use_cache) {
0e919368 243 /** 0 = Date (up) 4 = Subject (up)
244 ** 1 = Date (dn) 5 = Subject (dn)
245 ** 2 = Name (up)
246 ** 3 = Name (dn)
247 **/
09856735 248 session_unregister("msgs");
1c292c82 249 if (($sort == 0) || ($sort == 1))
250 $msort = array_cleave ($msgs, "TIME_STAMP");
251 if (($sort == 2) || ($sort == 3))
e9f8ea4e 252 $msort = array_cleave ($msgs, "FROM-SORT");
1c292c82 253 if (($sort == 4) || ($sort == 5))
e9f8ea4e 254 $msort = array_cleave ($msgs, "SUBJECT-SORT");
0d455368 255 if ($sort == 6)
256 $msort = $msgs;
257
258 if ($sort < 6) {
259 if($sort % 2) {
260 asort($msort);
261 } else {
262 arsort($msort);
263 }
0e919368 264 }
5b6ae78a 265 session_register("msort");
4c2d69ac 266 }
5b6ae78a 267 displayMessageArray($imapConnection, $numMessages, $startMessage, $msgs, $msort, $mailbox, $sort, $color,$show_num);
09856735 268 session_register("msgs");
9f2215a1 269 }
270
271 // generic function to convert the msgs array into an HTML table
5b6ae78a 272 function displayMessageArray($imapConnection, $numMessages, $startMessage, &$msgs, $msort, $mailbox, $sort, $color,$show_num) {
cbdc5621 273 global $folder_prefix, $sent_folder;
f9b3e5d9 274 global $imapServerAddress;
8e265988 275 global $index_order;
8e9e8afa 276
9f2215a1 277 // if cache isn't already set, do it now
90033b64 278 if (!session_is_registered("msgs"))
279 session_register("msgs");
5b6ae78a 280 if (!session_is_registered("msort"))
281 session_register("msort");
90033b64 282
8442ac08 283
9c83f905 284 if ($startMessage + ($show_num - 1) < $numMessages) {
285 $endMessage = $startMessage + ($show_num-1);
926da13e 286 } else {
926da13e 287 $endMessage = $numMessages;
288 }
8442ac08 289
290 if ($endMessage < $startMessage) {
291 $startMessage = $startMessage - $show_num;
292 if ($startMessage < 1)
293 $startMessage = 1;
294 }
295
9c83f905 296 $nextGroup = $startMessage + $show_num;
297 $prevGroup = $startMessage - $show_num;
20db5033 298 $urlMailbox = urlencode($mailbox);
926da13e 299
6b638171 300 do_hook("mailbox_index_before");
926da13e 301
14eb705c 302 $Message = '';
0d1b4832 303 if ($startMessage < $endMessage) {
14eb705c 304 $Message = _("Viewing messages") ." <B>$startMessage</B> ". _("to") ." <B>$endMessage</B> ($numMessages " . _("total") . ")\n";
f9b3e5d9 305 } elseif ($startMessage == $endMessage) {
14eb705c 306 $Message = _("Viewing message") ." <B>$startMessage</B> ($numMessages " . _("total") . ")\n";
0d1b4832 307 }
26b6c99c 308
14eb705c 309 $More = '';
0d455368 310 if ($sort == 6) {
311 $use = 0;
312 } else {
313 $use = 1;
314 }
5b10f02a 315 if (($nextGroup <= $numMessages) && ($prevGroup >= 0)) {
0d455368 316 $More = "<A HREF=\"right_main.php?use_mailbox_cache=$use&startMessage=$prevGroup&mailbox=$urlMailbox\" TARGET=\"right\">". _("Previous") ."</A> | \n";
317 $More .= "<A HREF=\"right_main.php?use_mailbox_cache=$use&&startMessage=$nextGroup&mailbox=$urlMailbox\" TARGET=\"right\">". _("Next") ."</A>\n";
926da13e 318 }
f9b3e5d9 319 elseif (($nextGroup > $numMessages) && ($prevGroup >= 0)) {
0d455368 320 $More = "<A HREF=\"right_main.php?use_mailbox_cache=$use&startMessage=$prevGroup&mailbox=$urlMailbox\" TARGET=\"right\">". _("Previous") ."</A> | \n";
14eb705c 321 $More .= "<FONT COLOR=\"$color[9]\">"._("Next")."</FONT>\n";
3302d0d4 322 }
f9b3e5d9 323 elseif (($nextGroup <= $numMessages) && ($prevGroup < 0)) {
14eb705c 324 $More = "<FONT COLOR=\"$color[9]\">"._("Previous")."</FONT> | \n";
0d455368 325 $More .= "<A HREF=\"right_main.php?use_mailbox_cache=$use&startMessage=$nextGroup&mailbox=$urlMailbox\" TARGET=\"right\">". _("Next") ."</A>\n";
14eb705c 326 }
327
328 mail_message_listing_beginning($imapConnection,
329 "move_messages.php?msg=$msg&mailbox=$urlMailbox&startMessage=$startMessage",
330 $mailbox, $sort, $Message, $More);
331
332
333 // loop through and display the info for each message.
334 $t = 0; // $t is used for the checkbox number
335 if ($numMessages == 0) { // if there's no messages in this folder
336 echo "<TR><TD BGCOLOR=\"$color[4]\" COLSPAN=" . count($index_order);
337 echo "><CENTER><BR><B>". _("THIS FOLDER IS EMPTY") ."</B><BR>&nbsp;</CENTER></TD></TR>";
f9b3e5d9 338 } elseif ($startMessage == $endMessage) { // if there's only one message in the box, handle it different.
14eb705c 339 $i = $startMessage;
340 reset($msort);
341 do {
342 $key = key($msort);
343 next($msort);
344 $k++;
345 } while (isset ($key) && ($k < $i));
346 printMessageInfo($imapConnection, $t, $i, $key, $mailbox, $sort, $startMessage, 0, 0);
347 } else {
348 $i = $startMessage;
349 reset($msort);
350 do {
351 $key = key($msort);
352 next($msort);
353 $k++;
354 } while (isset ($key) && ($k < $i));
355
0d455368 356 do {
14eb705c 357 printMessageInfo($imapConnection, $t, $i, $key, $mailbox, $sort, $startMessage, 0, 0);
358 $key = key($msort);
359 $t++;
360 $i++;
361 next($msort);
362 } while ($i < ($endMessage+1));
363 }
364 echo "</TABLE>";
365
366 echo "</td></tr>\n";
367
368 if ($More)
369 {
370 echo "<TR BGCOLOR=\"$color[4]\"><TD>$More</td></tr>\n";
371 }
372 echo "</table>"; /** End of message-list table */
373
374 do_hook("mailbox_index_after");
375 }
376
377 /* Displays the standard message list header.
378 * To finish the table, you need to do a "</table></table>";
379 * $moveURL is the URL to submit the delete/move form to
380 * $mailbox is the current mailbox
381 * $sort is the current sorting method (-1 for no sorting available [searches])
382 * $Message is a message that is centered on top of the list
383 * $More is a second line that is left aligned
384 */
385 function mail_message_listing_beginning($imapConnection, $moveURL,
386 $mailbox = '', $sort = -1, $Message = '', $More = '')
387 {
f9b3e5d9 388 global $color, $index_order, $auto_expunge, $move_to_trash;
14eb705c 389
390 /** This is the beginning of the message list table. It wraps around all messages */
391 echo "<TABLE WIDTH=100% BORDER=0 CELLPADDING=2 CELLSPACING=0>";
392
393 if ($Message)
394 {
395 echo "<TR BGCOLOR=\"$color[4]\"><TD align=center>$Message</td></tr>\n";
396 }
397
398 if ($More)
399 {
400 echo "<TR BGCOLOR=\"$color[4]\"><TD>$More</td></tr>\n";
926da13e 401 }
402
68347a84 403 /** The delete and move options */
f8f9bed9 404 echo "<TR><TD BGCOLOR=\"$color[0]\">";
ed4332d1 405
14eb705c 406 echo "\n\n\n<FORM name=messageList method=post action=\"$moveURL\">\n";
4f313fcf 407 echo "<TABLE BGCOLOR=\"$color[0]\" COLS=2 BORDER=0 cellpadding=0 cellspacing=0 width=100%>\n";
ed4332d1 408 echo " <TR>\n";
98fe1e9f 409 echo " <TD WIDTH=60% ALIGN=LEFT VALIGN=CENTER>\n";
aae41ae9 410 echo " <NOBR><SMALL>". _("Move selected to:") ."</SMALL>";
7ce342dc 411 echo " <TT><SMALL><SELECT NAME=\"targetMailbox\">";
412
9f2215a1 413 $boxes = sqimap_mailbox_list($imapConnection);
7ce342dc 414 for ($i = 0; $i < count($boxes); $i++) {
14eb705c 415 if ($boxes[$i]["flags"][0] != "noselect" &&
416 $boxes[$i]["flags"][1] != "noselect" &&
417 $boxes[$i]["flags"][2] != "noselect") {
418 $box = $boxes[$i]["unformatted"];
419 $box2 = replace_spaces($boxes[$i]["formatted"]);
420 echo " <OPTION VALUE=\"$box\">$box2</option>\n";
0d455368 421 }
dd88d31f 422 }
7ce342dc 423 echo " </SELECT></SMALL></TT>";
aae41ae9 424 echo " <SMALL><INPUT TYPE=SUBMIT NAME=\"moveButton\" VALUE=\"". _("Move") ."\"></SMALL></NOBR>\n";
ed4332d1 425 echo " </TD>\n";
7ce342dc 426 echo " <TD WIDTH=40% ALIGN=RIGHT>\n";
f9b3e5d9 427 if (! $move_to_trash && ! $auto_expunge) {
428 echo " <NOBR><SMALL><INPUT TYPE=SUBMIT NAME=\"expungeButton\" VALUE=\"". _("Expunge") ."\">&nbsp;". _("mailbox") ."</SMALL></NOBR>&nbsp;&nbsp;\n";
429 }
aae41ae9 430 echo " <NOBR><SMALL><INPUT TYPE=SUBMIT VALUE=\"". _("Delete") ."\">&nbsp;". _("checked messages") ."</SMALL></NOBR>\n";
14eb705c 431 echo " </TD>\n";
ed4332d1 432 echo " </TR>\n";
433
70b455e0 434 echo "</TABLE>\n";
435 do_hook("mailbox_form_before");
aa4c3749 436 echo "</TD></TR>";
437
f8f9bed9 438 echo "<TR><TD BGCOLOR=\"$color[0]\">";
98fe1e9f 439 echo "<TABLE WIDTH=100% BORDER=0 CELLPADDING=2 CELLSPACING=1 BGCOLOR=\"$color[0]\">";
f8f9bed9 440 echo "<TR BGCOLOR=\"$color[5]\" ALIGN=\"center\">";
be8e07f8 441
74bb7ddc 442 $urlMailbox=urlencode($mailbox);
443
14eb705c 444 // Print the headers
8e265988 445 for ($i=1; $i <= count($index_order); $i++) {
446 switch ($index_order[$i]) {
447 case 1: # checkbox
14eb705c 448 case 5: # flags
8e265988 449 echo " <TD WIDTH=1%><B>&nbsp;</B></TD>";
450 break;
14eb705c 451
8e265988 452 case 2: # from
14eb705c 453 if ($mailbox == $sent_folder)
454 echo " <TD WIDTH=30%><B>". _("To") ."</B>";
455 else
0d455368 456 echo " <TD WIDTH=30%><B>". _("From") ."</B>";
8e265988 457
458 if ($sort == 2)
459 echo " <A HREF=\"right_main.php?newsort=3&startMessage=1&mailbox=$urlMailbox\" TARGET=\"right\"><IMG SRC=\"../images/up_pointer.gif\" BORDER=0></A></TD>\n";
f9b3e5d9 460 elseif ($sort == 3)
8e265988 461 echo " <A HREF=\"right_main.php?newsort=2&startMessage=1&mailbox=$urlMailbox\" TARGET=\"right\"><IMG SRC=\"../images/down_pointer.gif\" BORDER=0></A></TD>\n";
f9b3e5d9 462 elseif ($sort != -1)
8e265988 463 echo " <A HREF=\"right_main.php?newsort=3&startMessage=1&mailbox=$urlMailbox\" TARGET=\"right\"><IMG SRC=\"../images/sort_none.gif\" BORDER=0></A></TD>\n";
464 break;
14eb705c 465
8e265988 466 case 3: # date
467 echo " <TD nowrap WIDTH=1%><B>". _("Date") ."</B>";
468 if ($sort == 0)
469 echo " <A HREF=\"right_main.php?newsort=1&startMessage=1&mailbox=$urlMailbox\" TARGET=\"right\"><IMG SRC=\"../images/up_pointer.gif\" BORDER=0></A></TD>\n";
f9b3e5d9 470 elseif ($sort == 1)
0d455368 471 echo " <A HREF=\"right_main.php?newsort=6&startMessage=1&mailbox=$urlMailbox\" TARGET=\"right\"><IMG SRC=\"../images/down_pointer.gif\" BORDER=0></A></TD>\n";
472 elseif ($sort == 6)
473 echo " <A HREF=\"right_main.php?newsort=0&startMessage=1&mailbox=$urlMailbox\" TARGET=\"right\"><IMG SRC=\"../images/sort_none.gif\" BORDER=0></A></TD>\n";
f9b3e5d9 474 elseif ($sort != -1)
8e265988 475 echo " <A HREF=\"right_main.php?newsort=0&startMessage=1&mailbox=$urlMailbox\" TARGET=\"right\"><IMG SRC=\"../images/sort_none.gif\" BORDER=0></A></TD>\n";
476 break;
14eb705c 477
8e265988 478 case 4: # subject
479 echo " <TD WIDTH=%><B>". _("Subject") ."</B>\n";
480 if ($sort == 4)
481 echo " <A HREF=\"right_main.php?newsort=5&startMessage=1&mailbox=$urlMailbox\" TARGET=\"right\"><IMG SRC=\"../images/up_pointer.gif\" BORDER=0></A></TD>\n";
f9b3e5d9 482 elseif ($sort == 5)
8e265988 483 echo " <A HREF=\"right_main.php?newsort=4&startMessage=1&mailbox=$urlMailbox\" TARGET=\"right\"><IMG SRC=\"../images/down_pointer.gif\" BORDER=0></A></TD>\n";
f9b3e5d9 484 elseif ($sort != -1)
8e265988 485 echo " <A HREF=\"right_main.php?newsort=5&startMessage=1&mailbox=$urlMailbox\" TARGET=\"right\"><IMG SRC=\"../images/sort_none.gif\" BORDER=0></A></TD>\n";
486 break;
14eb705c 487
8e265988 488 case 6: # size
fde32e3f 489 echo " <TD WIDTH=1%><b>" . _("Size")."</b></TD>\n";
8e265988 490 break;
491 }
492 }
14eb705c 493 echo "</TR>\n";
3302d0d4 494 }
26b6c99c 495?>