Beispiel #1
0
if (!isset($GLOBALS['QUERY']['original'])) {
    $GLOBALS['QUERY']['original'] = "";
}
if ($_DDATA['online'] && count($_RESULTS)) {
    $_REQUEST['start'] = !isset($_REQUEST['start']) ? 1 : (count($_RESULTS) <= $resultsPerPage ? 1 : (int) $_REQUEST['start']);
    $_REQUEST['end'] = min($_REQUEST['start'] + $resultsPerPage - 1, count($_RESULTS));
}
//debug::rr($GLOBALS["nw_categories"]);
// --------------------------------------------------------------------------
// -- PREPARE OUTPUT
// --------------------------------------------------------------------------
// --------------------
// Create $peopleresult
// --------------------
if (isset($_REQUEST['qry'])) {
    $peopleresult = people::getSearchPeople($_REQUEST['qry'], "box", "people-list", "", "");
    if ($peopleresult !== false) {
        $peopleresult = trim($peopleresult);
    }
} else {
    $peopleresult = false;
}
// --------------------
// Create $searchform
// --------------------
// Method should be GET to ensure back-button functionality on result page
$searchform = "  <form action='" . $_SERVER['PHP_SELF'] . "' method='get' id='os_search' " . " enctype='application/x-www-form-urlencoded'>\r\n" . "    <div>\r\n";
if (isset($_LANG)) {
    $searchform .= "      <input type='text' id='qry' name='qry' " . "value='" . htmlspecialchars($GLOBALS['QUERY']['original']) . "'>\r\n";
    if (isset($_SDATA['categories']) && count($_SDATA['categories']) > 1) {
        $searchform .= "      <label>\r\n" . "        &nbsp; &nbsp; \r\n" . "        <select name='ctg' size='1'>\r\n" . "          <option value=''" . ($GLOBALS['QUERY']['category'] == "" ? " selected='selected'" : "") . ">in the entire Nordita web</option>\r\n";