2017 © Pedro Peláez
 

library pagination

简单分页组件

image

aweitian/pagination

简单分页组件

  • Wednesday, July 11, 2018
  • by awei.tian
  • Repository
  • 1 Watchers
  • 0 Stars
  • 41 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 5 Versions
  • 52 % Grown

The README.md

pagination

$page = new Pagination(110, 2, 7, 5);

getCurPageNum()} / {$page->getMaxPage()}   ";?>

hasPre()):?> 
    <a class="pre" href='?page=<?php print $page->getPre()?>'>
        << <?php print $page->getPre()?>
    </a>


getPageBtnLen(); $i++) :?>
    <a href='?page=<?php print $page->getStartPage() + $i?>' class='<?php if($page->getStartPage() + $i == $page->getCurPageNum()):?>current<?php endif?>'>
        <?php print $page->getStartPage() + $i?>
    </a>



hasNext()):?> 
    <a class="next" href='?page=<?php print $page->getNext()?>'>
        >> <?php print $page->getNext()?>
    </a>

ellipsis

hasEllipsis()): ?>
    <?php $i = 1; ?>
    <a<?php if ($i == $page->getCurrent()): ?> class="current"<?php endif ?> href="?<?php $tmp_get = $_GET;
    $tmp_get['page'] = $i;
    print http_build_query($tmp_get) ?>">
        <?php print $i ?>
    </a>
    <?php if ($page->hasPreEllipsis()): ?>
        <a>...</a>
    <?php endif ?>
    <?php for ($i = $page->getStartNum(); $i <= $page->getRearNum(); $i++): ?>
        <a<?php if ($i == $page->getCurrent()): ?> class="current"<?php endif ?> href="?<?php $tmp_get = $_GET;
        $tmp_get['page'] = $i;
        print http_build_query($tmp_get) ?>">
            <?php print $i ?>
        </a>
    <?php endfor ?>
    <?php if ($page->hasRearEllipsis()): ?>
        <a>...</a>
    <?php endif ?>
    <?php $i = $page->getTotal(); ?>
    <a<?php if ($i == $page->getCurrent()): ?> class="current"<?php endif ?> href="?<?php $tmp_get = $_GET;
    $tmp_get['page'] = $i;
    print http_build_query($tmp_get) ?>">
        <?php print $i ?>
    </a>


    <?php for ($i = 1; $i <= $page->getTotal(); $i++): ?>
        <a<?php if ($i == $page->getCurrent()): ?> class="current"<?php endif ?> href="?<?php $tmp_get = $_GET;
        $tmp_get['page'] = $i;
        print http_build_query($tmp_get) ?>">
            <?php print $i ?>
        </a>
    <?php endfor ?>

The Versions

11/07 2018

dev-master

9999999-dev https://github.com/aweitian/pagination

简单分页组件

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

by aweitian

config aweitian

11/07 2018

v1.1.4

1.1.4.0 https://github.com/aweitian/pagination

简单分页组件

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

by aweitian

config aweitian

09/07 2018

v1.1.3

1.1.3.0 https://github.com/aweitian/pagination

简单分页组件

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

by aweitian

config aweitian

09/07 2018

v1.1.2

1.1.2.0 https://github.com/aweitian/pagination

简单分页组件

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

by aweitian

config aweitian

17/03 2018

v1.1.1

1.1.1.0 https://github.com/aweitian/pagination

简单分页组件

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

by aweitian

config aweitian