GetFieldByName($FieldTypesOrFieldName)); } else { $Fields = $Schema->GetFields($FieldTypesOrFieldName); } # set up a counter for the loop $Counter = 0; foreach ($Fields as $CurrentField) { # if limit field is marked to be used in Advanced Search if ($CurrentField->Enabled() && $CurrentField->IncludeInAdvancedSearch() && ($G_User->HasPriv($CurrentField->ViewingPrivilege()) || $G_User->HasPriv($CurrentField->EditingPrivilege()) || ($CurrentField->ViewingPrivilege() == 0))) { if (($CurrentField->Type() & (MetadataSchema::MDFTYPE_OPTION | MetadataSchema::MDFTYPE_FLAG | MetadataSchema::MDFTYPE_USER)) || $CurrentField->Name() == "Cumulative Rating") { # print entry and increment counter if ($Counter) { print(", "); } print("".strtolower($CurrentField->Name()).""); $Counter++; } } if (is_numeric($ListLength) && $Counter >= $ListLength) { print(", and more"); break; } } } # print a search limit form entry function PrintSearchLimitFormEntry($LimitName, $LimitType) { if ($LimitType & (MetadataSchema::MDFTYPE_OPTION | MetadataSchema::MDFTYPE_FLAG | MetadataSchema::MDFTYPE_USER)) { $ListLength = ($LimitType == MetadataSchema::MDFTYPE_FLAG) ? 1 : 6; ?>
:
Minimum Rating:
IsLoggedIn() && $G_User->HasPriv(PRIV_RESOURCEADMIN)) ? 4 : 2; } if (isset($G_SearchGroups)) { return max(count(SavedSearch::TranslateSearchGroupsToSearchFieldNames( $G_SearchGroups)), $Default); } // Check to see if we've got saved search selections to use elseif ($G_User->IsLoggedIn()) { $SSData = $G_User->Get("SearchSelections"); if (!is_null($SSData)) { $SearchSelections = unserialize($SSData); return max(count($SearchSelections), $Default); } } return $Default; } function DisplayOptionEntry($Value, $Label) { ?> >
:
Minimum Cumulative Rating:
:

# Advanced Search

(Need Help?)

Field | Search Terms
--- | ---

Limits (Optional)

Save Search As: Records per page:
IsLoggedIn()) { ?>
IsLoggedIn() ) { ?>
Manage Your Searches
Load Saved Search: