{include file="$admingentemplates/admin_top.tpl"}

<div class="back">
    <a href="{$site_url}{$site_root}/admin/admin_affilate.php?ref=6">{$lang.button.back}</a>
</div>
<div class="cr"></div>
<div class="show_help" style="display: none;">&nbsp;</div>
<div class="red_header">{$lang.affiliate.razdel_name}</div>
<div class="cr">&nbsp;</div>
<div class="cr">&nbsp;</div>
<div class="panel">
	<div class="panel_section">
		<div class="panel_content" style="width:95%">
		
{if ($sent)}
<!--font class="error_msg">{$lang.affiliate.message_sent}</font-->
<div class="error_box_blue" style="display:block;margin: 10px 5px;">{$lang.affiliate.message_sent}</div>

<!--br><a href="aff_affiliates.php">{$lang.affiliate.back_affiliates}</a-->
{/if}

<form action="aff_affiliates_send_email.php" method="GET" name="data" style="margin:0px">
<input type="hidden" name="Referer" value="{$referer}">
<input type="hidden" name="action">
<table border="0" cellspacing="0" cellpadding="5">
<tr>
  <td>{$lang.affiliate.send_to}:</td>
  <td><select name="to">
	<option value='-1'>{$lang.affiliate.send_all}</option>
	{section name=num loop=$affiliates}
	<option value='{$affiliates[num].id}'>{$affiliates[num].login} - {$affiliates[num].fullname}</option>
	{/section}
  </select></td>
</tr>
<tr>
  <td valign="top">{$lang.affiliate.send_from}:</td>
  <td><input type="text" name="From" value="{$from_email}" size=50 maxlength=100 style="padding: 1px 4px;"></td>
</tr>
<tr>
  <td valign="top">{$lang.affiliate.subject}:</td>
  <td><input type="text" name="Subject" size=50 maxlength=150 style="padding: 1px 4px;"></td>
</tr>
<tr>
  <td valign="top">{$lang.affiliate.body}:</td>
  <td><textarea name="Body" cols=65 rows=15 style="padding: 1px 4px;"></textarea></td>
</tr>
</table><br>


</form>

		</div>
	</div>
<div style="float:left;">
<table>
	<tr>
		<td>
			<div class="fl" style="text-align:left;">
				<a href="#" class="admin_button_major" style="margin:0px;" id="" onclick="javascript: document.data.action.value='Send'; document.data.submit();">{$lang.button.send}<span>&nbsp;</span></a>
			</div>
		</td>
	</tr>
</table>
</div>
</div>
<script language="JavaScript" type="text/javascript">
    {literal}
        var options = { 
            success: function(data){
				ShowAjaxError(data, '', 'success');
                return false;
            },
            beforeSubmit: function() { 
                ajaxIndicator(1, 'error_box');
            }
        };
        $(document).ready(function(){
            $("#save_settings").click(function (){
                $('.settings_form').ajaxSubmit(options);
				return false;
            });
        });
    {/literal}
    </script>
{include file="$admingentemplates/admin_bottom.tpl"}
