本文整理汇总了PHP中Pagination::showPagination方法的典型用法代码示例。如果您正苦于以下问题:PHP Pagination::showPagination方法的具体用法?PHP Pagination::showPagination怎么用?PHP Pagination::showPagination使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Pagination
的用法示例。
在下文中一共展示了Pagination::showPagination方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1:
<div class="row users-heading-row">
<div class="col-xs-12">
<h1>Users</h1>
</div>
</div>
<div class="row users-table-row">
<div class="col-xs-12 table-responsive">
<?php
$view->showUserlist($users);
?>
</div>
</div>
<!-- pagination -->
<div class="row text-center">
<div class="col-lg-12">
<?php
$pagination->showPagination();
?>
</div>
</div> <!-- /.pagination -->
</div> <!-- /.content -->
</div> <!-- /.page row -->
<?php
include 'admin_footer.php';
示例2: function
<td>
<input type="checkbox" name="id[]" value="<?php
echo $user_data['id'];
?>
" />
</td>
</tr>
<?php
}
?>
</table>
</div>
<div class="clearfix"></div>
<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
<?php
echo $userPagination->showPagination();
?>
</div>
</div>
</form>
</div>
<!--table lay out div end-->
</body>
<script>
function update_admin(id, receive) {
$.ajax({
url: 'action_update_administrator.php?id=' + id + '&receive_email=' + receive,
type: 'GET',
success: function (rslt) {
示例3: COUNT
?>
</td>
<td style="text-align:left;"><?php
echo $leads['create_date'];
?>
</td>
</tr>
<?php
}
?>
</table>
</div>
<?php
echo $Pagination->showPagination();
?>
</div>
<?php
$today_yes = mysql_fetch_assoc(mysql_query("SELECT COUNT(*) as leads FROM " . TBL_LEADS . " WHERE lead_result='Y' AND user_id=" . $_SESSION['user_id'] . " AND DATE(`create_date`) = CURDATE()"));
$today_no = mysql_fetch_assoc(mysql_query("SELECT COUNT(*) as leads FROM " . TBL_LEADS . " WHERE lead_result='N' AND user_id=" . $_SESSION['user_id'] . " AND DATE(`create_date`) = CURDATE()"));
$week_yes = mysql_fetch_assoc(mysql_query("SELECT COUNT(*) as leads FROM " . TBL_LEADS . " WHERE lead_result='Y' AND user_id=" . $_SESSION['user_id'] . " AND YEARWEEK(`create_date`) = YEARWEEK(NOW())"));
$week_no = mysql_fetch_assoc(mysql_query("SELECT COUNT(*) as leads FROM " . TBL_LEADS . " WHERE lead_result='N' AND user_id=" . $_SESSION['user_id'] . " AND YEARWEEK(`create_date`) = YEARWEEK(NOW())"));
$month_yes = mysql_fetch_assoc(mysql_query("SELECT COUNT(*) as leads FROM " . TBL_LEADS . " WHERE lead_result='Y' AND user_id=" . $_SESSION['user_id'] . " AND MONTH(`create_date`) = MONTH(NOW())"));
$month_no = mysql_fetch_assoc(mysql_query("SELECT COUNT(*) as leads FROM " . TBL_LEADS . " WHERE lead_result='N' AND user_id=" . $_SESSION['user_id'] . " AND MONTH(`create_date`) = MONTH(NOW())"));
?>
<div class="col-lg-2 col-md-2 col-sm-2 col-xs-12">
<div id="summ" class="summary">
示例4: COUNT
<?php
require_once 'connect.php';
require_once 'class/Pagination.class.php';
// Tong So Phan Tu
$totalItems = $database->totalItem("SELECT COUNT(`id`) AS 'totalItem' FROM `user`");
// Tong So Phan Tu Xuat Hien Tren 1 Trang
$totalItemsPerPage = 1;
// So trang xuat hien
$pageRange = 5;
// Trang Hien Tai
$currentPage = isset($_GET['page']) ? $_GET['page'] : 1;
$paginator = new Pagination($totalItems, $totalItemsPerPage, $pageRange, $currentPage);
$paginationHTML = $paginator->showPagination();
$position = ($currentPage - 1) * $totalItemsPerPage;
$listPages = '';
$query[] = "SELECT `id`, `username`, CONCAT(`firstname`, ' ', `lastname`) AS fullname, `email`, `birthday`, `status`, `ordering`";
$query[] = "FROM `user`";
$query[] = "LIMIT {$position}, {$totalItemsPerPage}";
$query = implode(" ", $query);
$list = $database->listRecord($query);
$xhtml = '';
if (!empty($list)) {
$i = 0;
foreach ($list as $key => $item) {
$row = $i % 2 == 0 ? "odd" : "even";
$status = ($item['status'] = 0) ? 'Inactive' : 'Active';
$xhtml .= '<div class="row ' . $row . '">
<p class="id">' . $item['id'] . '</p>
<p class="username">' . $item['id'] . '</p>
<p class="fullname">' . $item['fullname'] . '</p>
示例5:
<td><?php
echo $leads['create_date'];
?>
</td>
<td><?php
echo $leads['user_first_name'] . ' ' . $leads['user_last_name'];
?>
</td>
<td><?php
echo $leads['agency_name'];
?>
</td>
</tr>
<?php
}
?>
</table>
</div>
<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
<?php
echo $leadsPagination->showPagination();
?>
</div>
</div>
</div>
<!--table lay out div end-->
</body>
</html>
示例6:
?>
</td>
<td class="text-center"><input type="checkbox" name="agency_id[]" value="<?php
echo $data['id'];
?>
" /></td>
</tr>
<?php
}
}
?>
</table>
</div>
<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
<?php
echo $agencyPagination->showPagination();
?>
<!-- <ul class="pagebtn">
<li><a href="#" class="activ">1</a></li>
<li><a href="#">2</a></li>
<li><a href="#">Next</a></li>
<li><a href="#">Last</a></li>
</ul>-->
</div>
</div>
</form>
</div>
<!--table2 agency lay out div end-->
</body>
</html>