// préparation de l'affichage (top5 utilisateurs)
[476]while ($line = mysql_fetch_array($top_posting_users) AND $line2 = mysql_fetch_array($last_replies) AND $line3 = mysql_fetch_array($new_mb)) {
$rank++;
if($num==1) {
$class=row1;
$num = 0;
} else {
$class=row2;
$num++;
}
$usertop5 = append_sid("profile.php?mode=viewprofile&u=".$line['user_id']);
$newmb = append_sid("profile.php?mode=viewprofile&u=".$line3['user_id']);
$topic = append_sid("viewtopic.php?t=".$line2['topic_id']);
$sql = "SELECT poster_id, COUNT(*) AS real_user_posts
FROM ".POSTS_TABLE. "
WHERE poster_id = ".$line['user_id']."
GROUP BY poster_id";
$result = $db->sql_query($sql);
$rowuserposts = $db->sql_fetchrow($result);
$db->sql_freeresult($result);
$posts_per_day = $rowuserposts['real_user_posts'];
$sql = "SELECT poster_id, COUNT(*) AS real_user_posts
FROM ".POSTS_TABLE. "
WHERE poster_id = ".$line3['user_id']."
GROUP BY poster_id";
$result = $db->sql_query($sql);
$rowuserposts = $db->sql_fetchrow($result);
$db->sql_freeresult($result);
$posts_per_day2 = $rowuserposts['real_user_posts'];
$template->assign_block_vars('mini', array(
'NEWMB' => $newmb,
'NBNAME' => $line3['username'],
'POST' => $posts_per_day2,
'POSTER' => $usertop5,
'POSTERA' => $line['username'],
'NBPOSTS' => $posts_per_day,
'TOPIC' => $topic,
'ID' => $line2['topic_views'],
'ROW' => $class,
'NOM' => $line2['topic_title'])
);
};
// fin du top 5 utilisateurs
//
//sujet le plus populaire
//
$topic_views_sql="SELECT topic_title,topic_views,topic_id FROM phpbb_topics ORDER BY topic_views DESC LIMIT 1";
$more_views = $db->sql_query($topic_views_sql);
while ($line = mysql_fetch_array($more_views)) {////////527///////////
$topic = append_sid("viewtopic.php?t=".$line['topic_id']);
$template->assign_block_vars('pop', array(
'TOPIC' => $topic,
'POST' => $line['topic_title'],
'NB' => $line['topic_views'])