div wel afgesloten, toch verkeerd
Ik heb een klein forum, waar de reacties ook uitgehaald worden.
Nu komt de ene reactie in die erboven, dus net of er iets niet is afgesloten.
Maar dat is dus wel zo, hoe kan dat?
Code:
Code (php)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
<?php
$rQuery = mysql_query("SELECT * FROM reacties WHERE t_id = '" . mysql_real_escape_string($tFetch['id']) . "' LIMIT ".($p*$records).",".$records."") or die(mysql_error());
while($rFetch = mysql_fetch_assoc($rQuery)){
$ruQuery = mysql_query("SELECT * FROM leden WHERE id = '" . mysql_real_escape_string($rFetch['poster']) . "'") or die(mysql_error());
$ruFetch = mysql_fetch_assoc($ruQuery);
$ruOnlineQuery = mysql_query("SELECT * FROM leden WHERE id = '" . mysql_real_escape_string($rFetch['poster']) . "' AND DATE_SUB(NOW(),INTERVAL 5 MINUTE) <= laatst_online") or die(mysql_error());
if(mysql_num_rows($ruOnlineQuery) == 0){
$plaatje = 'bullet_red';
}else{
$plaatje = 'bullet_green';
}
$postCountQuery = mysql_query("SELECT * FROM reacties WHERE poster = '" . $ruFetch['id'] . "'") or die(mysql_error());
?>
<div style="width: 100%; border: 1px solid #EAEAEA; padding: 2px; background: url(http://www.falox.nl/img/forummessage.png) #FFFFFF repeat-x;" id="reaction<?php echo $rFetch['id']; ?>">
<table style="border: 0; width: 100%;">
<tr>
<td></td>
<td style="text-align: right;">
Geplaatst op <?php echo datenl($rFetch['datum']); ?>
</td>
</tr>
<tr>
<td style="width: 21%; text-align: center;" valign="top">
<strong><img src="http://www.falox.nl/img/<?php echo $plaatje; ?>.gif"> <?php echo $ruFetch['gebruikersnaam']; ?></strong><br />
<?php echo'<img style="width: 100px; height: 100px;" src="'.$ruFetch['avatar'].'"><br />'; ?><br />
Rank: <?php if($ruFetch['rang'] == 0){ echo 'Lid'; }elseif($ruFetch['rang'] == 4){ echo 'Robot'; } elseif($ruFetch['rang'] == 1){ echo '<span style="color: darkgreen; font-weight: bold;">Moderator</span>'; }elseif($ruFetch['rang'] == 2){ echo '<span style="color: red; font-weight: bold;">Beheerder</span>'; }elseif($ruFetch['rang'] == 3){ echo 'Verwijderd'; } ?><br />
Posts: <?php echo mysql_num_rows($postCountQuery); ?><br />
</td>
<td valign="top" style="background:#FFFFFF; padding: 4px;">
<?php
$raQuery = mysql_query("SELECT * FROM leden WHERE id = '" . $leden->getId() . "'") or die(mysql_error());
$raFetch = mysql_fetch_assoc($raQuery);
$rang = $raFetch['rang'];
?>
<div id="forumAction"><a href="?p=forum"e=<?php echo $rFetch['id']; ?>"><img src="http://www.falox.nl/img/comments.png" /></a></div>
<?php
}
if($rFetch['poster'] == $_SESSION['id'] or $rang > '0'){ ?><div id="forumAction"><a href="?p=forum&edit=<?php echo $rFetch['id']; ?>"><img src="http://www.falox.nl/img/edit.gif" /></a></div>
<?php
}
if($rang > '0'){
?>
<div id="forumAction"><a onclick="var c = confirm('Weet je het zeker?'); if(c == true) { delete_forumreaction(<?php echo $rFetch['id']; ?>); }"><img src="http://www.falox.nl/img/delete.gif" /></a></div>
<?php
}
?>
<br />
<br />
<?php echo ubb(stripslashes($rFetch['bericht'])); ?>
<?php if($ruFetch['bericht'] != '') { ?><br /><br />
<div style="height: 1px; width: 100%; background: #EEEEEE;"></div><br />
<?php echo ubb(stripslashes($ruFetch['bericht'])); ?>
<?php
}
?>
</td>
</tr>
</table>
</div><br />
$rQuery = mysql_query("SELECT * FROM reacties WHERE t_id = '" . mysql_real_escape_string($tFetch['id']) . "' LIMIT ".($p*$records).",".$records."") or die(mysql_error());
while($rFetch = mysql_fetch_assoc($rQuery)){
$ruQuery = mysql_query("SELECT * FROM leden WHERE id = '" . mysql_real_escape_string($rFetch['poster']) . "'") or die(mysql_error());
$ruFetch = mysql_fetch_assoc($ruQuery);
$ruOnlineQuery = mysql_query("SELECT * FROM leden WHERE id = '" . mysql_real_escape_string($rFetch['poster']) . "' AND DATE_SUB(NOW(),INTERVAL 5 MINUTE) <= laatst_online") or die(mysql_error());
if(mysql_num_rows($ruOnlineQuery) == 0){
$plaatje = 'bullet_red';
}else{
$plaatje = 'bullet_green';
}
$postCountQuery = mysql_query("SELECT * FROM reacties WHERE poster = '" . $ruFetch['id'] . "'") or die(mysql_error());
?>
<div style="width: 100%; border: 1px solid #EAEAEA; padding: 2px; background: url(http://www.falox.nl/img/forummessage.png) #FFFFFF repeat-x;" id="reaction<?php echo $rFetch['id']; ?>">
<table style="border: 0; width: 100%;">
<tr>
<td></td>
<td style="text-align: right;">
Geplaatst op <?php echo datenl($rFetch['datum']); ?>
</td>
</tr>
<tr>
<td style="width: 21%; text-align: center;" valign="top">
<strong><img src="http://www.falox.nl/img/<?php echo $plaatje; ?>.gif"> <?php echo $ruFetch['gebruikersnaam']; ?></strong><br />
<?php echo'<img style="width: 100px; height: 100px;" src="'.$ruFetch['avatar'].'"><br />'; ?><br />
Rank: <?php if($ruFetch['rang'] == 0){ echo 'Lid'; }elseif($ruFetch['rang'] == 4){ echo 'Robot'; } elseif($ruFetch['rang'] == 1){ echo '<span style="color: darkgreen; font-weight: bold;">Moderator</span>'; }elseif($ruFetch['rang'] == 2){ echo '<span style="color: red; font-weight: bold;">Beheerder</span>'; }elseif($ruFetch['rang'] == 3){ echo 'Verwijderd'; } ?><br />
Posts: <?php echo mysql_num_rows($postCountQuery); ?><br />
</td>
<td valign="top" style="background:#FFFFFF; padding: 4px;">
<?php
$raQuery = mysql_query("SELECT * FROM leden WHERE id = '" . $leden->getId() . "'") or die(mysql_error());
$raFetch = mysql_fetch_assoc($raQuery);
$rang = $raFetch['rang'];
?>
<div id="forumAction"><a href="?p=forum"e=<?php echo $rFetch['id']; ?>"><img src="http://www.falox.nl/img/comments.png" /></a></div>
<?php
}
if($rFetch['poster'] == $_SESSION['id'] or $rang > '0'){ ?><div id="forumAction"><a href="?p=forum&edit=<?php echo $rFetch['id']; ?>"><img src="http://www.falox.nl/img/edit.gif" /></a></div>
<?php
}
if($rang > '0'){
?>
<div id="forumAction"><a onclick="var c = confirm('Weet je het zeker?'); if(c == true) { delete_forumreaction(<?php echo $rFetch['id']; ?>); }"><img src="http://www.falox.nl/img/delete.gif" /></a></div>
<?php
}
?>
<br />
<br />
<?php echo ubb(stripslashes($rFetch['bericht'])); ?>
<?php if($ruFetch['bericht'] != '') { ?><br /><br />
<div style="height: 1px; width: 100%; background: #EEEEEE;"></div><br />
<?php echo ubb(stripslashes($ruFetch['bericht'])); ?>
<?php
}
?>
</td>
</tr>
</table>
</div><br />
Wie wil even kijken?
Alvast bedankt,
Kijk even in je broncode of er evenveel divs worden geopend als gesloten.
debug met Google Chrome (Ctrl + Shift + J), of firebug oid
had al gekeken, maar kan het niet vinden.
Haal anders eens je site door de w3validator heen.
Gewijzigd op 06/10/2011 13:50:44 door - Ariën -