" .$HostName.""; } } /** * Format an OAI Request for pretty printing. * @param string $Request OAI Request URL * @return string Formatted request. */ function FormatOaiRequest($Request) { $Result = htmlentities($Request); parse_str($Request, $Args); if (isset($Args["verb"])) { $Verb = $Args["verb"]; unset($Args["verb"]); $CheckOtherArgs = FALSE; switch ($Verb) { case "GetRecord": $CheckOtherArgs = TRUE; $Result = $Verb; if (isset($Args["metadataPrefix"])) { $Result .= " (".htmlentities( $Args["metadataPrefix"]).")"; unset($Args["metadataPrefix"]); } if (isset($Args["identifier"])) { $Result .= "
".htmlentities($Args["identifier"]); unset($Args["identifier"]); } break; case "Identify": $CheckOtherArgs = TRUE; $Result = $Verb; break; case "ListRecords": case "ListIdentifiers": $CheckOtherArgs = TRUE; $Result = $Verb; if (isset($Args["resumptionToken"])) { $Result .= " continued"; unset($Args["resumptionToken"]); } else { if (isset($Args["metadataPrefix"])) { $Result .= " (".htmlentities( $Args["metadataPrefix"]).")"; unset($Args["metadataPrefix"]); } foreach (array("from", "until", "set") as $Thing) { if (isset($Args[$Thing])) { $Result .= "
".$Thing.": " .htmlentities($Args[$Thing]); unset($Args[$Thing]); } } } break; case "ListMetadataFormats": $CheckOtherArgs = TRUE; $Result = $Verb; if (isset($Args["identifier"])) { $Result .= "
".htmlentities($Args["identifier"]); unset($Args["identifier"]); } break; case "ListSets": $CheckOtherArgs = TRUE; $Result = $Verb; if (isset($Args["metadataPrefix"])) { $Result .= " (".htmlentities( $Args["metadataPrefix"]).")"; unset($Args["metadataPrefix"]); } default: break; } if ($CheckOtherArgs && count($Args)) { $Result .= "
Illegal arguments:
"; $OtherArgs = array(); foreach ($Args as $Key => $Val) { $OtherArgs[]= " ".htmlentities($Key).": ".htmlentities($Val); } $Result .= implode("
", $OtherArgs); } $Result = "".$Result.""; return $Result; } } $H_ListFields["DataOne"]["AllowHTML"] = TRUE; $H_ListFields["DataOne"]["ValueFunction"] = function($Item, $FieldId) { return FormatIPAddress($Item["DataOne"]); }; $H_ListFields["DataTwo"]["AllowHTML"] = TRUE; $H_ListFields["DataTwo"]["ValueFunction"] = function($Item, $FieldId) { return FormatOaiRequest($Item["DataTwo"]); }; # construct the ListUI $ListUI = new ItemListUI($H_ListFields); $ListUI->ItemsPerPage($H_ResultsPerPage); $ListUI->BaseLink($H_BaseLink); $StartOptionList = new HtmlOptionList( "ST", array( ST_FOREVER => "All time", ST_24_MONTH => "Last 24 months", ST_12_MONTH => "Last 12 months", ST_6_MONTH => "Last 6 months", ST_3_MONTH => "Last 3 months", ST_1_MONTH => "Last month", ST_1_WEEK => "Last week", ST_1_DAY => "Last day" ), $H_StartTime); $StartOptionList->SubmitOnChange(TRUE); $RPOptionList = new HtmlOptionList( "RP", array( 50 => 50, 100 => 100, 250 => 250, 500 => 500, 750 => 750), $H_ResultsPerPage); $RPOptionList->SubmitOnChange(TRUE); $FTOptionList = new HtmlOptionList( "FT", array( FT_ALL => "All requests", FT_CONTACT => "Contact", FT_SAMPLE => "Sample", FT_HARVEST => "Harvest", FT_SETS => "Sets", ), $H_FilterType); $FTOptionList->SubmitOnChange(TRUE); ?>
Filter Type: GetHtml(); ?> Period: GetHtml(); ?> Results: GetHtml(); ?>

Contact: One representative OAI request from each host that issued any requests.
Sample: OAI requests that retrieved a subset of the collection's records (either a GetRecord or a ListRecords that did not have a subsequent ListRecords with a resumptionToken).
Harvest: Full or partial harvests (a sequence of ListRecords requests where one or more of them had a resumptionToken). Sets: OAI requests asking for a collection-specified set of records (ListSets or ListRecords requests with a set specification).

PrintControls( TransportControlsUI::NO_ITEM_TYPE, $H_BaseLink, "Results " .number_format(min(($H_TransportUI->StartingIndex() + 1), $H_TotalResults)) ." - " .number_format(min(($H_TransportUI->StartingIndex() + $H_ResultsPerPage), $H_TotalResults)) ." of ".number_format($H_TotalResults)."" ); ?>
Display($H_HarvestData); ?>
PrintControls( TransportControlsUI::NO_ITEM_TYPE, $H_BaseLink);