\n";
echo "| \n";
// if results of query less than the results to show per page
// then do not show back, forth and top buttons
if (pg_NumRows($result) <= $pagesize )
{ echo "\n"; }
else // begin show buttons
{
// if the value of last is not equal to pagesize then
// show backward button, one or the other will show
// along with the top button
if ($last != $pagesize)
{
echo "\n";
}
echo " | \n";
// the top button will always show along with either
// the backward or forward button(s)
echo "\n";
echo "\n";
echo " | \n";
echo "\n";
// if value of start plus page size is
// NOT greater than or equal to rows returned
// show forward button
if (!( ($start + $pagesize) >= pg_NumRows($result) ) )
{
echo "\n";
}
} // end show buttons
echo " | \n";
echo "
\n";
echo "