<script type="text/javascript" src="<{$xoops_url}>/modules/system/admin/images/js/imanager.js"></script>
<script type="text/javascript">window.moveTo(screen.availWidth/2-492,screen.availHeight/2-235);</script>
<div class="CPbigTitle" style="background-image: url(<{$xoops_url}>/modules/system/admin/images/images/images_big.png)"><{$lang_imanager_title}></div><br />
<p style="margin-top:0;"><{$admnav}></p>
<{if $catcount > 0}>
<div align="right">
  <{if $isAdmin}>
    <input type="button" onclick="showDiv('addcatform'); document.anchors.item('addcatform').scrollIntoView(); return false;" value="<{$lang_imanager_cat_addnewcat}>" />
  <{/if}>
  <{if $writecatcount > 0}>
    <input type="button" onclick="showDiv('addimgform'); document.anchors.item('addimgform').scrollIntoView(); return false;" value="<{$lang_imanager_cat_addnewimg}>" />
  <{/if}>
</div>
<form method="post">
  <table width="100%" celpadding="0" cellspacing="1" class="outer">
    <tr>
      <th align="center" width="20%"><{$lang_imanager_catname}></th>
      <th align="center" width="10%"><{$lang_imanager_catmsize}></th>
      <th align="center" width="10%"><{$lang_imanager_catmwidth}></th>
      <th align="center" width="10%"><{$lang_imanager_catmheight}></th>
      <th align="center" width="5%"><{$lang_imanager_catsubs}></th>
      <th align="center" width="10%"><{$lang_imanager_catqtde}></th>
      <th align="center" width="10%"><{$lang_imanager_catoptions}></th>
    </tr>
    <{section name=i loop=$imagecategorys}>
      <tr class="<{cycle values="odd,even"}>" align="center">
        <td align="left"><{$imagecategorys[i]->getVar('imgcat_name')}></td>
        <td><{$msize[i]}></td>
        <td><{$imagecategorys[i]->getVar('imgcat_maxwidth')}>px</td>
        <td><{$imagecategorys[i]->getVar('imgcat_maxheight')}>px</td>
        <td>
          <{if $subs[i] > 0}>
            <{$subs[i]}> <a href="?op=list&imgcat_id=<{$imagecategorys[i]->getVar('imgcat_id')}>&target=<{$target}>&type=<{$type}>" title="<{$smarty.const._MD_IMAGE_VIEWSUBS}>"><img src="<{$smarty.const.ICMS_IMAGES_SET_URL}>/actions/filefind.png" align="absmiddle" alt="<{$smarty.const._MD_IMAGE_VIEWSUBS}>" /></a>
          <{else}>
            <{$subs[i]}>
          <{/if}>
        </td>
        <td><{$count[i]}><{if $scount[i] > 0}> (+<{$scount[i]}>)<{/if}></td>
        <td>
          <{if $count[i] > 0}>
            <a href="?op=listimg&amp;imgcat_id=<{$imagecategorys[i]->getVar('imgcat_id')}>&target=<{$target}>&type=<{$type}>" title="<{$lang_imanager_cat_listimg}>"><img src="<{$smarty.const.ICMS_IMAGES_SET_URL}>/actions/viewmag.png" alt="<{$lang_imanager_cat_listimg}>" /></a>
          <{else}>
            <img src="<{$smarty.const.ICMS_IMAGES_SET_URL}>/actions/encrypted.png" alt="" />
          <{/if}>
        </td>
      </tr>
      <tr id="line<{$imagecategorys[i]->getVar('imgcat_id')}>" style="display:none;">
        <td class="head" width="2%"></td>
        <td colspan="7" style="padding:0; margin:0;">
          <div id="cat<{$imagecategorys[i]->getVar('imgcat_id')}>"></div>
        </td>  
      </tr>
    <{/section}>
  </table>
  <input type="hidden" name="op" value="reordercateg" />
  <{$token}>
</form>
<div align="right">
  <{if $isAdmin}>
    <input type="button" onclick="showDiv('addcatform'); document.anchors.item('addcatform').scrollIntoView(); return false;" value="<{$lang_imanager_cat_addnewcat}>" />
  <{/if}>
  <{if $writecatcount > 0}>
    <input type="button" onclick="showDiv('addimgform'); document.anchors.item('addimgform').scrollIntoView(); return false;" value="<{$lang_imanager_cat_addnewimg}>" />
  <{/if}>
</div>
<{/if}>
<div id="addimgform" class="opt_divs" style="display:none; margin:5px; padding:5px;"><{$addimgform}></div>
<a name="addimgform"></a>
<div id="addcatform" class="opt_divs" style="<{if $catcount > 0}>display:none;<{else}>display:block;<{/if}> margin:5px; padding:5px;"><{$addcatform}></div>
<a name="addcatform"></a>