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


PHP Pager::getPageNavigation方法代码示例

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


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

示例1: engdate

            // use your $myrow array as you would with any other fetch
            #echo "City name: ".$city_name."; key: ".$key_value;
            //generate link name
            $updTitle = "";
            #echo "upd_flg: ".$upd_flg;
            #echo "page_content_count: ".$page_content_count;
            if ($total_cnt == $posted_cnt && $upd_flg == 1) {
                $updTitle = "Information updated | ";
            }
            $city_href = "<a href = \"http://" . $site_main_domain . "/" . $key_value_latin . "/\">" . $updTitle . $key_value . " (" . engdate($posted_time, 'jS \\of F, h:i:s A') . ")</a><br/>";
            $news_block = $news_block . $city_href;
        }
        $template = preg_replace("/\\[CITY_NEWS_1\\]/", $news_block, $template);
        #echo "news_block: ".$news_block."<br>";
        $pager = new Pager();
        $template = preg_replace("/\\[PAGER\\]/", $pager->getPageNavigation("/", $key_page_number, $max_page_number), $template);
        /* explicit close recommended */
        mysqli_stmt_close($stmt);
    } else {
        $template = preg_replace("/\\[CITY_NEWS_1\\]/", "<br/>No any news were found", $template);
        $template = preg_replace("/\\[PAGER\\]/", "", $template);
    }
    //fill [BREAD_CRUMBS]
    $bread_crumbs = "<a href =\"/#\">Main</a>&nbsp;";
    //
}
$key_info = array();
if ($current_page_type == "KEY_PAGE") {
    //get city page info
    #echo "page_key: ".$page_key."<br/>";
    $key_info = getKeyInfo($con, $page_key);
开发者ID:VarenKoks,项目名称:fdt-page-scrapper,代码行数:31,代码来源:index.php

示例2: while

        $news_block = "";
        $cur_news_posted_time = "";
        while (mysqli_stmt_fetch($stmt)) {
            if ($cur_news_posted_time != rusdate($posted_time, 'j %MONTH% Y')) {
                $cur_news_posted_time = rusdate($posted_time, 'j %MONTH% Y');
                $news_block = $news_block . "<br/><h3>" . $cur_news_posted_time . "</h3>";
            }
            // use your $myrow array as you would with any other fetch
            #echo "City name: ".$city_name."; key: ".$key_value;
            //generate link name
            $city_href = "<a href = \"/" . str_replace(" ", "-", $region_name_latin) . "/" . str_replace(" ", "-", $city_name_latin . " " . $key_value_latin) . ".html\">" . $anchor_name . " (" . rusdate($posted_time, 'j %MONTH% Y, G:i') . ")</a><br/>";
            $news_block = $news_block . $city_href;
        }
        $template = preg_replace("/\\[CITY_NEWS_1\\]/", $news_block, $template);
        $pager = new Pager();
        $template = preg_replace("/\\[PAGER\\]/", $pager->getPageNavigation("/" . str_replace(" ", "-", $region_name_latin) . "/", $city_news_page_number, $max_page_number), $template);
        /* explicit close recommended */
        mysqli_stmt_close($stmt);
    } else {
        $template = preg_replace("/\\[CITY_NEWS_1\\]/", "<br/>Новостей по данному региону не найдено", $template);
        $template = preg_replace("/\\[PAGER\\]/", "", $template);
    }
    //fill [BREAD_CRUMBS]
    $bread_crumbs = "<a href =\"/\">Главная</a>&nbsp;>&nbsp;<a href =\"#\">" . $region_name . "</a>&nbsp;";
    //
}
$key_info = array();
if ($current_page == "CITY_PAGE") {
    //get city page info
    $key_info = getKeyInfo($con, $url_city);
    #echo "url_city: ".$url_city."<br/>";
开发者ID:VarenKoks,项目名称:fdt-page-scrapper,代码行数:31,代码来源:index.php


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