Heey allemaal,
Na vanmiddag te hebben gewerkt en begin van de avond heb ik samen met iemand van hier ubb werkend gekregen in het hoofd bericht van een topic. Dus onderwerp ect. Maar nu krijgen we de ubb niet werkend in de reacties. Hier onder de code. Hopelijk weet iemand hoe we dit moeten doen;)
PHP
<?php
//Config bestand ophalen
include("includes/config.php");
//Standaard codes ophalen
include("includes/codes.php");
//ubb ophalen
include("ubb.php");
// Gebruiker gegevens ophalen
$admin = mysql_query("SELECT * FROM gebruikers WHERE id = '" . $_SESSION['gebruiker'] . "'");
$gebruiker = mysql_fetch_array($admin);
?>
<body>
<div id = "container">
<div id = "header">
<?php include("includes/naam.php"); ?>
<div id="inlog">
<br />
<?php include("includes/menu-boven.php"); ?>
<br/>
</div>
</div>
<div id = "menu">
<?php include("includes/menu.php"); ?>
</div>
<!-- Begin content -->
<div id= "content">
<div id= "contenttop"><h1>Topic: <? echo $_GET['id']; ?></h1></div>
<div id = "contentbg">
<div id = "contenttext">
<?php
//Gegevens ophalen
$sql = mysql_query("SELECT * FROM forum_topic WHERE titel = '" . $_GET['id'] . "'");
$a = mysql_fetch_array($sql);
$bericht = $a['bericht'];
?>
<table>
<tr><td><b><h3>Topic bericht:</h3></b></td><tr/>
<tr><td><b><font size="2">Onderwerp:</font></b></td><td><font size="2"><? echo $a['titel']; ?></font></td></tr>
<tr><td><b><font size="2">Auteur:</font></b></td><td><a href="profiel.php?id=<? echo $a['userid']; ?>"><? echo $a['userid']; ?></a></td><tr/>
<tr><td><b><font size="2">Datum:</font></b></td><td><font size="2"><? echo $a['datum']; ?></font></td><tr/>
<tr><td><b><font size="2">Bericht:</font></b></td></tr>
</table>
<table>
<tr><td><font size="2"><? echo bbhtml2($bericht); ?></font></td></tr>
</table>
<br/><br/>
<b>----------------------------------------------------------------------------------------------------------------</b>
<br/>
<a href="forum-cato.php?id=<? echo $a['fora']; ?>">Klik hier om terug te gaan naar het forum overzicht van <? echo $a['fora']; ?>!</a>
<br/><br/>
<?php
// Gesloten check
if($a['gesloten'] != "1") {
// indien ingelogd link zien.
if(isset($_SESSION['gebruiker'])) {
?>
<a href='forum-reactie.php?id=<? echo $a['titel']; ?>'><b>Klik hier om te reageren!</b></a><br/><br/>
<?php
} else {
// Niks zien indien uitgelogd
}
} else {
echo 'Dit topic is gesloten!<br/><br/>';
}
// Admin check
if($gebruiker['admin'] != "1") {
} else {
?>
<b>Admin opties:</b><br/>
<a href="forum-admin-wijzigen.php?id=<? echo $a["titel"]; ?>">Klik hier om de gegevens van dit topic te wijzigen!</a><br/>
<?php
// Gesloten check
if($a['gesloten'] != "1") { ?>
<a href="forum-admin-sluiten.php?id=<? echo $a["titel"]; ?>">Klik hier om dit topic te sluiten!</a>
<?php
} else {
?>
<a href="forum-admin-openen.php?id=<? echo $a["titel"]; ?>">Klik hier om dit topic te heropenen!</a>
<?php
}
}
?>
<br/>
<b>----------------------------------------------------------------------------------------------------------------</b>
<br/><br/>
<table>
<tr><td><b><h3>Topic reacties:</h3></b></td><tr/>
</table>
<?php
// Reacties ophalen indien ze er zijn
$reactie = mysql_query("SELECT * FROM forum_reacties WHERE titel = '" . $a['titel'] . "'");
$check = mysql_fetch_array($reactie);
// reactie check
if($a['reactie'] != "1") {
echo 'Er zijn nog geen reacties!';
} else {
//Reacties ophalen
$post = mysql_query("SELECT * FROM forum_reacties WHERE topic = '" . $a['titel'] . "'");
while($b = mysql_fetch_array($post))
{
echo '
<table style="font-family: Verdana;">
<tr><td><b><font size="2">Auteur:</font></b></td><td><font size="2">' . $b["userid"] . '</font></td></tr>
<tr><td><b><font size="2">Datum:</font></b></td><td><font size="2">' . $b["datum"] . '</font></td><tr/>
<tr><td><b><font size="2">Bericht:</font></b></td></tr>
</table>
<table>
<tr><td><font size="2">' . $b['bericht'] . '</font></td></tr>
</table>
<br/><br/>
<b>----------------------------------------------------------------------------------------------------------------</b>
<br/><br/><br/><br/>
';
}
}
?>
</div>
</div>
</div>
<!-- Einde content -->
<!-- Begin right -->
<div id= "right">
<div id= "righttop"><h2>Nieuws</h2></div>
<div id = "rightbg">
<div id = "righttext"><?php include("includes/nieuws.php"); ?>
</div>
</div>
<div class="space"></div>
<div id= "righttop"><h2>Linkpartners</h2></div>
<div id = "rightbg">
<div id = "righttext"><?php include("includes/links.php"); ?>
</div>
</div>
</div>
<!-- Einde right -->
<br/><br/><br/><br/>
<div style="clear:both"></div>
</div>
</body>
</html>
Toon Meer
Gr,