<{if $actionForm->hasError()}>
  <ul>
    <{foreach item=message from=$actionForm->getErrorMessages()}>
      <li><{$message|escape}></li>
    <{/foreach}>
  </ul>
<{/if}>
<form action="pmlite.php" method="post" name="coolsus">
  <{xoops_token form=$actionForm}>
  <table width="300" align="center" class="outer">
    <tr>
      <td class="head" width="25%"><{$smarty.const._PM_TO}></td>
      <td class="even">
        <{if $send_type==0}>
          <{if $actionForm->getVar('to_userid')}>
            <{$actionForm->getVar('to_userid')|xoops_user:"uname"}>
            <input type="hidden" name="to_userid" value="<{$actionForm->getVar('to_userid')}>" />
          <{else}>
            <select name="to_userid" ID="Select1">
            <{foreach item=user from=$userList}>
              <option value="<{$user->getVar('uid')}>"><{$user->getVar('uname')}></option>
            <{/foreach}>
            </select>
          <{/if}>
        <{else}>
          <{xoops_input name=to_uname value=$actionForm->getVar('to_uname')}>
        <{/if}>
      </td>
    </tr>
    <tr>
      <td class="head"><{$smarty.const._PM_SUBJECTC}></td>
      <td class="even">
        <{xoops_input name=subject size=30 maxlength=100 id=Text1 value=$actionForm->getVar('subject')}>
      </td>
    </tr>
    <tr valign="top">
      <td class="head"><{$smarty.const._PM_MESSAGEC}></td>
      <td class="even">
        <{xoops_dhtmltarea cols=37 rows=8 name=message value=$actionForm->getVar('message')}>
      </td>
    </tr>
    <tr>
      <td class="head">&nbsp;</td>
      <td class="even">
        <input type="hidden" name="op" value="submit" />
        <input type="submit" class="formButton" name="submit" value="<{$smarty.const._PM_SUBMIT}>" />&nbsp;
        <input type="reset" class="formButton" value="<{$smarty.const._PM_CLEAR}>" />&nbsp;
        <input type="button" class="formButton" name="cancel" value="<{$smarty.const._PM_CANCELSEND}>" onclick="javascript:window.close();" />
      </td>
    </tr>
  </table>
</form>
