<!-- BEGIN LIST_TITLE -->
  <h1><img src="$config[dir_templates]admin/img/ico_images.gif" alt="$lang['Images']" />$lang['Images']</h1>
<!-- END LIST_TITLE -->

<!-- BEGIN LIST -->
<tr class="l$aData[iDepth]">
  <td class="id">
    $aData[iImage]
  </td><th class="name">
    <input type="text" name="aNames[$aData[iImage]]" value="$aData[sName]" class="input" style="width:95%;" />
  </th><td class="file">
    <a href="$config[dir_images]$aData[sDirectory]/$aData[sFile]" target="_blank">$aData[sFile]</a>
  </td><td class="position">
    <input type="text" name="aPositions[$aData[iImage]]" value="$aData[iPosition]" class="inputr" size="2" maxlength="3" />
  </td><td class="status">
    <input type="checkbox" name="aStatus[$aData[iImage]]" $aData[sStatusBox] value="1" />
  </td><td class="comments">
    <input type="checkbox" name="aComments[$aData[iImage]]" $aData[sCommentsBox] value="1" />
    - $aData[iCommentsQuantity]
  </td><td class="votes">
    <input type="checkbox" name="aVotes[$aData[iImage]]" $aData[sVotesBox] value="1" />
    - $aData[fVotesAvarage] / $aData[iVotesCount]
  </td><td class="page">
    <a href="?p=$aActions[f]-list&amp;iPageImages=$aData[iPage]">$aData[sPageName]</a>
  </td><td class="options">
    <a href="?p=comments-list&amp;iImage=$aData[iImage]"><img src="$config[dir_templates]admin/img/ico_comments.gif" alt="$lang[Comments]" title="$lang[Comments]" /></a>
    <a href="?p=$aActions[f]-form&amp;iImage=$aData[iImage]"><img src="$config[dir_templates]admin/img/ico_edit.gif" alt="$lang['edit']" title="$lang['edit']" /></a>
    <a href="?p=$aActions[f]-delete&amp;iImage=$aData[iImage]" onclick="return del( );"><img src="$config[dir_templates]admin/img/ico_del.gif" alt="$lang['delete']" title="$lang['delete']"/></a>  
  </td>
</tr>
<!-- END LIST -->

<!-- BEGIN HEAD -->
<form action="?p=$p&amp;iPageImages=$_GET[iPageImages]&amp;sSort=$_GET[sSort]" method="post">
  <fieldset>
  <table id="list" class="pages" cellspacing="1">
    <thead>
      <tr class="save">
        <td colspan="8">
          $lang[Pages]: $aData[sPages]
        </td>
        <td>
          <input type="submit" name="sOption" value="$lang['save'] &raquo;" />
        </td>
      </tr>
      <tr>
        <td class="id"><a href="?p=$p&amp;sSort=id">$lang['Id']</a></td>
        <td class="name">$lang['Name']</td>
        <td class="file">$lang['File']</td>
        <td class="position"><a href="?p=$p&amp;sSort=position">$lang['Position']</a></td>
        <td class="status">$lang['Status']</td>
        <td class="comments">$lang['Comments']</td>
        <td class="votes">$lang['Votes']</td>
        <td class="page">$lang['Page']</td>
        <td class="options">&nbsp;</td>
      </tr>
    </thead>
    <tfoot>
      <tr class="save">
        <td colspan="8">
          $lang[Pages]: $aData[sPages]
        </td>
        <td>
          <input type="submit" name="sOption" value="$lang['save'] &raquo;" />
        </td>
      </tr>
    </tfoot>
    <tbody>
<!-- END HEAD -->
<!-- BEGIN FOOT --></tbody></table></fieldset></form><!-- END FOOT -->

<!-- BEGIN FORM_MAIN -->
<div id="tabsDisplayLinks">
  <a href="#more" onclick="displayTabs( );" id="tabsHide">$lang['Hide_tabs']</a>
  <a href="#more" onclick="displayTabs( true );" id="tabsShow">$lang['Display_tabs']</a>
</div>
<h1><img src="$config[dir_templates]admin/img/ico_images.gif" alt="$lang['Image_form']" />$lang['Image_form']</h1>
<form action="?p=$p&amp;iImage=$aData[iImage]" name="form" enctype="multipart/form-data" method="post" id="mainForm" onsubmit="return checkForm( this );">
  <fieldset id="type1">
    <input type="hidden" name="iImage" value="$aData[iImage]" />
    <table cellspacing="0" class="mainTable" id="image">
      <thead>
        <tr class="save">
          <th colspan="2">
            <input type="submit" value="$lang['save_list'] &raquo;" name="sOptionList" />
            <input type="submit" value="$lang['save'] &raquo;" name="sOption" />
          </th>
        </tr>
      </thead>
      <tfoot>
        <tr class="save">
          <th colspan="2">
            <input type="submit" value="$lang['save_list'] &raquo;" name="sOptionList" />
            <input type="submit" value="$lang['save'] &raquo;" name="sOption" />
          </th>
        </tr>
      </tfoot>
      <!-- name start -->
      <tr class="l0">
        <td>
          $lang['Name']
        </td>
        <th rowspan="7" class="tabs">$sFormTabs</th>
      </tr>
      <tr class="l1">
        <td>
          <input type="text" name="sName" value="$aData[sName]" class="input" style="width:100%;" />
        </td>
      </tr>
      <!-- name end -->
      <!-- description start -->
      <tr class="l0">
        <td>
          $lang['Description']
        </td>
      </tr>
      <tr class="l1">
        <td>
          $sDescription
        </td>
      </tr>
      <!-- description end -->
      <tr class="end">
        <td>&nbsp;</td>
      </tr>
    </table>
  </fieldset>
</form>
<!-- END FORM_MAIN -->

<!-- BEGIN FORM_TABS -->
<div id="tabs">
  <ul id="tabsNames">
    <!-- tabs start -->
    <li class="tabOptions"><a href="#more" onclick="displayTab( 'tabOptions' )">$lang['Options']</a></li>
    <li class="tabImage"><a href="#more" onclick="displayTab( 'tabImage' )">$lang['Image']</a></li>
    <!-- tabs end -->
  </ul>
  <div id="tabsForms">
    <!-- tabs list start -->
    <table class="tab" id="tabOptions">
      <tr>
        <td>$lang['Status']</td>
        <td>$sStatusBox</td>
      </tr>
      <tr>
        <td>$lang['Comments']</td>
        <td>$sCommentsBox</td>
      </tr>
      <tr>
        <td>$lang['Votes']</td>
        <td>$sVotesBox</td>
      </tr>
      <tr>
        <td>$lang['Position']</td>
        <td><input type="text" name="iPosition" value="$aData[iPosition]" class="inputr" size="3" maxlength="4" /></td>
      </tr>
      <tr>
        <td>$lang['Page']</td>
        <td><select name="iPage" title="simple"><option value="">$lang[Select]</option>$sPagesSelect</select></td>
      </tr>
      $sVotesInfo
      <!-- tab options -->
    </table>

    <table class="tab" id="tabImage">
      $sImageInfo
      $sImageForm
      <tr>
        <td>$lang['Thumbnail_1']</td>
        <td><select name="iSize1">$sSize1Select</select></td>
      </tr>
      <tr>
        <td>$lang['Thumbnail_2']</td>
        <td><select name="iSize2">$sSize2Select</select></td>
      </tr>
      <!-- tab image -->
    </table>
    <!-- tabs list end -->
  </div>
</div>

<script type="text/javascript">
<!--
AddOnload( getTabsArray );
AddOnload( checkSelectedTab );
//-->
</script>
<!-- END FORM_TABS -->

<!-- BEGIN FORM_IMAGE -->
<tr>
  <td>$lang['Image']</td>
  <td><input type="file" name="aNewFile" value="" size="30" class="input" alt="simple" /></td>
</tr>
<tr>
  <td>$lang['Directory']</td>
  <td>
    <select name="sDirectory" title="simple" onchange="checkNewCatalogueName( this, 'oDirectoryNew' )"><option value="">$lang[Select]</option><option value="_newDirectory_">$lang[New_directory]</option>$sDirectorySelect</select>
  </td>
</tr>
<tr id="newDirectoryName">
  <td>$lang['New_directory']</td>
  <td><input type="text" name="sDirectoryNew" id="oDirectoryNew" class="input" size="30" maxlength="25" /></td>
</tr>
<!-- END FORM_IMAGE -->

<!-- BEGIN INFO_IMAGE -->
<tr>
  <td>$lang['Image']</td>
  <td><a href="$config[dir_images]$aData[sDirectory]/$aData[sFile]" target="_blank">$aData[sFile]</a></td>
</tr>
<!-- END INFO_IMAGE -->

<!-- BEGIN INFO_VOTES -->
<tr>
  <td>$lang['Votes_quantity']</td>
  <td><strong>$aVotes[iVotesCount]</strong></td>
</tr>
<tr>
  <td>$lang['Votes_avarage']</td>
  <td><strong>$aVotes[fVotesAvarage]</strong></td>
</tr>
<tr>
  <td>$lang['Votes_delete']</td>
  <td><input type="checkbox" name="iVotesDelete" value="1" /></td>
</tr>
<!-- END INFO_VOTES -->

<!-- BEGIN FORM_IMAGES -->
<h1><img src="$config[dir_templates]admin/img/ico_images.gif" alt="$lang[New_images]" />$lang[New_images]</h1>
<form action="?p=$p" method="post" id="mainForm" enctype="multipart/form-data" onsubmit="return checkForm( this );">
  <fieldset id="type2">
    <table cellspacing="1" class="mainTable" id="language">
      <thead>
        <tr class="save saveOptions">
          <td>&nbsp;</td>
          <td>
            <select onchange="setSelectValue( this, 'aPages[]' )"><option value="">$lang[Select]</option>$sPagesSelect</select>
          </td>
          <td colspan="3">&nbsp;</td>
          <td>
            <select onchange="setSelectValue( this, 'aDirectories[]' )"><option value="">$lang[Select]</option><option value="_newDirectory_">$lang[New_directory]</option>$sDirectorySelect</select>&nbsp;<input type="text" id="oDirectoriesNewName" class="input newDir" size="20" maxlength="25" onblur="setDirectoryName( this )" />
          </td>
          <th colspan="2">
            <input type="submit" value="$lang['save'] &raquo;" name="sOption" />
          </th>
        </tr>
        <tr class="titles">
          <td class="name">$lang[Name]</td>
          <td class="page">$lang[Page]</td>
          <td class="position">$lang[Position]</td>
          <td class="status">$lang[Status]</td>
          <td class="file">$lang[Image]</td>
          <td class="directory">$lang[Directory]</td>
          <td class="tdumbnail1">$lang[tdumbnail_1]</td>
          <td class="tdumbnail2">$lang[tdumbnail_2]</td>
        </tr>
      </thead>
      <tfoot>
        <tr class="save">
          <th colspan="8">
            <input type="submit" value="$lang['save'] &raquo;" name="sOption" />
          </th>
        </tr>
      </tfoot>
      <tbody>
        <tr class="l0">
          <td><input type="text" name="aNames[]" value="$aData[sName]" class="input" size="30" /></td>
          <td><select name="aPages[]" id="sP0" title="simple"><option value="">$lang[Select]</option>$sPagesSelect</select></td>
          <td><input type="text" name="aPositions[]" value="0" class="inputr" size="3" maxlength="4" /></td>
          <td><input type="checkbox" checked="checked" name="aStatus[0]" value="1" /></td>
          <td><input type="file" name="aFiles[]" value="" size="20" class="input" onblur="checkSelectRequire( this, 0 )" alt="simple" id="sF0" /></td>
          <td><select name="aDirectories[]" title="simple" onchange="checkNewCatalogueNameList( this )" id="sC0"><option value="">$lang[Select]</option><option value="_newDirectory_">$lang[New_directory]</option>$sDirectorySelect</select>&nbsp;<input type="text" name="aDirectoriesNew[]" class="input newDir" size="20" maxlength="25" id="sND0" /></td>
          <td><select name="aSizes1[]">$sSize1Select</select></td>
          <td><select name="aSizes2[]">$sSize2Select</select></td>
        </tr>
        <tr class="l1">
          <td><input type="text" name="aNames[]" value="$aData[sName]" class="input" size="30" /></td>
          <td><select name="aPages[]" id="sP1"><option value="">$lang[Select]</option>$sPagesSelect</select></td>
          <td><input type="text" name="aPositions[]" value="0" class="inputr" size="3" maxlength="4" /></td>
          <td><input type="checkbox" checked="checked" name="aStatus[1]" value="1" /></td>
          <td><input type="file" name="aFiles[]" value="" size="20" class="input" onblur="checkSelectRequire( this, 1 )" id="sF1" /></td>
          <td><select name="aDirectories[]" onchange="checkNewCatalogueNameList( this )" id="sC1"><option value="">$lang[Select]</option><option value="_newDirectory_">$lang[New_directory]</option>$sDirectorySelect</select>&nbsp;<input type="text" name="aDirectoriesNew[]" class="input newDir" size="20" maxlength="25" id="sND1" /></td>
          <td><select name="aSizes1[]">$sSize1Select</select></td>
          <td><select name="aSizes2[]">$sSize2Select</select></td>
        </tr>
        <tr class="l0">
          <td><input type="text" name="aNames[]" value="$aData[sName]" class="input" size="30" /></td>
          <td><select name="aPages[]" id="sP2"><option value="">$lang[Select]</option>$sPagesSelect</select></td>
          <td><input type="text" name="aPositions[]" value="0" class="inputr" size="3" maxlength="4" /></td>
          <td><input type="checkbox" checked="checked" name="aStatus[2]" value="1" /></td>
          <td><input type="file" name="aFiles[]" value="" size="20" class="input" onblur="checkSelectRequire( this, 2 )" id="sF2" /></td>
          <td><select name="aDirectories[]" onchange="checkNewCatalogueNameList( this )" id="sC2"><option value="">$lang[Select]</option><option value="_newDirectory_">$lang[New_directory]</option>$sDirectorySelect</select>&nbsp;<input type="text" name="aDirectoriesNew[]" class="input newDir" size="20" maxlength="25" id="sND2" /></td>
          <td><select name="aSizes1[]">$sSize1Select</select></td>
          <td><select name="aSizes2[]">$sSize2Select</select></td>
        </tr>
        <tr class="l1">
          <td><input type="text" name="aNames[]" value="$aData[sName]" class="input" size="30" /></td>
          <td><select name="aPages[]" id="sP3"><option value="">$lang[Select]</option>$sPagesSelect</select></td>
          <td><input type="text" name="aPositions[]" value="0" class="inputr" size="3" maxlength="4" /></td>
          <td><input type="checkbox" checked="checked" name="aStatus[3]" value="1" /></td>
          <td><input type="file" name="aFiles[]" value="" size="20" class="input" onblur="checkSelectRequire( this, 3 )" id="sF3" /></td>
          <td><select name="aDirectories[]" onchange="checkNewCatalogueNameList( this )" id="sC3"><option value="">$lang[Select]</option><option value="_newDirectory_">$lang[New_directory]</option>$sDirectorySelect</select>&nbsp;<input type="text" name="aDirectoriesNew[]" class="input newDir" size="20" maxlength="25" id="sND3" /></td>
          <td><select name="aSizes1[]">$sSize1Select</select></td>
          <td><select name="aSizes2[]">$sSize2Select</select></td>
        </tr>
        <tr class="l0">
          <td><input type="text" name="aNames[]" value="$aData[sName]" class="input" size="30" /></td>
          <td><select name="aPages[]" id="sP4"><option value="">$lang[Select]</option>$sPagesSelect</select></td>
          <td><input type="text" name="aPositions[]" value="0" class="inputr" size="3" maxlength="4" /></td>
          <td><input type="checkbox" checked="checked" name="aStatus[4]" value="1" /></td>
          <td><input type="file" name="aFiles[]" value="" size="20" class="input" onblur="checkSelectRequire( this, 4 )" id="sF4" /></td>
          <td><select name="aDirectories[]" onchange="checkNewCatalogueNameList( this )" id="sC4"><option value="">$lang[Select]</option><option value="_newDirectory_">$lang[New_directory]</option>$sDirectorySelect</select>&nbsp;<input type="text" name="aDirectoriesNew[]" class="input newDir" size="20" maxlength="25" id="sND4" /></td>
          <td><select name="aSizes1[]">$sSize1Select</select></td>
          <td><select name="aSizes2[]">$sSize2Select</select></td>
        </tr>
        <tr class="l1">
          <td><input type="text" name="aNames[]" value="$aData[sName]" class="input" size="30" /></td>
          <td><select name="aPages[]" id="sP5"><option value="">$lang[Select]</option>$sPagesSelect</select></td>
          <td><input type="text" name="aPositions[]" value="0" class="inputr" size="3" maxlength="4" /></td>
          <td><input type="checkbox" checked="checked" name="aStatus[5]" value="1" /></td>
          <td><input type="file" name="aFiles[]" value="" size="20" class="input" onblur="checkSelectRequire( this, 5 )" id="sF5" /></td>
          <td><select name="aDirectories[]" onchange="checkNewCatalogueNameList( this )" id="sC5"><option value="">$lang[Select]</option><option value="_newDirectory_">$lang[New_directory]</option>$sDirectorySelect</select>&nbsp;<input type="text" name="aDirectoriesNew[]" class="input newDir" size="20" maxlength="25" id="sND5" /></td>
          <td><select name="aSizes1[]">$sSize1Select</select></td>
          <td><select name="aSizes2[]">$sSize2Select</select></td>
        </tr>
        <tr class="l0">
          <td><input type="text" name="aNames[]" value="$aData[sName]" class="input" size="30" /></td>
          <td><select name="aPages[]" id="sP6"><option value="">$lang[Select]</option>$sPagesSelect</select></td>
          <td><input type="text" name="aPositions[]" value="0" class="inputr" size="3" maxlength="4" /></td>
          <td><input type="checkbox" checked="checked" name="aStatus[6]" value="1" /></td>
          <td><input type="file" name="aFiles[]" value="" size="20" class="input" onblur="checkSelectRequire( this, 6 )" id="sF6" /></td>
          <td><select name="aDirectories[]" onchange="checkNewCatalogueNameList( this )" id="sC6"><option value="">$lang[Select]</option><option value="_newDirectory_">$lang[New_directory]</option>$sDirectorySelect</select>&nbsp;<input type="text" name="aDirectoriesNew[]" class="input newDir" size="20" maxlength="25" id="sND6" /></td>
          <td><select name="aSizes1[]">$sSize1Select</select></td>
          <td><select name="aSizes2[]">$sSize2Select</select></td>
        </tr>
        <tr class="l1">
          <td><input type="text" name="aNames[]" value="$aData[sName]" class="input" size="30" /></td>
          <td><select name="aPages[]" id="sP7"><option value="">$lang[Select]</option>$sPagesSelect</select></td>
          <td><input type="text" name="aPositions[]" value="0" class="inputr" size="3" maxlength="4" /></td>
          <td><input type="checkbox" checked="checked" name="aStatus[7]" value="1" /></td>
          <td><input type="file" name="aFiles[]" value="" size="20" class="input" onblur="checkSelectRequire( this, 7 )" id="sF7" /></td>
          <td><select name="aDirectories[]" onchange="checkNewCatalogueNameList( this )" id="sC7"><option value="">$lang[Select]</option><option value="_newDirectory_">$lang[New_directory]</option>$sDirectorySelect</select>&nbsp;<input type="text" name="aDirectoriesNew[]" class="input newDir" size="20" maxlength="25" id="sND7" /></td>
          <td><select name="aSizes1[]">$sSize1Select</select></td>
          <td><select name="aSizes2[]">$sSize2Select</select></td>
        </tr>
        <tr class="l0">
          <td><input type="text" name="aNames[]" value="$aData[sName]" class="input" size="30" /></td>
          <td><select name="aPages[]" id="sP8"><option value="">$lang[Select]</option>$sPagesSelect</select></td>
          <td><input type="text" name="aPositions[]" value="0" class="inputr" size="3" maxlength="4" /></td>
          <td><input type="checkbox" checked="checked" name="aStatus[8]" value="1" /></td>
          <td><input type="file" name="aFiles[]" value="" size="20" class="input" onblur="checkSelectRequire( this, 8 )" id="sF8" /></td>
          <td><select name="aDirectories[]" onchange="checkNewCatalogueNameList( this )" id="sC8"><option value="">$lang[Select]</option><option value="_newDirectory_">$lang[New_directory]</option>$sDirectorySelect</select>&nbsp;<input type="text" name="aDirectoriesNew[]" class="input newDir" size="20" maxlength="25" id="sND8" /></td>
          <td><select name="aSizes1[]">$sSize1Select</select></td>
          <td><select name="aSizes2[]">$sSize2Select</select></td>
        </tr>
        <tr class="l1">
          <td><input type="text" name="aNames[]" value="$aData[sName]" class="input" size="30" /></td>
          <td><select name="aPages[]" id="sP9"><option value="">$lang[Select]</option>$sPagesSelect</select></td>
          <td><input type="text" name="aPositions[]" value="0" class="inputr" size="3" maxlength="4" /></td>
          <td><input type="checkbox" checked="checked" name="aStatus[9]" value="1" /></td>
          <td><input type="file" name="aFiles[]" value="" size="20" class="input" onblur="checkSelectRequire( this, 9 )" id="sF9" /></td>
          <td><select name="aDirectories[]" onchange="checkNewCatalogueNameList( this )" id="sC9"><option value="">$lang[Select]</option><option value="_newDirectory_">$lang[New_directory]</option>$sDirectorySelect</select>&nbsp;<input type="text" name="aDirectoriesNew[]" class="input newDir" size="20" maxlength="25" id="sND9" /></td>
          <td><select name="aSizes1[]">$sSize1Select</select></td>
          <td><select name="aSizes2[]">$sSize2Select</select></td>
        </tr>
      </tbody>
    </table>
  </fieldset>
</form>
<!-- END FORM_IMAGES -->