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

 <form name="kform"  method="post" action="sections.php">
<table width="100%"  border="0" cellpadding="4" cellspacing="1" class="tableborder">
  <tr>
    <td colspan="2" class="header">{$langadmin.sections}</td>
  </tr>
   <tr>
    <td style="padding:10px" colspan="2" class="c1">{$langadmin.sectiontext}
	<br>
<span class="warning">{$langadmin.warning_section_delete}</span>
</td>
  </tr>
  {foreach from=$sections item=section}
  <tr>
    <td colspan="2" class="header">
     {$langadmin.sectiononce}{$section->area_id}        </td>
  </tr>
  {if permission("sectiondel") && $section->area_id!=1}
  <tr>
    <td nowrap class="firstrow">{$langadmin.select_to_delete}</td>
    <td nowrap class="secondrow">
      <input name="del[{$section->area_id}]" type="checkbox" id="del[{$section->area_id}]" value="{$section->area_id}">
   </td>
  </tr>
  {/if}
  <tr>
    <td nowrap class="firstrow">{$langadmin.sectionname}</td>
    <td nowrap class="secondrow"><input name="area_name[{$section->area_id}]" type="text" id="area_name[{$section->area_id}]" value="{$section->area_name}" size="30"></td>
  </tr>
  <tr>
   
      <td width="1%" nowrap class="firstrow">        <input name="id[{$section->area_id}]" type="hidden" value="{$section->area_id}">        {$langadmin.sectionlink}</td>
      <td width="125" nowrap class="secondrow"> index.php?area={$section->area_id}</td>
    </tr>
	<tr>
	  <td class="firstrow">{$langadmin.sectiontemplate}</td>
	  <td valign="top" class="secondrow"><select name="area_template[{$section->area_id}]" id="area_template[{$section->area_id}]">
        {$section->sel}
      </select></td>
    </tr>
	<tr>
	  <td class="firstrow">{$langadmin.sectiondescr}</td>
	  <td valign="top" class="secondrow"><textarea name="area_descr[{$section->area_id}]" cols="50" rows="4" id="area_descr[{$section->area_id}]">{$section->area_descr}</textarea></td>
    </tr>
	<tr>
	  <td class="firstrow">{$langadmin.active}</td>
	  <td class="secondrow"><input type="radio" name="active[{$section->area_id}]" value="1" {if $section->active == 1}checked="checked"{/if}>
      {$langadmin.yes}
      <input type="radio" name="active[{$section->area_id}]" value="0" {if $section->active != 1}checked="checked"{/if}>
     {$langadmin.no}
      </td>
    </tr>
	<tr>
	  <td nowrap class="firstrow">{$langadmin.passifsectionactive} </td>
	  <td class="secondrow">
	 <script language="javascript">
	 function openarea_{$section->area_id}(){ldelim}
	 	
		var field = document.getElementById('pass{$section->area_id}').value;
		var url = '../index.php?area={$section->area_id}&pass='+field;
		window.open(url);
	 {rdelim}
	 </script>
	  index.php?area={$section->area_id}&amp;pass=<input name="pass[{$section->area_id}]" type="text" value="{$section->pass}" id="pass{$section->area_id}" size="8">
      <input onclick="return openarea_{$section->area_id}();" type="button" class="button" value="{$langadmin.opensection}"></td>
    </tr>
	<tr>
	  <td nowrap class="firstrow">{$langadmin.templateifactive}</td>
	  <td valign="top" class="secondrow"><textarea name="tmpl[{$section->area_id}]" cols="50" rows="5" id="tmpl[{$section->area_id}]">{$section->tmpl}</textarea></td>
    </tr>
  {/foreach}
  <tr>
  <td class="secondrow" colspan="2"><input name="save" type="hidden" id="save" value="1">
  <input  accesskey="s" value="{$langadmin.edit}" class="button" type="submit"></td>
  </tr>
</table>
 </form>
{include file="../foot.tpl"}