i wrote a lil php script for my webcms to show the top voters of my server which I can use in the future when the server becomes fully public. But one problem is that when I open it in a seperate page it got no errors.
But when I try to do like the other pages so u can see the header, subheader menus etc I get these errors :

This is my code:
PHP Code:
<?php
require_once "maincore.php";
require_once "subheader.php";
require_once "side_left.php";
include("configtv.php");
include LOCALE.LOCALESET."topvotes.php";
$con = mysql_connect($host, $username, $password, true) or die("No se pudo conectar");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
mysql_select_db("$webdb", $con);
$result = mysql_query("SELECT user_name FROM fusion_users ORDER BY user_votes desc");
$name1 = mysql_result($result,0);
$name2 = mysql_result($result,1);
$name3 = mysql_result($result,2);
$name4 = mysql_result($result,3);
$name5 = mysql_result($result,4);
$name6 = mysql_result($result,5);
$name7 = mysql_result($result,6);
$name8 = mysql_result($result,7);
$name9 = mysql_result($result,8);
$name10 = mysql_result($result,9);
opentable($locale['400']);
echo $locale['404'];
echo "<table border='0' cellpadding='1'>
<tr>
<th align='left'>Name</th>
<th align='left'>Votes</th>
</tr>";
echo "<tr><td>$name1<br>$name2<br>$name3<br>$name4<br>$name5<br>$name6<br>$name7<br>$name8<br>$name9<br>$name10</td>";
$resultvotes = mysql_query("SELECT user_votes FROM fusion_users ORDER BY user_votes desc");
$votes1 = mysql_result($resultvotes,0);
$votes2 = mysql_result($resultvotes,1);
$votes3 = mysql_result($resultvotes,2);
$votes4 = mysql_result($resultvotes,3);
$votes5 = mysql_result($resultvotes,4);
$votes6 = mysql_result($resultvotes,5);
$votes7 = mysql_result($resultvotes,6);
$votes8 = mysql_result($resultvotes,7);
$votes9 = mysql_result($resultvotes,8);
$votes10 = mysql_result($resultvotes,9);
echo "<td align='left'>$votes1<br>$votes2<br>$votes3<br>$votes4<br>$votes5<br>$votes6<br>$votes7<br>$votes8<br>$votes9<br>$votes10</td></tr>";
mysql_close($con);
closetable();
require_once "side_right.php";
require_once "footer.php";
?>
what can cause this? Dont get those errors on any other page :P And why does the footer move up there it is now? :S when it should look like this: