summaryrefslogtreecommitdiff
path: root/contrib/feed-browser/index.php
diff options
context:
space:
mode:
authorMarcin Juszkiewicz <hrw@openembedded.org>2006-09-02 17:31:10 +0000
committerKoen Kooi <koen@openembedded.org>2006-09-02 17:31:10 +0000
commit59ddae46040775c9ad7514adc1d72a9cb6bb83ea (patch)
treed9398597170b5eca3da3ace5aa497cdaa293263e /contrib/feed-browser/index.php
parent70d51b7ba86e3f532d70a37eef04d16014a451b3 (diff)
feed-browser: add search functionality
Diffstat (limited to 'contrib/feed-browser/index.php')
-rw-r--r--contrib/feed-browser/index.php26
1 files changed, 21 insertions, 5 deletions
diff --git a/contrib/feed-browser/index.php b/contrib/feed-browser/index.php
index df7282db7d..1c902ac66e 100644
--- a/contrib/feed-browser/index.php
+++ b/contrib/feed-browser/index.php
@@ -35,6 +35,13 @@ require_once 'includes/functions.inc';
check_database();
+$name = '';
+
+if(isset($_GET['name']))
+{
+ $name = $_GET['name'];
+}
+
$action = '';
if(isset($_GET['action']))
@@ -48,10 +55,8 @@ switch($action)
$ipkgoutput = pkgdetails ($_GET['pnm']);
break;
- case "package":
- $edit = $_POST['edit'];
- $searchword = $edit['searchword'];
- $ipkgoutput = searchpkg ("%$searchword%");
+ case "search":
+ $ipkgoutput = searchpkg ("%{$name}%");
break;
case "section":
@@ -78,7 +83,18 @@ switch($action)
<style type="text/css" media="all">@import "css/feed.css";</style>
</head>
<body >
- <div id="right"><?php echo searchletter(); echo $ipkgoutput; ?></div>
+ <div id="right">
+ <?php echo searchletter(); ?>
+ <form action="" method="get">
+ <fieldset>
+ <label for="name">Package name</label>
+ <input type="text" name="name" value="<?php echo $name; ?>" />
+ <input type="hidden" name="action" value="search" />
+ <input type="submit" value="Search" />
+ </fieldset>
+ </form>
+ <?php echo $ipkgoutput; ?>
+ </div>
<div id="left">
<h1>Sections list</h1>
<?php echo sectionslist(); ?>