| 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( |
| 124 |
// Append indication of article update |
// Append indication of article update |
| 125 |
if ($id != 0) |
if ($id != 0) |
| 126 |
{ |
{ |
| 127 |
$content .= ("\n--\n※作者已于 " . date("Y-m-d H:i:s") . " 修改本文※\n"); |
$content .= ("\n--\n※ 作者已于 " . (new DateTimeImmutable("", $_SESSION["BBS_user_tz"]))->format("Y-m-d H:i:s (\U\T\C P)") . " 修改本文※\n"); |
| 128 |
} |
} |
| 129 |
|
|
| 130 |
// Calculate length of content |
// Calculate length of content |
| 131 |
$length = str_length(LML($content, false, false, 1024)); |
$length = str_length($content, true); |
| 132 |
|
|
| 133 |
// Initial variables |
// Initial variables |
| 134 |
$tid = 0; |
$tid = 0; |
| 639 |
exit(json_encode($result_set)); |
exit(json_encode($result_set)); |
| 640 |
} |
} |
| 641 |
|
|
| 642 |
//Notify the authors of the topic which is replyed. |
//Notify the authors of the topic / article which is replyed. |
| 643 |
$sql = "SELECT DISTINCT UID FROM bbs WHERE (AID = $tid OR TID = $tid) |
$sql = "SELECT DISTINCT UID FROM bbs WHERE (AID = $tid OR AID = $reply_id) |
| 644 |
AND visible AND reply_note AND UID <> " . $_SESSION["BBS_uid"]; |
AND visible AND reply_note AND UID <> " . $_SESSION["BBS_uid"]; |
| 645 |
|
|
| 646 |
$rs = mysqli_query($db_conn, $sql); |
$rs = mysqli_query($db_conn, $sql); |
| 656 |
while ($row = mysqli_fetch_array($rs)) |
while ($row = mysqli_fetch_array($rs)) |
| 657 |
{ |
{ |
| 658 |
//Send notification message |
//Send notification message |
| 659 |
$msg_content = "[hide]SYS_Reply_Article[/hide]有人回复了您所发表/回复的主题文章,快来". |
$msg_content = "有人回复了您所发表/回复的文章,快来". |
| 660 |
"[article $aid]看看[/article]《" . $r_title . "》吧!\n"; |
"[article $aid]看看[/article]《" . $r_title . "》吧!\n"; |
| 661 |
|
|
| 662 |
$sql = "INSERT INTO bbs_msg(fromUID, toUID, content, send_dt, send_ip) |
$sql = "INSERT INTO bbs_msg(fromUID, toUID, content, send_dt, send_ip) |
| 769 |
|
|
| 770 |
mysqli_close($db_conn); |
mysqli_close($db_conn); |
| 771 |
exit(json_encode($result_set)); |
exit(json_encode($result_set)); |
|
?> |
|