<%template _header%>
<!--header end-->

<!--TheCurrent start-->
<div id="foruminfo">
	<div class="userinfo">
		<h2><a href="{config.forumurl}" class="home">{config.forumtitle}</a> <span><a href="usercp.aspx">用户中心</a></span><strong>发件箱</strong></h2>	</div>
	<div class="forumstats">
		<div id="search">
				<%template _quicksearch%>
		</div>
	</div>
</div>
<!--TheCurrent end-->
<!--主体-->
<script type="text/javascript">
	function checkCheckBox(form,objtag)
	{
		if (typeof(objtag.checked) == "undefined")
		{
			objtag.checked = true;
		}
		for(var i = 0; i < form.elements.length; i++) 
		{
			var e = form.elements[i];
			if(e.name == "pmitemid") 
			{
				e.checked = objtag.checked;
			}
		}
		objtag.checked = !objtag.checked;
	}
</script>
<div class="controlpannel">
   <%template _menu%>
	<div class="pannelcontent">
		<div class="pcontent">
			<div class="panneldetail">
				<%template _smsmenu%>	
				<div class="pannelbody">
					<div class="pannellist">
					<%if page_err==0%>
						<%if ispost%>
							<%template _msgbox%>
						<%else%>
						<p class="newmessage"><a href="usercppostpm.aspx" class="submitbutton">写新消息</a></p>
				  		<form id="pmform" name="pmform" method="post" action="">
						<table width="100%" border="0" cellspacing="0" cellpadding="0" ID="Table1">
						<%loop (PrivateMessageInfo) pm pmlist%>
						<tbody>
							<tr class="messagetable" onmouseover="this.className='messagetableon'" onmouseout="this.className='messagetable'">
							<td width="3%"><img src="templates/{templatepath}/images/message_{pm.new}.gif" /></td>
							<td width="4%"><input name="pmitemid" id="id{pm.pmid}" type="checkbox" id="pmitemid" value="{pm.pmid}" style="margin-top:-1px;"/></td>
							<td width="50%" style="text-align:left;"><a href="usercpshowpm.aspx?pmid={pm.pmid}">{pm.subject}</a> </td>
							<td width="30%">
						        <%set {aspxrewriteurl} = this.UserInfoAspxRewrite({pm.msgfromid})%>
							<a href="{aspxrewriteurl}" target="_blank">{pm.msgfrom}</a>   <span class="fontfamily"><script type="text/javascript">document.write(convertdate('{pm.postdatetime}'));</script></span></td>
							<td><a href="#" onclick="$('id{pm.pmid}').checked=true;$('pmform').submit();">删除</a></td>
							</tr>
						</tbody>
						<%/loop%>
						</table>
						</form>
						</div>
						<div class="pannelmessage">
									<div class="pannelleft" style="width: 160px;">
										<a href="javascript:;"  onclick="checkCheckBox($('pmform'),this)" class="selectall">全选</a>
										<a href="#" onclick="$('pmform').submit()" class="selectall">删除</a> 
									</div>
									<div class="pannelright" style="width: 70%;">
										<table width="100%" border="0" cellspacing="0" cellpadding="0">
												<tbody>
													<tr>
														<th class="ticketleft">
															共有短消息:<span  class="ticketnumbers">{usedmsgcount}</span>条 上限: {maxmsg}条
														</th>
														<td width="300">
															<div class="ticket-show" style="width:95%;">
																<div style="width:{usedmsgbarwidth}%"></div>
															</div>
														</td>
													</tr>
												</tbody>
										 </table>
									</div>
						</div>
						<div class="forumpages">
  							<div class="forumpagesnumbers">
							<table border="0" cellpadding="0" cellspacing="0" ID="Table2">
								<tr>
									<td class="forumallpages"><strong>1</strong>/&nbsp;&nbsp;{pagecount}&nbsp;&nbsp;页</td>
									<td style="width:10px;">&nbsp;</td>
									<td class="forumallpages">{pagenumbers}</td>
									<td class="forumallpages3">跳转<input name="gopage" type="text" id="gopage" onKeyDown="if(event.keyCode==13) {
							window.location='usercpsentbox.aspx?page=' + this.value;}"  size="4" maxlength="9"  class="colorblue2"/>页</td>
								</tr>
							</table>
							</div>
						</div>
						<%/if%>
					<%else%>
					<%template _usercperrmsgbox%>
					<%/if%>
			  </div>
			</div>
		</div>
	</div>
</div>
<!--主体-->
</div>
<%template _copyright%>
<%template _footer%>
