'.$date_respons.' '.$sysconf['OAI']['Identify']['baseURL'].' OAI Repository disabled '; exit(); } // required library require LIB.'oai-pmh.inc.php'; require LIB.'detail.inc.php'; $config['oai_pmh_verbs'] = array( 'GetRecord', 'Identify', 'ListMetadataFormats', 'ListIdentifiers', 'ListRecords', 'ListSets' ); // cek apakah ada request OAI-PMH pada REQUEST HTTP GET atau POST if (isset($_GET['verb']) || isset($_POST['verb'])) { $oai_verb = isset($_GET['verb'])?trim($_GET['verb']):trim($_POST['verb']); if (in_array($oai_verb, $config['oai_pmh_verbs'])) { // MULAI PROSES OAI-PMH REQUEST // buat instance object OAI-PMH $oai_respon_handlers = new OAI_Web_Service($dbs); // mulai output XML header('Content-type: text/xml'); echo ''."\n" .''."\n" .''.$date_respons.''."\n"; switch ($oai_verb) { case 'ListSets'; echo $oai_respon_handlers->ListSets(); break; case 'ListIdentifiers'; $metadataPrefix = isset($_GET['metadataPrefix'])?$dbs->escape_string(trim($_GET['metadataPrefix'])):'oai_dc'; echo $oai_respon_handlers->ListIdentifiers($metadataPrefix); break; case 'ListMetadataFormats'; echo $oai_respon_handlers->ListMetadataFormats(); break; case 'ListRecords'; $metadataPrefix = isset($_GET['metadataPrefix'])?$dbs->escape_string(trim($_GET['metadataPrefix'])):'oai_dc'; echo $oai_respon_handlers->ListRecords($metadataPrefix); break; case 'GetRecord'; $identifier = isset($_GET['identifier'])?$dbs->escape_string(trim($_GET['identifier'])):'0'; $metadataPrefix = $dbs->escape_string(trim($_GET['metadataPrefix'])); echo $oai_respon_handlers->GetRecord($identifier, $metadataPrefix); break; default: echo $oai_respon_handlers->Identify(); break; } echo ''; } else { // mulai output XML header('Content-type: text/xml'); echo ''."\n" .''."\n" .''.$date_respons.''."\n"; echo ''.$sysconf['OAI']['Identify']['baseURL'].' Illegal OAI verb '; } exit(); } else { // mulai output XML header('Content-type: text/xml'); echo ''."\n" .''."\n" .''.$date_respons.''."\n"; echo ''.$sysconf['OAI']['Identify']['baseURL'].' Illegal OAI verb '; exit(); }