hello , i have problem with msgs script ,,
the problem is when i want go to the next page ,, i chose the next page but i still in same page ,,
http://www.4bbm.net/msgs/index.php?cat=msgs&catid=2
that is my problem you can now go to the last in this link then chose any page and you understand what i mean ,,
this code from pager.php
<?
$cat=$_GET['cat'];
$PHP_SELF=$_SERVER[PHP_SELF];
class Pager
{
var $start;
var $page;
var $numrows;
var $perpage;
var $pagelink;
var $catid;
var $cat;
function Pager($_start,$_page, $_pagelink='')
{
$this->start = $_start;
$this->page = $_page;
$this->pagelink = $_pagelink;
}
function SetPagerN($_perpage,$_numrows)
{
$this->perpage = $_perpage;
$this->numrows = $_numrows;
}
function PageNum()
{
global $catid,$cat,$htmllink,$PHP_SELF,$cid,$pag,$CATN,$page;
if((isset($this->pagelink))&&($this->pagelink!=''))
{
$this->pagelink = $this->pagelink."&";
}
if ($this->numrows>$this->perpage)
{
$pagenum = "<p align=center>الصفحات : ";
if($this->page > 2)
{
if($htmllink==on){
$pagenum .= " ... <a title=\"$CATN\" href=showmsgs-$catid-0-1.html>[1]</a> ... \n";
} else {
$pagenum .= "<a title=\"$CATN\" href=$PHP_SELF?".$this->pagelink."catid=$catid&cat=$cat&start=0&page=1>[1]</a> ... \n";
}
}
$this->pages = ceil($this->numrows/$this->perpage);
if($this->page == 0)
{
$this->page = 1;
}
if($this->page > 0)
{
$this->page = $this->page - 1;
}
$this->maxpage = $this->page + 3 ;
for ($i = $this->page ; $i <= $this->maxpage && $i <= $this->pages ; $i++)
{
if($i > 0)
{
$this->nextpag = $this->perpage*($i-1);
if ($this->nextpag == $this->start)
{
$pagenum .= "<font size=2 face=tahoma><b>$i</b></font> \n";
}
else
{
if($htmllink==on){
$pagenum .= "<a title=\"$CATN الصفحة $i\" href=showmsgs-$catid-$this->nextpag-$i.html>[$i]</a> \n";
}else {
$pagenum .= "<a title=\"$CATN الصفحة $i \" href=$PHP_SELF?".$this->pagelink."catid=$catid&cat=$cat&start=$this->nextpag&page=$i>[$i]</a> \n";
}
}
}
}
if (! ( ($this->start/$this->perpage) == ($this->pages - 1) ) && ($this->pages != 1) )
{
$this->nextpag = ($this->pages*$this->perpage)-$this->perpage;
if($htmllink==on){
$pagenum .= " ... <a title=\"$CATN الصفحة $this->pages \" href=showmsgs-$catid-$this->nextpag-$this->pages.html>[$this->pages]</a>\n";
} else {
$pagenum .= " ... <a title=\"$CATN الصفحة $this->pages \" href=$PHP_SELF?".$this->pagelink."catid=$catid&cat=$cat&start=$this->nextpag&page=$this->pages>[$this->pages]</a>\n";
}
}
$pagenum .= "</p>";
}
return $pagenum;
}
}
?>
thank you so much