<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가 

if ($kind == "recv" || $kind == "save") {
	$strt	= "보낸사람";
	$sname	= "$nick($memo[me_send_mb_id])";
}elseif($kind == "send"){
	$strt	= "받는사람";
	$sname	= "$nick($mb[mb_id])";
}
?>
<link rel="stylesheet" href="<?=$member_skin_path?>/zm.style.css" type="text/css">
<style type="text/css">
#memo_body_top		{ padding:5px; height:30px; }
#memo_body_left		{ float:left; width:150px; }
#memo_body_right	{ float:left; width:700px; }
</style>
<div id="memo_body_top"><? include_once("zm.memo_top.skin.php"); ?></div>
<div id="memo_body_left"><? include_once("zm.memo_left.skin.php"); ?></div>
<div id="memo_body_right">
	<table width="90%" border="0" cellspacing="0" cellpadding="0" align="center">
	<tr> 
		<td width="80" height="24"><?=$strt?></td>
		<td width="*" colspan="2"><?=$sname?></td>
	</tr>
	<tr> 
		<td width="120" height="24">보낸시간</td>
	    <td width="*"><?=$memo[me_send_datetime]?></td>
		<td width="200" align="right">
<?	if($kind == "recv") :?> 
		<div class="txtsmall"><span id="notify_police"><?=zm_police($g4[memo_table], $me_id, "memo");?>신고</span> <span id="refusal"><img src="<?=$member_skin_path?>/img/icon_refusal.gif" align="absmiddle"><a href="javascript:id_refusal('<?=$memo[me_send_mb_id]?>')">차단</a></span></div>
<?	endif; ?>
		</td>
	</tr>
	</table>

	<table width="90%" border="0" cellspacing="0" cellpadding="0" align="center">
    <tr> 
	    <td><div id="memoview"><?=conv_content($memo[me_memo], 0)?></div>
		<div class="txtsmall"><img src="<?=$member_skin_path?>/img/icon_arrow_right.gif" align="absmiddle">친구추가</div></td>
	</tr>
	<tr> 
		<td height="40" align="center"><a href="<?=$prev_link?>"><img src='<?=$member_skin_path?>/img/btn_memo_prev.gif' border='0'></a>&nbsp;
        <a href="<?=$next_link?>"><img src='<?=$member_skin_path?>/img/btn_memo_next.gif' border='0'></a></td>
	</tr>
	</table>
	<table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
	<tr>
		<td height="40" align="center" valign="bottom">
		<a href="./memo.php?kind=<?=$kind?>"><img src="<?=$member_skin_path?>/img/btn_list_view.gif" width="62" height="20" border="0"></a>
<?	if ($kind == "recv") : ?>
		<a href='./memo_form.php?me_recv_mb_id=<?=$mb[mb_id]?>&me_id=<?=$memo[me_id]?>'><img src='<?=$member_skin_path?>/img/btn_memo_reply.gif' border='0'></a>&nbsp;
		<a href='./memo.php?kind=<?=$kind?>&me_id=<?=$me_id?>&mode=save'><img src='<?=$member_skin_path?>/img/btn_memo_save.gif' border='0'></a>&nbsp;
<?	endif; ?>
		</td>
	</tr>
	</table>
</div> <!-- main end -->

<!-- ↓fixed -->
<script language="javascript">
function id_refusal(id) {
	var myid	= "<?=$member[mb_id]?>";

	if(!id) { alert("차단 할 아이디가 없습니다."); return false; }
	if(id == myid) { alert("본인을 차단 할 수 없습니다."); return false; }

	if(confirm("차단 될 회원 : "+id+" \n차단 된 회원이 발송 한 쪽지는 무시 됩니다.")) zm_gourl("./zm.memo_update.php?mode=refusal&id="+id+"&kind=<?=$kind?>");
}

function open_report(){
	window.open("./zm.police.php?r=<?=$memo[me_id]?>&report=memo", "police", "width=600, height=500, toolbar=0, scrollbars=0");
}
</script>