LabelToDisplay) * @param array $SearchValues Values set for this search * @param int $TypeMask Bitmask of MetadataSchema::MDFTYPE_ values * specifying which fields to display */ function DisplayLimits($Fields, $SearchParameters, $TypeMask) { $NumberOfListItems = 6; $NumberOfListItemsForFlags = 2; print "
"; foreach ($Fields as $FieldId => $DisplayName) { $Field = new MetadataField($FieldId); if ($Field->Type() & $TypeMask) { $CurrentValues = $SearchParameters->GetSearchStringsForField($FieldId); $CurrentValues = ConvertValueNamesToIds($Field, $CurrentValues); $PossibleValues = DeterminePossibleValues($Field); $DisabledOptions = DetermineDisabledValues($Field, $PossibleValues); $AllowMultiple = ($Field->SearchGroupLogic() == SearchEngine::LOGIC_OR) || ($Field->AllowMultiple()); if (count($PossibleValues) > 0) { print "
" ."
"; $OptionList = new HtmlOptionList( "F_SearchLimit".$FieldId."[]", $PossibleValues, $CurrentValues ); $OptionList->MultipleAllowed( $AllowMultiple ); $OptionList->DisabledOptions( $DisabledOptions ); $OptionList->Size( ($Field->Type() == MetadataSchema::MDFTYPE_FLAG) ? $NumberOfListItemsForFlags : $NumberOfListItems ); $OptionList->PrintHtml(); print "
"; } } } print "
"; } ?>

Advanced Search

GetKeywordSearchStrings(); } else { # if this is a multi-field search, display the value from # the first field as the remainder should all be identical $FieldIds = explode("-", $FieldId); $CurrentValues = $H_SearchParameters->GetSearchStringsForField( current($FieldIds) ); } # if we have no values for this field, add a single empty value # so that the field is still displayed if (count($CurrentValues) == 0) { $CurrentValues = array(""); } # iterate over all the currently set values, printing # corresponding HTML elements for each foreach ($CurrentValues as $CurrentValue) { print "" .""; $SearchCatIndex++; } } ?>
Field Search Terms
"; $OptionList = new HtmlOptionList( "F_SearchCat".$SearchCatIndex, $H_FieldsHavingTextForms, $FieldId ); $OptionList->AddAttribute("title", "Search Field ".$SearchCatIndex); $OptionList->PrintHtml(); print "" ."" ."

Limits (Optional)

Show all Hide all
$Limits) { ?>
1) { ?> []
     PrintHtml(); ?> 5, 10 => 10, 20 => 20, 30 => 30, 50 => 50, 100 => 100); $OptList = new HtmlOptionList("F_RecordsPerPage", $DisplayOptions, $H_RecordsPerPage); $OptList->PrintHtml(); ?>
IsLoggedIn()) { ?>

Load Saved Search:

" ."\n"; } ?>