<?php
date_default_timezone_set('asia/shanghai'); 
$timexr=date("m-d  H:i:s");
$bt="新的";
include("../head.php");
include("../conn.php");
include_once("../function.php");
$sid = sqlstr($_COOKIE['dl']);
$uin=mysql_fetch_array(mysql_query("select * from user where sid='$sid'"));
$name=$uin['name'];

$bj=file_get_contents("bj.txt");
$s=file_get_contents("liuyan.txt");
$b=fopen("liuyan.txt","r+");
$g=htmlspecialchars(str_replace("\n","<br/>",$_POST["r"]));
$y=$_GET["y"];
if($g!=$bj){
if(strlen($g)>0){
fwrite($b,"<b>".htmlspecialchars($name).":</b> ".$g."<br/>　　     [ ".$timexr." ]\n".$s);
file_put_contents("bj.txt",$g);
fclose($b);

$u="index.php";
Header("Location: $u");}}
else
{$u="index.php";
Header("Location: $u");}


?>