diff --git a/web/lib/aur.inc b/web/lib/aur.inc
index def41c6f..f59e63a6 100644
--- a/web/lib/aur.inc
+++ b/web/lib/aur.inc
@@ -294,6 +294,7 @@ function set_lang() {
# common header
#
function html_header() {
+ global $_SERVER;
global $_COOKIE;
global $LANG;
print "\n";
@@ -332,10 +333,10 @@ function html_header() {
# XXX CSS help - a:link, a:visited, etc are defined, but I don't want to
# use the defaults. Is this the way to override them?
#
- print " ";
- print " ";
- print " ";
- print "";
+ print " ";
+ print " ";
+ print " ";
+ print "";
print " \n";
print " \n";
print " \n";
diff --git a/web/lib/pkgs.inc b/web/lib/pkgs.inc
index 47dd06a3..c11143e5 100644
--- a/web/lib/pkgs.inc
+++ b/web/lib/pkgs.inc
@@ -48,6 +48,15 @@ function pkg_search_page($L="",$C="",$K="",$SB="",$O=0,$PP=25) {
$tus = getTrustedUsers();
$dbh = db_connect();
+ if ($O) {
+ $OFFSET = intval($O);
+ } else {
+ $OFFSET = 0;
+ }
+ if ($OFFSET < 0) {
+ $OFFSET = 0;
+ }
+
print "
\n";
print "\n";
print "\n";
@@ -191,13 +200,15 @@ function pkg_search_page($L="",$C="",$K="",$SB="",$O=0,$PP=25) {
$q.= "ORDER BY Name ASC, LocationID ASC, CategoryID ASC ";
break;
}
- $q.= "LIMIT ".intval($O).", ".intval($PP);
+ $q.= "LIMIT ".$OFFSET.", ".intval($PP);
$result = db_query($q, $dbh);
if (!$result) {
- print $q."
\n";
print __("No packages matched your search criteria.");
- } else {
+ } elseif (!mysql_num_rows($result)) {
+ print __("No packages matched your search criteria.");
+
+ } else {
# print out package search results
#
print "\n";
@@ -252,7 +263,44 @@ function pkg_search_page($L="",$C="",$K="",$SB="",$O=0,$PP=25) {
}
print "
\n";
+ print " \n";
+ print "\n";
+ print "\n";
+ print "
\n";
+ print "\n";
+ print "\n";
+ print " \n";
+ print " \n";
+ print " \n";
+ print " ";
+ print " \n";
+ print " | \n";
+ print " ";
+ print " \n";
+ print " | \n";
+ print " \n";
+ print " \n";
print " | \n";
print "
\n";
print "
\n";