<form method="post" id="postform" action="pm.php?action=send&pmsubmit=yes" onSubmit="javascript: this.pmsubmit.disabled=true">
<input type="hidden" name="formhash" value="{FORMHASH}">
<div class="spaceborder" style="width: 100%">
<table cellspacing="{INNERBORDERWIDTH}" cellpadding="{TABLESPACE}" width="100%">
<tr>
<td width="100%" colspan="2" class="header"><a href="member.php?action=credits&view=pm" target="_blank"><img src="{IMGDIR}/credits.gif" alt="{lang credits_policy_view}" align="right" border="0" /></a>{lang pm_send}</td>
</tr>

<!--{if $seccodecheck}-->
	<tr>
	<td class="altbg1" width="18%"><span class="bold">{lang seccode}</span></td>
	<td class="altbg2"><input type="text" name="seccodeverify" size="4" maxlength="4"> <img id="seccode" style="cursor:pointer" onclick="this.src='seccode.php?update=' + Math.random()" src="seccode.php" class="absmiddle" alt="" /> <span class="smalltxt">{lang secode_refresh}</span></td>
	</tr>
	<script type="text/javascript">$('seccode').src = 'seccode.php?update=' + Math.random()</script>
<!--{/if}-->

<tr><td class="altbg1" width="18%"><span class="bold">{lang to}</span></td>
<td class="altbg2" width="82%"><input type="text" name="msgto" size="65" value="$touser"></td></tr>

<!--{if $buddylist}-->
	<tr><td class="altbg1" valign="top" id="buddy"><span class="bold">{lang pm_to_buddy}</span>&nbsp;&nbsp;&nbsp;&nbsp;
	<span class="smalltxt">{lang checkall}</span><input class="checkbox" type="checkbox" name="chkall" onclick="checkall(this.form, 'msgtobuddys')"></td>
	<td class="altbg2">
	<table border="0" cellspacing="0" cellpadding="0" width="100%"><tr><td>
	<!--{loop $buddylist $key $buddy}-->
		<!--{if $key % 3 == 0}--></td></tr><tr><td width="33%" nowrap><!--{else}--></td><td width="33%" nowrap><!--{/if}-->
		<input class="checkbox" type="checkbox" name="msgtobuddys[]" value="$buddy[buddyid]"> $buddy[buddyname]
	<!--{/loop}-->
	</table>
	</td></tr>
<!--{/if}-->

<tr>
<td class="altbg1"><span class="bold">{lang subject}</span></td>
<td class="altbg2"><input type="text" name="subject" size="65" value="$subject"></td>
</tr>

<tr class="bottom">
<td valign="top" class="altbg1"><span class="bold">{lang message}</span><br><br>
<!--{if $smileyinsert}-->
	<div id="{$editorid}_smiliebox">
	<table cellpadding="3" cellspacing="0" width="80%" border="0" align="center">
	$smilies
	<!--{if $moresmilies}-->
		<tr>
		<td colspan="$smcols" align="right" class="bold"><br><a href="#" onclick="opensmiliewindow(200, 500);return false">{lang post_smilies_more} &rsaquo;&rsaquo;</a></td>
		</tr>
	<!--{/if}-->
	</table>
	</div>
<!--{/if}-->
</td>
<td class="altbg2"><textarea rows="8" cols="10" name="message" style="width: 100%; height:200px; word-break: break-all" onKeyDown="ctlent(event);">
<!--{if $do == 'reply'}-->
	[b]{lang pm_orig_message}:[/b] [url={$boardurl}pm.php?action=view&folder=inbox&pmid={$pm[pmid]}]$pm[subject][/url]{LF}
<!--{elseif $do == 'forward'}-->
	[b]{lang pm_orig_message}[/b] [url={$boardurl}pm.php?action=send&pmid=$pm[pmid]&do=reply]({lang reply})[/url]
	[b]{lang from}:[/b] [url={$boardurl}viewpro.php?uid={$pm[msgfromid]}]$pm[msgfrom][/url]
	[b]{lang to}:[/b] [url={$boardurl}viewpro.php?uid=$discuz_uid]$discuz_user[/url]
	[b]{lang time}:[/b] $pm[dateline]{LF}{LF}
<!--{/if}-->
$message
</textarea><br><span class="smalltxt"><input class="checkbox" type="checkbox" name="saveoutbox" value="1">{lang pm_send_save_outbox}</span>

</td>
</tr>

</table></div><br>
<div class="option" style="width: 100%"><div class="submitbutton"><input class="button" type="submit" name="pmsubmit" id="postsubmit" value="{lang submit}"></div></div>
</form>
