Entrance parameter of function is the file from six elements:
$number - quantity{amount} of displayed messages on page
$start - a point of extraction from a database, t.e number{room} of the message with which begins zivlechenie the data
$pageCount - total of recordings, t.e how much all is contained with base of recordings
$andere - other parameters of the link, whether it be new variables or something else
$class - the given parameter sets appearance of links, t.e links to pages
$showLink - quantity{amount} of links on page
The first parameter can be transferred{handed} through a method $ _GET ['number'], only in the event that you want that the user could change quantity{amount} of messages on page.
The second parameter is necessarily passed in a file by a method $ _GET ['start'] as parameter $start all time varies when the user clicks under the link to page.
If, you suddenly do not want, to pass the first, third, fourth, fifth element of a file instead of them it is necessary to pass emptiness - ", without a blank between inverted commas.
As you can see function strongly expands opportunities at creation of a paginal conclusion. Now you can place the paginal conclusion to a small site of page, adjusting quantity{amount} of displayed links in parameter $showLink. All this is convenient at creation gallerej, search under the catalogue of a site or something else.
Below examples of a call of function will be resulted:
PagePrint (", $ _GET ['start'], 90 ",", 10) - All recordings in base 90, the paginal conclusion will display on ten links
PagePrint ($ _GET ['number'], $ _GET ['start'], 90, ", ", 10) - All recordings in base 90, the paginal conclusion will display on ten links and there is an opportunity to change quantity{amount} of displayed recordings on page
PagePrint ($ _GET ['number'], $ _GET ['start'], 90, '*category=1', ", 10) - All recordings in base 90, a paginal conclusion will display on ten links, is an opportunity to change quantity{amount} of displayed recordings on page and the link passes an additional variable category with value 1
PagePrint ($ _GET ['number'], $ _GET ['start'], 90, '*category=1', ' style = "color:black" ', 10) - All recordings in base 90, a paginal conclusion will display on ten links, is an opportunity to change quantity{amount} of displayed recordings on page, the link passes an additional variable category with value 1 and links to page will be black color.
I hope the explanations resulted below and comments inside function will help to understand to you with a principle of job of function.
Success in studying!

|