require_once('../functions/strings.php');
require_once('../functions/html.php');
require_once('../class/html.class.php');
-require_once('../functions/imap_utf7_decode_local.php');
+require_once('../functions/imap_mailbox.php');
/* Default value for page_selector_max. */
define('PG_SEL_MAX', 10);
function printMessageInfo($imapConnection, $t, $i, $key, $mailbox,
- $start_msg) {
+ $start_msg, $where, $what) {
global $checkall,
$color, $msgs, $msort,
$default_use_priority,
$fontstr_end = '';
}
+ if ($where && $what) {
+ $searchstr = '&where='.$where.'&what='.$what;
+ } else {
+ $searchstr = '';
+ }
/**
* AAAAH! Make my eyes stop bleeding!
* Who wrote this?!
}
$td_str .= '<a href="read_body.php?mailbox='.$urlMailbox
.'&passed_id='. $msg["ID"]
- . '&startMessage='.$start_msg
- .'&show_more=0"';
+ . '&startMessage='.$start_msg.$searchstr.'"';
do_hook("subject_link");
if ($subject != $msg['SUBJECT']) {
$title = get_html_translation_table(HTML_SPECIALCHARS);
} while (isset ($key) && ($k < $i));
do {
printMessageInfo($imapConnection, $t, $i, $key, $mailbox,
- $real_startMessage);
+ $real_startMessage, $where, $what);
$key = key($msort);
$t++;
$i++;
$msgs_url = $base_uri . 'src/';
if (isset($where) && isset($what)) {
- if ($pos == '') {
- $pos=0;
- }
- $msgs_url .= 'search.php?where='.urlencode($where).'&pos='.$pos.
+ $msgs_url .= 'search.php?where='.urlencode($where).
'&what='.urlencode($what).'&mailbox='.$urlMailbox;
+ $msgs_str = _("Search results");
} else {
$msgs_url .= 'right_main.php?sort='.$sort.'&startMessage='.
$startMessage.'&mailbox='.$urlMailbox;
+ $msgs_str = _("Message List");
}
- $s .= '<a href="'. $msgs_url.'">'._("Message List").'</a>';
+ $s .= '<a href="'. $msgs_url.'">'.$msgs_str.'</a>';
$s .= $topbar_delimiter;
$delete_url = $base_uri . 'src/delete_message.php?mailbox='.$urlMailbox.
require_once('../src/validate.php');
require_once('../functions/imap.php');
require_once('../functions/imap_search.php');
-require_once('../functions/imap_utf7_decode_local.php');
+require_once('../functions/imap_mailbox.php');
require_once('../functions/array.php');
require_once('../functions/strings.php');
}
}
-function printSearchMessages($msgs,$mailbox, $cnt, $imapConnection, $usecache = false, $newsort = false) {
+function printSearchMessages($msgs,$mailbox, $cnt, $imapConnection, $where, $what, $usecache = false, $newsort = false) {
global $sort, $color;
$msort = calc_msort($msgs, $sort);
printHeader($mailbox, 6, $color, false);
displayMessageArray($imapConnection, $cnt, 1,
- $msort, $mailbox, $sort, $color, $cnt);
+ $msort, $mailbox, $sort, $color, $cnt, $where, $what);
mail_message_listing_end($cnt, '', $msg_cnt_str, $color);
}
$msgs = sqimap_search($imapConnection, $where, $what, $mailbox, $color, 0, $search_all, $count_all);
$count_all = count($msgs);
printSearchMessages($msgs, $mailbox, $count_all, $imapConnection,
- false, false);
+ $where, $what, false, false);
array_push($perbox_count, $count_all);
}
}
$msgs = sqimap_search($imapConnection, $where, $what, $mailbox, $color, 0, $search_all, $count_all);
if (count($msgs)) {
printSearchMessages($msgs, $mailbox, count($msgs), $imapConnection,
- false, false);
+ $where, $what, false, false);
} else {
echo '<br><center>' . _("No Messages Found") . '</center>';
}