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