{include file="../head.tpl"}
{if $upload == 1}
<table width="100%"  border="0" cellpadding="4" cellspacing="1" class="tableborder">
  <tr>
    <td colspan="4" class="header">{$lang.status}</td>
  </tr>
  <tr class="firstrow"c1" values="c1,c2"}">
    <th>{$lang.filename}</th>
    <th>{$lang.filetype}</th>
    <th>{$lang.filesize}</th>
    <th>{$lang.filestatus}</th>
  </tr>
  {foreach from=$status item=status}
  <tr class="{cycle name="c1" values="c1,c2"}">
    <td>{$status.filename}</td>
    <td><div align="center">{$status.type}</div></td>
    <td><div align="center">{$status.size} {$lang.filekb} </div></td>
    <td><div align="center">{$status.status}</div></td>
  </tr>
  {/foreach}
  <tr>
    <td class="secondrow" colspan="4"><div align="center">
        <input onclick="location.href='gallery.php?action=overview&area={$area}'" class="button" type="button" value="{$lang.buttonredirtogal}">
    </div></td></tr>
</table>
{else}
<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.adgalpics}</td>
    </tr>
    {section name=galupper loop=10}
    <tr class="{cycle name="c1" values="c1,c2"}">
      <td>{$lang.picture} #{$smarty.section.galupper.index+1} </td>
      <td><input name="files[]" type="file" id="files[]" size="45"></td>
    </tr>
    <tr class="{cycle name="c2" values="c1,c2"}">
      <td>{$lang.picturename}</td>
      <td><input name="name[]" type="text" id="name[]" size="45"></td>
    </tr>
    <tr class="{cycle name="c3" values="c1,c2"}">
      <td>{$lang.descr}</td>
      <td><textarea name="descr[]" cols="45" rows="5" id="descr[]"></textarea></td>
    </tr>
    {/section}
    <tr class="firstrow">
      <td>{$lang.selgal} </td>
      <td><select name="thegal" id="thegal">
          {$galdropdown}
        </select>
      </td>
    </tr>
    <tr class="firstrow">
      <td>压缩大小</td>
      <td><input name="resize" type="checkbox" id="resize" value="1" /></td>
    </tr>
    <tr class="firstrow">
      <td>如果选择"压缩大小", 请在右边标明大小 </td>
      <td><input name="w" type="text" id="w" size="5" maxlength="4" />
x
  <input  name="h" type="text" id="h" size="5" maxlength="4" /></td>
    </tr>
    <tr class="firstrow">
      <td>{$lang.autobr}</td>
      <td><input name="autobr" type="checkbox" id="autobr" value="1">
      </td>
    </tr>
    <tr>
      <td colspan="2" class="secondrow"><input accesskey="s" name="Submit" type="submit" class="button" value="{$lang.upgalpics}">
        <input name="upload" type="hidden" id="upload" value="1">
      <input name="area" type="hidden" id="area" value="{$area}"></td></tr>
  </table>
</form>
{/if} 