Function Code Solver

Source: Internet
Author: User
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.

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.