Created
October 7, 2013 19:30
-
-
Save ss22219/6873559 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require_once 'Page.class.php'; | |
$page = new Page(array("<h3>demo is not list</h3>"), (key_exists("page", $_GET) ? $_GET["page"] : 1), 12, 1000, 8); | |
echo "Page index: <font color='red'>" . $page->getPageIndex() . "</font> PageTotal page: <font color='red'>" . $page->getTotalPage() . "</font></br >"; | |
echo "<br />page list:<br /><br />"; | |
foreach ($page->getList() as $item) { | |
echo $item . "<br />"; | |
} | |
echo "<br/>"; | |
echo "<a href='?page=1'>home</a> "; | |
foreach ($page->getPageLabels() as $label) { | |
if ($label == $page->getPageIndex()) { | |
echo "<a href='?page=" . $label . "'><font color='#ccc'>" . $label . "</font></a> "; | |
} else { | |
echo "<a href='?page=" . $label . "'>" . $label . "</a> "; | |
} | |
} | |
echo "<a href='?page=" . $page->getTotalPage() . "'>end</a> "; | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment