<html>
||include||meta.tpl||
<head>

||define||ts_profile_name||(||profile_name||)||

<link rel="stylesheet" type="text/css" href="||nwimg||||tpl_color||/surge.css" />

<!--- determine if the WYSIWYG should be displayed
||define||wys_height||150||
||define||wys_width||600||

||define||x_pro_sig||(||ifnempty||my_pro_sig||||my_pro_sig||||else||||pro_sig||||endif||)||
||define||x_pro_sig||(||convert_text||x_pro_sig||)||

||undef||wys||
||ifinstr||ie_version||7.|| ||ifinstr||win_nt_ver||6.|| ||define||vista_nowys||true|| ||endif|| ||endif||
||ifinstr||ie_version||8.|| ||ifinstr||win_nt_ver||6.|| ||define||vista_nowys||true|| ||endif|| ||endif||
||ifndef||is_mac||
||ifndef||vista_nowys||
||ifdef||ie_version||
	||ifequal||_auto_wysiwyg||true||
		||define||wys||true||
	||endif||
||endif||
||endif||
||endif||
-->
<script type="text/javascript">
<!--
function setnew(str,sms){
	var use_html = str.substring(0, str.indexOf('/'));
	var profile = str.substring(str.indexOf('/')+1,str.length);
	if (sms)
		document.configform._sms_profile.value=profile;
	else
		document.configform._default_profile.value=profile;
||ifndef||is_mac||
||ifndef||vista_nowys||
||ifdef||ie_version||
	document.configform._auto_wysiwyg.value=use_html;
||endif||
||endif||
||endif||
	document.configform.cmd.value="profile-"+profile;
	document.configform.submit();
}

function delete_profile(){
	document.configform.cmd.value="profile_delete";
	document.configform.submit();
}

function add_profile(){
	document.configform.cmd.value = "profile_add";
	document.configform.submit();
}
//-->
</script>
<script type="text/javascript" src="||common_files||/util.js"></script>
<script type="text/javascript" src="||nwimg||/layout.js"></script>
<title>||cust_title|| - ||lang_str||Signatures||</title>
</head>

<body class="body" onload="doresize();" onresize="doresize()">

||include||_layout_start.tpl||

||ifdef||error||
	||include||_errorinline.tpl||
||endif||
||ifdef||msg||
	||include||_msginline.tpl||
||endif||

<form name="configform" method="post" action="||action||">
<input type="hidden" name="force_connection" value="true" />
<input type="hidden" name="cmd" value="profile_add" />
<input type="hidden" name="host_name0" value="||host_name0||" />
<input type="hidden" name="host_user0" value="||host_user0||" />
<input type="hidden" name="host_prefix0" value="||host_prefix0||" />
<input type="hidden" name="page" value="config_signature" />
<input type="hidden" name="utoken" value="||utoken||" />
<input type="hidden" name="my_pro_sig" value="" />
<input type="hidden" name="my_profile_name" value="" />
<input type="hidden" name="_ns_wysiwyg" value="||_ns_wysiwyg||" />
<center>
<p><div class="LF b">||lang_str||Signatures||</div></p>

<table class="LT" border="0" width="95%" cellspacing="0" cellpadding="2">
<tr class="bg1">
	<th width="10%">||lang_str||Name||</th>
	<th width="80%">||lang_str||Value||</th>
	<th></th>
	<th></th>
</tr>

||define||color||1||
||begin_profile||
<tr class="L||color||">
	||ifequal||color||1||
		||define||color||0||
	||else||
		||define||color||1||
	||endif||
	<td><a href="||action||?cmd=profile-||encode_text||profile_name||&encode_text=cmd&_auto_wysiwyg=||ifinstr||pro_sig||<html||true||else||no||endif||&page=config_signature&amp;utoken=||utoken||&amp;force_connection=true">||html_text||profile_name||</a></td>
	<td>
	||ifdef||pro_sig||
		<script type="text/javascript">
		<!--
		document.write("||message_text||pro_sig||");
		//-->
		</script>
	||else||
		(||lang_str||No Signature||)
	||endif||
	</td>
	<td><a href="||action||?cmd=profile-||encode_text||profile_name||&encode_text=cmd&_auto_wysiwyg=||ifinstr||pro_sig||<html||true||else||no||endif||&page=config_signature&utoken=||utoken||&force_connection=true">||lang_str||Edit||</a></td>
	<td>&nbsp;<a href="||action||?cmd=profile_delete&profile_name=||encode_text||profile_name||&encode_text=profile_name&utoken=||utoken||&page=config_signature&force_connection=true&&">||lang_str||Delete||</a></td>
</tr>
||end_profile||
</table>

<br />
<table cellpadding="5" class="bg1">
<tr><td class="c" colspan="4"><a class="LF" href="||action||?cmd=config&amp;force_connection=true&amp;utoken=||utoken||&amp;&amp;">||lang_str||Back to options||</a></td></tr>
<tr>
	<td class="rt LF">||lang_str||Signature Name|| </td>
	<td><input type="text" name="profile_name" size="12" value="||ifnempty||my_profile_name||||html_text||my_profile_name||||else||||html_text||ts_profile_name||||endif||" /></td>
	||ifdef||wys||
		<td class="rt"><input type="button" class="btn" onclick="obj_editor=tbCE; tbCE_guardar(); do_save(); return false;" value="||lang_str||Save Signature||" /></td>
	||else||
		<td class="rt"><input type="button" class="btn" onclick="add_profile();" value="||lang_str||Save Signature||" /></td>
	||endif||
</tr>
||ifdef||wys||
<tr>
	<td class="rt LF">||lang_str||Signature|| </td>
	<td colspan="3">
		<input type="hidden" name="pro_sig" value="||html_text||x_pro_sig||" />
		||include||ie_htmltext.tpl||
	</td>
||else||
<tr>
	<td class="rt LF">||lang_str||Signature|| </td>
||ifequal||match_lang||japanese||
	<td colspan="3"><textarea name="pro_sig" rows="8" cols="40">||x_pro_sig||</textarea></td>
||else||
	<td colspan="3"><textarea name="pro_sig" rows="8" cols="70">||x_pro_sig||</textarea></td>
||endif||
||endif||
</tr>
<tr>
	<td nowrap class="rt LF">||lang_str||Default Signature|| </td>
	<td valign="top"><select name="sel_profile" size="1" onchange="setnew(this.value,false)">
	||undef||done_profile||
	||begin_profile||
		||define||done_profile||true||
		||ifnequal||_default_profile||profile_name||
			<option value="||ifinstr||pro_sig||<html||true||else||no||endif||/||html_text||profile_name||">||profile_name||</option>
		||else||
			<option value="||ifinstr||pro_sig||<html||true||else||no||endif||/||html_text||profile_name||" selected="selected">||profile_name||</option>
		||endif||
	||end_profile||
	||ifndef||done_profile||<option> </option>||endif||
	</select>
	</td>
	<input type="hidden" name="_default_profile" value="||_default_profile||">
	||ifndef||is_mac||
	||ifndef||vista_nowys||
	||ifdef||ie_version||
	<td class="rt">
		<select name="_auto_wysiwyg" onChange="config_wysiwyg()">
			<option value="no">||lang_str||PlainText Editor||</option>
			<option value="true" ||ifdef||wys|| selected="selected"||endif||>||lang_str||Html Text Editor||</option>
		</select>
	</td>
	||endif||
	||endif||
	||endif||
</tr>
||ifdef||surgemail||
	||ifinstr||surgemail_disallow||sms||
	||else||
		||ifdef||use_surgemail_xfile||
<tr>
	<td nowrap class="rt LF">||lang_str||SMS Signature|| </td>
	<td valign="top"><select name="sel_profile2" size="1" onchange="setnew(this.value,true)">
		<option value="">(||lang_str||none||)</option>
	||undef||done_profile||
	||begin_profile||
		||define||done_profile||true||
		||ifnequal||_sms_profile||profile_name||
			<option value="||ifinstr||pro_sig||<html||true||else||no||endif||/||html_text||profile_name||">||profile_name||</option>
		||else||
			<option value="||ifinstr||pro_sig||<html||true||else||no||endif||/||html_text||profile_name||" selected="selected">||profile_name||</option>
		||endif||
	||end_profile||
	||ifndef||done_profile||<option> </option>||endif||
	</select>
	</td>
	<input type="hidden" name="_sms_profile" value="||_sms_profile||">
</tr>
		||endif||
	||endif||
||endif||
<tr>
	<td class="c" colspan="4"><p><b>||lang_str||Note||:</b> ||lang_str||To add a new signature all you need to do is change the "Signature Name" and click save||.</p></td>
</tr>
</table>
||ifdef||netscape_version||
<div id="nsnote" style="position:absolute; visibility: hidden" >
	<table>
	<tr>
		<td><b>||lang_str||Note: To use the Html Text Editor on Netscape you need to install a few Plug-in's||<br />
				||lang_str||For more information click this link|| '<a href="||action||?cmd=show&utoken=||utoken||&page=plugin.tpl">||lang_str||Plugin Info||</a>'</b>
		</td>
	</tr>
	</table>
</div>
||endif||
</center>
||ifdef||ie_version||
	<script type="text/javascript">
	<!--
		function get_select(d)
		{
			data = "";
			for (i=0;i<d.length;i++) {
				if (d[i].selected) {
					data = d[i].value;
					if (!data.length)
						data = d[i].text;
				}
			}
			return data;
		}
		function config_wysiwyg()
		{
			if (get_select(document.configform._auto_wysiwyg) == "no")  {
				tbCE_guardar();
			}
			document.configform.cmd.value = "show";
			document.configform.submit();
		}
	// -->
	</script>
||endif||
||ifdef||wys||
	<script type="text/javascript">
	<!--
		function salvar_html(htmlcode)
		{
			document.configform.pro_sig.value = htmlcode;
		}
		function do_save()
		{
			document.configform.cmd.value = "profile_add";
			document.configform.submit();
		}
		function do_wys()
		{
			document.configform.my_pro_sig.value = document.configform.pro_sig.value;
			document.configform.my_profile_name.value = document.configform.profile_name.value;
			document.configform.cmd.value = "profile";
			document.configform._ns_wysiwyg.value='false';
			document.configform.submit();
		}

		tbCE_update(document.configform.pro_sig.value);
		wysiwyg_start();
	// -->
	</script>
||endif||
</form>
</body>
</html>
