<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html> 
<head>
<meta http-equiv="content-type" content="text/html; charset=<!--{$page_charset}-->" />
<title><!--{$page_title}--></title>
<!--header jvascript and css -->
<meta name="author" content="<!--{$copyright_author}-->" />
<link href="<!--{$skinpath}-->cp/style/layer.css" rel="stylesheet" type="text/css" />
<link href="<!--{$skinpath}-->themes/css/button.css" rel="stylesheet" type="text/css" />
<!--{include file="<!--{$tplpath}-->cp/<!--{$tplpre}-->block_headjs.tpl"}-->
</head>
<body style="background:transparent;">

<!--{if $a eq 'run'}-->
<div class="greet_layer">
  <!-- 标题 -->
  <h3 style="text-align:center;">查看、阅读“<!--{$message.frominfo.username}-->”发来的信件</h3>
  <div class="greet_content">
    
	<!-- 发件人信息 -->
    <div class="greet_left">
	  <!--{avatar value=$message.frominfo.avatarurl width='100' height="120"}-->
	  <p class="blue"><a href="<!--{$message.frominfo.homeurl}-->" target="_blank"><b><!--{$message.frominfo.username}--></b></a></p>
	  <p>
	  <!--{if $message.frominfo.gender==1}-->男<!--{else}-->女<!--{/if}--> 
	  <!--{hook mod='var' type='text' item='marrystatus' value=$message.frominfo.marrystatus}-->
	  <!--{$message.frominfo.age}--> 岁
	  
	  </p>
	  <p><!--{area type='text' value=$message.frominfo.provinceid}--> <!--{area type='text' value=$message.frominfo.cityid}--></p>
	  <p><!--{$message.frominfo.height}-->CM <!--{hook mod='var' type='text' item='education' value=$message.frominfo.education}--></p>
	  <p><!--{hook mod='var' type='text' item='salary' value=$message.frominfo.salary}--></p>
	</div>

	<!-- 信件内容 -->
	<div class="greet_right" style="padding-bottom:10px;">
	  
		<form action='<!--{$ucfile}-->?c=readmsg&halttype=<!--{$halttype}-->' method='post' name='myform' id='myform' style='margin:0'>
		<input type='hidden' name='a' id='a' value='savesend' />
		<input type='hidden' name='touid' id='touid' value='<!--{$message.fromuserid}-->' />
		<input type='hidden' name='id' id='id' value='<!--{$message.msgid}-->' />
		<table cellpadding='1' cellspacing='1' border='0' class='table'>
		  <!-- 内容 -->
		  <tr>
			<td><div class="read_msgbox"><!--{$message.content|nl2br}--></div></td>
		  </tr>
		  <!-- 发件时间 -->
		  <tr>
			<td align="right" class="hback_time">发件时间&nbsp;&nbsp;<!--{$message.sendtime|date_format:"%Y-%m-%d %H:%M:%S"}--></td>
		  </tr>
		  <!-- 回复框 -->
		  <tr>
			<td>
			<p class="ks-box">&nbsp;&nbsp;快速回复：<a href="###" onclick="fast_replymsg('1', 'content');">感谢来信</a>&nbsp;&nbsp;<a href="###" onclick="fast_replymsg('2', 'content');">礼貌拒绝</a>&nbsp;&nbsp;<a href="###" onclick="fast_replymsg('3', 'content');">保持联系</a>&nbsp;&nbsp;<a href="###" onclick="fast_replymsg('4', 'content');">详细介绍</a></p>
			<textarea name="content" id="content" style="font-size:13px;color:#333333;width:98%;height:100px;overflow:auto;color:#666666;"></textarea></td>
		  </tr>
		  <tr>
			<td align="center">
			<a href="###" class="btn_b1 btn" onclick="return checksend();"><span>写(回复)信件</span></a>
			</td>
		  </tr>
		</table>
		</form>
	  
	</div>
	<div style="clear:both"></div>
  </div>
  
  <!-- 其他按钮 -->
  <div class="greet_btn e_clear">
    <ul> 
	  <li>
		<!-- 上一封 -->
		<!--{if $previous_id == 0}-->
		<a href='javascript:void(0);' onclick="javascript:alert('上一封没有了');" class="btn_c3"><span>上一封</span></a>
		<!--{else}-->
		<a href='<!--{$ucfile}-->?c=readmsg&id=<!--{$previous_id}-->&halttype=<!--{$halttype}-->' class="btn_c2"><span>上一封</span></a>
		<!--{/if}-->
		
		&nbsp;&nbsp;&nbsp;
		<!-- 下一封 -->
		<!--{if $next_id == 0}-->
		<a href='javascript:void(0);' onclick="javascript:alert('下一封没有了');" class="btn_c3"><span>下一封</span></a>
		<!--{else}-->
		<a href='<!--{$ucfile}-->?c=readmsg&id=<!--{$next_id}-->&halttype=<!--{$halttype}-->' class="btn_c2"><span>下一封</span></a>
		<!--{/if}-->
		&nbsp;&nbsp;&nbsp;
		<!-- 通信记录 -->
		<!--{if $message.frominfo.gender == 1}-->
		<a href='javascript:void(0);' onclick="view_msglog('<!--{$message.hashid}-->', '<!--{$message.fromuserid}-->')" class="btn_c2"><span>查看与他的通信记录</span></a>
		<!--{else}-->
		<a href='javascript:void(0);' onclick="view_msglog('<!--{$message.hashid}-->', '<!--{$message.fromuserid}-->')" class="btn_c2"><span>查看与她的通信记录</span></a>
		<!--{/if}-->
		
		&nbsp;&nbsp;&nbsp;
	    <!-- 关闭 -->
		<a href='javascript:parent.location.reload();' class="btn_c2"><span>关闭</span></a>

	  </li>
	</ul>
  </div>
</div>
<script type="text/javascript">
//发信件
function checksend(){
	var t = "";
	var v = "";

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

//查询通信记录
function view_msglog(hid, tauid){
	parent.location.href = '<!--{$ucfile}-->?c=msglog&hid='+hid+'&tauid='+tauid+'';
}
</script>
<!--{/if}-->

<!--{if $a eq 'pay'}-->
<div class="greet_layer">
  <!-- 标题 -->
  <h3 style="text-align:center;">查看、阅读“<!--{$message.frominfo.username}-->”发来的信件</h3>
  <div class="greet_content">
    
	<!-- 发件人信息 -->
    <div class="greet_left">
	  <!--{avatar value=$message.frominfo.avatarurl width='100' height="120"}-->
	  <p class="blue"><a href="<!--{$message.frominfo.homeurl}-->" target="_blank"><b><!--{$message.frominfo.username}--></b></a></p>
	  <p>
	  <!--{if $message.frominfo.gender==1}-->男<!--{else}-->女<!--{/if}--> 
	  <!--{hook mod='var' type='text' item='marrystatus' value=$message.frominfo.marrystatus}-->
	  <!--{$message.frominfo.age}--> 岁
	  
	  </p>
	  <p><!--{area type='text' value=$message.frominfo.provinceid}--> <!--{area type='text' value=$message.frominfo.cityid}--></p>
	  <p><!--{$message.frominfo.height}-->CM <!--{hook mod='var' type='text' item='education' value=$message.frominfo.education}--></p>
	  <p><!--{hook mod='var' type='text' item='salary' value=$message.frominfo.salary}--></p>
	</div>

	<!-- 信件内容 -->
	<div class="greet_right" style="padding-bottom:10px;">
	  
		<form action='<!--{$ucfile}-->?c=readmsg&halttype=<!--{$halttype}-->' method='post' name='myform' id='myform' style='margin:0'>
		<input type='hidden' name='a' id='a' value='savepay' />
		<input type='hidden' name='id' id='id' value='<!--{$message.msgid}-->' />
		<table cellpadding='1' cellspacing='1' border='0' class='table'>
		  <!-- 内容 -->
		  <tr>
			<td>
			<div class="read_msgbox">
			对不起，您要查看的信件内容，需要支付个[<b><!--{$g.fee.viewmsgfee}--></b>]金币才可以显示。
			<br />
			您当前剩余可用金币：<font color='green'><b><!--{$u.money}--></b></font> 个，<a href="###" onclick="return checkpay();" class="btn_b1 btn"><span>确定支付阅读</span></a><br />
			<font color='#999999'>温馨提示：支付之后该封信件不再限制阅读</font><br />
			<a href="<!--{$urlpath}-->usercp.php?c=payment" target="_top">在线充值&gt;&gt;</a> &nbsp;&nbsp;<a href="<!--{$urlpath}-->usercp.php?c=vip" target="_top">升级会员服务&gt;&gt;</a>
			</div>
			</td>
		  </tr>
		  <!-- 发件时间 -->
		  <tr>
			<td align="right" class="hback_time">发件时间&nbsp;&nbsp;<!--{$message.sendtime|date_format:"%Y-%m-%d %H:%M:%S"}--></td>
		  </tr>
		  <!-- 回复框 -->
		  <tr>
			<td>
			<p class="ks-box">&nbsp;&nbsp;快速回复：<a href="###" onclick="fast_replymsg('1', 'content');">感谢来信</a>&nbsp;&nbsp;<a href="###" onclick="fast_replymsg('2', 'content');">礼貌拒绝</a>&nbsp;&nbsp;<a href="###" onclick="fast_replymsg('3', 'content');">保持联系</a>&nbsp;&nbsp;<a href="###" onclick="fast_replymsg('4', 'content');">详细介绍</a></p>
			<textarea name="content" id="content" style="font-size:13px;color:#333333;width:98%;height:120px;overflow:auto;color:#666666;" disabled>支付页面不可写信</textarea></td>
		  </tr>
		</table>
		</form>
	  
	</div>
	<div style="clear:both"></div>
  </div>
  
  <!-- 其他按钮 -->
  <div class="greet_btn e_clear">
    <ul> 
	  <li>
		<!-- 上一封 -->
		<!--{if $previous_id == 0}-->
		<a href='javascript:void(0);' onclick="javascript:alert('上一封没有了');" class="btn_c3"><span>上一封</span></a>
		<!--{else}-->
		<a href='<!--{$ucfile}-->?c=readmsg&id=<!--{$previous_id}-->&halttype=<!--{$halttype}-->' class="btn_c2"><span>上一封</span></a>
		<!--{/if}-->
		
		&nbsp;&nbsp;&nbsp;
		<!-- 下一封 -->
		<!--{if $next_id == 0}-->
		<a href='javascript:void(0);' onclick="javascript:alert('下一封没有了');" class="btn_c3"><span>下一封</span></a>
		<!--{else}-->
		<a href='<!--{$ucfile}-->?c=readmsg&id=<!--{$next_id}-->&halttype=<!--{$halttype}-->' class="btn_c2"><span>下一封</span></a>
		<!--{/if}-->
		&nbsp;&nbsp;&nbsp;
		<!-- 通信记录 -->
		<!--{if $message.frominfo.gender == 1}-->
		<a href='javascript:void(0);' onclick="view_msglog('<!--{$message.hashid}-->', '<!--{$message.fromuserid}-->')" class="btn_c2"><span>查看与他的通信记录</span></a>
		<!--{else}-->
		<a href='javascript:void(0);' onclick="view_msglog('<!--{$message.hashid}-->', '<!--{$message.fromuserid}-->')" class="btn_c2"><span>查看与她的通信记录</span></a>
		<!--{/if}-->
		
		&nbsp;&nbsp;&nbsp;
	    <!-- 关闭 -->
		<a href='javascript:parent.location.reload();' class="btn_c2"><span>关闭</span></a>

	  </li>
	</ul>
  </div>
</div>
<script type="text/javascript">
//确定支付
function checkpay(){
	if (confirm("确定支付吗？")) {
		$('#myform').submit();
		return true;
	}
	else {
		return false;
	}
}
</script>
<!--{/if}-->

</body>
</html>