<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
||ifinstr||netscape_version||4.||
	||define||feild_width||20||
||else||
	||define||feild_width||35||
||endif||
<html>
<head>
<script type="text/javascript">
<!--
function setTitle(){
	||ifequal||top||_top||
		window.top.document.title = "||cust_title|| - ||current_user|| - Filtering Rules";
	||endif||
}
function HiddenFields(){
	if (document.configform.flt_type[0].checked == true) {
		document.configform.flt_dstfld.value = document.configform.movefld.value;
		document.configform.flt_box.value = 'Move';
	}
	else if (document.configform.flt_type[1].checked == true) {
		document.configform.flt_dstfld.value = document.configform.copyfld.value;
		document.configform.flt_box.value = 'Copy';
	}
	else if (document.configform.flt_type[2].checked == true) {
		if (document.configform.del.checked == true)
			document.configform.flt_forward.value = 'Forward (Del)';
		else
			document.configform.flt_forward.value = 'Forward';
	}
}
//-->
</script>
||just_include||configfcss.tpl||
<title>Filtering Rules</title>
</head>

<body background="||cust_panel_background||" bgcolor="||cust_panel_bgcolor||" onload="setTitle();">

||begin_rules||
||ifnempty||r_headers_x||
	||define||flt_num||n||
||endif||
||end_rules||
||define||flt_num||(||add||flt_num||1||)||

<form name="configform" method="post" action="||action||" onsubmit="HiddenFields();">
	<input type="hidden" name="cmd" value="filter_add" />
	<input type="hidden" name="utoken" value="||utoken||" />
	<input type="hidden" name="flt_old_pos" value="||flt_old_pos||" />
	<input type="hidden" name="flt_box" value="" />
	<input type="hidden" name="flt_forward" value="" />
	<input type="hidden" name="flt_dstfld" value="" />
	<center>
	<p>&nbsp;</p>
<table width="85%" cellspacing="2">
<tr>
	<td align="center">
		<table cellpadding="5" bgcolor="#eeeeff">
		<tr>
			<td bgcolor="#D6D6CE">
				<table border="0" cellspacing="0" cellpadding="0" width="100%">
				<tr>
					<th width="100%">Email Filtering Rules</th>
					<td align="right" nowrap="nowrap"><a href="||action||?cmd=help&amp;goto_page=help_change_settings&amp;goto_hash=filter&amp;utoken=||utoken||&amp;&amp;" target="Help"><img border="0" alt="Help on Filtering Rules" src="||nwimg||/smallhelp.gif" /></a><img height="1" width="10" src="||nwimg||/space.gif" alt="" /><a href="||action||?cmd=config&amp;force_connection=true&amp;utoken=||utoken||"><img border="0" alt="Back to main options page" src="||nwimg||/smallback.gif" /></a></td>
				</tr>
				</table>
			</td>
		</tr>
		<tr>
			<td colspan="3" nowrap="nowrap" class="bold">
				If the
				<select name="flt_header" size="1">
					<option ||ifequal||flt_header||From||selected||endif|| value="From">From</option>
					<option ||ifequal||flt_header||Subject||selected||endif|| value="Subject">Subject</option>
					<option ||ifequal||flt_header||To||selected||endif|| value="To">To</option>
					<option ||ifequal||flt_header||Cc||selected||endif|| value="Cc">Cc</option>
					<option ||ifequal||flt_header||To or Cc||selected||endif|| value="To or Cc">To or Cc</option>
					<option ||ifequal||flt_header||Reply-to||selected||endif|| value="Reply-to">Reply-to</option>
					<option ||ifequal||flt_header||Email Body||selected||endif|| value="Email Body">Email Body</option>
					||ifinstr||extended_filter||x-spamdetect||
						<option ||ifequal||flt_header||X-SpamDetect||selected||endif|| value="X-SpamDetect" >||lang_str||X-SpamDetect||</option>
					||endif||
					||ifinstr||extended_filter||x-spam-level||
						<option ||ifequal||flt_header||X-Spam-Level||selected||endif|| value="X-Spam-Level" >||lang_str||X-Spam-Level||</option>
					||endif||
					||ifinstr||extended_filter||x-spam-score||
						<option ||ifequal||flt_header||X-Spam-Score||selected||endif|| value="X-Spam-Score" >||lang_str||X-Spam-Score||</option>
					||endif||
					||ifinstr||extended_filter||x-orbs-stamp||
						<option ||ifequal||flt_header||X-ORBS-Stamp||selected||endif|| value="X-ORBS-Stamp" >||lang_str||X-ORBS-Stamp||</option>
					||endif||
					||ifinstr||extended_filter||sender||
						<option ||ifequal||flt_header||Sender||selected||endif|| value="Sender" >||lang_str||Sender||</option>
					||endif||
					||ifinstr||extended_filter||list-id||
						<option ||ifequal||flt_header||List-Id||selected||endif|| value="List-Id" >||lang_str||List-Id||</option>
					||endif||
					||ifinstr||extended_filter||list-post||
						<option ||ifequal||flt_header||List-Post||selected||endif|| value="List-Post" >||lang_str||List-Post||</option>
					||endif||
					||ifinstr||extended_filter||x-perlmx-spam||
						<option ||ifequal||flt_header||X-PerlMx-Spam||selected||endif|| value="X-PerlMx-Spam" >X-PerlMx-Spam</option>-->
					||endif||
				</select>
				section contains
				<input type="text" size="40" maxlength="190" name="flt_contains" value="||html_text||flt_contains||" />
				&nbsp;&nbsp;
				<input type="checkbox" name="flt_iscase" value="true" ||is_checked||flt_iscase|| />
				Case Sensitive
			</td>
		</tr>
		<tr>
			<td>
				<table border="0">
				<tr nowrap="nowrap">
					<td class="bold">Then</td>
					<td><input type="radio" name="flt_type" value="box" ||ifequal||flt_action||move||checked="checked"||else||||ifndef||flt_action||checked="checked"||endif||||endif|| />
					<td class="bold">
						Move to folder&nbsp;
						<select name="movefld" size="1" onfocus="document.configform.flt_type[0].checked = true">
						||begin_xfld_short||
							<option value="||fld_name||" ||ifequal||flt_dstfld||fld_name||selected||endif||>||lang||fld_name||</option>
						||end_xfld_short||
						</select>
					</td>
				</tr>
				<tr nowrap="nowrap">
					<td>&nbsp;</td>
					<td><input type="radio" name="flt_type" value="box" ||ifequal||flt_action||copy||checked="checked"||endif|| />
					<td class="bold">
						Copy to folder&nbsp;
						<select name="copyfld" size="1" onfocus="document.configform.flt_type[1].checked = true">
						||begin_xfld_short||
							<option value="||fld_name||" ||ifequal||flt_dstfld||fld_name||selected||endif||>||lang||fld_name||</option>
						||end_xfld_short||
						</select>
					</td>
				</tr>
				<tr nowrap="nowrap">
					<td>&nbsp;</td>
					<td><input type="radio" name="flt_type" value="forward" ||ifinstr||flt_action||forward||checked="checked"||endif|| />
					<td class="bold">
						Forward to Email address
						<input type="text" size="||feild_width||" maxlength="190" name="flt_address" value="||html_text||flt_address||" onfocus="document.configform.flt_type[2].checked = true" />
						&nbsp;
						<input type="checkbox" name="del" value="true"||ifinstr||flt_action||forward|| ||ifinstr||flt_action||del||checked="checked"||endif||||endif|| />
						Delete forwarded Email
					</td>
				</tr>
				<tr nowrap="nowrap">
					<td>&nbsp;</td>
					<td><input type="radio" name="flt_type" value="delete" ||ifequal||flt_action||delete||checked="checked"||endif|| />
					<td class="bold">
						Delete
					</td>
				</tr>
				||ifgreater||flt_old_pos||0||
				<tr>
					<td>&nbsp;</td>
					<td colspan="2">
						<input type="button" value="New Filter" onclick="document.location = '||action||?cmd=config&force_connection=true&page=config_rules&utoken=||utoken||&&';" />
						<input type="submit" name="filter_add" value="Update Filter" />

				||else||
				<tr>
					<td>&nbsp;</td>
					<td colspan="2">
						<input type="submit" name="filter_add" value="Add Filter" />
				||endif||
						At Filter Position
						<select name="flt_pos">
							||begin_for||1||40||
							||ifgreater||flt_num||for||
								<option value="||for||" ||ifequal||flt_old_pos||for||selected="selected"||endif||>||for||</option>
							||endif||
							||end_for||
							||ifdef||flt_old_pos||
								<option value="||flt_num||">||flt_num||</option>
							||else||
								<option value="||flt_num||" selected="selected">||flt_num||</option>
							||endif||
						</select>
					</td>
				</tr>
				</table>
			</td>
		</tr>

		<tr>
			<td>
				<table border="0" width="100%" cellspacing="1" cellpadding="1">
				<tr bgcolor="#D6D6CE">
					<th>Position</th>
					<th width="100%">Filter</th>
					<th>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</th>
				</tr>

				||begin_rules||
				||ifnempty||r_headers_x||
				<tr>
					<td ||ifequal||flt_old_pos||n||bgcolor="#FFC0C0"||endif|| align="center" class="bold">
						<a href="||action||?cmd=filter_up-||n||&utoken=||utoken||&&"><img border="0" src="||nwimg||/smallup.gif" alt="Move this filter up one position in the list" /></a>
						||n||
						<a href="||action||?cmd=filter_down-||n||&utoken=||utoken||&&"><img border="0" src="||nwimg||/smalldown.gif" alt="Move this filter down one position in the list" /></a>
					</td>
					<td ||ifequal||flt_old_pos||n||bgcolor="#FFC0C0"||endif|| ><a href="||action||?cmd=filter_show-||n||&utoken=||utoken||">

						If the '<b>||r_headers_x||</b>' section contains '<b>||r_contains||</b>'||ifequal||r_iscase||checked||<font size="-2">(Case Sensitive)</font>||endif||
							then
							<b>||r_action_x||</b>

							||ifnequal||r_action_x||delete||
								||ifinstr||r_action_x||forward||
									to '<b>||r_addr||</b>'
								||else||
									to '<b>||folder||</b>'
								||endif||
							||endif||
							</b>
						</a>
					</td>
					<td ||ifequal||flt_old_pos||n||bgcolor="#FFC0C0"||endif|| ><a href="||action||?cmd=filter_delete-||n||&utoken=||utoken||&&">delete</a></td>
				</tr>
				||endif||
				||end_rules||
				</table>

			</td>
		</tr>
		</table>
	</td>
</tr>
</table>
</center>
</form>
</body>
</html>
