<tr>
    <td class="control" colspan="6">

<table border="0" width="100%">
<tr>
    <td class="control" colspan="6">
        <form name="select<?php echo $navform ?>" action="javascript:void(0)" onsubmit="return false">
        <select name="filter" onchange="makeSelection(<?php echo $navform ?>);">
            <option value="" selected="selected"><?php echo _("Select") ?>:</option>
            <option value="!<?php echo IMP_ALL ?>"><?php echo _("All") ?></option>
            <option value="<?php echo IMP_ALL ?>"><?php echo _("None") ?></option>
<?php if (!strstr($imp['protocol'], 'pop3')): ?>
            <option value="!<?php echo IMP_UNSEEN ?>"><?php echo _("Seen") ?></option>
            <option value="<?php echo IMP_UNSEEN ?>"><?php echo _("Unseen") ?></option>
            <option value="<?php echo IMP_FLAGGED ?>"><?php echo _("Important") ?></option>
            <option value="!<?php echo IMP_FLAGGED ?>"><?php echo _("Not Important") ?></option>
            <option value="<?php echo IMP_ANSWERED ?>"><?php echo _("Answered") ?></option>
            <option value="!<?php echo IMP_ANSWERED ?>"><?php echo _("Unanswered") ?></option>
            <option value="<?php echo IMP_DELETED ?>"><?php echo _("Deleted") ?></option>
            <option value="!<?php echo IMP_DELETED ?>"><?php echo _("Not Deleted") ?></option>
            <option value="<?php echo IMP_DRAFT ?>"><?php echo _("Draft") ?></option>
            <option value="!<?php echo IMP_DRAFT ?>"><?php echo _("Not Draft") ?></option>
            <option value="<?php echo IMP_PERSONAL ?>"><?php echo _("Personal") ?></option>
            <option value="!<?php echo IMP_PERSONAL ?>"><?php echo _("Not Personal") ?></option>
<?php endif; ?>
        </select>
<?php if (!strstr($imp['protocol'], 'pop3')): ?>
        <select name="flag" onchange="flagMessages(<?php echo $navform ?>);">
            <option value="" selected="selected"><?php echo _("Mark as:") ?></option>
            <option value="Seen"><?php echo _("Seen") ?></option>
            <option value="0Seen"><?php echo _("Unseen") ?></option>
            <option value="Flagged"><?php echo _("Important") ?></option>
            <option value="0Flagged"><?php echo _("Not Important") ?></option>
            <option value="Answered"><?php echo _("Answered") ?></option>
            <option value="0Answered"><?php echo _("Unanswered") ?></option>
<?php if (!$prefs->getValue('use_trash')): ?>
            <option value="Deleted"><?php echo _("Deleted") ?></option>
            <option value="0Deleted"><?php echo _("Not Deleted") ?></option>
<?php endif; ?>
            <option value="Draft"><?php echo _("Draft") ?></option>
            <option value="0Draft"><?php echo _("Not Draft") ?></option>
        </select>
<?php endif; ?>
        </form>
    </td>

    <?php if (isset($page_count)): ?>
    <td align="center">
        <form method="get" name="pagenav<?php echo $navform ?>" action="<?php echo Horde::applicationUrl('mailbox.php') ?>">
        <?php Horde::pformInput() ?>
        <?php echo $pages_first . '&nbsp;' . $pages_prev ?>
        <input type="text" name="page" value="<?php echo htmlspecialchars($page) ?>" size="<?php echo strlen($page_count) ?>" />
        <?php echo $pages_next . '&nbsp;' . $pages_last ?>
        </form>
    </td>
    <?php endif; ?>

    <?php if ($conf['user']['allow_folders']): ?>
    <td align="right">
        <form method="post" name="copymove<?php echo $navform ?>" action="<?php echo Horde::applicationUrl('mailbox.php') ?>">
        <?php echo Horde::link('', _("Move"), 'widget', '', 'Transfer(' . MOVE_MESSAGES . ", $navform); return false;") . _("Move") ?></a> |
        <?php echo Horde::link('', _("Copy"), 'widget', '', 'Transfer(' . COPY_MESSAGES . ", $navform); return false;") . _("Copy") ?></a>
        <select name="targetMailbox" onchange="updateFolders(<?php echo $navform ?>);">
            <?php echo $options ?>
        </select>
        </form>
    </td>
    <?php endif; ?>
</tr>
</table>

</td>
</tr>
