{include file="$admingentemplates/admin_top.tpl"}
	{if $sistem}
<div class="back">
    <a href="{$site_url}{$site_root}/admin/admin_modules.php">{$lang.button.back}</a>
</div>
<div class="cr"></div>
<div class="show_help" style="display: none;">&nbsp;</div>
<div class="red_header">{$lang.newsletter.razdel_name}</div>
<div class="cr">&nbsp;</div>
<div class="cr">&nbsp;</div>
<div class="help_text" style="display:block;">
    <div class="close_help">
        <img src="{$site_root}{$template_root}/images/close_help.png" alt="">
    </div>
    <div class="help_body">
        <span class="help_title">{$lang.help}:</span>{$lang.admin_help.newsletter}
    </div>
</div>
<div class="cr">&nbsp;</div>
<ul class="tabs" style="line-height:0px;width: 100.5%;">
    <li>
        <a class="current">{$lang.admin_menu.nl_alerts}</a>
    </li>
    <li>
        <a href="newsletter/newsletters/index.php">{$lang.admin_menu.nl_newsletters}</a>
    </li>
    <li>
        <a href="newsletter/users/index.php">{$lang.admin_menu.nl_subscribers}</a>
    </li>
    <li>
        <a href="newsletter/lists/index.php">{$lang.admin_menu.nl_mailing_list}</a>
    </li>
{*    <li>
        <a href="newsletter/template/index.php">{$lang.admin_menu.nl_templates}</a>
    </li>
    <li>
        <a href="newsletter/forms/index.php">{$lang.admin_menu.nl_forms}</a>
    </li>*}
    <li>
        <a href="newsletter/archive/index.php">{$lang.admin_menu.nl_statistics}</a>
    </li>
{*    <li>
        <a href="newsletter/attaches/index.php">{$lang.admin_menu.nl_attachments}</a>
    </li>
    <li>
        <a href="newsletter/smtp_servers/index.php">{$lang.admin_menu.nl_smtp_servers}</a>
    </li>*}
    <li>
        <a href="newsletter/settings.php">{$lang.admin_menu.nl_settings}</a>
    </li>
</ul>
<div class="user_operation_line" style="width:100%">
	<div class="uol_item" onclick="javascript: document.sactivate.submit();">
		<div class="uol_in_item">{$lang.button.activate}</div>
	</div>
</div>
<div class="cr"></div>

<div id="tooltip" onclick="hideToolTip()" style="text-align:center; background-color: #FEF2CB; border: 1px dotted; text-align: {$default_left}; position:absolute; display:none; padding:5px;"></div>
{literal}
<script type="text/javascript">
$(function() {
$('#tool_tip_4 *').tooltip();
});
</script>
{/literal}
<form method="post" action="{$form.action}"  enctype="multipart/form-data" name="sactivate">
	{$form.hiddens_sistem_active}
	<table border=0 cellspacing=0 cellpadding=0 width="100%">
		<tr class="table_header">
			<td align="left" width="35%">{$lang.newsletter.name_alert}</td>
			<td align="center" width="15%">{$lang.newsletter.status}</td>
			<td align="right" width="15%">{$lang.button.action}</td>
		</tr>
		{section name=spr loop=$sistem}
			{if $sistem[spr].id!=1}
				<tr {if $smarty.section.spr.index mod 2 eq 1}class="table_row even"{else}class="table_row odd"{/if}>
					<td>
						<div>{$sistem[spr].name}</div>
					</td>
					<td align="center">
						<input type="checkbox" name="active[{$smarty.section.spr.index}]" value="{$sistem[spr].id}" {if $sistem[spr].status}checked{/if}>
					</td>
					<td align="center">
						<div class="block_action fr" style="display: none;">
							<!-- subscribers -->
							<div class="action_edit" style="display: block;float:left">
								<img alt="" src="{$site_root}{$template_root}/images/newsletter/subscribers.png"  onmouseout="javascript:hideToolTip();" onmouseover="javascript: showToolTip(event,'{$lang.admin_menu.nl_subscribers}');return false" onclick="javascript: location.href='{$sistem[spr].userlink}';">
							</div>
							<div style="width:10px;" class="fl">&nbsp;</div>
						</div>
					</td>
				</tr>
			{/if}
		{sectionelse}
			<tr height="40">
				<td class="main_error_text" align="left" colspan="4" bgcolor="#FFFFFF">{$lang.interests_spr.empty}</td>
			</tr>
		{/section}
		 <tr>
			<td colspan="{if $form.options eq 1}4{else}3{/if}">&nbsp;&nbsp;
				{if $links}
					{foreach item=item from=$links.pages}
						&nbsp;<a onclick="PageList('ref_block', '{$item.link}');" class="page_link" {if $item.selected} style=" font-weight: bold; text-decoration: none;" {/if}>{$item.name}</a>&nbsp;
					{/foreach}
				{/if}
				<div class="page_navigation">
					{if $links.previous}
						<a onclick="PageList('ref_block', '{$links.previous}');">< {$lang.content.previous} {$per_page}</a>
					{/if}
					{if $links.next}
						<a onclick="PageList('ref_block', '{$links.next}');">{$lang.content.next} {$per_page} ></a>
					{/if}
				</div>
			</td>
		</tr>
		<tr class="table_header" height="20">
			<td align="left" colspan="2">&nbsp;</td>
			<td align="left">&nbsp;</td>
		</tr>
	</table>
</form><br>
	<form name="other_form" action="{$form.action_other_form}" method="post">
		<table border=0 cellspacing=0 cellpadding=5 width="100%">
			<tr bgcolor="#FFFFFF">
				<td align="left" nowrap class="main_header_text" width="350">{$lang.settings.no_icon_alert}:&nbsp;</td>
				<td class="main_content_text" colspan="2" align="left"><input type="text" name="no_icon_alert_timeline" value="{$data.no_icon_alert_timeline}" size=10> &nbsp; {$data.freetrial_periods.day}</td>
			</tr>
			<tr bgcolor="#FFFFFF">
				<td align="left" nowrap class="main_header_text" width="350">{$lang.settings.inactive_user_alert}:&nbsp;</td>
				<td class="main_content_text" colspan="2" align="left"><input type="text" name="inactive_user_alert_timeline" value="{$data.inactive_user_alert_timeline}" size=10> &nbsp; {$data.freetrial_periods.day}</td>
			</tr>
			<tr bgcolor="#FFFFFF">
				<td align="left" nowrap class="main_header_text" width="350">{$lang.settings.no_photos_alert}:&nbsp;</td>
				<td class="main_content_text" colspan="2" align="left"><input type="text" name="no_photos_alert_timeline" value="{$data.no_photos_alert_timeline}" size=10> &nbsp; {$data.freetrial_periods.day}</td>
			</tr>
			<tr bgcolor="#FFFFFF">
				<td align="left" nowrap class="main_header_text" width="350">{$lang.settings.new_local_singles_timeline}:&nbsp;</td>
				<td class="main_content_text" align="left" width="150px;"><input type="text" name="new_local_singles_timeline" value="{$data.new_local_singles_timeline}" size=10> &nbsp; {$data.freetrial_periods.day}</td>
				<td class="main_content_text" align="left">
					{$lang.settings.new_local_singles_surroundings}&nbsp;
					<select class="index_select" name="new_local_singles_surroundings">
					{section name=d loop=$distances}
						<option value="{$distances[d].id}" {if $distances[d].id eq $data.new_local_singles_surroundings}selected{/if}>{$distances[d].name}&nbsp;{$distances[d].type}</option>
					{/section}
					</select>
				</td>
			</tr>
			<tr bgcolor="#FFFFFF">
				<td colspan="3"><a href="#" id="save_settings" class="admin_button_major" onclick="javascript: document.other_form.submit();">{$lang.button.save}<span>&nbsp;</span></a>
				</td>
			</tr>
		</table>
	</form>
<script type="text/javascript">
{literal}
		function showToolTip(e,text){
			if(document.all)e = event;
			var obj = document.getElementById('tooltip');
			obj.innerHTML = text;
			obj.style.display = 'block';
			var st = Math.max(document.body.scrollTop,document.documentElement.scrollTop);
			if(navigator.userAgent.toLowerCase().indexOf('safari')>=0)st=0;
			var leftPos = e.clientX - $('#tooltip').width()-10;
			if(leftPos<0)leftPos = 0;
			obj.style.left = leftPos + 'px';
			obj.style.top = e.clientY - obj.offsetHeight +40 + st + 'px';
		}
		function hideToolTip(){
			document.getElementById('tooltip').style.display = 'none';
		}
{/literal}		
</script>		
<BR><BR>
{/if}
{include file="$admingentemplates/admin_bottom.tpl"}