include_once("pkgfuncs_po.inc"); # grab the current list of PackageCategories # function pkgCategories() { $cats = array(); $dbh = db_connect(); $q = "SELECT * FROM PackageCategories "; $q.= "ORDER BY Category ASC"; $result = db_query($q, $dbh); if ($result) { while ($row = mysql_fetch_row($result)) { $cats[$row[0]] = $row[1]; } } return $cats; } # grab the current list of PackageLocations # function pkgLocations() { $locs = array(); $dbh = db_connect(); $q = "SELECT * FROM PackageLocations "; $q.= "ORDER BY Location ASC"; $result = db_query($q, $dbh); if ($result) { while ($row = mysql_fetch_row($result)) { $locs[$row[0]] = $row[1]; } } return $locs; } # display the search form in a boxSoft style # function pkg_search_page($SID="") { global $_REQUEST; # SID: session id cookie $locs = pkgLocations(); $cats = pkgCategories(); $devs = getDevelopers(); $tus = getTrustedUsers(); $dbh = db_connect(); # determine paging variables # isset($_REQUEST["PP"]) ? $PP = intval($_REQUEST["PP"]) : $PP = 25; if ($PP < 25) {$PP = 25;} if ($PP > 100) {$PP = 100;} isset($_REQUEST["O"]) ? $O = intval($_REQUEST["O"]) : $O = 0; if (isset($_REQUEST["do_More"])) { $O += $PP; } elseif (isset($_REQUEST["do_Less"])) { $O -= $PP; } if ($O < 0) { $O = 0; } if (isset($_REQUEST["do_Search"]) || isset($_REQUEST["do_MyPackages"])) { # reset the offset to zero if they hit Go/My Packages # $O = 0; } # grab info for user if they're logged in # if ($SID) { $myuid = uid_from_sid($SID); $acct = account_from_sid($SID); } # The search form # print "
\n"; return; } # vim: ts=2 sw=2 noet ft=php ?>