diff --git a/web/html/index.php b/web/html/index.php
index 77d42b56..09e87ccc 100644
--- a/web/html/index.php
+++ b/web/html/index.php
@@ -98,7 +98,8 @@ if (!isset($_COOKIE["AURSID"])) {
print "\n";
print "
\n";
print " ";
- print " | ";
+ print "";
print "
\n";
print "\n";
print "\n";
diff --git a/web/html/pkgsearch.php b/web/html/pkgsearch.php
index 3911b858..b47ee954 100644
--- a/web/html/pkgsearch.php
+++ b/web/html/pkgsearch.php
@@ -1,5 +1,6 @@
include("aur.inc"); # access AUR common functions
+include("pkgs.inc"); # package specific functions
include("search_po.inc"); # use some form of this for i18n support
set_lang(); # this sets up the visitor's language
check_sid(); # see if they're still logged in
@@ -35,6 +36,7 @@ if ($atype && $_REQUEST["Action"] == "Something") {
# do the default thing - give the user a search form that they
# can specify: location, category, maintainer, name, 'my pkgs'
#
+ pkg_search_page();
}
print __("Under construction...")."
\n";
diff --git a/web/lang/pkgs_po.inc b/web/lang/pkgs_po.inc
new file mode 100644
index 00000000..432ee283
--- /dev/null
+++ b/web/lang/pkgs_po.inc
@@ -0,0 +1,64 @@
+
+# INSTRUCTIONS TO TRANSLATORS
+#
+# This file contains the i18n translations for a subset of the
+# Arch Linux User-community Repository (AUR). This is a PHP
+# script, and as such, you MUST pay great attention to the syntax.
+# If your text contains any double-quotes ("), you MUST escape
+# them with the backslash character (\).
+#
+
+include_once("translator.inc");
+global $_t;
+
+$_t["en"]["Category"] = "Category";
+# $_t["es"]["Category"] = "--> Traducción española aquí. <--";
+# $_t["fr"]["Category"] = "--> Traduction française ici. <--";
+# $_t["de"]["Category"] = "--> Deutsche Übersetzung hier. <--";
+
+$_t["en"]["Maintainer"] = "Maintainer";
+# $_t["es"]["Maintainer"] = "--> Traducción española aquí. <--";
+# $_t["fr"]["Maintainer"] = "--> Traduction française ici. <--";
+# $_t["de"]["Maintainer"] = "--> Deutsche Übersetzung hier. <--";
+
+$_t["en"]["Name"] = "Name";
+# $_t["es"]["Name"] = "--> Traducción española aquí. <--";
+# $_t["fr"]["Name"] = "--> Traduction française ici. <--";
+# $_t["de"]["Name"] = "--> Deutsche Übersetzung hier. <--";
+
+$_t["en"]["Per page"] = "Per page";
+# $_t["es"]["Per page"] = "--> Traducción española aquí. <--";
+# $_t["fr"]["Per page"] = "--> Traduction française ici. <--";
+# $_t["de"]["Per page"] = "--> Deutsche Übersetzung hier. <--";
+
+$_t["en"]["Popularity"] = "Popularity";
+# $_t["es"]["Popularity"] = "--> Traducción española aquí. <--";
+# $_t["fr"]["Popularity"] = "--> Traduction française ici. <--";
+# $_t["de"]["Popularity"] = "--> Deutsche Übersetzung hier. <--";
+
+$_t["en"]["Sort by"] = "Sort by";
+# $_t["es"]["Sort by"] = "--> Traducción española aquí. <--";
+# $_t["fr"]["Sort by"] = "--> Traduction française ici. <--";
+# $_t["de"]["Sort by"] = "--> Deutsche Übersetzung hier. <--";
+
+$_t["en"]["Search Criteria"] = "Search Criteria";
+# $_t["es"]["Search Criteria"] = "--> Traducción española aquí. <--";
+# $_t["fr"]["Search Criteria"] = "--> Traduction française ici. <--";
+# $_t["de"]["Search Criteria"] = "--> Deutsche Übersetzung hier. <--";
+
+$_t["en"]["Location"] = "Location";
+# $_t["es"]["Location"] = "--> Traducción española aquí. <--";
+# $_t["fr"]["Location"] = "--> Traduction française ici. <--";
+# $_t["de"]["Location"] = "--> Deutsche Übersetzung hier. <--";
+
+$_t["en"]["Keywords"] = "Keywords";
+# $_t["es"]["Keywords"] = "--> Traducción española aquí. <--";
+# $_t["fr"]["Keywords"] = "--> Traduction française ici. <--";
+# $_t["de"]["Keywords"] = "--> Deutsche Übersetzung hier. <--";
+
+$_t["en"]["Any"] = "Any";
+# $_t["es"]["Any"] = "--> Traducción española aquí. <--";
+# $_t["fr"]["Any"] = "--> Traduction française ici. <--";
+# $_t["de"]["Any"] = "--> Deutsche Übersetzung hier. <--";
+
+?>
\ No newline at end of file
diff --git a/web/lib/acctfuncs.inc b/web/lib/acctfuncs.inc
index 97b84ba5..a7c6da55 100644
--- a/web/lib/acctfuncs.inc
+++ b/web/lib/acctfuncs.inc
@@ -133,9 +133,11 @@ function display_account_form($UTYPE,$A,$U="",$T="",$S="",
print " | ";
print "";
if ($A == "UpdateAccount") {
- print " ";
+ print " ";
} else {
- print " ";
+ print " ";
}
print "";
print " | ";
@@ -372,8 +374,10 @@ function search_accounts_form() {
print "";
print " | ";
print " ";
- print " ";
- print " | ";
+ print " ";
+ print "";
print "
\n";
print "\n";
@@ -546,7 +550,8 @@ function search_results_page($UTYPE,$O=0,$SB="",$U="",$T="",
print "\n";
}
- print "";
+ print "";
print "\n";
print "";
print "";
@@ -559,7 +564,8 @@ function search_results_page($UTYPE,$O=0,$SB="",$U="",$T="",
print "\n";
}
- print "";
+ print "";
print "\n";
print " | ";
print "\n";
diff --git a/web/lib/pkgs.inc b/web/lib/pkgs.inc
new file mode 100644
index 00000000..e26d455d
--- /dev/null
+++ b/web/lib/pkgs.inc
@@ -0,0 +1,150 @@
+
+include_once("pkgs_po.inc");
+
+# grab the current list of PackageCategories
+#
+function pkgCategories() {
+ $cats = array();
+ $dbh = db_connect();
+ $q = "SELECT * FROM PackageCategories ";
+ $q.= "ORDER BY Category ASC";
+ $result = db_query($q, $dbh);
+ if ($result) {
+ while ($row = mysql_fetch_row($result)) {
+ $cats[$row[0]] = $row[1];
+ }
+ }
+ return $cats;
+}
+
+# grab the current list of PackageLocations
+#
+function pkgLocations() {
+ $locs = array();
+ $dbh = db_connect();
+ $q = "SELECT * FROM PackageLocations ";
+ $q.= "ORDER BY Location ASC";
+ $result = db_query($q, $dbh);
+ if ($result) {
+ while ($row = mysql_fetch_row($result)) {
+ $locs[$row[0]] = $row[1];
+ }
+ }
+ return $locs;
+}
+
+# display the search form in a boxSoft style
+#
+function pkg_search_page($L="",$C="",$K="",$SB="",$PP="") {
+ # L: PackageLocations.ID
+ # C: PackageCategories.ID
+ # K: Keywords
+ # SB: Sort by
+ # PP: Per page
+ $locs = pkgLocations();
+ $cats = pkgCategories();
+
+ print "\n";
+ print "\n";
+ print "\n";
+ print " \n";
+ print " ".__("Search Criteria")."\n";
+ print " | \n";
+ print "
\n";
+ print "\n";
+ print " \n";
+ print "\n";
+ print " | \n";
+ print "
\n";
+ print "
\n";
+ print "\n";
+ return;
+}
+
+# vim: ts=2 sw=2 noet ft=php
+?>