$total = CountList ($type);
$last = $next + $lines < $total ? $next + $lines : $total;
-$last_page = floor ($total / $lines);
+$last_page = floor ($total / $lines) + 1;
$this_page = $next / $lines + 1;
?>
</head>
print "<input type=hidden name=next value=$next>";
print "Page: <select name=page onChange=\"ChangePage(this.value,'$type','$lines');\"";
for ($i = 0; $i <= $last_page; $i++) {
- if ($i == ($this_page - 1)) {
+ if ($i == ($this_page)) {
print "<option selected>$i</option>";
} else {
print "<option>$i</option>";
} // if
} // for
print "</select>";
+ //print "next: $next last_page: $last_page";
print " of <a href=\"/maps/php/list.php?type=$type&next=" .
- $last_page * $lines . "\">$last_page</a>";
+ ($last_page - 1) * $lines . "\">$last_page</a>";
?>
</div>
<div class="toolbar" align="center">
</table>
<br>
+ </form>
<div align=center>
<a href="/maps/bin/exportlist.cgi?type=<?php echo $type?>">
<input type=submit name=export value="Export List"></a>
<a href="/maps/bin/importlist.cgi?type=<?php echo $type?>">
<input type=submit name=import value="Import List"></a>
</div>
- </form>
<?php copyright (2001)?>
</body>