Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Marcus Andersson
aurweb
Commits
345fbfe9
Commit
345fbfe9
authored
Jan 22, 2009
by
Loui Chang
Browse files
Only print links for up to five previous and next search results pages.
Signed-off-by:
Loui Chang
<
louipc.ist@gmail.com
>
parent
60d63cc6
Changes
1
Hide whitespace changes
Inline
Side-by-side
web/template/pkg_search_results.php
View file @
345fbfe9
...
...
@@ -142,9 +142,19 @@ for ($i = 0; $row = mysql_fetch_assoc($result); $i++) {
$currentpage
=
1
;
}
for
(
$i
=
1
;
$i
<=
$pages
;
$i
++
)
{
if
(
$currentpage
+
5
<
$pages
)
{
$pages
=
$currentpage
+
5
;
}
# Display links for more search results.
for
(
$i
=
(
$currentpage
-
5
);
$i
<=
(
$pages
);
$i
++
)
{
if
(
$i
<
1
)
{
$i
=
1
;
}
$pagestart
=
(
$i
-
1
)
*
$_GET
[
'PP'
];
if
(
$i
<>
$currentpage
)
:
$pagestart
=
(
$i
-
1
)
*
$_GET
[
'PP'
];
?>
<a
href=
'packages.php?
<?php
print
mkurl
(
'O='
.
(
$pagestart
))
?>
'
>
<?php
print
"
$i
"
?>
</a>
<?php
else
:
print
"[
$i
] "
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment