data[0];
$query = "SELECT * FROM forum_categories WHERE `Id`='{$post['CategoryId']}'";
if($category = mysql_query_cached($query)->data[0])
{
$topic = utf8entities(stripslashes($post['Topic']));
$caturlname = utf8entities(stripslashes($category['UrlName']));
$catname = utf8entities(stripslashes($category['Name']));
echo("
");
echo(template_post($post));
$query = "SELECT * FROM forum_posts WHERE `ParentId`='{$post['Id']}'";
if($children = mysql_query_cached($query, 5))
{
foreach($children->data as $child)
{
echo(template_post($child));
}
}
echo("");
}
else
{
$var_code = ANONNEWS_ERROR_NOT_FOUND;
require("module.error.php");
}
}
else
{
$var_code = ANONNEWS_ERROR_NOT_FOUND;
require("module.error.php");
}
?>