
{include file="../head.tpl"}

<form action="downloads.php?action=saveposi" method="post" enctype="multipart/form-data" name="kform" id="kform">
  <table width="100%"  border="0" cellpadding="4" cellspacing="1" class="tableborder">
    <tr>
      <td colspan="4" class="header">{$langadmin.article_categories}</td>
    </tr>
    {foreach from=$downlodcat item=item} {if $item->parent_id == 0}
    <tr>
      <td class="firstrow">{$langadmin.catname}</td>
	  
      <td width="5%" class="firstrow"><div align="center">{$langadmin.articles}</div></td>
      <td width="5%" class="firstrow"><div align="center">{$langadmin.pos}</div></td>
      <td width="5%" class="firstrow"><div align="center">{$langadmin.actions}</div></td>
    </tr>
    <tr>
      <td class="secondrow"><strong>{$item->visible_title}</strong></td>
      <td nowrap="nowrap" class="secondrow"><div align="center">{if $item->ncount > 0}{$item->ncount}{else}-{/if}</div></td>
      <td class="secondrow"><div align="center">
          <input type="text" value="{$item->posi}" name="posi[{$item->catid}]" size="5" maxlength="5" />
      </div></td>
      <td nowrap="nowrap" class="secondrow"><div align="right">&nbsp;
         <select onchange="eval(this.options[this.selectedIndex].value);selectedIndex=0;" name="mf{$item->catid}" id="mf{$item->catid}">
            <option value="location.href = 'downloads.php?area={$smarty.request.area}&action=editcateg&id={$item->catid}'">{$langadmin.catedit}</option>
            <option value="location.href = 'downloads.php?nonpop=1&action=addcateg&area={$smarty.request.area}&parent_id={$item->catid}'">{$langadmin.addsubcateg}</option>
            <option value="if (confirm('{$langadmin.confirm_delete_article_categories}')) location.href = 'downloads.php?action=catdel&area={$smarty.request.area}&id={$item->catid}'">{$langadmin.article_categories_delete}</option>
            
          </select>
		  
          <input onclick="eval(document.getElementById('mf{$item->catid}').value);" type="button" class="button" value="{$langadmin.go}" />
&nbsp; </div></td>
    </tr>
    {else}
    <tr>
      <td class="firstrow"c0" values="c1,c2"}">{$item->visible_title}</td>
      <td class="firstrow"c1" values="c1,c2"}"><div align="center">{if $item->ncount > 0}{$item->ncount}{else}-{/if}</div></td>
      <td class="firstrow"c3" values="c1,c2"}"><div align="center">
          <input type="text" value="{$item->posi}" name="posi[{$item->catid}]" size="5" maxlength="5" />
      </div></td>
      <td nowrap="nowrap" class="firstrow"c4" values="c1,c2"}"><div align="right">&nbsp;
          <select onchange="eval(this.options[this.selectedIndex].value);selectedIndex=0;" name="mf{$item->catid}" id="mf{$item->catid}">
           <option value="location.href = 'downloads.php?area={$smarty.request.area}&action=editcateg&id={$item->catid}'">{$langadmin.catedit}</option>
           <option value="location.href = 'downloads.php?nonpop=1&action=addcateg&area={$smarty.request.area}&parent_id={$item->catid}'">{$langadmin.addsubcateg}</option>
           <option value="if (confirm('{$langadmin.confirm_delete_article_categories}')) location.href = 'downloads.php?action=catdel&area={$smarty.request.area}&id={$item->catid}'">{$langadmin.article_categories_delete}</option>>
          </select>
          <input onclick="eval(document.getElementById('mf{$item->catid}').value);" type="button" class="button" value="{$langadmin.go}" />
&nbsp; </div></td>
    </tr>
    {/if} {/foreach}
    <tr>
      <td colspan="4" class="firstrow" style="text-align: center;"><input name="area" type="hidden" id="area" value="{$smarty.request.area}" />
        <input name="Senden" type="submit" class="button" value="{$langadmin.orderposi}" />
        <input onclick="location.href = 'downloads.php?nonpop=1&action=addcateg&area={$smarty.request.area}'" type="button" class="button" value="{$langadmin.newcat}" />
      </td>
    </tr>
  </table>
</form>

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