<?php require_once 'protect.php'; ?>
<?php if ($tpags>1) { ?><div class="cleared text-center">
<?php
$reload = strtok($_SERVER["REQUEST_URI"],'?');
echo '<div class="pagination"><ul>';
if ($tpags > 1) {
echo paginate($reload, $pag, $tpags, $orderp, $varsp);
 }
echo "</ul></div>";
for ($i = $start; $i < $end; $i++) {
// make sure that PHP doesn't try to show results that don't exist
if ($i == $rows) {
break;
}
}?></div><?php } ?>