<div class="adminnavi">
  <a href="./index.php"><{$smarty.const._MI_BASE_NAME}></a>
  &raquo;&raquo; <a href="./index.php?action=BlockList"><{$smarty.const._MI_BASE_MENU_BLOCKLIST}></a>
</div>

<h3><{$smarty.const._MI_BASE_MENU_BLOCKLIST}></h3>

<div class="tips">
  <{$smarty.const._AD_BASE_TIPS_ADD_CUSTOM_BLOCK}>
</div>

<div style="text-align:right;">
  [ <a href="index.php?action=BlockInstallList"><{$smarty.const._AD_BASE_LANG_BLOCK_INSTALL}></a> ]
  [ <a href="index.php?action=CustomBlockEdit"><{$smarty.const._AD_BASE_LANG_ADD_CUSTOM_BLOCK}></a> ]
</div>
<br/>
<{if $actionForm->hasError()}>
  <ul>
    <{foreach item=message from=$actionForm->getErrorMessages()}>
      <li><{$message|escape}></li>
    <{/foreach}>
  </ul>
<{/if}>
<form method="POST" action="./index.php?action=BlockList">
  <{xoops_token form=$actionForm}>
  <table class="outer">
    <tr>
      <th><{$smarty.const._AD_BASE_LANG_BID}><br />
        <a href="<{$pageNavi->renderSortUrl()}>&amp;sort=<{$smarty.const.NEWBLOCKS_SORT_KEY_BID}>"><img src="<{"icons/up.gif"|theme}>" alt="<{$smarty.const._ASCENDING}>" title="<{$smarty.const._ASCENDING}>" /></a>
        <a href="<{$pageNavi->renderSortUrl()}>&amp;sort=-<{$smarty.const.NEWBLOCKS_SORT_KEY_BID}>"><img src="<{"icons/down.gif"|theme}>" alt="<{$smarty.const._DESCENDING}>" title="<{$smarty.const._DESCENDING}>" /></a></th>
      <th><{$smarty.const._AD_BASE_LANG_MID}><br />
        <a href="<{$pageNavi->renderSortUrl()}>&amp;sort=<{$smarty.const.NEWBLOCKS_SORT_KEY_MID}>"><img src="<{"icons/up.gif"|theme}>" alt="<{$smarty.const._ASCENDING}>" title="<{$smarty.const._ASCENDING}>" /></a>
        <a href="<{$pageNavi->renderSortUrl()}>&amp;sort=-<{$smarty.const.NEWBLOCKS_SORT_KEY_MID}>"><img src="<{"icons/down.gif"|theme}>" alt="<{$smarty.const._DESCENDING}>" title="<{$smarty.const._DESCENDING}>" /></a></th>
<{*
      <th><{$smarty.const._AD_BASE_LANG_NAME}><br />
        <a href="<{$pageNavi->renderSortUrl()}>&amp;sort=<{$smarty.const.NEWBLOCKS_SORT_KEY_NAME}>"><img src="<{"icons/up.gif"|theme}>" alt="<{$smarty.const._ASCENDING}>" title="<{$smarty.const._ASCENDING}>" /></a>
        <a href="<{$pageNavi->renderSortUrl()}>&amp;sort=-<{$smarty.const.NEWBLOCKS_SORT_KEY_NAME}>"><img src="<{"icons/down.gif"|theme}>" alt="<{$smarty.const._DESCENDING}>" title="<{$smarty.const._DESCENDING}>" /></a></th>
*}>
      <th><{$smarty.const._AD_BASE_LANG_TITLE}><br />
        <a href="<{$pageNavi->renderSortUrl()}>&amp;sort=<{$smarty.const.NEWBLOCKS_SORT_KEY_TITLE}>"><img src="<{"icons/up.gif"|theme}>" alt="<{$smarty.const._ASCENDING}>" title="<{$smarty.const._ASCENDING}>" /></a>
        <a href="<{$pageNavi->renderSortUrl()}>&amp;sort=-<{$smarty.const.NEWBLOCKS_SORT_KEY_TITLE}>"><img src="<{"icons/down.gif"|theme}>" alt="<{$smarty.const._DESCENDING}>" title="<{$smarty.const._DESCENDING}>" /></a></th>
      <th><{$smarty.const._AD_BASE_LANG_SIDE}>
        <a href="<{$pageNavi->renderSortUrl()}>&amp;sort=<{$smarty.const.NEWBLOCKS_SORT_KEY_SIDE}>"><img src="<{"icons/up.gif"|theme}>" alt="<{$smarty.const._ASCENDING}>" title="<{$smarty.const._ASCENDING}>" /></a>
        <a href="<{$pageNavi->renderSortUrl()}>&amp;sort=-<{$smarty.const.NEWBLOCKS_SORT_KEY_SIDE}>"><img src="<{"icons/down.gif"|theme}>" alt="<{$smarty.const._DESCENDING}>" title="<{$smarty.const._DESCENDING}>" /></a><br />
        <{$smarty.const._AD_BASE_LANG_LCR}></th>
      <th><{$smarty.const._AD_BASE_LANG_WEIGHT}><br />
        <a href="<{$pageNavi->renderSortUrl()}>&amp;sort=<{$smarty.const.NEWBLOCKS_SORT_KEY_WEIGHT}>"><img src="<{"icons/up.gif"|theme}>" alt="<{$smarty.const._ASCENDING}>" title="<{$smarty.const._ASCENDING}>" /></a>
        <a href="<{$pageNavi->renderSortUrl()}>&amp;sort=-<{$smarty.const.NEWBLOCKS_SORT_KEY_WEIGHT}>"><img src="<{"icons/down.gif"|theme}>" alt="<{$smarty.const._DESCENDING}>" title="<{$smarty.const._DESCENDING}>" /></a></th>
      <th><{$smarty.const._AD_BASE_LANG_BCACHETIME}><br />
        <a href="<{$pageNavi->renderSortUrl()}>&amp;sort=<{$smarty.const.NEWBLOCKS_SORT_KEY_BCACHETIME}>"><img src="<{"icons/up.gif"|theme}>" alt="<{$smarty.const._ASCENDING}>" title="<{$smarty.const._ASCENDING}>" /></a>
        <a href="<{$pageNavi->renderSortUrl()}>&amp;sort=-<{$smarty.const.NEWBLOCKS_SORT_KEY_BCACHETIME}>"><img src="<{"icons/down.gif"|theme}>" alt="<{$smarty.const._DESCENDING}>" title="<{$smarty.const._DESCENDING}>" /></a></th>
      <th><{$smarty.const._AD_BASE_LANG_LAST_MODIFIED}><br />
        <a href="<{$pageNavi->renderSortUrl()}>&amp;sort=<{$smarty.const.NEWBLOCKS_SORT_KEY_LAST_MODIFIED}>"><img src="<{"icons/up.gif"|theme}>" alt="<{$smarty.const._ASCENDING}>" title="<{$smarty.const._ASCENDING}>" /></a>
        <a href="<{$pageNavi->renderSortUrl()}>&amp;sort=-<{$smarty.const.NEWBLOCKS_SORT_KEY_LAST_MODIFIED}>"><img src="<{"icons/down.gif"|theme}>" alt="<{$smarty.const._DESCENDING}>" title="<{$smarty.const._DESCENDING}>" /></a></th>
      <th><{$smarty.const._AD_BASE_LANG_CONTROL}></th>
    </tr>
    <{foreach item=obj from=$objects}>
      <tr class="<{cycle values='odd,even'}>" style="text-align:center;">
        <td><{$obj->getVar('bid')}></td>
        <td style="text-align:left;">
          <{if $obj->mModule}>
            <b><{$obj->mModule->getVar('name')}></b>
          <{else}>
            <{if $obj->get('c_type') == "H" }><{$smarty.const._AD_BASE_LANG_CUSTOM_HTML}>
            <{elseif $obj->get('c_type') == "P"}><{$smarty.const._AD_BASE_LANG_CUSTOM_PHP}>
            <{elseif $obj->get('c_type') == "S"}><{$smarty.const._AD_BASE_LANG_CUSTOM_WITH_SMILIES}>
            <{elseif $obj->get('c_type') == "T"}><{$smarty.const._AD_BASE_LANG_CUSTOM_WITHOUT_SMILIES}>
            <{/if}>
          <{/if}>
        </td>
<{*
        <td><{$obj->getVar('name')}></td>
*}>
        <td style="text-align:left;"><{$obj->getVar('title')}></td>
        <td nowrap><{strip}>
          <{if $obj->get('side') == 0}>
            <span style='background-color:#66ff66;'><{xoops_input type=radio name=side key=$obj->get('bid') value=0 default=$obj->get('side')}></span>-
          <{else}>
            <{xoops_input type=radio name=side key=$obj->get('bid') value=0 default=$obj->get('side')}>-
          <{/if}>
          <{if $obj->get('side') == 3}>
            <span style='background-color:#66FF66;'><{xoops_input type=radio name=side key=$obj->get('bid') value=3 default=$obj->get('side')}></span>
          <{else}>
            <{xoops_input type=radio name=side key=$obj->get('bid') value=3 default=$obj->get('side')}>
          <{/if}>
          <{if $obj->get('side') == 5}>
            <span style='background-color:#66FF66;'><{xoops_input type=radio name=side key=$obj->get('bid') value=5 default=$obj->get('side')}></span>
          <{else}>
            <{xoops_input type=radio name=side key=$obj->get('bid') value=5 default=$obj->get('side')}>
          <{/if}>
          <{if $obj->get('side') == 4}>
            <span style='background-color:#66FF66;'><{xoops_input type=radio name=side key=$obj->get('bid') value=4 default=$obj->get('side')}></span>-
          <{else}>
            <{xoops_input type=radio name=side key=$obj->get('bid') value=4 default=$obj->get('side')}>-
          <{/if}>
          <{if $obj->get('side') == 1}>
            <span style='background-color:#66FF66;'><{xoops_input type=radio name=side key=$obj->get('bid') value=1 default=$obj->get('side')}></span>
          <{else}>
            <{xoops_input type=radio name=side key=$obj->get('bid') value=1 default=$obj->get('side')}>
          <{/if}>
        <{/strip}></td>
        <td>
          <{xoops_input type=text name=weight size=4 key=$obj->get('bid') value=$obj->get('weight')}>
        </td>
        <td>
          <select name="bcachetime[<{$obj->getVar('bid')}>]">
            <{xoops_optionsArray from=$cachetimeArr value=cachetime label=label default=$obj->get('bcachetime')}>
          </select>
        </td>
        <td style="text-align:left;"><{$obj->getVar('last_modified')|xoops_formattimestamp:l}></td>
        <td>
          <{if $obj->get('block_type') == 'C'}>
            <a href="./index.php?action=CustomBlockEdit&amp;bid=<{$obj->getVar('bid')}>"><img src="<{"icons/edit.gif"|theme}>" alt="<{$smarty.const._EDIT}>" title="<{$smarty.const._EDIT}>" /></a>
          <{else}>
            <a href="./index.php?action=BlockEdit&amp;bid=<{$obj->getVar('bid')}>"><img src="<{"icons/edit.gif"|theme}>" alt="<{$smarty.const._EDIT}>" title="<{$smarty.const._EDIT}>" /></a>
          <{/if}>
          <a href="./index.php?action=BlockUninstall&amp;bid=<{$obj->getVar('bid')}>"><img src="<{"icons/uninstall.gif"|theme}>" alt="<{$smarty.const._DELETE}>" title="<{$smarty.const._DELETE}>" /></a>
        </td>
      </tr>
    <{/foreach}>
    <tr class="foot">
      <td colspan="10" class="foot">
        <input type="submit" value="<{$smarty.const._SUBMIT}>"/>
      </td>
    </tr>
  </table>
</form>

<div style="text-align:center;"><{xoops_pagenavi pagenavi=$pageNavi}></div>
