<div class="adminnavi">
  <a href="./index.php"><{$smarty.const._MI_LEGACY_NAME}></a>
  &raquo;&raquo; <a href="./index.php?action=ImagecategoryList"><{$smarty.const._MI_LEGACY_MENU_IMAGE_MANAGE}></a>
  &raquo;&raquo; <span class="adminnaviTitle"><{$smarty.const._AD_LEGACY_LANG_IMAGECATEGORY_LIST}></span>
</div>

<h3 class="admintitle"><{$smarty.const._AD_LEGACY_LANG_IMAGECATEGORY_LIST}></h3>

<div class="tips">
<ul>
<li>
<{$smarty.const._AD_LEGACY_LANG_IMGCAT_TOTAL}>: <{$ImgcatTotal}><br />
<{$smarty.const._AD_LEGACY_LANG_IMGCAT_FILETYPETOTAL}>: <{$fileImgcatTotal}>&nbsp;&nbsp;|&nbsp; <{$smarty.const._AD_LEGACY_LANG_IMGCAT_DBTYPETOTAL}>: <{$dbImgcatTotal}>
</li>
<li>
<{$smarty.const._AD_LEGACY_LANG_IMAGE_TOTAL}>: <{$ImageTotal}><br />
<{$smarty.const._AD_LEGACY_LANG_IMAGE_DISPLAYTOTAL}>: <{$displayImageTotal}>&nbsp;&nbsp;|&nbsp; <{$smarty.const._AD_LEGACY_LANG_IMAGE_NOTDISPLAYTOTAL}>: <{$notdisplayImageTotal}>
</li>
<li>
<{$smarty.const._AD_LEGACY_TIPS_IMGCAT}>
</li>
<li><a href="<{$xoops_url}>/modules/legacy/admin/index.php?action=Help&amp;dirname=legacy"><{$smarty.const._HELP}></a></li>
</ul>
</div>

<ul class="toptab">
<li class="addFolder"><a href="index.php?action=ImagecategoryEdit"><{$smarty.const._AD_LEGACY_LANG_CREATE_NEW}></a></li>
<!-- <li class="addImage"><a href="javascript:openWithSelfMain('<{$xoops_url}>/common/fckeditor/editor/plugins/kfm/index.php', 'filemanager', 750, 600);">File Manager</a></li> -->
<li class="archive"><a href="index.php?action=ImageUpload"><{$smarty.const._AD_LEGACY_LANG_IMAGE_UPLOAD}></a></li>
</ul>

<{if $actionForm->hasError()}>
<div class="error">
  <ul>
    <{foreach item=message from=$actionForm->getErrorMessages()}>
      <li><{$message|xoops_escape}></li>
    <{/foreach}>
  </ul>
</div>
<{/if}>

<div>
<form action="./index.php" method="get">
  <input type="hidden" name="action" value="ImagecategoryList" />
  <{$smarty.const._SEARCH}> : 
  <input type="text" name="search" value="<{$filterForm->mKeyword}>" />
  <{$smarty.const._AD_LEGACY_LANG_IMGCAT_DISPLAY}> : 
  <select name="option_field">
    <option value="all" <{if $filterForm->mOptionField == 'all'}>selected="selected"<{/if}>><{$smarty.const._ALL}></option>
    <option value="visible" <{if $filterForm->mOptionField == 'visible'}>selected="selected"<{/if}>><{$smarty.const._YES}></option>
    <option value="invisible" <{if $filterForm->mOptionField == 'invisible'}>selected="selected"<{/if}>><{$smarty.const._NO}></option>
  </select>
  <{$smarty.const._AD_LEGACY_LANG_IMGCAT_STORETYPE}> : 
  <select name="option_field2">
    <option value="all" <{if $filterForm->mOptionField2 == 'all'}>selected="selected"<{/if}>><{$smarty.const._ALL}></option>
    <option value="file" <{if $filterForm->mOptionField2 == 'file'}>selected="selected"<{/if}>>FILE</option>
    <option value="db" <{if $filterForm->mOptionField2 == 'db'}>selected="selected"<{/if}>>DB</option>
  </select>
  <{$smarty.const._VIEW}> : 
  <select name="perpage">
    <option value="<{$smarty.const.XCUBE_PAGENAVI_DEFAULT_PERPAGE}>"><{$smarty.const._SELECT}></option>
    <{foreach item=page from=$pageArr}>
      <{if $pageNavi->mPerpage == $page && $page != 0}>
        <option value="<{$page}>" selected="selected"><{$page}></option>
      <{elseif $pageNavi->mPerpage == $page && $page == 0}>
        <option value="<{$page}>" selected="selected"><{$smarty.const._ALL}></option>
      <{elseif $pageNavi->mPerpage != $page && $page == 0}>
        <option value="<{$page}>"><{$smarty.const._ALL}></option>
      <{else}>
        <option value="<{$page}>"><{$page}></option>
      <{/if}>
    <{/foreach}>
  </select>
  <input class="formButton" type="submit" value="<{$smarty.const._SUBMIT}>" />
</form>
</div>

<form name="imagecategorylistform" method="post" action="./index.php?action=ImagecategoryList">
  <{xoops_token form=$actionForm}>
<table class="outer">
  <tr>
    <th><{$smarty.const._AD_LEGACY_LANG_IMGCAT_ID}>
      <a href="<{$pageNavi->renderUrlForSort()}>&amp;sort=<{$smarty.const.IMAGECATEGORY_SORT_KEY_IMGCAT_ID}>"><img src="<{"icons/up.png"|theme}>" alt="<{$smarty.const._ASCENDING}>" title="<{$smarty.const._ASCENDING}>" /></a>
      <a href="<{$pageNavi->renderUrlForSort()}>&amp;sort=-<{$smarty.const.IMAGECATEGORY_SORT_KEY_IMGCAT_ID}>"><img src="<{"icons/down.png"|theme}>" alt="<{$smarty.const._DESCENDING}>" title="<{$smarty.const._DESCENDING}>" /></a></th>
    <th><{$smarty.const._AD_LEGACY_LANG_IMGCAT_NAME}>
      <a href="<{$pageNavi->renderUrlForSort()}>&amp;sort=<{$smarty.const.IMAGECATEGORY_SORT_KEY_IMGCAT_NAME}>"><img src="<{"icons/up.png"|theme}>" alt="<{$smarty.const._ASCENDING}>" title="<{$smarty.const._ASCENDING}>" /></a>
      <a href="<{$pageNavi->renderUrlForSort()}>&amp;sort=-<{$smarty.const.IMAGECATEGORY_SORT_KEY_IMGCAT_NAME}>"><img src="<{"icons/down.png"|theme}>" alt="<{$smarty.const._DESCENDING}>" title="<{$smarty.const._DESCENDING}>" /></a></th>
    <th><{$smarty.const._AD_LEGACY_LANG_IMGCAT_MAXSIZE}>
      <a href="<{$pageNavi->renderUrlForSort()}>&amp;sort=<{$smarty.const.IMAGECATEGORY_SORT_KEY_IMGCAT_MAXSIZE}>"><img src="<{"icons/up.png"|theme}>" alt="<{$smarty.const._ASCENDING}>" title="<{$smarty.const._ASCENDING}>" /></a>
      <a href="<{$pageNavi->renderUrlForSort()}>&amp;sort=-<{$smarty.const.IMAGECATEGORY_SORT_KEY_IMGCAT_MAXSIZE}>"><img src="<{"icons/down.png"|theme}>" alt="<{$smarty.const._DESCENDING}>" title="<{$smarty.const._DESCENDING}>" /></a></th>
    <th><{$smarty.const._AD_LEGACY_LANG_IMGCAT_MAXWIDTH}>
      <a href="<{$pageNavi->renderUrlForSort()}>&amp;sort=<{$smarty.const.IMAGECATEGORY_SORT_KEY_IMGCAT_MAXWIDTH}>"><img src="<{"icons/up.png"|theme}>" alt="<{$smarty.const._ASCENDING}>" title="<{$smarty.const._ASCENDING}>" /></a>
      <a href="<{$pageNavi->renderUrlForSort()}>&amp;sort=-<{$smarty.const.IMAGECATEGORY_SORT_KEY_IMGCAT_MAXWIDTH}>"><img src="<{"icons/down.png"|theme}>" alt="<{$smarty.const._DESCENDING}>" title="<{$smarty.const._DESCENDING}>" /></a></th>
    <th><{$smarty.const._AD_LEGACY_LANG_IMGCAT_MAXHEIGHT}>
      <a href="<{$pageNavi->renderUrlForSort()}>&amp;sort=<{$smarty.const.IMAGECATEGORY_SORT_KEY_IMGCAT_MAXHEIGHT}>"><img src="<{"icons/up.png"|theme}>" alt="<{$smarty.const._ASCENDING}>" title="<{$smarty.const._ASCENDING}>" /></a>
      <a href="<{$pageNavi->renderUrlForSort()}>&amp;sort=-<{$smarty.const.IMAGECATEGORY_SORT_KEY_IMGCAT_MAXHEIGHT}>"><img src="<{"icons/down.png"|theme}>" alt="<{$smarty.const._DESCENDING}>" title="<{$smarty.const._DESCENDING}>" /></a></th>
    <th><{$smarty.const._AD_LEGACY_LANG_IMGCAT_DISPLAY}>
      <a href="<{$pageNavi->renderUrlForSort()}>&amp;sort=<{$smarty.const.IMAGECATEGORY_SORT_KEY_IMGCAT_DISPLAY}>"><img src="<{"icons/up.png"|theme}>" alt="<{$smarty.const._ASCENDING}>" title="<{$smarty.const._ASCENDING}>" /></a>
      <a href="<{$pageNavi->renderUrlForSort()}>&amp;sort=-<{$smarty.const.IMAGECATEGORY_SORT_KEY_IMGCAT_DISPLAY}>"><img src="<{"icons/down.png"|theme}>" alt="<{$smarty.const._DESCENDING}>" title="<{$smarty.const._DESCENDING}>" /></a></th>
    <th><{$smarty.const._AD_LEGACY_LANG_IMGCAT_WEIGHT}>
      <a href="<{$pageNavi->renderUrlForSort()}>&amp;sort=<{$smarty.const.IMAGECATEGORY_SORT_KEY_IMGCAT_WEIGHT}>"><img src="<{"icons/up.png"|theme}>" alt="<{$smarty.const._ASCENDING}>" title="<{$smarty.const._ASCENDING}>" /></a>
      <a href="<{$pageNavi->renderUrlForSort()}>&amp;sort=-<{$smarty.const.IMAGECATEGORY_SORT_KEY_IMGCAT_WEIGHT}>"><img src="<{"icons/down.png"|theme}>" alt="<{$smarty.const._DESCENDING}>" title="<{$smarty.const._DESCENDING}>" /></a></th>
    <th><{$smarty.const._AD_LEGACY_LANG_IMGCAT_STORETYPE}>
      <a href="<{$pageNavi->renderUrlForSort()}>&amp;sort=<{$smarty.const.IMAGECATEGORY_SORT_KEY_IMGCAT_STORETYPE}>"><img src="<{"icons/up.png"|theme}>" alt="<{$smarty.const._ASCENDING}>" title="<{$smarty.const._ASCENDING}>" /></a>
      <a href="<{$pageNavi->renderUrlForSort()}>&amp;sort=-<{$smarty.const.IMAGECATEGORY_SORT_KEY_IMGCAT_STORETYPE}>"><img src="<{"icons/down.png"|theme}>" alt="<{$smarty.const._DESCENDING}>" title="<{$smarty.const._DESCENDING}>" /></a></th>
    <th><{$smarty.const._AD_LEGACY_LANG_IMAGE_COUNT}></th>
    <th><{$smarty.const._DELETE}><br />
      <input name="allbox" id="allbox" onclick="with(document.imagecategorylistform){for(i=0;i<length;i++){if(elements[i].type=='checkbox'&&elements[i].disabled==false&&elements[i].name.indexOf('delete')>=0){elements[i].checked=this.checked;}}}" type="checkbox" value="Check All" /></th>
    <th><{$smarty.const._AD_LEGACY_LANG_CONTROL}></th>
  </tr>
  <{foreach item=obj from=$objects}>
    <{if $obj->getShow('imgcat_display') == 1}>
      <tr class="<{cycle values='odd,even'}> active">
    <{else}>
      <tr class="<{cycle values='odd,even'}>">
    <{/if}>
      <td class="legacy_list_id"><{$obj->getShow('imgcat_id')}></td>
      <td class="legacy_list_title">
        <input type="text" size="12" name="name[<{$obj->getShow('imgcat_id')}>]" value="<{$obj->getShow('imgcat_name')}>" />
      </td>
      <td class="legacy_list_number"><input type="text" size="6" maxlength="10" name="maxsize[<{$obj->getShow('imgcat_id')}>]" value="<{$obj->getShow('imgcat_maxsize')}>" class=legacy_list_number /></td>
      <td class="legacy_list_number"><input type="text" size="4" maxlength="6" name="maxwidth[<{$obj->getShow('imgcat_id')}>]" value="<{$obj->getShow('imgcat_maxwidth')}>" class=legacy_list_number /></td>
      <td class="legacy_list_number"><input type="text" size="4" maxlength="6" name="maxheight[<{$obj->getShow('imgcat_id')}>]" value="<{$obj->getShow('imgcat_maxheight')}>" class=legacy_list_number /></td>
      <td class="legacy_list_select"><input type="checkbox" name="display[<{$obj->getShow('imgcat_id')}>]" value="1" <{if $obj->getShow('imgcat_display')}>checked="checked"<{/if}> /></td>
      <td class="legacy_list_order"><input type="text" size="4" maxlength="6" name="weight[<{$obj->getShow('imgcat_id')}>]" value="<{$obj->getShow('imgcat_weight')}>" class=legacy_list_number /></td>
      <td class="legacy_list_type"><{$obj->getShow('imgcat_storetype')}></td>
      <td class="legacy_list_number"><{$obj->getImageCount()|xoops_escape}></td>
      <td class="legacy_list_select"><input type="checkbox" name="delete[<{$obj->getShow('imgcat_id')}>]" value="1" /></td>
      <td class="legacy_list_control">
        <a href="./index.php?action=ImageList&amp;imgcat_id=<{$obj->getShow('imgcat_id')}>"><img src="<{"icons/view.png"|theme}>" alt="<{$smarty.const._AD_LEGACY_LANG_LIST}>" title="<{$smarty.const._AD_LEGACY_LANG_LIST}>" /></a>
        <a href="./index.php?action=ImageCreate&amp;imgcat_id=<{$obj->getShow('imgcat_id')}>"><img src="<{"icons/add.png"|theme}>" alt="<{$smarty.const._AD_LEGACY_LANG_IMAGE_NEW}>" title="<{$smarty.const._AD_LEGACY_LANG_IMAGE_NEW}>" /></a>
        <a href="./index.php?action=ImagecategoryEdit&amp;imgcat_id=<{$obj->getShow('imgcat_id')}>"><img src="<{"icons/edit.png"|theme}>" alt="<{$smarty.const._EDIT}>" title="<{$smarty.const._EDIT}>" /></a>
        <a href="./index.php?action=ImagecategoryDelete&amp;imgcat_id=<{$obj->getShow('imgcat_id')}>"><img src="<{"icons/delete.png"|theme}>" alt="<{$smarty.const._DELETE}>" title="<{$smarty.const._DELETE}>" /></a>
      </td>
    </tr>
  <{/foreach}>
    <tr>
      <td colspan="11" class="foot">
        <input type="submit" value="<{$smarty.const._SUBMIT}>" class="formButton" />
      </td>
    </tr>
</table>
</form>

<div class="pagenavi"><{xoops_pagenavi pagenavi=$pageNavi}></div>
