Vise andre fra databasen.
Hejsa, Jeg har en 2d chat jeg er igang med. Har lavet:Rykkesystemet.
Se profil
Og textbox / Skriv
Men da jeg lavede systemerne, lavede jeg en fejl, jeg glemte at udtrække dem som var online.
Har i min tabel:
Users og i din online, og når den er på 0 i online er man ikke online, men hvis den er på 1 så er man online. Hvordan vil i sætte det ind, sådan man kan se andre brugere i rummet (denne kode):
<style type="text/css">
body {
border-bottom:scrollbar-3dlight-color : White;
scrollbar-arrow-color : Black;
scrollbar-base-color : Black;
scrollbar-darkshadow-color : White;
scrollbar-face-color : #99CC00;
scrollbar-highlight-color : #99CC00;
scrollbar-shadow-color : Black;
scrollbar-track-color : White
}
a:visited { color: #000000; text-decoration: none}
a:link { color: #000000; text-decoration: none}
a:hover { color: #99CC00; text-decoration: none}
}
#board {
border: 0px solid #000;
border-collapse: collapse;
}
#board td {
width: 80px;
height: 80px;
border: 0px solid #AAA;
text-align: center;
vertical-align: middle;
cursor: pointer;
}
#figure {
width: 51px;
height: 70px;
font: 1px verdana;
background-image: url("http://www.frip.dk/highrisetimes1/www/figurer/geast2.gif");
}
</style><script type="text/javascript">
var last_field = null;
function moveElement(field) {
obj = document.getElementById(field);
if (last_field != null) last_field.innerHTML = '';
document.getElementById(field).innerHTML = '<font face="arial" size="1"><div id="figure"></div><?php echo $tjeklog['brugernavn']; ?>';
last_field = obj;
}
</script>
<title>Hey <?php echo $tjeklog['brugernavn']; ?> ;)</title><meta name="generator" content="Namo WebEditor v5.0(Trial)"><body bgcolor="white" oncontextmenu="return false" ondragstart="return false" onselectstart="return false">
<table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="707" id="AutoNumber1" height="119">
<tr>
<td height="369" width="241" rowspan="3"> <IFRAME NAME="main" SRC="chat_tekst.php" BORDER="0" WIDTH="98%" HEIGHT="100%" SCROLLING="auto" FRAMEBORDER="0"></IFRAME></td>
<td height="53" width="460">
<p align="center"> <img src="elevator.bmp" width="82" height="25" border="0">
<img src="online.bmp" width="82" height="25" border="0"> <a href="chat_tekst.php" target="main"><img src="text.bmp" width="82" height="25" border="0"></a>
<img src="mig.bmp" width="82" height="25" border="0"></td>
</tr>
<tr>
<td height="264" width="460"><table border="1" width="419" align="center" cellspacing="0" bordercolordark="white" bordercolorlight="black">
<tr>
<td width="413" height="317" background="http://www.frip.dk/highrisetimes1/www/baggrunde/dbg.gif">
<table id="board" width="338" height="70" border="0" align="center">
<tr>
<td id="1_1" onclick="moveElement(this.id)" width="50" height="39">
<p align="center"><font size="1" face="Tahoma"> </font></td>
<td id="1_2" onclick="moveElement(this.id)" width="50" height="39">
<p align="center"><font size="1" face="Tahoma"> </font></td>
<td id="1_3" onclick="moveElement(this.id)" width="50" height="39">
<p align="center"><font size="1" face="Tahoma"> </font></td>
<td id="1_4" onclick="moveElement(this.id)" width="50" height="39">
<p align="center"><font size="1" face="Tahoma"> </font></td>
</tr><tr>
<td id="2_1" onclick="moveElement(this.id)" width="50" height="39">
<p align="center"><font size="1" face="Tahoma"> </font></td>
<td id="2_2" onclick="moveElement(this.id)" width="50" height="39">
<p align="center"><font size="1" face="Tahoma"> </font></td>
<td id="2_3" onclick="moveElement(this.id)" width="50" height="39">
<p align="center"><font size="1" face="Tahoma"> </font></td>
<td id="2_4" onclick="moveElement(this.id)" width="50" height="39">
<p align="center"><font size="1" face="Tahoma"> </font></td>
</tr><tr>
<td id="3_1" onclick="moveElement(this.id)" width="50" height="39">
<p align="center"><font size="1" face="Tahoma"> </font></td>
<td id="3_2" onclick="moveElement(this.id)" width="50" height="39">
<p align="center"><font size="1" face="Tahoma"> </font></td>
<td id="3_3" onclick="moveElement(this.id)" width="50" height="39">
<p align="center"><font size="1" face="Tahoma"> </font></td>
<td id="3_4" onclick="moveElement(this.id)" width="50" height="39">
<p align="center"><font size="1" face="Tahoma"> </font></td>
</tr><tr>
<td id="4_1" onclick="moveElement(this.id)" width="50" height="39">
<p align="center"><font size="1" face="Tahoma"> </font></td>
<td id="4_2" onclick="moveElement(this.id)" width="50" height="39">
<p align="center"><font size="1" face="Tahoma"> </font></td>
<td id="4_3" onclick="moveElement(this.id)" width="50" height="39">
<p align="center"><font size="1" face="Tahoma"> </font></td>
<td id="4_4" onclick="moveElement(this.id)" width="50" height="39">
<p align="center"><font size="1" face="Tahoma"> </font></td>
</tr>
</table>
Figurene som skal vises er i css-moden..
Og felterne er <tabellerne>, håber i forstår..
