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

<table border="0" width="100%">
<tr>
    <td align="left">
        <a class="widget" href="" onclick="Submit(<?php echo DELETE_MESSAGES ?>); return false;"
         onmouseover="status='<?php echo addslashes(_("Delete")) ?>'; return true;"
         onmouseout="status='';"><?php echo _("Delete") ?></a>
	<?php if (!$prefs->getValue('use_trash') && strstr($imp['protocol'], 'imap')): ?> |
        <a class="widget" href="" onclick="Submit(<?php echo UNDELETE_MESSAGES ?>); return false;"
         onmouseover="status='<?php echo addslashes(_("Undelete")) ?>'; return true;"
         onmouseout="status='';"><?php echo _("Undelete") ?></a>
	<?php endif; ?>
    <?php if (($conf['prefs']['driver'] != '') && ($conf['prefs']['driver'] != 'none') && !$prefs->isLocked('filters')): ?>
        | <?php echo Horde::link('', _("Blacklist"), 'widget', '', 'BlackList(); return false;') . _("Blacklist") ?></a>
        <?php if ($show_whitelist): ?>
            | <?php echo Horde::link('', _("Whitelist"), 'widget', '', 'WhiteList(); return false;') . _("Whitelist") ?></a>
        <?php endif; ?>
    <?php endif; ?>
    </td>
    <td align="right">
    <?php if (strstr($imp['protocol'], 'imap') && !$prefs->getValue('use_trash')): ?>
      <?php if (!$prefs->isLocked('delhide')): ?>
        <a class="widget" href="<?php echo Horde::purl('mailbox.php?actionID=' . HIDE_DELETED . "&page=$page") ?>"
         onmouseover="status='<?php echo addslashes($deleted_prompt) ?>'; return true;"
         onmouseout="status='';"><?php echo $deleted_prompt ?></a> |
      <?php endif; ?>
        <a class="widget" href="<?php echo Horde::url('mailbox.php?actionID=' . EXPUNGE_MAILBOX . "&page=$page&uniq=" . uniqid(rand())) ?>"
         onmouseover="status='<?php echo addslashes(_("Purge Deleted")) ?>'; return true;"
         onmouseout="status='';"><?php echo _("Purge Deleted") ?></a>
    <?php endif; ?>
    <?php if ($prefs->getValue('use_trash') && $imp['mailbox'] == IMP::preambleString() . $prefs->getValue('trash_folder')): ?>
        <a class="widget" href="<?php echo Horde::url('mailbox.php?actionID=' . EMPTY_MAILBOX . "&uniq=" . uniqid(rand())) ?>"
         onmouseover="status='<?php echo addslashes(_("Empty Trash folder")) ?>'; return true;"
         onmouseout="status='';"
         onclick="return confirm('<?php echo addslashes(_("Are you sure you wish to empty this folder?")) ?>');"><?php echo _("Empty Trash folder") ?></a>
    <?php endif; ?>
    </td>
</tr>
</table>

    </td>
</tr>
