<div class="header">{#Global_Shop#} - {#Shop_CategoriesAddons#}</div>
<div class="header_inf">
{#Shop_CategoriesAddonsInf#}
</div>

{if $error}
<div class="error_box">
<ul>
{foreach from=$error item=e}
<li>{$e}</li>
{/foreach}
</ul>
</div>
{/if}


<div style="margin-bottom:10px">
<a href="#new"><img class="absmiddle" src="{$imgpath}/add.png" alt="" border="0" /></a>
<a href="#new"> {#Shop_CategAddonNew#}</a>
</div>

<form method="post" action="">
<select class="input" name="lc">
<option value="1" {if $lc=='1'}selected="selected"{/if}>{$language_long_1|upper}</option>
<option value="2" {if $lc=='2'}selected="selected"{/if}>{$language_long_2|upper}</option>
<option value="3" {if $lc=='3'}selected="selected"{/if}>{$language_long_3|upper}</option>
</select>
<input type="submit" class="button" value="{#Global_Show#}" />
</form>
<br />
<br />
<form method="post" action="">

<table id="tablesorter"  class="tablesorter"  width="100%" border="0" cellspacing="0" cellpadding="3">

  <tr>
    <td class="headers">{#Global_Categ#}</td>
    <td class="headers">{#Global_Name#} 1</td>
    <td class="headers">{#Global_Name#} 2</td>
   <td class="headers">{#Global_Name#} 3</td>
   <td class="headers">{#Global_Actions#}</td>
  </tr>

  {foreach from=$categ_addons item=ca}
  <tr class="{cycle name='categaddons' values='second,first'}">
    <td><strong>{$ca->CategInfo->Name} </strong>
    </td>
    <td>
    <input type="hidden" name="id[{$ca->Id}]" value="{$ca->CategInfo->Id}" />
    <input type="hidden" name="name[{$ca->Id}]" value="{$ca->CategInfo->Name}" />
    
    <input class="input" type="text" name="Teile_1_Name_1[{$ca->Id}]" value="{$ca->Teile_1_Name_1|stripslashes}" />
    <input type="hidden" name="name_old[{$ca->Id}]" value="{$ca->Teile_1_Name_1|stripslashes}" />
    </td>
    <td>
    <input class="input" type="text" name="Teile_2_Name_1[{$ca->Id}]" value="{$ca->Teile_2_Name_1|stripslashes}" />
    <input type="hidden" name="name_old_2[{$ca->Id}]" value="{$ca->Teile_2_Name_1|stripslashes}" />
    </td>
    <td>
    <input class="input" type="text" name="Teile_3_Name_1[{$ca->Id}]" value="{$ca->Teile_3_Name_1|stripslashes}" />
    <input type="hidden" name="name_old_3[{$ca->Id}]" value="{$ca->Teile_3_Name_1|stripslashes}" />
    </td>
    <td>
    <a {popup sticky=$config_vars.POPSTICKY  text=$config_vars.Global_Delete} onclick="return confirm('{#Shop_CDelCategAddon#}');" href="index.php?do=shop&amp;sub=categories_addons&amp;del=1&amp;categ={$ca->Id}&amp;shop_categ={$ca->CategInfo->Id}"><img class="absmiddle" src="{$imgpath}/delete.png" alt="" border="0" /></a>
    {if perm('shop_catdeletenew')}<img {popup sticky=$config_vars.POPSTICKY  text=$config_vars.Shop_cat_edit_normal} style="cursor:pointer" onclick="javascript:openWin('?do=shop&amp;sub=edit_categ&amp;SID={$sess}&amp;id={$ca->CategInfo->Id}&amp;parent=0',750,650,1);" class="absmiddle" src="{$imgpath}/edit.png" border="0" />{/if}

    </td>
  </tr>
  {/foreach}
</table>
<input type="hidden" name="lc" value="{$lc}" />
<input type="hidden" name="save" value="1" />
<input type="submit" class="button big" value="{#Save#}" />
</form>



<br />
<a name="new"></a>
<script language="javascript">
<!-- //
function checkNew()
{ldelim}
	if(document.getElementById('first').value=='')
	{ldelim}
		alert('Bitte fuellen Sie das Feld -Name 1- aus.');
		document.getElementById('first').focus();
		return false;
	{rdelim}
{rdelim}
// -->
</script>

<div class="header">{#Shop_CategAddonNew#}</div>
<form method="post" action="" onSubmit="return checkNew()">
<table width="100%" border="0" cellpadding="3" cellspacing="0">
<tr>
<td width="150" class="row_left"><label for="Categ">{#Global_Categ#}</label></td>
<td class="row_right">
<select name="Categ" id="Categ" class="input" style="width:200px; padding:0px" >
	{foreach from=$shop_search_small_categs item=scs}
	{if !in_array($scs->Id,$categs_used)}<option {if $scs->bold==1}class="shop_selector_back"{else}class="shop_selector_subs"{/if} value="{$scs->catid}" {if $smarty.request.id==$scs->catid}selected="selected" {/if}>{$scs->visible_title|specialchars}</option>{/if}
	{/foreach}
    </select></td>
</tr>
<tr>
  <td class="row_left"><label for="first">{#Global_Name#} 1</label></td>
  <td class="row_right"><input class="input" type="text" name="Teile_1_Name_1" id="first" /> {#Shop_CategAddonNewT1#}
    </td>
</tr>
<tr>
  <td class="row_left"><label for="second">{#Global_Name#} 2</label></td>
  <td class="row_right"><input class="input" type="text" name="Teile_2_Name_1" id="second" /> {#Shop_CategAddonNewT2#}</td>
</tr>

<tr>
  <td class="row_left"><label for="third">{#Global_Name#} 3</label></td>
  <td class="row_right"><input class="input" type="text" name="Teile_3_Name_1" id="third" /> {#Shop_CategAddonNewT3#}</td>
</tr>
</table>
<input type="hidden" name="new" value="1" />
<input type="submit" class="button big" value="{#Save#}" />
</form>
