if (!empty($_GET['page'])){ $offset = ($_GET['page'] - 1) * 50; } else { $offset = 0; } ?>
include("../dbinfo.php");
$query = "SELECT COUNT(url) AS numrows FROM archive";
$result = mysql_query($query) or die('Error, query failed');
$row = mysql_fetch_array($result, MYSQL_ASSOC);
$numrows = $row['numrows'];
$maxPage = ceil($numrows/50);
$sql = "SELECT url, title, date FROM `archive` ORDER BY date DESC LIMIT ".$offset.", 50;";
$rs = mysql_query($sql);
echo mysql_error();
$self = $_SERVER['PHP_SELF'];
$nav = '';
for($page = 1; $page <= $maxPage; $page++)
{
if ($page == $pageNum)
{
$nav .= " $page ";
}
else
{
$nav .= " $page ";
}
}
while($row = mysql_fetch_row($rs)){
echo "".$row[1]."".$row[2]."\n \n";} echo " Page: "; $self = $_SERVER['PHP_SELF']; $nav = ''; for($page = 1; $page <= $maxPage; $page++) { if ($page == $pageNum) { $nav .= " $page "; } else { $nav .= " $page "; } } echo $first . $prev . $nav . $next . $last; mysql_close(); ?> |
All Dumps 2005 - 2008 |
[ D LinkDump ]