$res = $db->sql_query('SELECT a.t_id AS topic_id, a.tc_id AS TUT_ID, a.t_title AS titolo, a.t_date AS data, a.t_counter AS letture, a.author AS autore, a.totalvotes AS tot_voti, a.totalcomments AS tot_commenti, b.tc_id AS CAT_ID, b.tc_title AS cattitolo FROM ' . $prefix . '_tutorials_tutorials a LEFT JOIN ' . $prefix . '_tutorials_categories b ON a.tc_id = b.tc_id ORDER BY a.t_date DESC LIMIT 0, ' . $count);
$res = $db->sql_query('SELECT a.t_id AS topic_id, a.tc_id AS TUT_ID, a.t_title AS titolo, a.t_date AS data, a.t_counter AS letture, a.author AS autore, a.totalvotes AS tot_voti, a.totalcomments AS tot_commenti, b.tc_id AS CAT_ID, b.tc_title AS cattitolo FROM ' . $prefix . '_tutorials_tutorials a LEFT JOIN ' . $prefix . '_tutorials_categories b ON a.tc_id = b.tc_id ORDER BY a.t_date DESC LIMIT 0, ' . $count);
$content .= "<br><center><b>$count2 Most Popular Tutorials</b></center>";
$content .= "<br><span class=\"aligncenter\"><b>$count2 Most Popular Tutorials</b></span>";
$a = 1;
$a = 1;
$res = $db->sql_query('SELECT a.t_id AS topic_id, a.tc_id AS TUT_ID, a.t_title AS titolo, a.t_date AS data, a.t_counter AS letture, a.author AS autore, a.totalvotes AS tot_voti, a.totalcomments AS tot_commenti, b.tc_id AS CAT_ID, b.tc_title AS cattitolo FROM ' . $prefix . '_tutorials_tutorials a LEFT JOIN ' . $prefix . '_tutorials_categories b ON a.tc_id = b.tc_id ORDER BY a.t_counter DESC LIMIT 0, ' . $count2);
$res = $db->sql_query('SELECT a.t_id AS topic_id, a.tc_id AS TUT_ID, a.t_title AS titolo, a.t_date AS data, a.t_counter AS letture, a.author AS autore, a.totalvotes AS tot_voti, a.totalcomments AS tot_commenti, b.tc_id AS CAT_ID, b.tc_title AS cattitolo FROM ' . $prefix . '_tutorials_tutorials a LEFT JOIN ' . $prefix . '_tutorials_categories b ON a.tc_id = b.tc_id ORDER BY a.t_counter DESC LIMIT 0, ' . $count2);
$content .= "<hr><div id=\"tabella\"><center>[ <a href=\"modules.php?name=Your_Account\">Log in</a> to submit a new tutorial ]</center></div>";
$content .= "<hr><div class=\"tabella\"><span class=\"aligncenter\">[ <a href=\"modules.php?name=Your_Account\">Log in</a> to submit a new tutorial ]</span></div>";
} else {
} else {
$content .= "<hr><div id=\"tabella\"><center>[ <a href=\"modules.php?name=Tutorials&file=submit\">Submit</a> NEW | My <a href=\"modules.php?name=Tutorials&t_op=FavoriteTutorials\">favorites</a> ]</center></div>";
$content .= "<hr><div class=\"tabella aligncenter\">[ <a href=\"modules.php?name=Tutorials&file=submit\">Submit</a> NEW | My <a href=\"modules.php?name=Tutorials&t_op=FavoriteTutorials\">favorites</a> ]</div>";