Inherited Variables
Inherited Methods
Class Details
Pagination methods.
Handles the pagination of search results or lists with large number of returned rows. Note this class should be instantiated only after a "$db" adodb connector object has been established by an adodb instance
Tags:
- copyright - 2002,2003 Elpidio Latorilla
- version - beta 1.0.08
- author - Elpidio Latorilla
[ Top ]
Class Variables
$blkcount = 0
[line 35]
Number of rows of resulting block
Type: string
Overrides:
[ Top ]
$csx = 0
[line 25]
Current first row index
Type: string
Overrides:
[ Top ]
$max_nr = 20
[line 20]
Maximum number of rows displayed. User configurable.
Type: int
Overrides:
[ Top ]
$page = ''
[line 40]
This page name
Type: string
Overrides:
[ Top ]
$rootpath =
[line 60]
Root path of the module calling this object
Type: string
Overrides:
[ Top ]
$skey = ''
[line 45]
Internal searchkey
Type: string
Overrides:
[ Top ]
$sort_dir =
[line 55]
Sort direction, default is ascending
Type: string
Overrides:
[ Top ]
$sort_item = ''
[line 50]
Database table field to be sorted
Type: string
Overrides:
[ Top ]
$tcount = 0
[line 30]
Total available data count
Type: string
Overrides:
[ Top ]
Class Methods
Paginator
Paginator Paginator(
[int
$x = 0], string
$fwdfile, string
&$sk, string
$rootpath, string
$oitem, string
$odir)
[line 70]
Constructor
Parameters:
- int $x - Index of the first row
- string $fwdfile - Forward filename or url
- string &$sk - Search keyword (reference)
- string $rootpath - Root path
- string $oitem - Field name to sort
- string $odir - Sort direction
[ Top ]
BlockEndNr
int BlockEndNr(
)
[line 190]
Returns the real block end number.
Tags:
- access - public
Parameters:
[ Top ]
BlockStartIndex
int BlockStartIndex(
)
[line 174]
Returns the index of the first row of the block.
Tags:
- access - public
Parameters:
[ Top ]
BlockStartNr
int BlockStartNr(
)
[line 182]
Returns the real block start number. Returns start index + 1.
Tags:
- access - public
Parameters:
[ Top ]
makeNextLink
string makeNextLink(
[string
$txt = ''], [string
$append = ''])
[line 117]
Creates and returns the "Next" block link.
Tags:
- return - Complete URL link to "Next" block
- access - public
Parameters:
- string $txt - URL link text in local language
- string $append - Additional url GET variables and values
[ Top ]
makePrevLink
string makePrevLink(
[string
$txt = ''], [string
$append = ''])
[line 100]
Creates and returns the "previous" block link.
Tags:
- return - Complete URL link to "previous" block
- access - public
Parameters:
- string $txt - URL link text in local language
- string $append - Additional url GET variables and values
[ Top ]
makeSortLink
string makeSortLink(
string
$txt, string
$item, string
$oitem, string
$odir, string
$append)
[line 240]
Creates a link for sorting, improved version of SortLink().
Tags:
- return - Complete URL link for sorting the rows
- access - public
Parameters:
- string $txt - Text to display as link
- string $item - Field name to sort
- string $oitem - Previous field name used for sorting
- string $odir - Sort direction. Defaults to 'ASC' = ascending.
- string $append - Additional GET variables and values to be added to the URL link in this format: "&variable1=value1&variable2=value2"
[ Top ]
MaxCount
int MaxCount(
)
[line 152]
returns the maximal number of rows allowed for a block
Tags:
- access - public
Parameters:
[ Top ]
nextIndex
int nextIndex(
)
[line 142]
Returns the start index of the next block's row.
Tags:
- access - private
Parameters:
[ Top ]
prevIndex
int prevIndex(
)
[line 132]
Returns the start index of the previous block's row.
Tags:
- access - private
Parameters:
[ Top ]
setMaxCount
int setMaxCount(
int
$max)
[line 161]
Sets the maximal number of rows allowed for a block.
Tags:
- access - public
Parameters:
- int $max - Maximum number or returned rows
[ Top ]
setSortDirection
void setSortDirection(
string
$dir)
[line 256]
Sets the order direction.
Parameters:
- string $dir - Sort direction. Defaults to 'ASC' = ascending.
[ Top ]
setSortItem
void setSortItem(
string
$item)
[line 249]
Sets the sort order field name.
Parameters:
- string $item - Field name to sort
[ Top ]
setTotalBlockCount
void setTotalBlockCount(
[int
$c = 0])
[line 83]
Sets the total number of rows of resulting data block.
Parameters:
- int $c - Total rows in a block count
[ Top ]
setTotalDataCount
void setTotalDataCount(
[int
$c = 0])
[line 90]
Sets the total number of available rows in the table.
Parameters:
- int $c - Total available rows in the table
[ Top ]
SortLink
string SortLink(
string
$txt, string
$item, string
$dir, [boolean
$flag = FALSE], [string
$append = ''])
[line 209]
Returns a link for sorting.
Tags:
- return - Complete URL link for sorting the rows
- deprec - Prefer to use the makeSortLink() method
- access - public
Parameters:
- string $txt - Text to display as link
- string $item - Field name to sort
- string $dir - Sort direction. Defaults to 'ASC' = ascending.
- boolean $flag - Flags to show or hide the direction arrow icon.
- string $append - Additional GET variables and values to be added to the URL link in this format: "&variable1=value1&variable2=value2"
[ Top ]