You have to seperate your if statements with brackets {}.
<?
<tr><td align=center class="cell2"><b><a href="whois.php?user=".$u["userid"]."&board=".$board."&topic=".$topic."\">".$u["username"]."</a></b></td><td class=cell2><b>Posted:</b> ".str_replace(" "," ",gmdate("n/j/Y h:i:s A",($m["messsec"]+$time_offset)))." | <a href=\"detail.php?board=".$board."&topic=".$topic."&message=".$m["messageid"]."\">Message Detail</a>
</td></tr>
<tr><td width=15% valign=top align=center class="cell1"><span style=font-size:9pt><b>".$u["level"]."</b> N/A<br>Status: N/A<br>
| # ";
if ($c < 1000)
{
echo "0";
}
if ($c < 100)
{
echo "0";
}
if ($c < 10)
{
echo "0";
}
</span></td><td width=85% valign=top class="cell1">n<tr><td class="cell1\">".stripslashes($m["messbody"])."</td></tr>\n\n
</table></td>
?>
I am not sure what you are wanting to do with the echo's.