EOF; } else { $var['folders'] .= $atmail->parse("html/{$atmail->Language}/simple/folderbar.html", array('folderlink' => urlencode($folderlink), 'folder' => $folder, 'unread' => $subfolderunread, 'read' => $read, 'on' => $on, 'foldericon' => $var['foldericon'])); } } } // Support unread flags for folders with spaces $folderstate = $var['folder']; $folderstate = str_replace(' ', '_', $var['folder']); $var['Unreadscript'] .= "parent.FolderState[escape(\"{$folderstate}_fstatus\")] = '{$var['unread']}'; parent.FolderStateReDraw(escape(\"{$folderstate}\"));"; // If the user has selected to 'jump' between messages // e.g next, prev, start, end if ($_REQUEST['jump']) { $type = $_REQUEST['jump']; $current = $_REQUEST['msgid']; $msgids = $mail->msgid($var['folder'], $var['sort'], $var['order']); $newwin = $_REQUEST['newwin']; if (!$current) { die('ERROR'); } $i = 0; foreach ($msgids as $id) { // Find the array index, depending on our current msgID if ($current == $id) { $num = $i; break; } $i++; } // Jump to the next/prev/start or end record if ($type == "next" && $num <= count($msgids) - 1) {