Today's page class is written ... Share _php Tutorials

Source: Internet
Author: User
Tags vars
Because it is written at work, so if all by the department posted out I am afraid of the company, so I put the form to delete it. Oh, don't be offended. The format is the standard PHP code:--------------------------------------------------------------------------------/********** | +--------------------------------------------------- | CLASS Name:pagebar | +--------------------------------------------------- | Author:arvan [e-mail:arvan@5n9.com qq:8817776] | Create DATE:2003-7-17 | Note: | Do for pagination | +--------------------------------------------------- | Warning:no ... | +---------------------------------------------------**********/class Pagebar {var $total; var $onepage; var $num; var $ PageCount; var $total _page; var $offset; var $linkhead; function Pagebar ($total, $onepage, $form _vars=) {$pagecount = $_get[pagecount]; $this->total = $total; $this-&GT;ONEP age = $onepage; $this->total_page = ceil ($total/$onepage); if (empty ($pagecount)) {$this->pagecount = 1; $this->offset = 0;} else {$this->pagecount = $pagecount; $this-& Gt;offset = ($pagecount-1) * $onepage; } if (!Empty ($form _vars)) {$vars = explode ("|", $form _vars), $chk = $vars [0]; $chk _value = $_post[$chk]; if (empty ($chk _value)) {$formlink = "";} else {for ($i =0; $i Linkhead = $_server[php_self]. "?". $formlink; } else {$this->linkhead = $_server[php_self]. "?". $linkft. $formlink; }} #End function Pagebar (); function offset () {return $this->offset;} #End function offset (); function Pre_page ($char =) {$linkhead = $this->linkhead; $pagecount = $this->pagecount; if (empty ($char)) {$char = "[<]"; if ($pagecount >1) {$pre _page = $pagecount-1; return "$char";} else {return;}} #End function Pre_page (); function Next_page ($char =) {$linkhead = $this->linkhead; $total _page = $this->total_page; $pagecount = $this->p Agecount; if (empty ($char)) {$char = "[

http://www.bkjia.com/PHPjc/532181.html www.bkjia.com true http://www.bkjia.com/PHPjc/532181.html techarticle because it is written at work, so if all by the department posted out I am afraid of the company, so I put the form to delete it. Oh, don't be offended. The format is more standard ...

  • 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.