{include file="../head.tpl"}
{strip}
<form action="faq.php?action=save_posi" 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.faqoverview}</td>
    </tr>
    {foreach from=$faq item=item} {if $item->parent_id == 0}
    <tr>
      <td class="theader">{$langadmin.menue_faqtitle}</td>
      {* <td width="5%" class="theader"><div align="center">{$langadmin.hits}</div></td> *}
      <td width="5%" class="theader"><div align="center">{$langadmin.active}</div></td>
      <td width="5%" class="theader"><div align="center">{$langadmin.pos}</div></td>
      <td width="5%" class="theader"><div align="right">{$langadmin.settings}</div></td>
    </tr>
    <tr>
      <td class="firstrow"><strong>{$item->visible_title}</strong></td>
      {* <td nowrap="nowrap" class="firstrow"><div align="center">{$item->hits}</div></td> *}
      <td nowrap="nowrap" class="firstrow">&nbsp;
        <select name="active[{$item->id}]">
          <option value="1" {if $item->active == 1} selected{/if}>{$langadmin.active}</option>
          <option value="0" {if $item->active == 0} selected{/if}>{$langadmin.inactive}</option>
        </select>
&nbsp; </td>
      <td class="firstrow"><div align="center">
          <input type="text" value="{$item->posi}" name="posi[{$item->id}]" 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->id}" id="mf{$item->id}">
            <option value="location.href = 'faq.php?area={$area}&amp;action=edit&amp;id={$item->id}&amp;cat=1'">{$langadmin.faqcatedit}</option>
            
		   {if  permission("addfaq")}
		   
            <option value="location.href = 'faq.php?area={$area}&amp;action=new&amp;id={$item->id}'">{$langadmin.faqnew}</option>
            
		   {/if}
		   
            <option value="if(confirm('{$langadmin.confirmdelfaq}')) location.href = 'faq.php?area={$area}&amp;action=delete&amp;id={$item->id}'">{$langadmin.deletefaq}</option>
          </select>
          <input onclick="eval(document.getElementById('mf{$item->id}').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">{$item->hits}</div></td> *}
      <td class="{cycle name="c2" values="c1,c2"}">&nbsp;
        <select name="active[{$item->id}]">
          <option value="1" {if $item->active == 1} selected{/if}>{$langadmin.active}</option>
          <option value="0" {if $item->active == 0} selected{/if}>{$langadmin.inactive}</option>
        </select>
&nbsp; </td>
      <td class="{cycle name="c3" values="c1,c2"}"><div align="center">
          <input type="text" value="{$item->posi}" name="posi[{$item->id}]" 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->id}" id="mf{$item->id}">
            <option value="location.href = 'faq.php?area={$area}&amp;action=edit&amp;id={$item->id}'">{$langadmin.faqedit}</option>
            
		    {if  permission("addfaq")}
		   
            <option value="location.href = 'faq.php?area={$area}&amp;action=new&amp;id={$item->id}'">{$langadmin.subfaqnew}</option>
            
		   {/if}
		   
            <option value="if(confirm('{$langadmin.confirmdelfaq}')) location.href = 'faq.php?area={$area}&amp;action=delete&amp;id={$item->id}'">{$langadmin.deletefaq}</option>
          </select>
          <input onclick="eval(document.getElementById('mf{$item->id}').value);" type="button" class="button" value="{$langadmin.go}">
&nbsp; </div></td>
    </tr>
    {/if} {/foreach}
    <tr>
      <td colspan="5" class="secondrow" style="text-align: center;"><input name="area" type="hidden" id="area" value="{$area}" />
	  {if $faq}
        <input name="Senden" type="submit" class="button" value="{$langadmin.orderposi}" />
		{/if}
        {if permission("addfaq")}
        <input onclick="location.href = 'faq.php?area={$area}&amp;action=new'" type="button" class="button" value="{$langadmin.faqnew}" />
      {/if} </td></tr>
  </table>
</form>
{/strip}
{include file="../foot.tpl"}
