| 52 |
)); |
)); |
| 53 |
} |
} |
| 54 |
|
|
| 55 |
$r_title = check_badwords($title, "****"); |
$bw_count = 0; |
| 56 |
if ($title != $r_title) |
$r_title = check_badwords($title, "****", $bw_count); |
| 57 |
|
if ($bw_count > 0) |
| 58 |
{ |
{ |
| 59 |
$result_set["return"]["code"] = -1; |
$result_set["return"]["code"] = -1; |
| 60 |
array_push($result_set["return"]["errorFields"], array( |
array_push($result_set["return"]["errorFields"], array( |
| 64 |
)); |
)); |
| 65 |
} |
} |
| 66 |
|
|
| 67 |
$r_content = check_badwords($content, "****"); |
$bw_count = 0; |
| 68 |
if ($content != $r_content) |
$r_content = check_badwords($content, "****", $bw_count); |
| 69 |
|
if ($bw_count > 0) |
| 70 |
{ |
{ |
| 71 |
$result_set["return"]["code"] = -1; |
$result_set["return"]["code"] = -1; |
| 72 |
array_push($result_set["return"]["errorFields"], array( |
array_push($result_set["return"]["errorFields"], array( |
| 396 |
} |
} |
| 397 |
|
|
| 398 |
// Get upload quota and used space |
// Get upload quota and used space |
| 399 |
$atta_id_list = "-1"; |
$atta_id_list = array(-1); |
| 400 |
$attachment_count = (isset($_FILES['attachment']['error']) ? count($_FILES['attachment']['error']) : 0); |
$attachment_count = (isset($_FILES['attachment']['error']) ? count($_FILES['attachment']['error']) : 0); |
| 401 |
if ($attachment_count > $BBS_upload_count_limit) |
if ($attachment_count > $BBS_upload_count_limit) |
| 402 |
{ |
{ |
| 570 |
} |
} |
| 571 |
|
|
| 572 |
$attachment_id = mysqli_insert_id($db_conn); |
$attachment_id = mysqli_insert_id($db_conn); |
| 573 |
$atta_id_list .= ("," . $attachment_id); |
array_push($atta_id_list, $attachment_id); |
| 574 |
|
|
| 575 |
$file_path = "upload/" . $attachment_id; |
$file_path = "upload/" . $attachment_id; |
| 576 |
if(!move_uploaded_file($_FILES['attachment']['tmp_name'][$i], $file_path)) |
if(!move_uploaded_file($_FILES['attachment']['tmp_name'][$i], $file_path)) |
| 728 |
} |
} |
| 729 |
|
|
| 730 |
// Link attachments to article |
// Link attachments to article |
| 731 |
$sql = "UPDATE upload_file SET ref_AID = $aid WHERE AID IN ($atta_id_list)"; |
$sql = "UPDATE upload_file SET ref_AID = $aid WHERE AID IN (" . |
| 732 |
|
implode(",", $atta_id_list) . |
| 733 |
|
")"; |
| 734 |
|
|
| 735 |
$rs = mysqli_query($db_conn, $sql); |
$rs = mysqli_query($db_conn, $sql); |
| 736 |
if ($rs == false) |
if ($rs == false) |