/**
* search.php
*
- * Copyright (c) 1999-2004 The SquirrelMail Project Team
+ * Copyright (c) 1999-2005 The SquirrelMail Project Team
* Licensed under the GNU GPL. For full terms see the file COPYING.
*
* IMAP search page
/** Print the $msgs messages from $mailbox mailbox
*/
-function asearch_print_mailbox_msgs($imapConnection, &$aMailbox, $color)
-{
+function asearch_print_mailbox_msgs($imapConnection, &$aMailbox, $color) {
+ global $javascript_on, $compact_paginator;
/**
* A mailbox can contain different sets with uid's. Default, for normal
* message list view we use '0' as setindex and for search a different
$cnt = count($aMailbox['UIDSET'][$iSetIndx]);
$iLimit = ($aMailbox['SHOWALL'][$iSetIndx]) ? $cnt : $aMailbox['LIMIT'];
- $iEnd = ($aMailbox['PAGEOFFSET'] + ($iLimit - 1) < $aMailbox['EXISTS']) ?
- $aMailbox['PAGEOFFSET'] + $iLimit - 1 : $cnt;
+ $iEnd = ($aMailbox['PAGEOFFSET'] + ($iLimit - 1) < $cnt) ?
+ $aMailbox['PAGEOFFSET'] + ($iLimit - 1) : $cnt;
$paginator_str = get_paginator_str($aMailbox['NAME'], $aMailbox['PAGEOFFSET'],
$cnt, $aMailbox['LIMIT'], $aMailbox['SHOWALL'][$iSetIndx]);
+ if ($javascript_on && $compact_paginator) {
+ echo "\n<!-- start of compact paginator javascript -->\n"
+ . "<script language=\"JavaScript\">\n"
+ . "function SubmitOnSelect(select, URL)\n"
+ . "{\n"
+ . " URL += select.options[select.selectedIndex].value;\n"
+ . " window.location.href = URL;\n"
+ . "}\n"
+ . "</script>\n"
+ . "<!-- end of compact paginator javascript -->\n";
+ }
+
$msg_cnt_str = get_msgcnt_str($aMailbox['PAGEOFFSET'], $iEnd,$cnt);
echo '<table border="0" width="100%" cellpadding="0" cellspacing="0">';
mail_message_listing_end($cnt, '', $msg_cnt_str);
echo '</td></tr>';
- echo '</table>';
+ echo '</table></form>';
}
/**
}
} else {
$mailbox_array = array();
+ $targetmailbox = array();
}
$aMailboxGlobalPref = array(
MBX_PREF_SORT => 0,