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 | |
af9404d7 |
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>"; } |
cbdc5621 |
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; |
70 | echo " <td bgcolor=$hlt_color width=1%><b><small>\n"; |
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 " \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 | |
110 | if ($auto_expunge) { |
111 | sqimap_mailbox_expunge($imapConnection, $mailbox); |
112 | sqimap_mailbox_select($imapConnection, $mailbox); |
113 | } |
61a4ac35 |
114 | |
5b6ae78a |
115 | if (!$use_cache) { |
116 | if ($numMessages >= 1) { |
15a9cd31 |
117 | for ($q = 0; $q < $numMessages; $q++) { |
f9b3e5d9 |
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 | |
4bbba0d8 |
123 | |
f9b3e5d9 |
124 | $from[$q] = $hdr->from; |
125 | $date[$q] = $hdr->date; |
126 | $subject[$q] = $hdr->subject; |
3e69e88b |
127 | $to[$q] = $hdr->to; |
266fe275 |
128 | $priority[$q] = $hdr->priority; |
1195c340 |
129 | $cc[$q] = $hdr->cc; |
fde32e3f |
130 | $size[$q] = $hdr->size; |
9db5f5fc |
131 | $type[$q] = $hdr->type0; |
5b6ae78a |
132 | $flags[$q] = sqimap_get_flags ($imapConnection, $q+1); |
5b10f02a |
133 | } |
5b6ae78a |
134 | } |
135 | |
136 | $j = 0; |
137 | while ($j < $numMessages) { |
138 | $date[$j] = ereg_replace(" ", " ", $date[$j]); |
139 | $tmpdate = explode(" ", trim($date[$j])); |
140 | |
141 | $messages[$j]["TIME_STAMP"] = getTimeStamp($tmpdate); |
142 | $messages[$j]["DATE_STRING"] = getDateString($messages[$j]["TIME_STAMP"]); |
143 | $messages[$j]["ID"] = $j+1; |
144 | $messages[$j]["FROM"] = decodeHeader($from[$j]); |
e9f8ea4e |
145 | $messages[$j]["FROM-SORT"] = strtolower(sqimap_find_displayable_name(decodeHeader($from[$j]))); |
5b6ae78a |
146 | $messages[$j]["SUBJECT"] = decodeHeader($subject[$j]); |
e9f8ea4e |
147 | $messages[$j]["SUBJECT-SORT"] = strtolower(decodeHeader($subject[$j])); |
3e69e88b |
148 | $messages[$j]["TO"] = decodeHeader($to[$j]); |
f9b3e5d9 |
149 | $messages[$j]["PRIORITY"] = $priority[$j]; |
1195c340 |
150 | $messages[$j]["CC"] = $cc[$j]; |
fde32e3f |
151 | $messages[$j]["SIZE"] = $size[$j]; |
9db5f5fc |
152 | $messages[$j]["TYPE0"] = $type[$j]; |
e9f8ea4e |
153 | |
154 | # fix SUBJECT-SORT to remove Re: |
441f2d33 |
155 | $re_abbr = # Add more here! |
156 | "vedr|sv|" . # Danish |
157 | "re|aw"; # English |
158 | if (eregi("^($re_abbr):[ ]*(.*)$", |
159 | $messages[$j]['SUBJECT-SORT'], $regs)) |
160 | $messages[$j]['SUBJECT-SORT'] = $regs[2]; |
5b6ae78a |
161 | |
162 | $num = 0; |
163 | while ($num < count($flags[$j])) { |
164 | if ($flags[$j][$num] == "Deleted") { |
165 | $messages[$j]["FLAG_DELETED"] = true; |
166 | } |
f9b3e5d9 |
167 | elseif ($flags[$j][$num] == "Answered") { |
5b6ae78a |
168 | $messages[$j]["FLAG_ANSWERED"] = true; |
169 | } |
f9b3e5d9 |
170 | elseif ($flags[$j][$num] == "Seen") { |
5b6ae78a |
171 | $messages[$j]["FLAG_SEEN"] = true; |
172 | } |
f9b3e5d9 |
173 | elseif ($flags[$j][$num] == "Flagged") { |
5b6ae78a |
174 | $messages[$j]["FLAG_FLAGGED"] = true; |
175 | } |
176 | $num++; |
7151188f |
177 | } |
5b6ae78a |
178 | $j++; |
3302d0d4 |
179 | } |
f9b3e5d9 |
180 | |
181 | /* Only ignore messages flagged as deleted if we are using a |
182 | * trash folder or auto_expunge */ |
183 | if ($move_to_trash || $auto_expunge) |
184 | { |
185 | /** Find and remove the ones that are deleted */ |
186 | $i = 0; |
187 | $j = 0; |
188 | while ($j < $numMessages) { |
189 | if ($messages[$j]["FLAG_DELETED"] == true) { |
190 | $j++; |
191 | continue; |
192 | } |
193 | $msgs[$i] = $messages[$j]; |
194 | |
195 | $i++; |
5b6ae78a |
196 | $j++; |
5b6ae78a |
197 | } |
f9b3e5d9 |
198 | $numMessages = $i; |
5b10f02a |
199 | } |
5b6ae78a |
200 | } |
926da13e |
201 | |
4c2d69ac |
202 | // There's gotta be messages in the array for it to sort them. |
f9b3e5d9 |
203 | if ($numMessages > 0 && ! $use_cache) { |
0e919368 |
204 | /** 0 = Date (up) 4 = Subject (up) |
205 | ** 1 = Date (dn) 5 = Subject (dn) |
206 | ** 2 = Name (up) |
207 | ** 3 = Name (dn) |
208 | **/ |
09856735 |
209 | session_unregister("msgs"); |
1c292c82 |
210 | if (($sort == 0) || ($sort == 1)) |
211 | $msort = array_cleave ($msgs, "TIME_STAMP"); |
212 | if (($sort == 2) || ($sort == 3)) |
e9f8ea4e |
213 | $msort = array_cleave ($msgs, "FROM-SORT"); |
1c292c82 |
214 | if (($sort == 4) || ($sort == 5)) |
e9f8ea4e |
215 | $msort = array_cleave ($msgs, "SUBJECT-SORT"); |
1c292c82 |
216 | |
f9b3e5d9 |
217 | if($sort % 2) { |
5b6ae78a |
218 | asort($msort); |
219 | } else { |
220 | arsort($msort); |
0e919368 |
221 | } |
5b6ae78a |
222 | session_register("msort"); |
4c2d69ac |
223 | } |
5b6ae78a |
224 | displayMessageArray($imapConnection, $numMessages, $startMessage, $msgs, $msort, $mailbox, $sort, $color,$show_num); |
09856735 |
225 | session_register("msgs"); |
9f2215a1 |
226 | } |
227 | |
228 | // generic function to convert the msgs array into an HTML table |
5b6ae78a |
229 | function displayMessageArray($imapConnection, $numMessages, $startMessage, &$msgs, $msort, $mailbox, $sort, $color,$show_num) { |
cbdc5621 |
230 | global $folder_prefix, $sent_folder; |
f9b3e5d9 |
231 | global $imapServerAddress; |
8e265988 |
232 | global $index_order; |
8e9e8afa |
233 | |
9f2215a1 |
234 | // if cache isn't already set, do it now |
90033b64 |
235 | if (!session_is_registered("msgs")) |
236 | session_register("msgs"); |
5b6ae78a |
237 | if (!session_is_registered("msort")) |
238 | session_register("msort"); |
90033b64 |
239 | |
8442ac08 |
240 | |
9c83f905 |
241 | if ($startMessage + ($show_num - 1) < $numMessages) { |
242 | $endMessage = $startMessage + ($show_num-1); |
926da13e |
243 | } else { |
926da13e |
244 | $endMessage = $numMessages; |
245 | } |
8442ac08 |
246 | |
247 | if ($endMessage < $startMessage) { |
248 | $startMessage = $startMessage - $show_num; |
249 | if ($startMessage < 1) |
250 | $startMessage = 1; |
251 | } |
252 | |
9c83f905 |
253 | $nextGroup = $startMessage + $show_num; |
254 | $prevGroup = $startMessage - $show_num; |
20db5033 |
255 | $urlMailbox = urlencode($mailbox); |
926da13e |
256 | |
6b638171 |
257 | do_hook("mailbox_index_before"); |
926da13e |
258 | |
14eb705c |
259 | $Message = ''; |
0d1b4832 |
260 | if ($startMessage < $endMessage) { |
14eb705c |
261 | $Message = _("Viewing messages") ." <B>$startMessage</B> ". _("to") ." <B>$endMessage</B> ($numMessages " . _("total") . ")\n"; |
f9b3e5d9 |
262 | } elseif ($startMessage == $endMessage) { |
14eb705c |
263 | $Message = _("Viewing message") ." <B>$startMessage</B> ($numMessages " . _("total") . ")\n"; |
0d1b4832 |
264 | } |
26b6c99c |
265 | |
14eb705c |
266 | $More = ''; |
5b10f02a |
267 | if (($nextGroup <= $numMessages) && ($prevGroup >= 0)) { |
14eb705c |
268 | $More = "<A HREF=\"right_main.php?use_mailbox_cache=1&startMessage=$prevGroup&mailbox=$urlMailbox\" TARGET=\"right\">". _("Previous") ."</A> | \n"; |
269 | $More .= "<A HREF=\"right_main.php?use_mailbox_cache=1&&startMessage=$nextGroup&mailbox=$urlMailbox\" TARGET=\"right\">". _("Next") ."</A>\n"; |
926da13e |
270 | } |
f9b3e5d9 |
271 | elseif (($nextGroup > $numMessages) && ($prevGroup >= 0)) { |
14eb705c |
272 | $More = "<A HREF=\"right_main.php?use_mailbox_cache=1&startMessage=$prevGroup&mailbox=$urlMailbox\" TARGET=\"right\">". _("Previous") ."</A> | \n"; |
273 | $More .= "<FONT COLOR=\"$color[9]\">"._("Next")."</FONT>\n"; |
3302d0d4 |
274 | } |
f9b3e5d9 |
275 | elseif (($nextGroup <= $numMessages) && ($prevGroup < 0)) { |
14eb705c |
276 | $More = "<FONT COLOR=\"$color[9]\">"._("Previous")."</FONT> | \n"; |
277 | $More .= "<A HREF=\"right_main.php?use_mailbox_cache=1&startMessage=$nextGroup&mailbox=$urlMailbox\" TARGET=\"right\">". _("Next") ."</A>\n"; |
278 | } |
279 | |
280 | mail_message_listing_beginning($imapConnection, |
281 | "move_messages.php?msg=$msg&mailbox=$urlMailbox&startMessage=$startMessage", |
282 | $mailbox, $sort, $Message, $More); |
283 | |
284 | |
285 | // loop through and display the info for each message. |
286 | $t = 0; // $t is used for the checkbox number |
287 | if ($numMessages == 0) { // if there's no messages in this folder |
288 | echo "<TR><TD BGCOLOR=\"$color[4]\" COLSPAN=" . count($index_order); |
289 | echo "><CENTER><BR><B>". _("THIS FOLDER IS EMPTY") ."</B><BR> </CENTER></TD></TR>"; |
f9b3e5d9 |
290 | } elseif ($startMessage == $endMessage) { // if there's only one message in the box, handle it different. |
14eb705c |
291 | $i = $startMessage; |
292 | reset($msort); |
293 | do { |
294 | $key = key($msort); |
295 | next($msort); |
296 | $k++; |
297 | } while (isset ($key) && ($k < $i)); |
298 | printMessageInfo($imapConnection, $t, $i, $key, $mailbox, $sort, $startMessage, 0, 0); |
299 | } else { |
300 | $i = $startMessage; |
301 | reset($msort); |
302 | do { |
303 | $key = key($msort); |
304 | next($msort); |
305 | $k++; |
306 | } while (isset ($key) && ($k < $i)); |
307 | |
308 | do { |
309 | printMessageInfo($imapConnection, $t, $i, $key, $mailbox, $sort, $startMessage, 0, 0); |
310 | $key = key($msort); |
311 | $t++; |
312 | $i++; |
313 | next($msort); |
314 | } while ($i < ($endMessage+1)); |
315 | } |
316 | echo "</TABLE>"; |
317 | |
318 | echo "</td></tr>\n"; |
319 | |
320 | if ($More) |
321 | { |
322 | echo "<TR BGCOLOR=\"$color[4]\"><TD>$More</td></tr>\n"; |
323 | } |
324 | echo "</table>"; /** End of message-list table */ |
325 | |
326 | do_hook("mailbox_index_after"); |
327 | } |
328 | |
329 | /* Displays the standard message list header. |
330 | * To finish the table, you need to do a "</table></table>"; |
331 | * $moveURL is the URL to submit the delete/move form to |
332 | * $mailbox is the current mailbox |
333 | * $sort is the current sorting method (-1 for no sorting available [searches]) |
334 | * $Message is a message that is centered on top of the list |
335 | * $More is a second line that is left aligned |
336 | */ |
337 | function mail_message_listing_beginning($imapConnection, $moveURL, |
338 | $mailbox = '', $sort = -1, $Message = '', $More = '') |
339 | { |
f9b3e5d9 |
340 | global $color, $index_order, $auto_expunge, $move_to_trash; |
14eb705c |
341 | |
342 | /** This is the beginning of the message list table. It wraps around all messages */ |
343 | echo "<TABLE WIDTH=100% BORDER=0 CELLPADDING=2 CELLSPACING=0>"; |
344 | |
345 | if ($Message) |
346 | { |
347 | echo "<TR BGCOLOR=\"$color[4]\"><TD align=center>$Message</td></tr>\n"; |
348 | } |
349 | |
350 | if ($More) |
351 | { |
352 | echo "<TR BGCOLOR=\"$color[4]\"><TD>$More</td></tr>\n"; |
926da13e |
353 | } |
354 | |
68347a84 |
355 | /** The delete and move options */ |
f8f9bed9 |
356 | echo "<TR><TD BGCOLOR=\"$color[0]\">"; |
ed4332d1 |
357 | |
14eb705c |
358 | echo "\n\n\n<FORM name=messageList method=post action=\"$moveURL\">\n"; |
4f313fcf |
359 | echo "<TABLE BGCOLOR=\"$color[0]\" COLS=2 BORDER=0 cellpadding=0 cellspacing=0 width=100%>\n"; |
ed4332d1 |
360 | echo " <TR>\n"; |
98fe1e9f |
361 | echo " <TD WIDTH=60% ALIGN=LEFT VALIGN=CENTER>\n"; |
aae41ae9 |
362 | echo " <NOBR><SMALL>". _("Move selected to:") ."</SMALL>"; |
7ce342dc |
363 | echo " <TT><SMALL><SELECT NAME=\"targetMailbox\">"; |
364 | |
9f2215a1 |
365 | $boxes = sqimap_mailbox_list($imapConnection); |
7ce342dc |
366 | for ($i = 0; $i < count($boxes); $i++) { |
14eb705c |
367 | if ($boxes[$i]["flags"][0] != "noselect" && |
368 | $boxes[$i]["flags"][1] != "noselect" && |
369 | $boxes[$i]["flags"][2] != "noselect") { |
370 | $box = $boxes[$i]["unformatted"]; |
371 | $box2 = replace_spaces($boxes[$i]["formatted"]); |
372 | echo " <OPTION VALUE=\"$box\">$box2</option>\n"; |
373 | } |
dd88d31f |
374 | } |
7ce342dc |
375 | echo " </SELECT></SMALL></TT>"; |
aae41ae9 |
376 | echo " <SMALL><INPUT TYPE=SUBMIT NAME=\"moveButton\" VALUE=\"". _("Move") ."\"></SMALL></NOBR>\n"; |
ed4332d1 |
377 | echo " </TD>\n"; |
7ce342dc |
378 | echo " <TD WIDTH=40% ALIGN=RIGHT>\n"; |
f9b3e5d9 |
379 | if (! $move_to_trash && ! $auto_expunge) { |
380 | echo " <NOBR><SMALL><INPUT TYPE=SUBMIT NAME=\"expungeButton\" VALUE=\"". _("Expunge") ."\"> ". _("mailbox") ."</SMALL></NOBR> \n"; |
381 | } |
aae41ae9 |
382 | echo " <NOBR><SMALL><INPUT TYPE=SUBMIT VALUE=\"". _("Delete") ."\"> ". _("checked messages") ."</SMALL></NOBR>\n"; |
14eb705c |
383 | echo " </TD>\n"; |
ed4332d1 |
384 | echo " </TR>\n"; |
385 | |
70b455e0 |
386 | echo "</TABLE>\n"; |
387 | do_hook("mailbox_form_before"); |
aa4c3749 |
388 | echo "</TD></TR>"; |
389 | |
f8f9bed9 |
390 | echo "<TR><TD BGCOLOR=\"$color[0]\">"; |
98fe1e9f |
391 | echo "<TABLE WIDTH=100% BORDER=0 CELLPADDING=2 CELLSPACING=1 BGCOLOR=\"$color[0]\">"; |
f8f9bed9 |
392 | echo "<TR BGCOLOR=\"$color[5]\" ALIGN=\"center\">"; |
be8e07f8 |
393 | |
14eb705c |
394 | // Print the headers |
8e265988 |
395 | for ($i=1; $i <= count($index_order); $i++) { |
396 | switch ($index_order[$i]) { |
397 | case 1: # checkbox |
14eb705c |
398 | case 5: # flags |
8e265988 |
399 | echo " <TD WIDTH=1%><B> </B></TD>"; |
400 | break; |
14eb705c |
401 | |
8e265988 |
402 | case 2: # from |
14eb705c |
403 | if ($mailbox == $sent_folder) |
404 | echo " <TD WIDTH=30%><B>". _("To") ."</B>"; |
405 | else |
406 | echo " <TD WIDTH=30%><B>". _("From") ."</B>"; |
8e265988 |
407 | |
408 | if ($sort == 2) |
409 | 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 |
410 | elseif ($sort == 3) |
8e265988 |
411 | 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 |
412 | elseif ($sort != -1) |
8e265988 |
413 | 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"; |
414 | break; |
14eb705c |
415 | |
8e265988 |
416 | case 3: # date |
417 | echo " <TD nowrap WIDTH=1%><B>". _("Date") ."</B>"; |
418 | if ($sort == 0) |
419 | 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 |
420 | elseif ($sort == 1) |
8e265988 |
421 | echo " <A HREF=\"right_main.php?newsort=0&startMessage=1&mailbox=$urlMailbox\" TARGET=\"right\"><IMG SRC=\"../images/down_pointer.gif\" BORDER=0></A></TD>\n"; |
f9b3e5d9 |
422 | elseif ($sort != -1) |
8e265988 |
423 | 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"; |
424 | break; |
14eb705c |
425 | |
8e265988 |
426 | case 4: # subject |
427 | echo " <TD WIDTH=%><B>". _("Subject") ."</B>\n"; |
428 | if ($sort == 4) |
429 | 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 |
430 | elseif ($sort == 5) |
8e265988 |
431 | 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 |
432 | elseif ($sort != -1) |
8e265988 |
433 | 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"; |
434 | break; |
14eb705c |
435 | |
8e265988 |
436 | case 6: # size |
fde32e3f |
437 | echo " <TD WIDTH=1%><b>" . _("Size")."</b></TD>\n"; |
8e265988 |
438 | break; |
439 | } |
440 | } |
14eb705c |
441 | echo "</TR>\n"; |
3302d0d4 |
442 | } |
26b6c99c |
443 | ?> |