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

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

<div class="tips">
<ul>
<li>
<{$smarty.const._AD_LEGACY_LANG_SMILES_TOTAL}>: <{$SmilesTotal}><br />
<{$smarty.const._AD_LEGACY_LANG_SMILES_DISPLAYTOTAL}>: <{$displaySmilesTotal}>&nbsp;&nbsp;|&nbsp; <{$smarty.const._AD_LEGACY_LANG_SMILES_NOTDISPLAYTOTAL}>: <{$notdisplaySmilesTotal}>
</li>
<li>
<{$smarty.const._AD_LEGACY_TIPS_SMILES}>
</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="add"><a href="index.php?action=SmilesEdit"><{$smarty.const._AD_LEGACY_LANG_CREATE_NEW}></a></li>
  <li class="archive"><a href="index.php?action=SmilesUpload"><{$smarty.const._AD_LEGACY_LANG_SMILES_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="SmilesList" />
  <{$smarty.const._SEARCH}> : 
  <input type="text" name="search" value="<{$filterForm->mKeyword}>" />
  <{$smarty.const._AD_LEGACY_LANG_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._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="smilesform" method="post" action="./index.php?action=SmilesList">
  <{xoops_token form=$actionForm}>
<table class="outer">
  <tr>
    <th><{$smarty.const._AD_LEGACY_LANG_ID}>
      <a href="<{$pageNavi->renderUrlForSort()}>&amp;sort=<{$smarty.const.SMILES_SORT_KEY_ID}>"><img src="<{"icons/up.png"|theme}>" alt="<{$smarty.const._ASCENDING}>" title="<{$smarty.const._ASCENDING}>" /></a>
      <a href="<{$pageNavi->renderUrlForSort()}>&amp;sort=-<{$smarty.const.SMILES_SORT_KEY_ID}>"><img src="<{"icons/down.png"|theme}>" alt="<{$smarty.const._DESCENDING}>" title="<{$smarty.const._DESCENDING}>" /></a></th>
    <th><{$smarty.const._MD_LEGACY_LANG_CODE}>
      <a href="<{$pageNavi->renderUrlForSort()}>&amp;sort=<{$smarty.const.SMILES_SORT_KEY_CODE}>"><img src="<{"icons/up.png"|theme}>" alt="<{$smarty.const._ASCENDING}>" title="<{$smarty.const._ASCENDING}>" /></a>
      <a href="<{$pageNavi->renderUrlForSort()}>&amp;sort=-<{$smarty.const.SMILES_SORT_KEY_CODE}>"><img src="<{"icons/down.png"|theme}>" alt="<{$smarty.const._DESCENDING}>" title="<{$smarty.const._DESCENDING}>" /></a></th>
    <th><{$smarty.const._AD_LEGACY_LANG_SMILE_URL}>
    <th><{$smarty.const._MD_LEGACY_LANG_EMOTION}>
      <a href="<{$pageNavi->renderUrlForSort()}>&amp;sort=<{$smarty.const.SMILES_SORT_KEY_EMOTION}>"><img src="<{"icons/up.png"|theme}>" alt="<{$smarty.const._ASCENDING}>" title="<{$smarty.const._ASCENDING}>" /></a>
      <a href="<{$pageNavi->renderUrlForSort()}>&amp;sort=-<{$smarty.const.SMILES_SORT_KEY_EMOTION}>"><img src="<{"icons/down.png"|theme}>" alt="<{$smarty.const._DESCENDING}>" title="<{$smarty.const._DESCENDING}>" /></a></th>
    <th><{$smarty.const._AD_LEGACY_LANG_DISPLAY}>
      <a href="<{$pageNavi->renderUrlForSort()}>&amp;sort=<{$smarty.const.SMILES_SORT_KEY_DISPLAY}>"><img src="<{"icons/up.png"|theme}>" alt="<{$smarty.const._ASCENDING}>" title="<{$smarty.const._ASCENDING}>" /></a>
      <a href="<{$pageNavi->renderUrlForSort()}>&amp;sort=-<{$smarty.const.SMILES_SORT_KEY_DISPLAY}>"><img src="<{"icons/down.png"|theme}>" alt="<{$smarty.const._DESCENDING}>" title="<{$smarty.const._DESCENDING}>" /></a></th>
   <th><{$smarty.const._DELETE}><br />
      <input name="allbox" id="allbox" onclick="with(document.smilesform){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->get('display') == 1 }>
    <tr class="<{cycle values='odd,even'}> active">
    <{else}>
    <tr class="<{cycle values='odd,even'}> inactive">
    <{/if}>
      <td class="legacy_list_id"><{$obj->getShow('id')}></td>
      <td class="legacy_list_name"><input type="text" size="6" name="code[<{$obj->getShow('id')}>]" value="<{$obj->getShow('code')}>" /></td>
      <td class="legacy_list_image"><img src="<{$smarty.const.XOOPS_UPLOAD_URL}>/<{$obj->getShow('smile_url')}>" alt="<{$obj->getShow('emotion')}>" title="<{$obj->getShow('emotion')}>" /></td>
      <td class="legacy_list_text"><input type="text" size="20" name="emotion[<{$obj->getShow('id')}>]" value="<{$obj->getShow('emotion')}>" /></td>
      <td class="legacy_list_select"><input type="checkbox" name="display[<{$obj->getShow('id')}>]" value="1" <{if $obj->getShow('display')}>checked="checked"<{/if}> /></td>
      <td class="legacy_list_select"><input type="checkbox" name="delete[<{$obj->getShow('id')}>]" value="1" /></td>
      <td class="legacy_list_control">
        <a href="./index.php?action=SmilesEdit&amp;id=<{$obj->getShow('id')}>"><img src="<{"icons/edit.png"|theme}>" alt="<{$smarty.const._EDIT}>" title="<{$smarty.const._EDIT}>" /></a>
        <a href="./index.php?action=SmilesDelete&amp;id=<{$obj->getShow('id')}>"><img src="<{"icons/delete.png"|theme}>" alt="<{$smarty.const._DELETE}>" title="<{$smarty.const._DELETE}>" /></a>
      </td>
    </tr>
  <{/foreach}>
    <tr>
      <td colspan="7" class="foot">
        <input type="submit" value="<{$smarty.const._SUBMIT}>" class="formButton" />
      </td>
    </tr>
</table>
</form>

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