cvs: pearweb /public_html search.php
| From: | Richard Heyes | Date: | Tue, 15 Jan 2002 03:45:54 +0000 |
| Subject: | cvs: pearweb /public_html search.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-1941@lists.php.net to get a copy of this message | ||
heyesr Mon Jan 14 22:45:54 2002 EDT
Modified files:
/pearweb/public_html search.php
Log:
* Added ability to search packages from headers search bar
Index: pearweb/public_html/search.php
diff -u pearweb/public_html/search.php:1.2 pearweb/public_html/search.php:1.3
--- pearweb/public_html/search.php:1.2 Sun Sep 16 10:35:50 2001
+++ pearweb/public_html/search.php Mon Jan 14 22:45:54 2002
@@ -1,37 +1,42 @@
-<?php
-/**
- * Search interface for the PEAR website
- *
- * $Id: search.php,v 1.2 2001/09/16 14:35:50 mj Exp $
- */
-if (!isset($HTTP_POST_VARS['search_in'])) {
- response_header("Search");
- echo "<h2>Search</h2>\n";
- echo "<font color=\"#990000\"><b>Please use the search system via
the search form above.</b></font>\n";
- response_footer();
- exit();
-}
-
-switch ($HTTP_POST_VARS['search_in']) {
-
- case "pear-dev" :
- case "pear-cvs" :
- case "pear-general" :
- /**
- * We forward the query to the mailing list archive
- * at marc.thaimsgroup.com
- */
- $location = "http://marc.theaimsgroup.com/";
- $query =
"l=".$HTTP_POST_VARS['search_in']."&w=2&r=1&q=b&s=".urlencode($HTTP_POST_VARS['search_string']);
- header("Location: ".$location."?".$query);
-
- break;
-
- default :
- response_header("Search");
- echo "<h2>Search</h2>\n";
- echo "<font color=\"#990000\"><b>Invalid search
target.</b></font>\n";
- response_footer();
- break;
-}
-?>
+<?php
+/**
+ * Search interface for the PEAR website
+ *
+ * $Id: search.php,v 1.3 2002/01/15 03:45:54 heyesr Exp $
+ */
+if (!isset($HTTP_POST_VARS['search_in'])) {
+ response_header("Search");
+ echo "<h2>Search</h2>\n";
+ echo "<font color=\"#990000\"><b>Please use the search system via
the search form above.</b></font>\n";
+ response_footer();
+ exit();
+}
+
+switch ($HTTP_POST_VARS['search_in']) {
+
+ case "packages":
+ header('Location:
/package-search.php?pkg_name='.urlencode($HTTP_POST_VARS['search_string']).'&bool=AND&submit=Search');
+ exit;
+ break;
+
+ case "pear-dev" :
+ case "pear-cvs" :
+ case "pear-general" :
+ /**
+ * We forward the query to the mailing list archive
+ * at marc.thaimsgroup.com
+ */
+ $location = "http://marc.theaimsgroup.com/";
+ $query =
"l=".$HTTP_POST_VARS['search_in']."&w=2&r=1&q=b&s=".urlencode($HTTP_POST_VARS['search_string']);
+ header("Location: ".$location."?".$query);
+
+ break;
+
+ default :
+ response_header("Search");
+ echo "<h2>Search</h2>\n";
+ echo "<font color=\"#990000\"><b>Invalid search
target.</b></font>\n";
+ response_footer();
+ break;
+}
+?>