<?php
require("../../../class/connect.php");
require("../../../class/q_functions.php");
require("../../class/user.php");
$link=db_connect();
$empire=new mysqlquery();
$editor=2;
eCheckCloseMods('member');//關閉模塊
$user=islogin();
$mid=(int)$_GET['mid'];
$username=RepPostVar($_GET['username']);
$re=RepPostStr($_GET['re']);
$title='';
$msgtext='';
if($mid)
{
	$r=$empire->fetch1("select title,msgtext,from_username from {$dbtbpre}enewsqmsg where mid='$mid' and to_username='".$user['username']."'".do_dblimit_one());
	if(empty($username)&&$r['from_username']!=$user['username'])
	{
		$username=$r['from_username'];
	}
	$title=$r['title'];
	$msgtext=$r['msgtext'];
	//回復
	if($re==1)
	{
		$title="Re:".$title;
		$msgtext="\r\n"."------原文內容------\r\n".$msgtext;
	}
}
//導入模板
include(ECMS_PATH.'e/template/member/AddMsg.php');
db_close();
$empire=null;
?>