login  Naam:   Wachtwoord: 
Registreer je!
 Forum

Fout in tabel

Offline Drieske - 10/03/2005 17:39
Avatar van DrieskeLid Hey,

Normaal moeten alle leden onder elkaar komen te staan maar nu rkijg ik dit... http://www.d-base.net/fout.JPG

Hier is mijn code

  1. echo "<table width='100%' border='0' cellpadding='4' cellspacing='0'>
  2. <tr>
  3. <td bgcolor='#D3ECA0' width='14'></td>
  4. <td bgcolor='#D3ECA0' width='210'><b>Gebruikersnaam</b></td>
  5. <td bgcolor='#D3ECA0' width='150'><b>Aangemeld op</b></td>
  6. <td bgcolor='#D3ECA0' width='100'><b>PB</b></td>
  7. </tr>";
  8.  
  9. if(isset($_GET['letter']) AND !empty($_GET['letter'])){
  10.  
  11. $where = $_GET['letter'];
  12.  
  13. } else {
  14.  
  15. $where = "";
  16.  
  17. }
  18.  
  19. $query = mysql_query("SELECT * FROM user WHERE username LIKE '".$where."%' ORDER BY username ASC");
  20. $aantal = mysql_num_rows($query);
  21.  
  22. if($aantal == FALSE){
  23.  
  24. echo "<tr>
  25. <td width='14'></td>
  26. <td width='220'><i>Geen gebruiker(s) gevonden...</i></td>
  27. <td></td>
  28. </tr>";
  29.  
  30. } else {
  31.  
  32. while($row = mysql_fetch_assoc($query)){
  33.  
  34. $status = $row['status'];
  35.  
  36. $status = str_replace("4", "<img src='images/point_red.jpg'>", $status);
  37. $status = str_replace("3", "<img src='images/point_blue.jpg'>", $status);
  38. $status = str_replace("2", "<img src='images/point_blue.jpg'>", $status);
  39. $status = str_replace("1", "<img src='images/point_green.jpg'>", $status);
  40. $status = str_replace("0", "<img src='images/point_green.jpg'>", $status);
  41.  
  42. echo "<tr onMouseOver=\"this.style.backgroundColor='#B3E44C';this.style.cursor='hand'\"; onMouseOut=\"this.style.backgroundColor='';\" onClick=\"window.location.href='".$_SERVER['PHP_SELF']."?actie=profiel&id=".$row['userid']."'\">
  43. <td width='14'>".$status."</td>
  44. <td width='210'>".$row['username']."</td>
  45. <td width='150'>". date('d/m/Y H:i',$row['joindate']) ."</td>
  46. <td width='100' valign='left'><a href=pm.php?actie=nieuw&naar=".$row['username'].">PB Sturen</td>
  47. </tr>";
  48.  
  49. }
  50.  
  51. }
  52.  
  53. echo "</table>";
  54.  
  55. eindetabel();
  56.  
  57. } elseif($actie == "ban"){
  58. begintabel("Verbannen Leden");
  59. $query = mysql_query("SELECT * FROM leden WHERE status='0'");
  60. $aantal = mysql_num_rows($query);
  61. echo "<table width='100%' border='0' cellpadding='4' cellspacing='0'>
  62. <tr>
  63. <td bgcolor='#D3ECA0' width='14'></td>
  64. <td bgcolor='#D3ECA0' width='210'><b>Gebruikersnaam</b></td>
  65. <td bgcolor='#D3ECA0' width='150'><b>Aangemeld op</b></td>
  66. <td bgcolor='#D3ECA0' width='150'><b>Geschiedenis</b></td>
  67. </tr>";
  68. if(!$aantal){
  69. echo'<i>Er zijn geen leden verbannen!';
  70. } else {
  71. while($assoc = mysql_fetch_assoc($query)){
  72. echo "<tr onMouseOver=\"this.style.backgroundColor='#B3E44C';this.style.cursor='hand'\"; onMouseOut=\"this.style.backgroundColor='';\" onClick=\"window.location.href='".$_SERVER['PHP_SELF']."?actie=profiel&id=".$assoc['id']."'\">";
  73. echo'<td width=14><img src=images/point_green.jpg></td><td width=210><a href=ledenlijst.php?actie=profiel&id='.$assoc['id'].'>'.$assoc['gebruikersnaam'].'</a></td><td width=150>'.$assoc['aangemeldop'].'</td><td width=150><a href=geschiedenis.php?nick='.$assoc['gebruikersnaam'].'>Bekijk Geschiedenis</a><td>';
  74. echo'</tr>';
  75. }
  76. }
  77. echo'</table>';
  78. eindetabel();
  79. }
  80.  
  81. include("footer.php");
  82.  
  83. ?>

1 antwoord

Gesponsorde links
Offline delta_004 - 30/11/1999 00:00
Avatar van delta_004 Onbekend zet een enter
Gesponsorde links
Dit onderwerp is gesloten.
Actieve forumberichten
© 2002-2024 Sitemasters.be - Regels - Laadtijd: 0.179s