<div class="adminnavi">
  <a href="./index.php"><{$smarty.const._MI_LEGACYRENDER_NAME}></a>
  &raquo;&raquo; <a href="./index.php?action=BannerList"><{$smarty.const._MI_LEGACYRENDER_ADMENU_BANNER_MANAGE}></a>
  <{if $actionForm->get('bid')}>
    &raquo;&raquo; <{$smarty.const._AD_LEGACYRENDER_LANG_BANNER_EDIT}>
  <{else}>
    &raquo;&raquo; <{$smarty.const._AD_LEGACYRENDER_LANG_BANNER_NEW}>
  <{/if}>
</div>

  <{if $actionForm->get('bid')}>
    <h3><{$smarty.const._AD_LEGACYRENDER_LANG_BANNER_EDIT}></h3>
  <{else}>
    <h3><{$smarty.const._AD_LEGACYRENDER_LANG_BANNER_NEW}></h3>
  <{/if}>

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

<form action="index.php?action=BannerEdit" method="post">
  <{xoops_token form=$actionForm}>
  <{xoops_input type=hidden name=bid value=$actionForm->get('bid')}>
  <table class="outer">
    <tr>
      <th colspan="2">
        <{if $actionForm->get('bid')}>
          <{$smarty.const._AD_LEGACYRENDER_LANG_BANNER_EDIT}>
        <{else}>
          <{$smarty.const._AD_LEGACYRENDER_LANG_BANNER_NEW}>
        <{/if}>
      </th>
    </tr>
    <{if $actionForm->get('bid')}>
    <tr>
      <td class="head" colspan="2" style="text-align:center;">
        <{if $actionForm->get('htmlbanner')}>
          <{$actionForm->get('htmlcode')}>
        <{else}>
          <a href="<{$actionForm->get('clickurl')}>" target="_blank"><img src="<{$actionForm->get('imageurl')}>" alt="Banner" /></a>
        <{/if}>
      </td>
    </tr>
    <{/if}>
    <tr>
      <td class="head"><{$smarty.const._AD_LEGACYRENDER_LANG_CID}></td>
      <td class="<{cycle values="odd,even"}>">
        <select name="cid">
        <{xoops_optionsArray from=$bannerclientArr label=name value=cid default=$actionForm->get('cid')}>
        </select>
      </td>
    </tr>
    <tr>
      <td class="head"><{$smarty.const._AD_LEGACYRENDER_LANG_IMPTOTAL}></td>
      <td class="<{cycle values="odd,even"}>">
        <{xoops_input type=text name=imptotal value=$actionForm->get('imptotal')}>
      </td>
    </tr>
    <tr>
      <td class="head"><{$smarty.const._AD_LEGACYRENDER_LANG_IMAGEURL}></td>
      <td class="<{cycle values="odd,even"}>">
        <{xoops_input type=text name=imageurl value=$actionForm->get('imageurl') size=70 maxlength=255}>
      </td>
    </tr>
    <tr>
      <td class="head"><{$smarty.const._AD_LEGACYRENDER_LANG_CLICKURL}></td>
      <td class="<{cycle values="odd,even"}>">
        <{xoops_input type=text name=clickurl value=$actionForm->get('clickurl') size=70 maxlength=255}>
      </td>
    </tr>
    <tr>
      <td class="head"><{$smarty.const._AD_LEGACYRENDER_LANG_HTMLCODE}></td>
      <td class="<{cycle values="odd,even"}>">
        <{xoops_textarea name=htmlcode cols=50 rows=10 value=$actionForm->get('htmlcode')}><br />
        <{xoops_input type=checkbox name=htmlbanner value=1 default=$actionForm->get('htmlbanner')}>
        <{$smarty.const._AD_LEGACYRENDER_LANG_HTMLBANNER}>
      </td>
    </tr>
    <tr>
      <td class="foot" colspan="2">
        <input class="formButton" type="submit" value="<{$smarty.const._SUBMIT}>" />
        <input class="formButton" type="submit" value="<{$smarty.const._BACK}>" name="_form_control_cancel" />
      </td>
    </tr>
  </table>
</form>
