$totalpages) { $page = $totalpages; } if ($page < 1) { $page = 1; } $pagestart = ($page - 1) * $intJournalPreviewItems; } print "\n"; // PAGE PREVIOUS AND NEXT if (!$choice) { print "\n"; print "\n"; // NUMBER PAGES print "\n"; } $i = $pagestart; if (($pagestart + $intJournalPreviewItems) > $num_rows) { $pagestop = $num_rows; } else { $pagestop = $pagestart + $intJournalPreviewItems; } while ($i < $pagestop) { $picture_id = mysql_result($result,$i,"picture_id"); $picture_name = mysql_result($result,$i,"picture_name"); $picture_title = mysql_result($result,$i,"picture_title"); $picture_date = mysql_result($result,$i,"picture_date"); $picture_comment = mysql_result($result,$i,"picture_comment"); print "\n"; print "\n"; print "\n"; ++$i; } // PAGE PREVIOUS AND NEXT if (!$choice) { print "\n"; print "\n"; // NUMBER PAGES print "\n"; } print "\n"; print "

\n"; if ($page > 1) { print " << Prev"; if ($page < $totalpages) { print " | "; } } if ($page < $totalpages) { print " Next >>"; } else { } print "\n"; print "Pages: "; for ($j = 1; $j <= $totalpages; $j++) { if ($page == $j) { print " $j"; } else { print " $j"; } } print "

$picture_title\n"; print "
" . date("F j, Y g:i a", strtotime($picture_date)) . "\n"; print "

$picture_comment


\n"; if ($page > 1) { print " << Prev"; if ($page < $totalpages) { print " | "; } } if ($page < $totalpages) { print " Next >>"; } else { } print "\n"; print "Pages: "; for ($j = 1; $j <= $totalpages; $j++) { if ($page == $j) { print " $j"; } else { print " $j"; } } print "

\n"; mysql_close($link); return; } ?>