print("
"); switch($bsact) { case " < ": $begin -= $linesperpage; if($begin < 0) { $begin = 0; $page = 1; } else $page--; break; case " > ": $begin += $linesperpage; if($begin > ($total_rows - $linesperpage)) { $begin = $total_rows - $linesperpage; $page = $total_pages; } else $page++; break; case ">>": $begin = $total_rows - $linesperpage; $page = $total_pages; break; default: $begin = 0; $page = 1; break; } $last_row = $begin + $linesperpage; if($last_row > $total_rows) $last_row = $total_rows; print("
\n"); print("
\n"); print("
\n"); print("
\n"); print("
\n"); print("
\n"); print("
\n"); print("
\n"); print("
\n"); print("
\n"); print("
\n"); print("
"); if($total_rows > $linesperpage && $begin > 0) { print("
\n"); print("
\n"); } else print("
\n"); print("
Page $page of $total_pages
\n"); if($total_rows > $linesperpage && $begin != ($total_rows - $linesperpage)) { print("
\">\n"); print("
>\">
\n"); } else print("
\n"); print("
\n"); print("
\n"); ?>