piler/webui/view/theme/default/templates/policy/archiving.tpl

134 lines
5.5 KiB
Smarty
Raw Normal View History

<form method="get" name="search1" action="archiving.php" class="form-inline pull-right">
<div class="input-append">
<input type="text" name="search" class="input-medium" value="<?php print $search; ?>" />
<input type="submit" class="btn" value="<?php print $text_search; ?>" />
</div>
</form>
2012-02-08 23:14:28 +01:00
<h4><?php print $text_add_new_rule; ?></h4>
2013-04-05 10:16:33 +02:00
<form method="post" id="add1" name="add1" action="index.php?route=policy/archiving" class="form-horizontal">
<div class="control-group">
<label class="control-label" for="from"><?php print $text_from; ?>:</label>
<div class="controls">
<input type="text" class="text" name="from" />
</div>
2012-02-08 23:14:28 +01:00
</div>
2013-04-05 10:16:33 +02:00
<div class="control-group">
<label class="control-label" for="to"><?php print $text_to; ?>:</label>
<div class="controls">
<input type="text" class="text" name="to" />
</div>
</div>
<div class="control-group">
<label class="control-label" for="subject"><?php print $text_subject; ?>:</label>
<div class="controls">
<input type="text" class="text" name="subject" />
</div>
2012-02-08 23:14:28 +01:00
</div>
2015-03-11 12:54:31 +01:00
<div class="control-group">
<label class="control-label" for="body"><?php print $text_body; ?>:</label>
<div class="controls">
<input type="text" class="text" name="body" />
</div>
</div>
2013-04-05 10:16:33 +02:00
<div class="control-group">
<label class="control-label" for="size"><?php print $text_size; ?>:</label>
<div class="controls">
<select class="ruleselect" name="_size">
2012-02-08 23:14:28 +01:00
<option value=">">&gt;</option>
<option value="=">=</option>
<option value="<">&lt;</option>
</select>
2013-04-05 10:16:33 +02:00
<input type="text" class="ruletext" name="size" />
</div>
</div>
<div class="control-group">
<label class="control-label" for="attachment_name"><?php print $text_attachment_name; ?>:</label>
<div class="controls">
<input type="text" class="text" name="attachment_name" />
</div>
</div>
2013-04-05 10:16:33 +02:00
<div class="control-group">
<label class="control-label" for="attachment_type"><?php print $text_attachment_type; ?>:</label>
<div class="controls">
<input type="text" class="text" name="attachment_type" />
2012-02-08 23:14:28 +01:00
</div>
</div>
2013-04-05 10:16:33 +02:00
<div class="control-group">
<label class="control-label" for="attachment_size"><?php print $text_attachment_size; ?>:</label>
<div class="controls">
<select class="ruleselect" name="_attachment_size">
2012-02-08 23:14:28 +01:00
<option value=">">&gt;</option>
<option value="=">=</option>
<option value="<">&lt;</option>
</select>
2013-04-05 10:16:33 +02:00
<input type="text" class="ruletext" name="attachment_size" />
2012-02-08 23:14:28 +01:00
</div>
2013-04-05 10:16:33 +02:00
</div>
<div class="control-group">
<label class="control-label" for="spam"><?php print $text_spam; ?>:</label>
<div class="controls">
<select class="ruleselect" name="spam">
2012-02-19 22:59:47 +01:00
<option value="-1">-</option>
<option value="0"><?php print $text_not_spam; ?></option>
<option value="1"><?php print $text_spam2; ?></option>
</select>
</div>
</div>
2013-04-05 10:16:33 +02:00
<div class="form-actions">
<input type="submit" class="btn btn-primary" value="<?php print $text_add; ?>" /> <input type="reset" class="btn" value="<?php print $text_cancel; ?>" />
2012-02-08 23:14:28 +01:00
</div>
</form>
2013-04-05 10:16:33 +02:00
<?php if($error) { ?>
<div class="alert alert-error"><?php print $text_error; ?>: <?php print $error; ?></div>
<?php } ?>
2012-02-08 23:14:28 +01:00
<h4><?php print $text_existing_rules; ?></h4>
<?php if(isset($rules)){ ?>
2013-04-05 10:16:33 +02:00
<table id="ss1" class="table table-striped table-condensed">
<tr class="domainrow">
<th><?php print $text_from; ?></th>
<th><?php print $text_to; ?></th>
<th><?php print $text_subject; ?></th>
2015-03-11 12:54:31 +01:00
<th><?php print $text_body; ?></th>
2013-04-05 10:16:33 +02:00
<th><?php print $text_spam; ?></th>
<th><?php print $text_size; ?></th>
<th><?php print $text_attachment_name; ?></th>
2013-04-05 10:16:33 +02:00
<th><?php print $text_attachment_type; ?></th>
<th><?php print $text_attachment_size; ?></th>
<th>&nbsp;</th>
</tr>
2012-02-08 23:14:28 +01:00
<?php foreach($rules as $rule) { ?>
2013-04-05 10:16:33 +02:00
<tr class="domainrow">
<td><?php print htmlentities($rule['from']); ?></td>
<td><?php print htmlentities($rule['to']); ?></td>
<td><?php print htmlentities($rule['subject']); ?></td>
<td><?php print htmlentities($rule['body']); ?></td>
2013-04-05 10:16:33 +02:00
<td><?php if($rule['spam'] == -1) { print "-"; } else if($rule['spam'] == 0) { print $text_not_spam; } else { print $text_spam; } ?></td>
<td><?php if($rule['size'] > 0) { print $rule['_size']; ?> <?php print $rule['size']; } ?></td>
<td><?php print htmlentities($rule['attachment_name']); ?></td>
<td><?php print htmlentities($rule['attachment_type']); ?></td>
2013-04-05 10:16:33 +02:00
<td><?php if($rule['attachment_size'] > 0) { print $rule['_attachment_size']; ?> <?php print $rule['attachment_size']; } ?></td>
<td><a href="index.php?route=policy/removearchiving&amp;id=<?php print $rule['id']; ?>"><?php print $text_remove; ?></a></td>
</tr>
2012-02-08 23:14:28 +01:00
<?php } ?>
2013-04-05 10:16:33 +02:00
</table>
2012-02-08 23:14:28 +01:00
<?php } else { ?>
2013-04-05 10:16:33 +02:00
<div class="alert alert-error lead">
2012-02-08 23:14:28 +01:00
<?php print $text_not_found; ?>
2013-04-05 10:16:33 +02:00
</div>
2012-02-08 23:14:28 +01:00
<?php } ?>
<div>
2013-04-17 21:45:02 +02:00
<input type="button" class="btn btn-danger" onclick="Piler.reload_piler();" value="<?php print $text_apply_changes; ?>" /> <span id="applyChangesOutput"></span>
</div>