All pastes #477435 Raw Edit

Stuff

public text v1 · immutable
·published 2007-05-08 17:23 UTC
rendered paste body
<?
include("bbcode.php");
$query = mysql_query("SELECT TOP 5 * FROM news ORDER by id DESC");
while($r = mysql_fetch_array($query)){
	$content = bbcode($r['content']);
	echo '<table align="center" class="content" cellspacing="0" cellpadding="0">
	<tr>
	<td>
	<h3>News and Such:</h3>
	<table width="440" align="center">
	<tr>
	<td>
	<span style="font-size: 12px;"><strong><u>'.$r['subject'].'</u></strong></span> - Written by '.$r['wroteby'].' at '.$r['wrotedate'].'<br /><br />
	'.$content.'
	</td>
	</tr>
	</table>
	</td>
	</tr>
	</table><br />';
	$arenews = 1;
}
if ($arenews != 1){
echo '<table align="center" class="content" cellspacing="0" cellpadding="0">
	<tr>
	<td>
	<h3>News and Such:</h3>
	<table width="440" align="center">
	<tr>
	<td>
	<center><strong>No News.</strong></center>
	</td>
	</tr>
	</table>
	</td>
	</tr>
	</table><br />';
}
?>