<br>
<br>
<?php <br />
<br>
class
pagediv <br>
{ <br>
public
$part1
; <br>
public
$part2
; <br>
public
$part3
; <br>
public
$part4
; <br>
public
$part5
; <br>
<br>
<br>
<br>
public
$allPage
;
public
$allRocords
;
public
$perPage
;
public
$showPagesNo
;
public
$currentPage
;
public
$urlModel
;
<br>
public
$startHidden
;
public
$endHidden
;
<br>
public
function
__construct(
$allRocords
,
$perPage
,
$showPagesNo
,
$currentPage
,
$urlModel
){ <br>
$this
->allRocords =
$allRocords
; <br>
$this
->perPage =
$perPage
; <br>
$this
->showPagesNo =
$showPagesNo
; <br>
$this
->currentPage =
$currentPage
; <br>
$this
->urlModel =
$urlModel
; <br>
$this
->allPage =
$this
->getAllPage(); <br>
<br>
$this
->startHidden =
$this
->getInt((
$this
->showPagesNo)/2);
$this
->endHidden =
$this
->allPage -
$this
->startHidden;
} <br>
<br>
public
function
getUrl(
$_index
=
''
){ <br>
$_current
=
$_index
; <br>
if
(
$_index
==
'pre'
)
$_current
=
$this
->currentPage -1; <br>
if
(
$_index
==
'next'
)
$_current
=
$this
->currentPage+1; <br>
if
(
$_index
==
''
)
$_current
=
$this
->allPage; <div
class
=
"clear"
>
</div>