Problemer
Hey jeg har problemer med at denne her php fil tilsyndenladen ikke udfører php kommandoerne...<?
include(\"db.php\");
?>
<?
echo $brugernavn;
?>
<style>
#felt{
position:absolute; width:70px; height:70px; z-index:3;
}
#bg{
position:absolute; width:420px; height:380px; z-index:1;
}
#figur{
position:absolute; width:70px; height:70px; z-index:4;
}
#navn{
position:absolute; width:70px; height:10px; z-index:5;
font-family: \"Verdana, Arial\";
font-size: 11px ;
color: white ;
}
#rumnavn{
position:absolute; width:420px; height:10px; z-index:6;
font-family: \"Verdana, Arial\";
font-size: 11px ;
color: yellow ;
}
</style>
<?
$result = mysql_query(\"Select * from rooms where nr = \'$rum\'\");
$row = mysql_fetch_array($result);
?>
<div id=\"rumnavn\" style=\"left: 0px; top: 0px\"><center><? echo $row[navn]; ?></div>
<div id=\"bg\" style=\"left: 0px; top: 0px\"><img src=\"<? echo $row[background]; ?>\" border=\"0\" width=\"425px\" height=\"385px\"></div>
<?
if($felt == NULL) { $felt == \"1\"; }
if($felt == \"1\") { $x = 0; $y = 0; }
if($felt == \"2\") { $x = 70; $y = 0; }
if($felt == \"3\") { $x = 140; $y = 0; }
if($felt == \"4\") { $x = 210; $y = 0; }
if($felt == \"5\") { $x = 280; $y = 0; }
if($felt == \"6\") { $x = 350; $y = 0; }
if($felt == \"7\") { $x = 35; $y = 35; }
if($felt == \"8\") { $x = 105; $y = 35; }
if($felt == \"9\") { $x = 175; $y = 35; }
if($felt == \"10\") { $x = 245; $y = 35; }
if($felt == \"11\") { $x = 315; $y = 35; }
if($felt == \"12\") { $x = 0; $y = 70; }
if($felt == \"13\") { $x = 70; $y = 70; }
if($felt == \"14\") { $x = 140; $y = 70; }
if($felt == \"15\") { $x = 210; $y = 70; }
if($felt == \"16\") { $x = 280; $y = 70; }
if($felt == \"17\") { $x = 350; $y = 70; }
if($felt == \"18\") { $x = 35; $y = 105; }
if($felt == \"19\") { $x = 105; $y = 105; }
if($felt == \"20\") { $x = 175; $y = 105; }
if($felt == \"21\") { $x = 245; $y = 105; }
if($felt == \"22\") { $x = 315; $y = 105; }
if($felt == \"23\") { $x = 0; $y = 140; }
if($felt == \"24\") { $x = 70; $y = 140; }
if($felt == \"25\") { $x = 140; $y = 140; }
if($felt == \"26\") { $x = 210; $y = 140; }
if($felt == \"27\") { $x = 280; $y = 140; }
if($felt == \"28\") { $x = 350; $y = 140; }
if($felt == \"29\") { $x = 35; $y = 175; }
if($felt == \"30\") { $x = 105; $y = 175; }
if($felt == \"31\") { $x = 175; $y = 175; }
if($felt == \"32\") { $x = 245; $y = 175; }
if($felt == \"33\") { $x = 315; $y = 175; }
if($felt == \"34\") { $x = 0; $y = 210; }
if($felt == \"35\") { $x = 70; $y = 210; }
if($felt == \"36\") { $x = 140; $y = 210; }
if($felt == \"37\") { $x = 210; $y = 210; }
if($felt == \"38\") { $x = 280; $y = 210; }
if($felt == \"39\") { $x = 350; $y = 210; }
if($felt == \"40\") { $x = 35; $y = 245; }
if($felt == \"41\") { $x = 105; $y = 245; }
if($felt == \"42\") { $x = 175; $y = 245; }
if($felt == \"43\") { $x = 245; $y = 245; }
if($felt == \"44\") { $x = 315; $y = 245; }
if($felt == \"45\") { $x = 0; $y = 280; }
if($felt == \"46\") { $x = 70; $y = 280; }
if($felt == \"47\") { $x = 140; $y = 280; }
if($felt == \"48\") { $x = 210; $y = 280; }
if($felt == \"49\") { $x = 280; $y = 280; }
if($felt == \"50\") { $x = 350; $y = 280; }
if($felt == \"51\") { $x = 35; $y = 315; }
if($felt == \"52\") { $x = 105; $y = 315; }
if($felt == \"53\") { $x = 175; $y = 315; }
if($felt == \"54\") { $x = 245; $y = 315; }
if($felt == \"55\") { $x = 315; $y = 315; }
?>
<?
mysql_query(\"update chat set x = \'$x\' where brugernavn = \'$brugernavn\'\");
mysql_query(\"update chat set y = \'$y\' where brugernavn = \'$brugernavn\'\");
mysql_query(\"update chat set felt = \'$felt\' where brugernavn = \'$brugernavn\'\");
?>
<?
$result1 = mysql_query(\"Select * from chat where rum = \'$rum\'\");
while($row1 = mysql_fetch_array($result1)) {
?>
<?
$newx = $row1[x] + 5;
$newy = $row1[y] + 55;
?>
<div id=\"figur\" style=\"left: <? echo $row1[x]; ?>px; top: <? echo $row1[y]; ?>px\"><center><img src=\"skatem.gif\"></center></div>
<div id=\"navn\" style=\"left: <? echo $newx; ?>px; top: <? echo $newy; ?>px\"><center><? echo $row1[brugernavn]; ?></center></div>
<?
}
?>
<?
$indhold .= \"<div align=\\\"left\\\">
<div id=\\\"felt\\\" style=\\\"left: 0px; top: 0px;cursor:default;\\\"><a href=\\\"main.php?felt=1&rum=<? echo $rum; ?>&brugernavn=<? echo $brugernavn; ?>\\\" style=\\\"cursor:default;\\\"><img src=\\\"felt.gif\\\" border=\\\"0\\\"></a></div>
<div id=\\\"felt\\\" style=\\\"left: 70px; top: 0px;cursor:default;\\\"><a href=\\\"main.php?felt=2&rum=<? echo $rum; ?>&brugernavn=<? echo $brugernavn; ?>\\\" style=\\\"cursor:default;\\\"><img src=\\\"felt.gif\\\" border=\\\"0\\\"></a></div>
<div id=\\\"felt\\\" style=\\\"left: 140px; top: 0px;cursor:default;\\\"><a href=\\\"main.php?felt=3&rum=<? echo $rum; ?>&brugernavn=<? echo $brugernavn; ?>\\\" style=\\\"cursor:default;\\\"><img src=\\\"felt.gif\\\" border=\\\"0\\\"></a></div>
<div id=\\\"felt\\\" style=\\\"left: 210px; top: 0px;cursor:default;\\\"><a href=\\\"main.php?felt=4&rum=<? echo $rum; ?>&brugernavn=<? echo $brugernavn; ?>\\\" style=\\\"cursor:default;\\\"><img src=\\\"felt.gif\\\" border=\\\"0\\\"></a></div>
<div id=\\\"felt\\\" style=\\\"left: 280px; top: 0px;cursor:default;\\\"><a href=\\\"main.php?felt=5&rum=<? echo $rum; ?>&brugernavn=<? echo $brugernavn; ?>\\\" style=\\\"cursor:default;\\\"><img src=\\\"felt.gif\\\" border=\\\"0\\\"></a></div>
<div id=\\\"felt\\\" style=\\\"left: 350px; top: 0px;cursor:default;\\\"><a href=\\\"main.php?felt=6&rum=<? echo $rum; ?>&brugernavn=<? echo $brugernavn; ?>\\\" style=\\\"cursor:default;\\\"><img src=\\\"felt.gif\\\" border=\\\"0\\\"></a></div>
<div id=\\\"felt\\\" style=\\\"left: 35px; top: 35px;cursor:default;\\\"><a href=\\\"main.php?felt=7&rum=<? echo $rum; ?>&brugernavn=<? echo $brugernavn; ?>\\\" style=\\\"cursor:default;\\\"><img src=\\\"felt.gif\\\" border=\\\"0\\\"></a></div>
<div id=\\\"felt\\\" style=\\\"left: 105px; top: 35px;cursor:default;\\\"><a href=\\\"main.php?felt=8&rum=<? echo $rum; ?>&brugernavn=<? echo $brugernavn; ?>\\\" style=\\\"cursor:default;\\\"><img src=\\\"felt.gif\\\" border=\\\"0\\\"></a></div>
<div id=\\\"felt\\\" style=\\\"left: 175px; top: 35px;cursor:default;\\\"><a href=\\\"main.php?felt=9&rum=<? echo $rum; ?>&brugernavn=<? echo $brugernavn; ?>\\\" style=\\\"cursor:default;\\\"><img src=\\\"felt.gif\\\" border=\\\"0\\\"></a></div>
<div id=\\\"felt\\\" style=\\\"left: 245px; top: 35px;cursor:default;\\\"><a href=\\\"main.php?felt=10&rum=<? echo $rum; ?>&brugernavn=<? echo $brugernavn; ?>\\\" style=\\\"cursor:default;\\\"><img src=\\\"felt.gif\\\" border=\\\"0\\\"></a></div>
<div id=\\\"felt\\\" style=\\\"left: 315px; top: 35px;cursor:default;\\\"><a href=\\\"main.php?felt=11&rum=<? echo $rum; ?>&brugernavn=<? echo $brugernavn; ?>\\\" style=\\\"cursor:default;\\\"><img src=\\\"felt.gif\\\" border=\\\"0\\\"></a></div>
<div id=\\\"felt\\\" style=\\\"left: 0px; top: 70px;cursor:default;\\\"><a href=\\\"main.php?felt=12&rum=<? echo $rum; ?>&brugernavn=<? echo $brugernavn; ?>\\\" style=\\\"cursor:default;\\\"><img src=\\\"felt.gif\\\" border=\\\"0\\\"></a></div>
<div id=\\\"felt\\\" style=\\\"left: 70px; top: 70px\\\"><a href=\\\"main.php?felt=13&rum=<? echo $rum; ?>&brugernavn=<? echo $brugernavn; ?>\\\" style=\\\"cursor:default\\\"><img src=\\\"felt.gif\\\" border=\\\"0\\\"></a></div>
<div id=\\\"felt\\\" style=\\\"left: 140px; top: 70px;cursor:default;\\\"><a href=\\\"main.php?felt=14&rum=<? echo $rum; ?>&brugernavn=<? echo $brugernavn; ?>\\\" style=\\\"cursor:default;\\\"><img src=\\\"felt.gif\\\" border=\\\"0\\\"></a></div>\"
?>
<html>
<head>
<title>chat_main</title>
<link rel=\"STYLESHEET\" type=\"text/css\" href=\"phpuni.css\">
<?php
if ($update==\"bottom\") echo \"<meta http-equiv=\\\"refresh\\\" content=\\\"2;URL=$PHP_SELF\\\">\";
/*<!--
<META HTTP-EQUIV=\"Refresh\" CONTENT=\"2\">
-->*/?>
<script language=\"JavaScript\" type=\"text/javascript\">
<!--
function skriv(id,tekst,farve) {
if (document.layers) {
parent.chatmain.document.layers[id].document.open();
parent.chatmain.document.layers[id].document.write(<?=$indhold?>);
parent.chatmain.document.layers[id].document.close();
}
else if (document.getElementById) {
parent.chatmain.document.getElementById(id).style.backgroundColor = farve;
parent.chatmain.document.getElementById(id).innerHTML = tekst;
}
else if (document.all) {
parent.chatmain.document.all[id].innerHTML = tekst;
parent.chatmain.document.all[id].style.backgroundColor=farve;
}
}
function opdater() {
skriv(\"chat\",\'<?=$indhold?>\',\'<?=$chat_bg?>\');
setTimeout(\"location.reload()\",2000)
}
//-->
</script>
</head>
<body onLoad=\"opdater();<?if ($update==\"bottom\") echo \"parent.bottom.location.reload();\"; ?> oncontextmenu=\"return false\" onselectstart=\"return false\" ondragstart=\"return false\">
</body>
