diff options
| author | Cliff Brake <cbrake@bec-systems.com> | 2009-02-09 10:42:37 -0500 |
|---|---|---|
| committer | Cliff Brake <cbrake@bec-systems.com> | 2009-02-09 10:42:37 -0500 |
| commit | 68e1ea7aeddc4f7efc621558dfd424cd2fe22674 (patch) | |
| tree | 14bbcb046384962f5a0e58cb21f627d8e36a1401 /contrib/feed-browser/section.php | |
| parent | cd0a56bb41942c6bc470a3ec0e2d080fba95ef80 (diff) | |
| parent | 0d09acc3587baf6981b4f787b021499eeb5f4a6e (diff) | |
Merge branch 'org.openembedded.dev' of git@git.openembedded.net:openembedded into org.openembedded.dev
Diffstat (limited to 'contrib/feed-browser/section.php')
| -rw-r--r-- | contrib/feed-browser/section.php | 85 |
1 files changed, 85 insertions, 0 deletions
diff --git a/contrib/feed-browser/section.php b/contrib/feed-browser/section.php new file mode 100644 index 0000000000..083910bc46 --- /dev/null +++ b/contrib/feed-browser/section.php @@ -0,0 +1,85 @@ +<?php + +/* + * (c) Koen Kooi 2006, 2007, 2008, 2009 + * (c) Marcin Juszkiewicz 2006, 2007 + * + * This php script is intended to do the following: + * + * - have searchable webfronted for the feed like packages.ubuntu.com + * + * ToDo: + * + * - search functionality + * - provide feed-management functionality + * - allow uploading of new software + * + * + * This program is free software; you can redistribute it and/or modify it under + * the terms of the GNU General Public License as published by the Free + * Software Foundation; either version 2 of the License. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU Library General Public License along + * with this library; see the file COPYING.LIB. If not, write to the Free + * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, + * USA. + * + */ + +require_once 'includes/config.inc'; +require_once 'includes/functions.inc'; + +if(!check_database()) +{ + die("Database not found and cannot be created."); +} + +if (isset($_POST["action"]) && $_POST["action"] != "") { + $action = $_POST["action"]; +} else { + print "Invalid action: $action"; + exit; +} + +if (isset($_POST["pkgsearch"]) && $_POST["pkgsearch"] != "") { + $pkgsearch = $_POST["pkgsearch"]; +} + +if (isset($_POST["section"]) && $_POST["section"] != "") { + $section = $_POST["section"]; +} + +if (isset($_POST["arch"]) && $_POST["arch"] != "") { + $arch = $_POST["arch"]; +} else { + $arch = ""; +} + +if (isset($_POST["pkgname"]) && $_POST["pkgname"] != "") { + $pkgname = $_POST["pkgname"]; +} + + +//print("$action"); +switch($action) { +case "sectionslist": + echo sectionslist(); + break; +case "searchletter": + echo searchletter(); + break; +case "pkgquery": + echo searchpkg("%{$pkgsearch}%", $arch); + break; +case "pkgname": + echo pkgdetails($pkgname); + break; +case "section": + echo searchsection($section); + break; +} +?> |
