{include file="$admingentemplates/admin_top.tpl"}
<div class="back">
    <a href="{$site_url}{$site_root}/admin/admin_affilate.php?ref=8">{$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="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.aff_ads_add}
    </div>
</div>
{*<div class="cr">&nbsp;</div>

<ul class="tabs" style="width: 100.5%">
    <li>
        <a href="aff_summary.php">{$lang.aff.tab_1}</a>
    </li>
    <li>
        <a href="aff_sales.php">{$lang.aff.tab_2}</a>
    </li>
	<li>
        <a href="aff_affiliates.php">{$lang.aff.tab_3}</a>
    </li>
	<li>
        <a href="aff_ads.php" class="current">{$lang.aff.tab_4}</a>
    </li>
	<li>
        <a href="aff_stats.php">{$lang.aff.tab_5}</a>
    </li>
	<li>
        <a href="aff_editsettings.php">{$lang.aff.tab_6}</a>
    </li>
</ul>
*}

{literal}

<SCRIPT LANGUAGE="JavaScript">
<!-- //hide
function AllBans(){
   window.open('aff_all_bans.php', 'blank_', 'resizable=yes,scrollbars=yes,location=no,directories=no,status=no,toolbar=no,menubar=no,width=750,height=675,left=0,top=0');
}
function Link(){
   document.forms["form1"].Code.value = "<a href='<!--link-->'>Click here</a>";
}

function Banner(){
   document.forms["form1"].Code.value = "<center>\n<a href='<!--link-->'><img src='<!--BannerUrl-->' width=468 height=60 border=0 alt='Click here'><br>\nClick here</a>\n</center>";
}
//-->
</SCRIPT>

{/literal}

<div class="panel">
	<div class="panel_section">
		<div class="panel_content" style="width:95%">

<form action="aff_ads_new.php" name="form1" method="GET" style="margin:0px">
<input type="hidden" name="which" value="1">
<input type="hidden" name="action">
<input type="hidden" name="New" value="{$new}">
<input type="hidden" name="Referer" value="{$referer}">
<table border="0" cellspacing="0" cellpadding="5">
<tr>
  <td>{$lang.affiliate.title}:</td>
  <td><input type="text" name="Title" value="{$title}" maxlength="164" size="30" style="padding: 1px 4px;"></td>
</tr>
<tr>
  <td>{$lang.affiliate.picture}:</td>
  <td><input type="text" name="Picture" value="{$picture}" maxlength="164" size="30" style="padding: 1px 4px;"></td>
</tr>
<tr>
  <td>{$lang.affiliate.link}:</td>
  <td><input type="text" name="Link" value="{$link}" maxlength="164" size="30" style="padding: 1px 4px;"></td>
</tr>
<tr>
  <td valign="top">{$lang.affiliate.contents}:</td>
  <td>
	<textarea name="Code" cols=70 rows=15 style="paddin: 1px 4px;">{$code}</textarea><br>
	<a href="javascript:Link()">[{$lang.affiliate.text_link}]</a> | <a href="javascript:AllBans()">[{$lang.affiliate.banners}]</a>
  </td>
</tr>
</table>
</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.form1.action.value='Save'; document.form1.submit();">{$lang.button.save}<span>&nbsp;</span></a>
			</div>
		</td>
{*		<td>&nbsp;</td>
		<td>
			<div class="fl" style="text-align:left;">
				<a href="#" class="admin_button_major" style="margin:0px;" id="" onclick="javascript: document.form1.action.value='Cancel'; document.form1.submit();">{$lang.button.back}<span>&nbsp;</span></a>
			</div>
		</td>*}
	</tr>
</table>
</div>
</div>

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