{include file="$admin_nl_gentemplates/admin_nl_site_head.tpl"}
{literal}
<script>
function DeleteAttach(id_attach){
	if (confirm("{/literal}{$lang.newsletter.nls.conf_del_attach|escape:javascript}{literal}")){
		document.location = "change.php?del_attach="+id_attach;
	}
}
</script>
{/literal}
<div>
        <div class="panel_section" style="width: 100%">
        	<div class="panel_content" style="width: 97%">			
<form method="POST" action="change.php?id={$id}" enctype="multipart/form-data" name="myform" style="margin:0px">
<input type="hidden" name="action" value="change">
<input type="hidden" name="format" value="text">
<table width=100% border=0 cellspacing=0 cellpadding=0>

<tr><td valign="top"  align="left" class=blockplain>    

{if $message != ""}<font face="Verdana" style="font-size: 10px" color="red"><b>{$message}</b></font><br>{/if}
<table border=0 cellspacing=0 cellpadding=0 width="100%">
<tr>
	<td style="padding-bottom: 20px;">
		{$lang.newsletter.nls.send_date} {$smarty.now|date_format:"%A, %B %d, %Y"}):
		<br>
		<table><tr>
			<td><input style="width: 220px; margin-top: 10px;" type="text" name="date_send" value="{if $date_send == NULL} Newsletter is sent manually {else}{$date_send}{/if}" size=40 class="inpBox">
			<a href="#" title="{$lang.newsletter.nls.ind_send_date}" onClick="var CalendarWin = window.open('../calendar/calendar.htm','', 'resizable=no,scrollbars=no,location=no,directories=no,status=no,toolbar=no,menubar=no,width=165,height=165,left=250,top=150'); return false"><img src="{$site_root}{$template_root}/images/newsletter/c2.jpg" border="0" align="absmiddle"></a></td>
			<td>
				<a class="admin_button" onClick="document.myform.date_send.value='Newsletter is sent manually'">{$lang.newsletter.nls.nl_send_manual}<span>&nbsp;</span></a>
			</td>
			<td>&nbsp;<A style="vertical-align: top; margin-top: 10px;" onmouseover="doTooltip(event,9)" onmouseout=hideTip() href="#"><IMG src="{$site_root}{$template_root}/images/newsletter/icot.gif" width="12" height="12" border=0 align="absmiddle"></A></td>
		</tr></table>
	</td>
</tr>
<tr>
	<td style="padding-bottom: 20px;">
	{$lang.newsletter.nls.mailing_lists}:<br>
 	<select style="width: 220px; margin-top: 10px;" name=list[] tabindex="3" multiple size=5 class="inpBox">
				{if $lists}
 	{section name=k loop=$lists}
    <option value="{$lists[k].id}" {section name=j loop=$list_array} {if $lists[k].id == $list_array[j]} selected {/if} {/section}>{$lists[k].name} ({$lists[k].count} subscribers)
    </option>
    {/section}
				{else}
				<option style="width: 135px;">&nbsp;</option>
				{/if}
	</select>
&nbsp;<A style="vertical-align:text-top;" onmouseover=doTooltip(event,10) onmouseout=hideTip() href="#"><IMG src="{$site_root}{$template_root}/images/newsletter/icot.gif" width="12" height="12" border=0 align="absmiddle"></A>
<!--
		<b>Mailing lists:</b><br>
		<select name=list[] multiple size=5 class="inpBox" style="width: 200px">
		{section name=k loop=$lists}
			<option value="{$lists[k].id}" 
				{section name=j loop=$list_array}
					{if $lists[k].id == $list_array[j]} selected {/if}
				{/section}	
			>{$lists[k].name} ({$lists[k].count} subscribers)</option>
		{/section}
		</select>
		&nbsp;<A onmouseover=doTooltip(event,10) onmouseout=hideTip() href="#"><IMG src="{$site_root}{$template_root}/images/newsletter/icot.gif" width="12" height="12" border=0 align="absmiddle"></A>
-->	</td>
</tr>

<tr>
	<td style="padding-bottom: 20px;">
	{$lang.newsletter.nls.list_status}:<br>
	<select style="width: 220px; margin-top: 10px;" name=match_confirm id="match_list" class="inpBox" tabindex="2">
	<option value="0" {if $rel.match_confirm eq 0}selected{/if}>{$lang.newsletter.both}</option>
	<option value="1" {if $rel.match_confirm eq 1}selected{/if}>{$lang.newsletter.nls.confirm_subscr}</option>
	<option value="2" {if $rel.match_confirm eq 2}selected{/if}>{$lang.newsletter.nls.unconfirm_subscr}</option>
	</select>&nbsp;&nbsp;<A style="vertical-align:text-top;" onmouseover=doTooltip(event,71) onmouseout=hideTip() href="#"><IMG src="{$site_root}{$template_root}/images/newsletter/icot.gif" width="12" height="12" border=0 align="absmiddle"></A>
	</td>
</tr>
<tr>
	<td style="padding-bottom: 20px;">
	{$lang.newsletter.nls.general_status}:&nbsp;<br>
	<select style="width: 220px; margin-top: 10px;" name=match_status id="match_status" class="inpBox" tabindex="3">
	<option value="0" {if $rel.match_status eq 0}selected{/if}>{$lang.newsletter.both}</option>
	<option value="1" {if $rel.match_status eq 1}selected{/if}>{$lang.newsletter.nls.active}</option>
	<option value="2" {if $rel.match_status eq 2}selected{/if}>{$lang.newsletter.nls.inactive}</option>
	</select>&nbsp;&nbsp;<A style="vertical-align:text-top;" onmouseover=doTooltip(event,72) onmouseout=hideTip() href="#"><IMG src="{$site_root}{$template_root}/images/newsletter/icot.gif" width="12" height="12" border=0 align="absmiddle"></A>
	</td>
</tr>
<tr>
	<td style="padding-bottom: 20px;">
		{$lang.newsletter.nls.subject}:<br>
		<input style="width: 220px; margin-top: 10px;" type="text" name="subject" value="{$rel.subject}"  style="width: 400px" class="inpBox">
		 &nbsp;<A style="vertical-align:text-top;" onmouseover=doTooltip(event,12) onmouseout=hideTip() href="#"><IMG src="{$site_root}{$template_root}/images/newsletter/icot.gif" width="12" height="12" border=0 align="absmiddle"></A>
		<br>
	</td>
</tr>
<tr>
	<td style="padding-bottom: 20px;">
	{$lang.newsletter.nls.message}:<br><br>
	<input type="radio" name="bodyfrom" id="rad1" value="text" checked>&nbsp;{$lang.newsletter.nls.from_txt}
	  &nbsp;<A style="vertical-align:text-top; margin-left: 55px;" onmouseover=doTooltip(event,18) onmouseout=hideTip() href="#"><IMG src="{$site_root}{$template_root}/images/newsletter/icot.gif" width="12" height="12" border=0 align="absmiddle"></A>
	<br><br>
	<textarea name="body" cols=80 rows=20 onClick="javascript:rad1.checked=true;" class="inpBox">{$rel.body}</textarea><br><br>
	
    <div style="float: left; width: 150px; margin-right: 10px;"><input type="radio" name="bodyfrom" id="rad2" value="file">&nbsp;{$lang.newsletter.nls.from_txt_file}: &nbsp;&nbsp;&nbsp;</div>
    <input type="file" name="bodyfile" onClick="javascript:rad2.checked=true;" class="inpBox" size="17" style="width: 200px">
	 &nbsp;<A style="vertical-align:text-top;" onmouseover=doTooltip(event,19) onmouseout=hideTip() href="#"><IMG src="{$site_root}{$template_root}/images/newsletter/icot.gif" width="12" height="12" border=0 align="absmiddle"></A>
	
    <br><br>
	<div style="float: left; width: 150px; margin-right: 10px;"><input type="radio" name="bodyfrom" id="rad3" value="link">&nbsp;{$lang.newsletter.nls.OR_from_URL}:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</div>
    <input type="text" name="bodyurl" value="http://" style="width: 200px" onClick="javascript:rad3.checked=true;" class="inpBox">
	&nbsp;<A style="vertical-align:text-top;" onmouseover=doTooltip(event,16) onmouseout=hideTip() href="#"><IMG src="{$site_root}{$template_root}/images/newsletter/icot.gif" width="12" height="12" border=0 align="absmiddle"></A>
	<br><br>
<!--
	Attach file:&nbsp;<input type="file" name="attach" class="inpBox" style="width: 200px">
	&nbsp;<A onmouseover=doTooltip(event,17) onmouseout=hideTip() href="#"><IMG src="{$site_root}{$template_root}/images/newsletter/icot.gif" width="12" height="12" border=0 align="absmiddle"></A>
	<br><br>
	{if $count_attach > 0}
	Attached file(s):
	&nbsp;<A onmouseover=doTooltip(event,20) onmouseout=hideTip() href="#"><IMG src="{$site_root}{$template_root}/images/newsletter/icot.gif" width="12" height="12" border=0 align="absmiddle"></A>
	<br>
	<table cellpadding="2" cellspacing="5">
	{section name=j loop=$attach}
	<tr><td><a href="{$url_file}{$attach[j].file_name}" target="_blank">{$attach[j].file_name} ({$attach[j].file_size})</a></td><td><a href="#" onClick="DeleteAttach({$attach[j].id})">Delete file</a></td></tr>
	{/section}
	</table>
	{/if} -->
	</td>
</tr>
<tr>
	<td style="padding-bottom: 20px;">
	{$lang.newsletter.nls.attachments}:<br>
	 <select style="width: 220px; margin-top: 10px;" name="attaches[]" id="attaches" multiple size=5  tabindex="10" class="inpBox" style="width:300px;">
	 {section name=k loop=$attaches}
    	<option value="{$attaches[k].id}" {section name=j loop=$attach_array} {if $attaches[k].id == $attach_array[j]} selected {/if} {/section}>
     {$attaches[k].name} ({$attaches[k].file_size}). Description: {$attaches[k].description}
     </option>
	{/section}
	</select>
&nbsp;<A style="vertical-align:top;" onmouseover=doTooltip(event,17) onmouseout=hideTip() href="#"><IMG style="margin-top: 10px;" src="{$site_root}{$template_root}/images/newsletter/icot.gif" width="12" height="12" border=0 align="absmiddle"></A>
	</td>
</tr>
<tr>
	<td style="padding-bottom: 20px;">
		{$lang.newsletter.nls.priority}:<br>
			<select style="width: 220px; margin-top: 10px;" name="priority" class="inpBox" id="priority" style="width: 100px">
			{html_options values=$priority_values selected=$priority output=$priority_output}
			</select>
		&nbsp;<A style="vertical-align:text-top;" onmouseover=doTooltip(event,11) onmouseout=hideTip() href="#"><IMG src="{$site_root}{$template_root}/images/newsletter/icot.gif" width="12" height="12" border=0 align="absmiddle"></A>
	</td>
</tr>
<tr>
	<td style="padding-bottom: 20px;">
	{$lang.newsletter.nls.from_email}:<br>
	<input style="width: 220px; margin-top: 10px;" type="text" name="from_email" value="{$rel.from_email}" size=40 tabindex="11" class="inpBox" maxlength="255">
 	&nbsp;<A style="vertical-align:text-top;" onmouseover=doTooltip(event,73) onmouseout=hideTip() href="#"><IMG src="{$site_root}{$template_root}/images/newsletter/icot.gif" width="12" height="12" border=0 align="absmiddle"></A>
	</td>
</tr>
<tr>
	<td style="padding-bottom: 20px;">
	{$lang.newsletter.nls.from_name}:<br>
	<input style="width: 220px; margin-top: 10px;" type="text" name="from_name" value="{$rel.from_name}" size=40 tabindex="12" class="inpBox" maxlength="255">
 	&nbsp;<A style="vertical-align:text-top;" onmouseover=doTooltip(event,74) onmouseout=hideTip() href="#"><IMG src="{$site_root}{$template_root}/images/newsletter/icot.gif" width="12" height="12" border=0 align="absmiddle"></A>
	</td>
</tr>
<tr>
	<td style="padding-bottom: 20px;">
	{$lang.newsletter.nls.reply_to_email}:<br><input style="width: 220px; margin-top: 10px;" type="text" name="reply_to" value="{$rel.reply_to}" size=40 class="inpBox" tabindex="13" maxlength="255">
	&nbsp;<A style="vertical-align:text-top;" onmouseover=doTooltip(event,75) onmouseout=hideTip() href="#"><IMG src="{$site_root}{$template_root}/images/newsletter/icot.gif" width="12" height="12" border=0 align="absmiddle"></A>
	</td>
</tr>
<tr>
	<td style="padding-bottom: 20px;">
	<div style="float: left; width: 220px;">{$lang.newsletter.nls.notify_sending_starts}:<input style="margin-left: 35px;" type="checkbox" name="notify_start" value="1" {if $rel.notify_start}checked{/if}></div>
 &nbsp;&nbsp;<A onmouseover=doTooltip(event,76) onmouseout=hideTip() href="#"><IMG src="{$site_root}{$template_root}/images/newsletter/icot.gif" width="12" height="12" border=0 align="absmiddle"></A>
	</td>
</tr>
<tr>
	<td style="padding-bottom: 20px;">
	 <div style="float: left; width: 220px;">{$lang.newsletter.nls.notify_sending_finished}:<input type="checkbox" name="notify_end" value="1" {if $rel.notify_end}checked{/if}></div>
 &nbsp;&nbsp;<A onmouseover=doTooltip(event,77) onmouseout=hideTip() href="#"><IMG src="{$site_root}{$template_root}/images/newsletter/icot.gif" width="12" height="12" border=0 align="absmiddle"></A>
	</td>
</tr>
<tr>
	<td style="padding-bottom: 20px;">
	{$lang.newsletter.nls.email_for_notifications}:<br><input style="width: 220px; margin-top: 10px;" type="text" name="notify_email" value="{$rel.notify_email}" size=40 class="inpBox" maxlength="255">
	&nbsp;<A style="vertical-align:text-top;" onmouseover=doTooltip(event,78) onmouseout=hideTip() href="#"><IMG src="{$site_root}{$template_root}/images/newsletter/icot.gif" width="12" height="12" border=0 align="absmiddle"></A>	
	</td>
</tr>

</table>  
{*<table><tr height="40">
	<td>
		<a class="admin_button_major" onclick="javascript:document.myform.submit();">{$lang.newsletter.button.save}<span>&nbsp;</span></a>
		
	</td>
</tr></table>*}

</td>
</tr>
</table>     
</form>
</div>
</div>
<br>
<a class="admin_button_major" onclick="javascript:document.myform.submit();">{$lang.newsletter.button.save}<span>&nbsp;</span></a>
</div>
{include file="$admin_nl_gentemplates/admin_nl_site_foot.tpl"}
