
{include file="../head.tpl"} {if $smarty.request.action == "newimage"}
<form action="affiliates.php?action=newimage" method="post" enctype="multipart/form-data" name="" id="">
  <table width="100%"  border="0" cellpadding="4" cellspacing="1" class="tableborder">
    <tr>
      <td class="header">{$langadmin.affiliates_newbutton}</td>
    </tr>
    <tr>
      <td class="firstrow"><img src="../uploads/affiliates/{$row->image}" alt="" /></td>
    </tr>
    <tr>
      <td class="firstrow"><input name="delbutton" type="checkbox" id="delbutton" value="1" checked>
        {$langadmin.affiliates_deloldbutton}</td>
    </tr>
    <tr>
      <td class="firstrow"><span class="tdspacer">
        <input name="file" type="file" size="35">
        </span></td>
    </tr>
    <tr>
      <td class="firstrow">
	  <input name="Senden" type="submit" class="button" value="{$langadmin.save}">
        <input name="id" type="hidden" id="id" value="{$smarty.request.id}">
        <input name="area" type="hidden" id="area" value="{$smarty.request.area}">
      <input name="oldbutton" type="hidden" id="oldbutton" value="{$row->image}"></td></tr>
  </table>
</form>
{else}
<table width="100%"  border="0" cellspacing="1" cellpadding="5" class="tableborder">
  <form action="affiliates.php?action=save" method="post" enctype="multipart/form-data">
    <tr>
      <td colspan="6" class="header">{$langadmin.affiliates_overview}</td>
    </tr>
    <tr>
      <td width="1%" class="firstrow">{$langadmin.pos}</td>
      <td width="5%" class="firstrow"><div align="center">{$langadmin.picture}</div></td>
      <td width="10%" class="firstrow">{$langadmin.url}</td>
      <td class="firstrow"><div align="center">{$langadmin.title}</div></td>
      <td nowrap class="firstrow"><div align="center">{$langadmin.hits}</div></td>
      <td nowrap class="firstrow">&nbsp;</td>
    </tr>
    {foreach from=$items item=item}
    <tr class="{cycle name="c0" values="secondrow,firstrow"}">
      <td width="1%" class="tdspacer"><div align="center">
          <input name="posi[{$item->id}]" type="text" id="posi[{$item->id}]" value="{$item->posi}" size="3">
        </div></td>
      <td width="5%"><div align="center"> <a href="{$item->url}" target="_blank"><img src="../uploads/affiliates/{$item->image}" alt="" border="0" /></a> </div></td>
      <td width="10%"><input name="url[{$item->id}]" type="text" id="url[{$item->id}]" value="{$item->url}" size="30"></td>
      <td><div align="center">
          <input name="name[{$item->id}]" type="text" id="name[{$item->id}]" value="{$item->name|escape:"htmlall"}">
        </div></td>
      <td nowrap><div align="center">
          <input name="hits[{$item->id}]" type="text" id="hits[{$item->id}]" value="{$item->hits}" size="10">
        </div></td>
      <td nowrap><div align="center">
          <select onchange="eval(this.options[this.selectedIndex].value);selectedIndex=0;" name="mf{$item->id}" id="mf{$item->id}" >
            <option value="location.href ='affiliates.php?action=newimage&amp;area={$smarty.request.area}&amp;id={$item->id}'">{$langadmin.editonce}</option>
            <option value="if(confirm('{$langadmin.affiliates_confirm_del}')) location.href = 'affiliates.php?action=del&amp;area={$smarty.request.area}&amp;id={$item->id}&amp;button={$item->image}'">{$langadmin.delete}</option>
          </select>
          <input onclick="eval(document.getElementById('mf{$item->id}').value);" type="button" class="button" value="{$langadmin.go}" >
        </div></td>
    </tr>
    {/foreach}
    <tr>
      <td colspan="6" class="secondrow"><input name="area" type="hidden" id="area" value="{$smarty.request.area}">
        <input name="id" type="hidden" id="id" value="{$smarty.request.id}">
        <input name="Senden" type="submit" class="button" value="{$langadmin.save}">
      </td>
    </tr>
  </form>
  <form action="affiliates.php?action=new" method="post" enctype="multipart/form-data" name="newitem">
    <tr>
      <td colspan="6" class="header">{$langadmin.affiliates_new}</td>
    </tr>
    <tr>
      <td class="firstrow">{$langadmin.name}</td>
      <td colspan="5" class="secondrow"><input name="name" type="text" id="name" value="" size="50" /></td>
    </tr>
    <tr>
      <td class="firstrow">{$langadmin.linkurl}</td>
      <td colspan="5" class="secondrow"><input name="url" type="text" id="url" value="" size="50" /></td>
    </tr>
    <tr>
      <td class="firstrow">{$langadmin.picture}</td>
      <td colspan="5" class="secondrow"><input name="file" type="file" size="35"></td>
    </tr>
    <tr>
      <td class="firstrow">{$langadmin.pos}</td>
      <td colspan="5" class="secondrow"><input name="posi" type="text" id="posi" size="3"></td>
    </tr>
    <tr>
      <td colspan="6" class="firstrow"><input name="Senden" type="submit" class="button" value="{$langadmin.save}">
      <input name="area" type="hidden" id="area" value="{$smarty.request.area}"></td></tr>
  </form>
</table>
{/if} {include file="../foot.tpl"}