Oto zminiony kod:
include 'topnews.php'; $query_comm_temp = "SELECT * FROM " . PREFIX . "_comments ORDER BY date DESC LIMIT " . $comm_num.";"; $query_comm = $db->query($query_comm_temp); while ($comment = $db->get_row($query_comm)) { $comment_tpl = "<table width=100% border=0 cellpadding=0 cellspacing=0><tr><td style='padding-top: 4px;'>Autor: "; $comment_tpl .= "<a href=". link_user($comment['autor']).">". $comment['autor']."</a> W artykule:</td></tr><tr><td style='border-bottom: 1px solid #d1d7dc; padding-bottom: 4px;'>"; $query_news_temp = "SELECT * FROM ". PREFIX ."_post WHERE id=". $comment['post_id'] .";"; $query_news = $db->query($query_news_temp); while ($novost = $db->get_row($query_news)) { else $news = $novost['title']; if ($conf_url == "yes") { $ssilka = $config['http_home_url'] . get_url( $row['category'] ) . "/" . $row['id'] . "-" . $row['alt_name'] . ".html"; } else { $ssilka = $novost['id']; } if ($hint == "yes") $hint_show = "onMouseover=\"showhint('<b>Treść:</b><br>".$comment_text."', this, event, '200px')\""; $comment_tpl .= lastcomm_getscript()."<a href=\"".link_news().$ssilka."\"". $hint_show .">".$news. "</a></td></tr></table>"; } $ready_tpl .= $comment_tpl; } $lastcomment = $ready_tpl; ?>