本文整理汇总了PHP中pagination::show_pagination方法的典型用法代码示例。如果您正苦于以下问题:PHP pagination::show_pagination方法的具体用法?PHP pagination::show_pagination怎么用?PHP pagination::show_pagination使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pagination
的用法示例。
在下文中一共展示了pagination::show_pagination方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: rtrim
$search_asc_desc[$key_oby] = ' DESC ';
}
$sql .= $value_oby . ' ' . $search_asc_desc[$key_oby] . ' ,';
$all_download_sql .= $value_oby . ' ' . $search_asc_desc[$key_oby] . ' ,';
}
$sql = rtrim($sql, ',');
$all_download_sql = rtrim($all_download_sql, ',');
} else {
$sql .= ' ORDER BY ' . $search_order_by . ' ' . $search_asc_desc;
$all_download_sql .= ' ORDER BY ' . $search_order_by . ' ' . $search_asc_desc;
}
}
$total_count = $class::count_all_by_sql($count_sql);
if (!empty($per_page)) {
$pagination = new pagination($pageno, $per_page, $total_count);
$pagination_statement = $pagination->show_pagination();
$sql .= " LIMIT {$per_page} ";
$sql .= " OFFSET {$pagination->offset()}";
}
$search_result = $class::find_by_sql($sql);
if (method_exists($class, 'search_add_extra_fields')) {
$class::search_add_extra_fields($search_result);
}
if (property_exists($class, 'search')) {
foreach (${$class}->search as $searchParaKey => $searchParaValue) {
$s->setProperty($searchParaKey, $searchParaValue);
}
}
$s->setProperty('result', $search_result);
$s->setProperty('_searching_class', $class);
$s->setProperty('_search_order_by', filter_input(INPUT_GET, 'search_order_by'));
示例2:
echo '</div></div>';
$cont_count++;
$fp_contnts_ai->next();
if ($fp_contnts_ai->key() == $position + $per_page) {
$cont_count = 1;
break;
}
}
?>
</div>
</div>
</div>
</div>
<div id="pagination1" style="clear: both;" class="pagination">
<?php
echo $pagination->show_pagination();
?>
</div>
<div id="footer-style-1">
<div class="container">
<div id="footer_top"></div>
</div>
</div>
<div id="copyrights">
<div class="container">
<div class="col-lg-5 col-md-6 col-sm-12">
<div class="copyright-text">
<p>
<?php
global $si;