<?php
header("Content-Type: text/html; charset=gb2312");
define('INCLUDE_CHECK',1);
session_start();
include "../inc/chec.php";
	include "../conn/conn.php";
	include "../inc/func.php";
require_once('function.php');

$txt=stripslashes($_POST['saytxt']);
$txt=mysql_real_escape_string(strip_tags($txt),$conn); 
if(mb_strlen($txt)<1 || mb_strlen($str)>140)
    die("0");
$time=time();
$query=mysql_query("insert into tb_say(u_id,s_txt,s_time,u_name)values('".$_SESSION[id]."','$txt','$time','".$_POST[p_name]."')");
if(mysql_affected_rows($conn)!=1)
    die("0");
echo "insert into tb_say(u_id,s_txt,s_time,u_name)values('".$_SESSION[id]."','$txt','$time','".$_POST[p_name]."'";
echo formatSay($txt,$time,$_POST["p_name"]);
?>
