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


PHP Pagination::GetURL方法代码示例

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


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

示例1: Pagination

    if (!empty($_GET['search'])) {
        $like = $db->Escape(trim($_GET['search']));
        $query_string['search'] = $like;
        $query .= " AND comments LIKE '%{$like}%'";
        $sub_header = "Search Results for: <em>{$like}</em>";
    }
}
// Retrieve total count
$query .= " ORDER BY comment_id DESC";
$result_count = $db->Query($query);
$total = $db->Count($result_count);
// Initialize pagination
$url .= !empty($query_string) ? '?' . http_build_query($query_string) : '';
$pagination = new Pagination($url, $total, $records_per_page, false);
$start_record = $pagination->GetStartRecord();
$_SESSION['list_page'] = $pagination->GetURL();
// Retrieve limited results
$query .= " LIMIT {$start_record}, {$records_per_page}";
$result = $db->Query($query);
// Output Header
include 'header.php';
?>

<div id="comments">

    <h1><?php 
echo $header;
?>
</h1>
    <?php 
if ($sub_header) {
开发者ID:KmServer,项目名称:CumulusClips,代码行数:31,代码来源:comments.php

示例2: Pagination

    if (!empty($_GET['search'])) {
        $like = $db->Escape(trim($_GET['search']));
        $query_string['search'] = $like;
        $query .= " AND title LIKE '%{$like}%' OR content LIKE '%{$like}%'";
        $sub_header = "Search Results for: <em>{$like}</em>";
    }
}
// Retrieve total count
$query .= " ORDER BY page_id DESC";
$result_count = $db->Query($query);
$total = $db->Count($result_count);
// Initialize pagination
$url .= !empty($query_string) ? '?' . http_build_query($query_string) : '';
$pagination = new Pagination($url, $total, $records_per_page, false);
$start_record = $pagination->GetStartRecord();
$_SESSION['list_page'] = $pagination->GetURL();
// Retrieve limited results
$query .= " LIMIT {$start_record}, {$records_per_page}";
$result = $db->Query($query);
// Output Header
include 'header.php';
?>

<div id="pages">

    <h1><?php 
echo $header;
?>
</h1>
    <?php 
if ($sub_header) {
开发者ID:KmServer,项目名称:CumulusClips,代码行数:31,代码来源:pages.php

示例3: Pagination

    if (!empty($_GET['search'])) {
        $like = $db->Escape(trim($_GET['search']));
        $query_string['search'] = $like;
        $query .= " AND username LIKE '%{$like}%'";
        $sub_header = "Search Results for: <em>{$like}</em>";
    }
}
// Retrieve total count
$query .= " ORDER BY user_id DESC";
$result_count = $db->Query($query);
$total = $db->Count($result_count);
// Initialize pagination
$url .= !empty($query_string) ? '?' . http_build_query($query_string) : '';
$pagination = new Pagination($url, $total, $records_per_page, false);
$start_record = $pagination->GetStartRecord();
$_SESSION['list_page'] = $pagination->GetURL();
// Retrieve limited results
$query .= " LIMIT {$start_record}, {$records_per_page}";
$result = $db->Query($query);
// Output Header
include 'header.php';
?>

<div id="members">

    <h1><?php 
echo $header;
?>
</h1>
    <?php 
if ($sub_header) {
开发者ID:KmServer,项目名称:CumulusClips,代码行数:31,代码来源:members.php

示例4: Pagination

} else {
    if (!empty($_GET['search'])) {
        $like = $db->Escape(trim($_GET['search']));
        $query_string['search'] = $like;
        $query .= " AND username LIKE '%{$like}%'";
        $sub_header = "Search Results for: <em>{$like}</em>";
    }
}
// Retrieve total count
$result_count = $db->Query($query);
$total = $db->Count($result_count);
// Initialize pagination
$url .= !empty($query_string) ? '?' . http_build_query($query_string) : '';
$pagination = new Pagination($url, $total, $records_per_page, false);
$start_record = $pagination->GetStartRecord();
$_SESSION['list_page'] = $pagination->GetURL();
// Retrieve limited results
$query .= " LIMIT {$start_record}, {$records_per_page}";
$result = $db->Query($query);
// Output Header
include 'header.php';
?>

<div id="flags">

    <h1><?php 
echo $header;
?>
</h1>

    <?php 
开发者ID:KmServer,项目名称:CumulusClips,代码行数:31,代码来源:flags.php

示例5: Pagination

    if (!empty($_GET['search'])) {
        $like = $db->Escape(trim($_GET['search']));
        $query_string['search'] = $like;
        $query .= " AND title LIKE '%{$like}%'";
        $sub_header = "Search Results for: <em>{$like}</em>";
    }
}
// Retrieve total count
$query .= " ORDER BY video_id DESC";
$result_count = $db->Query($query);
$total = $db->Count($result_count);
// Initialize pagination
$url .= !empty($query_string) ? '?' . http_build_query($query_string) : '';
$pagination = new Pagination($url, $total, $records_per_page, false);
$start_record = $pagination->GetStartRecord();
$_SESSION['list_page'] = $pagination->GetURL();
// Retrieve limited results
$query .= " LIMIT {$start_record}, {$records_per_page}";
$result = $db->Query($query);
// Output Header
include 'header.php';
?>

<div id="videos">

    <h1><?php 
echo $header;
?>
</h1>
    <?php 
if ($sub_header) {
开发者ID:KmServer,项目名称:CumulusClips,代码行数:31,代码来源:videos.php


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