
Chatbox|Admin nhận làm wap/web, giá cả thương lượng... Thông tin admin tại mỗi bài viết.
Hi, Khách!
![]() | ![]() ![]() ![]() ![]() |
Tên MOD: Gộp bài viết cho JohnCMS
Mở forum/includes/say.php tìm:
<?php
mysql_query("INSERT INTO `forum` SET
`refid` = '$id',
`type` = 'm' ,
`time` = '" . time() . "',
`user_id` = '$user_id',
`from` = '$login',
`ip` = '" . core::$ip . "',
`ip_via_proxy` = '" . core::$ip_via_proxy . "',
`soft` = '" . mysql_real_escape_string($agn1) . "',
`text` = '" . mysql_real_escape_string($msg) . "',
`edit` = '',
`curators` = ''
");
$fadd = mysql_insert_id();
?>
Copy code
mysql_query("INSERT INTO `forum` SET
`refid` = '$id',
`type` = 'm' ,
`time` = '" . time() . "',
`user_id` = '$user_id',
`from` = '$login',
`ip` = '" . core::$ip . "',
`ip_via_proxy` = '" . core::$ip_via_proxy . "',
`soft` = '" . mysql_real_escape_string($agn1) . "',
`text` = '" . mysql_real_escape_string($msg) . "',
`edit` = '',
`curators` = ''
");
$fadd = mysql_insert_id();
?>
Copy code
Thay thành:
<?php
$check = mysql_fetch_assoc(mysql_query("SELECT * FROM `forum` WHERE `refid`= '$id' ORDER BY `time` DESC LIMIT 1"));
if($check['user_id' == $user_id) {
$retext = $check['text';
$retext .= "\n\n---Bổ sung---\n\n";
$retext .= mysql_real_escape_string($msg);
mysql_query("UPDATE `forum` SET `time`='".time()."', `text`='$retext' WHERE `id`='".$check["id"."'");
$fadd = $check['id';
} else {
mysql_query("INSERT INTO `forum` SET
`refid` = '$id',
`type` = 'm' ,
`time` = '" . time() . "',
`user_id` = '$user_id',
`from` = '$login',
`ip` = '" . core::$ip . "',
`ip_via_proxy` = '" . core::$ip_via_proxy . "',
`soft` = '" . mysql_real_escape_string($agn1) . "',
`text` = '" . mysql_real_escape_string($msg) . "'
");
$fadd = mysql_insert_id();
}
?>
Copy code
$check = mysql_fetch_assoc(mysql_query("SELECT * FROM `forum` WHERE `refid`= '$id' ORDER BY `time` DESC LIMIT 1"));
if($check['user_id' == $user_id) {
$retext = $check['text';
$retext .= "\n\n---Bổ sung---\n\n";
$retext .= mysql_real_escape_string($msg);
mysql_query("UPDATE `forum` SET `time`='".time()."', `text`='$retext' WHERE `id`='".$check["id"."'");
$fadd = $check['id';
} else {
mysql_query("INSERT INTO `forum` SET
`refid` = '$id',
`type` = 'm' ,
`time` = '" . time() . "',
`user_id` = '$user_id',
`from` = '$login',
`ip` = '" . core::$ip . "',
`ip_via_proxy` = '" . core::$ip_via_proxy . "',
`soft` = '" . mysql_real_escape_string($agn1) . "',
`text` = '" . mysql_real_escape_string($msg) . "'
");
$fadd = mysql_insert_id();
}
?>
Copy code
Nếu có lỗi hãy báo lỗi ngay nhé.
Chúc thành công!

Trực Tuyến:
Khách: 1