当前位置: 首页>>代码示例>>PHP>>正文


PHP Pager::pageList方法代码示例

本文整理汇总了PHP中Pager::pageList方法的典型用法代码示例。如果您正苦于以下问题:PHP Pager::pageList方法的具体用法?PHP Pager::pageList怎么用?PHP Pager::pageList使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Pager的用法示例。


在下文中一共展示了Pager::pageList方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: substr

    $tempquery = " where " . substr($condistion, 4);
}
$start = $p->findStart($limit);
$querycount = "select cd_id from tblcd " . $tempquery;
$count = mysql_num_rows(mysql_query($querycount));
$pages = $p->findPages($count, $limit);
if (isset($_GET['nav']) and is_numeric($_GET['nav'])) {
    $paging = "LIMIT " . $start . "," . $limit . " ";
} else {
    $paging = "LIMIT 0," . $limit . " ";
}
$orderby = "ORDER BY cd_id DESC";
$products = $prod->getListProduct($orderby, $condistion, $paging);
//echo mysql_error();
//echo $condistion;
$page_list = $p->pageList(sqlInjection($_GET['nav']), $pages);
?>
<style type="text/css">
ul.paging li a {
    background-color: #F8F8F8;
    border: 1px solid #E6E6E6;
    border-radius: 2px 2px 2px 2px;
    color: #666666;
    padding: 2px 6px;
	outline: medium none;
    text-decoration: none;
}
ul.paging li a:active {
    color: #0000CC;
}
ul.paging li a:hover, ul.paging li a.paging-active {
开发者ID:meghv999,项目名称:cdshop-php,代码行数:31,代码来源:browse.php

示例2: while

        echo "<td colspan='4' style='background-image:url(../images/danhmuc.png)' height='30'><p style='color:#FFF; font-weight:bold;  text-align:center' >Sách {$so['0']} ({$so['1']} sách)  </p></td>";
        echo "</tr>";
        $stt = 0;
        while ($row = mysqli_fetch_row($result)) {
            if ($stt % 4 == 0) {
                echo "<tr>";
            }
            echo "<td valign='top'>";
            echo "<table align='center'>";
            echo "<tr><td align='center'><p style='font-weight:bold '><a href='list_sach.php?mas={$row['0']}'><b>{$row['1']}</b></a></td></tr>";
            echo "<tr><td align='center'><img width='140' height='140' src='../data/" . $row[7] . "'></td></tr>";
            echo "<tr><td align='center'>{$row['3']}.000 VND<a href=addcart.php?item={$row['0']}><img src='../images/dathang.gif' alt='đặt hàng' width='20' height='16' align='right' ></a></td></tr>";
            echo "</table>";
            echo "</td>";
            $stt++;
            if ($stt % 4 == 0) {
                echo "</tr>";
            }
        }
        echo "</table>";
        $pagelist = $p->pageList($_GET['page'], $pages);
        echo "<table align:'center' width='100%'>";
        echo "<p align:'center'>";
        echo "<td colspan='4' style='background-image:url(../images/danhmuc.png)' height='30'><p style='color:#FFF; font-weight:bold;  text-align:center' >";
        echo "Trang: {$pagelist} ";
        echo "</p>";
        echo "</table>";
    } else {
        echo "Không có sách!";
    }
}
开发者ID:loctho1995,项目名称:Web-Bookstore,代码行数:31,代码来源:ds_sach.php

示例3: getListVoucher

function getListVoucher()
{
    $p = new Pager();
    /* Show many results per page? */
    $limit = 100;
    /* Find the start depending on $_GET['page'] (declared if it's null) */
    $start = $p->findStart($limit);
    /* Find the number of rows returned from a query; Note: Do NOT use a LIMIT clause in this query */
    $count = mysql_num_rows(mysql_query("SELECT * FROM wp_voucher_post"));
    /* Find the number of pages based on $count and $limit */
    $pages = $p->findPages($count, $limit);
    /* Now we use the LIMIT clause to grab a range of rows */
    $result = mysql_query("SELECT * FROM wp_voucher_post LIMIT " . $start . ", " . $limit);
    /* Now get the page list and echo it */
    $pagelist = $p->pageList($_GET['page'], $pages);
    echo $pagelist;
}
开发者ID:vanlong200880,项目名称:tmdt,代码行数:17,代码来源:voucher.php


注:本文中的Pager::pageList方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。