rendered paste body<?php
$file = "connect.php";
if (!$file)
{
die ('Cannot find file: ".$file."');
}else{
include("$file");
echo "
<html>
<head>
<title>$header</title>
<link rel='stylesheet' type='text/css' href='styles/default.css'>
</head>
<body>
<center>
<a href='reply.php?id=".$_GET['id']."'>Reply to Topic</a>
<div id='border'>
<table width='760' height='' cellpadding='2' cellspacing='1' bgcolor='#000000' align='center'>
";
$sql_a = mysql_query("SELECT * FROM topics WHERE id='".$_GET['id']."'");
while ($a = mysql_fetch_array($sql_a)) {
$id = $a['id'];
$ab = $a['author'];
$m = $a['message'];
$t = $a['topic'];
$o = $a['postedon'];
echo "<tr><td width='760' height='' bgcolor='#FFFFFF' align='left' valign='top'><small><i>Started by: <b>$ab</b> on: <b>$o</b> Topic: <b>$t</b></small><hr width='98%' size='1' color='black'><p>$m</p></td></tr>";
$sql_b = mysql_query("SELECT * FROM replies WHERE uid='".$_GET['id']."'");
while ($bb = mysql_fetch_array($sql_b)) {
$id = $bb['id'];
$a = $bb['author'];
$m = $bb['message'];
$t = $bb['topic'];
$o = $bb['postedon'];
echo "<tr><td width='760' height='' bgcolor='#FFFFFF' align='left' valign='top'><small><i>Replied by: <b>$a</b> on: <b>$o</b> Topic: <b>$t</b></small><hr width='98%' size='1' color='black'><p>$m</p></td></tr>";
$m = str_replace("[code]","<table stuff here>",$m);
$m = str_replace("[/code]","</td></tr></table>",$m);
}
}
echo "</table>
</div>
</center>
</body>
</html>";
}
?>