Her er den så:
<? ob_start();
include "connect.php";
if(CheckUser($_COOKIE['username'],$_COOKIE['password'])) {
?>
<body topmargin="1" leftmargin="1" rightmargin="1" bottommargin="1" marginwidth="1" marginheight="1">
<script>
function Refresh() {
location.href = "navigate.php";
}
setTimeout("Refresh();",2000);
</script>
<b><?=$lang['0007']?></b><br />
<?
if(htmlspecialchars($_GET['id'])) {
ChangeRoom($_COOKIE['user_id'],$_GET['id']);
}
$resultalt = mysql_query("SELECT * FROM ".$conf['db']."rooms ORDER BY id") or die(mysql_error());
while($row = mysql_fetch_array($resultalt)){
$g_total = mysql_query("select count(id) as total from ".$conf['db']."users where room = '".$row['id']."'") or die(mysql_error());
$total = mysql_result($g_total,0);
if($row['id'] < "100" or $row['owner'] == "none") {
echo "<b>" . $row['id'] . "</b> ";
if($total <= $maxinroom){
echo "<a href=\\"navigate.php?id=" . $row['id'] . "\\" target=\\"littlebox\\">" . $row['name']."</a>";
}else{
echo $row['name'];
}
echo " (" . $total . "/" . $maxinroom . ")<br />";
}
}
echo "<br /><b>" . $lang['0008'] . "</b><br />";
$resultalt = mysql_query("SELECT * FROM ".$conf['db']."rooms ORDER BY id") or die(mysql_error());
while($row = mysql_fetch_array($resultalt)){
$g_total = mysql_query("select count(id) as total from ".$conf['db']."users where room = '".$row['id']."'") or die(mysql_error());
$total = mysql_result($g_total,0);
if($row['id'] >= "100" AND $row['owner'] != "none") {
echo "<b>" . $row['id'] . "</b> ";
if($total <= $maxinroom){
echo "<a href=\\"navigate.php?id=" . $row['id'] . "\\">" . $row['name']."</a>";
}else{
echo $row['name'];
}
echo " (" . $total . "/" . $maxinroom . ")<br />";
}
}
} else {
echo $lang['0100'];
}ob_end_flush();
?>
Ved ikke om du ska bruge mere eller bare lige skriv msn...?