all=$all; $this->pnumber=$pnumber; $this->query=$query; $this->p=isset($_GET['p']) ? (int)$_GET['p'] : 1; if(isset($_POST['p'])){ $this->p=(int)$_POST['p'];} } function start() { $this->num_ps=ceil($this->all/$this->pnumber); if (isset($_GET['last'])) $this->p=$this->num_ps; $this->start=$this->p*$this->pnumber-$this->pnumber; if ($this->p > $this->num_ps || $this->p < 1) { $this->p=1; $this->start=0; } return $this->start; } function navi() { if ($this->num_ps<2) return ''; $buff=''; return $buff.''; } } ?>