Har et lille Problem jeg skal have Løst se om i kan Hjælpe mig
jeg har Programmeret her til kan ikke finde Fejlen det er til en Chat??<?
include("inc/password.php");
include("inc/header.php");
$select_info = mysql_query("SELECT username,room,rum,status,roomname,roommax,roombgpic FROM users WHERE(id='$id')");
$row_info = mysql_fetch_array($select_info);
if ($action=="ringerpaa") {
$room=addslashes($room);
$select_info2 = mysql_query("SELECT username FROM users WHERE(room='$room')");
$row_info2 =mysql_fetch_array($select_info2);
print "Du ringer nu på hos $row_info2[username].";
}
if ($action=="showuser") {
$uid = addslashes($uid);
$select_info = mysql_query("SELECT username,room,msn,status_bruger,alder,onlinetid,spir,sex,rum,navn,text,onlinechat FROM users WHERE(id='$uid')");
$row_info = mysql_fetch_array($select_info);
$sex = ucwords($row_info[sex]);
$online = "<br><br>$sex er ikke længere online på chatten.";
if ($row_info[onlinechat] != "0")
{
$temphour = $row_info[onlinetid]/60/60;
$hour = floor($temphour);
$tempmin = $row_info[onlinetid]/60;
$min = $tempmin-$hour*60;
$min = floor($min);
$now = time();
$min2 = $now-$row_info[onlinechat];
$min2 = $min2/60;
$min2 = floor($min2);
function level($onlinechat) {
if ($onlinechat < 1) {$level = 1; }
elseif ($onlinechat < 4) { $level = 2; }
elseif ($onlinechat < 5) { $level = 3; }
elseif ($onlinechat < 10) { $level = 4; }
elseif ($onlinechat < 12) { $level = 5; }
elseif ($onlinechat < 15) { $level = 6; }
elseif ($onlinechat < 20) { $level = 7; }
elseif ($onlinechat < 35) { $level = 8; }
elseif ($onlinechat < 50) { $level = 9; }
elseif ($onlinechat < 75) { $level = 10; }
elseif ($onlinechat < 100) { $level = 11; }
elseif ($onlinechat < 125) { $level = 12; }
elseif ($onlinechat < 150) { $level = 13; }
elseif ($onlinechat < 200) { $level = 14; }
elseif ($onlinechat < 250) { $level = 15; }
elseif ($onlinechat < 350) { $level = 16; }
elseif ($onlinechat < 500) { $level = 17; }
elseif ($onlinechat < 700) { $level = 18; }
elseif ($onlinechat < 1000) { $level = 19; }
elseif ($onlinechat < 1500) { $level = 20; }
return $level;
}
$online = "";
}
echo "<BR>";
echo "<BR>";
print "<b><u><font size=\"1\"><h3> $row_info[username] </h3></u></b>
<br><b>Coinz: </b>".floor($row_info[spir])."<br><b>Online tid:</b> $hour</b> timer og $min min.<br><b>Loggede på chatten:</b> $min2 min. siden<br><b>Level: </b> ".level($hour)."";
if ($row_info[room] != "0") {
print "<font size=\"1\"><br><b>Lej: </b>$row_info[room] <a href=\"bot.php?action=changeroom&rum=$row_info[room]\" target=\"bot\"> (Gå dertil)";
}
if ($row_info[room] && $row_info[room] != 0) {
print "<font size=\"1\"><br><br><a href=\"bot.php?action=changeroom&rum=$row_info[room]\" target=\"bot\"><b>$room_info[room]</b></a><BR>";
}
if ($row_info[rum] == $row_info2[status] > 0) {
if ($uid != $id) {
print "<br><font size=\"1\"><a href=\"info.php?action=smidud&uid=$uid\">Kick</a>";
}
}
if ($row_info2[status] > 4) {
if ($uid != $id) {
print "<br><font size=\"1\"><a href=\"ban.php?action=ban&ban=$uid\">Ban</a>";
}
}
echo " <b><br>Status</b> $row_info[status_bruger] ";
echo " <b><br>Navn:</b> $row_info[navn] ";
echo " <b><br>Alder:</b> $row_info[alder] ";
echo " <b><br>MSN:</b> $row_info[msn] ";
echo " <b><br>Fritext:</b> $row_info[text] ";
print "$online<br><br><left>";
$result_ting = mysql_query("SELECT id,tingname,figur FROM ting WHERE(owner='$uid')");
if (mysql_num_rows($result_ting) != 0)
{
while($row_ting = mysql_fetch_array($result_ting)) {
print "<font size=\"1\"><b><h4><u>$row_ting[tingname]</u></h4></b><font size=\"1\"><a href=\"info.php?action=showthing&tid=$row_ting[id]\"><img src=\"../gfx/ting/$row_ting[figur]\" border=\"0\"><br><img src=\"../gfx/spacer.gif\" border=\"0\"></a><br><font size=\"1\"><b></b><font size=\"1\"><br>";
$i++;
}
print "";
}
if($i==0)
{
print "<font size=\"1\">Ingen ting..";
}
}
?>
kan i Hjælpe så Skriv :)