{include file="../head.tpl"}
<table width="100%"  border="0" cellspacing="1" cellpadding="5" class="tableborder">
<form method="post" action="banner.php?do=save">
  <tr>
    <td colspan="2" class="header">{$langadmin.menue_banner}      </td>
  </tr>
{foreach from=$items item=item}
  <tr class="{cycle name='c0' values='secondrow,firstrow'}">
    <td width="180">{$langadmin.title}</td>
    <td>
	<input name="name[{$item->id}]" size="40" value="{$item->name|escape:'html'}" type="text" />    </td>
    </tr>
    
    <tr class="{cycle name='c1' values='secondrow,firstrow'}">
      <td width="180" valign="top" class="tdspacer">{$langadmin.bannercode}</td>
      <td class="tdspacer"><textarea name="code[{$item->id}]" rows="6" style="width:60%">{$item->code}</textarea></td>
    </tr>
    <tr class="{cycle name='c2' values='secondrow,firstrow'}">
      <td width="180" class="tdspacer">{$langadmin.bannerweight}<br />
      <small>{$langadmin.bannerweight_t}</small></td>
      <td class="tdspacer">
	  <select name="weight[{$item->id}]">
	  <option value="1" {if $item->weight==1}selected="selected"{/if}>1</option>
	  <option value="2" {if $item->weight==2}selected="selected"{/if}>2</option>
	  <option value="3" {if $item->weight==3}selected="selected"{/if}>3</option>
      </select>
	  <input name="active[{$item->id}]" type="checkbox" value="1" {if $item->active=='1'}checked="checked"{/if} />
{$langadmin.active}	  </td>
    </tr>
    <tr class="{cycle name='c3' values='secondrow,firstrow'}">
      <td class="tdspacer">{$langadmin.hits}</td>
      <td class="tdspacer"><input name="hits[{$item->id}]" type="text" value="{$item->views}" size="8" /></td>
    </tr>
    <tr class="{cycle name='c4' values='secondrow,firstrow'}">
      <td width="180" class="tdspacer">&nbsp;</td>
      <td class="tdspacer"><input class="button" onclick="location.href='banner.php?do=showcode&amp;id={$item->id}&amp;area={$smarty.request.area}';" type="button" value="{$langadmin.edit_extended}" />
      <input class="button" onclick="if(confirm('{$langadmin.confirmdel_banner}'))  location.href='banner.php?do=del&amp;id={$item->id}&amp;area={$smarty.request.area}';" type="button" value="{$langadmin.menue_navigation_delete}" /></td>
    </tr>
	
	 <tr >
      <td colspan="2" class="spacedtd">&nbsp;</td>
     </tr>
	
  {/foreach}
  <tr>
    <td colspan="2" 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>
</table>

<br />
<form action="banner.php?do=new" method="post" name="newitem">
<table width="100%" border="0" cellpadding="5" cellspacing="1" class="tableborder">

<tr class="c1">
  <td colspan="4" class="header"><a name="new"></a> {$langadmin.menue_banner_newcode}</td>
  </tr>
<tr class="c1">
  <td width="180" class="tdspacer">{$langadmin.title}</td>
  <td class="tdspacer" colspan="3"><input name="name" type="text" value="" size="40" /></td>
</tr>
<tr class="c1">
  <td width="180" valign="top" class="tdspacer">{$langadmin.bannerweight}<br />
    <small>{$langadmin.bannerweight_t}</small></td>
  <td class="tdspacer" colspan="3"><select name="weight" id="weight">
    <option value="1" {if $item->weight==1}selected="selected"{/if}>1</option>
    <option value="2" {if $item->weight==2}selected="selected"{/if}>2</option>
    <option value="3" {if $item->weight==3}selected="selected"{/if}>3</option>
  </select></td>
</tr>
<tr class="c1">
  <td width="180" valign="top" class="tdspacer">{$langadmin.bannercode}</td>
<td class="tdspacer" colspan="3"><textarea style="width:60%" name="code" rows="8" id="code"></textarea></td>
<input type="hidden" name="area" value="{$smarty.request.area}" />

</tr>
<tr class="c1">
  <td width="180" class="firstrow">&nbsp;</td>
  <td colspan="3" class="firstrow">
    <input name="Senden" type="submit" class="button" value="{$langadmin.menue_banner_newcode}" />
    <input name="area" type="hidden" id="area" value="{$smarty.request.area}" /></td></tr>

</table>
</form>
{include file="../foot.tpl"}