function multi ($num, $perpage, $curpage, $mpurl, $maxpages = 0, $page = ten, $autogoto = False, $simple = false, $jsfunc = FALSE)
{
return $num > $perpage? Helper_page::multi ($num, $perpage, $curpage, $mpurl, $maxpages, $page, $autogoto, $simple, $jsfunc): ";
}
Please explain in detail the meaning of the above function code, thank you!
Reply to discussion (solution)
No context, no explanation
function related context:
if (!defined (' In_discuz ')) {
exit (' Access Denied ');
}
$page =$_get[' page ']?$_get[' page ']:0;
$perpage = 30;
$start = ($page-1) * $perpage;
$statusarr =array (0=> ',2=> ' ended ' in the ',1=> ' auction);
$mpurl = ' home.php?mod=auction&ac=auctions ';
$perpages = Array ($perpage = = ' selected ');
$bidauc =c::t (' Auction_bidden ')->fetch_distinct_atnid (' uid= '. $_g[' uid '), ' ORDER by inputtime Desc ', $start, $ Perpage);
foreach ($bidauc as $key = + $value)
{
$warr []= $value [' Atnid '];
}
$aucclouse =implode (', ', $warr);
//die ($aucclouse. " AAA ");
$auclist =c::t (' auction_inauctions ')->fetch_all_by_sql (' ID in ('. $aucclouse. ') ');
$count =c::t (' Auction_bidden ')->fetch_distinct_atnid (' uid= '. $_g[' uid '), ' ', ' ', ' ', 1 ';
$multipage = multi ($count, $perpage, $page, $mpurl);
Include template (' home/auction_bidauctions ');
Discuz the use of multi for paging functions
The multi function in the Function_core file is a paging function, which is prototyped as follows:
multi ($num, $perpage, $curpage, $mpurl, $maxpages = 0, $page = ten, $autogoto = False, $simple = False)
which
Total number of $num records,
$perpage shows the number of records per page,
$curpage the current page number,
$mpurl the URL of the page if "?" exists in the URL. , followed by "&page=3" (3 is the number of pages), there is no "?" Add "? page=4" (4 is the number of pages),
$maxpages = three-digit 0 position,
$page = 10 displays several pages at a time.
The other three can not be filled.