<?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>';
}
///////// ?>