本文整理汇总了PHP中Pagination::previous方法的典型用法代码示例。如果您正苦于以下问题:PHP Pagination::previous方法的具体用法?PHP Pagination::previous怎么用?PHP Pagination::previous使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Pagination
的用法示例。
在下文中一共展示了Pagination::previous方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: username
<th align="left">Subject</th>
<th class="center">Autor</th>
<th class="center">Replies</th>
<th>Date</th>
</tr>
</thead>
<tfoot>
<tr>
<td colspan="5">
<span>Showing <?php
echo $nav->info('{start} - {end} of {total}');
?>
threads</span>
<?php
echo $nav->first(' <a href="' . $link . '">First</a> ', ' <strong>First</strong> ');
echo $nav->previous(' <a href="' . $link . '">«</a> ', ' <strong>«</strong> ');
echo $nav->numbers(' <a href="' . $link . '">{nr}</a> ', ' <strong>{nr}</strong> ');
echo $nav->next(' <a href="' . $link . '">»</a> ', ' <strong>»</strong> ');
echo $nav->last(' <a href="' . $link . '">Last</a> ', ' <strong>Last</strong> ');
?>
</td>
</tr>
</tfoot>
<tbody>
<?php
foreach ($topics as $topic) {
# This code limits the returned results to fit the navigation
if ($nav->paginator()) {
echo '<tr>
<td> <img src="css/images/icons/knewstuff.png"> <strong><a class="title" href="topic.php?id=' . $topic->id . '">' . $topic->title . '</a></strong></td>
<td class="center"><font color="#FF0000">' . username($topic->author) . '</font></td>
示例2: die
<?php
include 'config.php';
$max = 6;
$select = "SELECT * FROM test";
$query1 = mysql_query($select) or die(mysql_error());
$total = mysql_num_rows($query1);
$nav = new Pagination($max, $total);
$query2 = mysql_query($select . " LIMIT " . $nav->start() . "," . $max) or die(mysql_error());
while ($item = mysql_fetch_object($query2)) {
echo $item->id . ' - <b>' . $item->name . '</b><br />';
}
$link = 'dutch.php?p=';
//echo $nav->first(' <a href="'.$link.'{nr}">First</a> | ');
echo $nav->previous(' <a href="' . $link . '{nr}">Vorige</a> | ');
echo $nav->numbers(' <a href="' . $link . '{nr}">{nr}</a> | ', ' <b>{nr}</b> | ');
echo $nav->next(' <a href="' . $link . '{nr}">Volgende</a> | ');
//echo $nav->last(' <a href="'.$link.'{nr}">Last</a>');
echo $nav->info('Pagina {page} van de {pages} ');
示例3: die
margin-left:10px;
text-decoration:none;
background-color:#F5F5F5;
color:#D7D7D7;
cursor:default;
}
#embed {
padding-top:7px;
}
</style>
Note: This CSS design is freely available here:<a href="http://www.thewebhelp.com/css/pagination-style-template/">Pagination Style Template</a><br />
And does not belong to me. All credit for the design goes to this author.<br />
<br />
<?php
include 'config.php';
$max = 6;
$select = "SELECT * FROM test";
$query1 = mysql_query($select) or die(mysql_error());
$total = mysql_num_rows($query1);
$nav = new Pagination($max, $total);
$query2 = mysql_query($select . " LIMIT " . $nav->start() . "," . $max) or die(mysql_error());
while ($item = mysql_fetch_object($query2)) {
echo $item->id . ' - <b>' . $item->name . '</b><br />';
}
$link = 'customdesign.php?p=';
echo '<div id="tnt_pagination">';
echo $nav->first('<a href="' . $link . '{nr}">First</a>') . $nav->previous('<a href="' . $link . '{nr}">« prev</a>');
echo $nav->numbers('<a href="' . $link . '{nr}">{nr}</a>', '<span class="active_tnt_link">{nr}</span>');
echo $nav->next('<a href="' . $link . '{nr}">Next »</a>') . $nav->last('<a href="' . $link . '{nr}">Last</a>') . $nav->info('<br /><div id="embed"><span class="active_tnt_link">Result {start} to {end} of {total}</span>') . $nav->info('<span class="active_tnt_link">Page {page} of {pages}</span></div>');
echo '</div>';
示例4: die
<?php
include 'config.php';
$max = 6;
$select = "SELECT * FROM test";
$query1 = mysql_query($select) or die(mysql_error());
$total = mysql_num_rows($query1);
$nav = new Pagination($max, $total);
$nav->page = $_GET['p'];
$query2 = mysql_query($select . " LIMIT " . $nav->start() . "," . $max) or die(mysql_error());
while ($item = mysql_fetch_object($query2)) {
echo $item->id . ' - <b>' . $item->name . '</b><br />';
}
$nav->url = 'alloptions.php?p=';
echo $nav->first(' <a href="{url}{nr}"><<</a> | ', ' << | ');
echo $nav->previous(' <a href="{url}{nr}">Previous</a> | ', ' Previous | ');
echo $nav->numbers(' <a href="{url}{nr}">{nr}</a> | ', ' <b>{nr}</b> | ');
echo $nav->next(' <a href="{url}{nr}">Next</a> | ', ' Next | ');
echo $nav->last(' <a href="{url}{nr}">>></a> | ', ' >> | ');
echo $nav->info('Result {start} to {end} of {total} - ');
echo $nav->info('Page {page} of {pages} ');
示例5: die
<base href="http://demo.reconnect-inc.com/pagination/seo/">
<?php
include 'config.php';
$max = 6;
$select = "SELECT * FROM test";
$query1 = mysql_query($select) or die(mysql_error());
$total = mysql_num_rows($query1);
$nav = new Pagination($max, $total);
$query2 = mysql_query($select . " LIMIT " . $nav->start() . "," . $max) or die(mysql_error());
while ($item = mysql_fetch_object($query2)) {
echo $item->id . ' - <b>' . $item->name . '</b><br />';
}
$link = './page-{nr}/';
echo $nav->previous(' <a href="' . $link . '">Previous</a> | ');
echo $nav->numbers(' <a href="' . $link . '">{nr}</a> | ', ' <b>{nr}</b> | ');
echo $nav->next(' <a href="' . $link . '">Next</a> | ');