{include file="$admin_nl_gentemplates/admin_nl_site_head.tpl"}
<div style="border:0px;">
<div class="panel_section" style="width:100%;">
<div class="panel_content" style="width: 100%;">
<FORM onSubmit="return CheckForm()" formid="myform"  name="myform" action="export_csv.php" enctype="application/x-www-form-urlencoded" method="post" style="margin:0px">
<input type="hidden" name="action" value="export">
	{if $msg}
		<div class="fl newletter_export"><font color="red">{$msg}</font></div>
		<div class="cr">&nbsp;</div>
	{/if}
	<div class="cr">&nbsp;</div>
	<div class="fl newletter_export">{$lang.newsletter.users.file_name}:&nbsp;</div>
	<div class="fl">
		<input type="text" name="FileName" value="" class="inpBox" maxlength="50" style="width:200px">
		&nbsp;<A onmouseover=doTooltip(event,61) onmouseout="hideTip()" href="#"><IMG src="{$site_root}{$template_root}/images/newsletter/icot.gif" width="12" height="12" border=0 align="absmiddle"></A>
	</div>
		
	<div class="cr">&nbsp;</div>
	<div class="fl newletter_export">{$lang.newsletter.users.file_name}:&nbsp;</div>
	<div class="fl">
	<select name=list[] id="list" multiple size=5 style="width:200px">
	{section name=k loop=$lists}
		<option value="{$lists[k].id}"
		{section name=j loop=$users[0].LIST}
			{if $lists[k].id == $users[0].LISTID[j]} selected {/if}
		{/section}
		>{$lists[k].name} ({$lists[k].count} subscribers)</option>
	{/section}
	</select>
	&nbsp;<A onmouseover=doTooltip(event,62) onmouseout="hideTip()" href="#"><IMG src="{$site_root}{$template_root}/images/newsletter/icot.gif" width="12" height="12" border=0 align="absmiddle"></A>
	</div>
	
	<div class="cr">&nbsp;</div>
	<div class="fl newletter_export">{$lang.newsletter.users.fields_term_by}:&nbsp;</div>
	<div class="fl">
		<input type="text" name="Delimiter" value=";" class="inpBox" maxlength="50" style="width:200px">
		&nbsp;<A onmouseover=doTooltip(event,63) onmouseout="hideTip()" href="#"><IMG src="{$site_root}{$template_root}/images/newsletter/icot.gif" width="12" height="12" border=0 align="absmiddle"></A>
	</div>
	
	<div class="cr">&nbsp;</div>
	<div class="fl newletter_export">{$lang.newsletter.users.exp_col_headers}:&nbsp;</div>
	<div class="fl">
		<input type="checkbox" name="ExportHeaders" value="1" class="inpBox" >
		&nbsp;<A onmouseover=doTooltip(event,64) onmouseout="hideTip()" href="#"><IMG src="{$site_root}{$template_root}/images/newsletter/icot.gif" width="12" height="12" border=0 align="absmiddle"></A>
	</div>
	
	<div class="cr">&nbsp;</div>
	<div class="fl newletter_export">{$lang.newsletter.users.finish_alert_to_email}:&nbsp;</div>
	<div class="fl">
		<input type="text" name="NotifyEmail" value="{$admin_email}" class="inpBox" class="inpBox" maxlength="255" style="width:200px">
		&nbsp;<A onmouseover=doTooltip(event,65) onmouseout="hideTip()" href="#"><IMG src="{$site_root}{$template_root}/images/newsletter/icot.gif" width="12" height="12" border=0 align="absmiddle"></A>
	</div>
		
	<div class="cr">&nbsp;</div>
	<a class="admin_button_major" onclick="javascript:document.myform.submit();">{$lang.newsletter.button.submit}<span>&nbsp;</span></a>&nbsp;&nbsp;
	<a class="admin_button" onClick='{literal}if(confirm("Are you sure?")) { document.location.href="index.php" }{/literal}'>{$lang.newsletter.button.cancel}<span>&nbsp;</span></a>
	
	
</form>
</div>
</div>
</div>
</div>
{literal}
		<script language="JavaScript">

			function CheckForm()
			{
				var f = document.forms[0];
				if(f.FileName.value == ""){
					alert("{/literal}{$lang.newsletter.users.enter_filename|escape:javascript}{literal}");
					f.FileName.focus();
					return false;
				}
				if(f.list.selectedIndex == -1){
					alert("{/literal}{$lang.newsletter.users.select_lists|escape:javascript}{literal}");
					f.list.focus();
					return false;
				}				
				
			}                
		</script>				

{/literal}

{include file="$admin_nl_gentemplates/admin_nl_site_foot.tpl"}
