Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
Hi!
Can someone help me please? I got completely lost... Dunno why I can't finish my code. I've got it like:Code: Select all
if ($this->mrTotalPages > 1)
{
// read the query string
$query_string = $_SERVER['QUERY_STRING'];
// find if we have PageNo in the query string
$pos = stripos($query_string, "PageNo=");
// if there is no PageNo in the query string
// then we're on the first page
if ($pos == false)
{
$query_string .= "&PageNo=1";
$pos = stripos($query_string, "PageNo=");
}
// read the current page number from the query string
$temp = substr($query_string, $pos);
sscanf($temp, "PageNo=%d", $this->mPageNo);
// build the Next link
if ($this->mPageNo >= $this->mrTotalPages)
$this->mNextLink = "";
else
{
$new_query_string = str_replace("PageNo=" . $this->mPageNo,
"PageNo=" . ($this->mPageNo + 1), $query_string);
$this->mNextLink = "index.php?".$new_query_string;
}
// build the Previous link
if ($this->mPageNo == 1)
$this->mPreviousLink = "";
else
{
$new_query_string = str_replace("PageNo=" . $this->mPageNo,
"PageNo=" . ($this->mPageNo - 1), $query_string);
$this->mPreviousLink = "index.php?".$new_query_string;
}
}feyd | Please use
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]