Hi, Khách!
![]() | ![]() ![]() ![]() ![]() |
Đầu tiền Yêu cầu có mod bang hội cho JohnCMS nhé...
Cái này chắc ai cũng có...
Đầu tiên chúng ta import data này cái nha..
có sid mới thank được...
Tải xuống data_soo_thanks_wapit-mobi-by-nguyen.gz (0.7kb)
mod nâng cấp VIP khi thank sẽ cộng vào thank_duoc trong user đó nghen...
Mở soo/index.php::::tìm::::
<?php
if ($user_id && !$filter) {
// Фиксация факта прочтения топика
}
if ($rights < 7 && $type1['close' == 1) {
echo '<div class="rmenu"><p>' . $lng_forum['topic_deleted' . '
<a href="?id=' . $type1['refid' . '">' . $lng_forum['to_section' . '</a></p></div>';
require('../incfiles/end.php');
exit;
}
?>
Copy code
if ($user_id && !$filter) {
// Фиксация факта прочтения топика
}
if ($rights < 7 && $type1['close' == 1) {
echo '<div class="rmenu"><p>' . $lng_forum['topic_deleted' . '
<a href="?id=' . $type1['refid' . '">' . $lng_forum['to_section' . '</a></p></div>';
require('../incfiles/end.php');
exit;
}
?>
Copy code
Thêm vào bên dưới...
<?php
$congcamon=mysql_fetch_array(mysql_query('SELECT * FROM `users` WHERE `id` = "' . trim($_GET['user') . '"'));
mysql_query("UPDATE `soo_forum` SET `thank`='" . ($type1['thank' + 1) . "' WHERE `id` = '$id'");
mysql_query("UPDATE `users` SET `thank_duoc`='" . ($congcamon['thank_duoc' + 1) . "' WHERE `id` = '" . trim($_GET['user') . "'");
mysql_query("UPDATE `users` SET `thank_di`='" . ($datauser['thank_di' + 1) . "' WHERE `id` = '" . $user_id . "'");
$checkthankdau = mysql_query('SELECT COUNT(*) FROM `soo_forum_thank` WHERE `userthank` = "' . $user_id . '" and `topic` = "' . $_GET['thanks' . '" and `user` = "' . $_GET['user' . '"');
if ($user_id && $user_id != $_GET['user' && (mysql_result($checkthankdau, 0) < 1)) { if ((isset ($_GET['thank'))&&(isset ($_GET['user'))&&(isset ($_GET['thanks'))) {
echo '<div class="rmenu" id="thanksyou"><b>Bạn đã cảm ơn bài viết thành công </b></div>';
mysql_query("INSERT INTO `soo_forum_thank` SET `user` = '".trim($_GET['user')."', `topic` = '".trim($_GET['thanks')."' , `time` = '$realtime', `userthank` = '$user_id', `sid` = '$type1[sid', `chude` = '".$_GET["id"."' ");
}
}
//////////by nguyen//////////////// ?>
Copy code
$congcamon=mysql_fetch_array(mysql_query('SELECT * FROM `users` WHERE `id` = "' . trim($_GET['user') . '"'));
mysql_query("UPDATE `soo_forum` SET `thank`='" . ($type1['thank' + 1) . "' WHERE `id` = '$id'");
mysql_query("UPDATE `users` SET `thank_duoc`='" . ($congcamon['thank_duoc' + 1) . "' WHERE `id` = '" . trim($_GET['user') . "'");
mysql_query("UPDATE `users` SET `thank_di`='" . ($datauser['thank_di' + 1) . "' WHERE `id` = '" . $user_id . "'");
$checkthankdau = mysql_query('SELECT COUNT(*) FROM `soo_forum_thank` WHERE `userthank` = "' . $user_id . '" and `topic` = "' . $_GET['thanks' . '" and `user` = "' . $_GET['user' . '"');
if ($user_id && $user_id != $_GET['user' && (mysql_result($checkthankdau, 0) < 1)) { if ((isset ($_GET['thank'))&&(isset ($_GET['user'))&&(isset ($_GET['thanks'))) {
echo '<div class="rmenu" id="thanksyou"><b>Bạn đã cảm ơn bài viết thành công </b></div>';
mysql_query("INSERT INTO `soo_forum_thank` SET `user` = '".trim($_GET['user')."', `topic` = '".trim($_GET['thanks')."' , `time` = '$realtime', `userthank` = '$user_id', `sid` = '$type1[sid', `chude` = '".$_GET["id"."' ");
}
}
//////////by nguyen//////////////// ?>
Copy code
tìm tiếp::::::::::::::::::
Thêm bên dưới:::::::::::::
<?php $checkthank = mysql_query('SELECT COUNT(*) FROM `soo_forum_thank` WHERE `userthank` = "' . $user_id . '" and `topic` = "' . $res['id' . '" and `sid` = "' . $res['sid' . '" and `user` = "' . $res['user_id' . '"');
if ($user_id && $user_id != $res['user_id' && (mysql_result($checkthank, 0) < 1)) {
echo' <a id="btn" href="../soo/?mod=forum&sid='. $sid .'&id=' . $id . '&thanks=' . $res['id' . '&user=' . $res['user_id' . '&start=' . $start . '&thank#thanksyou">Thank'; echo '</a>';
}
?>
Copy code
if ($user_id && $user_id != $res['user_id' && (mysql_result($checkthank, 0) < 1)) {
echo' <a id="btn" href="../soo/?mod=forum&sid='. $sid .'&id=' . $id . '&thanks=' . $res['id' . '&user=' . $res['user_id' . '&start=' . $start . '&thank#thanksyou">Thank'; echo '</a>';
}
?>
Copy code
Còn cái này là thống kê người thanks...
dán đâu bạn thấy ok là được...
dán dưới cái thank trên cũng được...
<?php
// Thong Ke So Nguoi Thank JohnCMS 4.4
$thongkethank = mysql_query("SELECT COUNT(*) from `soo_forum_thank` where `sid` = '" . $sid . "' and `topic`='" . $res["id" . "'");
$thongkethanks = mysql_result($thongkethank, 0);
// $thongkethanks=mysql_result(mysql_query('SELECT COUNT(*) FROM `soo_forum_thank` WHERE `sid` = '" . $sid . "' and `topic` = "' . $res['id' . '"')), 0);
$thongkea= @mysql_query("select * from `soo_forum_thank` where `sid` = '" . $sid . "' and `topic` = '" . $res['id' . "'");
$thongke=mysql_fetch_array($thongkea);
$idthongke=trim($_GET['idthongke');
if($thongkethanks>0&&(empty($_GET['idthongke')))
{
echo'<div class="func"><div id="'.$idthongke.'"><img src="../images/thanks.png" /> ';
$thongkeaa = @mysql_query("select * from `soo_forum_thank` where `sid` = '" . $sid . "' and `topic` = '" . $res['id' . "'");
while ($thongkea = mysql_fetch_array($thongkeaa))
{
{
$dentv=mysql_fetch_array(mysql_query('SELECT * FROM `users` WHERE `id` = "'.$thongkea['userthank'.'"'));
echo '<a href="/users/profile.php?user='.$thongkea['userthank'.'">'.nick($dentv['id').'</a>, ';
}
++$f;
}
echo'</div></div>';
}
///////// ?>
Copy code
// Thong Ke So Nguoi Thank JohnCMS 4.4
$thongkethank = mysql_query("SELECT COUNT(*) from `soo_forum_thank` where `sid` = '" . $sid . "' and `topic`='" . $res["id" . "'");
$thongkethanks = mysql_result($thongkethank, 0);
// $thongkethanks=mysql_result(mysql_query('SELECT COUNT(*) FROM `soo_forum_thank` WHERE `sid` = '" . $sid . "' and `topic` = "' . $res['id' . '"')), 0);
$thongkea= @mysql_query("select * from `soo_forum_thank` where `sid` = '" . $sid . "' and `topic` = '" . $res['id' . "'");
$thongke=mysql_fetch_array($thongkea);
$idthongke=trim($_GET['idthongke');
if($thongkethanks>0&&(empty($_GET['idthongke')))
{
echo'<div class="func"><div id="'.$idthongke.'"><img src="../images/thanks.png" /> ';
$thongkeaa = @mysql_query("select * from `soo_forum_thank` where `sid` = '" . $sid . "' and `topic` = '" . $res['id' . "'");
while ($thongkea = mysql_fetch_array($thongkeaa))
{
{
$dentv=mysql_fetch_array(mysql_query('SELECT * FROM `users` WHERE `id` = "'.$thongkea['userthank'.'"'));
echo '<a href="/users/profile.php?user='.$thongkea['userthank'.'">'.nick($dentv['id').'</a>, ';
}
++$f;
}
echo'</div></div>';
}
///////// ?>
Copy code
Nguồn: WapIT

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