<html>
<head>
<META http-equiv=Content-Type content='text/html; charset=windows-1251'>
{literal}
<style>
	.listTable
	{
		border: solid 0px;
		background-color: #E6E6E6;
		cellspacing: 2;
		cellpadding: 3;
		width: 100%;
		font-family: arial, verdana, helvetica, sans-serif;
		font-weight: normal;
		font-size: 12px;		
	}

	.listHeader
	{
		background-color: #E6E6E6;
		font-family: arial, verdana, helvetica, sans-serif;
		font-weight: normal;
		font-size: 12px;
		text-align: left;
	}

	.listItem
	{
		background-color: #FFFFFF;
		font-family: arial, verdana, helvetica, sans-serif;
		font-weight: normal;
		font-size: 12px;
	}
	h2{
		font-family: arial, verdana, helvetica, sans-serif;
		font-size: 16px;
		font-weight: bold;
	}
	input{
		font-family: arial, verdana, helvetica, sans-serif;
		font-size: 11px;
		font-weight: 100;
	}
</style>
{/literal}
<title>{$lang.newsletter.top_header}</title>
</head>

<body topmargin=0 leftmargin=0 rightmargin=0 bottommargin=0 marginwidth=0 marginheight=0>
<h2>{$lang.newsletter.delivery_rep.header}</h2>
{if $form.res_count}
{foreach item=item_list key=key_list from=$data.lists}

<br>
<table width=100% border=0 cellspacing=2 cellpadding=3 class=listTable>
<tr class='listHeader'>
	<td>
		<strong>{$lang.newsletter.delivery_rep.list}: </strong><a title='Edit list' target='_blank' href='{$item_list.edit_list_link}'>{$item_list.name}</a><br>
		<strong>{$lang.newsletter.delivery_rep.from}: </strong><a title='Edit owner' target='_blank' href='{$item_list.edit_list_link}'>{$item_list.owner}</a><br>
		<strong>{$lang.newsletter.delivery_rep.Subject}: </strong>{$item_list.subject}<br>
		<strong>{$lang.newsletter.delivery_rep.priority}: </strong>{$item_list.priority}<br>			
		<strong>{$lang.newsletter.delivery_rep.attach_file}:</strong>
		{foreach item=item_att from=$item_list.attaches}<a title='View file' href='{$item_att.href}' target='_blank'>{$item_att.name}</a>&nbsp;&nbsp;{foreachelse}{$lang.newsletter.no}{/foreach}
		<br>  			
	</td>
</tr>
<tr>
	<td>&nbsp;</td>
</tr>		
</table>
{if !$form.is_test}
	<table width=100% border=0 cellspacing=2 cellpadding=3 class=listTable>
	{foreach item=item_user key=key_user from=$item_list.snd_usrs}
	<tr class='listItem' onMouseOver="javascript: if (typeof(window.opera) == 'undefined') this.style.backgroundColor='#FFF000'" onMouseOut="this.style.backgroundColor=''">
		<td>{math equation='x+1' x=$key_user}</td>
		<td>{$lang.newsletter.delivery_rep.send_nl_to} <strong><a title='Edit user' target='_blank' href='{$item_user.user_link}'>{$item_user.userInfo}</strong></a></td>
		<td>{if $item_user.is_error}<font color="#FF0000">{$lang.newsletter.error}: {$item_user.error}</font>{else}{$lang.newsletter.ok}{/if}</td>
	</tr>
	{/foreach}
	</table>
{else}
	<table width=100% border=0 cellspacing=2 cellpadding=3 class=listTable>
	<tr class='listItem' onMouseOver="javascript: if (typeof(window.opera) == 'undefined') this.style.backgroundColor='#FFF000'" onMouseOut="this.style.backgroundColor=''">
		<td>{$lang.newsletter.delivery_rep.send_nl_to} <strong> {$lang.newsletter.delivery_rep.test_email} ({$item_list.test_email.email})</strong></td>
		<td>{if $item_list.test_email.is_error}<font color="#FF0000">{$lang.newsletter.error}: {$item_list.test_email.error}</font>{else}{$lang.newsletter.ok}{/if}</td>
	</tr>
	</table>
{/if}
<table width=100% border=0 cellspacing=2 cellpadding=3 class=listTable>
<tr class='listItem'><td>{$lang.newsletter.delivery_rep.total}: {$item_list.total}</td></tr>
<tr class='listItem'><td>{$lang.newsletter.delivery_rep.with_error}: {$item_list.total.error_count}</td></tr>
</table>

{foreachelse}
<br>
<table width=100% border=0 cellspacing=2 cellpadding=3 class=listTable>
<tr class='listHeader'>
	<td colspan=2>
		<strong>{$lang.newsletter.delivery_rep.list}: </strong>{$lang.newsletter.undefined}<br>
		<strong>{$lang.newsletter.delivery_rep.from}: </strong>{$lang.newsletter.delivery_rep.undefined_ml_undefined}<br>
		<strong>{$lang.newsletter.delivery_rep.Subject}: </strong>{$form.subject}<br>
		<strong>{$lang.newsletter.delivery_rep.priority}: </strong>{$form.priority}<br>			
		<strong>{$lang.newsletter.delivery_rep.attach_file}:</strong>
		{foreach item=item_att from=$form.attaches}<a title='View file' href='{$item_att.href}' target='_blank'>{$item_att.name}</a>&nbsp;&nbsp;{foreachelse}{$lang.newsletter.no}{/foreach}
		<br>  			
	</td>
</tr>
<tr>
	<td colspan=2>&nbsp;</td>
</tr>		
<tr class='listItem' onMouseOver="javascript: if (typeof(window.opera) == 'undefined') this.style.backgroundColor='#FFF000'" onMouseOut="this.style.backgroundColor=''">
	<td>{$lang.newsletter.delivery_rep.send_nl_to} <strong> {$lang.newsletter.delivery_rep.test_email} ({$form.test_email.email})</strong></td>
	<td>{if $form.test_email.is_error}<font color="#FF0000">{$lang.newsletter.delivery_rep.with_error}: {$form.test_email.error}</font>{else}{$lang.newsletter.ok}{/if}</td></tr>
<tr class='listItem'>
<td>&nbsp;</td>
<td>{$lang.newsletter.delivery_rep.total}: {$form.total}</td>
</table>
{/foreach}
{/if}

<div class='listItem' align=right>{$lang.newsletter.amount}: {$form.amount}&nbsp;&nbsp;</div>
{if $form.errors}
<div class='listItem' align=right><font color=#FF0000;>{$lang.newsletter.delivery_rep.all_with_arrors}</font></div>
{/if}

<div class='listItem' align=center><input type=button onClick='window.close();' value='Close Delivery Report'></div>
<br><br>
</body>
</html>