<?
include_once("./_common.php");

if (!$member[mb_id]) 
    alert_close("请您登录后使用！");

if (!$member[mb_open] && $is_admin != "super" && $member[mb_id] != $mb_id) 
    alert_close("您由于未公开您的个人资料，所以不能向其他会员发送站内短信\\n\\n请您在会员帐户信息设置中修改状态后尝试！");

$content = "";
// 不能像已经注销的会员发送
if ($me_recv_mb_id) 
{
    $mb = get_member($me_recv_mb_id);
    if (!$mb[mb_id]) 
        alert_close("您输入的对方用户名有误\\n\\n也有可能对方已注销帐户");

    if (!$mb[mb_open] && $is_admin != "super")
        alert_close("对方未开启短信功能");

    // 4.00.15
    $row = sql_fetch(" select me_memo from $g4[memo_table] where me_id = '$me_id' and (me_recv_mb_id = '$member[mb_id]' or me_send_mb_id = '$member[mb_id]') ");
    if ($row[me_memo]) 
    {
        $content = "\n\n\n>"
                 . "\n>"
                 . "\n> " . preg_replace("/\n/", "\n> ", get_text($row[me_memo], 0)) 
                 . "\n>"
                 . "\n";

    }
}

$g4[title] = "发送短信";
include_once("$g4[path]/head.sub.php");

$member_skin_path = "$g4[path]/skin/member/$config[cf_member_skin]";
include_once("$member_skin_path/memo_form.skin.php");

include_once("$g4[path]/tail.sub.php");
?>
