<!--{assign var='menuid' value=''}-->
<!--{assign var='usercpmod' value='yes'}-->
<!--{include file="<!--{$tplpath}-->cp/<!--{$tplpre}-->block_head.tpl"}-->
<body>
<!--{include file="<!--{$tplpath}--><!--{$tplpre}-->block_menu.tpl"}-->

<div id="page-index" class="page">
  <div class="zx">
    <!--{include file="<!--{$tplpath}--><!--{$tplpre}-->block_search.tpl"}-->
	<!--{include file="<!--{$tplpath}-->cp/<!--{$tplpre}-->block_menu.tpl"}-->
	
	<div class="zright">
      <div class="topmenu"> 
	  	<a href="<!--{$ucfile}-->?c=message" class='now'>会员来信</a>
		<a href="<!--{$ucfile}-->?c=outmsg">已发信件</a>
		<a href="<!--{$ucfile}-->?c=hi">收到问候</a>
		<a href="<!--{$ucfile}-->?c=hi&a=to">已发问候</a>
		<a href="<!--{$ucfile}-->?c=sysmsg">管理员来信</a>
	  </div>

      <div class="tb1">
        <div class="htitle"> 
		我和“<!--{$tauser.username}-->”的信件记录有 <font color='green'><!--{$total}--></font> 条 
		<a href="javascript:void(0);" class="btn_c2" onclick="jbox_writebox('<!--{$tauid}-->')"><span>给TA写信</span></a>
		</div>
		<table cellpadding='5' cellspacing='5' border='0' width="99%">
		  <tr>
			<td align="center" height="5px;"></td>
		  </tr>
		</table>
		  <!--{foreach $msglog as $volist}-->
		  <!-- 自己 -->
		  <!--{if $volist.fromuserid==$u.userid}-->
          <div class="user-list clearfix ml9">
		    <!-- 头像 -->
            <div class="user-pic mt"><a><!--{avatar value=$u.avatarurl width='60' height='74'}--></a></div>
            <div class="fl">
              <div class="user-cont2">
                <div class="gbg">
				  <!-- 发件时间 -->
                  <div class="title-g"><font color='#99999'>(我)</font> <!--{$u.username}-->&nbsp;&nbsp;<span class="fc-9"><!--{$volist.sendtime|date_format:"%m-%d %H:%M"}--></span></div>
                  <div class="msn-box">
				    <!-- 内容 -->
                    <p class="m-self"><!--{$volist.content|nl2br}--> </p>
					<!-- 删除 -->
                    <p class="text-tr"> <a href="<!--{$ucfile}-->?c=msglog&a=del&id=<!--{$volist.msgid}-->&type=from&page=<!--{$page}-->&<!--{$urlitem}-->" onClick="{if(confirm('确定要删除吗？一旦删除无法恢复。')){return true;} return false;}" class="fc-9">删除</a></p>
                  </div>
                  <div class="gbg1"></div>
                  <div class="gbg2"></div>
                  <div class="gbg3"></div>
                  <div class="gbg4"></div>
                  <div class="user-div3"></div>
                </div>
              </div>
            </div>
          </div>
		  <!--{else}-->

          <!-- 对方 -->
          <div class="user-list clearfix" style="padding-left:10px;">
		    <!-- 头像 -->
            <div class="user-pic2"> <a> <!--{avatar value=$tauser.avatarurl width='60' height='74'}--> </a> </div>
            <div class="fr" >
              <div class="user-cont2">
                <div class="gbg">
				  <!-- 个人信息 -->
                  <div class="title-g"> 
				    <a href="<!--{$tauser.homeurl}-->" target="_blank"><!--{$tauser.username}--></a>&nbsp;&nbsp;
					<span class="fc-9">
						<!--{if $tauser.gender==1}-->男<!--{else}-->女<!--{/if}-->
						<!--{$tauser.age}--> 岁
						<!--{$tauser.height}-->CM&nbsp;
						<!--{hook mod='var' item='marrystatus' type='text' value=$tauser.marrystatus}--> 
						<!--{area type='text' value=$tauser.provinceid}--> 
						<!--{area type='text' value=$tauser.cityid}--> 
						<!--{hook mod='var' item='education' type='text' value=$tauser.education}-->  
					    <!--{$volist.sendtime|date_format:"%m-%d %H:%M"}-->
				    </span>
				  </div>
                  <div class="msn-box">
				    <!-- 内容 -->
                    <p class="m-ta"> 
					<!--{if $volist.readflag==1}-->
						<!--{$volist.content|nl2br}-->
					<!--{else}-->
						<img src="<!--{$tplpath}-->cp/images/icn_time.gif"><font color="#999999">此信件还没阅读&nbsp;&nbsp;&gt;&gt;</font>&nbsp;&nbsp;<a href="javascript:void(0);" onclick="jbox_readbox('<!--{$volist.msgid}-->');" class="fc-m">查看信件</a>
					<!--{/if}-->
					</p>
					<!-- 操作 -->
                    <p class="text-tr"> 
                    
					<!--{if $volist.readflag==0}-->
						<a href="javascript:void(0);" onclick="jbox_readbox('<!--{$volist.msgid}-->');" class="fc-m">查看信件</a>
					<!--{else}-->
						<a href="javascript:void(0);" onclick="jbox_writebox('<!--{$tauser.userid}-->');" class="fc-m">回复/写信</a>
					<!--{/if}-->
					
					&nbsp;|&nbsp;

					<a href="<!--{$ucfile}-->?c=msglog&a=del&id=<!--{$volist.msgid}-->&type=to&page=<!--{$page}-->&<!--{$urlitem}-->" onClick="{if(confirm('确定要删除吗？一旦删除无法恢复。')){return true;} return false;}" class="fc-m">删除</a> 
					</p>
                  </div>
                  <div class="gbg1"></div>
                  <div class="gbg2"></div>
                  <div class="gbg3"></div>
                  <div class="gbg4"></div>
                  <div class="user-div2"></div>
                </div>
              </div>
            </div>
          </div>
		  <!--{/if}-->
          
		  <!--{foreachelse}-->
			<table cellpadding='5' cellspacing='5' border='0' class='tab'>
			  <tr>
			    <td align="center" class="hback">对不起，没有信件记录！</td>
			  </tr>
			</table>

		  <!--{/foreach}-->



		  <!-- 分页 -->
		  <!--{if $showpage!=""}-->
		  <div class="page_digg" style="margin-top:15px"><!--{$showpage}--></div>
		  <!--{/if}-->

      </div>
    </div>
    <div style="clear:both;"></div>
  </div>
  <div style="clear:both;"></div>
</div>
<!--{include file="<!--{$tplpath}--><!--{$tplpre}-->block_footer.tpl"}-->
</body>
</html>
<script type="text/javascript">

//点击回复
function click_hf(id){
	$("#id").val(id);
	$("#content").focus();
}

//发信件
function checksend(){
	var t = "";
	var v = "";

	//内容
	t = "content";
	v = $("#"+t).val();
	if(v=="") {
	    alert("信件内容不能为空");
		$("#"+t).focus();
		return false;
	}
	return true;
}

</script>
