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

<div class="g4memo_basic">
    <div class="page-header">
        <h1>보기</h1>
    </div>
    <div class="btn-box">
        <div class="pull-left">
            <a href="./memo.php?kind=recv" class="btn btn-info" title="받은쪽지">받음</a>
            <a href="./memo.php?kind=send" class="btn btn-default" title="보낸쪽지">보냄</a>
        </div>
        <div class="pull-right" style="text-align: right">
            <a href="./memo_form.php" class="btn btn-primary pull-right" title="쪽지보내기">보내기</a>
        </div>
        <div class="clearfix"></div>
    </div>
    
    <div class="alert alert-info">
        <?php
        $nick = get_new_sideview($mb['mb_id'], $mb['mb_nick'], $mb['mb_email'], $mb['mb_homepage']);
        if ($kind == "recv")
            echo "<span>$nick</span> 님께서 {$memo['me_send_datetime']}에 보내온 쪽지의 내용입니다.";

        if ($kind == "send")
            echo "<span>$nick</span> 님께 {$memo['me_send_datetime']}에 보낸 쪽지의 내용입니다.";
        ?>
    </div>
    <ul class="btn-box pager">
        <li>
            <a href="<?php echo $prev_link ?>" class='btn pull-left' title="이전">이전</a>
        </li>
        <li>
            <a href="<?php echo $next_link ?>" class='btn pull-right' title="다음">다음</a>
        </li>
    </ul>
    <hr class="clear"/>
    <article class="well">
        <div class="me_content">
            <?php echo conv_content($memo['me_memo'], 0) ?>
        </div>
    </article>
    <div class="form-actions">
        <?php
        if ($kind == "recv")
            echo "<a href='./memo_form.php?me_recv_mb_id={$mb['mb_id']}&me_id={$memo['me_id']}' class='btn btn-primary pull-left' title='답장'>답장</a>";
        ?>
        <a href="./memo.php?kind=<?php echo $kind ?>" class='btn btn-default pull-right' title="목록">목록</a>
    </div>
</div>