<html>
<head>
<link rel="stylesheet" type="text/css" href="||nwimg||/tspeak_main.css" />
<script type="text/javascript">
<!--
function setTitle(){
	||ifequal||top||_top||
		window.top.document.title = "||cust_title|| - ||current_user|| - SPAM CONTROL";
	||endif||
}

function save_friends()
{
	if (document.configform.friends[0].checked) {
		document.configform.postcmd.value = "lcmd=user_friend_save&friend_mode=disabled&recent_out_auto=on";
		document.configform.submit();
	}
	else {
		document.configform.postcmd.value = "lcmd=user_friend_save&friend_mode=smite&friend_smite=1&recent_out_auto=on";
		document.configform.submit();
	}
}

function save_spam()
{
	if (document.configform.spam[0].checked) {
		document.configform.postcmd.value = "lcmd=user_spam_save&spam_store=0&spam_bounce=0&spam_vanish=0";
		document.configform.submit();
	}
	else {
		document.configform.postcmd.value = "lcmd=user_spam_save&spam_store=5&spam_bounce=0&spam_vanish=0";
		document.configform.submit();
	}
}

function save_spf()
{
	if (document.configform.spf[0].checked) {
		document.configform.postcmd.value = "lcmd=user_save_spf&spf_block=false";
		document.configform.submit();
	}
	else {
		document.configform.postcmd.value = "lcmd=user_save_spf&spf_block=true";
		document.configform.submit();
	}
}
//-->
</script>
<title>SPAM CONTROL</title>
	<link rel="StyleSheet" href="||nwimg||/skin.css" type="text/css">
	<script type="text/javascript" src="||nwimg||/script_cmd.js"></script>
||include||css_blue.tpl||
||include||color.dat||
</head>

<body bgcolor="||color_prime||" >
<form name="configform" method="post" action="||action||">
	<input type="hidden" name="cmd" value="config" />
	<input type="hidden" name="page" value="config_surge" />
	<input type="hidden" name="utoken" value="||utoken||" />

	<input type="hidden" name="postcmd" value="" />

||ifdef||error||
	||include||errorinline.tpl||
||endif||

||ifdef||msg||
	||include||msginline.tpl||
||endif||

<!-- Save CMD -->
||ifdef||postcmd||
	||post_cmd||(||user_cgi_http_prefix||/cgi/user.cgi?cmd=auto_login&||postcmd||&show=na_msg.xml&vhost=||vhost||)||
||endif||

||ifinstr||surgemail_disallow||friends||
||else||
<!-- Get Friends settings -->
	||define||xcmd||lcmd=user_load_fcommon&show=na_friends.xml||
	||post_cmd||(||user_cgi_http_prefix||/cgi/user.cgi?cmd=auto_login&||xcmd||&vhost=||vhost||)||
<!--
friend_mode = '||friend_mode||'<br />
-->
||endif||

||ifinstr||surgemail_disallow||spam||
||else||
<!-- Get Spam settings -->
	||define||xcmd||lcmd=user_spam_load&show=na_spam.xml||
	||post_cmd||(||user_cgi_http_prefix||/cgi/user.cgi?cmd=auto_login&||xcmd||&vhost=||vhost||)||

<!--
spam_store = '||spam_store||'<br />
spam_bounce = '||spam_bounce||'<br />
spam_vanish = '||spam_vanish||'<br />
-->
	||undef||spam_enable||
	||ifgreater||spam_store||0||
		||define||spam_enable||true||
	||else||
		||ifequal||spam_store||-1||
			||define||spam_enable||true||
		||endif||
	||endif||
	||ifgreater||spam_bounce||0||
		||define||spam_enable||true||
	||else||
		||ifequal||spam_bounce||-1||
			||define||spam_enable||true||
		||endif||
	||endif||
	||ifgreater||spam_vanish||0||
		||define||spam_enable||true||
	||else||
		||ifequal||spam_vanish||-1||
			||define||spam_enable||true||
		||endif||
	||endif||
||endif||

||ifinstr||surgemail_disallow||spf||
||else||
<!-- Get SPF settings -->
	||define||xcmd||lcmd=user_load_spf&show=na_spf.xml||
	||post_cmd||(||user_cgi_http_prefix||/cgi/user.cgi?cmd=auto_login&||xcmd||&vhost=||vhost||)||

	||undef||spf_enable||
	||ifequal||spf_status||true||
		||define||spf_enable||true||
	||endif||
||endif||

<table width="100%" cellspacing="2">
<tr><td colspan="2">&nbsp;</td></tr>
<tr>
	<td align="center">

||undef||using_https||
||ifnempty||user_cgi_http_prefix||
	||ifinstr||user_cgi_http_prefix||https:||
		||define||using_https||true||
	||endif||
||else||
	||ifinstr||http_action||https:||
		||define||using_https||true||
	||endif||
||endif||
||ifdef||using_https||
<table border="1" cellpadding="0" cellspacing="0"  bgcolor="#FFFFFF" width="100%">
	<tr>	<td>
		<table cellpadding="5" bgcolor="#FFFFFF">
		<tr>
			<td class="LF">
				The command: <b>'<a href="||post_cmd_sent||">||lchop||post_cmd_sent||40||</a>'</b><br>
				is attempting to talk to an HTTPS server, which does not work you need to setup the
				webmai.ini setting:<br>
				&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
||define||xshow||imaphost||
||ifempty||xshow||||define||xshow||pophost||||endif||
||ifempty||xshow||||define||xshow||mail.server.com||||endif||
				<b>user_cgi_http_prefix http://||xshow||:7080</b><br>

				To correctly point to surgemail's http user.cgi location.

				<br>&nbsp;<br>
				Due to this error, the details below could be incorrect.
			</td>
		</tr>
		</table>
		</td>
	</tr>
</table>
<br>
||endif||

||ifdef||post_cmd_failed||
<table border="1" cellpadding="0" cellspacing="0"  bgcolor="#FFFFFF" width="100%">
	<tr>	<td>
		<table cellpadding="5" bgcolor="#FFFFFF">
		<tr>
			<td class="LF">
				The command: <b>'<a href="||post_cmd_sent||">||lchop||post_cmd_sent||40||</a>'</b><br>
				failed and returned the error:<br>
				&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
				<b>'||post_cmd_failed||'</b>
				<br>&nbsp;<br>
				This could be caused by the mail server being currently unavailable.<br>
				Or that you will need to setup the webmail.ini setting:<br>
				&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
||define||xshow||imaphost||
||ifempty||xshow||||define||xshow||pophost||||endif||
||ifempty||xshow||||define||xshow||mail.server.com||||endif||
				<b>user_cgi_http_prefix http://||xshow||:7080</b><br>

				To correctly point to surgemail's user.cgi location.

				<br>&nbsp;<br>
				Due to this error, the details below could be incorrect.

			</td>
		</tr>
		</table>
		</td>
	</tr>
</table>
<br>
||endif||

	<table border="1" cellpadding="0" cellspacing="0"  bgcolor="#FFFFFF" width="100%">
	<tr>
		<td bgcolor="||color_menu||" colspan="2">
			<table border="0" cellspacing="0" cellpadding="0" width="100%">
			<tr>
				<th width="100%">||lang_str||Spam Control||</th>
			<!--	<td align="right"><a href="javascript:document.config_personal.submit()"><img border="0" src="||nwimg||/msg_save.gif" alt="Set Template Set" /></a></td> -->
			</tr>
			</table>
		</td>
	</tr>
	<tr><td>
		<table cellpadding="5" cellspacing="0" width="100%">

||ifinstr||surgemail_disallow||friends||
||else||
		<tr>
			<td nowrap="nowrap"><b>Friends:</b></td>
			<td >	<input type="radio" name="friends" class="clear" value="on" onClick="alert(1)" disabled ||ifnequal||friend_mode||disabled||checked="checked"||endif||/> On
				<input type="radio" name="friends" class="clear" value="off" disabled ||ifequal||friend_mode||disabled||checked="checked"||endif||/> Off
			</td>
			||ifequal||(||check_id||11||)||true||
				<td><a href="||action||?cmd=netwin_login_id-11&amp;utoken=||utoken||&amp;&amp;">Pending Emails</a></td>
			||endif||

			||ifequal||(||check_id||1||)||true||
				<td><a href="||action||?cmd=netwin_login_id-1&amp;utoken=||utoken||&amp;&amp;">Advanced</a></td>
			||endif||
		</tr>
		<tr>	<td>&nbsp;</td>
			<td align="center"> <a href="javascript:save_friends();"><b>||ifequal||friend_mode||disabled||Enable Friends||else||Disable Friends||endif||</b></a> </td>
		</tr>
		<tr>	<td>&nbsp;</td></tr>
||endif||

||ifinstr||surgemail_disallow||spam||
||else||

		<tr>
			<td nowrap="nowrap" ><b>Spam Filtering:</b></td>
			<td ><input type="radio" name="spam" class="clear" value="on" disabled ||ifdef||spam_enable||checked="checked"||endif||/> On
				<input type="radio" name="spam" class="clear" value="off" disabled ||ifndef||spam_enable||checked="checked"||endif||/> Off
			</td>

			||ifequal||(||check_id||10||)||true||
				<td><a href="||action||?cmd=netwin_login_id-10&amp;utoken=||utoken||&amp;&amp;">Held Emails</a></td>
			||endif||

			||ifequal||(||check_id||4||)||true||
				<td><a href="||action||?cmd=netwin_login_id-4&amp;utoken=||utoken||&amp;&amp;">Advanced</a></td>
			||endif||
		</tr>
		<tr>	<td>&nbsp;</td>
			<td align="center"> <a href="javascript:save_spam();"><b>||ifdef||spam_enable||Disable Spam Filtering||else||Enable Spam Filtering||endif||</b></a> </td>
		</tr>
		<tr>	<td>&nbsp;</td></tr>
||endif||

||ifinstr||surgemail_disallow||spf||
||else||
		<tr>
			<td nowrap="nowrap" ><b>SPF:</b></td>
			<td ><input type="radio" name="spf" class="clear" value="on" disabled ||ifdef||spf_enable||checked="checked"||endif||/> On
				<input type="radio" name="spf" class="clear" value="off" disabled ||ifndef||spf_enable||checked="checked"||endif||/> Off
			</td>

			||ifequal||(||check_id||12||)||true||
				<td><a href="||action||?cmd=netwin_login_id-12&amp;utoken=||utoken||&amp;&amp;">Advanced</a></td>
			||endif||
		</tr>
		<tr>	<td>&nbsp;</td>
			<td align="center"> <a href="javascript:save_spf();"><b>||ifdef||spf_enable||Disable SPF||else||Enable SPF||endif||</b></a> </td>
		</tr>
||endif||
		</table>
	</td></tr>
	</table>
	</td>
</tr>
</table>

<br />
</center>
</form>

</body>
</html>
