本文整理汇总了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) {
示例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) {
示例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) {
示例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
示例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) {