<? include "../signup/mysql.php"; //echo $userid; //echo $private; if($p)$p=1; else $p=0;
if(($action="ok")and($p)){
$sql="select userid,id from chat_user_list where userid='$userid'"; $result=mysql_query($sql); $roww=mysql_fetch_array($result); $userrr=$roww["id"];
$sql="select userid,id from chat_user_list where id='$object'"; $result=mysql_query($sql); if($row1=mysql_fetch_array($result)) $object=$row1["userid"]; else { $object="大家"; $k=1;}
$select="select row from user_message order by row DESC"; $result=mysql_query($select)or die(" false fgfg"); $rowlist=mysql_fetch_array($result)or die("false fgs"); $max_row=$rowlist["row"];
$row=$max_row+1; $time1=date("G:i");
$sql="INSERT INTO user_message (userid,object,message,status,action1,color,row,time1) values('$userid','$object','$message','$private','$action1','$color','$row','$time1')";