<?php
$bt="回复";
include("../conn.php");
include("../head.php");
include_once("../function.php");
$sid = sqlstr($_COOKIE['dl']);
$uin=mysql_fetch_array(mysql_query("select * from user where sid='$sid'"));
if(!$uin){
header("Location:../login.php");
exit;//没登录就跳转到登录页面
}
$id=$_GET["id"];
$txt=sqlstr($_POST["txt"]);
if($txt!=Null){
if(mb_strlen($txt,'utf-8')>250){
echo "<div id='main'>回复不能大于250个字哦，不然不够个性啦~ <br/> </div>";
}else{
if(mysql_query("UPDATE tg SET hf='$txt' WHERE mid='$id'")){
echo "<div id='main'><br/>回复成功　<a href='index.php'>返回>></a></div><br/>";
}else{
echo "失败";
}
}
}else{
echo "<br/><br/> <div id='main'> 请输入内容哦</div>　<a href='index.php'>返回>></a></div><br/><br/>";
}


?>