      </table>
    </td>
    <td width="40px" align="right">
      <?php echo Help::link('ingo', 'rule-matches') ?>&nbsp;
    </td>
  </tr>

  <tr class="item0">
    <td style="padding:5px">
      <i><?php echo _("Do this:") ?></i>
      <br />
      <table cellpadding="2" cellspacing="0">
        <tr>
          <td>
            <select onchange="document.rule.submit(); return true;" name='action'>
              <?php echo $actionselect ?>
            </select>
          </td>
          <td>
            <?php echo $actionvalue ?>
          </td>
        </tr>
      </table>
    </td>
    <td width="40px" align="right">
      <?php echo Help::link('ingo', 'rule-action') ?>&nbsp;
    </td>
  </tr>

<?php if ($current_action->flags && $ingo_script->imapFlags()): ?>
  <tr class="item0">
    <td style="padding:5px">
      <i><?php echo _("Mark message as:") ?></i>
      <br />
      <table width="100%" cellpadding="2" cellspacing="0">
        <tr>
          <td>
            <input type="checkbox" id="seen" name="flags[]" value="<?php echo INGO_STORAGE_FLAG_SEEN ?>"<?php echo (INGO_STORAGE_FLAG_SEEN & $rule['flags']) ? ' checked="checked" ' : '' ?>/><?php echo Horde::label('seen', _("Seen")) ?>
          </td>
          <td>
            <input type="checkbox" id="important" name="flags[]" value="<?php echo INGO_STORAGE_FLAG_FLAGGED ?>"<?php echo (INGO_STORAGE_FLAG_FLAGGED & $rule['flags']) ? ' checked="checked" ' : '' ?>/><?php echo Horde::label('important', _("Important")) ?>
          </td>
          <td>
            <input type="checkbox" id="answered" name="flags[]" value="<?php echo INGO_STORAGE_FLAG_ANSWERED ?>"<?php echo (INGO_STORAGE_FLAG_ANSWERED & $rule['flags']) ? ' checked="checked" ' : '' ?>/><?php echo Horde::label('answered', _("Answered")) ?>
          </td>
          <td>
            <input type="checkbox" id="deleted" name="flags[]" value="<?php echo INGO_STORAGE_FLAG_DELETED ?>"<?php echo (INGO_STORAGE_FLAG_DELETED & $rule['flags']) ? ' checked="checked" ' : '' ?>/><?php echo Horde::label('deleted', _("Deleted")) ?>
          </td>
        </tr>
      </table>
    </td>
    <td width="40px" align="right">
      <?php echo Help::link('ingo', 'rule-mark') ?>&nbsp;
    </td>
  </tr>
<?php endif; ?>

<?php if ($ingo_script->stopScript()): ?>
  <tr class="item1">
    <td align="left" style="padding:5px">
      <input type="checkbox" name="stop" value="1"<?php echo ($rule['stop']) ? 'checked="checked"' : '' ?>> <?php echo _("Stop checking if this rule matches?") ?>
    </td>
    <td width="40px" align="right">
      <?php echo Help::link('ingo', 'rule-stop') ?>&nbsp;
    </td>
  </tr>
<?php endif; ?>

  <tr>
    <td align="center" class="control" colspan="2" style="padding:2px">
      <input class="button" type="button" onclick="document.rule.actionID.value='rule_save';document.rule.submit(); return true;" value="&nbsp;<?php echo _("Save") ?>&nbsp;">
      <input class="button" type="button" onclick="document.location.href='<?php echo Horde::applicationUrl('filters.php', true) ?>'" value="<?php echo _("Return to Filters List") ?>" />
    </td>
  </tr>

</table>
</form>
