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

   

<form action="articles.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="5" class="header">{$langadmin.article_categories}</td>
    </tr>
    {foreach from=$article item=item} {if $item->parent_id == 0}
    <tr>
      <td class="theader">{$langadmin.catname}</td>
	  
      <td width="5%" class="theader"><div align="center">{$langadmin.articles}</div></td>
      <td width="5%" class="theader">&nbsp;</td>
      <td width="5%" class="theader"><div align="center">{$langadmin.pos}</div></td>
      <td width="5%" class="theader"><div align="center">{$langadmin.actions}</div></td>
    </tr>
    <tr>
      <td class="firstrow">{$item->visible_title}</td>
      <td nowrap="nowrap" class="firstrow"><div align="center">{if $item->ncount > 0}{$item->ncount}{else}-{/if}</div></td>
      <td class="firstrow">index.php?p=articles&amp;categ={$item->catid}</td>
      <td class="firstrow"><div align="center">
          <input type="text" value="{$item->posi}" name="posi[{$item->catid}]" size="5" maxlength="5" />
        </div></td>
      <td nowrap="nowrap" class="firstrow"><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 = 'articles.php?area={$smarty.request.area}&amp;action=editcateg&amp;id={$item->catid}'">{$langadmin.catedit}</option>
            <option value="location.href = 'articles.php?nonpop=1&action=addcateg&area={$smarty.request.area}&amp;parent_id={$item->catid}'">{$langadmin.addsubcateg}</option>
            <option value="if (confirm('{$langadmin.confirm_delete_article_categories}')) location.href = 'articles.php?action=catdel&area={$smarty.request.area}&amp;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="{cycle name="c0" values="c1,c2"}">{$item->visible_title}</td>
      <td class="{cycle name="c1" values="c1,c2"}"><div align="center">{if $item->ncount > 0}{$item->ncount}{else}-{/if}</div></td>
      <td class="{cycle name="c3" values="c1,c2"}">index.php?p=articles&amp;categ={$item->catid}</td>
      <td class="{cycle name="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="{cycle name="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 = 'articles.php?area={$smarty.request.area}&amp;action=editcateg&amp;id={$item->catid}'">{$langadmin.catedit}</option>
           <option value="location.href = 'articles.php?nonpop=1&action=addcateg&area={$smarty.request.area}&amp;parent_id={$item->catid}'">{$langadmin.addsubcateg}</option>
           <option value="if (confirm('{$langadmin.confirm_delete_article_categories}')) location.href = 'articles.php?action=catdel&area={$smarty.request.area}&amp;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="5" 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 = 'articles.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"}
