<div style="margin-left: 0.5em; padding: 1em;">
  <span style="background-color:#ffcccc; font: normal normal bold 9pt/12pt;">
    <{"WIZMOBILE_LANG_BLOCK_SETTING"|wiz_constant}>
  </span>
  <hr />
</div>
<div style="margin-left: 0.5em; padding-bottom: 1em;">
  <form action="admin.php" method="post">
    <h3><{"WIZMOBILE_LANG_BLOCK_SETTING"|wiz_constant}></h3>
    <table class="outer" style="margin-bottom: 1em;">
      <tr class="head">
        <th>ID</th>
        <th><{"WIZMOBILE_LANG_BLOCK_TITLE"|wiz_constant}></th>
        <th><{"WIZMOBILE_LANG_MODULE_NAME"|wiz_constant}></th>
        <th><{"WIZMOBILE_LANG_DIRNAME"|wiz_constant}></th>
        <th><{"WIZMOBILE_LANG_VISIBLE"|wiz_constant}>/<{"WIZMOBILE_LANG_INVISIBLE"|wiz_constant}></th>
        <th style="width: 4em;"><{"WIZMOBILE_LANG_WEIGHT"|wiz_constant}></th>
      </tr>
      <{foreach name=fe_blocks item=itm_blocks key=key_blocks from=$blocks}>
      <tr class="<{cycle values="odd,even"}>">
        <td>
          <{$itm_blocks.bid}>
        </td>
        <td>
          <{$itm_blocks.title}>
        </td>
        <td>
          <{$itm_blocks.module_name|default:"--"}>
        </td>
        <td>
          <{$itm_blocks.dirname|default:"--"}>
        </td>
        <td>
          <label>
            <input type="radio" name="wmb_visible[<{$itm_blocks.bid}>]" value="<{$smarty.const.WIZMOBILE_BLOCK_VISIBLE_TITLE}>"<{if $itm_blocks.wmb_visible === $smarty.const.WIZMOBILE_BLOCK_VISIBLE_TITLE}> checked="checked"<{/if}> />
            <{"WIZMOBILE_LANG_VISIBLE_TITLE"|wiz_constant}>
          </label><br />
          <label>
            <input type="radio" name="wmb_visible[<{$itm_blocks.bid}>]" value="<{$smarty.const.WIZMOBILE_BLOCK_VISIBLE_ALL}>"<{if $itm_blocks.wmb_visible === $smarty.const.WIZMOBILE_BLOCK_VISIBLE_ALL}> checked="checked"<{/if}> />
            <{"WIZMOBILE_LANG_VISIBLE_ALL"|wiz_constant}>
          </label><br />
          <label>
            <input type="radio" name="wmb_visible[<{$itm_blocks.bid}>]" value="<{$smarty.const.WIZMOBILE_BLOCK_INVISIBLE}>"<{if $itm_blocks.wmb_visible === $smarty.const.WIZMOBILE_BLOCK_INVISIBLE}> checked="checked"<{/if}> />
            <{"WIZMOBILE_LANG_INVISIBLE"|wiz_constant}>
          </label>
          <{if $itm_blocks.wmb_visible === null}>
          <br />
          <label>
            <input type="radio" name="wmb_visible[<{$itm_blocks.bid}>]" value="<{$itm_blocks.pc_visible}>" checked="checked" />
            <span style="color: #ff0000;"><{"WIZMOBILE_LANG_UNSETTING"|wiz_constant}></span>
          </label>
          <{/if}>
        </td>
        <td>
          <input type="text" name="wmb_weight[<{$itm_blocks.bid}>]" value="<{$itm_blocks.wmb_weight}>" style="width: 3em;" />
        </td>
      </tr>
      <{/foreach}>
    </table>

    <h3><{"WIZMOBILE_LANG_DEFAULT_BLOCK"|wiz_constant}></h3>
    <table class="outer" style="margin-bottom: 1em; width: 600px;">
      <tr class="odd">
        <td>
          <select name="default_bid">
            <option value=""><{"WIZMOBILE_LANG_NONE_SETTING"|wiz_constant}></option>
            <{foreach name=fe_blocks item=itm_blocks key=key_blocks from=$blocks}>
              <option value="<{$itm_blocks.bid}>" <{if $itm_blocks.bid == $defaultBid}>selected="selected"<{/if}> ><{$itm_blocks.title}>&nbsp;&nbsp;&nbsp;[ <{$itm_blocks.module_name|default:"--"}> / <{$itm_blocks.dirname|default:"--"}> ]</option>
            <{/foreach}>
          </select>
        </td>
      </tr>
      <tr class="even">
        <td colspan="2"><{"WIZMOBILE_LANG_DEFAULT_BLOCK_DESC"|wiz_constant}></th>
      </tr>
    </table>

    <div style="text-align: center; width: 100%; margin: auto;">
      <input type="hidden" name="act" value="BlockSetting" />
      <{wiz_gticket area=$wizmobile_dirname}>
      <input type="submit" value="<{"WIZMOBILE_LANG_UPDATE"|wiz_constant}>" />
    </div>
  </form>
</div>
