if ($key=="確定")
{
$dbhostname = "localhost";// host
$dbusername = "j2h"; //user
$dbuserpass = "love";// //password
$dbname = "j2hbbs"; //database
$conID = @mysql_pconnect($dbhostname, $dbusername, $dbuserpass) or die ("資料連結錯誤");
mysql_select_db( "$dbname",$conID);
////檢查主題
if($id =="000"){
$str="select * from bad where titleid='$j2hreply' and j2hid='000' ";
$result=mysql_query($str);
$sql = mysql_num_rows($result);
if ($sql<>0)
{
echo"
已經有人進行檢舉,客服部將盡快處理22
";
exit;
}}else{
////檢查回應
$host = getenv('REMOTE_ADDR');
/////確認ip ID 不讓同一人重復檢舉
$str="select * from bad where bbs='$j2hnews' and j2hid='$id' and ip='$host'";
$result=mysql_query($str);
$sql = mysql_num_rows($result);
if ($sql<>0)
{
echo"已經有人進行檢舉,客服部將盡快處理.
";
exit;
}
////確認檢舉超過2個不同人將直接刪除
$str="select * from bad where bbs='$j2hnews' and j2hid='$id'";
$result=mysql_query($str);
$sql = mysql_num_rows($result);
if ($sql>=1){ echo"客服已經聯絡相關人員處理";
$rej2h1=$j2hreply;
include "outodel.php";
exit; }
}
$query="insert into bad (bbs,titleid,j2hid,infor,ip)
values ('$j2hnews','$j2hreply','$id','$infor','$host')";
if(mysql_query($query)){
echo "資料已經送出版主會盡快處理 ";
exit;
}
}
?>