merry lonely christmas BBSphp & mysql full version one

WBOY
Release: 2016-07-29 08:33:28
Original
1350 people have browsed it

//此页面为say.php
include "signup/mysql.inc";
if($id1){
$sql="select * from $table where"; //显示回复题目
$result=mysql_query($sql)or die(mysql_error());
$row=mysql_fetch_array($result);
$title="RE:".$row["title"];
}
$ip=$REMOTE_ADDR;
$sql="select * from user_stus where ip='$ip'"; //查询当前用户名
$result=mysql_query($sql)or die(mysql_error());
$row=mysql_fetch_array($result);
if(!$row) //判断用户是否登陆
{
echo "





";
echo"
";
echo"  
";  
echo"

嘻嘻!! 请先登陆

";
echo"

返回

";
exit();
}
else $userid=$row["userid"];
if($ok)
{
    if($title==""||$c
    {
        echo "
      请您添完整后提交";
    }
    else{
    $id=time();                                 //提交文章
    $date1=date("Y/m/d");
    $title=htmlspecialchars($title);
    $c
    $sql="select * from ".$table;
    $result=mysql_query($sql)or die(mysql_error());
    $row1=mysql_num_rows($result);
    $row1++;
    if($id1){
    $sql="insert into bbs_re (id,userid,date1,title,content)values('$id','$userid','$date1','$title','$content')";
    mysql_query($sql)or die(mysql_error());
    $sql="select * from ".$table." where";
    $result=mysql_query($sql)or die(mysql_error());
    $lin=mysql_fetch_array($result);
    for($i=1;$i<6;$i++)
{
$re="r".$i;
if(!$lin["$re"])
break;
}
$sql="update ".$table." set ".$re."='$id' where";
}
else
$sql="insert into ".$table." (id,userid,date1,title,content,row)values('$id','$userid','$date1','$title','$content','$row1')";
$result=mysql_query($sql)or die(mysql_error());
if($result)
{
header("Location:php3.php?p=1&&table=$table");
exit ;
}
}
}
?>


xiaoyang









  
  

    
        
        
        
      
        
        
        
  
          
题目

        
  
          
          
          
          

        
  
          
内容