Hey, Im not sure how this code would need to be modified or where it would need to go, But I did find something that might help a little
Code:
Function next2prev($count) {
global $offset, $limit;
if($count == 0) {
echo "
There are no messages to display.";
exit;
}
$prev = $offset - 10;
$newoffset = $offset + 10;
if($offset == 0) { // am I on the first page yet?
// I think I am :)
if($newoffset < $count) {
echo "<font style=\"font-family: verdana; font-size: 9pt; color: #ffffff; cursor: default;\">Previous</font> | ";
slacker_link("$PHP_SELF?BID=$BID&offset=$newoffset", 'Next');
echo "
";
} else {
echo "<font style=\"font-family: verdana; font-size: 9pt; color: #ffffff; cursor: default;\">Previous</font> | <font style=\"font-family: verdana; font-size: 9pt; color: #ffffff; cursor: default;\">Next</font>";
}
} else if($newoffset >= $count) { // am I on the first page?
// looks like Im not
// a prev link needs to be generated here
slacker_link("$PHP_SELF?BID=$BID&offset=$prev", 'Previous');
echo " | <font style=\"font-family: verdana; font-size: 9pt; color: #ffffff; cursor: default;\">Next</font>";
echo "
";
} else if($offset >= $limit) { // am I there yet?
slacker_link("$PHP_SELF?BID=$BID&offset=$prev", 'Previous');
echo " | ";
slacker_link("$PHP_SELF?BID=$BID&offset=$newoffset", 'Next');
echo "
";
}
}
Description:
This little Script build the prev- , Pages- and next- Button for a given Select-Statement.
i found it here
http://www.phpbuilder.com/snippet/detail.php?type=snippet&id=181
hope that helps a little, Maybe someone alse here would know what to do with it