Location: PHPKode > projects > CsWebmail > cswebmail-3.10/cswebmail-3.10/templates/ProcmailRule_edit_presentation.php
<?if(VALID_DOCUMENT != 1) die('what?');
$mailbox_names = get_mailboxes_names();
unset($mailbox_names['INBOX']);
?>

<tr><th colspan="2">Add New Filter Rule</th></tr>

<tr>
<td>Name</td>
<td><input name="name" value="<?=$this->name?>" size="30" type="text"/></td>
</tr>

<?for($ci=0;$ci<3;$ci++){?>

<tr>
<td>Condition (<?=$ci+1?>)</td>
<td>
<select name="header-field[<?=$ci?>]">
<?foreach($GLOBALS['HEADER_FIELDS'] as $k=>$v){?>
<option value="<?=$v?>" <?=$this->rule['header-field'][$ci]==$v?'selected':''?>><?=$k?></option>
<?}?>
</select>
<select name="condition[<?=$ci?>]" size="1">
<?foreach($GLOBALS['CONDITIONS'] as $k=>$v){?>
<option value="<?=$v?>" <?=$this->rule['condition'][$ci]==$v?'selected':''?>><?=$k?></option>
<?}?>
</select>
<input name="pattern[<?=$ci?>]" value="<?=$this->rule['pattern'][$ci]?>" size="30" type="text"/>
</td>
</tr>
<?}?>

<tr>
<td>Action</td>
<td>
<input name="rule-action" value="move-mbox" type="radio" <?=($this->rule['rule-action']=='move-mbox' || $this->rule['rule-action']=='')?'checked':''?>/>

Move Folder:
<select name="move-mbox">
<?foreach($mailbox_names as $k=>$v){?>
<option value="<?=$v?>" <?=$this->rule['action']==basename($v)?'selected':''?>><?=$k?></option>
<?}?>
</select>
<br/>
<input name="rule-action" value="forward-email" type="radio" <?=$this->rule['rule-action']=='forward-email'?'checked':''?>/>
Forward to Email Address: <input name="forward-email" size="30" type="text" value="<?=$this->rule['rule-action']=='forward-email'?$this->rule['action']:''?>"/>
<br/>
<input name="rule-action" value="discard-email" type="radio" <?=$this->rule['rule-action']=='discard-email'?'checked':''?>/>
Discard Email
</td>
</tr>

<tr><td colspan="2">
<b>Quick tutorial:</b>
<ol>
<li> <i>Condition</i> rules equivalent to AND operation between rules</li>
<li> <i>Matches condition</i> rule is <a href="http://www.perlcode.org/tutorials/procmail/regular_expressions.pod">regular expression</a> for some header</li>
<li> <i>Move Folder</i> action move email to some folder rather than INBOX.<br/>
If you want move email to non-exist folder, first <a href="<?=$_SERVER['PHP_SELF']?>?action=folders">create it</a> and then choose it in drop down menu</li>
</ol>
</td></tr>
Return current item: CsWebmail