{include file="../head.tpl"}
{strip}
<form method="post" enctype="multipart/form-data">
  <table width="100%"  border="0" cellpadding="4" cellspacing="1" class="tableborder">
    <tr>
      <td colspan="2" class="header">{$lang.galedit}</td>
    </tr>
    <tr>
      <td class="firstrow">{$lang.thegalname}</td>
      <td class="secondrow"><input name="title" type="text" id="title" value="{$title}" size="35">
      </td>
    </tr>
	  <tr>
      <td class="firstrow">{$lang.product}<br>
      {$lang.ortext} {$lang.matchword}</td>
      <td class="secondrow">
	  <select style="width:50%" name="product" id="product">
      <option value="">- - -</option>
      {foreach from=$products item=pro} 
       <option value="{$pro->id}" {if $row->product==$pro->id}selected="selected"{/if}>{$pro->title}</option>
      {/foreach}
      
        
      </select>
	  <br>
	  <input name="matchword" type="text" id="matchword" value="{$row->matchword}" size="35" maxlength="200"></td>
    </tr>
    <tr>
      <td valign="top" class="firstrow">{$lang.thegaldescr}</td>
      <td class="secondrow"><textarea name="descr" cols="75" rows="8" id="descr">{$descr}</textarea></td>
    </tr>
    <tr>
      <td class="firstrow">{$lang.freefield} (1)</td>
      <td class="secondrow"><input name="field_1" type="text" id="field_1" value="{$row->field_1|escape:"htmlall"}" size="35"></td>
    </tr>
    <tr>
      <td valign="top" class="firstrow">{$lang.freefield_content} (1)</td>
      <td class="secondrow"><textarea name=" field_1_text" cols="75" rows="4" id=" field_1_text">{$row->field_1_text|escape:"htmlall"}</textarea></td>
    </tr>
    <tr>
      <td class="firstrow">{$lang.freefield} (2)</td>
      <td class="secondrow"><input name="field_2" type="text" id="field_2" value="{$row->field_2|escape:"htmlall"}" size="35"></td>
    </tr>
    <tr>
      <td valign="top" class="firstrow">{$lang.freefield_content} (2)</td>
      <td class="secondrow"><textarea name=" field_2_text" cols="75" rows="4" id=" field_2_text">{$row->field_2_text|escape:"htmlall"}</textarea></td>
    </tr>
    <tr>
      <td class="firstrow">{$lang.freefield} (3)</td>
      <td class="secondrow"><input name="field_3" type="text" id="field_3" value="{$row->field_3|escape:"htmlall"}" size="35"></td>
    </tr>
    <tr>
      <td valign="top" class="firstrow">{$lang.freefield_content} (3)</td>
      <td class="secondrow"><textarea name=" field_3_text" cols="75" rows="4" id=" field_3_text">{$row->field_3_text|escape:"htmlall"}</textarea></td>
    </tr>
    <tr>
      <td class="firstrow">{$lang.autobr}</td>
      <td class="secondrow"><input name="autobr" type="checkbox" id="autobr" value="1"></td>
    </tr>
    <tr>
      <td class="firstrow">{$lang.cancomment_gal}</td>
      <td class="secondrow"><input name="cancomment" type="checkbox" value="1" {if $row->cancomment=='1'}checked="checked>"{/if}</td>
    </tr>
    <tr>
      <td class="firstrow">{$lang.max_width_thumb2}</td>
      <td class="secondrow"><select name="maxwidth" id="maxwidth">
        <option value="320" {if $row->maxwidth=='320'}selected="selected"{/if}>320</option>
        <option value="480" {if $row->maxwidth=='480'}selected="selected"{/if}>480 (Standard)</option>
        <option value="640" {if $row->maxwidth=='640'}selected="selected"{/if}>640</option>
        <option value="800" {if $row->maxwidth=='800'}selected="selected"{/if}>800</option>
      </select></td>
    </tr>
    <tr>
      <td class="firstrow">{$lang.active}</td>
      <td class="secondrow"><input name="active" type="checkbox" id="active" value="1" {if $active == 1}checked="checked" {/if}{if $canactivate != 1}disabled="disabled"{/if} >
	  {if $active == 1 && $canactivate != 1}
	  <input type="hidden" name="active" value="1">
	  {/if}
	  {if $active != 1 && $canactivate != 1}
	  <input type="hidden" name="active" value="0">
	  {/if}
	  </td>
    </tr>
    {if $img}    {/if}
    <tr>
      <td colspan="2" class="firstrow"><input name="id" type="hidden" id="id" value="{$galid}">
        <input name="editsave" type="hidden"  value="1">
        <input name="area" type="hidden" id="area" value="{$area}">
        <input type="submit" class="button" value="{$lang.edit}">
      </td></tr>
  </table>
</form>
{/strip}
