<?



$checkthank = $db->query('SELECT COUNT(*) FROM `forum_thank` WHERE `userthank` = "' . $systemUser->id . '" and `topic` = "' . $res['id'] . '" and `user` = "' . $res['user_id'] . '"')->fetchColumn();
if ($systemUser->isValid() && $systemUser->id != $res['user_id'] && ($checkthank < 1)) {
    echo '<br/><table width="100%" cellpadding="0" cellspacing="0"><tr><td width="auto"></td><td width="auto" align="right"><a href="index.php?id=' . $id . '&amp;thanks=' . $res['id'] . '&amp;user=' . $res['user_id'] . '&amp;start=' . $start . '&amp;thank#thanksyou"><img src="like/like.gif" alt="like"/></a></td></tr></table>';
}


?>
