<form method="post" name="filterprefs" action="<?php echo $selfURL ?>">
<input type="hidden" name="actionID" value="" />

<table border="0" align="center" cellpadding="0" cellspacing="0" width="100%">
  <tr>
    <td align="left" class="header" nowrap="nowrap"><b><?php echo _("Filter Settings") ?></b></td>
    <?php PrefsUI::generateNavigationCell('filters') ?>
  </tr>

  <tr>
    <td class="item" align="left" colspan="2">
      <table border="0" cellpadding="0" width="100%">
<?php if (!empty($filters_link)): ?>
        <tr>
          <td class="item" valign="top" width="98%">&nbsp;
             <?php echo Horde::img('filters.gif', _("Edit Filters")) . '&nbsp;&nbsp;' . Horde::link(Horde::url($filters_link), _("Edit your filter rules")) . _("Edit your filter rules") ?></a>
          </td>
          <td class="item" align="right" width="2%">
            <?php echo Help::link('imp', 'filter-edit-rules') ?>
          </td>
        </tr>
<?php endif; ?>
<?php if (!empty($blacklist_link)): ?>
        <tr>
          <td class="item" valign="top" width="98%">&nbsp;
             <?php echo Horde::img('filters.gif', _("Edit Blacklist")) . '&nbsp;&nbsp;' . Horde::link(Horde::url($blacklist_link), _("Edit your blacklist")) . _("Edit your blacklist") ?></a>
          </td>
          <td class="item" align="right" width="2%">
            <?php echo Help::link('imp', 'filter-edit-blacklist') ?>
          </td>
        </tr>
<?php endif; ?>
<?php if (!empty($whitelist_link)): ?>
        <tr>
          <td class="item" valign="top" width="98%">&nbsp;
             <?php echo Horde::img('filters.gif', _("Edit Whitelist")) . '&nbsp;&nbsp;' . Horde::link(Horde::url($whitelist_link), _("Edit your whitelist")) . _("Edit your whitelist") ?></a>
          </td>
          <td class="item" align="right" width="2%">
            <?php echo Help::link('imp', 'filter-edit-whitelist') ?>
          </td>
        </tr>
<?php endif; ?>
      </table>
    </td>
  </tr>

<?php if (!$login_locked || !$display_locked || !$menuitem_locked): ?>
  <tr><td colspan="2">&nbsp;</td></tr>

  <tr>
    <td colspan="2" align="left" class="header" nowrap="nowrap"><b><?php echo _("Filter Options") ?></b></td>
  </tr>

  <tr>
    <td class="item" align="left" colspan="2">
      <table border="0" cellpadding="0" width="100%">
<?php if (!$login_locked): ?>
        <tr>
          <td class="item" nowrap="nowrap" width="2%">&nbsp;
            <input type="checkbox" id="filter_login" name="filter_login" <?php echo ($prefs->getValue('filter_on_login')) ? "checked=\"checked\"" : "" ?> />&nbsp;
          </td>
          <td class="item" align="left" width="97%">
            <?php echo Horde::label('filter_login', _("Apply filter rules upon logging on?")) ?>
          </td>
          <td class="item" align="right" width="1%">
            <?php echo Help::link('imp', 'filter-on-login') ?>
          </td>
        </tr>
<?php endif; ?>
<?php if (!$display_locked): ?>
        <tr>
          <td class="item" nowrap="nowrap" width="2%">&nbsp;
            <input type="checkbox" id="filter_display" name="filter_display" <?php echo ($prefs->getValue('filter_on_display')) ? "checked=\"checked\"" : "" ?> />&nbsp;
          </td>
          <td class="item" align="left" width="97%">
            <?php echo Horde::label('filter_display', _("Apply filter rules whenever INBOX is displayed?")) ?>
          </td>
          <td class="item" align="right" width="1%">
            <?php echo Help::link('imp', 'filter-on-display') ?>
          </td>
        </tr>
<?php endif; ?>
<?php if (!$menuitem_locked): ?>
        <tr>
          <td class="item" nowrap="nowrap" width="2%">&nbsp;
            <input type="checkbox" id="filter_menuitem" name="filter_menuitem" <?php echo ($prefs->getValue('filter_menuitem')) ? "checked=\"checked\"" : "" ?> />&nbsp;
          </td>
          <td class="item" align="left" width="97%">
            <?php echo Horde::label('filter_menuitem', _("Show the filter icon on the menubar?")) ?>
          </td>
          <td class="item" align="right" width="1%">
            <?php echo Help::link('imp', 'filter-menuitem') ?>
          </td>
        </tr>
<?php endif; ?>
      </table>
    </td>
  </tr>

  <tr>
    <td colspan="2" nowrap="nowrap" align="left" class="header" valign="middle">
      <input type="submit" name="save" class="button" onclick="document.filterprefs.actionID.value='filter_prefs_update';return true;" value="<?php echo _("Save Options") ?>" />&nbsp;&nbsp;
      <input type="button" name="back" class="button" onclick="document.location.href='<?php echo Horde::applicationUrl('prefs.php', true) ?>'" value="<?php echo _("Return to Main Preferences Screen") ?>" />
    </td>
  </tr>
<?php endif; ?>

</table>

</form>
