4 * (c) Koen Kooi 2006, 2007, 2008, 2009
5 * (c) Marcin Juszkiewicz 2006, 2007
7 * This php script is intended to do the following:
9 * - have searchable webfronted for the feed like packages.ubuntu.com
13 * - search functionality
14 * - provide feed-management functionality
15 * - allow uploading of new software
18 * This program is free software; you can redistribute it and/or modify it under
19 * the terms of the GNU General Public License as published by the Free
20 * Software Foundation; either version 2 of the License.
22 * This program is distributed in the hope that it will be useful, but WITHOUT
23 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
24 * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
26 * You should have received a copy of the GNU Library General Public License along
27 * with this library; see the file COPYING.LIB. If not, write to the Free
28 * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
33 require_once 'includes/config.inc';
34 require_once 'includes/functions.inc';
38 die("Database not found and cannot be created.");
41 if (isset($_POST["action"]) && $_POST["action"] != "") {
42 $action = $_POST["action"];
44 print "Invalid action: $action";
48 if (isset($_POST["pkgsearch"]) && $_POST["pkgsearch"] != "") {
49 $pkgsearch = $_POST["pkgsearch"];
52 if (isset($_POST["section"]) && $_POST["section"] != "") {
53 $section = $_POST["section"];
56 if (isset($_POST["arch"]) && $_POST["arch"] != "") {
57 $arch = $_POST["arch"];
62 if (isset($_POST["pkgname"]) && $_POST["pkgname"] != "") {
63 $pkgname = $_POST["pkgname"];
76 echo searchpkg("%{$pkgsearch}%", $arch);
79 echo pkgdetails($pkgname);
82 echo searchsection($section);