Welcome to WebmasterWorld Guest from 220.127.116.11
$query_top=mysql_query("SELECT * FROM frontpage ORDER BY post_date, total_votes DESC LIMIT 15, 45") or die(mysql_error());
The query looks at entries that are not on the frontpage and finds the 30 posts after that, however it does not arrange them according to the total votes
The correct one would seem to be:
$sql = "SELECT * FROM frontpage WHERE id NOT IN (SELECT id FROM frontpage ORDER BY post_date LIMIT 30) ORDER BY total_votes DESC LIMIT 15";
I think this should do the trick.