rendered paste body<body>
<div id="container">
<div id="banner" >
<br />
<a href="index.php"><font size="7">/usr/bin/.Josh</font></a>
<br />
<br />
<div style=" word-spacing: 20px;" /><h1><a href="index.php?page=Home">Home</a> | <a href="index.php?page=Blog">Blog</a> | <a href="index.php?page=Business">Business</a> | <a href="../admin/index2.php">Admin</a></h1></div>
</div>
<?php include('sidebar.php'); ?>
<div id="content">
<h2>/usr/bin/.Blog</h2>
<?php
$page = $_GET['id'];
if(!isset($page)) $page = 1;
$max_results = 3;
$from = (($page * $max_results) - $max_results);
function paging($max_results, $page)
{
$total_results = mysql_result(mysql_query("SELECT COUNT(*) AS ID FROM `posts`"),0);
$total_pages = ceil($total_results / $max_results);
if($total_pages > 1){
echo "<div align='center'><br/>\n";
if($page > 1){
$prev = ($page - 1);
echo "<a href=\"index.php?page=Blog&id=$prev\"><< </a> \n";
}
if($page < $total_pages){
$next = ($page + 1);
echo "<a href=\"index.php?page=Blog&id=$next\"> >></a>\n";
}
echo " </b></div>\n";
}
}
$result = mysql_query("SELECT * FROM `posts` ORDER BY `ID` DESC LIMIT $from, $max_results");
while($row = mysql_fetch_assoc($result)){
?>
<ul>
<li>
<p><font size="3"><strong><a href="index.php?page=Post&id=<?php echo $row["ID"]; ?>"><?php echo $row["title"]; ?></a></strong></font> - <?php echo $row['date']; ?><p>
<p><?php echo $row['content']; ?></p></li>
</ul>
<br />
<?php } ?>
<div id="blog_footer">
<?php paging($max_results, $page) ?>
</div>
<br />
<br />
</div>