<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가 
?>
<link rel="stylesheet" href="<?=$member_skin_path?>/zm.style.css" type="text/css">
<style type="text/css">
a	{ color:#494949; }
a:hover	{ text-decoration:underline; color:#3399FF; }

#memo_body_left		{ float:left; width:150px; }
#memo_body_right	{ float:left; width:700px; }

#me_recv_mb_id		{ border:1px solid #AAAAAA; border-radius:2px; padding:5px 6px 4px 10px; }
div.txtsmall		{ padding:5px 0 5px 0; font:normal 11px Dotum; color:#AAAAAA; }

.latesend			{ border:1px solid #E3E3E3; background-color:#F7F7F7; color:#888888; font-size:11px; padding:5px; margin:3px 0 3px 0; line-height:160%; }
.friend				{ border:1px solid #E3E3E3; background-color:#F7F7F7; color:#888888; font-size:11px; padding:5px; margin:3px 0 3px 0; line-height:160%; display:none; }
.bttn_friend		{ border:1px solid #E3E3E3; border-radius:2px; height:26px; background:#F3F3F3; padding:4px 13px 2px 13px; cursor:pointer; color:#2A2A2A; font:normal 12px Dotum; letter-spacing:-1px; vertical-align:top; }
.bttn_friend:hover	{ border:1px solid #5B96F4; background:#5B96F4; color:#ffffff; }
</style>
<? include_once("zm.memo_top.skin.php"); ?>
<div id="memo_body_left"><? include_once("zm.memo_left.skin.php"); ?></div>
<div id="memo_body_right">
	<form name=fmemoform method=post onsubmit="return fmemoform_submit(this);" autocomplete="off">
	<table width="90%" border="0" cellspacing="0" cellpadding="0" align="center">
	<tr> 
		<td width="80" valign="top">받는사람</td>
		<td><input type=text name="me_recv_mb_id" id="me_recv_mb_id" required itemname="받는 회원아이디" value="<?=$me_recv_mb_id?>" style="width:80%;"> <input type="button" value="친구목록" onClick="toggle_friendbox()" class="bttn_friend">
			<div class="txtsmall">여러 회원에게 보낼 때는 아이디를 콤마(,)로 구분하세요.</div>
        </td>
	</tr>
	<tr>
	    <td></td>
		<td><div class="<?=($write_sendid)?'latesend':''?>"><?=$write_sendid?></div>
		<div id="friendbox" class="friend"><span><a href="javascript:toggle_friendbox()"><img src="<?=$member_skin_path?>/img/btn_del.gif" align="absmiddle" title="친구목록 닫기"></a></span> <?=$write_friend?></div>
		</td>
    </tr>
    <tr>
	    <td valign="top">내용</td>
		<td><textarea name=me_memo rows=<?=($me_recv_mb_id && $me_id)?"15":"20";?> style='width:100%;' required itemname='내용'></textarea></td>
    </tr>
	</table>
	
	<table width="90%" align="center">
<?	if($zm_config[memo_today] > 0) : ?>
	<tr><td align="center"><span class="memotoday"><font color="#656565">오늘 보낸쪽지</font> <font color="#FF8080"><b><?=number_format($zm_member[memo_today])?></b></font> / 하루 최대 <?=number_format($zm_config[memo_today])?>통</span></td></tr>
<?	endif; ?>
	<tr><td align="center"><span><input id=btn_submit type=image src="<?=$member_skin_path?>/img/btn_paper_send.gif" border=0></span></td></tr>
	</table>
	</form>
<?	if($me_recv_mb_id && $me_id) : ?>
	<table width="90%" border="0" cellspacing="0" cellpadding="0" align="center">
    <tr>
	    <td width="80" valign="top">받은내용</td>
		<td><div id="recvmemo"><?=nl2br(trim($content))?></div></td>
    </tr>
	</table>
<?	endif; ?>
</div> <!-- main end -->



<script type="text/javascript" src="<?=$g4[path]?>/js/md5.js"></script>
<script type="text/javascript">
with (document.fmemoform) {
    if (me_recv_mb_id.value == "")
        me_recv_mb_id.focus();
    else
        me_memo.focus();
}

function fmemoform_submit(f)
{
    document.getElementById("btn_submit").disabled = true;

    f.action = "./memo_form_update.php";
    return true;
}

/* no modify ↓ ziumsoft */
function toggle_friendbox(){
	if($("#friendbox").css("display") == "none") $("#friendbox").css("display", "block");
	else $("#friendbox").css("display", "none");
}
</script>
<!-- 수정 X -->
<script language="javascript">
document.onready = function() {
	window.resizeTo(910, 600);
	window.document.body.scroll = "auto"; 
}
</script>