本文整理汇总了PHP中Pagenate::getNumPages方法的典型用法代码示例。如果您正苦于以下问题:PHP Pagenate::getNumPages方法的具体用法?PHP Pagenate::getNumPages怎么用?PHP Pagenate::getNumPages使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Pagenate
的用法示例。
在下文中一共展示了Pagenate::getNumPages方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1:
$class = $class == 'row2' ? 'row1' : 'row2';
}
//end of while.
} else {
//not tickets found!!
?>
<tr class="<?php
echo $class;
?>
"><td colspan=7><strong>No se ha encontrado ningun Ticket.</strong></td></tr>
<?php
}
?>
</table>
<div class="pagination">
<ul>
<?php
if ($num > 0 && $pageNav->getNumPages() > 1) {
//if we actually had any tickets returned
?>
<li>Página:<?php
echo $pageNav->getPageLinks();
?>
</li>
<?php
}
?>
</ul>
</div>
示例2:
?>
</td>
<td> <?php
echo Format::truncate($row['email'], 40);
?>
</td>
</tr>
<?
$class = ($class =='row2') ?'row1':'row2';
} //end of while.
else: //not tickets found!! ?>
<tr class="<?php
echo $class;
?>
"><td colspan=7><b>NO tickets found.</b></td></tr>
<?
endif; ?>
</table>
</td></tr>
<tr><td>
<?
if($num>0 && $pageNav->getNumPages()>1){ //if we actually had any tickets returned?>
<tr><td style="text-align:left;padding-left:20px">page:<?php
echo $pageNav->getPageLinks();
?>
</td></tr>
<?}?>
</table>
</div>
<?
示例3:
echo $rowcount;
?>
resultados
</td>
</tr>
</tfoot>
</table>
<br>
<?php
//Inicio Billy 22/02/2016 Paginador de la auditoria//
if ($pageNav->getPage() - 1 <= 0) {
$pagea = 1;
} else {
$pagea = $pageNav->getPage() - 1;
}
if ($pageNav->getPage() + 1 >= $pageNav->getNumPages()) {
$pages = $pageNav->getNumPages();
} else {
$pages = $pageNav->getPage() + 1;
}
$primero = "auditoria.php?p=1";
$anterior = "auditoria.php?p={$pagea}";
$siguiente = "auditoria.php?p={$pages}";
$ultimo = "auditoria.php?p=" . $pageNav->getNumPages();
echo ' <div style="text-align:center;">
<a href="' . $primero . '"><span class="glyphicon glyphicon-backward"></span></a>
<a href="' . $anterior . '"><span class="glyphicon glyphicon-chevron-left"></span></a>
' . __('Page') . '' . $pageNav->getPageLinks() . '
<a href="' . $siguiente . '"><span class="glyphicon glyphicon-chevron-right"></span></a>
<a href="' . $ultimo . '"><span class="glyphicon glyphicon-forward"></span></a> </div>';
//Fin Billy 23/02/2016 paginador de la auditoria//
示例4:
} else {
echo '<tr><td colspan="9">' . __('Your query did not match any records') . '</td></tr>';
}
?>
</tbody>
</table>
<br>
<?php
if ($res && $num > 0) {
if ($pageNav->getPage() - 1 <= 0) {
$pagea = 1;
} else {
$pagea = $pageNav->getPage() - 1;
}
if ($pageNav->getPage() + 1 >= $pageNav->getNumPages()) {
$pages = $pageNav->getNumPages();
} else {
$pages = $pageNav->getPage() + 1;
}
$primero = "tickets.php?est=" . $_GET["est"] . "&sort=" . $_GET["sort"] . "&order=" . $_GET["order"] . "&p=1&des=" . $_GET["des"] . "&has=" . $_GET["has"] . "&loc=" . $_GET["loc"] . "&top=" . $_GET["top"] . "&dep=" . $_GET["dep"] . "&sta=" . $_GET["sta"] . "&a=" . $_GET["a"] . "&t=" . $_GET["t"] . "&query=" . $_GET["query"];
//Billy 12/02/2016 Se agrego al paginero el estatus
$anterior = "tickets.php?est=" . $_GET["est"] . "&sort=" . $_GET["sort"] . "&order=" . $_GET["order"] . "&p={$pagea}&des=" . $_GET["des"] . "&has=" . $_GET["has"] . "&loc=" . $_GET["loc"] . "&top=" . $_GET["top"] . "&dep=" . $_GET["dep"] . "&sta=" . $_GET["sta"] . "&a=" . $_GET["a"] . "&t=" . $_GET["t"] . "&query=" . $_GET["query"];
//Billy 12/02/2016 Se agrego al paginero el estatus
$siguiente = "tickets.php?est=" . $_GET["est"] . "&sort=" . $_GET["sort"] . "&order=" . $_GET["order"] . "&p={$pages}&des=" . $_GET["des"] . "&has=" . $_GET["has"] . "&loc=" . $_GET["loc"] . "&top=" . $_GET["top"] . "&dep=" . $_GET["dep"] . "&sta=" . $_GET["sta"] . "&a=" . $_GET["a"] . "&t=" . $_GET["t"] . "&query=" . $_GET["query"];
//Billy 12/02/2016 Se agrego al paginero el estatus
$ultimo = "tickets.php?est=" . $_GET["est"] . "&sort=" . $_GET["sort"] . "&order=" . $_GET["order"] . "&p=" . $pageNav->getNumPages() . "&des=" . $_GET["des"] . "&has=" . $_GET["has"] . "&loc=" . $_GET["loc"] . "&top=" . $_GET["top"] . "&dep=" . $_GET["dep"] . "&sta=" . $_GET["sta"] . "&a=" . $_GET["a"] . "&t=" . $_GET["t"] . "&query=" . $_GET["query"];
//Billy 12/02/2016 Se agrego al paginero el estatus
//Inicio Billy 25/01/2016 Paginador del cliente//
echo ' <div style="text-align:center;">
<a href="' . $primero . '"><span class="glyphicon glyphicon-backward"></span></a>
示例5:
<?php
}
} else {
echo '<tr><td colspan="6">' . __('Your query did not match any records') . '</td></tr>';
}
?>
</tbody>
</table>
<?php
if ($res && $num > 0) {
if ($pageNav->getPage() - 1 <= 0) {
$pagea = 1;
} else {
$pagea = $pageNav->getPage() - 1;
}
if ($pageNav->getPage() + 1 >= $pageNav->getNumPages()) {
$pages = $pageNav->getNumPages();
} else {
$pages = $pageNav->getPage() + 1;
}
$primero = "tickets.php?sort=" . $_GET["sort"] . "&order=" . $_GET["order"] . "&p=1&des=" . $_GET["des"] . "&has=" . $_GET["has"] . "&loc=" . $_GET["loc"];
$anterior = "tickets.php?sort=" . $_GET["sort"] . "&order=" . $_GET["order"] . "&p={$pagea}&des=" . $_GET["des"] . "&has=" . $_GET["has"] . "&loc=" . $_GET["loc"];
$siguiente = "tickets.php?sort=" . $_GET["sort"] . "&order=" . $_GET["order"] . "&p={$pages}&des=" . $_GET["des"] . "&has=" . $_GET["has"] . "&loc=" . $_GET["loc"];
$ultimo = "tickets.php?sort=" . $_GET["sort"] . "&order=" . $_GET["order"] . "&p=" . $pageNav->getNumPages() . "&des=" . $_GET["des"] . "&has=" . $_GET["has"] . "&loc=" . $_GET["loc"];
echo ' <div>
' . __('Page') . ':
<a href="' . $primero . '">Primero</a>
<a href="' . $anterior . '">Anterior</a>
' . $pageNav->getPageLinks() . '
<a href="' . $siguiente . '">Siguiente</a>
<a href="' . $ultimo . '">Ultimo</a>