cvs: pearweb /public_html search.php
| From: | Martin Jansen | Date: | Thu, 14 Jul 2005 21:02:17 +0000 |
| Subject: | cvs: pearweb /public_html search.php | ||
| Groups: | php.pear.cvs php.pear.core | ||
| Request: | Send a blank email to pear-cvs+get-33046@lists.php.net to get a copy of this message | ||
mj Thu Jul 14 17:02:17 2005 EDT
Modified files:
/pearweb/public_html search.php
Log:
* Added <select> form element to set the search context.
http://cvs.php.net/diff.php/pearweb/public_html/search.php?r1=1.18&r2=1.19&ty=u
Index: pearweb/public_html/search.php
diff -u pearweb/public_html/search.php:1.18 pearweb/public_html/search.php:1.19
--- pearweb/public_html/search.php:1.18 Thu Jul 14 16:54:32 2005
+++ pearweb/public_html/search.php Thu Jul 14 17:02:15 2005
@@ -15,7 +15,7 @@
+----------------------------------------------------------------------+
| Authors: Martin Jansen <mj@php.net> |
+----------------------------------------------------------------------+
- $Id: search.php,v 1.18 2005/07/14 20:54:32 mj Exp $
+ $Id: search.php,v 1.19 2005/07/14 21:02:15 mj Exp $
*/
require_once "Damblan/Search.php";
@@ -32,8 +32,16 @@
echo "<h2>" . $search->getTitle() . "</h2>\n";
echo "<form method=\"get\" name=\"search\"
action=\"search.php\">\n";
-echo "<input type=\"hidden\" name=\"in\" value=\"" . $in .
"\" />\n";
-echo "<input type=\"text\" name=\"q\" value=\"" . $term .
"\" size=\"30\" /><input type=\"submit\"
value=\"Search\" />\n";
+echo "<input type=\"text\" name=\"q\" value=\"" . $term .
"\" size=\"30\" /> in ";
+
+echo "<select name=\"in\" size=\"1\">\n";
+foreach (array("packages" => "Packages", "site" => "This
Site (using Yahoo!)", "users" => "Developers", "pepr" =>
"PEPr proposals") as $key => $value) {
+ $selected = ($key == $in) ? " selected=\"yes\" " : "";
+ echo "<option value=\"" . $key . "\" " . $selected .
">" . $value . "</option>\n";
+}
+echo "</select>\n";
+
+echo "<input type=\"submit\" value=\"Search\" />\n";
echo "<script language=\"JavaScript\"
type=\"text/javascript\">document.forms.search.q.focus();</script>\n";
echo "</form>\n";